On Tue, November 21, 2006 8:40 am, Jared Farrish wrote: > Is this legal? Note where the typecasting occurs: In the function > parameter > list, before the variable. > > <code> > function doSomething( (int) $int1, (int) $int2 ) { > //blah blah > } > </code> > > This would take the place of: > > <code> > function doSomething($int1, $int2) { > $int1 = (int) $int1; > $int2 = (int) $int2; > } > </code> > > Is this possible? You could try it and see faster than posting... It won't work, and if the syntax DID parse, it would probably be "type hinting" rather than "type casting" which means it would possibly throw an error/notice/warning/whatever if your data coming in was not (int) type. AFAIK, PHP does not support this for (int) in any current version, and plans for the future are nebulous in this regard. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php