Re: Re: [RFC] ifsetor operator
| From: | Marcus Boerger | Date: | Sat, 17 Apr 2004 08:52:46 +0000 |
| Subject: | Re: Re: [RFC] ifsetor operator | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9315@lists.php.net to get a copy of this message | ||
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