3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt1 = new \DateTime( '2014/12/31' ); $dt1->modify( '-1 month' ); $m = (int) $dt1->format( 'm' ); var_dump( $m ); // still 12 !!!
Output for 5.6.0 - 7.2.6
int(12)