3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = DateTime::createFromFormat( 'Y-m-d H:i:s', 'foo', new \DateTimeZone( 'GMT' ) ); $b = DateTime::createFromFormat( '2015-25-41 12:00:00', 'foo', new \DateTimeZone( 'GMT' ) ); $v = DateTime::createFromFormat( '2015-10-01 12:00:00', 'foo', new \DateTimeZone( 'GMT' ) ); var_dump($a); var_dump($b); var_dump($c);
Output for 5.3.18 - 7.2.0
bool(false) bool(false) Notice: Undefined variable: c in /in/mo55Y on line 23 NULL