3v4l.org

run code in 300+ PHP versions simultaneously
<?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 }

preferences:
45.41 ms | 402 KiB | 5 Q