3v4l.org

run code in 300+ PHP versions simultaneously
<?php $results = array ( array( 'body' => 'somevalue1', 'title' => 'somevalue1', 'type' => 'foo' ), array( 'body' => 'somevalue2', 'title' => 'somevalue2', 'type' => 'foo' ), array( 'body' => 'somevalue3', 'title' => 'somevalue3', 'type' => 'bar' ), array( 'body' => 'somevalue4', 'title' => 'somevalue4', 'type' => 'foobar' ), array( 'body' => 'somevalue5', 'title' => 'somevalue5', 'type' => 'foobar' ), array( 'body' => 'somevalue6', 'title' => 'somevalue6', 'type' => 'foobar' ), ); foreach($results as $a){ $output[$a['type']][]=array_slice($a,0,2); } var_export($output);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'foo' => array ( 0 => array ( 'body' => 'somevalue1', 'title' => 'somevalue1', ), 1 => array ( 'body' => 'somevalue2', 'title' => 'somevalue2', ), ), 'bar' => array ( 0 => array ( 'body' => 'somevalue3', 'title' => 'somevalue3', ), ), 'foobar' => array ( 0 => array ( 'body' => 'somevalue4', 'title' => 'somevalue4', ), 1 => array ( 'body' => 'somevalue5', 'title' => 'somevalue5', ), 2 => array ( 'body' => 'somevalue6', 'title' => 'somevalue6', ), ), )

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:
42.9 ms | 402 KiB | 8 Q