3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.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 hhvm-3.10.0 - 3.12.0
Fatal error: Call to undefined function register_tick_function() in /in/FkGXI on line 7
Process exited with code 255.
Output for 4.3.0 - 5.2.17
tick_handler() called tick_handler() called 3tick_handler() called tick_handler() called