3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('Asia/Shanghai'); $date = date('Y-m-d_H-i-s', time()); var_dump($date);
based on gJac4
Output for 5.5.0 - 5.6.8, 5.6.10 - 5.6.28, 7.0.1 - 7.3.0beta1
string(19) "2015-12-21_15-41-15"
Output for 5.6.9, 7.0.0
string(19) "2015-12-21_15-41-16"