3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $todayTime = strtotime('now'); $thisMondayTime = strtotime('- ' . (intval(date('N', $todayTime)) - 1) . ' days', $todayTime); $28DaysLaterTime = strtotime('+ 28 days'); $MondayOf28DaysLaterTime = strtotime('- ' . (intval(date('N', $28DaysLaterTime)) - 1) . ' days', $28DaysLaterTime); echo date('m.d.y', $thisMondayTime) . "\n"; echo date('m.d.y', $MondayOf28DaysLaterTime) . "\n"; echo 'XXXXXX\n'; echo date('m.d.y', strtotime('last Monday', strtotime('+ 28 days'))) . "\n"; echo date('m.d.y',strtotime('next Monday', strtotime('+ 28 days'))) . "\n"; echo date('m.d.y',strtotime('last Monday')) . "\n"; echo date('m.d.y',strtotime('last Monday', strtotime('last Monday'))) . "\n"; echo "\n"; echo date('m.d.y',strtotime('- ' . (intval(date('N')) - 1) . ' days')); ?>
Output for 5.4.0 - 5.4.9
Parse error: syntax error, unexpected '28' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in /in/MWEZg on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.19
Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /in/MWEZg on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /in/MWEZg on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/MWEZg on line 4
Process exited with code 255.