3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = [ 'key_1' => ['A', 'B', 'C'], 'key_2' => ['D', 'E', 'F'], ]; $transpose = []; foreach ($arr as $k => $row) { $transpose[0][] = $k; foreach ($row as $i => $v) { $transpose[$i + 1][] = $v; } } echo "<table border=1>\n"; foreach ($transpose as $values) { echo "<tr><td>" . implode('</td><td>', $values) . "</td></tr>\n"; } echo '</table>';
Output for git.master, git.master_jit, rfc.property-hooks
<table border=1> <tr><td>key_1</td><td>key_2</td></tr> <tr><td>A</td><td>D</td></tr> <tr><td>B</td><td>E</td></tr> <tr><td>C</td><td>F</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:
51.51 ms | 1137 KiB | 4 Q