<?php
"544828|01|2019|018",
"544829|09|2018|775",
"544825|05|2018|036",
"544822|10|2014|001",
"544828|11|18|279",
"544828|07|20|976",
"544828|08|20|725",
"544828|04|21|201"
);
foreach($matches as $key => $valor){
$t_array = explode("|", $valor); // quebra pela barra vertical "|" $mes = $t_array[1]; // pega o segundo valor da array (mês)
$ano = (int
) substr($t_array[2], -2); // pega os dois último caracteres do terceiro valor da array (ano) e converte em inteiro
$ano_atual = (int
) substr(date("Y"), -2); // pega o dois último caracteres do ano atual e converte em inteiro
// faz as comparações:
// se o ano for maior ou igual que o ano atual e o mês for maior ou igual que o mês atual
// ou se o ano for maior que o atual
if( ($ano >= $ano_atual && $mes >= date("m")) || $ano > $ano_atual ){ $encontrada .= $valor."\n"; // imprime os valores
}
}
echo $encontrada;
PD9waHAKJG1hdGNoZXMgPSBhcnJheSgKIjU0NDgyOHwwMXwyMDE5fDAxOCIsCiI1NDQ4Mjl8MDl8MjAxOHw3NzUiLAoiNTQ0ODI1fDA1fDIwMTh8MDM2IiwKIjU0NDgyMnwxMHwyMDE0fDAwMSIsCiI1NDQ4Mjh8MTF8MTh8Mjc5IiwKIjU0NDgyOHwwN3wyMHw5NzYiLAoiNTQ0ODI4fDA4fDIwfDcyNSIsCiI1NDQ4Mjh8MDR8MjF8MjAxIgopOwoKZm9yZWFjaCgkbWF0Y2hlcyBhcyAka2V5ID0+ICR2YWxvcil7CiAgICR0X2FycmF5ID0gIGV4cGxvZGUoInwiLCAkdmFsb3IpOyAvLyBxdWVicmEgcGVsYSBiYXJyYSB2ZXJ0aWNhbCAifCIKICAgJG1lcyA9ICR0X2FycmF5WzFdOyAvLyBwZWdhIG8gc2VndW5kbyB2YWxvciBkYSBhcnJheSAobcOqcykKICAgJGFubyA9IChpbnQpIHN1YnN0cigkdF9hcnJheVsyXSwgLTIpOyAvLyBwZWdhIG9zIGRvaXMgw7psdGltbyBjYXJhY3RlcmVzIGRvIHRlcmNlaXJvIHZhbG9yIGRhIGFycmF5IChhbm8pI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