3v4l.org

run code in 300+ PHP versions simultaneously
<?php $words = "a,b,c,d,e"; $words=explode(",",$words); $your_array = preg_grep('~(?=[^s]*s)(?=[^m]*m)(?=[^e]*e)~', $words);; print_r($your_array);

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.0120.00316.50
8.3.50.0110.00821.97
8.3.40.0090.00618.84
8.3.30.0100.00318.93
8.3.20.0030.00620.27
8.3.10.0040.00423.36
8.3.00.0110.00020.70
8.2.180.0110.00718.41
8.2.170.0090.00622.96
8.2.160.0120.00322.05
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00020.92
8.2.110.0080.00322.18
8.2.100.0070.00419.76
8.2.90.0030.00519.05
8.2.80.0080.00017.97
8.2.70.0000.00917.75
8.2.60.0040.00417.68
8.2.50.0050.00318.07
8.2.40.0030.00519.79
8.2.30.0070.00018.10
8.2.20.0070.00317.75
8.2.10.0040.00418.00
8.2.00.0030.00617.86
8.1.280.0140.00725.92
8.1.270.0030.00623.92
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0000.01023.70
8.1.230.0060.00619.03
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0130.00017.36
8.1.190.0000.00817.38
8.1.180.0000.00818.10
8.1.170.0000.00818.60
8.1.160.0020.00521.88
8.1.150.0000.00718.71
8.1.140.0040.00417.58
8.1.130.0030.00317.82
8.1.120.0000.00717.54
8.1.110.0070.00017.55
8.1.100.0040.00417.46
8.1.90.0000.00717.43
8.1.80.0000.00717.54
8.1.70.0000.00817.46
8.1.60.0000.00817.56
8.1.50.0000.00717.63
8.1.40.0110.00017.63
8.1.30.0040.00417.68
8.1.20.0050.00217.72
8.1.10.0070.00017.52
8.1.00.0080.00017.54
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0000.00718.36
8.0.270.0030.00317.13
8.0.260.0000.00617.25
8.0.250.0000.00717.05
8.0.240.0000.00716.95
8.0.230.0030.00517.09
8.0.220.0000.00716.92
8.0.210.0000.00716.84
8.0.200.0040.00416.91
8.0.190.0000.00816.98
8.0.180.0030.00516.88
8.0.170.0030.00517.01
8.0.160.0040.00416.97
8.0.150.0030.00716.90
8.0.140.0080.00016.91
8.0.130.0050.00013.40
8.0.120.0040.00416.93
8.0.110.0040.00417.03
8.0.100.0040.00416.95
8.0.90.0000.00716.86
8.0.80.0040.01016.91
8.0.70.0030.00616.88
8.0.60.0040.00417.07
8.0.50.0040.00416.99
8.0.30.0080.01017.15
8.0.20.0120.00917.40
8.0.10.0040.00417.20
8.0.00.0140.00416.66
7.4.330.0020.00215.16
7.4.320.0040.00416.64
7.4.300.0030.00316.73
7.4.290.0070.00016.77
7.4.280.0030.00616.61
7.4.270.0070.00016.79
7.4.260.0030.00316.76
7.4.250.0040.00416.62
7.4.240.0010.00616.64
7.4.230.0000.00716.48
7.4.220.0080.01216.72
7.4.210.0090.00716.80
7.4.200.0080.00016.39
7.4.190.0050.00216.64
7.4.160.0030.01416.73
7.4.150.0130.01017.40
7.4.140.0100.00917.86
7.4.130.0040.01216.90
7.4.120.0170.00216.61
7.4.110.0070.01016.45
7.4.100.0100.00716.67
7.4.90.0080.01216.45
7.4.80.0120.00619.39
7.4.70.0110.00716.77
7.4.60.0100.01316.59
7.4.50.0000.00816.80
7.4.40.0100.01016.48
7.4.30.0100.00716.82
7.4.00.0070.01115.14
7.3.330.0060.00013.26
7.3.320.0000.00513.18
7.3.310.0030.00316.13
7.3.300.0070.00016.33
7.3.290.0060.01216.32
7.3.280.0070.00916.27
7.3.270.0030.01417.40
7.3.260.0100.00716.44
7.3.250.0140.00616.35
7.3.240.0070.01116.57
7.3.230.0100.00716.39
7.3.210.0100.01416.47
7.3.200.0140.00719.39
7.3.190.0070.01416.25
7.3.180.0060.01016.55
7.3.170.0040.01216.54
7.3.160.0060.01016.69
7.3.120.0040.01415.08
7.2.330.0110.00716.63
7.2.320.0000.01616.51
7.2.310.0150.00716.75
7.2.300.0050.01216.75
7.2.290.0140.00316.80
7.2.00.0060.00619.44
7.1.200.0130.00315.83
7.1.100.0070.00718.52
7.1.70.0000.00817.23
7.1.60.0030.01719.46
7.1.50.0070.00717.01
7.1.00.0030.07322.34
7.0.200.0070.00716.49
7.0.140.0030.07022.18
7.0.60.0030.08319.93
7.0.50.0030.08317.87
7.0.40.0100.08320.26
7.0.30.0230.04320.20
7.0.20.0230.07020.18
7.0.10.0030.05320.22
7.0.00.0030.06319.98
5.6.280.0030.07021.02
5.6.210.0130.05020.67
5.6.200.0100.07318.13
5.6.190.0100.09020.57
5.6.180.0070.04020.41
5.6.170.0370.07720.50
5.6.160.0200.04320.50
5.6.150.0100.03318.11
5.6.140.0130.07718.14
5.6.130.0170.07718.18
5.6.120.0030.05020.98
5.6.110.0070.07020.94
5.6.100.0130.07320.88
5.6.90.0130.07321.10
5.6.80.0100.06320.36
5.5.350.0030.05720.38
5.5.340.0100.07718.02
5.5.330.0000.06720.43
5.5.320.0330.07720.24
5.5.310.0230.07020.21
5.5.300.0100.07317.95
5.5.290.0170.07017.98
5.5.280.0070.03720.67
5.5.270.0100.08320.79
5.5.260.0130.05020.75
5.5.250.0200.07020.49
5.5.240.0100.07020.11
5.4.450.0530.08319.61
5.4.440.0700.06319.63
5.4.430.1100.06719.31
5.4.420.1200.06319.21
5.4.410.0930.06019.33
5.4.400.0900.06319.18
5.4.390.1300.07019.34
5.4.380.0170.05018.57
5.4.370.0130.05318.77
5.4.360.0200.04318.68
5.4.350.0100.05718.77
5.4.340.0070.05718.43
5.4.320.0080.03512.45
5.4.310.0050.03812.45
5.4.300.0350.08912.45
5.4.290.0370.09712.45
5.4.280.0310.10912.35
5.4.270.0380.09912.35
5.4.260.0390.09512.34
5.4.250.0280.09512.35
5.4.240.0290.10412.34
5.4.230.0210.08912.34
5.4.220.0220.10112.34
5.4.210.0420.08212.34
5.4.200.0090.07012.34
5.4.190.0210.08612.33
5.4.180.0110.05512.34
5.4.170.0080.06012.34
5.4.160.0080.05712.34
5.4.150.0140.04912.34
5.4.140.0080.05912.02
5.4.130.0100.05212.01
5.4.120.0110.06111.97
5.4.110.0090.05411.96
5.4.100.0060.06211.96
5.4.90.0090.05611.96
5.4.80.0080.07211.96
5.4.70.0070.05611.96
5.4.60.0150.05811.96
5.4.50.0140.05411.96
5.4.40.0090.05611.95
5.4.30.0130.05511.95
5.4.20.0120.05111.95
5.4.10.0060.05711.94
5.4.00.0240.09211.44
5.3.290.0080.04212.80
5.3.280.0100.05312.71
5.3.270.0190.06512.73
5.3.260.0250.09212.72
5.3.250.0100.07112.71
5.3.240.0110.08312.72
5.3.230.0090.05212.71
5.3.220.0070.06112.68
5.3.210.0070.05612.68
5.3.200.0110.05112.68
5.3.190.0130.04012.68
5.3.180.0060.05712.67
5.3.170.0100.05512.66
5.3.160.0180.07912.68
5.3.150.0140.05012.67
5.3.140.0120.05412.66
5.3.130.0100.05512.66
5.3.120.0180.04812.66
5.3.110.0100.05212.66
5.3.100.0110.05412.12
5.3.90.0110.04812.09
5.3.80.0120.04712.07
5.3.70.0100.05212.07
5.3.60.0070.05312.06
5.3.50.0080.05212.00
5.3.40.0080.05312.00
5.3.30.0130.04511.94
5.3.20.0070.05111.72
5.3.10.0100.04711.69
5.3.00.0070.05411.68
5.2.170.0070.0429.18
5.2.160.0070.0429.18
5.2.150.0060.0459.18
5.2.140.0110.0399.18
5.2.130.0060.0459.14
5.2.120.0060.0419.13
5.2.110.0060.0419.14
5.2.100.0100.0389.14
5.2.90.0060.0439.14
5.2.80.0060.0449.14
5.2.70.0090.0409.13
5.2.60.0070.0439.09
5.2.50.0040.0459.06
5.2.40.0120.0349.04
5.2.30.0070.0439.02
5.2.20.0090.0379.00
5.2.10.0070.0398.92
5.2.00.0060.0418.78
5.1.60.0070.0338.06
5.1.50.0100.0318.06
5.1.40.0090.0368.04
5.1.30.0080.0358.39
5.1.20.0090.0348.41
5.1.10.0050.0378.14
5.1.00.0090.0338.13
5.0.50.0080.0266.62
5.0.40.0060.0376.48
5.0.30.0080.0396.29
5.0.20.0070.0246.26
5.0.10.0050.0326.23
5.0.00.0050.0386.23
4.4.90.0030.0224.78
4.4.80.0040.0224.76
4.4.70.0040.0214.75
4.4.60.0050.0204.76
4.4.50.0040.0214.77
4.4.40.0060.0314.71
4.4.30.0070.0194.76
4.4.20.0080.0374.84
4.4.10.0050.0214.85
4.4.00.0060.0324.76
4.3.110.0080.0444.67
4.3.100.0090.0194.66
4.3.90.0040.0224.63
4.3.80.0040.0334.59
4.3.70.0040.0214.63
4.3.60.0040.0204.63
4.3.50.0060.0194.62
4.3.40.0080.0284.54
4.3.30.0040.0203.28
4.3.20.0000.0253.26
4.3.10.0050.0193.22
4.3.00.0200.0237.46

preferences:
55.36 ms | 401 KiB | 5 Q