[development] the time of $op is over?
Earnie Boyd
earnie at users.sourceforge.net
Tue May 13 12:01:02 UTC 2008
Quoting David Timothy Strauss <david at fourkitchens.com>:
> * A long series of cases is often justification for reconsidering the
> program structure, like we are right now with $op.
>
You don't have to use a switch statement now nor long complicated
if/elseif/else statements either.
<?php
$func = '_mymodule_func_' . $op;
if (function_exists($func)) {
$ret = call_user_func_array($func, $args);
}
?>
Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/
More information about the development
mailing list