3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $rows = array( "collect_date" => "2014-07-14" ); $date=date("d/m/Y", strtotime($rows['collect_date'])); if ($date==date(("d/m/Y"), strtotime('+1 days')) && $rows['status']=='4') { echo "<span class='label label-danger1'>".$date."</span>"; } elseif ($date==date(("d/m/Y")) && $rows['status']=='4') { echo "<span class='label label-danger'>".$date."</span>"; } elseif ($date==date(("d/m/Y"), strtotime('+2 days')) && $rows['status']=='4') { echo "<span class='label label-warning'>".$date."</span>"; } elseif (strtotime($date) < strtotime('1 day ago') && $rows['status']=='4') { echo "<span class='label label-danger'>".$date."</span>"; } else { echo $date; }
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: status in /in/4hmKP on line 13 Notice: Undefined index: status in /in/4hmKP on line 21 14/07/2014
Output for 5.1.0 - 5.2.17
Notice: Undefined index: status in /in/4hmKP on line 13 Notice: Undefined index: status in /in/4hmKP on line 21 14/07/2014
Output for 4.3.0 - 5.0.5
Notice: Undefined index: status in /in/4hmKP on line 13 14/07/2014