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.60.0180.00018.55
8.3.50.0070.00718.14
8.3.40.0110.00418.96
8.3.30.0160.00618.88
8.3.20.0080.00018.91
8.3.10.0070.00021.87
8.3.00.0080.00020.68
8.2.180.0070.01118.66
8.2.170.0030.01222.96
8.2.160.0090.00621.14
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0050.00319.77
8.2.120.0080.00026.35
8.2.110.0090.00020.89
8.2.100.0090.00319.70
8.2.90.0040.00418.00
8.2.80.0060.00317.97
8.2.70.0000.00917.80
8.2.60.0030.00618.09
8.2.50.0000.00818.10
8.2.40.0070.00019.16
8.2.30.0040.00419.14
8.2.20.0000.00718.12
8.2.10.0000.00818.00
8.2.00.0040.00417.74
8.1.280.0170.00325.92
8.1.270.0040.00418.83
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00622.61
8.1.230.0080.00419.55
8.1.220.0040.00417.75
8.1.210.0000.00818.77
8.1.200.0000.00917.48
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0040.00418.63
8.1.160.0000.00818.90
8.1.150.0040.00418.80
8.1.140.0070.00022.20
8.1.130.0030.00520.09
8.1.120.0040.00417.49
8.1.110.0030.00317.60
8.1.100.0040.00417.63
8.1.90.0050.00517.48
8.1.80.0000.00717.58
8.1.70.0030.00317.56
8.1.60.0030.00617.70
8.1.50.0040.00417.57
8.1.40.0040.00417.63
8.1.30.0030.00517.81
8.1.20.0000.00817.77
8.1.10.0050.00317.68
8.1.00.0050.00317.65
8.0.300.0050.00218.77
8.0.290.0040.00416.88
8.0.280.0030.00318.45
8.0.270.0050.00217.35
8.0.260.0030.00318.45
8.0.250.0000.00717.05
8.0.240.0000.00717.07
8.0.230.0000.00917.11
8.0.220.0000.00817.02
8.0.210.0040.00417.01
8.0.200.0030.00517.09
8.0.190.0040.00417.10
8.0.180.0070.00017.03
8.0.170.0030.00617.00
8.0.160.0050.00216.98
8.0.150.0040.00416.92
8.0.140.0040.00416.84
8.0.130.0050.00013.48
8.0.120.0040.00416.97
8.0.110.0000.00717.04
8.0.100.0000.00816.87
8.0.90.0000.00716.92
8.0.80.0090.00616.96
8.0.70.0000.00817.14
8.0.60.0080.00016.84
8.0.50.0040.00417.01
8.0.30.0060.01417.02
8.0.20.0110.01017.40
8.0.10.0040.00417.09
8.0.00.0070.01216.93
7.4.330.0000.00515.55
7.4.320.0040.00416.54
7.4.300.0060.00016.74
7.4.290.0000.00716.62
7.4.280.0030.00616.67
7.4.270.0030.00316.73
7.4.260.0050.00316.62
7.4.250.0030.00316.61
7.4.240.0070.00016.65
7.4.230.0000.00716.81
7.4.220.0060.00316.74
7.4.210.0130.00516.60
7.4.200.0070.00016.68
7.4.160.0110.00716.62
7.4.140.0140.00717.86
7.4.130.0140.00316.73
7.4.120.0120.00816.63
7.4.110.0150.00416.53
7.4.100.0150.00516.55
7.4.90.0170.00316.46
7.4.80.0110.00619.39
7.4.70.0000.01916.68
7.4.60.0090.01216.66
7.4.50.0100.00716.77
7.4.40.0090.01416.50
7.4.00.0070.01115.14
7.3.330.0030.00313.07
7.3.320.0050.00013.32
7.3.310.0060.00316.35
7.3.300.0030.00316.39
7.3.290.0000.00716.21
7.3.280.0040.01216.45
7.3.260.0100.01016.43
7.3.240.0100.00816.60
7.3.230.0100.00716.65
7.3.210.0070.01016.37
7.3.200.0160.00616.32
7.3.190.0120.00616.53
7.3.180.0070.01316.52
7.3.170.0110.00716.54
7.3.160.0200.00316.29
7.2.330.0090.00916.74
7.2.320.0100.00916.46
7.2.310.0070.01016.75
7.2.300.0090.01316.77
7.2.290.0040.01416.66
7.2.110.0950.00714.59
7.2.100.0650.00614.53
7.2.90.0720.00314.77
7.2.80.0840.00714.64
7.2.70.0660.01315.21
7.2.60.0690.00314.86
7.2.50.0900.00615.15
7.2.40.0690.01014.78
7.2.30.0580.01215.17
7.2.20.0720.00014.78
7.2.10.0610.00614.86
7.2.00.0590.00315.16
7.1.230.0930.00614.04
7.1.220.0910.00713.87
7.1.210.0900.00514.07
7.1.200.0810.00314.09
7.1.190.0790.00414.07
7.1.180.0720.00014.09
7.1.170.0590.01013.99
7.1.160.0160.01113.81
7.1.150.0670.00714.02
7.1.140.0290.00913.94
7.1.130.0620.00314.01
7.1.120.0370.01413.94
7.1.110.0340.00813.91
7.1.100.0380.00913.69
7.1.90.0370.00913.80
7.1.80.0480.00313.61
7.1.70.0430.01213.85
7.1.60.0600.01431.66
7.1.50.0760.00731.96
7.1.40.0630.01331.55
7.1.30.1290.01632.09
7.1.20.0730.00731.90
7.1.10.0580.00313.61
7.1.00.0590.01313.54
5.6.380.0110.01014.35

preferences:
41.82 ms | 401 KiB | 5 Q