3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if(PHP_MAJOR_VERSION<7) throw new Exception('PHP 7 required!'); echo "Hi!";
based on Vv55a
Output for 7.0.0 - 7.2.0
Hi!
Output for 5.3.18 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'PHP 7 required!' in /in/vic72:2 Stack trace: #0 {main} thrown in /in/vic72 on line 2
Process exited with code 255.