Re: Help with typecasting by default in the function parameter list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

have you taken 5 seconds to run the code and find out?

> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux