|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-09-19 17:28 UTC] aharvey@php.net
-Summary: 1
+Summary: Calls from incompatible contexts do weird things
-Status: Open
+Status: Not a bug
-Package: *General Issues
+Package: Scripting Engine problem
[2014-09-19 17:28 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 12:00:01 2026 UTC |
Description: ------------ $C->someFunction(); must be same as C::someFunction(); but we have Fatal error: Access to undeclared static property: C::$test It is strange that it is still not fixed Test script: --------------- <? phpinfo(); class A { function test() { echo get_called_class(),"\n"; echo static::$test,"\n\n"; } } class B extends A { static $test = 'B'; } class C { function someFunction() { B::test(); } } B::test(); C::someFunction(); $C = new C(); $C->someFunction();