3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $begin = new DateTime( '2012-08-01' ); $end = new DateTime( '2012-08-31' ); $end = $end->modify( '+1 day' ); $interval = new DateInterval('P1D'); $daterange = new DatePeriod($begin, $interval ,$end); echo count($daterange);
based on aQCiK
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/jRg3W on line 10 1
Output for 5.4.0 - 7.1.10
1