|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-11-27 05:34 UTC] laruence@php.net
[2012-11-27 05:34 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2012-11-27 05:36 UTC] laruence@php.net
[2012-11-27 05:37 UTC] laruence@php.net
[2012-11-27 05:38 UTC] laruence@php.net
[2012-12-19 17:55 UTC] derick@php.net
[2014-10-07 23:21 UTC] stas@php.net
[2014-10-07 23:32 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ Test script leads to a fatal error. Seems to happen with both PHP 5.3 and 5.4. Test script: --------------- <?php class Test { const A = 0; public function func() { static $a = array( self::A => 'a' ); } } $reflect = new ReflectionMethod('Test', 'func'); $reflect->getStaticVariables(); ?> Expected result: ---------------- No Fatal Error. Actual result: -------------- Fatal error: Cannot access self:: when no class scope is active in test.php on line 16