3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = strtotime('2014-09-01'); $end = strtotime('2014-10-01'); $stamp = $start; $months = array(); do { $next_stamp = mktime(0,0,-1, date('n',$stamp)+1, 1, date('Y',$stamp)); if (!$next_stamp) die('DIE'); //$next_stamp = min($next_stamp, $end); $months[] = (($next_stamp-$stamp)/3600/24)/date('t', $stamp); $stamp = $next_stamp; } while ($stamp < $end); var_dump($months);
based on GJ0Qu
Output for hhvm-3.10.0 - 3.12.0, 7.0.6, 7.0.14 - 7.1.0

Process exited with code 137.
Output for 7.0.0 - 7.0.5, 7.0.7 - 7.0.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 67108872 bytes) in /in/i3lcL on line 11
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/i3lcL on line 8
Process exited with code 255.