3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $a->test(); }catch(Throwable $ee){ echo "Catched exception: " . $ee->getMessage() . "\n"; } //Third case: let's trigger a slightly different error 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"; }

preferences:
56.35 ms | 402 KiB | 5 Q