Re: [PHP] Interrupting instantiation

2004-10-07 Thread Simas Toleikis
Chris Boget wrote: In PHP4, is there any way to interrupt instantiation of an object? class Test { function Test() { $this = NULL; // Object destroyed by php gc } } $hello = new Test; // $hello = NULL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

[PHP] Interrupting instantiation

2004-10-07 Thread Chris Boget
In PHP4, is there any way to interrupt instantiation of an object? For example, by returning NULL as the return value of the class constructor so that the variable you are assinging the object to is, instead, null? Here's what I'm trying to do: class MyClass { function MyClass() { return N