3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //************** 2017 ************** //SasanicA, Inc. //********************************** $format = 'Y-m-d H:i:s'; $date = date_create_from_format($format, '2018-06-01 18:06:47'); //echo date_format($date, $format); $date_now = datetime($format); if($date_now < $date){ echo ' --- YESSS --- '; echo $date_now; }else{ echo ' --- NO'; } //end ?>
based on JE7qA
Output for 7.0.30 - 7.3.0alpha1
Fatal error: Uncaught Error: Call to undefined function datetime() in /in/4RPR3:13 Stack trace: #0 {main} thrown in /in/4RPR3 on line 13
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Call to undefined function datetime() in /in/4RPR3:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Call to undefined function datetime() in /in/4RPR3:13 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30
Fatal error: Call to undefined function datetime() in /in/4RPR3 on line 13
Process exited with code 255.