3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div> <h1>title</h1> and <h2>title 2</h2> <h2 data-formula="a > b" class="regex_is_DOM_unaware">Monkeywrench</h2> <h1 class="classname">test <span>This isn't even a </h tag</span></h1> </div> HTML; var_export( preg_match_all( '|<\s*h[1-2](?:.*)>(.*)</\s*h|Ui', $html, $matches ) ? $matches[1] // capture group 1 : [] ); /* Desired result but not what is provided: array ( 0 => 'title', 1 => 'title 2', 2 => 'Monkeywrench', 3 => 'test <span>This isn't even a </h tag</span>' ) */

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.120.0000.00818.79
8.3.110.0080.00320.94
8.3.100.0050.00324.06
8.3.90.0040.01226.77
8.3.80.0060.00319.36
8.3.70.0110.00418.56
8.3.60.0110.00416.75
8.3.50.0070.01124.49
8.3.40.0100.01019.17
8.3.30.0070.00718.87
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.240.0090.00019.04
8.2.230.0100.00022.58
8.2.220.0060.00337.54
8.2.210.0000.00826.77
8.2.200.0060.00618.88
8.2.190.0180.00016.63
8.2.180.0120.00925.92
8.2.170.0070.00722.96
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00426.35
8.2.110.0060.00320.27
8.2.100.0110.00018.03
8.2.90.0040.00417.88
8.2.80.0000.00819.05
8.2.70.0060.00318.04
8.2.60.0000.00918.02
8.2.50.0000.00819.14
8.2.40.0050.00321.31
8.2.30.0070.00019.28
8.2.20.0030.00818.13
8.2.10.0070.00020.93
8.2.00.0040.00419.26
8.1.300.0030.01518.36
8.1.290.0090.00030.84
8.1.280.0090.00925.92
8.1.270.0040.00418.75
8.1.260.0050.00228.09
8.1.250.0000.00828.09
8.1.240.0000.01118.74
8.1.230.0070.00417.77
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0050.00317.38
8.1.180.0060.00318.97
8.1.170.0000.00818.42
8.1.160.0070.00019.02
8.1.150.0030.00618.76
8.1.140.0050.00218.86
8.1.130.0000.00820.14
8.1.120.0000.00817.59
8.1.110.0000.00917.43
8.1.100.0040.00417.50
8.1.90.0000.00717.43
8.1.80.0040.00417.55
8.1.70.0030.00517.27
8.1.60.0030.00617.70
8.1.50.0030.00617.59
8.1.40.0050.00317.62
8.1.30.0000.00717.80
8.1.20.0040.00417.73
8.1.10.0040.00417.71
8.1.00.0020.00517.68
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0030.00318.33
8.0.270.0080.00016.96
8.0.260.0040.00420.17
8.0.250.0030.00317.12
8.0.240.0040.00416.95
8.0.230.0000.00717.11
8.0.220.0070.00016.91
8.0.210.0000.00816.90
8.0.200.0000.00717.11
8.0.190.0040.00417.14
8.0.180.0030.00617.04
8.0.170.0000.00816.99
8.0.160.0080.00017.13
8.0.150.0050.00316.98
8.0.140.0000.00717.02
8.0.130.0000.00613.49
8.0.120.0000.00816.93
8.0.110.0030.00517.09
8.0.100.0040.00416.91
8.0.90.0100.00016.93
8.0.80.0080.00717.02
8.0.70.0040.00417.01
8.0.60.0000.00716.99
8.0.50.0080.00016.91
8.0.30.0140.01417.10
8.0.20.0160.01017.14
8.0.10.0340.00317.07
8.0.00.0180.00917.02
7.4.330.0030.00315.55
7.4.320.0000.00716.61
7.4.300.0030.00316.73
7.4.290.0000.00816.65
7.4.280.0000.00716.79
7.4.270.0030.00516.64
7.4.260.0050.00013.32
7.4.250.0000.00716.69
7.4.240.0070.00016.63
7.4.230.0000.00816.64
7.4.220.0050.00216.63
7.4.210.0100.00916.67
7.4.200.0040.00416.82
7.4.160.0270.00716.68
7.4.150.0340.00316.76
7.4.140.0280.00916.50
7.4.130.0210.00516.74
7.4.120.0200.00816.69
7.4.110.0170.01216.68
7.4.100.0180.00516.79
7.4.90.0180.00916.72
7.4.80.0170.01117.95
7.4.70.0180.00716.64
7.4.60.0130.01316.56
7.4.50.0170.00716.56
7.4.40.0180.00816.56
7.4.30.0120.01216.57
7.4.20.0190.00816.62
7.4.10.0220.01016.63
7.4.00.0120.00716.65
7.3.330.0000.00716.52
7.3.320.0000.00513.24
7.3.310.0050.00216.35
7.3.300.0030.00316.32
7.3.290.0070.00816.43
7.3.280.0160.00616.49
7.3.270.0230.01316.34
7.3.260.0180.00916.46
7.3.250.0150.01916.41
7.3.240.0150.00816.66
7.3.230.0130.01316.54
7.3.220.0240.00816.30
7.3.210.0150.00716.54
7.3.200.0200.01116.41
7.3.190.0170.00916.35
7.3.180.0140.01016.51
7.3.170.0210.00716.39
7.3.160.0150.01116.55
7.3.150.0160.00916.35
7.3.140.0200.00516.39
7.3.130.0160.00516.45
7.3.120.0160.00716.31
7.3.110.0170.00616.28
7.3.100.0140.00816.26
7.3.90.0160.01016.44
7.3.80.0150.01016.39
7.3.70.0160.00716.29
7.3.60.0160.01016.51
7.3.50.0230.00316.38
7.3.40.0120.01116.43
7.3.30.0170.00916.51
7.3.20.0160.01016.49
7.3.10.0170.01016.43
7.3.00.0130.01316.51
7.2.340.0250.00916.46
7.2.330.0110.01316.64
7.2.320.0150.01116.56
7.2.310.0160.00916.48
7.2.300.0190.00516.54
7.2.290.0120.01316.49
7.2.280.0170.00816.57
7.2.270.0170.01016.48
7.2.260.0130.01116.47
7.2.250.0160.00916.36
7.2.240.0090.01716.45
7.2.230.0280.00416.51
7.2.220.0150.01416.34
7.2.210.0160.01016.51
7.2.200.0130.01416.61
7.2.190.0180.00716.50
7.2.180.0120.01316.60
7.2.170.0140.00816.61
7.2.160.0130.01116.49
7.2.150.0170.01316.57
7.2.140.0200.01116.64
7.2.130.0170.00916.60
7.2.120.0160.01516.63
7.2.110.0150.01016.57
7.2.100.0150.01316.65
7.2.90.0180.00916.60
7.2.80.0150.01316.52
7.2.70.0130.01016.57
7.2.60.0120.01416.52
7.2.50.0190.00916.46
7.2.40.0270.00616.54
7.2.30.0130.00916.57
7.2.20.0160.00716.57
7.2.10.0220.00716.52
7.2.00.0170.00716.57
7.1.330.0210.01215.74
7.1.320.0150.01215.82
7.1.310.0270.00015.64
7.1.300.0180.01115.66
7.1.290.0230.00915.65
7.1.280.0210.01015.60
7.1.270.0270.00715.59
7.1.260.0140.01415.57
7.1.250.0190.00515.55
7.1.240.0200.01415.55
7.1.230.0210.00415.67
7.1.220.0240.01115.56
7.1.210.0150.01115.68
7.1.200.0500.01515.66
7.1.190.0160.01015.59
7.1.180.0190.01115.61
7.1.170.0190.01115.58
7.1.160.0220.00615.51
7.1.150.0270.00315.70
7.1.140.0130.01615.53
7.1.130.0270.00315.55
7.1.120.0140.01415.65
7.1.110.0230.00315.76
7.1.100.0200.01015.74
7.1.90.0220.00515.69
7.1.80.0080.02015.81
7.1.70.0220.00715.46
7.1.60.0300.01315.89
7.1.50.0170.01315.76
7.1.40.0300.00315.75
7.1.30.0270.00015.84
7.1.20.0260.01115.64
7.1.10.0120.01515.75
7.1.00.0210.01215.50
7.0.330.0220.00715.24
7.0.320.0200.01015.25
7.0.310.0240.00315.37
7.0.300.0200.00715.27
7.0.290.0200.00515.43
7.0.280.0100.01515.22
7.0.270.0140.01815.20
7.0.260.0510.01315.27
7.0.250.0240.00015.41
7.0.240.0200.01015.32
7.0.230.0170.00815.36
7.0.220.0160.01315.33
7.0.210.0100.01515.24
7.0.200.0170.01015.22
7.0.190.0190.01015.22
7.0.180.0210.01015.30
7.0.170.0160.01315.34
7.0.160.0640.01015.21
7.0.150.0220.00715.32
7.0.140.0190.00615.39
7.0.130.0200.00615.39
7.0.120.0190.00615.44
7.0.110.0250.00315.34
7.0.100.0230.00715.34
7.0.90.0150.01615.20
7.0.80.0220.00715.16
7.0.70.0210.00315.21
7.0.60.0240.00315.05
7.0.50.0120.01715.07
7.0.40.0160.01115.21
7.0.30.0220.00515.25
7.0.20.0220.01515.18
7.0.10.0170.00915.18
7.0.00.0080.01515.04
5.6.400.0210.00915.79
5.6.390.0260.00715.86
5.6.380.0170.01315.76
5.6.370.0250.00415.71
5.6.360.0210.00615.82
5.6.350.0200.00815.91
5.6.340.0220.00415.89
5.6.330.0210.01115.67
5.6.320.0180.01115.80
5.6.310.0250.00315.91
5.6.300.0180.00915.61
5.6.290.0130.01515.89
5.6.280.0100.01815.82
5.6.270.0110.01515.80
5.6.260.0150.00915.67
5.6.250.0200.00615.82
5.6.240.0240.00615.85
5.6.230.0210.00816.06
5.6.220.0060.01915.98
5.6.210.0130.01715.79
5.6.200.0160.00915.89
5.6.190.0160.01616.01
5.6.180.0220.00915.85
5.6.170.0240.01116.11
5.6.160.0190.00616.09
5.6.150.0140.01115.93
5.6.140.0170.01416.00
5.6.130.0140.01615.88
5.6.120.0190.00915.94
5.6.110.0190.00915.82
5.6.100.0310.00615.97
5.6.90.0150.01215.86
5.6.80.0190.01015.88
5.6.70.0200.00516.03
5.6.60.0150.01415.94
5.6.50.0200.01015.77
5.6.40.0170.01215.84
5.6.30.0250.01115.90
5.6.20.0160.01015.92
5.6.10.0210.00915.65
5.6.00.0290.00615.69
5.5.380.0220.00815.93
5.5.370.0270.00415.96
5.5.360.0260.00315.70
5.5.350.0210.00315.80
5.5.340.0180.00715.56
5.5.330.0130.01315.61
5.5.320.0200.01115.66
5.5.310.0180.01115.64
5.5.300.0150.00815.73
5.5.290.0190.00915.77
5.5.280.0120.01215.70
5.5.270.0140.01915.64
5.5.260.0180.01115.67
5.5.250.0110.01615.84
5.5.240.0130.01615.78
5.5.230.0210.01015.87
5.5.220.0360.01415.77
5.5.210.0150.01915.79
5.5.200.0120.01715.69
5.5.190.0230.00315.75
5.5.180.0100.01315.68
5.5.170.0210.00715.65
5.5.160.0170.01015.88
5.5.150.0260.00615.55
5.5.140.0210.01215.50
5.5.130.0120.01615.59
5.5.120.0240.00315.78
5.5.110.0090.01415.59
5.5.100.0240.00815.68
5.5.90.0170.01415.80
5.5.80.0110.01515.68
5.5.70.0210.00815.70
5.5.60.0110.02015.66
5.5.50.0110.01115.72
5.5.40.0110.01115.91
5.5.30.0140.01415.86
5.5.20.0290.00615.78
5.5.10.0140.01515.68
5.5.00.0100.01615.87
5.4.450.0130.01012.65
5.4.440.0110.00712.60
5.4.430.0120.00912.62
5.4.420.0100.01012.57
5.4.410.0130.00412.54
5.4.400.0160.00312.58
5.4.390.0140.01012.56
5.4.380.0100.01012.55
5.4.370.0070.01712.54
5.4.360.0190.00312.62
5.4.350.0100.01312.54
5.4.340.0180.00412.58
5.4.330.0160.00312.49
5.4.320.0130.00512.58
5.4.310.0230.00612.62
5.4.300.0150.00912.61
5.4.290.0170.00312.75
5.4.280.0210.00412.63
5.4.270.0150.00912.61
5.4.260.0140.01112.54
5.4.250.0150.00312.58
5.4.240.0160.00712.55
5.4.230.0120.00912.36
5.4.220.0110.01112.30
5.4.210.0090.00912.38
5.4.200.0110.01012.38
5.4.190.0140.00512.27
5.4.180.0150.00412.39
5.4.170.0150.00612.45
5.4.160.0170.00912.46
5.4.150.0180.00612.52
5.4.140.0140.00712.54
5.4.130.0120.01212.50
5.4.120.0090.00912.47
5.4.110.0120.00812.57
5.4.100.0090.00912.51
5.4.90.0070.01512.61
5.4.80.0150.00412.61
5.4.70.0090.00912.60
5.4.60.0170.00312.65
5.4.50.0150.00312.49
5.4.40.0070.01512.45
5.4.30.0150.00412.64
5.4.20.0120.00612.64
5.4.10.0150.00312.56
5.4.00.0120.00712.51
5.3.290.0170.01012.80
5.3.280.0110.01412.64
5.3.270.0120.01012.68
5.3.260.0170.01012.66
5.3.250.0270.01012.79
5.3.240.0180.00612.53
5.3.230.0140.00712.66
5.3.220.0140.00612.75
5.3.210.0190.00212.76
5.3.200.0170.00612.87
5.3.190.0210.00412.72
5.3.180.0100.01512.82
5.3.170.0180.00612.96
5.3.160.0150.01112.79
5.3.150.0150.00912.81
5.3.140.0200.00312.71
5.3.130.0180.00312.78
5.3.120.0150.00312.84
5.3.110.0100.01012.80
5.3.100.0150.00312.76
5.3.90.0180.00012.74
5.3.80.0150.00412.93
5.3.70.0110.00812.69
5.3.60.0160.00612.82
5.3.50.0180.00612.75
5.3.40.0160.00712.76
5.3.30.0150.00912.79
5.3.20.0100.00712.66
5.3.10.0180.01212.46
5.3.00.0160.00612.48
5.2.170.0140.00711.88
5.2.160.0100.01011.88
5.2.150.0160.00311.88
5.2.140.0080.00811.88
5.2.130.0170.00011.88
5.2.120.0150.00411.88
5.2.110.0070.01411.88
5.2.100.0120.00611.88
5.2.90.0100.01011.88
5.2.80.0100.01011.88
5.2.70.0160.00711.88
5.2.60.0140.00711.88
5.2.50.0090.00611.88
5.2.40.0120.00311.88
5.2.30.0150.00611.88
5.2.20.0130.00711.88
5.2.10.0080.00711.88
5.2.00.0100.00811.88
5.1.60.0060.00911.88
5.1.50.0110.00711.88
5.1.40.0160.00311.88
5.1.30.0150.00511.88
5.1.20.0140.00611.88
5.1.10.0090.01011.88
5.1.00.0110.00311.88
5.0.50.0060.00711.88
5.0.40.0160.00011.88
5.0.30.0100.00511.88
5.0.20.0140.00311.88
5.0.10.0100.00211.88
5.0.00.0110.00311.88
4.4.90.0080.00411.88
4.4.80.0040.00411.88
4.4.70.0000.00911.88
4.4.60.0050.00511.88
4.4.50.0090.00011.88
4.4.40.0030.00711.88
4.4.30.0130.00911.88
4.4.20.0070.00511.88
4.4.10.0050.00511.88
4.4.00.0100.00011.88
4.3.110.0090.00011.88
4.3.100.0070.00011.88
4.3.90.0040.00711.88
4.3.80.0070.00311.88
4.3.70.0070.00211.88
4.3.60.0000.00811.88
4.3.50.0070.00411.88
4.3.40.0040.00411.88
4.3.30.0070.00011.88
4.3.20.0050.00511.88
4.3.10.0070.00311.88
4.3.00.0040.00511.88

preferences:
69.79 ms | 403 KiB | 5 Q