fork(1) download
  1. <?php
  2. $birthday="10/10/1905";
  3. $now=new DateTime();
  4. $birthtime=new DateTime($birthday);
  5. $interval = $now->diff($birthtime);
  6. echo $interval->format("Сейчас ему %Y лет\n");
  7.  
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Сейчас ему 107 лет