note 41316 added to language.oop

From: Date: Tue, 06 Apr 2004 11:08:14 +0000
Subject: note 41316 added to language.oop
Groups: php.notes 
Request: Send a blank email to php-notes+get-67703@lists.php.net to get a copy of this message
When using the :: operator the current $this will be active in the called class So what u might want to do is to change the "static call test" in Brother to: if (isset($this) && is_a($this,"Brother)) { return parent::name(); } else { print "static call<br>"; } Note: If u dont have is_a (availabe from 4.2) use the nice substitution made by "dan at mojavelinux dot com". @see is_a function, its in the notes. have fun Michael ---- Manual Page -- http://www.php.net/manual/en/language.oop.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41316 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41316&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41316&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67703) next »