3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php header('Content-Type: text/html; charset=utf-8'); $arr = array( array( 'text' => 'Текст красного цвета', 'align' => 'center', 'valign' => 'center', 'bgcolor' => '#0000FF', 'colspan' => 2, 'rowspan' => 2, 'width' =>200, 'class' =>'red' ) , array( 'text' => 'Текст зеленого цвета' , 'cells' => '8,9' , 'align' => 'right' , 'valign' => 'bottom' , 'bgcolor' => '#FFFFFF', 'colspan' => 2, 'class' =>'green' )); $array0 = $arr[0]; $array1 = $arr[1]; $firstArray0 = array_shift($array0); $firstArray1 = array_shift($array1); $td1 .= "<td "; foreach ($array0 as $k0 => $v0) { $td1 .= $k0."=".$v0." "; } $td1 .= ">"; $td1 .= $firstArray0; $td1 .= "</td>"; $td2 .= "<td "; foreach ($array1 as $k1 => $v1) { $td2 .= $k1."=".$v1." "; } $td2 .= ">"; $td2 .= $firstArray1; $td2 .= "</td>"; $td = "<td width='100' height='100'></td>"; $table .= "<table>"; for ($i=0, $td1; $i<3; $i++) { $table .= "<tr>"; if ($i == 0) { $table .= $td1; $table .= $td; } elseif ($i == 1) { $table .= $td; } elseif ($i == 2) { $table .= $td; $table .= $td2; } $table .= "</tr>"; } $table .= "</table>"; echo "<!DOCTYPE html>"; echo "<style>td{border: 1px solid black;} .red{color:red} .green{color:green}</style>"; 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).
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.00.0060.00319.38
7.1.100.0040.00418.30
7.1.70.0040.00417.19
7.1.60.0120.01219.70
7.1.50.0230.01634.75
7.1.00.0030.09322.31
7.0.200.0000.00716.61
7.0.140.0030.07322.12
7.0.60.0130.06320.05
7.0.50.0070.05317.82
7.0.40.0130.07720.03
7.0.30.0530.05020.13
7.0.20.0230.04020.18
7.0.10.0200.07020.30
7.0.00.0170.07720.16
5.6.280.0100.06721.05
5.6.210.0070.08320.54
5.6.200.0130.08018.21
5.6.190.0070.08320.35
5.6.180.0300.07720.75
5.6.170.0300.04320.51
5.6.160.0130.07720.49
5.6.150.0130.04018.08
5.6.140.0030.08318.10
5.6.130.0100.07318.12
5.6.120.0100.06321.05
5.6.110.0030.08321.00
5.6.100.0100.07020.99
5.6.90.0070.08721.11
5.6.80.0130.05020.54
5.6.70.0200.05720.52
5.5.350.0230.07320.45
5.5.340.0100.06717.93
5.5.330.0100.04020.37
5.5.320.0200.05320.40
5.5.310.0170.06320.31
5.5.300.0100.04317.98
5.5.290.0030.04318.02
5.5.280.0070.08720.78
5.5.270.0130.04720.94
5.5.260.0030.05720.81
5.5.250.0070.08020.70
5.5.240.0130.03020.16
5.4.450.0130.05319.47
5.4.440.0830.05019.47
5.4.430.0900.05719.46
5.4.420.0670.00019.63
5.4.410.0100.05718.79
5.4.400.0370.05018.79
5.4.390.0200.05718.52
5.4.380.0200.06018.77
5.4.370.0000.04718.64
5.4.360.0030.05018.46
5.4.350.0140.03611.99
5.4.340.0060.04811.99
5.4.320.0060.04212.47
5.4.310.0090.04412.46
5.4.300.0150.06112.47
5.4.290.0110.05412.47
5.4.280.0080.05312.36
5.4.270.0150.04712.36
5.4.260.0140.05012.36
5.4.250.0120.05112.36
5.4.240.0160.04712.36
5.4.230.0130.05012.36
5.4.220.0130.04812.36
5.4.210.0070.04312.36
5.4.200.0080.04012.36
5.4.190.0070.04012.35
5.4.180.0100.04112.35
5.4.170.0120.04612.36
5.4.160.0130.04212.36
5.4.150.0090.04512.36
5.4.140.0110.04712.04
5.4.130.0110.04112.03
5.4.120.0100.04511.99
5.4.110.0140.04311.98
5.4.100.0080.04811.98
5.4.90.0160.04511.98
5.4.80.0100.04911.98
5.4.70.0090.04711.98
5.4.60.0100.05211.98
5.4.50.0060.05611.98
5.4.40.0120.05311.97
5.4.30.0110.05111.96
5.4.20.0090.05711.97
5.4.10.0120.04411.97
5.4.00.0100.05111.45
5.3.290.0060.03912.80
5.3.280.0150.06612.70
5.3.270.0270.08912.72
5.3.260.0100.08412.72
5.3.250.0170.06712.72
5.3.240.0150.08912.72
5.3.230.0190.07712.71
5.3.220.0100.06912.68
5.3.210.0090.05912.68
5.3.200.0110.06712.68
5.3.190.0190.09512.68
5.3.180.0260.08812.67
5.3.170.0190.07612.67
5.3.160.0100.04912.68
5.3.150.0080.06812.67
5.3.140.0150.04812.66
5.3.130.0050.04712.66
5.3.120.0060.04512.66
5.3.110.0100.05012.65
5.3.100.0100.04612.12
5.3.90.0080.03712.08
5.3.80.0070.03912.07
5.3.70.0090.04712.08
5.3.60.0110.07612.06
5.3.50.0180.05812.00
5.3.40.0110.08112.00
5.3.30.0160.06911.96
5.3.20.0160.04611.73
5.3.10.0160.05111.71
5.3.00.0080.03611.69
5.2.170.0040.0389.20
5.2.160.0050.0519.20
5.2.150.0160.0719.20
5.2.140.0100.0499.20
5.2.130.0110.0419.16
5.2.120.0170.0589.15
5.2.110.0160.0739.16
5.2.100.0100.0419.16
5.2.90.0060.0359.15
5.2.80.0090.0339.15
5.2.70.0090.0469.15
5.2.60.0100.0399.11
5.2.50.0040.0359.08
5.2.40.0080.0319.05
5.2.30.0050.0389.02
5.2.20.0110.0349.01
5.2.10.0090.0348.95
5.2.00.0050.0408.81
5.1.60.0040.0348.10
5.1.50.0080.0328.09
5.1.40.0060.0338.07
5.1.30.0160.0628.42
5.1.20.0180.0568.45
5.1.10.0080.0538.18
5.1.00.0260.0868.17
5.0.50.0060.0296.66
5.0.40.0080.0286.52
5.0.30.0040.0356.33
5.0.20.0060.0296.30
5.0.10.0130.0336.28
5.0.00.0090.0556.27
4.4.90.0040.0244.78
4.4.80.0120.0244.75
4.4.70.0060.0204.75
4.4.60.0060.0234.76
4.4.50.0060.0164.77
4.4.40.0060.0364.71
4.4.30.0060.0224.76
4.4.20.0050.0264.84
4.4.10.0060.0204.85
4.4.00.0080.0284.76
4.3.110.0050.0204.67
4.3.100.0060.0194.67
4.3.90.0110.0314.63
4.3.80.0070.0324.58
4.3.70.0060.0404.63
4.3.60.0050.0194.63
4.3.50.0020.0004.63
4.3.40.0090.0624.53
4.3.30.0030.0163.32
4.3.20.0030.0163.30
4.3.10.0030.0163.26
4.3.00.0170.0206.44