#30250 [NEW]: final keyword for class variables?

From: Date: Mon, 27 Sep 2004 02:00:18 +0000
Subject: #30250 [NEW]: final keyword for class variables?
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66738@lists.php.net to get a copy of this message
From: nut at phpnut dot com Operating system: Linux PHP version: 5.0.1 PHP Bug Type: Class/Object related Bug description: final keyword for class variables? Description: ------------ Tried using the final keyword on a class variable per the docs Final Keyword PHP 5 introduces the final keyword, which prevents child classes from overriding a method or variable by prefixing the definition with final. On windows system running 5.0.2 also on Linux running 5.0.1 <?php class Foo { final $FooVersion; } ?> Returns: Cannot declare property Foo::$FooVersion final, the final modifier is allowed only for methods Is this a bug or are the docs wrong? -- Edit bug report at http://bugs.php.net/?id=30250&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30250&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30250&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30250&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30250&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30250&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30250&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30250&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30250&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30250&r=support Expected behavior: http://bugs.php.net/fix.php?id=30250&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30250&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30250&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30250&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30250&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30250&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30250&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30250&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30250&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30250&r=mysqlcfg

« previous php.bugs (#66738) next »