In my classes I've made, if the constructor receives invalid data that makes the whole instance of the class useless i would use unset($this); or $this = NULL;, but I've just moved to PHP5 and this is no longer supported.... Which is a real pain in the ass. Any suggestions on how i should now go about this...?
Use a factory, which returns either NULL or the object, if it's valid (e.g. according to some property).