3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text='Hello. I have two dots. Please replace them!'; echo IHateStrReplace(".","_",$text); function IHateStrReplace($replace_from,$replace_to,$input) { $result=""; for($i=0;$i<strlen($input);$i++) { $result.= ($input[$i==$replace_from)?$replace_to:$input[$i]; } return $result; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.270.0200.07318.96
5.4.260.0030.06318.80
5.4.250.0130.06718.80
5.4.240.0100.06318.95
5.4.230.0130.05018.79
5.4.220.0030.06318.96
5.4.210.0130.05318.98
5.4.200.0100.05318.94
5.4.190.0200.06318.95
5.4.180.0200.06318.71
5.4.170.0130.07718.64
5.4.160.0070.07018.92
5.4.150.0200.06318.88
5.4.140.0230.05716.35
5.4.130.0130.04316.38
5.4.120.0200.04016.39
5.4.110.0170.05716.65
5.4.100.0030.06716.45
5.4.90.0070.05016.66
5.4.80.0130.06016.48
5.4.70.0100.05016.60
5.4.60.0200.04716.61
5.4.50.0130.04716.38
5.4.40.0100.06016.41
5.4.30.0030.05316.53
5.4.20.0100.05316.35
5.4.10.0230.05016.62
5.4.00.0170.04315.88
5.3.280.0130.06014.67
5.3.270.0200.06314.64
5.3.260.0130.05314.51
5.3.250.0200.06314.59
5.3.240.0130.05014.57
5.3.230.0130.06314.73
5.3.220.0170.06314.57
5.3.210.0100.06714.64
5.3.200.0100.05014.40
5.3.190.0270.06014.65
5.3.180.0030.06314.66
5.3.170.0070.07714.65
5.3.160.0300.05714.79
5.3.150.0130.05314.73
5.3.140.0070.05714.38
5.3.130.0030.06014.61
5.3.120.0130.05014.63
5.3.110.0100.06014.55
5.3.100.0130.05314.05
5.3.90.0070.06314.03
5.3.80.0130.05014.10
5.3.70.0070.05014.09
5.3.60.0100.06013.98
5.3.50.0200.04314.02
5.3.40.0230.03713.79
5.3.30.0030.07013.98
5.3.20.0070.06313.87
5.3.10.0170.05013.64
5.3.00.0200.04713.80
5.2.170.0030.06311.32
5.2.160.0070.05011.23
5.2.150.0130.04011.14
5.2.140.0030.05311.23
5.2.130.0070.05011.18
5.2.120.0100.04710.95
5.2.110.0100.05011.26
5.2.100.0130.05011.18
5.2.90.0130.05010.93
5.2.80.0000.06711.25
5.2.70.0070.04711.05
5.2.60.0170.04311.04
5.2.50.0030.06010.85
5.2.40.0070.04310.83
5.2.30.0000.04710.92
5.2.20.0030.04710.79
5.2.10.0000.06010.95
5.2.00.0030.04710.69
5.1.60.0130.03010.25
5.1.50.0130.04010.07
5.1.40.0070.03310.07
5.1.30.0130.03710.51
5.1.20.0130.03310.33
5.1.10.0070.0339.93
5.1.00.0270.04710.15
5.0.50.0030.0478.52
5.0.40.0070.0308.65
5.0.30.0030.0508.38
5.0.20.0030.0408.11
5.0.10.0000.0308.33
5.0.00.0000.0538.33
4.4.90.0070.0235.83
4.4.80.0030.0235.81
4.4.70.0100.0205.82
4.4.60.0000.0275.82
4.4.50.0100.0175.97
4.4.40.0030.0335.85
4.4.30.0070.0275.76
4.4.20.0000.0235.88
4.4.10.0030.0235.88
4.4.00.0000.0476.00
4.3.110.0070.0305.90
4.3.100.0030.0305.86
4.3.90.0000.0235.74
4.3.80.0030.0375.77
4.3.70.0070.0175.74
4.3.60.0070.0275.75
4.3.50.0000.0275.77
4.3.40.0070.0405.73
4.3.30.0000.0235.66
4.3.20.0030.0275.66
4.3.10.0030.0275.66
4.3.00.0000.0236.58

preferences:
132.68 ms | 1398 KiB | 7 Q