3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 'NUM' => [ 101, 102, 103, ], 'NOM' => [ 'Smith', 'Robson', 'Daniels', ], 'PRENOM' => [ 'Alice', 'Bob', 'Charlie', ], ]; $result = []; foreach ($data as $k => $row) { foreach ($row as $i => $v) { if (!isset($result[$i])) { $result[$i] = ''; } else { $result[$i] .= ' '; } $result[$i] .= "$k:$v"; } } echo implode(PHP_EOL, $result);
Output for git.master, git.master_jit, rfc.property-hooks
NUM:101 NOM:Smith PRENOM:Alice NUM:102 NOM:Robson PRENOM:Bob NUM:103 NOM:Daniels PRENOM:Charlie

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:
124.62 ms | 405 KiB | 5 Q