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