netcat wrote:Thanks for the link.
i've started to play with a more general way to handle this:
switch(mixed data [, callback compare_function])
seems the sanest thing up until now.
slighly O.T.: would be and even better if lambda functions were available here
http://php.net/create-function
It's just feels a little awkward to see something like:
switch($x,create_function('$a,$b','return $a=="MY$b;"')) {
}
Again, it's a feeling, maybe it's just me.
It doesn't feel right to me that inside definition of new function
i have to escape quotes (that's because create_function
is a function and not special construction on the other side if
it would be a construct it can't return a value as in $x=create_function(...) ).
Anyway, i have nothing better to suggest (yet) ....
I hope one of you have some suggestion that will make create_function more usable.
-- NetCat
------------------------------------------------------ SPAM-Free 10mb Free email + Antivirus + POP3 + more... Get it at http://www.doal.co.il:81/free/?c=all-spam
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php