From: djmaze at cpgnuke dot com Operating system: Linux PHP version: 5.0.5 PHP Bug Type: Scripting Engine problem Bug description: __get must take exactly 1 argument
Description: ------------ When using the PHP 4 "forward compatibility" function overload() you can use function __get($n, $val) But when you want to use such class in PHP 5 it throws an error. Reproduce code: --------------- <?php error_reporting(E_ALL); class Foo { function __get($n, $val='') } if (function_exists('overload') && phpversion() < 5) { overload('Foo'); } ?> Expected result: ---------------- No errors Actual result: -------------- In PHP 5: Fatal error: Method Foo::__get() must take exactly 1 argument In PHP 4: Works as expected -- Edit bug report at http://bugs.php.net/?id=34629&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34629&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34629&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34629&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34629&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34629&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34629&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34629&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34629&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34629&r=support Expected behavior: http://bugs.php.net/fix.php?id=34629&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34629&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34629&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34629&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34629&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34629&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34629&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34629&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34629&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34629&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34629&r=mysqlcfg