3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("3.45Lt", "1.00€"); function kazkas($match){ if($match[3]==="LTL"){ $match[3] = "EUR"; } elseif($match[3]==="Lt" | $match[3]==="LT" | $match[3]==="lT" |$match[3] === "lt"){ $match[3] = "€"; }else{ $match[3]=$match[3]; } $changeratio = 3.4488; return number_format($match[1]/$changeratio,2).$match[2].$match[3]; //3.4492 } $result = preg_replace_callback('/(\d+[,.]?\d?)(\s?)(L+T+L?)/iD','kazkas',$input); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> string(10) "3.13.05€" [1]=> string(7) "1.00€" }

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