Re: [PHP4BETA] Call overriden parent function

From: Date: Fri, 06 Aug 1999 06:29:51 +0000
Subject: Re: [PHP4BETA] Call overriden parent function
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3163@lists.php.net to get a copy of this message
On a semi-related note, In 3.0.12, to the best of my knowledge, the return value of the "constructor" is ignored. Is it possible in 4.X for the constructor to affect the result of the call to "new"? (It appears to me that "new" always returns the new object, regardless of the return value of the constructor) What I do now is declare a var in all my objects called "ok", which the constructor/initializer sets to 1 if it is successful. So I end up with this: $x = new foo ("bar"); if ($x->ok) print "got a new foo"; else print "object creation failed"; Instead of the following, which I originally had in mind: if ($x = new foo ("bar")) print "got a new foo"; else print "object creation failed"; Just a question. -Cooper Vertz

« previous php.version4 (#3163) next »