Re: Introducing "Array Of" RFC

From: Date: Fri, 28 Feb 2014 09:29:29 +0000
Subject: Re: Introducing "Array Of" RFC
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-72857@lists.php.net to get a copy of this message
2014-02-28 9:11 GMT+01:00 Crypto Compress <cryptocompress@googlemail.com>: > Hello List, > > So, should we allow nulls in an arrayof-style type hint? >> > > No. Null values (optional values) should be allowed within an > nullable-arrayof-style type hint. > > Compare: function foo(Bar $baz = null) > and: function foo(Bar $baz) > > This is not the same syntax and null is not a type. > > I do not really understand your point here but I want to shout out that null is definitely a type having only one possible value. This is one thing that PHP got right in contrast to Java, C# etc. Lazare INEPOLOGLOU Ingénieur Logiciel > > cryptocompress > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#72857) next »