3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime; $heh = new DateTime("last day of next week - 4 weekdays"); $hah = clone $heh; $dif = $now->diff($heh); echo $heh->format("Y-m-d\n"); echo $hah->format("Y-m-d\n");
Output for 7.0.17 - 7.0.20, 7.1.3 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
2017-03-27 2017-03-27
Output for 7.0.0 - 7.0.16, 7.1.0 - 7.1.2
2017-03-31 2017-03-27

preferences:
192.7 ms | 402 KiB | 214 Q