3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* Just compose the HTML sample */ $html='<html><head></head><body>'; $html.='<table class="grilla"><tbody><tr class="textEncabezadoGrilla" bgcolor="#C0DAF1" align="center"> <th>Juzgado Policía Local</th> <th>Rol Causa</th> </tr> <tr> <td class="textgrid2">2 JPL PROVIDENCIA</td> <td class="textgrid2">018092 - 2010</td> </tr> <tr> <td class="textgrid1">OVALLE JPL</td> <td class="textgrid1">13115 - 2010</td> </tr> </tbody></table> <table class="grilla"><tbody><tr class="textEncabezadoGrilla" bgcolor="#C0DAF1" align="center"> <th>Juzgado Policía Local</th> <th>Rol Causa</th> </tr> <tr> <td class="textgrid2">2 JPL PROVIDENCIA</td> <td class="textgrid2">018092 - 2010</td> </tr> <tr> <td class="textgrid1">OVALLE JPL</td> <td class="textgrid1">13116 - 2011</td> </tr> </tbody></table>'; $html.="</body></html>"; $doc=new DOMDocument(); $doc->loadHTML($html); $xpath=new DOMXPath($doc); $tds = array(); var_dump($xpath->query('//table[@class="grilla"]/tbody/tr/td/text()')); foreach($xpath->query('//table[@class="grilla"]/tbody/tr/td/text()') as $key => $td) { array_push($tds, $td); } $print_r($tds); $ee = array_chunk($tds, 2);
based on H4qRP

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0040.01116.98
7.2.00.0040.00819.79
7.1.200.0060.00615.78
7.1.100.0090.00318.56
7.1.70.0000.01117.14
7.1.60.0060.00619.52
7.1.50.0040.00817.18
7.1.00.0030.07722.55
7.0.200.0140.00717.04
7.0.60.0100.07720.08
7.0.50.0030.08318.09
7.0.40.0130.03720.14
7.0.30.0230.08320.41
7.0.20.0200.05720.15
7.0.10.0130.06720.16
7.0.00.0170.07320.30
5.6.280.0030.03321.09
5.6.210.0100.05320.75
5.6.200.0070.08718.32
5.6.190.0030.04720.55
5.6.180.0330.04720.64
5.6.170.0370.06720.56
5.6.160.0270.06320.48
5.6.150.0030.04318.38
5.6.140.0030.06018.23
5.6.130.0100.08018.34
5.6.120.0000.04721.18
5.6.110.0130.05021.25
5.6.100.0070.07021.02
5.6.90.0100.07021.23
5.6.80.0170.07020.57
5.5.350.0100.08320.62
5.5.340.0100.08018.06
5.5.330.0000.09320.31
5.5.320.0630.06320.34
5.5.310.0300.08020.37
5.5.300.0030.07318.17
5.5.290.0170.07018.14
5.5.280.0000.05320.93
5.5.270.0170.06720.92
5.5.260.0070.04020.81
5.5.250.0070.08720.71
5.5.240.0170.08320.41
5.4.450.0230.05719.56
5.4.440.0030.06319.69
5.4.430.0170.05719.59
5.4.420.0130.06319.66
5.4.410.0200.05319.20
5.4.400.0170.05319.23
5.4.390.0100.07019.28
5.4.380.0230.04719.08
5.4.370.0230.04719.42
5.4.360.0270.04719.11
5.4.350.0270.05319.00
5.4.340.0200.05319.27
5.4.320.0130.06319.40
5.4.310.0200.05319.59
5.4.300.0200.05019.35
5.4.290.0230.04719.42
5.4.280.0170.06019.52
5.4.270.0130.05719.27
5.4.260.0170.05319.01
5.4.250.0130.06019.34
5.4.240.0200.06019.35
5.4.230.0130.05719.35
5.4.220.0170.05719.42
5.4.210.0170.05319.30
5.4.200.0300.04319.35
5.4.190.0230.04719.09
5.4.180.0170.05719.30
5.4.170.0270.04719.26
5.4.160.0270.04319.34
5.4.150.0170.05319.50
5.4.140.0200.05016.71
5.4.130.0270.04016.39
5.4.120.0200.04716.70
5.4.110.0230.05016.61
5.4.100.0230.04316.65
5.3.290.0230.05014.74
5.3.280.0200.05014.89
5.3.270.0200.05714.86
5.3.260.0200.05314.86
5.3.250.0200.05014.93
5.3.240.0230.04714.79
5.3.230.0200.05014.71
5.3.220.0200.04714.86
5.3.210.0200.07014.79
5.3.200.0170.05314.64