3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'I loved you'; $from = 'love'; $to = 'lOvE'; var_dump($result1 = strtr($str, $from, $to)); var_dump($result2 = strtr($str, [$from[0] => $to[0], $from[1] => $to[1], $from[2] => $to[2], $from[3] => $to[3]])); var_dump($result2 = strtr($str, [$from => $to])); var_dump($result1===$result2);//false

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)
8.3.60.0070.00718.31
8.3.50.0150.00316.41
8.3.40.0140.00018.81
8.3.30.0070.00718.57
8.3.20.0040.00420.39
8.3.10.0040.00421.09
8.3.00.0090.00618.81
8.2.180.0150.00325.92
8.2.170.0070.00719.14
8.2.160.0110.01122.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0000.00821.18
8.2.120.0000.00826.35
8.2.110.0100.00020.94
8.2.100.0080.00417.78
8.2.90.0080.00020.42
8.2.80.0050.00318.03
8.2.70.0040.00417.93
8.2.60.0000.00818.28
8.2.50.0060.00318.10
8.2.40.0030.00520.60
8.2.30.0070.00019.28
8.2.20.0070.00018.14
8.2.10.0050.00218.09
8.2.00.0050.00218.19
8.1.280.0140.00725.92
8.1.270.0080.00023.74
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00422.41
8.1.230.0000.01120.84
8.1.220.0000.00817.78
8.1.210.0030.00518.90
8.1.200.0000.00817.35
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0000.00718.90
8.1.150.0000.00820.21
8.1.140.0000.00719.57
8.1.130.0070.00018.85
8.1.120.0030.00317.46
8.1.110.0080.00017.45
8.1.100.0000.00717.38
8.1.90.0030.00317.43
8.1.80.0000.01117.45
8.1.70.0040.00417.44
8.1.60.0040.00417.52
8.1.50.0030.00717.38
8.1.40.0080.00017.36
8.1.30.0000.00817.66
8.1.20.0030.00617.53
8.1.10.0050.00317.64
8.1.00.0050.00317.45
8.0.300.0000.00819.95
8.0.290.0050.00316.63
8.0.280.0050.00218.33
8.0.270.0070.00017.22
8.0.260.0080.00018.76
8.0.250.0040.00416.96
8.0.240.0000.00816.93
8.0.230.0060.00316.96
8.0.220.0000.00716.86
8.0.210.0030.00316.83
8.0.200.0000.00616.92
8.0.190.0040.00416.83
8.0.180.0040.00716.82
8.0.170.0000.00716.92
8.0.160.0040.00416.77
8.0.150.0060.00616.81
8.0.140.0000.00716.79
8.0.130.0000.00513.22
8.0.120.0030.00316.84
8.0.110.0030.00516.68
8.0.100.0030.00616.92
8.0.90.0040.00416.86
8.0.80.0090.00616.83
8.0.70.0000.00716.86
8.0.60.0070.00016.91
8.0.50.0070.00016.72
8.0.30.0090.00917.15
8.0.20.0130.00617.41
8.0.10.0030.00516.88
8.0.00.0110.00616.84
7.4.330.0050.00015.55
7.4.320.0030.00316.56
7.4.300.0030.00316.63
7.4.290.0000.00716.63
7.4.280.0070.00016.57
7.4.270.0000.00716.60
7.4.260.0000.00816.45
7.4.250.0030.00316.47
7.4.240.0040.00416.61
7.4.230.0000.00716.44
7.4.220.0150.01116.37
7.4.210.0040.01116.54
7.4.200.0030.00616.38
7.4.160.0070.00916.46
7.4.150.0110.00517.40
7.4.140.0090.00817.86
7.4.130.0120.00916.41
7.4.120.0110.00916.50
7.4.110.0060.01316.44
7.4.100.0070.01016.60
7.4.90.0070.01116.53
7.4.80.0120.00819.39
7.4.70.0070.01016.61
7.4.60.0160.00316.55
7.4.50.0060.00716.51
7.4.40.0080.00916.52
7.4.30.0130.00316.66
7.4.00.0070.00714.61
7.3.330.0070.00013.12
7.3.320.0030.00313.27
7.3.310.0030.00316.35
7.3.300.0030.00316.27
7.3.290.0040.01016.32
7.3.280.0080.00816.27
7.3.270.0000.01617.40
7.3.260.0100.00716.52
7.3.250.0080.01116.46
7.3.240.0090.00916.50
7.3.230.0050.01216.33
7.3.210.0110.01116.46
7.3.200.0120.00616.32
7.3.190.0080.00816.23
7.3.180.0100.00716.41
7.3.170.0090.00816.29
7.3.160.0060.01016.33
7.2.330.0110.00716.68
7.2.320.0080.01116.47
7.2.310.0080.01216.59
7.2.300.0080.00816.70
7.2.290.0120.00416.60
7.2.60.0000.01216.92
7.1.200.0060.00615.71
7.1.90.0060.00618.24
7.1.80.0060.00918.11
7.1.70.0060.00616.95
7.1.60.0190.00634.77
7.1.50.0170.01034.49
7.1.40.0120.01234.55
7.1.30.0140.01134.42
7.1.20.0160.01034.43
7.1.10.0000.01316.50
7.1.00.0000.01216.68
7.0.230.0030.01017.78
7.0.220.0120.00017.60
7.0.210.0070.00416.56
7.0.200.0120.00016.39
7.0.190.0120.00016.71
7.0.180.0000.01216.37
7.0.170.0060.00616.14
7.0.160.0000.01416.40
7.0.150.0070.00716.15
7.0.140.0040.00816.25
7.0.130.0100.00316.57
7.0.120.0030.00916.59
7.0.110.0060.00616.27
7.0.100.0030.00916.23
7.0.90.0040.00816.39
7.0.80.0080.00416.45
7.0.70.0030.01016.20
7.0.60.0030.00916.02
7.0.50.0060.00616.40
7.0.40.0000.01216.70
7.0.30.0060.00616.42
7.0.20.0060.00616.38
7.0.10.0030.01016.50
7.0.00.0060.00616.41

preferences:
65.07 ms | 401 KiB | 5 Q