How can I handle the situation below so that the "Fatal Error" message is not shown. It would be ideal if I could supply a default class to be used. I'd prefer to not use: ini_set() to supress the errors but actually be able to "handle" the error.
Any suggestions?
Thanks
Code:
<?php
class MyClass
{
public function __construct()
{
echo 'constructed';
}
}
$class = 'NotAClass';
$thisClass = new $class();
// Fatal error: Class 'NotAClass' not found
?>