3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parse_attributes($input) { $dom = new DomDocument(); $dom->loadHtml($input); $attributes = array(); foreach ($dom->documentElement->attributes as $name => $attr) { $attributes[$name] = $node->value; } return $attributes; } $content = '<iframe 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"></iframe>'; $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.0160.00616.75
8.3.50.0230.00622.90
8.3.40.0070.00718.91
8.3.30.0030.01419.21
8.3.20.0070.00020.34
8.3.10.0030.00523.96
8.3.00.0080.00017.75
8.2.180.0040.01116.88
8.2.170.0110.00422.96
8.2.160.0140.00020.52
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00021.07
8.2.110.0070.00321.19
8.2.100.0080.00417.97
8.2.90.0000.00818.09
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0000.00818.16
8.2.50.0060.00318.07
8.2.40.0080.00018.28
8.2.30.0020.00518.43
8.2.20.0060.00317.77
8.2.10.0000.00718.37
8.2.00.0050.00317.89
8.1.280.0100.01025.92
8.1.270.0060.00324.08
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0070.00322.78
8.1.230.0080.00420.91
8.1.220.0000.00817.91
8.1.210.0080.00019.12
8.1.200.0070.00417.47
8.1.190.0060.00317.35
8.1.180.0030.00618.10
8.1.170.0030.00618.89
8.1.160.0040.00422.32
8.1.150.0000.00819.05
8.1.140.0000.00717.73
8.1.130.0000.00718.09
8.1.120.0000.00717.69
8.1.110.0030.00517.59
8.1.100.0030.00717.70
8.1.90.0050.00317.61
8.1.80.0040.00417.67
8.1.70.0030.00317.67
8.1.60.0040.00417.72
8.1.50.0000.00817.84
8.1.40.0060.00317.65
8.1.30.0000.00817.84
8.1.20.0030.00517.84
8.1.10.0000.00817.81
8.1.00.0030.00517.75
8.0.300.0070.00020.18
8.0.290.0020.00517.00
8.0.280.0030.00318.75
8.0.270.0070.00017.02
8.0.260.0030.00317.52
8.0.250.0070.00017.14
8.0.240.0030.00317.11
8.0.230.0030.00317.15
8.0.220.0030.00317.11
8.0.210.0030.00317.02
8.0.200.0000.00717.19
8.0.190.0040.00417.05
8.0.180.0000.00717.15
8.0.170.0050.00317.14
8.0.160.0000.00817.05
8.0.150.0030.00517.12
8.0.140.0040.00416.95
8.0.130.0030.00313.48
8.0.120.0070.00017.10
8.0.110.0070.00017.07
8.0.100.0000.00816.95
8.0.90.0000.00717.12
8.0.80.0160.00317.05
8.0.70.0040.00417.04
8.0.60.0040.00416.99
8.0.50.0040.00416.89
8.0.30.0110.01017.31
8.0.20.0140.00517.47
8.0.10.0000.00716.98
8.0.00.0090.00817.13
7.4.330.0050.00015.32
7.4.320.0030.00316.73
7.4.300.0060.00016.71
7.4.290.0040.00416.85
7.4.280.0050.00316.75
7.4.270.0040.00416.89
7.4.260.0040.00416.73
7.4.250.0040.00416.69
7.4.240.0020.00516.88
7.4.230.0050.00316.75
7.4.220.0060.01216.73
7.4.210.0130.00316.90
7.4.200.0070.00016.84
7.4.160.0140.00316.75
7.4.150.0060.01017.40
7.4.140.0100.01017.86
7.4.130.0140.01016.77
7.4.120.0090.01116.75
7.4.110.0150.00616.57
7.4.100.0100.00716.70
7.4.90.0120.00616.81
7.4.80.0090.00919.39
7.4.70.0140.00416.73
7.4.60.0100.00616.55
7.4.50.0080.00016.75
7.4.40.0060.00916.67
7.4.30.0080.00816.90
7.4.00.0090.00615.04
7.3.330.0050.00013.42
7.3.320.0050.00013.45
7.3.310.0000.00716.47
7.3.300.0030.00316.33
7.3.290.0090.01016.57
7.3.280.0140.00216.44
7.3.270.0080.01117.40
7.3.260.0140.00416.50
7.3.250.0090.00816.70
7.3.240.0110.00816.55
7.3.230.0160.00016.76
7.3.210.0130.00316.76
7.3.200.0080.00819.39
7.3.190.0090.00916.88
7.3.180.0090.00616.71
7.3.170.0060.00916.62
7.3.160.0150.00616.58
7.2.330.0110.00716.52
7.2.320.0140.01016.54
7.2.310.0050.01016.57
7.2.300.0030.01416.94
7.2.290.0080.00816.56
7.2.00.0030.01019.69
7.1.200.0030.01016.00
7.1.100.0100.00318.52
7.1.70.0030.00717.16
7.1.60.0140.01119.40
7.1.50.0130.01316.77
7.1.00.0030.07722.61
7.0.200.0040.00816.93
7.0.140.0030.07322.04
7.0.60.0030.08020.11
7.0.50.0070.08017.95
7.0.40.0100.08720.30
7.0.30.0170.04320.26
7.0.20.0400.04320.34
7.0.10.0070.04320.13
7.0.00.0070.08720.29
5.6.280.0100.06320.98
5.6.210.0070.08320.59
5.6.200.0070.08718.26
5.6.190.0100.04720.48
5.6.180.3130.04720.74
5.6.170.0230.04320.55
5.6.160.0030.09020.64
5.6.150.0070.07318.29
5.6.140.0030.08318.37
5.6.130.0070.07018.29
5.6.120.0070.05721.04
5.6.110.0070.04021.02
5.6.100.0130.07721.16
5.6.90.0070.08321.02
5.6.80.0100.07720.56
5.6.70.4500.03720.45
5.5.350.0200.08020.50
5.5.340.0100.06318.11
5.5.330.0100.04020.36
5.5.320.3830.04020.29
5.5.310.0400.07320.35
5.5.300.0100.05718.04
5.5.290.0070.05018.02
5.5.280.0030.05720.85
5.5.270.0030.04320.91
5.5.260.0130.07320.79
5.5.250.0100.07720.84
5.5.240.0200.03720.33
5.4.450.0500.04719.66
5.4.440.0470.03719.46
5.4.430.0400.04019.47
5.4.420.0170.04719.64
5.4.410.0530.03719.48
5.4.400.0230.04019.16
5.4.390.0200.04319.32
5.4.380.0400.04718.81
5.4.370.0400.04318.91
5.4.360.0370.05018.70
5.4.350.0400.05018.71
5.4.340.0430.04718.70
5.4.320.0060.03512.64
5.4.310.0060.04712.63
5.4.300.0090.03912.64
5.4.290.0030.04112.64
5.4.280.0040.03712.54
5.4.270.0090.03212.54
5.4.260.0060.03912.54
5.4.250.0080.03412.54
5.4.240.0100.03012.54
5.4.230.0080.03412.53
5.4.220.0050.03512.53
5.4.210.0080.03712.53
5.4.200.0060.03712.53
5.4.190.0090.03812.52
5.4.180.0030.04212.52
5.4.170.0060.03512.54
5.4.160.0060.04612.53
5.4.150.0050.03912.52
5.4.140.0070.03512.21
5.4.130.0060.03812.20
5.4.120.0080.03612.16
5.4.110.0050.03612.16
5.4.100.0030.03912.16
5.4.90.0040.03912.16
5.4.80.0030.04212.15
5.4.70.0080.04512.15
5.4.60.0050.03412.15
5.4.50.0060.03412.14
5.4.40.0050.04812.13
5.4.30.0060.03512.13
5.4.20.0060.03512.13
5.4.10.0060.03312.13
5.4.00.0060.03511.62
5.3.290.0050.03912.90
5.3.280.0090.03412.82
5.3.270.0090.03612.84
5.3.260.0080.04212.84
5.3.250.0030.03912.84
5.3.240.0070.03612.84
5.3.230.0060.03812.83
5.3.220.0040.03812.80
5.3.210.0060.04312.80
5.3.200.0060.03512.80
5.3.190.0070.03612.80
5.3.180.0080.04312.79
5.3.170.0070.03812.79
5.3.160.0070.03812.80
5.3.150.0040.03912.80
5.3.140.0060.04012.79
5.3.130.0120.03912.78
5.3.120.0030.04212.78
5.3.110.0040.04712.78
5.3.100.0090.03312.27
5.3.90.0060.03512.25
5.3.80.0040.03712.24
5.3.70.0080.03312.24
5.3.60.0040.03912.22
5.3.50.0080.03312.16
5.3.40.0050.03612.17
5.3.30.0070.03212.13
5.3.20.0080.03411.91
5.3.10.0050.03911.88
5.3.00.0060.04011.86
5.2.170.0050.0299.37
5.2.160.0070.0269.37
5.2.150.0060.0299.37
5.2.140.0040.0309.37
5.2.130.0030.0309.32
5.2.120.0060.0269.32
5.2.110.0080.0259.33
5.2.100.0060.0279.33
5.2.90.0030.0309.32
5.2.80.0050.0369.32
5.2.70.0040.0329.32
5.2.60.0030.0319.29
5.2.50.0060.0279.25
5.2.40.0030.0299.23
5.2.30.0050.0369.20
5.2.20.0060.0299.19
5.2.10.0040.0289.09
5.2.00.0040.0298.95
5.1.60.0030.0268.24
5.1.50.0070.0248.23
5.1.40.0050.0298.21
5.1.30.0060.0248.57
5.1.20.0040.0308.58
5.1.10.0010.0288.31
5.1.00.0080.0268.31
5.0.50.0030.0226.79
5.0.40.0040.0206.66
5.0.30.0030.0326.48
5.0.20.0030.0196.44
5.0.10.0070.0236.42
5.0.00.0020.0316.41
4.4.90.0050.0154.78
4.4.80.0050.0194.75
4.4.70.0030.0154.75
4.4.60.0030.0224.75
4.4.50.0030.0154.77
4.4.40.0010.0274.71
4.4.30.0050.0134.76
4.4.20.0030.0154.84
4.4.10.0010.0174.85
4.4.00.0010.0264.76
4.3.110.0060.0124.67
4.3.100.0010.0164.66
4.3.90.0010.0164.63
4.3.80.0010.0264.58
4.3.70.0030.0134.63
4.3.60.0040.0174.63
4.3.50.0030.0184.63
4.3.40.0050.0324.54
4.3.30.0020.0153.30
4.3.20.0030.0143.27
4.3.10.0020.0163.24
4.3.00.0100.01015.97

preferences:
45.3 ms | 401 KiB | 5 Q