3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $n = 1000; $digits = 3; echo number_format($n, max(0,$digits-strlen((string)intval($n))), null, '');
Output for 5.3.18 - 7.2.0
1000