<?php $today = new DateTime(); $date = new DateTime('2019.11.10'); $interval = $today->diff($date); echo $interval->format("%r%a");
Standard input is empty
Standard output is empty
PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (2019.11.10) at position 5 (1): Double time specification in /home/JoZgfc/prog.php:4 Stack trace: #0 /home/JoZgfc/prog.php(4): DateTime->__construct('2019.11.10') #1 {main} thrown in /home/JoZgfc/prog.php on line 4