I believe that was a necessary PHP4 evil, but Reflection can now be used and it is much cleaner.

Paul M Jones wrote:

Whoever suggested this particular tidbit ...

        for ($i = 0; $i < $argsCount; $i++) {
            $argsString .= ($comma ? ', ' : '') . "\$args[$i]";
            $comma = true;
        }

        return eval("return new $className($argsString);");


Reply via email to