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.05719.14
5.4.260.0100.05019.10
5.4.250.0130.04719.02
5.4.240.0130.05019.09
5.4.230.0100.05318.96
5.4.220.0100.08018.95
5.4.210.0030.05718.79
5.4.200.0070.05718.75
5.4.190.0070.05719.02
5.4.180.0230.05718.93
5.4.170.0100.06318.78
5.4.160.0130.06718.98
5.4.150.0000.09018.98
5.4.140.0070.06716.59
5.4.130.0230.05716.50
5.4.120.0170.04716.36
5.4.110.0130.06716.52
5.4.100.0200.04716.52
5.4.90.0170.06316.52
5.4.80.0130.04316.64
5.4.70.0170.07016.51
5.4.60.0130.04716.52
5.4.50.0070.05016.48
5.4.40.0170.04316.54
5.4.30.0000.05716.38
5.4.20.0070.06716.29
5.4.10.0070.05016.48
5.4.00.0030.07315.98
5.3.280.0070.06314.74
5.3.270.0070.07714.69
5.3.260.0100.07714.59
5.3.250.0130.05014.77
5.3.240.0170.04714.60
5.3.230.0130.04314.73
5.3.220.0030.06314.55
5.3.210.0130.05014.79
5.3.200.0070.05314.47
5.3.190.0170.04314.64
5.3.180.0100.05014.70
5.3.170.0070.05314.63
5.3.160.0100.06314.56
5.3.150.0100.07014.58
5.3.140.0100.05014.38
5.3.130.0070.07014.45
5.3.120.0070.05714.77
5.3.110.0070.06714.73
5.3.100.0100.05714.11
5.3.90.0100.05714.08
5.3.80.0000.06314.10
5.3.70.0130.04014.01
5.3.60.0070.07014.23
5.3.50.0170.06314.03
5.3.40.0130.07013.94
5.3.30.0070.05313.99
5.3.20.0130.04313.72
5.3.10.0070.06013.72
5.3.00.0100.05313.72
5.2.170.0100.05010.98
5.2.160.0070.04011.14
5.2.150.0000.04711.13
5.2.140.0070.04311.22
5.2.130.0000.05010.93
5.2.120.0000.06011.29
5.2.110.0130.04011.19
5.2.100.0070.03711.07
5.2.90.0070.05711.07
5.2.80.0070.04311.09
5.2.70.0170.03711.16
5.2.60.0000.05310.96
5.2.50.0100.04311.01
5.2.40.0100.04311.00
5.2.30.0130.04010.94
5.2.20.0070.05311.04
5.2.10.0100.04310.86
5.2.00.0000.05010.79
5.1.60.0130.03010.06
5.1.50.0030.03710.20
5.1.40.0100.04010.02
5.1.30.0070.05010.32
5.1.20.0070.03710.45
5.1.10.0000.0579.99
5.1.00.0030.04310.13
5.0.50.0030.0278.70
5.0.40.0030.0408.57
5.0.30.0070.0478.29
5.0.20.0070.0308.21
5.0.10.0100.0238.22
5.0.00.0030.0578.40
4.4.90.0030.0205.91
4.4.80.0000.0335.83
4.4.70.0030.0335.80
4.4.60.0100.0235.80
4.4.50.0030.0275.86
4.4.40.0100.0305.84
4.4.30.0070.0235.91
4.4.20.0130.0205.92
4.4.10.0000.0236.03
4.4.00.0070.0405.89
4.3.110.0000.0235.93
4.3.100.0070.0235.75
4.3.90.0000.0305.83
4.3.80.0070.0405.73
4.3.70.0070.0275.73
4.3.60.0000.0305.75
4.3.50.0000.0275.75
4.3.40.0030.0405.71
4.3.30.0030.0235.26
4.3.20.0000.0305.26
4.3.10.0000.0235.26
4.3.00.0100.02015.57

preferences:
140.53 ms | 1394 KiB | 7 Q