3v4l.org

run code in 300+ PHP versions simultaneously
<?php function makeScientificNumber($number){ $power = ($number % 10) - 1; return ($number / pow(10, $power)) . "e" . $power; } function makeNormalNumber($scientific){ return number_format($scientific,0,'.',''); } $number = 4567; $scientific_number = makeScientificNumber($number); echo "Scientific number is = $scientific_number"; echo PHP_EOL; $normal_number = makeNormalNumber($scientific_number); echo "Normal number is $normal_number";
Output for git.master, git.master_jit, rfc.property-hooks
Scientific number is = 0.004567e6 Normal number is 4567

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
76.41 ms | 401 KiB | 8 Q