That would satisfy some of the requested feature, but try
calling ifsetor($my_array['bad key'], functionWithSideEffects()).
Marcus has repeatedly mentioned that the requested feature is
hard (bordering on impossible) to implement, but in the requested
feature (if I understand it (and it is what I would ask for too :) )),
there would be no error for using a key that isn't in the array,
there would be no side effect of creating a key in the array, and
if the $my_array['bad key'] actually did happen to be non-NULL,
the function with the side effects wouldn't get called.
That would be really handy, especially if it could take a variable
number of arguments. Using a standard name like coalesce would
be nice.
BTW, I have no weight around here; just thought I could help
clarify, having following this thread with interest...
- Todd
On Fri, 2004-07-09 at 12:07, Cris H wrote: