From: direvus at gmail dot com Operating system: Linux PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: Undocumented behaviour: class definition before use
Description: ------------ In the php5 migration guide, we have "In some cases classes must be declared before used. It only happens only if some of the new features of PHP 5 are used. Otherwise the behaviour is the old." I request that this behaviour be documented properly (which features? And why?) in the manual chapter on Classes and Objects in PHP5. I think for most people who are accustomed to PHP definition conventions, this will come as a surprise. Functions never need to be declared before use. Even methods within a class definition need not be declared before use. So why do we have this strange requirement in the declaration of classes? This vague mention in the migration guide really isn't sufficient ... it's a strange and opaque behaviour whether you're migrating code or not. -- Edit bug report at http://bugs.php.net/?id=34697&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34697&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34697&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34697&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34697&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34697&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34697&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34697&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34697&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34697&r=support Expected behavior: http://bugs.php.net/fix.php?id=34697&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34697&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34697&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34697&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34697&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34697&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34697&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34697&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34697&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34697&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34697&r=mysqlcfg
