3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $overView = array('a','b','v'); for($i=0; $i<count($overView); $i++){ //I want to iterate through the Overview file/array, print the contents apropriately if ($i % 2 == 0){?> <dt><span class = "bold"> <?php print ($overView[i]); ?></span></dt> <?php } else { ?> <dd><?php print ($overView[i]); ?> </dd> <?php }} ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<dt><span class = "bold"> Notice: Use of undefined constant i - assumed 'i' in /in/ak3Qv on line 5 Notice: Undefined index: i in /in/ak3Qv on line 5 </span></dt> <dd> Notice: Use of undefined constant i - assumed 'i' in /in/ak3Qv on line 7 Notice: Undefined index: i in /in/ak3Qv on line 7 </dd> <dt><span class = "bold"> Notice: Use of undefined constant i - assumed 'i' in /in/ak3Qv on line 5 Notice: Undefined index: i in /in/ak3Qv on line 5 </span></dt>
Output for 4.3.0 - 5.2.17
<dt><span class = "bold"> Notice: Use of undefined constant i - assumed 'i' in /in/ak3Qv on line 5 Notice: Undefined index: i in /in/ak3Qv on line 5 </span></dt> <dd> Notice: Use of undefined constant i - assumed 'i' in /in/ak3Qv on line 7 Notice: Undefined index: i in /in/ak3Qv on line 7 </dd> <dt><span class = "bold"> Notice: Use of undefined constant i - assumed 'i' in /in/ak3Qv on line 5 Notice: Undefined index: i in /in/ak3Qv on line 5 </span></dt>