3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $month = 4 $monthName = date('M', strtotime('2012-'.$month.'-01')); $to = strtotime('last day of '.$monthName.', 23:59:59'); if ( $to < time() ) { $to = strtotime('last day of '.$monthName.' '.(date('Y')+1).', 23:59:59'); } $from = strtotime('first day of this month, 00:00:00', $to); echo date('d.m.Y H:i:s', $from)."\r\n"; echo date('d.m.Y H:i:s', $to)."\r\n";
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '$monthName' (T_VARIABLE) in /in/drGkK on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/drGkK on line 4
Process exited with code 255.