3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = ["12345", "12346", "12347", "12398"]; $input = "12498"; $arr = preg_grep("/". preg_quote(substr($input,0,3)) . "/", $numbers); Var_dump($arr);

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.40.0090.00618.71
8.3.30.0030.01718.87
8.3.20.0030.00618.56
8.3.10.0050.00221.74
8.3.00.0040.00420.64
8.2.170.0070.00722.96
8.2.160.0070.00721.24
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00419.77
8.2.120.0080.00026.35
8.2.110.0030.00622.13
8.2.100.0040.00717.84
8.2.90.0000.00817.88
8.2.80.0050.00317.97
8.2.70.0050.00318.03
8.2.60.0060.00318.16
8.2.50.0030.00618.10
8.2.40.0040.00419.48
8.2.30.0080.00019.32
8.2.20.0040.00417.98
8.2.10.0040.00418.04
8.2.00.0030.00617.99
8.1.270.0050.00319.05
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0080.00023.80
8.1.230.0030.00717.77
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0040.00417.36
8.1.180.0000.00918.10
8.1.170.0000.00818.79
8.1.160.0000.00718.84
8.1.150.0000.00718.88
8.1.140.0030.00322.11
8.1.130.0030.00320.07
8.1.120.0030.00517.59
8.1.110.0000.00717.50
8.1.100.0000.00717.68
8.1.90.0000.00917.48
8.1.80.0000.00717.58
8.1.70.0000.00717.48
8.1.60.0050.00317.76
8.1.50.0080.00017.57
8.1.40.0040.00417.56
8.1.30.0050.00317.82
8.1.20.0000.00817.73
8.1.10.0000.00917.63
8.1.00.0030.00517.51
8.0.300.0020.00518.77
8.0.290.0050.00216.88
8.0.280.0040.00418.50
8.0.270.0000.00717.20
8.0.260.0040.00418.42
8.0.250.0000.00717.10
8.0.240.0050.00317.13
8.0.230.0090.00017.11
8.0.220.0090.00017.06
8.0.210.0060.00316.92
8.0.200.0030.00317.09
8.0.190.0040.00417.04
8.0.180.0020.00517.02
8.0.170.0080.00017.05
8.0.160.0000.00717.04
8.0.150.0000.00716.96
8.0.140.0000.00716.98
8.0.130.0050.00013.48
8.0.120.0040.00417.04
8.0.110.0030.00516.90
8.0.100.0040.00416.89
8.0.90.0040.00417.07
8.0.80.0080.00717.03
8.0.70.0050.00217.07
8.0.60.0030.00617.03
8.0.50.0050.00216.90
8.0.30.0090.00917.24
8.0.20.0140.00617.40
8.0.10.0070.00017.07
8.0.00.0170.00316.80
7.4.330.0050.00015.55
7.4.320.0000.00616.65
7.4.300.0000.00616.79
7.4.290.0000.00816.77
7.4.280.0080.00016.60
7.4.270.0030.00316.63
7.4.260.0040.00416.68
7.4.250.0000.00816.65
7.4.240.0040.00416.56
7.4.230.0000.00816.69
7.4.220.0030.00516.60
7.4.210.0060.01316.60
7.4.200.0000.00716.77
7.4.160.0060.01016.65
7.4.140.0140.00817.86
7.4.130.0090.01516.77
7.4.120.0100.01016.66
7.4.110.0100.01316.59
7.4.100.0110.00716.59
7.4.90.0150.00316.75
7.4.80.0070.01019.39
7.4.70.0130.00416.72
7.4.60.0120.00616.60
7.4.50.0110.00716.54
7.4.40.0120.01116.53
7.4.10.0100.01016.49
7.4.00.0080.00915.82
7.3.330.0060.00013.27
7.3.320.0000.00513.09
7.3.310.0050.00316.27
7.3.300.0030.00316.36
7.3.290.0000.00716.24
7.3.280.0000.01616.45
7.3.260.0100.00916.47
7.3.240.0080.01016.65
7.3.230.0090.00616.67
7.3.210.0100.01316.53
7.3.200.0080.00816.28
7.3.190.0060.01216.32
7.3.180.0090.01216.41
7.3.170.0120.01116.36
7.3.160.0100.01316.66
7.3.130.0070.01416.36
7.3.120.0030.01316.11
7.3.110.0100.00716.56
7.3.100.0070.00416.63
7.3.90.0030.01016.24
7.3.80.0100.01016.56
7.3.70.0030.01016.47
7.3.60.0060.00916.48
7.3.50.0000.01316.40
7.3.40.0040.01116.28
7.3.30.0040.01116.43
7.3.20.0060.00618.29
7.3.10.0020.01017.49
7.3.00.0090.00617.47
7.2.330.0130.01016.75
7.2.320.0170.00716.73
7.2.310.0100.00716.87
7.2.300.0130.00716.73
7.2.290.0060.01416.92
7.2.260.0120.00916.74
7.2.250.0100.01016.74
7.2.240.0100.00716.74
7.2.230.0030.01316.71
7.2.220.0000.01416.70
7.2.210.0090.00916.73
7.2.200.0100.00716.68
7.2.190.0090.00616.66
7.2.180.0100.00316.44
7.2.170.0070.01116.49
7.2.160.0060.00916.62
7.2.150.0000.00918.49
7.2.140.0060.01018.50
7.2.130.0130.00617.69
7.2.120.0010.01417.66
7.2.110.0330.00916.67
7.2.100.0110.01016.72
7.2.90.0080.01016.82
7.2.80.0050.01016.91
7.2.70.0080.00616.88
7.2.60.0120.00616.91
7.2.50.0070.01116.88
7.2.40.0080.00916.81
7.2.30.0060.00916.91
7.2.20.0050.01016.79
7.2.10.0100.00916.80
7.2.00.0050.00916.79
7.1.330.0040.00717.49
7.1.320.0090.00317.41
7.1.310.0040.01117.50
7.1.300.0060.00917.30
7.1.290.0030.01017.36
7.1.280.0050.00517.40
7.1.270.0050.00517.29
7.1.260.0030.01017.34
7.1.250.0050.00716.58
7.1.240.0110.00017.45
7.1.230.0350.00815.63
7.1.220.0350.00615.56
7.1.210.0190.00715.84
7.1.200.0230.00915.62
7.1.190.0340.00315.66
7.1.180.0050.00915.58
7.1.170.0230.00815.57
7.1.160.0440.00615.56
7.1.150.0070.00715.66
7.1.140.0070.01115.52
7.1.130.0100.00615.67
7.1.120.0090.00715.63
7.1.110.0210.00815.55
7.1.100.0250.00115.71
7.1.90.0080.00515.60
7.1.80.0290.00915.48
7.1.70.0040.01115.55
7.1.60.0240.01324.32
7.1.50.0260.00824.33
7.1.40.0120.01224.50
7.1.30.0110.01624.68
7.1.20.0180.01024.60
7.1.10.0080.00515.53
7.1.00.0030.01415.72
7.0.330.0040.00716.95
7.0.320.0000.01117.02
7.0.310.0060.00916.86
7.0.300.0040.01116.87
7.0.290.0000.01216.88
7.0.280.0080.00316.94
7.0.270.0080.00416.86
7.0.260.0040.00816.98
7.0.250.0070.00717.30
7.0.240.0060.00317.25
7.0.230.0090.00317.18
7.0.220.0000.01117.17
7.0.210.0110.00016.91
7.0.200.0060.00916.93
7.0.190.0080.00817.19
7.0.180.0060.00617.06
7.0.170.0110.00317.26
7.0.160.0000.01117.19
7.0.150.0070.00716.94
7.0.140.0030.01217.08
7.0.130.0090.00917.00
7.0.120.0070.01117.18
7.0.110.0050.00817.23
7.0.100.0070.00717.01
7.0.90.0030.01317.14
7.0.80.0090.00617.27
7.0.70.0060.01217.01
7.0.60.0040.01417.10
7.0.50.0000.00917.01
7.0.40.0070.00714.92
7.0.30.0040.01115.07
7.0.20.0030.00915.14
7.0.10.0000.01415.15
7.0.00.0030.00715.16
5.6.400.0090.00616.05
5.6.390.0060.00315.99
5.6.380.0090.00314.84
5.6.370.0030.00915.83
5.6.360.0040.01116.05
5.6.350.0030.01015.93
5.6.340.0060.00915.84
5.6.330.0070.01016.05
5.6.320.0000.01315.68
5.6.310.0060.01015.73
5.6.300.0030.01216.20
5.6.290.0070.00715.62
5.6.280.0030.01015.91
5.6.270.0030.01015.67
5.6.260.0000.01315.70
5.6.250.0090.00615.92
5.6.240.0000.01415.89
5.6.230.0100.01015.78
5.6.220.0090.00615.73
5.6.210.0080.00415.89
5.6.200.0040.00415.87
5.6.190.0030.01015.69
5.6.180.0090.00015.84
5.6.170.0000.01315.98
5.6.160.0040.00815.80
5.6.150.0000.01415.71
5.6.140.0060.00615.79
5.6.130.0070.01015.85
5.6.120.0040.00815.84
5.6.110.0110.00415.83
5.6.100.0060.00915.71
5.6.90.0040.01115.89
5.6.80.0070.00415.80
5.6.70.0140.00015.94
5.6.60.0070.00715.68
5.6.50.0050.00515.80
5.6.40.0030.01016.02
5.6.30.0100.00315.94
5.6.20.0030.01215.75
5.6.10.0000.00915.70
5.6.00.0030.01215.88

preferences:
56.03 ms | 400 KiB | 5 Q