3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = (string) intval(date('Y'))-1; $x .= '-1-1'; echo $x; echo '\n'; echo date('Y-m-d',$x);
Output for 5.1.0 - 7.1.0
2012-1-1\n Notice: A non well formed numeric value encountered in /in/8KZ2G on line 7 1970-01-01
Output for 4.3.0 - 5.0.5
2012-1-1\n1970-01-01