3v4l.org

run code in 300+ PHP versions simultaneously
<?php function callback($data) { throw new Exception('test'); return $data . ' - called'; } ob_start('callback'); echo "hi"; try { ob_end_flush(); } catch (Exception $e) { echo 'caught'; }

preferences:
44.03 ms | 402 KiB | 5 Q