3v4l.org

run code in 300+ PHP versions simultaneously
<?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;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $td1 in /in/8hWmu on line 27 Warning: Undefined variable $td2 in /in/8hWmu on line 35 Warning: Undefined variable $table in /in/8hWmu on line 45 <!DOCTYPE html><style>td{border: 1px solid black;} .red{color:red} .green{color:green}</style><table><tr><td align=center valign=center bgcolor=#0000FF colspan=2 rowspan=2 width=200 class=red >Текст красного цвета</td><td width='100' height='100'></td></tr><tr><td width='100' height='100'></td></tr><tr><td width='100' height='100'></td><td cells=8,9 align=right valign=bottom bgcolor=#FFFFFF colspan=2 class=green >Текст зеленого цвета</td></tr></table>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.8 ms | 402 KiB | 8 Q