Re: [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters

From: Date: Mon, 12 Mar 2012 14:09:04 +0000
Subject: Re: [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-58877@lists.php.net to get a copy of this message
Hello Arvids, The patch of Anthony, clearly states that this is accepted: function foo ( int $bar = null ) { } And this is what I called an int|null. Lazare INEPOLOGLOU Ingénieur Logiciel 2012/3/12 Arvids Godjuks <arvids.godjuks@gmail.com> > 2012/3/12 Lazare Inepologlou <linepogl@gmail.com> > >> > I'm not sure about you, but I don't wanna see that kind of thing >> eventually making it's way into the language >> >> Me neither. All I am saying is that, since int|null is already here from >> the back door, I think it should be properly supported. >> > > There is no int|null at the moment, and should not be. You can pass > anything - object, array, string, bool, int, float resource, callable - > they all are accepted and are checked in function body if it's writer wrote > that code. > Hint should provide a hint for a single type, or hint doesn't belong there. >

« previous php.internals (#58877) next »