3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '1 foo 2 ba_r 3 foo bar 4 fo-o'; preg_match_all( '/^(\d+)\s+(.*)$/', $input, $matches, PREG_SET_ORDER); $data = array(); foreach( $matches as $match) { list( , $num, $word) = $match; $data[] = array( $num, $word); } print_r( $data);

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.48
8.3.50.0070.01322.11
8.3.40.0040.01118.79
8.3.30.0130.00318.88
8.3.20.0040.00418.73
8.3.10.0040.00420.81
8.3.00.0030.00623.59
8.2.180.0150.00616.88
8.2.170.0110.00422.96
8.2.160.0070.01320.53
8.2.150.0090.00624.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00419.61
8.2.110.0030.00720.18
8.2.100.0000.01117.91
8.2.90.0040.00419.17
8.2.80.0090.00017.97
8.2.70.0000.00817.71
8.2.60.0060.00318.03
8.2.50.0040.00418.07
8.2.40.0000.00818.28
8.2.30.0050.00219.93
8.2.20.0050.00217.80
8.2.10.0000.00717.84
8.2.00.0030.00617.82
8.1.280.0120.00325.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0070.00328.09
8.1.240.0110.00420.67
8.1.230.0030.00920.97
8.1.220.0040.00418.77
8.1.210.0000.00918.90
8.1.200.0030.00617.48
8.1.190.0000.00717.52
8.1.180.0000.00818.10
8.1.170.0000.00818.47
8.1.160.0000.00718.91
8.1.150.0040.00418.84
8.1.140.0000.00917.67
8.1.130.0070.00017.77
8.1.120.0030.00417.52
8.1.110.0000.00817.59
8.1.100.0030.00417.54
8.1.90.0040.00417.54
8.1.80.0000.00817.61
8.1.70.0000.00717.57
8.1.60.0000.00817.77
8.1.50.0040.00417.63
8.1.40.0030.00517.67
8.1.30.0030.00517.81
8.1.20.0050.00317.71
8.1.10.0030.00617.63
8.1.00.0040.00417.57
8.0.300.0000.00819.85
8.0.290.0000.00717.05
8.0.280.0030.00318.47
8.0.270.0030.00317.32
8.0.260.0000.00716.88
8.0.250.0040.00417.13
8.0.240.0060.00317.18
8.0.230.0040.00417.13
8.0.220.0030.00316.95
8.0.210.0030.00317.09
8.0.200.0040.00416.97
8.0.190.0040.00416.98
8.0.180.0030.00516.95
8.0.170.0000.00716.95
8.0.160.0030.00417.02
8.0.150.0040.00417.04
8.0.140.0070.00416.91
8.0.130.0040.00413.50
8.0.120.0040.00416.95
8.0.110.0040.00417.08
8.0.100.0050.00217.10
8.0.90.0050.00217.10
8.0.80.0140.00316.98
8.0.70.0000.00716.91
8.0.60.0070.00016.91
8.0.50.0030.00516.99
8.0.30.0120.00717.14
8.0.20.0080.01017.40
8.0.10.0000.00717.00
8.0.00.0150.00717.01
7.4.330.0030.00314.86
7.4.320.0030.00316.71
7.4.300.0060.00016.61
7.4.290.0030.00316.73
7.4.280.0000.00716.79
7.4.270.0070.00016.71
7.4.260.0030.00313.50
7.4.250.0040.00416.78
7.4.240.0070.00016.82
7.4.230.0070.00016.76
7.4.220.0060.01816.78
7.4.210.0070.01016.84
7.4.200.0030.00316.85
7.4.190.0000.00716.88
7.4.160.0080.00816.78
7.4.150.0090.00917.40
7.4.140.0140.00817.86
7.4.130.0080.00816.69
7.4.120.0070.01216.65
7.4.110.0030.01616.48
7.4.100.0110.00716.60
7.4.90.0090.00916.68
7.4.80.0110.00719.37
7.4.70.0130.00616.71
7.4.60.0110.00516.60
7.4.50.0000.00916.67
7.4.40.0070.00722.27
7.4.30.0140.00716.72
7.4.00.0030.01314.99
7.3.330.0030.00213.21
7.3.320.0050.00013.22
7.3.310.0000.00716.43
7.3.300.0030.00316.45
7.3.290.0050.01116.42
7.3.280.0080.00816.45
7.3.270.0060.01617.40
7.3.260.0100.01018.24
7.3.250.0120.00816.58
7.3.240.0030.01316.72
7.3.230.0030.01816.71
7.3.210.0070.01016.52
7.3.200.0080.00819.39
7.3.190.0140.00316.31
7.3.180.0060.01016.44
7.3.170.0100.00616.44
7.3.160.0060.01016.52
7.3.120.0100.00715.22
7.3.00.0050.00916.82
7.2.330.0070.01116.78
7.2.320.0100.00616.68
7.2.310.0030.01416.59
7.2.300.0100.00616.80
7.2.290.0030.01316.86
7.2.130.0030.01016.75
7.2.120.0070.00417.03
7.2.110.0060.00716.75
7.2.100.0080.00816.79
7.2.90.0050.00817.05
7.2.80.0080.01116.88
7.2.70.0100.00316.94
7.2.60.0090.00717.11
7.2.50.0100.00717.07
7.2.40.0050.01216.56
7.2.30.0110.01117.10
7.2.20.0070.01116.75
7.2.10.0000.01317.11
7.2.00.0030.00818.28
7.1.250.0070.00715.80
7.1.240.0030.00715.85
7.1.230.0070.00415.61
7.1.220.0060.00615.94
7.1.210.0090.00615.82
7.1.200.0030.01215.74
7.1.190.0110.00615.73
7.1.180.0060.00615.52
7.1.170.0070.00715.95
7.1.160.0060.00615.68
7.1.150.0090.00915.53
7.1.140.0060.00315.83
7.1.130.0110.00015.83
7.1.120.0070.00715.56
7.1.110.0070.00315.91
7.1.100.0050.00417.23
7.1.90.0040.00715.98
7.1.80.0000.00915.69
7.1.70.0040.00716.55
7.1.60.0050.01217.69
7.1.50.0070.00916.55
7.1.40.0030.01316.07
7.1.30.0070.00316.06
7.1.20.0080.00415.93
7.1.10.0030.01015.91
7.1.00.0110.03519.17
7.0.330.0130.00315.63
7.0.320.0040.00815.43
7.0.310.0030.01415.52
7.0.300.0110.00915.28
7.0.290.0080.00815.54
7.0.280.0090.01215.47
7.0.270.0090.00615.45
7.0.260.0000.01115.74
7.0.250.0100.00315.63
7.0.240.0110.00415.46
7.0.230.0030.01015.68
7.0.220.0080.00415.62
7.0.210.0040.00715.61
7.0.200.0050.00416.28
7.0.190.0060.00315.32
7.0.180.0060.00315.55
7.0.170.0060.00315.73
7.0.160.0080.00815.29
7.0.150.0050.00515.55
7.0.140.0030.03818.80
7.0.130.0120.00615.34
7.0.120.0100.00715.48
7.0.110.0110.00415.63
7.0.100.0100.00615.50
7.0.90.0070.00315.55
7.0.80.0080.00315.69
7.0.70.0040.00415.23
7.0.60.0060.04417.78
7.0.50.0070.03616.75
7.0.40.0050.04415.68
7.0.30.0060.03315.67
7.0.20.0060.02915.66
7.0.10.0080.04115.76
7.0.00.0070.04015.67
5.6.380.0060.00613.95
5.6.370.0090.00614.27
5.6.360.0040.00714.18
5.6.350.0030.00714.48
5.6.340.0060.00614.14
5.6.330.0030.00714.38
5.6.320.0080.00314.50
5.6.310.0100.00014.31
5.6.300.0060.00314.45
5.6.290.0060.00614.18
5.6.280.0000.04517.56
5.6.270.0100.00314.34
5.6.260.0000.01014.41
5.6.250.0100.00314.22
5.6.240.0040.00814.25
5.6.230.0060.00614.02
5.6.220.0050.00514.24
5.6.210.0020.04017.47
5.6.200.0040.04216.18
5.6.190.0070.03616.25
5.6.180.0100.02516.06
5.6.170.0070.03416.19
5.6.160.0060.02616.23
5.6.150.0040.02716.38
5.6.140.0080.04516.44
5.6.130.0100.03316.30
5.6.120.0030.04716.29
5.6.110.0030.04116.33
5.6.100.0080.04016.10
5.6.90.0050.03016.12
5.6.80.0080.02815.95
5.6.70.0020.04315.75
5.6.60.0060.02315.84
5.6.50.0100.03515.76
5.6.40.0070.04015.81
5.6.30.0020.04015.80
5.6.20.0040.04415.96
5.6.10.0120.03715.83
5.6.00.0030.03115.76
5.5.380.0000.00811.11
5.5.370.0060.00311.00
5.5.360.0060.00311.21
5.5.350.0180.03315.59
5.5.340.0030.02714.51
5.5.330.0080.03214.43
5.5.320.0080.02214.57
5.5.310.0050.02514.40
5.5.300.0060.04114.59
5.5.290.0070.03714.45
5.5.280.0090.02114.58
5.5.270.0060.04214.52
5.5.260.0010.02614.44
5.5.250.0030.04614.38
5.5.240.0050.02814.15
5.5.230.0030.03014.14
5.5.220.0120.03214.17
5.5.210.0030.03814.13
5.5.200.0060.04114.08
5.5.190.0050.02514.09
5.5.180.0080.03814.13
5.5.170.0040.00711.04
5.5.160.0080.04014.19
5.5.150.0080.03514.11
5.5.140.0070.04214.12
5.5.130.0100.03714.19
5.5.120.0100.03814.08
5.5.110.0030.03914.18
5.5.100.0050.04314.07
5.5.90.0030.03114.02
5.5.80.0020.03014.10
5.5.70.0070.04214.04
5.5.60.0030.03714.11
5.5.50.0080.02214.15
5.5.40.0030.02814.07
5.5.30.0050.04114.16
5.5.20.0080.03814.10
5.5.10.0050.03714.02
5.5.00.0030.02314.13
5.4.450.0030.04215.18
5.4.440.0050.02315.18
5.4.430.0020.03915.21
5.4.420.0070.03515.28
5.4.410.0050.04215.04
5.4.400.0000.03414.94
5.4.390.0040.03714.93
5.4.380.0020.02615.04
5.4.370.0050.02515.08
5.4.360.0030.03814.94
5.4.350.0070.02615.01
5.4.340.0050.03214.95
5.4.330.0060.00310.99
5.4.320.0030.02814.95
5.4.310.0100.03514.95
5.4.300.0070.04015.02
5.4.290.0070.03614.99
5.4.280.0040.03215.02
5.4.270.0000.03915.00
5.4.260.0100.02614.93
5.4.250.0060.04115.05
5.4.240.0060.04114.92
5.4.230.0060.02615.02
5.4.220.0030.02714.92
5.4.210.0050.03114.95
5.4.200.0050.04114.94
5.4.190.0050.04214.89
5.4.180.0050.03914.93
5.4.170.0050.02814.98
5.4.160.0060.02714.97
5.4.150.0070.02514.95
5.4.140.0020.03713.54
5.4.130.0020.03713.69
5.4.120.0020.03013.61
5.4.110.0070.04013.61
5.4.100.0070.03213.59
5.4.90.0000.04713.57
5.4.80.0070.03513.65
5.4.70.0080.03313.63
5.4.60.0050.03713.70
5.4.50.0060.03513.58
5.4.40.0020.03713.64
5.4.30.0040.03613.58
5.4.20.0020.02413.65
5.4.10.0030.02113.63
5.4.00.0030.02413.27
5.3.290.0020.04212.74
5.3.280.0060.02012.72
5.3.270.0070.03712.67
5.3.260.0020.02712.72
5.3.250.0050.04112.74
5.3.240.0050.03412.64
5.3.230.0030.03912.72
5.3.220.0030.02912.72
5.3.210.0070.03712.65
5.3.200.0050.04012.62
5.3.190.0050.02312.66
5.3.180.0030.04312.71
5.3.170.0050.04212.69
5.3.160.0090.03112.72
5.3.150.0090.03212.71
5.3.140.0060.04112.69
5.3.130.0070.03512.70
5.3.120.0080.02212.63
5.3.110.0010.03512.71
5.3.100.0020.04412.38
5.3.90.0070.02212.35
5.3.80.0100.01812.34
5.3.70.0040.02212.49
5.3.60.0040.03512.43
5.3.50.0030.02512.30
5.3.40.0060.03212.39
5.3.30.0050.03812.29
5.3.20.0060.03612.28
5.3.10.0070.03712.24
5.3.00.0030.03912.23
5.2.170.0010.02111.01
5.2.160.0050.03011.01
5.2.150.0020.03511.01
5.2.140.0020.02911.00
5.2.130.0020.02010.98
5.2.120.0050.03111.07
5.2.110.0050.03410.99
5.2.100.0100.02710.91
5.2.90.0020.03211.01
5.2.80.0020.03610.99
5.2.70.0030.03210.99
5.2.60.0030.03310.94
5.2.50.0050.03110.87
5.2.40.0080.01811.02
5.2.30.0060.01710.90
5.2.20.0020.02210.92
5.2.10.0020.03510.88
5.2.00.0090.01710.81
5.1.60.0040.02910.41
5.1.50.0030.02810.44
5.1.40.0030.02310.51
5.1.30.0060.01810.68
5.1.20.0030.01710.60
5.1.10.0000.03010.46
5.1.00.0030.03110.47
5.0.50.0040.0149.71
5.0.40.0090.0179.62
5.0.30.0050.0179.57
5.0.20.0020.0129.65
5.0.10.0020.0249.54
5.0.00.0020.0369.58
4.4.90.0020.0149.30
4.4.80.0000.0149.30
4.4.70.0060.0169.30
4.4.60.0020.0179.30
4.4.50.0010.0159.30
4.4.40.0030.0289.30
4.4.30.0000.0159.30
4.4.20.0000.0199.30
4.4.10.0020.0179.30
4.4.00.0040.0139.30
4.3.110.0000.0189.30
4.3.100.0030.0169.30
4.3.90.0000.0179.30
4.3.80.0040.0269.30
4.3.70.0000.0209.30
4.3.60.0000.0209.30
4.3.50.0020.0179.30
4.3.40.0000.0279.30
4.3.30.0020.0189.30
4.3.20.0000.0209.30
4.3.10.0020.0209.30
4.3.00.0020.0189.30

preferences:
42.7 ms | 401 KiB | 5 Q