3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $day1 = new DateTime( '2010-01-31' ); $day1->modify( '+1 month' ); $firstday=$day1->format( 'd-m-Y' ), "\n"; $day2 = new DateTime( '2010-01-31' ); $day2->modify( 'last day of next month' ); $secondday=$day2->format( 'd-m-Y' ); if($firstday>$secondday){ echo $firstday; } //echo $daynew->format( 'd-m-Y' );
Output for 5.3.0 - 5.4.12
Parse error: syntax error, unexpected ',' in /in/0Eemg on line 4
Process exited with code 255.