3v4l.org

run code in 300+ PHP versions simultaneously
<?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.22, 5.4.12
Parse error: syntax error, unexpected ',' in /in/X2v9R on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.21, 5.4.0 - 5.4.11
Parse error: syntax error, unexpected ',' in 0Eemg on line 4
Process exited with code 255.

preferences:
175.47 ms | 1395 KiB | 43 Q