I'm currently doing a controller, and I want the controller to be null if the parameter pass to the controller does not match an entry in the database, so my question is the following, can I set the object instance to null from the object constructor?
Here's what I'm trying to achieve
public function __construct() {
unset($this);
}
Is this possible?
unset($this), not possible. All you need to check any property to validate if that contains anything, so why complicating things?