<?php
$day1 = new DateTime( '2010-02-29' );
$day1->modify( '+1 month' );
$firstday=$day1->format( 'd-m-Y' );
$day2 = new DateTime( '2010-02-29' );
$day2->modify( 'last day of next month' );
$secondday=$day2->format( 'd-m-Y' );
echo $firstday,"\n" $secondday;
if($firstday > $secondday){
echo $secondday;
}
else
echo $firstday;
//echo $daynew->format( 'd-m-Y' );
- Output for 5.4.12
- Parse error: syntax error, unexpected '$secondday' (T_VARIABLE), expecting ',' or ';' in /in/E3eog on line 10
Process exited with code 255. - Output for 5.4.0 - 5.4.11
- Parse error: syntax error, unexpected '$secondday' (T_VARIABLE), expecting ',' or ';' in 73Nui on line 10
Process exited with code 255. - Output for 5.3.22
- Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /in/E3eog on line 10
Process exited with code 255. - Output for 5.3.0 - 5.3.21
- Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in 73Nui on line 10
Process exited with code 255.
preferences:
172.47 ms | 1399 KiB | 43 Q