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 = '<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.0110.01116.96
8.3.50.0190.00623.00
8.3.40.0150.00019.04
8.3.30.0140.00719.34
8.3.20.0080.00020.57
8.3.10.0080.00023.66
8.3.00.0060.00317.88
8.2.180.0110.00716.75
8.2.170.0150.00022.96
8.2.160.0130.00020.59
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.01126.16
8.2.120.0040.00421.26
8.2.110.0030.00622.33
8.2.100.0090.00619.82
8.2.90.0030.00519.47
8.2.80.0050.00317.97
8.2.70.0030.00617.88
8.2.60.0040.00418.18
8.2.50.0090.00018.07
8.2.40.0080.00018.41
8.2.30.0040.00418.42
8.2.20.0080.00018.13
8.2.10.0000.00818.54
8.2.00.0040.00418.05
8.1.280.0060.00925.92
8.1.270.0040.00424.06
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0040.00423.94
8.1.230.0000.01119.41
8.1.220.0030.00517.91
8.1.210.0000.00818.77
8.1.200.0060.00317.38
8.1.190.0080.00017.35
8.1.180.0050.00318.10
8.1.170.0050.00318.75
8.1.160.0000.00722.29
8.1.150.0040.00419.31
8.1.140.0000.00717.79
8.1.130.0040.00418.00
8.1.120.0040.00317.70
8.1.110.0040.00417.65
8.1.100.0030.00617.53
8.1.90.0030.00317.69
8.1.80.0040.00417.73
8.1.70.0000.00717.60
8.1.60.0050.00517.79
8.1.50.0030.00517.79
8.1.40.0050.00317.78
8.1.30.0030.00617.84
8.1.20.0050.00317.91
8.1.10.0000.00717.75
8.1.00.0000.00817.70
8.0.300.0040.00418.77
8.0.290.0000.00717.13
8.0.280.0070.00018.69
8.0.270.0000.00717.42
8.0.260.0030.00317.48
8.0.250.0000.00717.20
8.0.240.0070.00017.23
8.0.230.0000.00717.27
8.0.220.0000.00717.18
8.0.210.0050.00217.20
8.0.200.0060.00017.19
8.0.190.0000.00717.23
8.0.180.0000.00717.15
8.0.170.0050.00317.20
8.0.160.0040.00417.13
8.0.150.0000.00717.07
8.0.140.0000.00817.13
8.0.130.0050.00013.66
8.0.120.0000.00717.13
8.0.110.0040.00417.12
8.0.100.0070.00017.17
8.0.90.0050.00317.32
8.0.80.0060.00917.12
8.0.70.0000.00817.05
8.0.60.0040.00417.18
8.0.50.0070.00016.94
8.0.30.0130.01017.21
8.0.20.0110.00817.53
8.0.10.0000.00817.25
8.0.00.0130.00417.11
7.4.330.0030.00315.36
7.4.320.0030.00316.73
7.4.300.0020.00516.83
7.4.290.0060.00316.81
7.4.280.0040.00416.61
7.4.270.0040.00416.71
7.4.260.0000.00716.61
7.4.250.0050.00316.58
7.4.240.0020.00516.67
7.4.230.0040.00416.61
7.4.220.0060.01216.84
7.4.210.0040.01116.80
7.4.200.0040.00416.96
7.4.160.0060.00916.85
7.4.150.0150.00317.40
7.4.140.0130.00517.86
7.4.130.0150.00316.76
7.4.120.0110.00716.66
7.4.110.0060.01316.91
7.4.100.0100.00716.98
7.4.90.0150.00416.80
7.4.80.0030.01519.39
7.4.70.0030.02116.75
7.4.60.0140.00316.78
7.4.50.0000.00816.70
7.4.40.0090.00616.49
7.4.30.0060.00916.84
7.4.00.0090.00314.79
7.3.330.0050.00013.43
7.3.320.0030.00313.56
7.3.310.0000.00616.61
7.3.300.0080.00016.65
7.3.290.0040.01216.57
7.3.280.0090.00716.60
7.3.270.0080.00817.40
7.3.260.0140.00316.65
7.3.250.0100.00816.54
7.3.240.0100.01316.78
7.3.230.0100.00616.73
7.3.210.0110.00516.74
7.3.200.0000.01819.39
7.3.190.0150.00916.63
7.3.180.0090.00616.62
7.3.170.0100.00716.64
7.3.160.0060.01216.88
7.2.330.0220.00916.64
7.2.320.0130.01116.75
7.2.310.0150.00317.00
7.2.300.0090.00916.92
7.2.290.0140.00416.89
7.2.60.0040.01117.07
7.1.200.0000.00715.75
7.1.100.0000.01118.16
7.1.70.0030.00517.08
7.1.60.0070.01319.40
7.1.50.0030.02117.16
7.1.00.0070.07322.47
7.0.200.0070.00416.99
7.0.140.0000.07722.13
7.0.60.0070.04720.10
7.0.50.0030.07017.96
7.0.40.0100.06720.48
7.0.30.0500.07020.41
7.0.20.0270.05720.29
7.0.10.0070.07720.31
7.0.00.0100.08720.22
5.6.280.0030.09720.95
5.6.210.0170.07720.70
5.6.200.0000.04318.26
5.6.190.0000.07720.75
5.6.180.0270.04720.55
5.6.170.0130.04320.59
5.6.160.0070.03720.61
5.6.150.0070.03718.27
5.6.140.0070.05318.23
5.6.130.0100.06718.43
5.6.120.0000.06021.05
5.6.110.0200.06720.94
5.6.100.0030.09020.93
5.6.90.0130.08321.13
5.6.80.0170.06020.43
5.6.70.3270.03320.53
5.5.350.0130.07720.48
5.5.340.0100.08018.23
5.5.330.0170.07720.43
5.5.320.0270.05320.43
5.5.310.0370.05720.48
5.5.300.0030.08718.23
5.5.290.0070.08318.11
5.5.280.0000.04720.96
5.5.270.0030.04020.91
5.5.260.0230.06720.96
5.5.250.0030.04020.60
5.5.240.0100.02720.31
5.4.450.0500.03319.65
5.4.440.0230.04719.54
5.4.430.0270.04319.44
5.4.420.0930.03319.48
5.4.410.0270.03719.17
5.4.400.0300.02019.00
5.4.390.0400.05319.23
5.4.380.0970.07018.78
5.4.370.0770.06018.83
5.4.360.1270.04718.61
5.4.350.1030.05018.86
5.4.340.1170.03318.89
5.4.320.0040.03912.66
5.4.310.0080.03412.66
5.4.300.0040.03812.66
5.4.290.0060.03912.66
5.4.280.0050.03912.56
5.4.270.0070.03712.55
5.4.260.0090.03512.55
5.4.250.0040.04212.55
5.4.240.0040.03912.55
5.4.230.0090.03512.55
5.4.220.0060.03612.55
5.4.210.0050.03712.54
5.4.200.0050.03912.55
5.4.190.0050.03912.55
5.4.180.0030.03912.54
5.4.170.0070.03512.56
5.4.160.0050.03812.55
5.4.150.0060.03412.55
5.4.140.0060.03512.23
5.4.130.0030.03712.22
5.4.120.0040.03612.18
5.4.110.0030.03712.17
5.4.100.0070.03312.18
5.4.90.0050.03712.17
5.4.80.0030.03912.17
5.4.70.0040.03612.17
5.4.60.0050.03612.17
5.4.50.0020.03812.16
5.4.40.0060.03312.15
5.4.30.0080.03312.15
5.4.20.0080.03212.14
5.4.10.0050.03512.15
5.4.00.0040.03811.64
5.3.290.0090.03712.91
5.3.280.0060.03912.84
5.3.270.0080.03612.86
5.3.260.0050.03912.86
5.3.250.0050.04012.86
5.3.240.0080.03512.86
5.3.230.0080.03512.85
5.3.220.0050.03712.82
5.3.210.0050.04412.82
5.3.200.0040.03812.82
5.3.190.0100.03912.82
5.3.180.0080.03612.82
5.3.170.0060.04512.82
5.3.160.0100.03312.82
5.3.150.0060.04312.81
5.3.140.0070.03712.81
5.3.130.0070.04212.80
5.3.120.0020.04812.80
5.3.110.0060.03912.80
5.3.100.0060.03712.29
5.3.90.0030.03912.27
5.3.80.0060.03612.26
5.3.70.0080.03512.26
5.3.60.0080.03512.25
5.3.50.0060.03712.18
5.3.40.0070.04012.18
5.3.30.0020.03812.15
5.3.20.0080.03211.93
5.3.10.0040.03611.90
5.3.00.0030.03911.88
5.2.170.0040.0319.39
5.2.160.0040.0299.39
5.2.150.0040.0339.39
5.2.140.0060.0299.39
5.2.130.0050.0339.35
5.2.120.0040.0289.35
5.2.110.0060.0299.35
5.2.100.0060.0279.35
5.2.90.0050.0289.36
5.2.80.0040.0399.35
5.2.70.0030.0339.35
5.2.60.0040.0319.30
5.2.50.0080.0279.27
5.2.40.0040.0299.25
5.2.30.0040.0399.21
5.2.20.0050.0329.21
5.2.10.0050.0289.11
5.2.00.0050.0338.97
5.1.60.0050.0228.26
5.1.50.0050.0268.25
5.1.40.0040.0258.23
5.1.30.0040.0298.58
5.1.20.0030.0338.60
5.1.10.0020.0298.33
5.1.00.0040.0268.33
5.0.50.0050.0196.81
5.0.40.0070.0166.68
5.0.30.0030.0326.49
5.0.20.0020.0216.46
5.0.10.0050.0226.44
5.0.00.0030.0336.43
4.4.90.0020.0164.78
4.4.80.0040.0134.75
4.4.70.0050.0134.75
4.4.60.0020.0164.75
4.4.50.0020.0164.77
4.4.40.0050.0234.71
4.4.30.0040.0144.76
4.4.20.0050.0204.84
4.4.10.0030.0194.85
4.4.00.0030.0254.76
4.3.110.0030.0154.67
4.3.100.0040.0174.67
4.3.90.0030.0174.63
4.3.80.0020.0244.58
4.3.70.0010.0164.63
4.3.60.0010.0164.63
4.3.50.0030.0164.63
4.3.40.0020.0254.54
4.3.30.0020.0213.30
4.3.20.0020.0193.28
4.3.10.0030.0153.24
4.3.00.0070.01315.97

preferences:
47.16 ms | 401 KiB | 5 Q