<?php
$data = '{"info":[{"id":1, "title":"original title", "name":"john doe", "date":"2010-05-15"}, {"id":2, "title":"another title", "name":"foo bar", "date":"2009-04-11"}]}';
usort($info, function ($a, $b) { return $a['date'] <=> $b['date'];
});
foreach ($info as $item) {
$date = DateTime::createFromFormat('Y-m-d', $item['date']);
$year = $date->format('Y');
echo "$year {$item['title']}\n";
}
PD9waHAKJGRhdGEgPSAneyJpbmZvIjpbeyJpZCI6MSwgInRpdGxlIjoib3JpZ2luYWwgdGl0bGUiLCAibmFtZSI6ImpvaG4gZG9lIiwgImRhdGUiOiIyMDEwLTA1LTE1In0sIHsiaWQiOjIsICJ0aXRsZSI6ImFub3RoZXIgdGl0bGUiLCAibmFtZSI6ImZvbyBiYXIiLCAiZGF0ZSI6IjIwMDktMDQtMTEifV19JzsKCiRpbmZvID0ganNvbl9kZWNvZGUoJGRhdGEsIHRydWUpWydpbmZvJ107Cgp1c29ydCgkaW5mbywgZnVuY3Rpb24gKCRhLCAkYikgewogICAgcmV0dXJuICRhWydkYXRlJ10gPD0+ICRiWydkYXRlJ107Cn0pOwoKZm9yZWFjaCAoJGluZm8gYXMgJGl0ZW0pIHsKICAgICRkYXRlID0gRGF0ZVRpbWU6OmNyZWF0ZUZyb21Gb3JtYXQoJ1ktbS1kJywgJGl0ZW1bJ2RhdGUnXSk7CiAgICAkeWVhciA9ICRkYXRlLT5mb3JtYXQoJ1knKTsKICAgIGVjaG8gIiR5ZWFyIHskaXRlbVsndGl0bGUnXX1cbiI7Cn0=