3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php const DB_DATETIME_FORMAT = 'Y-m-d H:i:s'; $gmtTimezone = new DateTimeZone("UTC"); $Now = new createFromFormat(DB_DATETIME_FORMAT, 'tomorrow 03:00:00', $gmtTimezone); print_r($Now, true); $Duration = new DateInterval('PT1M'); // 1minute $Now->add( $Duration ); print_r($Now, true); $Duration = new DateInterval('P1D'); // 1Day $Now->add( $Duration ); print_r($Now, true); // 2014-05-12
based on 6cWpl
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'createFromFormat' not found in /in/TBHGr:4 Stack trace: #0 {main} thrown in /in/TBHGr on line 4
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Class 'createFromFormat' not found in /in/TBHGr on line 4
Process exited with code 255.