|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-03 16:52 UTC] colder@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 09:00:02 2025 UTC |
Description: ------------ this code prints instance of object "b" and doesn't throw any errors or exceptions. If a::stat has modificator "static" it says "Notice: Undefined variable: this" and prints null. Reproduce code: --------------- class a { public function stat() { var_dump($this); } } class b { public function test() { a::stat(); } } $b= new b(); $b->test(); Expected result: ---------------- throws some errors or exceptions. Actual result: -------------- prints instance of object "b"