From: dorthe at luebbert dot net Operating system: Linux PHP version: 5.2.5 PHP Bug Type: *Compile Issues Bug description: Parser accepts functions in functions
Description: ------------ php -l does not report any error on the code listed above(result of a unresolved merge conflict), this means functions are accepted within functions (it does not work if you add public to the doA or doB-function). Reproduce code: --------------- <?php class something { public function getData() { print "foo"; function doA() { return $a; } function doB() { return $b; } print "bar"; return $data; } } ?> Expected result: ---------------- error. Actual result: -------------- no error -- Edit bug report at http://bugs.php.net/?id=44210&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44210&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44210&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44210&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44210&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44210&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44210&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44210&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44210&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44210&r=support Expected behavior: http://bugs.php.net/fix.php?id=44210&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44210&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44210&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44210&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44210&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44210&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44210&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44210&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44210&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44210&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44210&r=mysqlcfg