3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<a href="http://www.mydomain.com/galeria/thumbnails.php?album=774" target="_blank"><img alt="/" src="http://img255.imageshack.us/img00/000/000001.png" height="133" width="113"></a>'; $doc = new DOMDocument; $doc->loadHTML( $html); $results = array(); foreach( $doc->getElementsByTagName( 'a') as $a) { // If there are no children, continue on if( !$a->hasChildNodes()) continue; // Find the child <img> tag, if it exists foreach( $a->childNodes as $child) { if( $child->nodeType == XML_ELEMENT_NODE && $child->tagName == 'img') { // Now we have the <a> tag in $a and the <img> tag in $child // Get the information we need: parse_str( parse_url( $a->getAttribute('href'), PHP_URL_QUERY), $a_params); $results[] = array( $a_params['album'], $child->getAttribute('src')); } } } print_r( $results);

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.0200.00018.81
8.3.50.0220.01122.18
8.3.40.0150.00318.81
8.3.30.0090.00619.33
8.3.20.0020.00520.64
8.3.10.0040.00422.34
8.3.00.0000.00822.55
8.2.180.0040.01125.92
8.2.170.0070.00719.09
8.2.160.0030.01022.96
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00420.20
8.2.110.0070.00322.31
8.2.100.0140.00419.55
8.2.90.0030.00518.41
8.2.80.0000.00819.41
8.2.70.0080.00317.75
8.2.60.0060.00318.18
8.2.50.0040.00418.07
8.2.40.0040.00418.46
8.2.30.0040.00718.41
8.2.20.0000.00817.83
8.2.10.0070.00017.89
8.2.00.0050.00317.86
8.1.280.0000.01425.92
8.1.270.0030.00724.06
8.1.260.0080.00026.35
8.1.250.0030.01428.09
8.1.240.0110.00024.06
8.1.230.0070.00322.36
8.1.220.0000.00818.01
8.1.210.0000.00818.77
8.1.200.0060.00317.48
8.1.190.0040.00417.76
8.1.180.0120.00018.10
8.1.170.0060.00318.90
8.1.160.0040.00422.23
8.1.150.0080.00020.58
8.1.140.0060.00317.59
8.1.130.0000.00718.17
8.1.120.0040.00417.72
8.1.110.0030.00417.53
8.1.100.0000.00817.77
8.1.90.0000.00717.58
8.1.80.0000.00717.67
8.1.70.0040.00417.59
8.1.60.0030.00617.73
8.1.50.0040.00417.65
8.1.40.0000.00917.74
8.1.30.0030.00617.83
8.1.20.0000.00817.73
8.1.10.0040.00417.80
8.1.00.0080.00017.65
8.0.300.0000.00718.77
8.0.290.0030.00617.43
8.0.280.0080.00018.52
8.0.270.0000.00717.39
8.0.260.0070.00317.04
8.0.250.0000.00717.18
8.0.240.0000.00817.08
8.0.230.0020.00517.15
8.0.220.0040.00417.12
8.0.210.0040.00417.13
8.0.200.0000.00717.04
8.0.190.0040.00417.03
8.0.180.0080.00017.07
8.0.170.0000.00717.07
8.0.160.0000.00817.04
8.0.150.0080.00016.96
8.0.140.0000.00717.02
8.0.130.0000.00513.53
8.0.120.0080.00016.94
8.0.110.0000.00717.10
8.0.100.0050.00217.13
8.0.90.0040.00417.10
8.0.80.0120.00317.11
8.0.70.0040.00417.04
8.0.60.0000.00817.09
8.0.50.0050.00317.02
8.0.30.0110.00817.53
8.0.20.0110.00917.40
8.0.10.0000.00717.29
8.0.00.0100.01117.04
7.4.330.0030.00315.21
7.4.320.0030.00316.73
7.4.300.0030.00316.79
7.4.290.0040.00416.90
7.4.280.0000.00616.78
7.4.270.0030.00316.60
7.4.260.0030.00316.78
7.4.250.0000.00816.69
7.4.240.0040.00416.68
7.4.230.0000.00716.60
7.4.220.0080.00816.61
7.4.210.0100.00516.66
7.4.200.0040.00416.60
7.4.190.0000.00716.88
7.4.160.0030.01316.87
7.4.150.0170.00017.40
7.4.140.0110.00717.86
7.4.130.0080.01316.77
7.4.120.0060.01116.72
7.4.110.0120.00616.72
7.4.100.0160.00316.48
7.4.90.0070.01016.60
7.4.80.0110.00816.67
7.4.70.0120.00916.85
7.4.60.0040.01416.59
7.4.50.0030.00316.66
7.4.40.0110.00422.77
7.4.30.0030.01316.86
7.4.00.0070.00414.97
7.3.330.0000.00513.20
7.3.320.0030.00313.23
7.3.310.0030.00316.49
7.3.300.0000.00716.46
7.3.290.0110.00316.43
7.3.280.0090.00616.35
7.3.270.0160.00017.40
7.3.260.0070.01116.46
7.3.250.0140.00516.66
7.3.240.0120.01216.68
7.3.230.0130.00316.39
7.3.210.0120.00816.50
7.3.200.0070.01519.39
7.3.190.0120.00616.74
7.3.180.0100.00716.73
7.3.170.0100.00616.60
7.3.160.0130.01016.61
7.3.120.0030.01214.94
7.3.110.0040.01414.89
7.3.100.0070.01014.83
7.3.90.0060.00614.95
7.3.80.0080.00415.00
7.3.70.0070.01114.83
7.3.60.0000.01814.79
7.3.50.0100.00714.96
7.3.40.0080.00814.94
7.3.30.0120.00314.93
7.3.20.0040.00716.57
7.3.10.0040.01216.81
7.3.00.0040.01116.61
7.2.330.0090.00916.91
7.2.320.0050.01817.04
7.2.310.0060.00917.03
7.2.300.0100.00716.77
7.2.290.0170.00016.77
7.2.240.0040.00815.33
7.2.230.0040.00714.84
7.2.220.0050.00514.88
7.2.210.0080.00814.77
7.2.200.0040.00814.82
7.2.190.0120.00315.28
7.2.180.0030.01415.05
7.2.170.0070.01015.14
7.2.160.0040.01115.05
7.2.150.0110.00717.15
7.2.140.0040.00716.72
7.2.130.0040.00817.02
7.2.120.0000.01316.72
7.2.110.0070.00716.98
7.2.100.0070.01016.93
7.2.90.0100.00017.12
7.2.80.0060.00917.15
7.2.70.0030.01317.07
7.2.60.0050.01016.91
7.2.50.0040.00717.16
7.2.40.0060.01017.25
7.2.30.0090.00316.93
7.2.20.0070.00716.93
7.2.10.0030.01017.25
7.2.00.0050.00818.32
7.1.330.0060.01115.89
7.1.320.0040.01115.85
7.1.310.0090.00615.99
7.1.300.0040.00715.67
7.1.290.0000.01415.92
7.1.280.0000.01115.92
7.1.270.0040.01115.75
7.1.260.0040.01115.81
7.1.250.0070.00715.65
7.1.200.0060.00616.01
7.1.100.0000.01617.85
7.1.70.0000.00917.04
7.1.60.0100.01319.82
7.1.50.0000.02016.59
7.1.00.0070.07322.55
7.0.200.0000.00915.28
7.0.140.0070.07022.07
7.0.100.0100.04319.96
7.0.90.0030.05719.93
7.0.80.0070.07719.95
7.0.70.0000.05019.97
7.0.60.0100.07719.99
7.0.50.0200.06320.39
7.0.40.0100.04720.11
7.0.30.0070.05720.18
7.0.20.0100.08020.09
7.0.10.0070.07720.21
7.0.00.0130.04020.03
5.6.280.0070.07021.13
5.6.250.0100.08020.66
5.6.240.0070.05020.83
5.6.230.0070.06020.72
5.6.220.0170.07320.65
5.6.210.0070.05320.69
5.6.200.0200.09021.19
5.6.190.0100.04321.07
5.6.180.0130.06021.20
5.6.170.0070.08021.13
5.6.160.0100.06321.22
5.6.150.0070.05021.16
5.6.140.0100.05021.21
5.6.130.0030.05021.14
5.6.120.0000.08021.09
5.6.110.0030.08021.16
5.6.100.0070.03721.05
5.6.90.0100.05320.96
5.6.80.0100.05020.54
5.6.70.0030.08720.46
5.6.60.0130.06020.49
5.6.50.0100.05720.38
5.6.40.0070.03720.32
5.6.30.0000.04720.36
5.6.20.0030.04020.40
5.6.10.0100.03020.44
5.6.00.0000.04720.43
5.5.380.0130.06020.41
5.5.370.0070.04720.52
5.5.360.0170.06320.41
5.5.350.0100.08720.41
5.5.340.0100.06020.95
5.5.330.0100.08020.98
5.5.320.0000.08720.87
5.5.310.0030.08720.95
5.5.300.0000.09320.98
5.5.290.0030.05320.66
5.5.280.0130.07720.91
5.5.270.0100.03320.92
5.5.260.0000.05320.68
5.5.250.0170.07020.79
5.5.240.0070.07320.26
5.5.230.0000.04720.22
5.5.220.0100.08020.36
5.5.210.0100.05720.26
5.5.200.0070.03720.23
5.5.190.0000.04320.33
5.5.180.0070.04320.33
5.5.160.0030.04020.03
5.5.150.0030.03720.26
5.5.140.0070.03720.20
5.5.130.0030.04020.29
5.5.120.0030.04320.32
5.5.110.0030.03720.12
5.5.100.0030.04020.22
5.5.90.0070.04020.11
5.5.80.0100.03020.19
5.5.70.0000.04320.11
5.5.60.0200.02720.20
5.5.50.0030.04020.14
5.5.40.0030.04020.14
5.5.30.0070.03320.13
5.5.20.0000.04320.15
5.5.10.0070.03720.09
5.5.00.0100.03020.09
5.4.450.0130.05319.53
5.4.440.0070.09019.50
5.4.430.0070.08019.57
5.4.420.0070.04719.53
5.4.410.0070.06319.29
5.4.400.0030.03719.30
5.4.390.0100.05319.23
5.4.380.0100.06318.97
5.4.370.0030.04018.96
5.4.360.0100.03719.20
5.4.350.0030.04019.01
5.4.340.0030.04019.07
5.4.320.0130.03018.94
5.4.310.0000.04019.23
5.4.300.0030.03719.01
5.4.290.0030.03719.27
5.4.280.0030.04019.17
5.4.270.0070.03719.19
5.4.260.0070.03718.96
5.4.250.0000.04019.18
5.4.240.0000.04019.22
5.4.230.0000.04319.15
5.4.220.0030.04019.01
5.4.210.0030.03719.18
5.4.200.0170.02719.16
5.4.190.0030.05719.20
5.4.180.0030.04019.09
5.4.170.0000.03719.28
5.4.160.0000.04319.17
5.4.150.0100.03718.93
5.4.140.0030.03716.49
5.4.130.0070.03316.57
5.4.120.0030.03716.39
5.4.110.0030.03716.59
5.4.100.0030.03716.63
5.4.90.0100.02716.51
5.4.80.0000.04016.49
5.4.70.0070.03316.49
5.4.60.0070.02716.61
5.4.50.0070.03716.57
5.4.40.0070.02716.61
5.4.30.0030.03016.54
5.4.20.0070.02716.52
5.4.10.0000.03316.55
5.4.00.0030.03716.01
5.3.290.0070.04014.73
5.3.280.0170.02714.69
5.3.270.0100.03314.61
5.3.260.0000.04014.76
5.3.250.0030.03714.75
5.3.240.0000.04014.81
5.3.230.0070.03714.59
5.3.220.0070.03314.80
5.3.210.0100.03014.63
5.3.200.0000.04314.57
5.3.190.0070.02714.75
5.3.180.0030.03314.55
5.3.170.0070.02714.71
5.3.160.0030.04014.71
5.3.150.0000.04014.64
5.3.140.0000.04014.68
5.3.130.0030.03714.56
5.3.120.0030.03714.55
5.3.110.0030.04714.57
5.3.100.0000.04014.16
5.3.90.0100.05014.04
5.3.80.0030.03714.06
5.3.70.0070.03014.01
5.3.60.0000.04014.05
5.3.50.0030.03713.95
5.3.40.0070.07714.10
5.3.30.0000.06014.01
5.3.20.0030.06013.84
5.3.10.0130.06713.77
5.3.00.0070.06013.59
5.2.170.0030.06011.26
5.2.160.0070.06311.29
5.2.150.0030.06311.26
5.2.140.0070.06011.20
5.2.130.0070.05711.27
5.2.120.0030.06011.25
5.2.110.0030.06311.06
5.2.100.0170.04711.09
5.2.90.0100.05711.24
5.2.80.0100.04711.15
5.2.70.0070.05011.08
5.2.60.0030.03011.14
5.2.50.0070.06010.97
5.2.40.0070.02711.12
5.2.30.0070.05311.02
5.2.20.0030.03711.08
5.2.10.0030.05311.00
5.2.00.0070.05310.84
5.1.60.0030.02710.09
5.1.50.0030.06310.05
5.1.40.0000.04710.09
5.1.30.0030.05710.43
5.1.20.0030.05710.46
5.1.10.0000.05310.21
5.1.00.0030.03710.10
5.0.50.0030.0408.52
5.0.40.0030.0438.47
5.0.30.0030.0538.37
5.0.20.0000.0478.27
5.0.10.0070.0438.30
5.0.00.0030.0638.13
4.4.90.0070.0178.07
4.4.80.0030.0208.07
4.4.70.0000.0338.07
4.4.60.0070.0278.07
4.4.50.0000.0278.07
4.4.40.0030.0238.07
4.4.30.0070.0238.07
4.4.20.0000.0308.07
4.4.10.0000.0378.07
4.4.00.0000.0578.07
4.3.110.0000.0378.07
4.3.100.0000.0208.07
4.3.90.0000.0238.07
4.3.80.0030.0378.07
4.3.70.0030.0378.07
4.3.60.0100.0278.07
4.3.50.0070.0308.07
4.3.40.0000.0538.07
4.3.30.0000.0378.07
4.3.20.0070.0338.07
4.3.10.0030.0278.07
4.3.00.0000.0378.07

preferences:
39.52 ms | 401 KiB | 5 Q