Edit report at https://bugs.php.net/bug.php?id=61084&edit=1
ID: 61084 Updated by: ras...@php.net Reported by: lx at webactives dot ru Summary: incorrect work with class variable (declared as static) -Status: Open +Status: Not a bug Type: Bug Package: Class/Object related Operating System: Windows PHP Version: 5.3.10 Block user comment: N Private report: N New Comment: In PHP 5.3 E_STRICT is not included in E_ALL. Your code does give you an E_STRICT. Use error_reporting(-1); at the top. Previous Comments: ------------------------------------------------------------------------ [2012-02-14 15:19:12] lx at webactives dot ru Description: ------------ All configuration standard. Test script: --------------- <? error_reporting(E_ALL); class A { static $v = '123'; function m(){ echo 'var is '.(static::$v); } } class C { function test(){ A::m(); } } $test = new C(); $test->test(); ?> Expected result: ---------------- PHP Fatal error: Access to undeclared static method: A::m() in test.php on line 11 OR STRICT CLASSIC ERROR ONLY Actual result: -------------- PHP Fatal error: Access to undeclared static property: C::$v in test.php on line 6 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61084&edit=1