Help with typecasting by default in the function parameter list
| From: | Jared Farrish | Date: | Tue, 21 Nov 2006 14:40:54 +0000 |
| Subject: | Help with typecasting by default in the function parameter list | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-244958@lists.php.net to get a copy of this message | ||
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?
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$