3v4l.org

run code in 300+ PHP versions simultaneously
<?php $case = '2 s foo'; function test($case) { $reg1 = <<<'REGEX' / ^ (?<int> (?:\G|(?!\n)) \s*\b \d{1,5} \s* ) (?<timepart> (?: s | m | h | d ) \b ) (?<string>.+) $ /uix REGEX; $out = preg_replace_callback ($reg1, function($matches){ var_dump($matches); }, $case); } $output = test($case); var_dump($output);

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.5.30.0100.00721.97
8.5.20.0080.00920.27
8.5.10.0090.01020.10
8.5.00.0060.00420.02
8.4.180.0120.01019.85
8.4.170.0140.00923.97
8.4.160.0060.00523.85
8.4.150.0070.00717.00
8.4.140.0150.00617.86
8.4.130.0050.00418.00
8.4.120.0150.00520.87
8.4.110.0100.01022.36
8.4.100.0110.01117.93
8.4.90.0090.01218.47
8.4.80.0100.01018.93
8.4.70.0090.00718.37
8.4.60.0150.00518.67
8.4.50.0130.00918.63
8.4.40.0160.00319.83
8.4.30.0090.01017.85
8.4.20.0150.00617.87
8.4.10.0130.00719.87
8.3.300.0070.01420.41
8.3.290.0140.00720.95
8.3.280.0200.00818.66
8.3.270.0090.01016.91
8.3.260.0110.00916.70
8.3.250.0120.00818.93
8.3.240.0120.01116.82
8.3.230.0120.00616.68
8.3.220.0120.00718.84
8.3.210.0090.00918.71
8.3.200.0040.00416.71
8.3.190.0130.00617.05
8.3.180.0070.01217.22
8.3.170.0160.00320.77
8.3.160.0090.00922.48
8.3.150.0060.00618.68
8.3.140.0040.01517.20
8.3.130.0030.00618.59
8.3.120.0060.00320.72
8.3.110.0070.00320.94
8.3.100.0030.00624.06
8.3.90.0040.01126.77
8.3.80.0060.00318.80
8.3.70.0120.00317.00
8.3.60.0040.01116.88
8.3.50.0180.00522.17
8.3.40.0070.00718.97
8.3.30.0080.00818.92
8.3.20.0070.00020.26
8.3.10.0080.00020.91
8.3.00.0040.00420.76
8.2.300.0130.00818.79
8.2.290.0070.00420.38
8.2.280.0110.00818.63
8.2.270.0100.00016.97
8.2.260.0000.00816.65
8.2.250.0080.00018.84
8.2.240.0080.00819.31
8.2.230.0090.00022.58
8.2.220.0130.00737.54
8.2.210.0080.00026.77
8.2.200.0040.00716.88
8.2.190.0120.00616.58
8.2.180.0070.01418.79
8.2.170.0110.00722.96
8.2.160.0070.00719.33
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00319.90
8.2.110.0090.00020.91
8.2.100.0040.00718.16
8.2.90.0050.00318.00
8.2.80.0000.00817.97
8.2.70.0000.00818.04
8.2.60.0060.00318.03
8.2.50.0030.00518.10
8.2.40.0000.00920.59
8.2.30.0000.00719.41
8.2.20.0000.00818.19
8.2.10.0000.00718.26
8.2.00.0000.00818.02
8.1.340.0110.00919.81
8.1.330.0150.00421.75
8.1.320.0090.00617.94
8.1.310.0060.00616.56
8.1.300.0060.00320.02
8.1.290.0060.00330.84
8.1.280.0110.00425.92
8.1.270.0040.00423.75
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0110.00017.48
8.1.230.0040.00817.77
8.1.220.0040.00417.91
8.1.210.0060.00318.77
8.1.200.0000.00917.63
8.1.190.0060.00617.25
8.1.180.0080.00018.10
8.1.170.0080.00020.81
8.1.160.0060.00322.18
8.1.150.0000.00819.00
8.1.140.0040.00419.67
8.1.130.0050.00217.82
8.1.120.0000.00717.64
8.1.110.0040.00417.55
8.1.100.0040.00417.67
8.1.90.0040.00417.62
8.1.80.0090.00017.58
8.1.70.0000.00717.69
8.1.60.0080.00017.81
8.1.50.0040.00417.59
8.1.40.0030.00817.71
8.1.30.0090.00017.75
8.1.20.0000.00817.86
8.1.10.0040.00417.52
8.1.00.0040.00417.59
8.0.300.0040.00418.77
8.0.290.0000.00717.13
8.0.280.0000.00718.36
8.0.270.0050.00217.23
8.0.260.0070.00017.34
8.0.250.0080.00017.12
8.0.240.0000.00817.07
8.0.230.0030.00317.22
8.0.220.0020.00517.13
8.0.210.0030.00317.05
8.0.200.0000.00617.35
8.0.190.0000.00917.14
8.0.180.0040.00417.19
8.0.170.0000.00817.25
8.0.160.0000.00717.24
8.0.150.0000.00717.13
8.0.140.0020.00517.05
8.0.130.0000.00613.63
8.0.120.0000.00817.26
8.0.110.0000.00817.31
8.0.100.0000.00717.06
8.0.90.0040.00417.22
8.0.80.0040.01217.23
8.0.70.0060.00317.21
8.0.60.0000.00717.12
8.0.50.0040.00417.11
8.0.30.0100.00917.13
8.0.20.0140.00617.44
8.0.10.0050.00317.12
8.0.00.0080.01717.07
7.4.330.0050.00015.09
7.4.320.0000.00716.80
7.4.300.0070.00016.84
7.4.290.0040.00416.92
7.4.280.0030.00516.77
7.4.270.0000.00716.78
7.4.260.0080.00016.75
7.4.250.0080.00016.91
7.4.240.0000.00816.92
7.4.230.0040.00417.01
7.4.220.0060.02316.93
7.4.210.0070.01016.79
7.4.200.0000.00716.72
7.4.160.0070.00916.77
7.4.150.0180.00017.40
7.4.140.0170.00517.86
7.4.130.0080.00816.67
7.4.120.0150.00216.81
7.4.110.0100.01016.85
7.4.100.0070.01416.71
7.4.90.0170.00016.85
7.4.80.0140.00319.39
7.4.70.0100.01116.75
7.4.60.0040.01216.70
7.4.50.0000.01516.58
7.4.40.0070.01016.92
7.4.30.0070.01016.75
7.4.00.0060.01215.27
7.3.330.0000.00513.47
7.3.320.0000.00513.47
7.3.310.0030.00316.43
7.3.300.0040.00416.45
7.3.290.0050.00216.33
7.3.280.0090.00916.54
7.3.270.0110.00717.40
7.3.260.0140.00416.61
7.3.250.0100.00816.56
7.3.240.0060.01316.69
7.3.230.0100.01616.66
7.3.210.0050.01116.55
7.3.200.0100.00616.54
7.3.190.0060.01216.73
7.3.180.0030.01916.82
7.3.170.0110.00516.55
7.3.160.0090.01516.55
7.3.120.0050.01314.83
7.3.110.0130.00514.95
7.3.100.0070.00914.84
7.3.90.0100.00515.05
7.3.80.0080.00715.01
7.3.70.0060.00415.04
7.3.60.0040.00914.94
7.3.50.0070.00814.91
7.3.40.0030.01115.08
7.3.30.0070.00515.14
7.3.20.0050.00816.93
7.3.10.0040.01116.69
7.3.00.0090.00616.77
7.2.330.0060.01216.77
7.2.320.0150.00616.80
7.2.310.0030.01416.71
7.2.300.0060.01216.70
7.2.290.0080.01216.58
7.2.250.0060.00915.29
7.2.240.0060.01015.05
7.2.230.0050.01015.05
7.2.220.0050.01015.24
7.2.210.0050.00815.07
7.2.200.0070.00915.09
7.2.190.0030.00815.24
7.2.180.0060.00515.13
7.2.170.0070.00714.91
7.2.160.0030.01014.90
7.2.150.0030.00617.23
7.2.140.0090.00617.11
7.2.130.0140.00516.94
7.2.120.0080.00917.11
7.2.110.0090.00817.02
7.2.100.0030.00917.02
7.2.90.0120.00417.09
7.2.80.0080.00517.15
7.2.70.0060.00916.99
7.2.60.0120.00516.99
7.2.50.0080.00516.89
7.2.40.0080.00717.26
7.2.30.0050.01016.90
7.2.20.0050.00817.18
7.2.10.0170.00217.12
7.2.00.0090.00717.94
7.1.330.0110.00515.77
7.1.320.0100.00515.72
7.1.310.0050.00816.04
7.1.300.0050.00515.97
7.1.290.0040.00915.71
7.1.280.0110.00215.99
7.1.270.0050.00615.72
7.1.260.0070.00515.82
7.1.250.0030.01115.85
7.1.240.0030.01016.00
7.1.230.0100.00716.08
7.1.220.0030.01315.68
7.1.210.0070.00715.99
7.1.200.0030.00916.07
7.1.190.0120.00316.09
7.1.180.0080.00315.66
7.1.170.0030.01016.01
7.1.160.0030.00815.64
7.1.150.0070.01015.80
7.1.140.0040.01115.80
7.1.130.0060.00615.91
7.1.120.0040.01115.93
7.1.110.0040.01115.97
7.1.100.0120.00615.94
7.1.90.0000.01315.95
7.1.80.0040.01115.79
7.1.70.0060.00516.53
7.1.60.0090.00416.59
7.1.50.0030.00616.05
7.1.40.0040.00716.06
7.1.30.0000.00916.03
7.1.20.0030.01016.00
7.1.10.0090.00616.04
7.1.00.0090.03619.22
7.0.330.0040.00815.24
7.0.320.0070.00715.71
7.0.310.0070.00715.57
7.0.300.0070.00715.35
7.0.290.0030.01015.44
7.0.280.0000.01415.43
7.0.270.0060.00315.22
7.0.260.0070.01115.53
7.0.250.0090.00615.63
7.0.240.0080.00815.59
7.0.230.0040.00415.81
7.0.220.0060.01015.59
7.0.210.0040.01115.26
7.0.200.0070.00815.16
7.0.190.0000.00915.55
7.0.180.0040.00715.29
7.0.170.0090.00615.33
7.0.160.0070.00715.32
7.0.150.0140.00015.56
7.0.140.0040.00815.36
7.0.130.0030.00815.45
7.0.120.0080.03818.74
7.0.110.0030.04418.64
7.0.100.0020.04318.79
7.0.90.0020.04218.82
7.0.80.0040.04018.95
7.0.70.0050.04218.70
7.0.60.0030.04118.80
7.0.50.0030.04218.78
7.0.40.0070.03217.96
7.0.30.0070.03717.96
7.0.20.0060.03717.83
7.0.10.0060.03617.74
7.0.00.0060.03617.86
5.6.400.0070.01014.48
5.6.390.0070.00714.38
5.6.380.0070.01114.37
5.6.370.0070.00714.52
5.6.360.0070.00714.09
5.6.350.0070.01014.64
5.6.340.0170.00014.57
5.6.330.0060.00314.16
5.6.320.0030.01614.32
5.6.310.0070.00713.93
5.6.300.0130.00614.67
5.6.290.0040.01114.39
5.6.280.0030.01214.36
5.6.270.0030.01014.37
5.6.260.0080.03817.71
5.6.250.0030.04017.72
5.6.240.0030.04117.48
5.6.230.0050.04217.60
5.6.220.0020.04217.64
5.6.210.0070.03817.65
5.6.200.0080.03817.66
5.6.190.0050.04217.56
5.6.180.0020.04417.57
5.6.170.0060.03617.53
5.6.160.0030.04017.68
5.6.150.0030.04317.49
5.6.140.0090.03817.49
5.6.130.0030.04317.58
5.6.120.0060.04117.43
5.6.110.0060.04117.73
5.6.100.0020.04417.56
5.6.90.0050.04017.49
5.6.80.0060.03717.08
5.6.70.0000.04117.33
5.6.60.0040.03817.23
5.6.50.0050.03817.21
5.6.40.0000.04117.29
5.6.30.0080.03817.33
5.6.20.0020.03917.29
5.6.10.0050.03617.29
5.6.00.0020.04017.22

preferences:
65.57 ms | 2005 KiB | 5 Q