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

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[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

[PHP-DEV] insufficient userland ifsetor() - Re[2]: [PHP-DEV] what happened to that new isset() like language

2005-10-30 Thread Sven Fuchs
Hi Marcus, > ifsetor or any equivalent cannot be done in userspace. i agree here. Last time this topic has been discussed I've naively asked for opinions regarding a userland implementation. Afterwards the discussion suddenly ended. In the meantime I've tried to use it more often but found myse