3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = [2.117647058, 0.002117647058]; foreach($num as $n){ if(substr($n,0,1) > 0){ echo round($n, 2) . "\n"; }else{ preg_match("/([0\.]+)(\d{1,2})/", $n, $m); echo $m[0] . "\n"; } }
Output for git.master_jit, git.master, rfc.property-hooks
2.12 0.0021

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:
118.06 ms | 405 KiB | 5 Q