Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-12 Thread Stefan Walk
Antony Dovgal wrote: > Only if you created it during the call. > > function foo(&$arg) { > } > > foo($nonex); > var_dump(isset($nonex)); > ?> > > bool(false) > $ php -r 'function foo(&$foo){} function bar(){ foo($var); var_dump(get_defined_vars());} bar();' array(1) { ["var"]=> NULL } --

Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread D. Dante Lorenso
Marcus Boerger wrote: no, the compiler generates code that makes the executor generate the variable and complain prior to performing the call. The executor doesn't complain about unset variables prior to calling functions by reference, so I was thinking it could be modified to also not com

Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread Antony Dovgal
On 12.05.2006 03:05, D. Dante Lorenso wrote: Antony Dovgal wrote: On 12.05.2006 02:49, D. Dante Lorenso wrote: * #define ZEND_SEND_BY_REF 1 This one is what you need. I don't think it is. The variable did not exist before the function was called and should STILL not exist afterwards.

Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread Marcus Boerger
Hello D., Friday, May 12, 2006, 1:10:41 AM, you wrote: > Marcus Boerger wrote: >> no, the compiler generates code that makes the executor generate the >> variable and complain prior to performing the call. >> > The executor doesn't complain about unset variables prior to calling > functions

Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread D. Dante Lorenso
Antony Dovgal wrote: On 12.05.2006 02:49, D. Dante Lorenso wrote: * #define ZEND_SEND_BY_REF 1 This one is what you need. I don't think it is. The variable did not exist before the function was called and should STILL not exist afterwards. I believe when you pass by reference, the v

Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread Marcus Boerger
Hello D., no, the compiler generates code that makes the executor generate the variable and complain prior to performing the call. In a zend extension you could try to hook into that process. marcus Friday, May 12, 2006, 12:49:45 AM, you wrote: > All, > Is there a way to define a function in

Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread Antony Dovgal
On 12.05.2006 02:49, D. Dante Lorenso wrote: All, Is there a way to define a function in an extension which would not require a passed in variable to exist? In other words, can ZE be modified to allow extensions to not trigger E_NOTICE warnings if an unset variable is passed to a function wh

[PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread D. Dante Lorenso
All, Is there a way to define a function in an extension which would not require a passed in variable to exist? In other words, can ZE be modified to allow extensions to not trigger E_NOTICE warnings if an unset variable is passed to a function which does not care if the var is set? I can