3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo round(2.555, 2, ROUND_HALF_UP);
based on HcO7V
Output for 7.2.0
Warning: Use of undefined constant ROUND_HALF_UP - assumed 'ROUND_HALF_UP' (this will throw an Error in a future version of PHP) in /in/sDIPu on line 3 Warning: round() expects parameter 3 to be integer, string given in /in/sDIPu on line 3
Output for 7.0.0 - 7.1.10
Notice: Use of undefined constant ROUND_HALF_UP - assumed 'ROUND_HALF_UP' in /in/sDIPu on line 3 Warning: round() expects parameter 3 to be integer, string given in /in/sDIPu on line 3
Output for 5.3.18 - 5.6.28
Notice: Use of undefined constant ROUND_HALF_UP - assumed 'ROUND_HALF_UP' in /in/sDIPu on line 3 Warning: round() expects parameter 3 to be long, string given in /in/sDIPu on line 3