3v4l.org

run code in 300+ PHP versions simultaneously
<?php $colours = array("Red", "Blue", "Green"); $string = "There are three Red and Green walls."; echo preg_replace("/\b(?:" . implode('|', $colours) . ")\b/", '%1%$0%2%', $string);

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.5.10.0120.01016.85
8.5.00.0150.00720.11
8.4.150.0030.00014.05
8.4.140.0110.01217.62
8.4.130.0120.00717.94
8.4.120.0110.00920.65
8.4.110.0090.01118.90
8.4.100.0080.01217.86
8.4.90.0100.01117.89
8.4.80.0090.00718.01
8.4.70.0120.01019.65
8.4.60.0080.01218.91
8.4.50.0120.00919.49
8.4.40.0080.00017.89
8.4.30.0040.00420.33
8.4.20.0100.01018.82
8.4.10.0060.00320.68
8.3.280.0030.00014.05
8.3.270.0130.00716.45
8.3.260.0100.01016.79
8.3.250.0090.00718.71
8.3.240.0130.00516.73
8.3.230.0110.00916.46
8.3.220.0070.00217.30
8.3.210.0090.00916.94
8.3.200.0060.00316.61
8.3.190.0060.00319.04
8.3.180.0100.00916.98
8.3.170.0030.00520.66
8.3.160.0030.00616.60
8.3.150.0070.01118.80
8.3.140.0030.00616.73
8.3.130.0080.00018.45
8.3.120.0090.00018.75
8.3.110.0120.00616.61
8.3.100.0060.00624.06
8.3.90.0040.00426.77
8.3.80.0090.00019.36
8.3.70.0070.01416.63
8.3.60.0120.00318.56
8.3.50.0110.00418.23
8.3.40.0120.00318.96
8.3.30.0110.00318.98
8.3.20.0090.00024.18
8.3.10.0080.00024.66
8.3.00.0070.00026.16
8.2.290.0110.00620.48
8.2.280.0040.00518.76
8.2.270.0160.00317.24
8.2.260.0090.00618.30
8.2.250.0030.00616.57
8.2.240.0070.00718.94
8.2.230.0100.01020.94
8.2.220.0120.00337.54
8.2.210.0060.01226.77
8.2.200.0060.00318.88
8.2.190.0070.00716.75
8.2.180.0100.01025.92
8.2.170.0110.01118.91
8.2.160.0030.01022.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00426.35
8.2.110.0100.00022.32
8.2.100.0040.00718.09
8.2.90.0040.00420.59
8.2.80.0000.01017.88
8.2.70.0030.00617.63
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0030.00520.01
8.2.30.0040.00417.95
8.2.20.0040.00418.08
8.2.10.0000.00821.11
8.2.00.0040.00419.16
8.1.330.0130.00516.79
8.1.320.0110.00716.53
8.1.310.0040.00416.77
8.1.300.0070.00416.60
8.1.290.0000.00930.84
8.1.280.0090.01225.92
8.1.270.0080.00023.99
8.1.260.0070.00028.09
8.1.250.0070.00028.09
8.1.240.0100.00022.15
8.1.230.0040.00822.39
8.1.220.0000.00917.74
8.1.210.0000.00818.97
8.1.200.0000.00817.47
8.1.190.0040.00417.48
8.1.180.0080.00018.10
8.1.170.0040.00418.78
8.1.160.0070.00018.91
8.1.150.0050.00218.85
8.1.140.0070.00018.82
8.1.130.0000.00820.20
8.1.120.0000.00717.48
8.1.110.0040.00417.62
8.1.100.0040.00417.59
8.1.90.0080.00017.61
8.1.80.0090.00017.51
8.1.70.0040.00417.48
8.1.60.0040.00417.74
8.1.50.0090.00017.68
8.1.40.0030.00717.59
8.1.30.0000.00817.76
8.1.20.0040.00417.69
8.1.10.0040.00417.63
8.1.00.0050.00517.48
8.0.300.0000.00719.98
8.0.290.0060.00316.72
8.0.280.0030.00318.51
8.0.270.0030.00318.18
8.0.260.0060.00018.46
8.0.250.0000.00717.06
8.0.240.0020.00517.14
8.0.230.0030.00317.10
8.0.220.0030.00316.90
8.0.210.0030.00317.04
8.0.200.0030.00316.98
8.0.190.0080.00016.96
8.0.180.0000.00816.98
8.0.170.0030.00517.04
8.0.160.0070.00017.11
8.0.150.0000.00717.02
8.0.140.0000.00716.98
8.0.130.0000.00613.39
8.0.120.0030.00617.03
8.0.110.0040.00417.09
8.0.100.0050.00316.93
8.0.90.0040.00417.14
8.0.80.0070.01116.96
8.0.70.0040.00417.09
8.0.60.0040.00416.96
8.0.50.0040.00416.81
8.0.30.0080.00816.96
8.0.20.0030.01217.07
8.0.10.0110.00617.04
8.0.00.0120.00617.09
7.4.330.0050.00015.55
7.4.320.0060.00016.77
7.4.300.0000.00616.66
7.4.290.0000.00716.67
7.4.280.0040.00416.63
7.4.270.0000.00716.59
7.4.260.0050.00013.42
7.4.250.0000.00816.68
7.4.240.0050.00216.63
7.4.230.0030.00316.78
7.4.220.0020.00516.68
7.4.210.0070.00816.65
7.4.200.0040.00416.53
7.4.160.0040.01116.74
7.4.150.0040.01116.68
7.4.140.0040.01116.69
7.4.130.0080.00816.70
7.4.120.0150.00316.57
7.4.110.0070.01116.69
7.4.100.0070.01416.72
7.4.90.0090.00916.70
7.4.80.0080.01116.64
7.4.70.0040.01716.54
7.4.60.0110.00716.55
7.4.50.0120.00316.68
7.4.40.0130.00616.50
7.4.30.0160.00316.67
7.4.20.0100.00616.79
7.4.10.0090.01016.70
7.4.00.0150.00016.62
7.3.330.0070.00016.35
7.3.320.0000.00613.07
7.3.310.0030.00316.41
7.3.300.0030.00316.38
7.3.290.0080.00916.39
7.3.270.0090.00616.38
7.3.260.0000.01416.31
7.3.250.0090.00616.38
7.3.240.0090.00616.41
7.3.230.0090.00916.38
7.3.220.0090.00916.27
7.3.210.0150.00616.38
7.3.200.0040.01116.36
7.3.190.0030.01616.34
7.3.180.0070.01016.23
7.3.170.0150.00016.27
7.3.160.0070.01116.23
7.3.150.0150.00316.27
7.3.140.0070.01016.30
7.3.130.0060.00916.27
7.3.120.0000.01616.25
7.3.110.0090.00616.15
7.3.100.0100.00716.25
7.3.90.0100.00616.71
7.3.80.0070.01016.32
7.3.70.0030.01216.35
7.3.60.0060.01216.50
7.3.50.0060.01016.50
7.3.40.0070.00716.36
7.3.30.0110.00716.40
7.3.20.0100.00716.46
7.3.10.0140.00716.41
7.3.00.0060.01116.43

preferences:
34.89 ms | 403 KiB | 5 Q