3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'ac'; $b = str_replace('a', 'b', $a); $c = str_replace('c', 'd', $b); print "$a:$c\n"; $a = 'ac'; $b = str_replace(['a', 'c'], ['b', 'd'], $a); print "$a:$c\n";

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.70.0120.00618.43
8.3.60.0070.00718.29
8.3.50.0090.00716.36
8.3.40.0120.00318.67
8.3.30.0130.00318.59
8.3.20.0040.00420.39
8.3.10.0080.00021.68
8.3.00.0000.00819.55
8.2.180.0100.00716.50
8.2.170.0100.00322.96
8.2.160.0140.00318.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.30
8.2.120.0040.00426.35
8.2.110.0040.00421.18
8.2.100.0040.00817.78
8.2.90.0000.00818.03
8.2.80.0080.00018.16
8.2.70.0000.00817.63
8.2.60.0030.00517.78
8.2.50.0000.00918.10
8.2.40.0040.00420.55
8.2.30.0040.00419.11
8.2.20.0040.00418.12
8.2.10.0040.00418.00
8.2.00.0030.00517.98
8.1.280.0110.00425.92
8.1.270.0030.00522.23
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00022.42
8.1.230.0060.00620.87
8.1.220.0030.00617.91
8.1.210.0050.00319.10
8.1.200.0000.00817.13
8.1.190.0000.00917.00
8.1.180.0060.00318.10
8.1.170.0040.00418.52
8.1.160.0000.00718.91
8.1.150.0040.00418.68
8.1.140.0040.00419.40
8.1.130.0020.00518.87
8.1.120.0030.00317.41
8.1.110.0000.00717.38
8.1.100.0030.00517.38
8.1.90.0040.00417.41
8.1.80.0000.00717.23
8.1.70.0000.00717.36
8.1.60.0000.00717.47
8.1.50.0050.00317.39
8.1.40.0030.00617.32
8.1.30.0080.00017.64
8.1.20.0090.00017.41
8.1.10.0030.00517.47
8.1.00.0040.00417.31
8.0.300.0080.00019.96
8.0.290.0040.00416.75
8.0.280.0040.00418.42
8.0.270.0030.00317.22
8.0.260.0040.00416.80
8.0.250.0000.00717.00
8.0.240.0040.00216.95
8.0.230.0000.00716.87
8.0.220.0000.00716.78
8.0.210.0070.00016.76
8.0.200.0030.00317.00
8.0.190.0040.00416.93
8.0.180.0060.00316.92
8.0.170.0070.00016.96
8.0.160.0000.00816.77
8.0.150.0070.00016.77
8.0.140.0050.00316.80
8.0.130.0030.00313.31
8.0.120.0040.00416.71
8.0.110.0070.00016.72
8.0.100.0030.00516.91
8.0.90.0030.00516.99
8.0.80.0100.00716.85
8.0.70.0000.00816.87
8.0.60.0000.00716.84
8.0.50.0000.00716.78
8.0.30.0080.01017.02
8.0.20.0130.00617.40
8.0.10.0060.00317.00
8.0.00.0080.00816.84
7.4.330.0030.00315.55
7.4.320.0030.00316.53
7.4.300.0060.00016.48
7.4.290.0030.00616.56
7.4.280.0040.00416.40
7.4.270.0000.00716.32
7.4.260.0060.00316.43
7.4.250.0070.00016.43
7.4.240.0030.00516.54
7.4.230.0070.00016.50
7.4.220.0140.00416.62
7.4.210.0060.00916.63
7.4.200.0030.00316.22
7.4.160.0080.01116.45
7.4.150.0030.01717.40
7.4.140.0080.01217.86
7.4.130.0090.00916.32
7.4.120.0130.00616.53
7.4.110.0070.01016.34
7.4.100.0090.00916.50
7.4.90.0130.00716.50
7.4.80.0030.01319.39
7.4.70.0080.00816.34
7.4.60.0060.00916.50
7.4.50.0040.01116.29
7.4.40.0040.01216.44
7.4.30.0090.00616.61
7.4.00.0000.01515.14
7.3.330.0000.00613.14
7.3.320.0030.00313.01
7.3.310.0000.00716.29
7.3.300.0070.00016.30
7.3.290.0070.01116.27
7.3.280.0080.00816.26
7.3.270.0100.00717.40
7.3.260.0140.00416.61
7.3.250.0100.00716.37
7.3.240.0080.01116.35
7.3.230.0110.01216.25
7.3.210.0060.01016.29
7.3.200.0080.00816.58
7.3.190.0120.01216.16
7.3.180.0090.01016.44
7.3.170.0090.01516.48
7.3.160.0060.01616.37
7.3.10.0040.01116.69
7.3.00.0100.00316.43
7.2.330.0090.00916.45
7.2.320.0110.01116.18
7.2.310.0120.00416.55
7.2.300.0120.00616.64
7.2.290.0080.00816.73
7.2.130.0060.00916.70
7.2.120.0030.01216.77
7.2.110.0000.01416.77
7.2.100.0140.00016.59
7.2.90.0030.01016.78
7.2.80.0100.00316.46
7.2.70.0070.00716.44
7.2.60.0460.01015.99
7.2.50.0030.00916.57
7.2.40.0060.00616.86
7.2.30.0040.01116.76
7.2.20.0080.00316.96
7.2.10.0030.01217.06
7.2.00.0050.00817.93
7.1.250.0060.00715.72
7.1.200.0100.00315.84
7.1.100.0030.00617.82
7.1.70.0360.01715.42
7.1.60.0500.01233.02
7.1.50.0410.02733.07
7.1.40.0430.01532.63
7.1.30.0890.01032.57
7.1.20.0800.03332.57
7.1.10.0170.01414.63
7.1.00.0260.01414.77
7.0.200.0370.00515.16
7.0.190.0380.00714.99
7.0.180.0290.00914.24
7.0.170.0270.01414.32
7.0.160.0320.01514.26
7.0.150.0200.01214.22
7.0.140.0230.01814.45
7.0.130.0270.01614.88
7.0.120.0350.01414.86
7.0.110.0220.01214.46
7.0.100.0260.01114.68
7.0.90.0190.01514.50
7.0.80.0280.01414.69
7.0.70.0290.01014.43
7.0.60.0240.01014.36
7.0.50.0350.01614.63
7.0.40.0250.01014.75
7.0.30.0180.01614.84
7.0.20.0230.01114.39
7.0.10.0200.01314.70
7.0.00.0160.01714.59

preferences:
33.24 ms | 401 KiB | 5 Q