3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = '99-99-9999 99:99'; var_dump(strtotime($str)); var_dump(date_parse($str));
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(false) array(15) { ["year"]=> bool(false) ["month"]=> bool(false) ["day"]=> bool(false) ["hour"]=> int(9) ["minute"]=> int(9) ["second"]=> int(0) ["fraction"]=> float(0) ["warning_count"]=> int(1) ["warnings"]=> array(1) { [5]=> string(29) "Double timezone specification" } ["error_count"]=> int(6) ["errors"]=> array(6) { [0]=> string(20) "Unexpected character" [1]=> string(20) "Unexpected character" [8]=> string(20) "Unexpected character" [9]=> string(20) "Unexpected character" [11]=> string(20) "Unexpected character" [15]=> string(20) "Unexpected character" } ["is_localtime"]=> bool(true) ["zone_type"]=> int(1) ["zone"]=> int(5940) ["is_dst"]=> bool(false) }
Output for 5.1.0 - 5.1.6
bool(false) Fatal error: Call to undefined function date_parse() in /in/MmbNp on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5
int(-1) Fatal error: Call to undefined function date_parse() in /in/MmbNp on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
int(-1) Fatal error: Call to undefined function: date_parse() in /in/MmbNp on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
int(-1) Fatal error: Call to undefined function: date_parse() in /in/MmbNp on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
int(-1) Fatal error: Call to undefined function: date_parse() in /in/MmbNp on line 4