note 75380 deleted from language.oop5.paamayim-nekudotayim by nlopess

From: Date: Sun, 27 May 2007 19:02:32 +0000
Subject: note 75380 deleted from language.oop5.paamayim-nekudotayim by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-126966@lists.php.net to get a copy of this message
Note Submitter: Moshe ---- It is probably worth noting that class::method not always means calling a static method. For example: <?php class P { public function __construct() { echo "parent construct: ".print_r($this)."\n"; } } class C extends P { public function __construct() { echo "child construct: ".print_r($this)."\n"; parent::__construct(); } } new C; ?> Although we call parent::__construct(), there's $this available in the method, meaning it is performed on an instance of a class as oppose to expected static method. I wonder if there are any other constructs like that?

« previous php.notes (#126966) next »