3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $stupid_date = '1421992'; echo "strptime($stupid_date) = " . strptime($stupid_date); echo "DateTime::createFromFormat('dmY', '$stupid_date')= ". DateTime::createFromFormat('dmY', $stupid_date);
Output for 7.1.0 - 7.3.0rc3
Warning: strptime() expects exactly 2 parameters, 1 given in /in/s5E6t on line 5 strptime(1421992) = Recoverable fatal error: Object of class DateTime could not be converted to string in /in/s5E6t on line 6
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20
Warning: strptime() expects exactly 2 parameters, 1 given in /in/s5E6t on line 5 strptime(1421992) = Catchable fatal error: Object of class DateTime could not be converted to string in /in/s5E6t on line 6
Process exited with code 255.
Output for hhvm-3.15.4
Warning: strptime() expects exactly 2 parameters, 1 given in /in/s5E6t on line 5 strptime(1421992) = Fatal error: Uncaught Error: Object of class DateTime could not be converted to string in /in/s5E6t:6 Stack trace: #0 {main}
Process exited with code 255.