3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2022-11-19'); $nextMondayOrThursday = Min( (clone $start)->modify("next monday"), (clone $start)->modify("next thursday") ); echo $nextMondayOrThursday->format('l, d F Y');

preferences:
41.87 ms | 402 KiB | 5 Q