This doesn't mean we're going to create opcodes for every new feature nor does it mean that people should stop using functions. In any case, the performance impact is probably close to negligible as getting the variables is often only a small part of the script. DB access for example, is usually much more expensive.
Andi
At 10:52 AM 4/17/2004 +0200, Marcus Boerger wrote:
Hello Red,
a user function call is much much more expensive.
marcus
Saturday, April 17, 2004, 4:33:56 AM, you wrote:
> I guess this would only help the lazy guys around. There are many other > ways to get around this without writing that many ternary constructs
> eg:
> <?php
> function get_post_var ( $name , $default ) { > return isset ( $_POST[ $name ] ) ? $_POST[ $name ] : $default ; > }
> $CUST_ID = (integer) get_post_var ( 'CUST_ID' , 0 ); > $EMPL_ID = (integer) get_post_var ( 'EMPL_ID' , 0 ); > ...
?>>
> -- red
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php