3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parse_attributes($input) { $dom = new DomDocument(); $dom->loadHtml("<foo " . $input. "/>"); $attributes = array(); foreach ($dom->documentElement->attributes as $name => $attr) { $attributes[$name] = $node->value; } return $attributes; } $content = 'width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/156742959&amp;color=ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false"'; $params = parse_attributes($content); var_dump($params);

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.0070.00717.00
8.3.50.0220.00522.88
8.3.40.0040.01119.01
8.3.30.0120.00619.29
8.3.20.0070.00020.38
8.3.10.0050.00323.88
8.3.00.0000.00818.00
8.2.180.0150.00725.92
8.2.170.0150.00622.96
8.2.160.0100.00320.82
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0080.00021.29
8.2.110.0090.00020.77
8.2.100.0090.00317.97
8.2.90.0030.00619.26
8.2.80.0040.00417.97
8.2.70.0050.00317.74
8.2.60.0080.00018.16
8.2.50.0000.00818.07
8.2.40.0050.00318.46
8.2.30.0080.00018.37
8.2.20.0040.00418.08
8.2.10.0040.00418.50
8.2.00.0060.00318.00
8.1.280.0070.00725.92
8.1.270.0090.00024.09
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00721.13
8.1.230.0070.00417.89
8.1.220.0050.00517.91
8.1.210.0040.00418.77
8.1.200.0030.00617.60
8.1.190.0000.00917.60
8.1.180.0050.00318.10
8.1.170.0040.00418.70
8.1.160.0080.00019.18
8.1.150.0060.00319.22
8.1.140.0040.00417.63
8.1.130.0070.00018.06
8.1.120.0040.00417.59
8.1.110.0030.00517.65
8.1.100.0060.00317.71
8.1.90.0000.00717.73
8.1.80.0000.00717.68
8.1.70.0070.00017.67
8.1.60.0030.00617.74
8.1.50.0000.00817.67
8.1.40.0030.00617.77
8.1.30.0040.00417.84
8.1.20.0020.00517.79
8.1.10.0040.00417.83
8.1.00.0040.00417.63
8.0.300.0040.00418.77
8.0.290.0000.00916.88
8.0.280.0030.00318.59
8.0.270.0050.00317.10
8.0.260.0030.00317.41
8.0.250.0000.00817.25
8.0.240.0030.00317.29
8.0.230.0030.00317.22
8.0.220.0050.00217.02
8.0.210.0070.00017.09
8.0.200.0030.00317.18
8.0.190.0050.00317.27
8.0.180.0020.00517.14
8.0.170.0030.00517.09
8.0.160.0040.00417.15
8.0.150.0040.00417.10
8.0.140.0040.00417.17
8.0.130.0000.00613.63
8.0.120.0070.00017.18
8.0.110.0040.00417.11
8.0.100.0050.00317.02
8.0.90.0050.00217.01
8.0.80.0110.00717.24
8.0.70.0080.00017.01
8.0.60.0050.00316.90
8.0.50.0040.00417.17
8.0.30.0080.01317.34
8.0.20.0080.01217.43
8.0.10.0040.00417.34
8.0.00.0060.01117.12
7.4.330.0000.00615.38
7.4.320.0030.00316.64
7.4.300.0060.00016.82
7.4.290.0060.00316.84
7.4.280.0060.00316.85
7.4.270.0030.00316.83
7.4.260.0000.00613.41
7.4.250.0070.00016.86
7.4.240.0030.00316.81
7.4.230.0070.00016.68
7.4.220.0060.01216.72
7.4.210.0060.00916.70
7.4.200.0070.00016.75
7.4.160.0100.00716.66
7.4.150.0030.01617.40
7.4.140.0110.00917.86
7.4.130.0100.01016.96
7.4.120.0110.00816.72
7.4.110.0090.01316.79
7.4.100.0070.01116.91
7.4.90.0090.00916.93
7.4.80.0100.01019.39
7.4.70.0090.00916.76
7.4.60.0000.01616.89
7.4.50.0050.00316.53
7.4.40.0030.01216.90
7.4.30.0090.00616.86
7.4.00.0100.00715.39
7.3.330.0050.00013.55
7.3.320.0050.00013.54
7.3.310.0000.00616.54
7.3.300.0030.00316.64
7.3.290.0060.01316.57
7.3.280.0120.00516.58
7.3.270.0160.00317.40
7.3.260.0110.00616.50
7.3.250.0110.00516.61
7.3.240.0070.01516.80
7.3.230.0050.01116.50
7.3.210.0090.01216.76
7.3.200.0030.01419.39
7.3.190.0150.00716.55
7.3.180.0130.00316.76
7.3.170.0070.01016.75
7.3.160.0080.00816.65
7.2.330.0080.01216.80
7.2.320.0100.00916.91
7.2.310.0080.01216.86
7.2.300.0070.01016.72
7.2.290.0080.00816.97
7.2.60.0030.01017.11
7.2.00.0080.00419.61
7.1.200.0090.00315.89
7.1.100.0110.00418.39
7.1.70.0040.00417.09
7.1.60.0100.01319.40
7.1.50.0070.01717.09
7.1.00.0030.07722.50
7.0.200.0070.00317.06
7.0.140.0130.06722.09
7.0.60.0070.08020.07
7.0.50.0000.09317.96
7.0.40.0000.04720.20
7.0.30.0200.05320.30
7.0.20.0330.07320.37
7.0.10.0130.08320.33
7.0.00.0030.04320.30
5.6.280.0000.07721.13
5.6.210.0030.07320.69
5.6.200.0070.04318.27
5.6.190.0030.04720.48
5.6.180.4270.04020.75
5.6.170.0330.05720.52
5.6.160.0100.08320.54
5.6.150.0030.06718.25
5.6.140.0130.07718.21
5.6.130.0100.07718.21
5.6.120.0030.08321.18
5.6.110.0130.08721.19
5.6.100.0100.07321.04
5.6.90.0070.04321.13
5.6.80.0130.07720.48
5.5.350.0230.05020.54
5.5.340.0070.03718.07
5.5.330.0130.07720.41
5.5.320.5100.03020.27
5.5.310.0300.06720.27
5.5.300.0070.08018.02
5.5.290.0070.07718.02
5.5.280.0030.09020.73
5.5.270.0130.05720.93
5.5.260.0070.08320.76
5.5.250.0000.06020.81
5.5.240.4230.03720.24
5.4.450.0000.05019.55
5.4.440.0370.04719.45
5.4.430.0170.04319.45
5.4.420.0270.04319.47
5.4.410.0270.04019.51
5.4.400.0300.03719.03
5.4.390.0300.04719.13
5.4.380.0370.05318.67
5.4.370.0300.06018.87
5.4.360.0230.06018.53
5.4.350.0300.05018.87
5.4.340.0370.06018.84
5.4.320.0070.03612.66
5.4.310.0100.03512.65
5.4.300.0070.04012.66
5.4.290.0040.04112.65
5.4.280.0050.04212.55
5.4.270.0100.04712.55
5.4.260.0090.04412.55
5.4.250.0050.03912.55
5.4.240.0060.03612.55
5.4.230.0040.04012.54
5.4.220.0040.03812.55
5.4.210.0070.03512.54
5.4.200.0050.03812.54
5.4.190.0080.03512.54
5.4.180.0050.03712.54
5.4.170.0060.03512.55
5.4.160.0050.03712.54
5.4.150.0080.03412.55
5.4.140.0030.03912.22
5.4.130.0030.03712.21
5.4.120.0040.03612.17
5.4.110.0060.03512.17
5.4.100.0040.03712.17
5.4.90.0050.03812.16
5.4.80.0070.04012.17
5.4.70.0070.03312.16
5.4.60.0050.03512.16
5.4.50.0070.03412.16
5.4.40.0070.03312.15
5.4.30.0050.03612.15
5.4.20.0040.03612.14
5.4.10.0040.04112.15
5.4.00.0050.03711.63
5.3.290.0090.03712.91
5.3.280.0080.03612.84
5.3.270.0100.03612.85
5.3.260.0040.04112.85
5.3.250.0050.03712.85
5.3.240.0060.03612.86
5.3.230.0080.03512.84
5.3.220.0050.03712.82
5.3.210.0070.03712.81
5.3.200.0050.03712.82
5.3.190.0050.03812.81
5.3.180.0050.03612.81
5.3.170.0060.03512.82
5.3.160.0060.03612.81
5.3.150.0050.03812.82
5.3.140.0050.05112.80
5.3.130.0140.04812.80
5.3.120.0060.03912.80
5.3.110.0060.03712.79
5.3.100.0060.03612.29
5.3.90.0080.03312.27
5.3.80.0050.03712.26
5.3.70.0070.03612.25
5.3.60.0050.04312.24
5.3.50.0050.03712.18
5.3.40.0060.03712.18
5.3.30.0050.04012.15
5.3.20.0060.03511.93
5.3.10.0040.03611.89
5.3.00.0050.03611.88
5.2.170.0090.0299.39
5.2.160.0050.0299.39
5.2.150.0070.0279.39
5.2.140.0110.0239.38
5.2.130.0060.0279.35
5.2.120.0060.0279.34
5.2.110.0040.0299.35
5.2.100.0030.0299.34
5.2.90.0060.0279.35
5.2.80.0070.0289.34
5.2.70.0030.0319.34
5.2.60.0040.0309.30
5.2.50.0050.0299.27
5.2.40.0040.0299.25
5.2.30.0050.0309.21
5.2.20.0050.0299.20
5.2.10.0070.0259.10
5.2.00.0050.0288.96
5.1.60.0040.0238.25
5.1.50.0040.0248.25
5.1.40.0030.0258.22
5.1.30.0050.0258.57
5.1.20.0030.0288.59
5.1.10.0030.0278.32
5.1.00.0040.0258.33
5.0.50.0040.0206.80
5.0.40.0030.0206.67
5.0.30.0020.0316.49
5.0.20.0010.0216.45
5.0.10.0030.0226.43
5.0.00.0020.0316.43
4.4.90.0030.0154.78
4.4.80.0030.0154.76
4.4.70.0030.0154.75
4.4.60.0010.0174.76
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0050.0134.76
4.4.20.0020.0164.84
4.4.10.0040.0144.85
4.4.00.0030.0244.76
4.3.110.0020.0164.67
4.3.100.0020.0154.66
4.3.90.0040.0134.64
4.3.80.0030.0234.59
4.3.70.0020.0154.63
4.3.60.0020.0144.63
4.3.50.0010.0164.62
4.3.40.0070.0204.54
4.3.30.0020.0163.30
4.3.20.0020.0163.28
4.3.10.0040.0133.24
4.3.00.0070.01315.97

preferences:
43.22 ms | 401 KiB | 5 Q