|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-29 10:53 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
Description: ------------ $this behaviour is wrong... It's showing the context of the calling object instead of its own object (which doesn't exist if called statically). Reproduce code: --------------- <? class myclass { function __construct() { } function __destruct() { } public function bar($foo) { print_r($this); } } class foo { public $prop = 'property'; function docode() { myclass::bar('foo'); } } $f = new foo(); $f->docode(); ?> Expected result: ---------------- I would expect to see nothing, or perhaps info on the mycode class. Actual result: -------------- I see info on the foo class. :(