3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentence = "This is a red apple"; $words = array('red','apple'); $ch = implode("|",$words); $pattern = "/($ch)/"; if(preg_match($pattern, $sentence,$m)) { echo "yes \n"; print_r($m); }

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.0150.00316.75
8.3.50.0280.00922.20
8.3.40.0110.00418.98
8.3.30.0140.00018.79
8.3.20.0000.00720.06
8.3.10.0000.00823.39
8.3.00.0080.00019.75
8.2.180.0090.00917.00
8.2.170.0090.00622.96
8.2.160.0150.00320.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00821.25
8.2.120.0080.00026.35
8.2.110.0090.00020.96
8.2.100.0120.00017.97
8.2.90.0050.00319.13
8.2.80.0050.00317.97
8.2.70.0060.00317.75
8.2.60.0030.00517.93
8.2.50.0030.00518.16
8.2.40.0050.00320.65
8.2.30.0000.00719.33
8.2.20.0040.00417.89
8.2.10.0000.00818.19
8.2.00.0040.00418.05
8.1.280.0090.00625.92
8.1.270.0070.01420.23
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0060.00322.80
8.1.230.0070.00417.70
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.47
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0080.00018.64
8.1.160.0030.00518.84
8.1.150.0080.00018.67
8.1.140.0000.00819.46
8.1.130.0030.00317.66
8.1.120.0080.00017.59
8.1.110.0050.00217.58
8.1.100.0040.00417.64
8.1.90.0000.00717.56
8.1.80.0040.00417.42
8.1.70.0040.00417.42
8.1.60.0030.00617.59
8.1.50.0040.00417.61
8.1.40.0040.00417.64
8.1.30.0060.00617.70
8.1.20.0030.00617.65
8.1.10.0000.00917.68
8.1.00.0030.00517.61
8.0.300.0040.00418.77
8.0.290.0030.00516.75
8.0.280.0000.00718.46
8.0.270.0000.00817.28
8.0.260.0000.00717.23
8.0.250.0030.00317.06
8.0.240.0000.00717.11
8.0.230.0000.00717.09
8.0.220.0030.00316.95
8.0.210.0050.00217.07
8.0.200.0040.00417.09
8.0.190.0030.00617.00
8.0.180.0000.00717.14
8.0.170.0030.00517.02
8.0.160.0040.00417.00
8.0.150.0030.00317.05
8.0.140.0040.00417.01
8.0.130.0000.00513.41
8.0.120.0050.00316.98
8.0.110.0040.00416.92
8.0.100.0030.00616.83
8.0.90.0040.00417.14
8.0.80.0040.01217.08
8.0.70.0050.00317.04
8.0.60.0040.00416.89
8.0.50.0050.00216.90
8.0.30.0080.01117.22
8.0.20.0120.01117.40
8.0.10.0040.00417.15
8.0.00.0110.00916.86
7.4.330.0050.00016.77
7.4.320.0030.00516.60
7.4.300.0030.00316.64
7.4.290.0070.00016.60
7.4.280.0060.00316.68
7.4.270.0050.00216.74
7.4.260.0070.00016.78
7.4.250.0070.00016.66
7.4.240.0030.00316.68
7.4.230.0000.00716.65
7.4.220.0060.01316.78
7.4.210.0050.01216.65
7.4.200.0000.00716.85
7.4.160.0040.01116.57
7.4.150.0090.00917.40
7.4.140.0060.01517.86
7.4.130.0070.01116.66
7.4.120.0100.00916.61
7.4.110.0070.01016.58
7.4.100.0060.01216.45
7.4.90.0080.00816.60
7.4.80.0090.00919.39
7.4.70.0120.00416.71
7.4.60.0100.01016.46
7.4.50.0000.01616.65
7.4.40.0140.00316.45
7.4.30.0170.00716.71
7.4.00.0100.00715.05
7.3.330.0040.00413.18
7.3.320.0030.00213.27
7.3.310.0000.00716.22
7.3.300.0000.00716.37
7.3.290.0070.00016.34
7.3.280.0110.00716.33
7.3.270.0140.00317.40
7.3.260.0100.00716.66
7.3.250.0100.00916.47
7.3.240.0040.01316.43
7.3.230.0110.00616.58
7.3.210.0140.01416.67
7.3.200.0190.00316.62
7.3.190.0090.01316.57
7.3.180.0130.00316.38
7.3.170.0090.01216.45
7.3.160.0090.00616.37
7.3.10.0210.00716.59
7.3.00.0210.00616.04
7.2.330.0100.00716.77
7.2.320.0100.00716.80
7.2.310.0100.00716.88
7.2.300.0040.01216.59
7.2.290.0070.01016.82
7.2.130.0230.00816.77
7.2.120.0190.00016.76
7.2.110.0110.01916.96
7.2.100.0100.01016.43
7.2.90.0130.00616.73
7.2.80.0120.00916.47
7.2.70.0140.01116.86
7.2.60.0100.01116.66
7.2.50.0110.00516.97
7.2.40.0180.00417.07
7.2.30.0150.01216.68
7.2.20.0120.00916.80
7.2.10.0160.00816.98
7.2.00.0170.00716.73
7.1.250.0170.00615.67
7.1.200.0110.00416.15
7.1.70.0050.00317.04
7.1.60.0030.02119.13
7.1.50.0060.01217.34
7.1.00.0100.07022.41
7.0.200.0030.00616.82
7.0.60.0070.03719.91
7.0.50.0070.04717.99
7.0.40.0070.04320.17
7.0.30.0470.07720.10
7.0.20.0230.08720.25
7.0.10.0100.05720.09
7.0.00.0070.06020.20
5.6.280.0070.07020.99
5.6.210.0030.04720.45
5.6.200.0070.06018.23
5.6.190.0070.04020.61
5.6.180.0200.04320.61
5.6.170.0200.03720.54
5.6.160.0030.07320.43
5.6.150.0070.04018.23
5.6.140.0070.04018.14
5.6.130.0130.04318.17
5.6.120.0130.04321.01
5.6.110.0130.05321.00
5.6.100.0030.04321.11
5.6.90.0070.06321.00
5.6.80.0170.06020.52
5.5.350.0170.08320.45
5.5.340.0000.08018.05
5.5.330.0170.07020.27
5.5.320.0230.03320.30
5.5.310.0300.04720.26
5.5.300.0130.07018.08
5.5.290.0000.05717.99
5.5.280.0070.03720.88
5.5.270.0100.07720.73
5.5.260.0030.07020.79
5.5.250.0030.04320.68
5.5.240.0200.05720.16

preferences:
57.27 ms | 401 KiB | 5 Q