3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for ($x=1;$x<24;$x++) { #var_dump($x / 2); var_dump(round($x /2),1,PHP_ROUND_HALF_UP);}
based on XnSnU
Output for 5.3.0 - 7.1.0
float(1) int(1) int(1) float(1) int(1) int(1) float(2) int(1) int(1) float(2) int(1) int(1) float(3) int(1) int(1) float(3) int(1) int(1) float(4) int(1) int(1) float(4) int(1) int(1) float(5) int(1) int(1) float(5) int(1) int(1) float(6) int(1) int(1) float(6) int(1) int(1) float(7) int(1) int(1) float(7) int(1) int(1) float(8) int(1) int(1) float(8) int(1) int(1) float(9) int(1) int(1) float(9) int(1) int(1) float(10) int(1) int(1) float(10) int(1) int(1) float(11) int(1) int(1) float(11) int(1) int(1) float(12) int(1) int(1)
Output for 4.3.0 - 5.2.17
Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(1) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(1) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(2) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(2) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(3) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(3) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(4) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(4) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(5) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(5) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(6) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(6) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(7) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(7) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(8) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(8) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(9) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(9) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(10) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(10) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(11) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(11) int(1) string(17) "PHP_ROUND_HALF_UP" Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in /in/VqNTv on line 5 float(12) int(1) string(17) "PHP_ROUND_HALF_UP"