<?php
$json = <<<JSON
[
{
"id": "1",
"clientid": "1",
"status": "2",
"duedate": "2017-09-05",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "8",
"clientid": "1",
"status": "2",
"duedate": "2017-10-06",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "15",
"clientid": "1",
"status": "2",
"duedate": "2017-11-06",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "16",
"clientid": "1",
"status": "2",
"duedate": "2017-11-03",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "17",
"clientid": "1",
"status": "2",
"duedate": "2017-11-03",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "24",
"clientid": "1",
"status": "2",
"duedate": "2017-12-06",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "31",
"clientid": "1",
"status": "2",
"duedate": "2018-01-06",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "40",
"clientid": "1",
"status": "2",
"duedate": "2018-02-06",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "47",
"clientid": "1",
"status": "2",
"duedate": "2018-03-06",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "60",
"clientid": "1",
"status": "2",
"duedate": "2018-04-06",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "61",
"clientid": "1",
"status": "4",
"duedate": "2018-05-06",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
},
{
"id": "68",
"clientid": "1",
"status": "4",
"duedate": "2018-05-03",
"company": "Cliente Exemplo",
"website": "clienteexemplo.com"
}
]
JSON;
abstract class Status {
const ATRASADO = 4;
const EM_DIA = 2;
}
return $it->status == Status::ATRASADO;
});
PD9waHAKCiRqc29uID0gPDw8SlNPTgogICAgWwogICAgICAgIHsKICAgICAgICAgICAgImlkIjogIjEiLAogICAgICAgICAgICAiY2xpZW50aWQiOiAiMSIsCiAgICAgICAgICAgICJzdGF0dXMiOiAiMiIsCiAgICAgICAgICAgICJkdWVkYXRlIjogIjIwMTctMDktMDUiLAogICAgICAgICAgICAiY29tcGFueSI6ICJDbGllbnRlIEV4ZW1wbG8iLAogICAgICAgICAgICAid2Vic2l0ZSI6ICJjbGllbnRlZXhlbXBsby5jb20iCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJpZCI6ICI4IiwKICAgICAgICAgICAgImNsaWVudGlkIjogIjEiLAogICAgICAgICAgICAic3RhdHVzIjogIjIiLAogICAgICAgICAgICAiZHVlZGF0ZSI6ICIyMDE3LTEwLTA2IiwKICAgICAgICAgICAgImNvbXBhbnkiOiAiQ2xpZW50ZSBFeGVtcGxvIiwKICAgICAgICAgICAgIndlYnNpdGUiOiAiY2xpZW50ZWV4ZW1wbG8uY29tIgogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAiaWQiOiAiMTUiLAogICAgICAgICAgICAiY2xpZW50aWQiOiAiMSIsCiAgICAgICAgICAgICJzdGF0dXMiOiAiMiIsCiAgICAgICAgICAgICJkdWVkYXRlIjogIjIwMTctMTEtMDYiLAogICAgICAgICAgICAiY29tcGFueSI6ICJDbGllbnRlIEV4ZW1wbG8iLAogICAgICAgICAgICAid2Vic2l0ZSI6ICJjbGllbnRlZXhlbXBsby5jb20iCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJpZCI6ICIxNiIsCiAgICAgICAgICAgICJjbGllbnRpZCI6ICIxIiwKICAgICAgICAgICAgInN0YXR1cyI6ICIyIiwKICAgICAgICAgICAgImR1ZWRhdGUiOiAiMjAxNy0xMS0wMyIsCiAgICAgICAgICAgICJjb21wYW55IjogIkNsaWVudGUgRXhlbXBsbyIsCiAgICAgICAgICAgICJ3ZWJzaXRlIjogImNsaWVudGVleGVtcGxvLmNvbSIKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImlkIjogIjE3IiwKICAgICAgICAgICAgImNsaWVudGlkIjogIjEiLAogICAgICAgICAgICAic3RhdHVzIjogIjIiLAogICAgICAgICAgICAiZHVlZGF0ZSI6ICIyMDE3LTExLTAzIiwKICAgICAgICAgICAgImNvbXBhbnkiOiAiQ2xpZW50ZSBFeGVtcGxvIiwKICAgICAgICAgICAgIndlYnNpdGUiOiAiY2xpZW50ZWV4ZW1wbG8uY29tIgogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAiaWQiOiAiMjQiLAogICAgICAgICAgICAiY2xpZW50aWQiOiAiMSIsCiAgICAgICAgICAgICJzdGF0dXMiOiAiMiIsCiAgICAgICAgICAgICJkdWVkYXRlIjogIjIwMTctMTItMDYiLAogICAgICAgICAgICAiY29tcGFueSI6ICJDbGllbnRlIEV4ZW1wbG8iLAogICAgICAgICAgICAid2Vic2l0ZSI6ICJjbGllbnRlZXhlbXBsby5jb20iCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJpZCI6ICIzMSIsCiAgICAgICAgICAgICJjbGllbnRpZCI6ICIxIiwKICAgICAgICAgICAgInN0YXR1cyI6ICIyIiwKICAgICAgICAgICAgImR1ZWRhdGUiOiAiMjAxOC0wMS0wNiIsCiAgICAgICAgICAgICJjb21wYW55IjogIkNsaWVudGUgRXhlbXBsbyIsCiAgICAgICAgICAgICJ3ZWJzaXRlIjogImNsaWVudGVleGVtcGxvLmNvbSIKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImlkIjogIjQwIiwKICAgICAgICAgICAgImNsaWVudGlkIjogIjEiLAogICAgICAgICAgICAic3RhdHVzIjogIjIiLAogICAgICAgICAgICAiZHVlZGF0ZSI6ICIyMDE4LTAyLTA2IiwKICAgICAgICAgICAgImNvbXBhbnkiOiAiQ2xpZW50ZSBFeGVtcGxvIiwKICAgICAgICAgICAgIndlYnNpdGUiOiAiY2xpZW50ZWV4ZW1wbG8uY29tIgogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAiaWQiOiAiNDciLAogICAgICAgICAgICAiY2xpZW50aWQiOiAiMSIsCiAgICAgICAgICAgICJzdGF0dXMiOiAiMiIsCiAgICAgICAgICAgICJkdWVkYXRlIjogIjIwMTgtMDMtMDYiLAogICAgICAgICAgICAiY29tcGFueSI6ICJDbGllbnRlIEV4ZW1wbG8iLAogICAgICAgICAgICAid2Vic2l0ZSI6ICJjbGllbnRlZXhlbXBsby5jb20iCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJpZCI6ICI2MCIsCiAgICAgICAgICAgICJjbGllbnRpZCI6ICIxIiwKICAgICAgICAgICAgInN0YXR1cyI6ICIyIiwKICAgICAgICAgICAgImR1ZWRhdGUiOiAiMjAxOC0wNC0wNiIsCiAgICAgICAgICAgICJjb21wYW55IjogIkNsaWVudGUgRXhlbXBsbyIsCiAgICAgICAgICAgICJ3ZWJzaXRlIjogImNsaWVudGVleGVtcGxvLmNvbSIKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImlkIjogIjYxIiwKICAgICAgICAgICAgImNsaWVudGlkIjogIjEiLAogICAgICAgICAgICAic3RhdHVzIjogIjQiLAogICAgICAgICAgICAiZHVlZGF0ZSI6ICIyMDE4LTA1LTA2IiwKICAgICAgICAgICAgImNvbXBhbnkiOiAiQ2xpZW50ZSBFeGVtcGxvIiwKICAgICAgICAgICAgIndlYnNpdGUiOiAiY2xpZW50ZWV4ZW1wbG8uY29tIgogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAiaWQiOiAiNjgiLAogICAgICAgICAgICAiY2xpZW50aWQiOiAiMSIsCiAgICAgICAgICAgICJzdGF0dXMiOiAiNCIsCiAgICAgICAgICAgICJkdWVkYXRlIjogIjIwMTgtMDUtMDMiLAogICAgICAgICAgICAiY29tcGFueSI6ICJDbGllbnRlIEV4ZW1wbG8iLAogICAgICAgICAgICAid2Vic2l0ZSI6ICJjbGllbnRlZXhlbXBsby5jb20iCiAgICAgICAgfQogICAgXQpKU09OOwoKYWJzdHJhY3QgY2xhc3MgU3RhdHVzIHsKICAgIGNvbnN0IEFUUkFTQURPID0gNDsKICAgIGNvbnN0IEVNX0RJQSA9IDI7Cn0KCiRkYXRhID0ganNvbl9kZWNvZGUoJGpzb24pOwoKJGF0cmFzYWRvcyA9IGFycmF5X2ZpbHRlcigkZGF0YSwgZnVuY3Rpb24gKCRpdCkgewogICAgcmV0dXJuICRpdC0+c3RhdHVzID09IFN0YXR1czo6QVRSQVNBRE87Cn0pOwoKcHJpbnRfcigkYXRyYXNhZG9zKTs=