3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { assert(PHP_MAJOR_VERSION >= 7, new Exception('PHP 7 is requiered!')); } catch (Exception $e) { quit(); } echo 'Hi!';
based on 8SFcT
Output for 7.0.0 - 7.2.0
Hi!
Output for 5.4.8 - 5.6.28
Warning: assert(): exception 'Exception' with message 'PHP 7 is requiered!' in /in/nPqkR:2 Stack trace: #0 {main} failed in /in/nPqkR on line 2 Hi!
Output for 5.3.18 - 5.4.7
Warning: assert() expects exactly 1 parameter, 2 given in /in/nPqkR on line 2 Hi!