3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $goods=["ABC","XYZ","PQR","DEF"]; $qty=[12345,25120,14521,12541]; $rate=[12.00,13.02,15.00,14.00]; ?> <table> <tr> <th>Sr No.</th> <th>Goods Description</th> <th>Total Quantity(pcs)</th> <th>Rate per unit(Rs.)</th> <th colspan="3">Amount</th> </tr> <?php for($i=0;$i<count($goods);$i++) { ?> <tr> <td><?php echo $goods[$i];?></td> <td><?php echo $qty[$i];?></td> <td><?php echo $rate[$i];?></td> </tr> <?php } ?> <tr> <td></td> <td></td> <td></td> <td></td> <td>Total Value</td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td>Frieght</td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td>Total Taxable Value</td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td>Tax</td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td>tax</td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td>tax</td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td>Total Tax Amount</td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td>Grand Total Tax Amount</td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td>ABC</td> <td></td> <td></td> </tr> </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).
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.3.10.0070.00316.46
7.3.00.0070.00316.64
7.2.130.0120.00616.91
7.2.120.0070.00717.08
7.2.110.0030.00916.84
7.2.100.0000.01516.83
7.2.90.0000.01117.15
7.2.80.0040.00816.80
7.2.70.0030.00917.13
7.2.60.0050.00716.90
7.2.50.0090.00316.99
7.2.40.0070.00717.19
7.2.30.0060.00617.11
7.2.20.0060.00617.12
7.2.10.0030.01016.78
7.2.00.0070.00918.08
7.1.250.0000.01715.87
7.1.200.0090.00315.93
7.1.100.0000.01117.96
7.1.70.0040.00817.13
7.1.60.0630.01733.42
7.1.50.0530.02332.86
7.1.40.0630.01732.56
7.1.30.0630.01732.69
7.1.20.0700.01332.77
7.1.10.0500.01314.71
7.1.00.0530.01014.72
7.0.200.1070.01314.83
7.0.190.0630.00714.61
7.0.180.0830.01714.41
7.0.170.0630.00714.54
7.0.160.0830.01314.50
7.0.150.0570.01314.40
7.0.140.0600.00314.41
7.0.130.0600.01314.73
7.0.120.0600.01314.61
7.0.110.0570.01314.24
7.0.100.0470.01314.60
7.0.90.0570.01014.40
7.0.80.0470.01314.46
7.0.70.0470.01314.63
7.0.60.0530.01714.30
7.0.50.0630.01314.52
7.0.40.1030.01714.71
7.0.30.0930.01014.58
7.0.20.0600.00714.62
7.0.10.0600.00714.57
7.0.00.0530.00714.66
hhvm-3.15.40.0630.16085.48
5.6.300.0070.06720.81
5.6.290.0170.05320.83
5.6.280.0170.05320.84
5.6.270.0100.06020.80
5.6.260.0130.05320.88
5.6.250.0170.05020.94
5.6.240.0200.05320.75
5.6.230.0200.05020.74
5.6.220.0030.06320.73
5.6.210.0100.08020.94
5.6.200.0270.05020.72
5.6.190.0300.05320.92
5.6.180.0070.06720.71
5.6.170.0200.05020.81
5.6.160.0130.06320.93
5.6.150.0100.06320.88
5.6.140.0130.06020.86
5.6.130.0200.05320.86
5.6.120.0100.06320.71
5.6.110.0100.06320.71
5.6.100.0170.06020.81
5.6.90.0130.06020.71
5.6.80.0170.05020.11
5.6.70.0130.05720.24
5.6.60.0100.05720.09
5.6.50.0230.04320.29
5.6.40.0100.05720.07
5.6.30.0100.06020.27
5.6.20.0030.06720.11
5.6.10.0170.06020.26
5.6.00.0200.05020.15