Re: Re: [RFC] ifsetor operator
| From: | Alan Knowles | Date: | Sat, 17 Apr 2004 09:20:12 +0000 |
| Subject: | Re: Re: [RFC] ifsetor operator | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9319@lists.php.net to get a copy of this message | ||
if you make @ fetch_var it's own opcode,
- on isset() = true you do a straight return value. .. No touching error handler etc.. (this should be v.fast)
- on isset() = false you modify the error_handling + do the callback
(this is slow...)
You have effectively solved the performance issue 99% of the time....
Regards
Alan
Jason Garber wrote:
Don't forget that some users make use of set_error_handler(). This results in a user function being called with quite a bit of parameter data EVEN if an @ is prepended to the statement. The error level is temporarily set to 0 for the duration of the statement. That's why a new internal function addresses the issue so cleanly. ~Jason At 4/17/2004 05:03 PM +0800, Alan Knowles wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comYeah looks like 50% slower..! Wouldnt it make more sense to optimize @ + fetch_var(), rather than introduce new syntax? Regards Alan Marcus Boerger wrote:Hello Alan, Saturday, April 17, 2004, 2:36:55 AM, you wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.phpJason Garber wrote:In our code, you will find many blocks looking like $CUST_ID = (integer) (isset($_POST['CUST_ID']) ? $_POST['CUST_ID'] : 0);so how is that different from $CUST_ID = (integer) @$_POST['CUST_ID'];@ is damn slow