3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $yddd = 3212; preg_match('/^(\d)(\d{3})$/', $yddd, $m); echo date('Y-m-d', strtotime("201{$m[1]}-01-01 00:00:00 +{$m[2]} days"));
Output for 4.3.6 - 7.1.0
2013-08-01
Output for 4.3.0 - 4.3.5
2013-01-01