3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "0" => [ "UserID" => "1", "EmailAddress" => "user5@gmail.com", "TransID" => "fjhf8f7848", ], "1" => [ "UserID" => "1", "EmailAddress" => "johndoe@gmail.com", "TransID" => "dfsdhsdu78", ], ]; $result = array_map(function(&$item){ ksort($item); return $item; }, $arr); print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: {closure}(): Argument #1 ($item) must be passed by reference, value given in /in/WResJ on line 18 Warning: {closure}(): Argument #1 ($item) must be passed by reference, value given in /in/WResJ on line 18 Array ( [0] => Array ( [EmailAddress] => user5@gmail.com [TransID] => fjhf8f7848 [UserID] => 1 ) [1] => Array ( [EmailAddress] => johndoe@gmail.com [TransID] => dfsdhsdu78 [UserID] => 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:
31.88 ms | 407 KiB | 5 Q