note 99751 deleted from language.oop5.magic by danbrown

From: Date: Fri, 03 Sep 2010 14:06:07 +0000
Subject: note 99751 deleted from language.oop5.magic by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-172300@lists.php.net to get a copy of this message
Note Submitter: ihsanduvac at gmail dot com ---- Why is there nothing to use the object name as a resource like __toString method? We should use a function like __toResource: class a { public function __toString() { return "Hello"; } } $a = new a(); echo $a; //Hello If we wonna use $a as resource type(example:image), we would should use another magic method

« previous php.notes (#172300) next »