php - If the file in __autoload has a Syntax Error, then the script stops without show a message -


I have an __autoload function automatically defined for the load class, if the file contains a syntax error, the script prevents , Just stops .. without error ...

  function __autoload ($ var_class) {require_once ("$ var_class.php"); } "Echo before loading"; New classname (); Echo "hello world ...";  

Output:

Before loading ...

Show D SYNTAX

shows an error for me:

  class classname {public function __ composition () {$ line = $ error echo 'Controller' "\ N"; Before loading ... parse error: syntax error, classname on line 8., unexpected T_ECHO   

output:

/ pre>

View the comment.


Comments