3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function x($class); { print "xxx\n"; // gets printed throw new Exception("Class '{$class}' not found"); } spl_autoload_register('x'); try { $a = A::z(); // FATAL ERROR: class 'A' not found // NOTE: // $a = A::$z; - will be correctly caught } catch (Exception $ex) { print "{$ex}\n"; // never gets executed }
Output for 5.3.0 - 5.4.8
Parse error: syntax error, unexpected ';', expecting '{' in /in/Xi3Ab on line 2
Process exited with code 255.