3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo var_export(20 / 3 * 1e6, true) . "\n"; echo var_export(6.66, true) . "\n"; echo var_export(6.0, true) . "\n"; function format($f) { return rtrim(rtrim(number_format($f, ini_get('precision')), '.', '')); } echo format(20/3) . "\n"; echo format(20/3 * 1e6) . "\n"; echo format(6.66) . "\n"; echo format(6.0) . "\n"; echo format(60.0) . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
6666666.666666667 6.66 6.0 Fatal error: Uncaught ArgumentCountError: rtrim() expects at most 2 arguments, 3 given in /in/rCk9h:8 Stack trace: #0 /in/rCk9h(8): rtrim('6.6666666666666...', '.', '') #1 /in/rCk9h(11): format(6.6666666666667) #2 {main} thrown in /in/rCk9h on line 8
Process exited with code 255.

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:
38.36 ms | 401 KiB | 8 Q