note 12009 deleted from language.oop by victor
| From: | victor@php.net | Date: | Sat, 07 Dec 2002 15:49:34 +0000 |
| Subject: | note 12009 deleted from language.oop by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40483@lists.php.net to get a copy of this message | ||
I wondered why the "new" assignments in these examples were never tested for success ---
ie. if(!($var = new Cart())) echo "failure";
Now I know (at least for PHP4.0.4pl1).
The test ALWAYS fails unless the constructor of the class does a local member variable assignment.
This I don't like. Could someone please explain to me why this is a "good thing"?