3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $values_data = array(1,2,3,4,5,6,7,8,9); $tooltip = 'tooltip'; $i = "test"; echo '<div class="radio">'; foreach($values_data as $ke=>$va) { $questions.=' <div><input '.$tooltip.' type="radio" id="question_'.$i.'_'.$va.'" value="'.$va.'" name="question_'.$i.'" /> <span class="inline">'.$va.'</span></div> '; } echo '</div><div class="clear"></div>'; echo $questions;
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
<div class="radio"> Notice: Undefined variable: questions in /in/PTNQM on line 13 </div><div class="clear"></div> <div><input tooltip type="radio" id="question_test_1" value="1" name="question_test" /> <span class="inline">1</span></div> <div><input tooltip type="radio" id="question_test_2" value="2" name="question_test" /> <span class="inline">2</span></div> <div><input tooltip type="radio" id="question_test_3" value="3" name="question_test" /> <span class="inline">3</span></div> <div><input tooltip type="radio" id="question_test_4" value="4" name="question_test" /> <span class="inline">4</span></div> <div><input tooltip type="radio" id="question_test_5" value="5" name="question_test" /> <span class="inline">5</span></div> <div><input tooltip type="radio" id="question_test_6" value="6" name="question_test" /> <span class="inline">6</span></div> <div><input tooltip type="radio" id="question_test_7" value="7" name="question_test" /> <span class="inline">7</span></div> <div><input tooltip type="radio" id="question_test_8" value="8" name="question_test" /> <span class="inline">8</span></div> <div><input tooltip type="radio" id="question_test_9" value="9" name="question_test" /> <span class="inline">9</span></div>
Output for hhvm-3.10.0 - 3.12.0
<div class="radio"></div><div class="clear"></div> <div><input tooltip type="radio" id="question_test_1" value="1" name="question_test" /> <span class="inline">1</span></div> <div><input tooltip type="radio" id="question_test_2" value="2" name="question_test" /> <span class="inline">2</span></div> <div><input tooltip type="radio" id="question_test_3" value="3" name="question_test" /> <span class="inline">3</span></div> <div><input tooltip type="radio" id="question_test_4" value="4" name="question_test" /> <span class="inline">4</span></div> <div><input tooltip type="radio" id="question_test_5" value="5" name="question_test" /> <span class="inline">5</span></div> <div><input tooltip type="radio" id="question_test_6" value="6" name="question_test" /> <span class="inline">6</span></div> <div><input tooltip type="radio" id="question_test_7" value="7" name="question_test" /> <span class="inline">7</span></div> <div><input tooltip type="radio" id="question_test_8" value="8" name="question_test" /> <span class="inline">8</span></div> <div><input tooltip type="radio" id="question_test_9" value="9" name="question_test" /> <span class="inline">9</span></div>
Output for 5.0.4 - 5.0.5
<div class="radio"> Notice: Undefined variable: questions in /in/PTNQM on line 10 </div><div class="clear"></div> <div><input tooltip type="radio" id="question_test_1" value="1" name="question_test" /> <span class="inline">1</span></div> <div><input tooltip type="radio" id="question_test_2" value="2" name="question_test" /> <span class="inline">2</span></div> <div><input tooltip type="radio" id="question_test_3" value="3" name="question_test" /> <span class="inline">3</span></div> <div><input tooltip type="radio" id="question_test_4" value="4" name="question_test" /> <span class="inline">4</span></div> <div><input tooltip type="radio" id="question_test_5" value="5" name="question_test" /> <span class="inline">5</span></div> <div><input tooltip type="radio" id="question_test_6" value="6" name="question_test" /> <span class="inline">6</span></div> <div><input tooltip type="radio" id="question_test_7" value="7" name="question_test" /> <span class="inline">7</span></div> <div><input tooltip type="radio" id="question_test_8" value="8" name="question_test" /> <span class="inline">8</span></div> <div><input tooltip type="radio" id="question_test_9" value="9" name="question_test" /> <span class="inline">9</span></div>
Output for 4.3.0 - 5.0.3
<div class="radio"> Notice: Undefined variable: questions in /in/PTNQM on line 10 </div><div class="clear"></div> <div><input tooltip type="radio" id="question_test_1" value="1" name="question_test" /> <span class="inline">1</span></div> <div><input tooltip type="radio" id="question_test_2" value="2" name="question_test" /> <span class="inline">2</span></div> <div><input tooltip type="radio" id="question_test_3" value="3" name="question_test" /> <span class="inline">3</span></div> <div><input tooltip type="radio" id="question_test_4" value="4" name="question_test" /> <span class="inline">4</span></div> <div><input tooltip type="radio" id="question_test_5" value="5" name="question_test" /> <span class="inline">5</span></div> <div><input tooltip type="radio" id="question_test_6" value="6" name="question_test" /> <span class="inline">6</span></div> <div><input tooltip type="radio" id="question_test_7" value="7" name="question_test" /> <span class="inline">7</span></div> <div><input tooltip type="radio" id="question_test_8" value="8" name="question_test" /> <span class="inline">8</span></div> <div><input tooltip type="radio" id="question_test_9" value="9" name="question_test" /> <span class="inline">9</span></div>