3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = explode("/",$scheduleDate); for($i=0;$i<2;$i++){ if(count($date[$i]) < 2){ $date[$i] = '0'.$date[$i]; } } echo $date[2].$date[0].$date[1];
based on E1gut
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: scheduleDate in /in/CRBj4 on line 2 Notice: Undefined offset: 1 in /in/CRBj4 on line 4 Notice: Undefined offset: 1 in /in/CRBj4 on line 5 Notice: Undefined offset: 2 in /in/CRBj4 on line 8 00
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: scheduleDate in /in/CRBj4 on line 2 Notice: Undefined index: 1 in /in/CRBj4 on line 4 Notice: Undefined index: 1 in /in/CRBj4 on line 5 Notice: Undefined index: 2 in /in/CRBj4 on line 8 00
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: scheduleDate in /in/CRBj4 on line 2 Notice: Undefined offset: 1 in /in/CRBj4 on line 4 Notice: Undefined offset: 1 in /in/CRBj4 on line 5 Notice: Undefined offset: 2 in /in/CRBj4 on line 8 00
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: scheduleDate in /in/CRBj4 on line 2 Notice: Undefined offset: 1 in /in/CRBj4 on line 4 Notice: Undefined offset: 1 in /in/CRBj4 on line 5 Notice: Undefined offset: 2 in /in/CRBj4 on line 8 00