3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo sprintf('%+03d:00', 4), PHP_EOL; // positive echo sprintf('%+03d:00', -1); // positive
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.0.5, 5.1.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
+04:00 -01:00
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/dlmbj on line 4
Process exited with code 255.
Output for 4.3.5 - 4.3.9, 5.0.0 - 5.0.1
+04:00 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/dlmbj on line 3 PHP_EOL-01:00
Output for 4.3.0 - 4.3.1, 4.3.3 - 4.3.4
0+4:00 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/dlmbj on line 3 PHP_EOL-01:00
Output for 4.3.2
0+4:00 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/dlmbj on line 3 PHP_EOL-01:00