3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $rec['birthday']= ""; if(isset($rec['birthday']) && $rec['birthday'] != "") { $dates = explode("/",$rec['birthday']); if(!isset($dates[2])) $dates[2] = "0000"; $newdate = $dates[0]."-".$dates[1]."-".$dates[2]; echo $newdate; } else { $newdate=""; } ?>
Output for 4.3.0 - 7.1.0