3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 1 => [ 'Date' => '2015-11-05' ], 2 => [ 'Date' => '2015-11-11' ] ]; uksort($arr,'mySortDate'); function mySortDate($a,$b) { $aDate = strtotime($a['Date']); $bDate = strtotime($b['Date']); if ($aDate == $bDate) { return 0; } return ($aDate < $bDate) ? -1 : 1; } print "<pre>"; var_dump($arr);
Output for git.master, git.master_jit
Warning: Trying to access array offset on value of type int in /in/OtiGc on line 17 Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/OtiGc on line 17 Warning: Trying to access array offset on value of type int in /in/OtiGc on line 18 Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/OtiGc on line 18 <pre>array(2) { [1]=> array(1) { ["Date"]=> string(10) "2015-11-05" } [2]=> array(1) { ["Date"]=> string(10) "2015-11-11" } }
Output for rfc.property-hooks
Warning: Trying to access array offset on int in /in/OtiGc on line 17 Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/OtiGc on line 17 Warning: Trying to access array offset on int in /in/OtiGc on line 18 Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/OtiGc on line 18 <pre>array(2) { [1]=> array(1) { ["Date"]=> string(10) "2015-11-05" } [2]=> array(1) { ["Date"]=> string(10) "2015-11-11" } }

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