Re: Help with typecasting by default in the function parameter list
| From: | Stut | Date: | Tue, 21 Nov 2006 14:55:13 +0000 |
| Subject: | Re: Help with typecasting by default in the function parameter list | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244960@lists.php.net to get a copy of this message | ||
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?No, but maybe worth suggesting to the internals list for 6. I'd certainly like to see it. -Stut