3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // A function called on each tick event function tick_handler() { echo "tick_handler() called\n"; } declare(ticks=1); 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 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