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,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.00318.68
8.3.50.0100.00716.68
8.3.40.0140.00018.76
8.3.30.0040.01118.96
8.3.20.0000.00918.94
8.3.10.0040.00423.64
8.3.00.0050.00323.64
8.2.180.0110.01117.00
8.2.170.0120.00822.96
8.2.160.0120.00319.19
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00320.35
8.2.120.0040.00426.35
8.2.110.0030.00622.08
8.2.100.0110.00317.79
8.2.90.0000.00817.75
8.2.80.0000.00817.97
8.2.70.0000.00818.05
8.2.60.0080.00017.80
8.2.50.0060.00318.10
8.2.40.0030.00619.11
8.2.30.0040.00419.14
8.2.20.0040.00418.08
8.2.10.0000.00719.41
8.2.00.0000.00719.51
8.1.280.0060.00925.92
8.1.270.0040.00421.98
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0090.00024.01
8.1.230.0060.00618.98
8.1.220.0090.00017.77
8.1.210.0040.00418.77
8.1.200.0080.00017.35
8.1.190.0040.00417.38
8.1.180.0000.00818.10
8.1.170.0050.00318.76
8.1.160.0060.00318.95
8.1.150.0050.00318.91
8.1.140.0020.00519.51
8.1.130.0070.00019.14
8.1.120.0000.00717.62
8.1.110.0000.00717.61
8.1.100.0040.00417.61
8.1.90.0000.00717.48
8.1.80.0040.00417.52
8.1.70.0030.00617.55
8.1.60.0030.00617.65
8.1.50.0000.00717.70
8.1.40.0040.00417.65
8.1.30.0000.01017.78
8.1.20.0000.00717.71
8.1.10.0000.00817.71
8.1.00.0000.00817.61
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0040.00418.47
8.0.270.0000.00717.27
8.0.260.0040.00417.37
8.0.250.0030.00317.16
8.0.240.0030.00317.05
8.0.230.0040.00417.15
8.0.220.0000.00717.09
8.0.210.0000.00717.03
8.0.200.0000.00617.20
8.0.190.0000.00817.18
8.0.180.0000.00817.17
8.0.170.0000.00817.10
8.0.160.0000.00716.94
8.0.150.0040.00416.91
8.0.140.0030.00316.95
8.0.130.0000.00513.56
8.0.120.0030.00417.09
8.0.110.0000.00816.97
8.0.100.0070.00017.16
8.0.90.0030.00517.04
8.0.80.0080.01417.13
8.0.70.0000.00717.04
8.0.60.0040.00417.17
8.0.50.0040.00417.12
8.0.30.0120.00717.28
8.0.20.0150.00317.51
8.0.10.0080.00017.09
8.0.00.0090.00916.94
7.4.330.0000.00515.55
7.4.320.0040.00416.84
7.4.300.0050.00216.63
7.4.290.0000.00716.79
7.4.280.0000.00716.70
7.4.270.0080.00016.83
7.4.260.0000.00716.71
7.4.250.0070.00016.59
7.4.240.0000.00716.81
7.4.230.0000.00816.81
7.4.220.0000.00816.62
7.4.210.0090.00916.72
7.4.200.0040.00416.71
7.4.160.0120.00516.74
7.4.140.0100.00917.86
7.4.130.0080.01516.75
7.4.120.0100.00816.78
7.4.110.0210.00016.69
7.4.100.0140.00316.55
7.4.90.0120.00616.97
7.4.80.0080.01619.39
7.4.70.0030.01416.62
7.4.60.0080.00816.62
7.4.50.0030.01216.57
7.4.40.0120.01016.71
7.4.10.0040.01515.30
7.4.00.0050.01015.07
7.3.330.0030.00313.18
7.3.320.0030.00313.30
7.3.310.0030.00316.31
7.3.300.0030.00316.48
7.3.290.0070.00016.43
7.3.280.0050.01516.43
7.3.260.0090.00816.70
7.3.240.0110.00916.74
7.3.230.0160.00616.66
7.3.210.0060.01316.83
7.3.200.0150.00316.70
7.3.190.0100.00716.61
7.3.180.0080.00816.43
7.3.170.0100.00916.54
7.3.160.0060.01316.68
7.3.130.0120.00315.02
7.3.120.0030.01215.18
7.3.110.0070.00815.20
7.3.100.0090.00615.20
7.3.90.0080.00514.81
7.3.80.0020.01015.09
7.3.70.0050.00614.88
7.3.60.0040.00914.92
7.3.50.0050.00414.70
7.3.40.0050.00914.82
7.3.30.0020.01214.84
7.3.20.0020.00916.92
7.3.10.0050.00816.89
7.3.00.0050.00816.89
7.2.330.0080.01216.76
7.2.320.0060.01416.79
7.2.310.0060.01216.65
7.2.300.0070.01016.88
7.2.290.0160.00416.73
7.2.260.0130.00714.92
7.2.250.0030.01415.19
7.2.240.0070.01015.21
7.2.230.0120.00514.97
7.2.220.0100.00815.11
7.2.210.0110.00515.07
7.2.200.0060.00615.09
7.2.190.0050.00715.17
7.2.180.0000.01215.32
7.2.170.0100.00614.93
7.2.160.0000.01215.21
7.2.150.0040.01217.04
7.2.140.0000.01217.01
7.2.130.0000.01116.96
7.2.120.0000.01416.98
7.2.110.0080.00416.98
7.2.100.0040.01216.90
7.2.90.0030.01317.09
7.2.80.0240.00715.92
7.2.70.0260.00916.21
7.2.60.0230.00716.10
7.2.50.0230.00916.25
7.2.40.0260.00616.02
7.2.30.0240.00516.02
7.2.20.0280.00916.18
7.2.10.0300.00816.09
7.2.00.0240.00816.20
7.1.330.0040.01115.86
7.1.320.0080.00915.95
7.1.310.0030.00815.81
7.1.300.0050.00815.75
7.1.290.0070.00715.99
7.1.280.0070.00615.95
7.1.270.0020.01215.84
7.1.260.0050.00715.98
7.1.250.0030.00616.18
7.1.240.0070.00415.91
7.1.230.0040.00815.86
7.1.220.0070.00416.05
7.1.210.0060.00615.98
7.1.200.0030.00915.75
7.1.190.0280.00315.06
7.1.180.0290.00215.06
7.1.170.0210.01115.02
7.1.160.0210.00914.97
7.1.150.0250.00714.96
7.1.140.0220.00815.04
7.1.130.0260.00414.81
7.1.120.0240.00814.95
7.1.110.0350.00715.06
7.1.100.0280.00315.05
7.1.90.0320.01015.11
7.1.80.0270.00815.03
7.1.70.0320.00714.87
7.1.60.0360.00723.91
7.1.50.0520.00523.83
7.1.40.0480.00724.04
7.1.30.0480.00923.85
7.1.20.0500.00324.11
7.1.10.0340.00915.01
7.1.00.0260.01014.99
7.0.330.0040.00715.34
7.0.320.0040.00815.72
7.0.310.0100.00315.72
7.0.300.0000.01115.73
7.0.290.0110.00315.77
7.0.280.0030.01015.40
7.0.270.0030.00515.67
7.0.260.0040.00815.78
7.0.250.0030.01015.44
7.0.240.0000.01115.76
7.0.230.0030.01015.52
7.0.220.0080.00815.53
7.0.210.0030.01015.79
7.0.200.0000.01215.74
7.0.190.0000.01415.61
7.0.180.0000.01415.54
7.0.170.0050.00315.48
7.0.160.0030.00615.58
7.0.150.0030.01015.58
7.0.140.0100.00315.61
7.0.130.0000.01015.71
7.0.120.0070.00415.76
7.0.110.0060.00615.58
7.0.100.0030.00915.66
7.0.90.0000.01415.59
7.0.80.0060.00915.62
7.0.70.0070.00315.69
7.0.60.0090.00615.55
7.0.50.0040.00415.77
7.0.40.0070.00713.55
7.0.30.0070.00713.83
7.0.20.0120.00013.72
7.0.10.0000.01413.82
7.0.00.0000.01313.75
5.6.400.0070.00314.03
5.6.390.0070.00314.43
5.6.380.0000.00814.45
5.6.370.0030.01014.38
5.6.360.0030.01414.61
5.6.350.0030.01014.14
5.6.340.0060.00614.38
5.6.330.0120.00014.61
5.6.320.0000.00814.50
5.6.310.0000.00914.18
5.6.300.0090.00614.43
5.6.290.0050.00514.24
5.6.280.0060.00314.02
5.6.270.0030.00614.43
5.6.260.0070.01014.41
5.6.250.0070.00714.59
5.6.240.0070.00714.18
5.6.230.0090.00314.17
5.6.220.0070.00714.66
5.6.210.0070.00414.64
5.6.200.0130.00014.37
5.6.190.0120.00314.36
5.6.180.0060.00914.38
5.6.170.0060.00914.19
5.6.160.0070.00714.53
5.6.150.0090.00914.18
5.6.140.0070.00414.47
5.6.130.0060.00614.36
5.6.120.0090.00014.30
5.6.110.0090.00614.28
5.6.100.0030.00714.10
5.6.90.0070.00714.31
5.6.80.0090.00314.23
5.6.70.0100.00714.20
5.6.60.0060.00614.20
5.6.50.0060.00614.18
5.6.40.0030.00814.26
5.6.30.0060.00314.04
5.6.20.0030.01014.29
5.6.10.0070.00414.38
5.6.00.0080.00414.29

preferences:
73.71 ms | 400 KiB | 5 Q