3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = '2016-10-19'; if ($start != '0000-00-00' and strtotime($start) > strtotime('now')) { $start = strtotime($start); } echo date('Y-m-d', $start);

preferences:
68.38 ms | 402 KiB | 5 Q