3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $begin = new \DateTime('13/10/2015'); $end = new \DateTime('15/10/2015'); echo $begin->diff($end)->days;
based on hjgbs
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (13/10/2015) at position 0 (1): Unexpected character in /in/LBRDG:2 Stack trace: #0 /in/LBRDG(2): DateTime->__construct('13/10/2015') #1 {main} thrown in /in/LBRDG on line 2
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (13/10/2015) at position 0 (1): Unexpected character' in /in/LBRDG:2 Stack trace: #0 /in/LBRDG(2): DateTime->__construct('13/10/2015') #1 {main} thrown in /in/LBRDG on line 2
Process exited with code 255.