fork download
  1. <?php
  2.  
  3. $d = DateTime::createFromFormat('Y-m-d', '1990-03-02');
  4.  
  5. $a = (int)$d->format('Y');
  6. $b = (int)$d->format('j');
  7. $c = (int)$d->format('n');
  8.  
  9. var_dump($a . ' ' . $b . ' ' . $c);
  10.  
Success #stdin #stdout 0.03s 52472KB
stdin
Standard input is empty
stdout
string(10) "1990  2  3"