Hi,
I've recently stumbled upon the following issue: when calling a
non-static function statically from a non-static class, the instance
magically moves to the called class. It throws a strict warning, but I
wonder if this is enough. The attached example produces "Foo".
cu, Lars
»Die Glorifizierung der prächtigen underdogs läuft auf
die des prächtigen Systems heraus, das sie dazu macht.«
-- Theodor W. Adorno, »Minima Moralia«: They, the people
Lars Strojny
Nießenstr. 36
51103 Cologne
Jabber/Mail: lars@strojny.net
Weblog: http://usrportage.de
Hi,
I've recently stumbled upon the following issue: when calling a
non-static function statically from a non-static class, the instance
magically moves to the called class. It throws a strict warning, but I
wonder if this is enough. The attached example produces "Foo".cu, Lars
Is this what you mean?
"$this is a reference to the calling object (usually the object to which
the method belongs, but can be another object, if the method is called
statically from the context of a secondary object)."
http://www.php.net/manual/en/language.oop5.basic.php
--
Wbr,
Antony Dovgal