3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function countFromAndTo($from, $to) { for ($counter = $from; $counter <= $to; $counter = $counter +1) { print $counter; } } print PHP_EOL."Josh: ".PHP_EOL; countFromAndTo(5, 26); print "Armando: ".PHP_EOL; countFromAndTo(27, 38); print "Juan: ".PHP_EOL; countFromAndTo(-15,3);
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Josh: 567891011121314151617181920212223242526Armando: 272829303132333435363738Juan: -15-14-13-12-11-10-9-8-7-6-5-4-3-2-10123
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/SlAPl on line 10 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/SlAPl on line 10 PHP_EOLJosh: PHP_EOL567891011121314151617181920212223242526 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/SlAPl on line 12 Armando: PHP_EOL272829303132333435363738 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/SlAPl on line 14 Juan: PHP_EOL-15-14-13-12-11-10-9-8-7-6-5-4-3-2-10123