3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $arr = array("blue","red","green","yellow"); print_r(str_replace("\\","yey",$arr,$i)); echo "<br>" . "Replacements: $i"; ?> <p>\In this example, we search an array to find the value "red", and then we replace the value "red" with "pink".</p> </body> </html>

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.01116.36
8.3.50.0150.00016.23
8.3.40.0070.00718.84
8.3.30.0090.00618.77
8.3.20.0040.00420.20
8.3.10.0100.00321.94
8.3.00.0080.00019.41
8.2.180.0060.01218.14
8.2.170.0150.00022.96
8.2.160.0070.00720.31
8.2.150.0060.00325.66
8.2.140.0060.00324.66
8.2.130.0040.00422.10
8.2.120.0030.00526.35
8.2.110.0000.00922.31
8.2.100.0080.00317.91
8.2.90.0030.00619.05
8.2.80.0080.00017.97
8.2.70.0080.00017.50
8.2.60.0040.00417.80
8.2.50.0040.00418.10
8.2.40.0000.00822.26
8.2.30.0000.00719.24
8.2.20.0050.00217.91
8.2.10.0040.00417.95
8.2.00.0050.00218.14
8.1.280.0100.01025.92
8.1.270.0000.00823.98
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00024.03
8.1.230.0000.01020.50
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0080.00017.23
8.1.180.0060.00318.10
8.1.170.0030.00618.68
8.1.160.0000.00719.06
8.1.150.0000.00718.54
8.1.140.0080.00019.42
8.1.130.0000.00718.75
8.1.120.0000.00817.30
8.1.110.0040.00417.38
8.1.100.0070.00017.41
8.1.90.0020.00517.33
8.1.80.0040.00417.31
8.1.70.0030.00317.41
8.1.60.0030.00617.57
8.1.50.0000.00717.39
8.1.40.0060.00317.34
8.1.30.0080.00017.65
8.1.20.0000.00717.53
8.1.10.0040.00417.55
8.1.00.0040.00417.37
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0000.00718.52
8.0.270.0070.00017.27
8.0.260.0000.00616.84
8.0.250.0030.00317.03
8.0.240.0040.00416.81
8.0.230.0060.00316.86
8.0.220.0050.00316.77
8.0.210.0040.00416.82
8.0.200.0040.00416.98
8.0.190.0000.00816.89
8.0.180.0060.00316.95
8.0.170.0080.00016.79
8.0.160.0000.00716.99
8.0.150.0000.00716.83
8.0.140.0040.00416.88
8.0.130.0050.00013.29
8.0.120.0050.00216.86
8.0.110.0040.00416.94
8.0.100.0030.00516.93
8.0.90.0000.00716.79
8.0.80.0100.00716.85
8.0.70.0070.00016.80
8.0.60.0040.00416.81
8.0.50.0000.00716.86
8.0.30.0070.01217.14
8.0.20.0120.00717.40
8.0.10.0050.00216.90
8.0.00.0080.01216.84
7.4.330.0000.00615.55
7.4.320.0030.00316.57
7.4.300.0000.00616.52
7.4.290.0060.00316.57
7.4.280.0000.00816.60
7.4.270.0030.00616.54
7.4.260.0030.00313.25
7.4.250.0000.00716.32
7.4.240.0000.00716.45
7.4.230.0030.00316.63
7.4.220.0150.01216.47
7.4.210.0070.01116.55
7.4.200.0030.00316.64
7.4.160.0120.00716.33
7.4.150.0030.01517.40
7.4.140.0120.00817.86
7.4.130.0120.00616.48
7.4.120.0100.00916.52
7.4.110.0100.00716.51
7.4.100.0170.00816.37
7.4.90.0070.01016.60
7.4.80.0100.01319.39
7.4.70.0120.00916.48
7.4.60.0100.00616.36
7.4.50.0100.00016.23
7.4.40.0070.01416.50
7.4.30.0100.01316.57
7.4.00.0040.01114.83
7.3.330.0000.00513.25
7.3.320.0030.00313.16
7.3.310.0000.00716.17
7.3.300.0030.00316.20
7.3.290.0070.00816.26
7.3.280.0090.00716.26
7.3.270.0120.00617.40
7.3.260.0100.00716.28
7.3.250.0090.01116.30
7.3.240.0060.01116.31
7.3.230.0070.01216.14
7.3.210.0060.01016.57
7.3.200.0090.00616.20
7.3.190.0130.00316.55
7.3.180.0070.01016.25
7.3.170.0090.00616.36
7.3.160.0120.00616.25
7.3.120.0070.01014.73
7.3.110.0000.01414.74
7.3.100.0100.00614.95
7.3.90.0040.01114.77
7.3.80.0090.00614.68
7.3.70.0100.00314.52
7.3.60.0060.01014.95
7.3.50.0060.00914.91
7.3.40.0130.00314.92
7.3.30.0000.01314.54
7.3.20.0070.01016.75
7.3.10.0040.01116.66
7.3.00.0060.00916.62
7.2.330.0170.00716.29
7.2.320.0130.00416.63
7.2.310.0060.01116.45
7.2.300.0030.01516.38
7.2.290.0110.00516.62
7.2.240.0040.01214.77
7.2.230.0080.00814.70
7.2.220.0070.01014.95
7.2.210.0090.00614.80
7.2.200.0000.01514.82
7.2.190.0060.00915.14
7.2.180.0040.01514.96
7.2.170.0070.00715.05
7.2.160.0030.01014.99
7.2.150.0040.01117.01
7.2.140.0070.00716.70
7.2.130.0060.00616.66
7.2.120.0070.01016.92
7.2.110.0060.00916.73
7.2.100.0070.00716.89
7.2.90.0120.00316.74
7.2.80.0090.00616.80
7.2.70.0110.00416.72
7.2.60.0060.01016.56
7.2.50.0090.00616.88
7.2.40.0060.00616.68
7.2.30.0120.00316.87
7.2.20.0070.00716.66
7.2.10.0060.00917.04
7.2.00.0060.00718.13
7.1.330.0030.01015.67
7.1.320.0040.00815.75
7.1.310.0070.00715.66
7.1.300.0030.00615.79
7.1.290.0060.00615.61
7.1.280.0060.00615.70
7.1.270.0040.01115.76
7.1.260.0040.00815.47
7.1.250.0060.00315.75
7.1.200.0070.00715.55
7.1.100.0000.01318.01
7.1.70.3230.01014.99
7.1.60.2930.01733.16
7.1.50.2530.02032.62
7.1.40.2570.01032.42
7.1.30.3200.01732.34
7.1.20.3000.02032.63
7.1.10.1770.02014.96
7.1.00.2670.01014.97
7.0.200.3900.01714.97
7.0.190.2930.01714.86
7.0.180.2900.00714.31
7.0.170.3570.01314.42
7.0.160.2800.01014.43
7.0.150.1930.01014.37
7.0.140.2300.02014.59
7.0.130.2470.00714.55
7.0.120.2570.01014.78
7.0.110.2630.01714.23
7.0.100.2530.00714.40
7.0.90.2570.01014.37
7.0.80.2670.00714.56
7.0.70.3300.01314.35
7.0.60.2930.01014.29
7.0.50.3300.01714.61
7.0.40.3130.00314.61
7.0.30.3270.00714.64
7.0.20.2870.02014.50
7.0.10.2970.01014.48
7.0.00.3100.01014.61

preferences:
58.48 ms | 401 KiB | 5 Q