3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 0.5; echo $a; echo "\n"; echo sprintf('%.02f', $a); echo "\n"; setlocale(LC_ALL, 'fr_FR.UTF-8'); echo $a; echo "\n"; echo sprintf('%.02f', $a); echo "\n"; echo (float) '0.5'; echo "\n"; echo (float) '0,5'; echo "\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0.5 0.50 0.5 0.50 0.5 0