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
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
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
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
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
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
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
I am member of the Catalan translation team.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
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
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
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
Member of the Catalan translation
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
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
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 :)
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
-
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
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
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
> 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
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
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
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
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
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
Member of the catalan translation
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
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
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:
29 matches
Mail list logo