3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('H', '3H', '1,1'); foreach ($a as $i) { echo number_format($i, 1).PHP_EOL; }
Output for 7.0.0 - 7.1.0
Warning: number_format() expects parameter 1 to be float, string given in /in/QqtS7 on line 4 Notice: A non well formed numeric value encountered in /in/QqtS7 on line 4 3.0 Notice: A non well formed numeric value encountered in /in/QqtS7 on line 4 1.0
Output for 5.3.0 - 5.6.28
Warning: number_format() expects parameter 1 to be double, string given in /in/QqtS7 on line 4 Notice: A non well formed numeric value encountered in /in/QqtS7 on line 4 3.0 Notice: A non well formed numeric value encountered in /in/QqtS7 on line 4 1.0
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.2.17
0.0 3.0 1.0
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/QqtS7 on line 4 0.0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QqtS7 on line 4 3.0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QqtS7 on line 4 1.0PHP_EOL