note 30869 added to language.oop.constructor

From: Date: Tue, 01 Apr 2003 17:01:34 +0000
Subject: note 30869 added to language.oop.constructor
Groups: php.notes 
Request: Send a blank email to php-notes+get-46088@lists.php.net to get a copy of this message
to steffen staehle If you want your constructor to possibly not create the object class A { function A() { // ... // some error occurred $this = null; return; } } if ($a = new A()) { // success, use $a ... } -- http://www.php.net/manual/en/language.oop.constructor.php http://master.php.net/manage/user-notes.php?action=edit+30869 http://master.php.net/manage/user-notes.php?action=delete+30869 http://master.php.net/manage/user-notes.php?action=reject+30869

« previous php.notes (#46088) next »