3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $datetime = '0000-00-00 00:00:00'; //got from DB $timestamp = strtotime($datetime); echo "Timestamp:"; var_dump($timestamp); // format to time format... $date = date('d.m.Y', $timestamp); echo "Date:"; var_dump($date);
Output for 5.2.6 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Timestamp:int(-62169985172) Date:string(11) "30.11.-0001"
Output for 5.2.4 - 5.2.5
Timestamp:bool(false) Date:string(10) "01.01.1970"
Output for 4.3.0 - 5.2.3
Timestamp:int(943916400) Date:string(10) "30.11.1999"