3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_numerics ($str) { preg_match_all('/\d{4}/', $str, $matches); return $matches[0]; } $one = 'Rotterdam 3012 BG'; $two = '3012BG'; $three = '30123 BG'; $four = 'Rotterdam'; print_r(get_numerics($one)); print_r(get_numerics($two)); print_r(get_numerics($three)); print_r(get_numerics($four));

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.0110.00318.76
8.3.30.0090.00618.70
8.3.20.0080.00020.34
8.3.10.0000.00823.70
8.3.00.0070.00320.95
8.2.170.0070.01422.96
8.2.160.0110.00719.08
8.2.150.0030.00524.18
8.2.140.0030.00724.66
8.2.130.0040.00422.23
8.2.120.0080.00026.35
8.2.110.0050.00519.26
8.2.100.0060.00617.93
8.2.90.0040.00419.22
8.2.80.0030.00517.97
8.2.70.0050.00517.63
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0000.00720.61
8.2.30.0050.00320.57
8.2.20.0040.00417.83
8.2.10.0030.00518.01
8.2.00.0050.00318.02
8.1.270.0050.00223.92
8.1.260.0000.00828.09
8.1.250.0060.00328.09
8.1.240.0030.00622.65
8.1.230.0100.00017.82
8.1.220.0050.00217.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0040.00420.91
8.1.150.0070.00018.89
8.1.140.0000.00819.54
8.1.130.0040.00417.55
8.1.120.0040.00417.63
8.1.110.0000.00717.43
8.1.100.0030.00517.41
8.1.90.0040.00417.56
8.1.80.0060.00317.47
8.1.70.0030.00317.53
8.1.60.0080.00017.57
8.1.50.0060.00317.66
8.1.40.0000.00817.56
8.1.30.0000.00817.78
8.1.20.0080.00017.80
8.1.10.0000.00717.58
8.1.00.0080.00417.67
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0070.00018.40
8.0.270.0030.00317.22
8.0.260.0000.00717.17
8.0.250.0030.00617.09
8.0.240.0040.00416.95
8.0.230.0030.00716.93
8.0.220.0040.00416.84
8.0.210.0040.00416.95
8.0.200.0030.00317.07
8.0.190.0070.00017.10
8.0.180.0070.00017.04
8.0.170.0050.00316.95
8.0.160.0030.00316.96
8.0.150.0030.00617.00
8.0.140.0070.00016.79
8.0.130.0030.00313.38
8.0.120.0050.00316.88
8.0.110.0070.00016.93
8.0.100.0070.00017.03
8.0.90.0040.00416.84
8.0.80.0000.01516.94
8.0.70.0000.00817.07
8.0.60.0040.00416.94
8.0.50.0050.00217.02
8.0.30.0100.00717.32
8.0.20.0100.00917.41
8.0.10.0000.00716.96
8.0.00.0110.00816.96
7.4.330.0050.00015.08
7.4.320.0000.00616.64
7.4.300.0070.00016.72
7.4.290.0040.00416.73
7.4.280.0000.00816.84
7.4.270.0050.00316.70
7.4.260.0030.00316.71
7.4.250.0040.00416.79
7.4.240.0000.00716.81
7.4.230.0030.00316.65
7.4.220.0150.00916.75
7.4.210.0100.00916.77
7.4.200.0030.00316.52
7.4.160.0130.01016.64
7.4.150.0080.01117.40
7.4.140.0100.00917.86
7.4.130.0120.00816.38
7.4.120.0150.00416.78
7.4.110.0130.00316.63
7.4.100.0150.00616.51
7.4.90.0070.01016.66
7.4.80.0030.01319.39
7.4.70.0100.00716.45
7.4.60.0040.01116.61
7.4.50.0040.01116.82
7.4.40.0130.00416.60
7.4.30.0130.00316.62
7.4.00.0040.01415.09
7.3.330.0020.00213.23
7.3.320.0000.00613.40
7.3.310.0030.00316.36
7.3.300.0030.00316.46
7.3.290.0030.00316.35
7.3.280.0130.00416.37
7.3.270.0140.00917.40
7.3.260.0070.01016.68
7.3.250.0100.00916.62
7.3.240.0050.01416.50
7.3.230.0140.00416.51
7.3.210.0100.00716.39
7.3.200.0100.01016.36
7.3.190.0030.01616.64
7.3.180.0080.00916.27
7.3.170.0180.00316.81
7.3.160.0060.00916.70
7.3.120.0110.00914.79
7.3.110.0100.00815.10
7.3.100.0020.01515.10
7.3.90.0030.01015.00
7.3.80.0030.01114.82
7.3.70.0050.00614.96
7.3.60.0000.01614.75
7.3.50.0060.00614.94
7.3.40.0060.00414.70
7.3.30.0050.01014.61
7.3.20.0070.00516.73
7.3.10.0070.00516.67
7.3.00.0070.00416.90
7.2.330.0070.01116.52
7.2.320.0070.01016.73
7.2.310.0120.00616.67
7.2.300.0120.00616.52
7.2.290.0090.00616.79
7.2.250.0030.01115.06
7.2.240.0080.01215.12
7.2.230.0100.00415.12
7.2.220.0040.00915.03
7.2.210.0050.01015.12
7.2.200.0100.00315.05
7.2.190.0050.00715.04
7.2.180.0030.01315.05
7.2.170.0070.00915.20
7.2.160.0050.00514.89
7.2.150.0030.01317.13
7.2.140.0120.00017.05
7.2.130.0140.00316.91
7.2.120.0040.00816.95
7.2.110.0070.00716.81
7.2.100.0070.00716.94
7.2.90.0040.00817.09
7.2.80.0070.00717.04
7.2.70.0030.00917.00
7.2.60.0080.00517.05
7.2.50.0000.01216.98
7.2.40.0060.00616.99
7.2.30.0030.01317.08
7.2.20.0060.00916.93
7.2.10.0030.00716.99
7.2.00.0050.00818.19
7.1.330.0080.00915.98
7.1.320.0080.00616.04
7.1.310.0030.00715.86
7.1.300.0080.00715.86
7.1.290.0100.00215.71
7.1.280.0070.00915.97
7.1.270.0110.00215.83
7.1.260.0020.01215.99
7.1.250.0040.01115.78
7.1.240.0030.00915.79
7.1.230.0140.00015.73
7.1.220.0030.01115.99
7.1.210.0070.00716.00
7.1.200.0000.01215.92
7.1.190.0070.00716.06
7.1.180.0090.00915.95
7.1.170.0030.01316.18
7.1.160.0040.00415.86
7.1.150.0030.01016.00
7.1.140.0080.00016.00
7.1.130.0040.00715.70
7.1.120.0050.00516.09
7.1.110.0030.00716.05
7.1.100.0060.01216.92
7.1.90.0120.00615.76
7.1.80.0070.00315.84
7.1.70.0050.00516.55
7.1.60.0070.01017.79
7.1.50.0000.01115.88
7.1.40.0060.01315.75
7.1.30.0030.00916.12
7.1.20.0070.00315.81
7.1.10.0000.01415.73
7.1.00.0070.04219.16
7.0.330.0110.00015.18
7.0.320.0050.00515.41
7.0.310.0040.00415.25
7.0.300.0050.01015.55
7.0.290.0040.00415.55
7.0.280.0040.01115.63
7.0.270.0080.00415.54
7.0.260.0030.00615.22
7.0.250.0090.00415.30
7.0.240.0040.01415.32
7.0.230.0150.00315.34
7.0.220.0060.00615.45
7.0.210.0070.00715.53
7.0.200.0130.01115.23
7.0.190.0070.00715.62
7.0.180.0030.01515.76
7.0.170.0060.00915.61
7.0.160.0030.01215.80
7.0.150.0070.00715.50
7.0.140.0080.00515.44
7.0.130.0030.00615.63
7.0.120.0140.00015.71
7.0.110.0130.00015.47
7.0.100.0040.01115.62
7.0.90.0040.01115.52
7.0.80.0110.03217.75
7.0.70.0300.03817.60
7.0.60.0150.04817.81
7.0.50.0230.03317.93
7.0.40.0040.03016.83
7.0.30.0100.03017.01
7.0.20.0050.04716.87
7.0.10.0090.03016.91
7.0.00.0060.04616.80
5.6.400.0000.01414.24
5.6.390.0060.00614.54
5.6.380.0030.00714.14
5.6.370.0090.00314.60
5.6.360.0030.00714.72
5.6.350.0000.01414.32
5.6.340.0030.00614.54
5.6.330.0000.01014.58
5.6.320.0030.01314.58
5.6.310.0080.00414.32
5.6.300.0000.01314.23
5.6.290.0030.00613.86
5.6.280.0040.04117.59
5.6.270.0040.00914.29
5.6.260.0110.00314.29
5.6.250.0070.00314.45
5.6.240.0000.00814.22
5.6.230.0040.03517.43
5.6.220.0060.02617.41
5.6.210.0060.04117.57
5.6.200.0030.04417.72
5.6.190.0050.02717.73
5.6.180.0080.04617.74
5.6.170.0050.03117.81
5.6.160.0080.03717.56
5.6.150.0080.03817.61
5.6.140.0030.03217.66
5.6.130.0120.03517.65
5.6.120.0090.03417.75
5.6.110.0030.04217.73
5.6.100.0080.03117.67
5.6.90.0110.03317.62
5.6.80.0070.04517.37
5.6.70.0100.02017.29
5.6.60.0030.04317.30
5.6.50.0030.02517.33
5.6.40.0140.03517.17
5.6.30.0070.04117.50
5.6.20.0070.02317.41
5.6.10.0060.04017.25
5.6.00.0050.04217.29
5.5.380.0040.00414.19
5.5.370.0080.03717.42
5.5.360.0070.04217.22
5.5.350.0120.02717.19
5.5.340.0030.03917.50
5.5.330.0040.04417.75
5.5.320.0040.02717.61
5.5.310.0030.02817.74
5.5.300.0060.04617.56
5.5.290.0100.04217.62
5.5.280.0110.03617.52
5.5.270.0080.04117.65
5.5.260.0070.04717.65
5.5.250.0060.02817.54
5.5.240.0020.03717.34
5.5.230.0050.04217.22
5.5.220.0050.04217.27
5.5.210.0030.02917.25
5.5.200.0060.02317.21
5.5.190.0060.04217.23
5.5.180.0080.04117.17
5.5.170.0000.01014.34
5.5.160.0100.03717.04
5.5.150.0100.03317.07
5.5.140.0040.02917.23
5.5.130.0100.01817.29
5.5.120.0050.03017.23
5.5.110.0030.02417.16
5.5.100.0070.04017.13
5.5.90.0080.03717.17
5.5.80.0030.02517.03
5.5.70.0100.03317.07
5.5.60.0020.02817.15
5.5.50.0050.02717.01
5.5.40.0030.04217.21
5.5.30.0080.03917.19
5.5.20.0110.02817.18
5.5.10.0130.02616.97
5.5.00.0080.03017.16

preferences:
60.46 ms | 400 KiB | 5 Q