3v4l.org

run code in 500+ PHP versions simultaneously
<?php $first = array ( '2022-10-23' => array ( 'id' => 10, 'user_id' => 1, 'notitie' => 'Mag niet !', 'datum' => '2022-10-23', 'user_role' => 'client', ), '2022-10-24' => array ( 'id' => 11, 'user_id' => 1, 'notitie' => 'Mag al helemaal niet ', 'datum' => '2022-10-24', 'user_role' => 'client', ), '2022-10-25' => array ( 'datum' => '2022-10-25', ), '2022-10-26' => array ( 'id' => 15, 'user_id' => 1, 'notitie' => '26', 'datum' => '2022-10-26', 'user_role' => 'client', ), '2022-10-27' => array ( 'datum' => '2022-10-27', ), '2022-10-28' => array ( 'datum' => '2022-10-28', ), '2022-10-29' => array ( 'datum' => '2022-10-29', ), ); $second = array ( '2022-10-23' => array ( 'id_therapeut' => 4, 'client_id' => 1, 'notitie_therapeut' => 'volgende week', 'datum_therapeut' => '2022-10-23', ), '2022-10-26' => array ( 'id_therapeut' => 5, 'client_id' => 1, 'notitie_therapeut' => 'ff', 'datum_therapeut' => '2022-10-26', ), '2022-10-28' => array ( 'id_therapeut' => 5, 'client_id' => 1, 'notitie_therapeut' => 'ff', 'datum_therapeut' => '2022-10-28', ), ); $result = []; foreach ($first as $date => $row) { $result[$date][] = [$date => $row]; } foreach ($second as $date => $row) { $result[$date][] = [$date => $row]; } var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( '2022-10-23' => array ( 0 => array ( '2022-10-23' => array ( 'id' => 10, 'user_id' => 1, 'notitie' => 'Mag niet !', 'datum' => '2022-10-23', 'user_role' => 'client', ), ), 1 => array ( '2022-10-23' => array ( 'id_therapeut' => 4, 'client_id' => 1, 'notitie_therapeut' => 'volgende week', 'datum_therapeut' => '2022-10-23', ), ), ), '2022-10-24' => array ( 0 => array ( '2022-10-24' => array ( 'id' => 11, 'user_id' => 1, 'notitie' => 'Mag al helemaal niet ', 'datum' => '2022-10-24', 'user_role' => 'client', ), ), ), '2022-10-25' => array ( 0 => array ( '2022-10-25' => array ( 'datum' => '2022-10-25', ), ), ), '2022-10-26' => array ( 0 => array ( '2022-10-26' => array ( 'id' => 15, 'user_id' => 1, 'notitie' => '26', 'datum' => '2022-10-26', 'user_role' => 'client', ), ), 1 => array ( '2022-10-26' => array ( 'id_therapeut' => 5, 'client_id' => 1, 'notitie_therapeut' => 'ff', 'datum_therapeut' => '2022-10-26', ), ), ), '2022-10-27' => array ( 0 => array ( '2022-10-27' => array ( 'datum' => '2022-10-27', ), ), ), '2022-10-28' => array ( 0 => array ( '2022-10-28' => array ( 'datum' => '2022-10-28', ), ), 1 => array ( '2022-10-28' => array ( 'id_therapeut' => 5, 'client_id' => 1, 'notitie_therapeut' => 'ff', 'datum_therapeut' => '2022-10-28', ), ), ), '2022-10-29' => array ( 0 => array ( '2022-10-29' => array ( 'datum' => '2022-10-29', ), ), ), )

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:
68.74 ms | 1614 KiB | 4 Q