3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( 'fournisseurs_1331566668.csv' => array( 'name' => 'fournisseurs_1331566668.csv', 'date' => 1331566694 ), 'fournisseurs_1385460508.csv' => array( 'name' => 'fournisseurs_1385460508.csv', 'date' => 1385460517 ), 'fournisseurs_1334062493.csv' => array( 'name' => 'fournisseurs_1334062493.csv', 'date' => 1334062505 ), ); uasort($array, function($a, $b){ if ($a['date'] == $b['date']) { return 0; } return ($a['date'] > $b['date']) ? +1 : -1; }); var_dump( $array );

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
array(3) { ["fournisseurs_1331566668.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1331566668.csv" ["date"]=> int(1331566694) } ["fournisseurs_1334062493.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1334062493.csv" ["date"]=> int(1334062505) } ["fournisseurs_1385460508.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1385460508.csv" ["date"]=> int(1385460517) } }
Output for Array change keys
array(3) { ["fournisseurs_1331566668.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1331566668.csv" ["date"]=> int(1331566694) } ["fournisseurs_1334062493.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1334062493.csv" ["date"]=> int(1334062505) } ["fournisseurs_1385460508.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1385460508.csv" ["date"]=> int(1385460517) } }
Output for Lexical anon
array(3) { ["fournisseurs_1331566668.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1331566668.csv" ["date"]=> int(1331566694) } ["fournisseurs_1334062493.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1334062493.csv" ["date"]=> int(1334062505) } ["fournisseurs_1385460508.csv"]=> array(2) { ["name"]=> string(27) "fournisseurs_1385460508.csv" ["date"]=> int(1385460517) } }

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