3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $values_data = array(1,2,3,4,5,6,7,8,9); $i = "test"; $questions .=' <div class="radio"> '; foreach($values_data as $ke=>$va) { $questions.=' <div><input '.$tooltip.' type="radio" id="question_'.$i.'_'.$va['value'].'" value="'.$va['value'].'" name="question_'.$i.'" /> <span class="inline">'.$va['value'].'</span></div> '; } $questions .=' </div> <div class="clear"></div> '; echo $questions;
Output for 5.1.0 - 7.1.0
Notice: Undefined variable: questions in /in/M89l0 on line 7 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 <div class="radio"> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> </div> <div class="clear"></div>
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: questions in /in/M89l0 on line 5 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 <div class="radio"> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> </div> <div class="clear"></div>
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: questions in /in/M89l0 on line 5 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 Notice: Undefined variable: tooltip in /in/M89l0 on line 12 <div class="radio"> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> <div><input type="radio" id="question_test_" value="" name="question_test" /> <span class="inline"></span></div> </div> <div class="clear"></div>