<?php
function cmp($a, $b)
{
if($a->date == $b->date)
{
return 0;
}
return ($a->date < $b->date) ? -1 : 1;
}
$images = array;
$i1 = new ImageMetadata("2", "3", "3");
$i2 = new ImageMetadata("2", "1", "3");
$i3 = new ImageMetadata("2", "2", "3");
array_push($images, $i1);
array_push($images, $i2);
array_push($images, $i3);
usort($images, "cmp");
echo json_encode($images);
?>
- Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0 - 7.0.1
- Parse error: syntax error, unexpected ';', expecting '(' in /in/kIYHW on line 12
Process exited with code 255.
preferences:
165.8 ms | 1395 KiB | 25 Q