3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $m= date("m"); $de= date("d"); $y= date("Y"); $svnumber=array(); for($i=0; $i<=6; $i++){ $date=date('Y-m',mktime(0,0,($m-$i),$y)); echo $date.'\n'; }
Output for 4.3.0 - 5.0.5, 5.2.6 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2181-10\n2181-10\n2181-10\n2181-10\n2181-10\n2181-10\n2181-10\n
Output for 5.1.0 - 5.2.5
1970-01\n1970-01\n1970-01\n1970-01\n1970-01\n1970-01\n1970-01\n