3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $a = new StdClass(); $a->test(); }catch(Throwable $ee){ echo "Catched exception: " . $ee->getMessage() . "\n"; } try { $stdObject = new StdClass(); array_diff([], [$stdObject]); }catch(Throwable $ee){ //Handler is called, exception is thrown but... IT IS NOT CATCHED! echo "Catched exception: " . $ee->getMessage() . "\n"; } echo 'a';

preferences:
43.18 ms | 402 KiB | 5 Q