3v4l.org

run code in 300+ PHP versions simultaneously
<?php $songs = [ ['Michael Jackson' => 'Thriller'], ['Michael Jackson' => 'Rock With You'], ['Teddy Pendergrass' => 'Love TKO'], ['ACDC' => 'Back in Black'] ]; $result = array_merge_recursive(...$songs); var_export($result); echo "\n---\n"; $template = <<<HTML <h2>%s</h2> <ul> <li>%s</li> </ul> HTML; foreach ($result as $artist => $songs) { printf( $template, $artist, implode('</li><li>', (array)$songs) ); }
Output for git.master_jit, git.master, rfc.property-hooks
array ( 'Michael Jackson' => array ( 0 => 'Thriller', 1 => 'Rock With You', ), 'Teddy Pendergrass' => 'Love TKO', 'ACDC' => 'Back in Black', ) --- <h2>Michael Jackson</h2> <ul> <li>Thriller</li><li>Rock With You</li> </ul> <h2>Teddy Pendergrass</h2> <ul> <li>Love TKO</li> </ul> <h2>ACDC</h2> <ul> <li>Back in Black</li> </ul>

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:
80.16 ms | 406 KiB | 5 Q