fork(1) download
  1. <?php
  2.  
  3. $date = new DateTime('last day of february this year');
  4.  
  5. print_r($date);
  6.  
  7. $eh_bissexto = $date->format('d') === '29';
  8.  
  9. var_dump($eh_bissexto);
  10.  
  11.  
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
DateTime Object
(
    [date] => 2016-02-29 00:00:00.000000
    [timezone_type] => 3
    [timezone] => UTC
)
bool(true)