3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php declare(ticks=1); // A function called on each tick event function tick_handler() { echo "tick_handler() called\n"; } register_tick_function('tick_handler'); $a = 1; if ($a > 0) { $a += 2; print($a); }
Output for 7.0.0 - 7.1.0
tick_handler() called tick_handler() called tick_handler() called 3tick_handler() called
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Call to undefined function register_tick_function() in /in/7XLpL on line 10
Process exited with code 255.
Output for 5.6.12 - 5.6.28
tick_handler() called tick_handler() called tick_handler() called 3tick_handler() called tick_handler() called
Output for 4.3.0 - 5.6.11
tick_handler() called tick_handler() called tick_handler() called 3tick_handler() called tick_handler() called tick_handler() called