3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $f4_raw = "Wed Jan 14 00:09:09 BDT 2009"; $f4_formatted = date($format, strtotime($f4_raw)); echo "Format 4: $f4_formatted"; //$date = DateTime::createFromFormat('i/M/Y', 'Tue/Feb/2013'); //import with the specified format... //echo $date->format('Y-m-d');
Output for 5.0.4 - 5.0.5, 5.1.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: format in /in/Cvt3q on line 3 Format 4:
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/Cvt3q on line 6
Process exited with code 255.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: format in /in/Cvt3q on line 3 Format 4: