3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\d{5}/'; $str = '5900062000'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result var_dump($matches); foreach($matches as $match){ echo(substr($match[0],0,2)); }

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.00618.30
8.3.50.0040.01516.49
8.3.40.0030.01218.97
8.3.30.0110.00418.79
8.3.20.0040.00418.98
8.3.10.0000.00823.40
8.3.00.0040.00423.48
8.2.180.0070.01316.88
8.2.170.0120.00322.96
8.2.160.0030.01319.33
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00420.52
8.2.120.0050.00326.35
8.2.110.0090.00022.18
8.2.100.0080.00519.66
8.2.90.0040.00417.75
8.2.80.0040.00417.97
8.2.70.0050.00318.16
8.2.60.0050.00318.05
8.2.50.0050.00318.10
8.2.40.0040.00419.34
8.2.30.0000.00719.42
8.2.20.0070.00018.05
8.2.10.0040.00419.33
8.2.00.0040.00419.51
8.1.280.0110.00325.92
8.1.270.0040.00422.11
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.60
8.1.230.0080.00419.16
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0090.00017.38
8.1.190.0040.00417.48
8.1.180.0000.00918.10
8.1.170.0000.00818.82
8.1.160.0050.00218.82
8.1.150.0000.00718.83
8.1.140.0040.00419.50
8.1.130.0030.00319.01
8.1.120.0000.00717.57
8.1.110.0000.00717.50
8.1.100.0040.00417.59
8.1.90.0000.00717.59
8.1.80.0030.00617.57
8.1.70.0030.00617.59
8.1.60.0030.00517.64
8.1.50.0060.00317.68
8.1.40.0000.00817.68
8.1.30.0000.01317.63
8.1.20.0080.00017.82
8.1.10.0040.00417.75
8.1.00.0040.00417.55
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.45
8.0.270.0070.00016.95
8.0.260.0040.00417.26
8.0.250.0040.00417.09
8.0.240.0000.00717.09
8.0.230.0090.00017.11
8.0.220.0030.00317.00
8.0.210.0070.00017.01
8.0.200.0090.00017.11
8.0.190.0030.00516.98
8.0.180.0070.00017.04
8.0.170.0040.00417.04
8.0.160.0000.00717.10
8.0.150.0000.00817.00
8.0.140.0000.00716.98
8.0.130.0000.00513.39
8.0.120.0040.00416.99
8.0.110.0040.00616.85
8.0.100.0000.00717.05
8.0.90.0040.00417.15
8.0.80.0080.01217.09
8.0.70.0070.00017.03
8.0.60.0050.00317.03
8.0.50.0000.00717.09
8.0.30.0070.01117.30
8.0.20.0220.02617.40
8.0.10.0000.00817.04
8.0.00.0100.00716.87
7.4.330.0050.00015.55
7.4.320.0000.00716.62
7.4.300.0060.00016.66
7.4.290.0000.00716.62
7.4.280.0040.00416.69
7.4.270.0000.00716.63
7.4.260.0030.00316.66
7.4.250.0000.00716.82
7.4.240.0000.00816.88
7.4.230.0000.00916.61
7.4.220.0040.00416.89
7.4.210.0080.00616.82
7.4.200.0030.00316.69
7.4.160.0100.00716.73
7.4.140.0110.01017.86
7.4.130.0000.01816.62
7.4.120.0080.01216.73
7.4.110.0070.01016.69
7.4.100.0000.01816.73
7.4.90.0150.00616.91
7.4.80.0150.00319.39
7.4.70.0070.01016.91
7.4.60.0140.00316.80
7.4.50.0060.01216.83
7.4.40.0070.01116.57
7.4.10.0100.00715.06
7.4.00.0060.01015.29
7.3.330.0050.00013.38
7.3.320.0000.00513.38
7.3.310.0040.00416.33
7.3.300.0060.00016.39
7.3.290.0070.00016.32
7.3.280.0100.01016.40
7.3.260.0070.01016.65
7.3.240.0130.01016.59
7.3.230.0110.00716.51
7.3.210.0120.01116.45
7.3.200.0080.00816.66
7.3.190.0060.01016.66
7.3.180.0170.00016.71
7.3.170.0170.00316.77
7.3.160.0030.01416.67
7.3.130.0100.00714.95
7.3.120.0100.00715.36
7.3.110.0060.01314.82
7.3.100.0110.00014.73
7.3.90.0000.01314.84
7.3.80.0070.00414.97
7.3.70.0100.00714.63
7.3.60.0070.00715.12
7.3.50.0000.00915.02
7.3.40.0090.00015.06
7.3.30.0100.00314.93
7.3.20.0060.00616.85
7.3.10.0050.00816.49
7.3.00.0110.00516.63
7.2.330.0120.00616.95
7.2.320.0110.00816.73
7.2.310.0170.00316.98
7.2.300.0110.01116.88
7.2.290.0190.00816.62
7.2.260.0060.01215.37
7.2.250.0070.01115.22
7.2.240.0090.00615.33
7.2.230.0040.01415.23
7.2.220.0040.01115.04
7.2.210.0080.00415.04
7.2.200.0030.00715.02
7.2.190.0030.01015.13
7.2.180.0110.00314.95
7.2.170.0070.00715.19
7.2.160.0030.01015.24
7.2.150.0030.01017.03
7.2.140.0060.00617.14
7.2.130.0100.00717.06
7.2.120.0040.00716.98
7.2.110.0070.01016.91
7.2.100.0050.00916.76
7.2.90.0070.01216.88
7.2.80.0340.00116.30
7.2.70.0350.00416.35
7.2.60.0290.00816.50
7.2.50.0450.00916.36
7.2.40.0290.00616.36
7.2.30.0320.01016.27
7.2.20.0210.01016.38
7.2.10.0250.01016.28
7.2.00.0230.00716.37
7.1.330.0120.00015.68
7.1.320.0000.01616.05
7.1.310.0040.01115.84
7.1.300.0040.00715.99
7.1.290.0110.00316.00
7.1.280.0030.01316.12
7.1.270.0070.00715.67
7.1.260.0060.00316.18
7.1.250.0160.00615.78
7.1.240.0030.01015.87
7.1.230.0080.00616.16
7.1.220.0040.00415.90
7.1.210.0070.00716.10
7.1.200.0050.00516.04
7.1.190.0440.01515.13
7.1.180.0380.00515.09
7.1.170.0320.00815.11
7.1.160.0290.01015.01
7.1.150.0400.01114.90
7.1.140.0340.00714.77
7.1.130.0410.00515.07
7.1.120.0300.00714.79
7.1.110.0680.00915.10
7.1.100.0310.01015.05
7.1.90.0430.01015.03
7.1.80.0410.01015.18
7.1.70.0460.00415.03
7.1.60.0460.00924.10
7.1.50.0760.00624.11
7.1.40.0670.00624.16
7.1.30.0650.01223.83
7.1.20.0750.01123.93
7.1.10.0580.00414.95
7.1.00.0340.00815.13
7.0.330.0030.00615.69
7.0.320.0110.00415.43
7.0.310.0080.00415.61
7.0.300.0000.00915.29
7.0.290.0000.01615.55
7.0.280.0070.00715.48
7.0.270.0100.00015.66
7.0.260.0000.01415.60
7.0.250.0060.00915.54
7.0.240.0080.00015.80
7.0.230.0000.01415.88
7.0.220.0040.01115.53
7.0.210.0040.00815.82
7.0.200.0000.01415.55
7.0.190.0040.00415.54
7.0.180.0030.01015.30
7.0.170.0030.00615.42
7.0.160.0110.00315.59
7.0.150.0100.00315.34
7.0.140.0080.00615.59
7.0.130.0040.00715.69
7.0.120.0070.01015.56
7.0.110.0090.00615.49
7.0.100.0060.00915.42
7.0.90.0050.00515.69
7.0.80.0030.01015.25
7.0.70.0070.00315.79
7.0.60.0000.01315.72
7.0.50.0000.01615.26
7.0.40.0030.01013.58
7.0.30.0130.00313.58
7.0.20.0080.00413.66
7.0.10.0000.01113.45
7.0.00.0040.00413.71
5.6.400.0030.00614.70
5.6.390.0080.00814.71
5.6.380.0000.01314.38
5.6.370.0000.00914.52
5.6.360.0100.00614.50
5.6.350.0100.00314.43
5.6.340.0030.00714.10
5.6.330.0030.01114.50
5.6.320.0080.00814.20
5.6.310.0000.01214.09
5.6.300.0070.00714.45
5.6.290.0070.00714.30
5.6.280.0000.01814.43
5.6.270.0060.00914.53
5.6.260.0000.01214.40
5.6.250.0140.00014.68
5.6.240.0080.00414.36
5.6.230.0060.00914.37
5.6.220.0070.00714.38
5.6.210.0080.00514.51
5.6.200.0030.01414.67
5.6.190.0110.00714.43
5.6.180.0000.01314.62
5.6.170.0040.00414.27
5.6.160.0000.01414.45
5.6.150.0090.00914.64
5.6.140.0040.00414.26
5.6.130.0060.00614.11
5.6.120.0080.00014.70
5.6.110.0060.00614.46
5.6.100.0000.01114.41
5.6.90.0060.00314.40
5.6.80.0100.00314.47
5.6.70.0000.00814.12
5.6.60.0000.00914.43
5.6.50.0100.00314.34
5.6.40.0060.00614.17
5.6.30.0000.01014.37
5.6.20.0030.01014.35
5.6.10.0060.00614.21
5.6.00.0000.01114.28

preferences:
54.98 ms | 400 KiB | 5 Q