3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = [ 0 =>[ 'nickname' => 'Bob', 'phone' => 15295892895, 'is_group' => 1, 'created_at' => 1544944181, 'assemble_id' => 'c1d0zUbmP', 'status' => 1 ], 1 =>[ 'nickname' => 'Jack', 'phone' => 15295892895, 'is_group' => 1, 'created_at' => 1544944181, 'assemble_id' => 'ED6OJX4VV', 'status' => 1 ], 2 =>[ 'nickname' => 'Grace', 'phone' => 15295892895, 'is_group' => 0, 'created_at' => 1544944181, 'assemble_id' => 'c1d0zUbmP', 'status' => 1 ], 3 =>[ 'nickname' => 'Jelly', 'phone' => 15295892895, 'is_group' => 0, 'created_at' => 1544944181, 'assemble_id' => 'ED6OJX4VV', 'status' => 1 ] ]; foreach ($list as $row) { $result[$row['assemble_id']]['assemble_id'] = $row['assemble_id']; $result[$row['assemble_id']]['assemble_group'][] = [ 'nickname' => $row['nickname'], 'phone' => $row['phone'], 'is_group' => $row['is_group'], 'created_at' => $row['created_at'], 'assemble_id' => $row['assemble_id'], 'status' => $row['status'] ]; } var_export(array_values($result));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'assemble_id' => 'c1d0zUbmP', 'assemble_group' => array ( 0 => array ( 'nickname' => 'Bob', 'phone' => 15295892895, 'is_group' => 1, 'created_at' => 1544944181, 'assemble_id' => 'c1d0zUbmP', 'status' => 1, ), 1 => array ( 'nickname' => 'Grace', 'phone' => 15295892895, 'is_group' => 0, 'created_at' => 1544944181, 'assemble_id' => 'c1d0zUbmP', 'status' => 1, ), ), ), 1 => array ( 'assemble_id' => 'ED6OJX4VV', 'assemble_group' => array ( 0 => array ( 'nickname' => 'Jack', 'phone' => 15295892895, 'is_group' => 1, 'created_at' => 1544944181, 'assemble_id' => 'ED6OJX4VV', 'status' => 1, ), 1 => array ( 'nickname' => 'Jelly', 'phone' => 15295892895, 'is_group' => 0, 'created_at' => 1544944181, 'assemble_id' => 'ED6OJX4VV', 'status' => 1, ), ), ), )

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:
58.03 ms | 403 KiB | 8 Q