3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(date_format(strtotime("10.12.2015"), "YYYY-mm-dd")); var_dump(new Date("10.12.2015")); var_dump(strtotime("2015-12-10"));
based on 8feRY
Output for 7.3.0alpha1 - 7.3.0rc4
Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in /in/IBbpH on line 3 bool(false) Fatal error: Uncaught Error: Class 'Date' not found in /in/IBbpH:4 Stack trace: #0 {main} thrown in /in/IBbpH on line 4
Process exited with code 255.
Output for 7.0.0 - 7.2.6
Warning: date_format() expects parameter 1 to be DateTimeInterface, integer given in /in/IBbpH on line 3 bool(false) Fatal error: Uncaught Error: Class 'Date' not found in /in/IBbpH:4 Stack trace: #0 {main} thrown in /in/IBbpH on line 4
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Warning: date_format() expects parameter 1 to be DateTimeInterface, integer given in /in/IBbpH on line 3 bool(false) Fatal error: Class 'Date' not found in /in/IBbpH on line 4
Process exited with code 255.
Output for 5.3.20 - 5.4.45
Warning: date_format() expects parameter 1 to be DateTime, integer given in /in/IBbpH on line 3 bool(false) Fatal error: Class 'Date' not found in /in/IBbpH on line 4
Process exited with code 255.