3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(tick=2); function tick_handler() { echo "tick_handler() called\n"; } register_tick_function('tick_handler'); $a = 1; tick_handler(); if ($a > 0) { $a += 2; tick_handler(); print($a); tick_handler(); } tick_handler(); ?>
Output for 5.3.0 - 7.2.0
Warning: Unsupported declare 'tick' in /in/FkGXI on line 2 tick_handler() called tick_handler() called 3tick_handler() called tick_handler() called
Output for 4.3.0 - 5.2.17
tick_handler() called tick_handler() called 3tick_handler() called tick_handler() called