Re: [RFC - Discussion] Parameter Type Casting Hints

From: Date: Sun, 04 Mar 2012 16:46:43 +0000
Subject: Re: [RFC - Discussion] Parameter Type Casting Hints
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-58585@lists.php.net to get a copy of this message
Anthony, just a tiny detail in your RCF: So (int) $foo = null and (int) $foo = 1 are both supported, but (int) $foo > = “1” will generate an E_COMPILE_ERROR. > If null is going to be cast, (int)null is 0. So I don't think it should be a valid default value. Lazare INEPOLOGLOU Ingénieur Logiciel 2012/3/4 Anthony Ferrara <ircmaxell@gmail.com> > Hey all, > > I've drafted an RFC for the Parameter type casting hint proposal that > I posted to before. Attached to the RFC is a patch that's proposed > for inclusion in core for functionality (it doesn't include news > entries, or documentation, or any of the other steps that would be > needed prior to commit). > > https://wiki.php.net/rfc/parameter_type_casting_hints > > Please provide feedback here on the implementation and RFC topics. > > Thanks, > > Anthony > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#58585) next »