3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start_date = date("Y-m-d",strtotime("-1 month")); $end_date = date("Y-m-d",time()); $days = (int) ((strtotime($end_date) - strtotime($start_date))/86400); $info = array( 'start_date'=>$start_date, 'end_date'=>$end_date, 'days'=>$days ); print_r($info);
based on jWQLf
Output for 4.3.0 - 7.2.0
Array ( [start_date] => 2014-09-29 [end_date] => 2014-10-29 [days] => 30 )