3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $rec['birthday'] = '3/11'; $date = explode('/', $rec['birthday']); if(!isset($date[2])){ $new_date = $date[0].'-'.$date[1].'-'.'0000'; } else{ $new_date = $date[0].'-'.$date[1].'-'.$date[2]; } echo $new_date;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
3-11-0000