3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $startTs = time(); // for testing $startTs = strtotime('05/03/2015'); $baseDay = strtotime('+1', $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 FuQIG
Output for 5.1.0 - 7.2.0
26.04.2015 09.05.2015
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.0.5
28.12.1969 03.01.1970
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
28.12.1969 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uGssM on line 10 PHP_EOL03.01.1970