3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Just compose the HTML sample */ $html='<html><head></head><body><table id="myTable">'; for($i=0;$i<100;$i++) { $html.="<tr><td>info{$i}.1</td><td>info{$i}.2</td><td>info{$i}.3</td></tr>"; } $html.="</table></body></html>"; $doc=new DOMDocument(); $doc->loadHTML($html); $xpath=new DOMXPath($doc); echo "<table>\n"; /* 10 is the row count */ for($i=0;$i<10;$i++) { echo "<tr>\n"; /* 10 is the column count */ foreach($xpath->query('//table[@id="myTable"]/tr[position()>'.($i*10).' and position()<'.(($i+1)*10+1).']') as $tr) { echo "\t<td>";// "\t" to make it look nice $tds=array(); foreach($tr->childNodes as $td) { if($td->nodeName!="td") continue; $tds[]=$td->firstChild->nodeValue; } echo implode("<br />",$tds); echo "</td>\n"; } echo "</tr>\n"; } echo "</table>";

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.0100.00718.93
8.3.50.0130.00522.30
8.3.40.0070.01319.47
8.3.30.0070.01019.47
8.3.20.0060.00320.80
8.3.10.0040.00423.98
8.3.00.0000.01019.63
8.2.180.0210.00018.82
8.2.170.0070.01022.96
8.2.160.0030.01322.53
8.2.150.0000.00924.18
8.2.140.0060.00324.66
8.2.130.0090.00026.16
8.2.120.0000.00922.72
8.2.110.0060.00621.53
8.2.100.0110.00418.63
8.2.90.0070.00719.72
8.2.80.0000.01118.13
8.2.70.0030.00718.25
8.2.60.0110.00018.66
8.2.50.0030.00618.13
8.2.40.0070.00318.84
8.2.30.0030.00618.71
8.2.20.0040.00418.35
8.2.10.0030.00718.54
8.2.00.0070.00318.20
8.1.280.0110.01125.92
8.1.270.0060.00323.99
8.1.260.0090.00026.35
8.1.250.0000.01028.09
8.1.240.0030.00722.60
8.1.230.0060.00618.14
8.1.220.0060.00318.28
8.1.210.0090.00018.77
8.1.200.0090.00318.00
8.1.190.0000.01017.73
8.1.180.0030.00618.10
8.1.170.0060.00319.11
8.1.160.0030.00622.52
8.1.150.0030.00619.27
8.1.140.0030.00618.05
8.1.130.0060.00318.43
8.1.120.0060.00317.95
8.1.110.0030.00617.95
8.1.100.0050.00518.00
8.1.90.0090.00017.95
8.1.80.0000.01018.03
8.1.70.0030.00617.91
8.1.60.0050.00518.14
8.1.50.0070.00317.93
8.1.40.0000.01018.11
8.1.30.0060.00318.07
8.1.20.0000.00918.22
8.1.10.0030.00718.06
8.1.00.0030.00618.09
8.0.300.0030.00618.77
8.0.290.0060.00317.13
8.0.280.0080.00018.98
8.0.270.0040.00417.30
8.0.260.0000.00817.79
8.0.250.0030.00517.54
8.0.240.0030.00617.51
8.0.230.0040.00417.45
8.0.220.0050.00317.33
8.0.210.0040.00417.50
8.0.200.0040.00417.56
8.0.190.0030.00617.38
8.0.180.0040.00417.50
8.0.170.0030.00617.44
8.0.160.0090.00017.44
8.0.150.0000.00817.36
8.0.140.0000.00917.41
8.0.130.0000.00813.80
8.0.120.0030.00617.32
8.0.110.0040.00417.39
8.0.100.0030.00617.38
8.0.90.0030.00617.41
8.0.80.0120.00617.46
8.0.70.0040.00417.24
8.0.60.0000.00917.43
8.0.50.0040.00417.34
8.0.30.0160.00817.60
8.0.20.0100.01317.62
8.0.10.0060.00317.37
8.0.00.0110.01417.44
7.4.330.0000.00615.53
7.4.320.0090.00016.99
7.4.300.0040.00416.98
7.4.290.0030.00617.09
7.4.280.0030.00617.09
7.4.270.0030.00617.16
7.4.260.0000.00917.15
7.4.250.0030.00716.97
7.4.240.0030.00517.13
7.4.230.0080.00017.00
7.4.220.0130.01017.18
7.4.210.0080.01317.17
7.4.200.0030.00616.96
7.4.190.0060.00317.10
7.4.160.0070.01117.13
7.4.150.0030.01717.40
7.4.140.0090.01217.86
7.4.130.0150.00617.05
7.4.120.0150.01017.12
7.4.110.0120.00817.26
7.4.100.0090.01217.00
7.4.90.0110.01117.04
7.4.80.0150.00619.39
7.4.70.0110.01116.91
7.4.60.0110.00817.16
7.4.50.0030.00617.07
7.4.40.0070.01022.77
7.4.30.0130.00617.18
7.4.00.0100.01015.33
7.3.330.0040.00413.75
7.3.320.0030.00313.57
7.3.310.0000.00916.85
7.3.300.0060.00316.92
7.3.290.0030.01316.88
7.3.280.0120.00816.91
7.3.270.0120.01617.40
7.3.260.0150.00717.14
7.3.250.0090.01417.16
7.3.240.0150.00917.15
7.3.230.0200.01016.81
7.3.210.0100.01017.14
7.3.200.0090.02319.39
7.3.190.0070.01816.84
7.3.180.0080.01217.13
7.3.170.0160.00817.10
7.3.160.0070.01616.79
7.3.120.0040.01615.12
7.3.10.0070.01017.02
7.3.00.0070.00717.13
7.2.330.0170.00617.08
7.2.320.0100.01917.21
7.2.310.0030.01617.04
7.2.300.0090.01217.22
7.2.290.0070.01417.26
7.2.130.0030.01017.14
7.2.120.0100.00717.34
7.2.110.0050.01117.09
7.2.100.0000.01417.16
7.2.90.0090.00617.31
7.2.80.0000.01717.28
7.2.70.0030.01417.18
7.2.60.0040.01217.12
7.2.50.0080.00817.20
7.2.40.0030.01017.32
7.2.30.0150.01317.93
7.2.20.0120.01517.57
7.2.10.0120.01817.78
7.2.00.0130.01217.85
7.1.250.0030.01215.88
7.1.200.0030.01315.96
7.1.150.0140.01717.35
7.1.140.0150.01917.42
7.1.130.0700.01917.14
7.1.120.0190.02017.34
7.1.110.0220.01816.30
7.1.100.0190.01416.34
7.1.90.0160.01416.27
7.1.80.0180.01616.02
7.1.70.0110.01116.61
7.1.60.0230.02126.49
7.1.50.0210.01825.17
7.1.40.0380.01932.91
7.1.30.0360.02233.07
7.1.20.0400.01832.99
7.1.10.0120.01914.99
7.1.00.1090.04719.00
7.0.270.0140.02316.97
7.0.260.0200.01616.86
7.0.250.0170.01616.24
7.0.240.0160.01915.83
7.0.230.0220.01415.79
7.0.220.0200.01816.16
7.0.210.0140.01515.07
7.0.200.0150.01415.29
7.0.190.0160.01615.30
7.0.180.0090.02314.84
7.0.170.0090.02014.90
7.0.160.0140.01714.85
7.0.150.0140.01614.76
7.0.140.0110.04118.58
7.0.130.0130.01915.13
7.0.120.0130.01615.20
7.0.110.0140.01915.06
7.0.100.0110.01814.85
7.0.90.0140.01514.91
7.0.80.0150.01814.91
7.0.70.0130.04718.45
7.0.60.0090.03618.40
7.0.50.0100.04618.70
7.0.40.0110.05117.72
7.0.30.0110.05117.68
7.0.20.0070.04717.70
7.0.10.0440.04917.65
7.0.00.0090.04517.56
5.6.300.0240.08421.06
5.6.290.0230.07520.97
5.6.280.0100.08221.20
5.6.270.0280.06921.08
5.6.260.0250.06921.21
5.6.250.0200.08221.16
5.6.240.0170.09321.19
5.6.230.0200.07921.05
5.6.220.0100.08221.09
5.6.210.0150.07921.03
5.6.200.0210.08021.23
5.6.190.0160.07821.16
5.6.180.0150.08521.21
5.6.170.0160.07721.11
5.6.160.0250.06821.14
5.6.150.0140.09121.21
5.6.140.0140.07821.09
5.6.130.0140.07821.19
5.6.120.0170.08021.20
5.6.110.0120.06321.10
5.6.100.0170.06921.19
5.6.90.0170.08021.11
5.6.80.0120.08320.61
5.6.70.0170.07420.51
5.6.60.0190.07320.55
5.6.50.0100.08420.54
5.6.40.0150.08220.61
5.6.30.0140.07120.47
5.6.20.0140.07620.56
5.6.10.0150.06820.43
5.6.00.0140.07120.48
5.5.380.0220.07417.89
5.5.370.0150.08417.68
5.5.360.0110.08919.14
5.5.350.0100.07819.25
5.5.340.0150.08019.71
5.5.330.0130.08819.69
5.5.320.0130.08419.68
5.5.310.0160.07119.72
5.5.300.0110.06919.74
5.5.290.0220.07219.68
5.5.280.0130.06119.73
5.5.270.0090.08519.49
5.5.260.0090.08719.68
5.5.250.0090.07019.53
5.5.240.0190.06819.07
5.5.230.0060.08319.08
5.5.220.0110.07818.93
5.5.210.0150.07919.00
5.5.200.0100.06419.04
5.5.190.0120.06719.08
5.5.180.0140.07819.08
5.5.160.0130.07619.04
5.5.150.0110.07419.01
5.5.140.0060.06018.91
5.5.130.0090.07319.02
5.5.120.0120.07218.98
5.5.110.0120.08119.01
5.5.100.0120.07018.93
5.5.90.0140.06318.98
5.5.80.0120.07818.90
5.5.70.0160.07618.91
5.5.60.0140.07318.99
5.5.50.0140.07418.70
5.5.40.0080.07518.98
5.5.30.0070.08018.88
5.5.20.0090.07718.80
5.5.10.0090.08318.81
5.5.00.0170.07318.84
5.4.450.0140.08019.61
5.4.440.0190.06919.64
5.4.430.0090.07619.61
5.4.420.0140.07919.69
5.4.410.0160.07519.51
5.4.400.0120.08419.22
5.4.390.0170.07119.37
5.4.380.0170.06319.17
5.4.370.0140.08019.11
5.4.360.0110.07019.35
5.4.350.0090.07419.21
5.4.340.0180.07419.12
5.4.320.0130.06619.31
5.4.310.0120.07419.33
5.4.300.0120.06719.37
5.4.290.0130.07119.33
5.4.280.0120.07819.30
5.4.270.0130.06719.29
5.4.260.0160.07419.17
5.4.250.0130.07519.28
5.4.240.0070.07819.32
5.4.230.0150.07619.18
5.4.220.0160.07619.38
5.4.210.0150.06019.28
5.4.200.0120.07719.14
5.4.190.0120.08019.28
5.4.180.0120.07919.28
5.4.170.0170.07419.29
5.4.160.0120.07419.24
5.4.150.0160.07719.29
5.4.140.0140.07816.75
5.4.130.0130.06416.75
5.4.120.0100.07716.68
5.4.110.0140.07316.76
5.4.100.0140.06116.79
5.4.90.0130.07216.80
5.4.80.0100.06116.74
5.4.70.0220.06516.73
5.4.60.0140.07316.74
5.4.50.0160.07416.76
5.4.40.0170.06916.68
5.4.30.0120.07316.76
5.4.20.0140.07016.81
5.4.10.0150.06616.81
5.4.00.0100.05616.17
5.3.290.0140.07314.87
5.3.280.0130.07814.89
5.3.270.0170.07514.92
5.3.260.0170.06814.91
5.3.250.0120.07514.86
5.3.240.0180.07214.81
5.3.230.0120.07514.78
5.3.220.0130.06514.86
5.3.210.0130.06814.91
5.3.200.0130.07514.77
5.3.190.0160.07514.90
5.3.180.0200.06814.85
5.3.170.0130.07514.87
5.3.160.0160.07414.83
5.3.150.0170.06914.90
5.3.140.0130.07214.83
5.3.130.0160.06814.84
5.3.120.0140.05214.88
5.3.110.0120.07714.80
5.3.100.0080.06214.25
5.3.90.0140.07214.33
5.3.80.0110.07214.21
5.3.70.0120.06214.36
5.3.60.0080.05614.32
5.3.50.0110.06914.28
5.3.40.0090.07514.24
5.3.30.0120.07314.22
5.3.20.0130.06513.98
5.3.10.0100.06513.93
5.3.00.0130.06613.90
5.2.170.0100.05411.98
5.2.160.0100.04911.98
5.2.150.0140.05911.99
5.2.140.0110.05811.98
5.2.130.0120.06311.87
5.2.120.0090.06211.97
5.2.110.0090.06111.90
5.2.100.0080.05511.89
5.2.90.0070.05512.00
5.2.80.0080.05911.96
5.2.70.0090.06311.96
5.2.60.0080.05411.93
5.2.50.0110.06311.84
5.2.40.0110.05311.85
5.2.30.0100.05911.91
5.2.20.0080.06311.90
5.2.10.0100.05911.81
5.2.00.0060.06711.83
5.1.60.0100.05411.36
5.1.50.0060.05611.31
5.1.40.0080.05911.42
5.1.30.0100.05911.66
5.1.20.0070.04311.64
5.1.10.0090.05111.42
5.1.00.0090.05211.46
5.0.50.0080.03910.75
5.0.40.0090.03510.75
5.0.30.0110.05210.75
5.0.20.0070.03910.75
5.0.10.0080.03910.75
5.0.00.0060.05610.75
4.4.90.0050.02610.75
4.4.80.0050.03310.75
4.4.70.0070.02710.75
4.4.60.0040.02910.75
4.4.50.0050.02910.75
4.4.40.0040.04810.75
4.4.30.0060.03110.75
4.4.20.0030.03310.75
4.4.10.0050.02810.75
4.4.00.0030.04210.75
4.3.110.0060.03210.75
4.3.100.0060.03010.75
4.3.90.0040.03110.75
4.3.80.0040.04310.75
4.3.70.0020.03110.75
4.3.60.0040.03110.75
4.3.50.0040.03010.75
4.3.40.0020.04010.75
4.3.30.0040.03010.75
4.3.20.0020.03310.75
4.3.10.0080.02610.75
4.3.00.0030.02910.75

preferences:
81.85 ms | 401 KiB | 5 Q