fork(5) download
  1. <?php
  2.  
  3. function VencimentoSerial($serial) {
  4. $vencto = strtotime( '2016-1-1 +'.hexdec(substr($serial, 3, 2)).' months last day');
  5. return gmdate( 'd/m/Y', $vencto);
  6. }
  7.  
  8. echo VencimentoSerial( '0AC192F4B16EA6A5CE' ) . PHP_EOL;
  9. echo VencimentoSerial( '0AC1A2F4B16EA6A5CE' ) . PHP_EOL;
  10. echo VencimentoSerial( '0AC1B2F4B16EA6A5CE' ) . PHP_EOL;
  11.  
  12.  
  13.  
  14.  
Success #stdin #stdout 0s 83904KB
stdin
Standard input is empty
stdout
31/01/2018
28/02/2018
31/03/2018