3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $startTs = time(); // for testing $startTs = strtotime('05/03/2015'); $baseDay = strtotime('+1 day', $startTs); echo $ts = date('d.m.Y', strtotime('last sunday', $baseDay)); echo PHP_EOL; echo $ts = date('d.m.Y', strtotime('this saturday', $baseDay));
based on uGssM
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
03.05.2015 09.05.2015
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
03.05.2015 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/cVP5S on line 10 PHP_EOL09.05.2015