3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $arr = array("blue","red","green","yellow"); print_r(str_replace("In","pink",$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.0140.00416.49
8.3.50.0100.00316.35
8.3.40.0100.00318.53
8.3.30.0070.00718.71
8.3.20.0040.00420.25
8.3.10.0070.00021.86
8.3.00.0030.00617.41
8.2.180.0070.01318.41
8.2.170.0140.00422.96
8.2.160.0150.00620.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00420.47
8.2.120.0040.00426.35
8.2.110.0070.00321.18
8.2.100.0040.00717.84
8.2.90.0030.00519.23
8.2.80.0030.00617.97
8.2.70.0000.00817.50
8.2.60.0000.00817.93
8.2.50.0090.00018.10
8.2.40.0000.00822.37
8.2.30.0000.00721.05
8.2.20.0040.00417.94
8.2.10.0040.00418.05
8.2.00.0080.00017.97
8.1.280.0070.01025.92
8.1.270.0040.00423.91
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0090.00021.12
8.1.230.0110.00017.42
8.1.220.0000.00817.76
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0000.00818.46
8.1.160.0000.00819.02
8.1.150.0050.00320.66
8.1.140.0000.00819.40
8.1.130.0000.00718.87
8.1.120.0030.00517.40
8.1.110.0040.00417.43
8.1.100.0020.00517.40
8.1.90.0080.00017.39
8.1.80.0070.00017.45
8.1.70.0030.00317.39
8.1.60.0040.00417.55
8.1.50.0080.00017.46
8.1.40.0080.00017.36
8.1.30.0040.00417.56
8.1.20.0080.00317.63
8.1.10.0040.00417.38
8.1.00.0070.00017.47
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.36
8.0.270.0030.00317.14
8.0.260.0030.00316.81
8.0.250.0030.00317.01
8.0.240.0040.00416.94
8.0.230.0030.00616.84
8.0.220.0000.00716.89
8.0.210.0040.00416.89
8.0.200.0000.00616.82
8.0.190.0030.00616.91
8.0.180.0030.00616.92
8.0.170.0040.00416.88
8.0.160.0000.00716.91
8.0.150.0000.00816.83
8.0.140.0050.00316.91
8.0.130.0000.00513.26
8.0.120.0050.00316.78
8.0.110.0040.00416.79
8.0.100.0040.00417.01
8.0.90.0070.00016.93
8.0.80.0190.00416.79
8.0.70.0040.00416.69
8.0.60.0000.00916.64
8.0.50.0000.00816.86
8.0.30.0110.00517.06
8.0.20.0090.01117.40
8.0.10.0000.00816.80
8.0.00.0190.00016.66
7.4.330.0000.00515.55
7.4.320.0050.00216.54
7.4.300.0030.00316.40
7.4.290.0040.00416.41
7.4.280.0030.00516.59
7.4.270.0030.00616.59
7.4.260.0000.00513.21
7.4.250.0000.00716.50
7.4.240.0070.00016.57
7.4.230.0000.00716.37
7.4.220.0130.00716.58
7.4.210.0090.00616.41
7.4.200.0040.00416.65
7.4.160.0090.01016.51
7.4.150.0110.00817.40
7.4.140.0100.00717.86
7.4.130.0100.00716.46
7.4.120.0090.01216.49
7.4.110.0130.00316.43
7.4.100.0140.00416.52
7.4.90.0070.01016.54
7.4.80.0170.00019.39
7.4.70.0170.00316.45
7.4.60.0060.01116.47
7.4.50.0090.00616.45
7.4.40.0060.01516.45
7.4.30.0090.00916.45
7.4.00.0110.00715.05
7.3.330.0050.00013.13
7.3.320.0030.00313.00
7.3.310.0070.00016.18
7.3.300.0030.00316.29
7.3.290.0100.00516.27
7.3.280.0080.00816.27
7.3.270.0130.00617.40
7.3.260.0050.01216.35
7.3.250.0080.01016.40
7.3.240.0060.01016.36
7.3.230.0080.00916.45
7.3.210.0120.00416.63
7.3.200.0080.00816.41
7.3.190.0120.00916.55
7.3.180.0040.01216.29
7.3.170.0130.00316.46
7.3.160.0070.00916.39
7.2.330.0100.01316.59
7.2.320.0050.01016.50
7.2.310.0060.01216.43
7.2.300.0090.01316.56
7.2.290.0060.00916.76
7.2.60.0090.00616.97
7.2.00.0030.00919.52
7.1.200.0030.00715.57
7.1.100.0040.00718.13
7.1.70.3370.01315.26
7.1.60.3730.02733.17
7.1.50.3170.01332.89
7.1.40.3130.01732.58
7.1.30.4330.02032.56
7.1.20.3230.01732.66
7.1.10.2430.01014.82
7.1.00.2770.01314.92
7.0.200.4670.01315.06
7.0.190.5100.01714.98
7.0.180.2970.01714.31
7.0.170.4170.02014.45
7.0.160.3330.01714.42
7.0.150.1970.01314.61
7.0.140.3170.00314.38
7.0.130.2730.00714.82
7.0.120.2500.01714.65
7.0.110.3030.01314.34
7.0.100.2500.01314.35
7.0.90.2730.01314.21
7.0.80.2900.01014.42
7.0.70.2000.01014.49
7.0.60.2300.01314.28
7.0.50.2330.01714.50
7.0.40.2500.00714.73
7.0.30.2270.01714.42
7.0.20.2370.00714.63
7.0.10.2070.02014.48
7.0.00.2770.01314.65

preferences:
40.5 ms | 404 KiB | 6 Q