Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread M. Sokolewicz
Robert Cummings wrote: On Tue, 2005-06-14 at 01:31, Ron Korving wrote: Jason, you are absolutely right.. this is not about input filtering at all. It's about replacing: $x = (isset($ANY_var) ? $ANY_var : 'Default Value'); by $x = ifsetor($ANY_var, 'Default Value'); So, Robert's solution is no

[PHP-DEV] Zend standalone build broken

2005-06-14 Thread Stanislav Malyshev
As of now, Zend engine standalone build is broken in CVS, in two places: 1. SED variable is used though not defined 2. PHP_ARG_WITH is used, though not defined -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Internals - PHP R

Re: [PHP-DEV] Zend standalone build broken

2005-06-14 Thread Jani Taskinen
Fixed. --Jani On Tue, 14 Jun 2005, Stanislav Malyshev wrote: As of now, Zend engine standalone build is broken in CVS, in two places: 1. SED variable is used though not defined 2. PHP_ARG_WITH is used, though not defined -- Donate @ http://pecl.php.net/wishlist.php/sniper -- PHP

Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread Hartmut Holzgraefe
M. Sokolewicz wrote: >> $x = (isset($ANY_var) ? $ANY_var : 'Default Value'); >> by >> $x = ifsetor($ANY_var, 'Default Value'); >> I must say I fully agree; I don't see any use in putting extra functions in the PHP namespace just because people don't want to type a couple of extra characters. i

Re: [PHP-DEV] HEAD does not link on Win32

2005-06-14 Thread Ilia Alshanetsky
Uh, bzero is standard *nix function that has nothing to do with libmysql. I will change it to memset since Win32 does not appear to like it :/ Ilia Andrey Hristov wrote: bzero() is a function exported by libmysql. Andrey Andi Gutmans wrote: Seems to be due to Ilia's latest patch. Ilia, ca

Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread Ron Korving
But how about this..: Let's not implement functions that do what you want to achieve, but extend PHP in whatever way necessary that would enable you to write such a function yourself? Say for example that prepending @ to function parameters would make it possible to call the function with an unse

Re[2]: [PHP-DEV] PHP 5.1

2005-06-14 Thread Sven Fuchs
Why isn't is possible in userland? Is there any problem with using this? function ifsetor(&$var, $default = null) { return isset($var) ? $var : $default; } echo ifsetor($a, 'foo'); echo $a, $b; echo ifsetor($a, 'foo'); echo isset($a) ? 'is set' : 'not set'; expected result: foo Notice: Und

[PHP-DEV] CVS Account Request: noihex

2005-06-14 Thread Max No� i Herrero
I am member of the Catalan translation team. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread Sebastian Mendel
Robert Cummings wrote: > [...] > > On that note, how comes there's a $GLOBAL array and not a $LOCAL array > for vars declared in the immediate scope :) you can use get_defined_vars() http://www.php.net/get_defined_vars -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdateti

Re: Re[2]: [PHP-DEV] PHP 5.1

2005-06-14 Thread Ron Korving
No, ifsetor() is not possible in user land, because it generates notices, and a php core function ifsetor() would not generate notices. That's really the way it has to be. Ron "Sven Fuchs" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why isn't is possible in userland? Is there a

[PHP-DEV] Re: cvs: ZendEngine2 / zend_vm_execute.h zend_vm_gen.php zend_vm_opcodes.h

2005-06-14 Thread Sebastian Bergmann
Dmitry Stogov wrote: > Log: > Removed old executor Was the old executor not needed for debugger extensions like Xdebug? At the moment I cannot build Xdebug on Windows: xdebug.obj: error LNK2019: unresolved external symbol __imp__zend_vm_use_old_executor referenced in function _zm_startup_xde

Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread Sebastian Mendel
Ron Korving wrote: >> function ifsetor(&$var, $default = null) { >> return isset($var) ? $var : $default; >> } >> >> echo ifsetor($a, 'foo'); >> echo $a, $b; >> echo ifsetor($a, 'foo'); >> echo isset($a) ? 'is set' : 'not set'; >> >> expected result: >> >> foo >> Notice: Undefined variable: a

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_vm_execute.h zend_vm_gen.php zend_vm_opcodes.h

2005-06-14 Thread Zeev Suraski
At 16:35 14/06/2005, Sebastian Bergmann wrote: Dmitry Stogov wrote: > Log: > Removed old executor Was the old executor not needed for debugger extensions like Xdebug? At the moment I cannot build Xdebug on Windows: xdebug.obj: error LNK2019: unresolved external symbol __imp__zend_vm_use_old

[PHP-DEV] CVS Account Request: eduardcapell

2005-06-14 Thread Eduard Capell Brufau
Member of the Catalan translation -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread Zeev Suraski
At 16:54 14/06/2005, Sebastian Mendel wrote: Ron Korving wrote: >> function ifsetor(&$var, $default = null) { >> return isset($var) ? $var : $default; >> } >> >> echo ifsetor($a, 'foo'); >> echo $a, $b; >> echo ifsetor($a, 'foo'); >> echo isset($a) ? 'is set' : 'not set'; >> >> expected resu

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_vm_execute.h zend_vm_gen.php zend_vm_opcodes.h

2005-06-14 Thread Derick Rethans
On Tue, 14 Jun 2005, Zeev Suraski wrote: > At 16:35 14/06/2005, Sebastian Bergmann wrote: > >Dmitry Stogov wrote: > > > Log: > > > Removed old executor > > > > Was the old executor not needed for debugger extensions like Xdebug? Dmitry and I discussed this before he removed it - so no worries :)

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_vm_execute.h zend_vm_gen.php zend_vm_opcodes.h

2005-06-14 Thread Zeev Suraski
At 16:54 14/06/2005, Derick Rethans wrote: > There's a new mechanism that will allow Xdebug to do its stuff w/o the old > executor. It would require an update. Nope, it's already done ;-) At the very least Sebastian's source tree needs an update, even if you already committed it :) Zeev -

Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread Ron Korving
Hmm, you're right.. so the reference "&" already takes care of this... Well, then I don't see the point of the whole ifsetor() discussions... people can implement this themselves. Ron "Sebastian Mendel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ron Korving wrote: > > >> funct

Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread Ron Korving
Hi Zeev, You're absolutely right.. How awful of me that I didn't see this coming. Honestly, what's the point of having an ifsetor() in PHP, when people can obviously write it themselves? Everybody wants a slighty different implementation of an ifsetor(), ifnotemptyor(), coalesce(), etc... Why are

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_vm_execute.h zend_vm_gen.php zend_vm_opcodes.h

2005-06-14 Thread Sebastian Bergmann
Zeev Suraski wrote: > At the very least Sebastian's source tree needs an update, even if you > already committed it :) He committed after I updated my source tree. My bad ;-) -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD

Re[2]: [PHP-DEV] PHP 5.1

2005-06-14 Thread Sven Fuchs
> This implementation of issetor() actually works fine, except it does > pollute the symbol tables with empty variables ($a and $b in this > examples are created, as nulls). What are the consequences of polluting the symbol tables this way? Should this issetor() be considered a "bad practice", pro

Re: Re[2]: [PHP-DEV] PHP 5.1

2005-06-14 Thread Ron Korving
Personally, I doubt this is a problem.. I mean, how many ifsetor() variables are we talking here? You call the function, so therefor the variable could be set, otherwise you wouldn't be checking for it. In the case it was set, it would've been in the symbol table anyway. Ron "Sven Fuchs" <[EMAIL

Re: Re[2]: [PHP-DEV] PHP 5.1

2005-06-14 Thread Ron Korving
Personally, I doubt this is a problem.. I mean, how many ifsetor() variables are we talking here? You call the function, so therefor the variable could be set, otherwise you wouldn't be checking for it. In the case it was set, it would've been in the symbol table anyway. Ron "Sven Fuchs" <[EMAIL

Re[2]: [PHP-DEV] PHP 5.1

2005-06-14 Thread Zeev Suraski
At 17:10 14/06/2005, Sven Fuchs wrote: > This implementation of issetor() actually works fine, except it does > pollute the symbol tables with empty variables ($a and $b in this > examples are created, as nulls). What are the consequences of polluting the symbol tables this way? Well, it will

Re: Re[2]: [PHP-DEV] PHP 5.1

2005-06-14 Thread Ron Korving
There is one case though, which can still not be implemented (probably?) by users, and that's a coalesce function, since that would require fetching values by using func_get_args(), which doesn't return references. So the only way I could imagine implementing such coalesce() function would be like

Re[3]: [PHP-DEV] PHP 5.1

2005-06-14 Thread Sven Fuchs
Great. Thanks a lot for the improvement. -- Sven > At 17:10 14/06/2005, Sven Fuchs wrote: >> > This implementation of issetor() actually works fine, except it does >> > pollute the symbol tables with empty variables ($a and $b in this >> > examples are created, as nulls). >> >>What are the conse

[PHP-DEV] CVS Account Request: oriolm

2005-06-14 Thread Oriol Morell
Member of the catalan translation -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 5.1

2005-06-14 Thread Robert Cummings
On Tue, 2005-06-14 at 09:45, Sebastian Mendel wrote: > Robert Cummings wrote: > > > [...] > > > > On that note, how comes there's a $GLOBAL array and not a $LOCAL array > > for vars declared in the immediate scope :) > > you can use get_defined_vars() > > http://www.php.net/get_defined_vars Yo

Re: [PHP-DEV] CVS Account Request: oriolm

2005-06-14 Thread Wez Furlong
Are these requests legitimate or should we start blocking people mentioning catalan in cvs account requests? --Wez. On 6/14/05, Oriol Morell <[EMAIL PROTECTED]> wrote: > Member of the catalan translation > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http: