3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = "01.01.20032"; var_dump(strtotime($date)); $foo = \DateTime::createFromFormat('d.m.Y', $date); var_dump($foo);
Output for 5.3.0 - 7.1.0
bool(false) bool(false)
Output for 5.2.10 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/GJMCK on line 4 bool(false) Fatal error: Call to undefined method DateTime::createFromFormat() in /in/GJMCK on line 4
Process exited with code 255.
Output for 5.2.0 - 5.2.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/GJMCK on line 4 bool(false) Fatal error: Call to undefined method DateTime::createfromformat() in /in/GJMCK on line 4
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/GJMCK on line 4 bool(false) Fatal error: Class 'DateTime' not found in /in/GJMCK on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/GJMCK on line 4 int(-1) Fatal error: Class 'DateTime' not found in /in/GJMCK on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/GJMCK on line 4 int(-1) Fatal error: Undefined class name 'datetime' in /in/GJMCK on line 4
Process exited with code 255.
Output for 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/GJMCK on line 4 int(-1) Fatal error: Undefined class name 'datetime' in /in/GJMCK on line 4
Output for 4.3.0
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Grg75 on line 4 int(-1) Fatal error: Undefined class name 'datetime' in /in/Grg75 on line 4