3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $y = date('Y-m-d'); $x = explode('-', $y); array_unshift($x, $y); list(,$y,$m,$d) = $x; var_dump($y); var_dump($m); var_dump($d);
Output for 4.3.0 - 7.1.0
string(4) "2012" string(2) "09" string(2) "06"