3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if($type=='service'){ $pvals_arr = $_POST['prev_v']; $sr_id = $_POST['srid']; $pvals=''; foreach($pvals_arr as $pvals_val) $pvals.= $pvals_val.',' ; $pvals = trim($pvals, ','); $services_all = $database->readRows('tbl_services',' id,name ',' where status=1 and id not in('.$pvals.')');?> <!--<p class="dark-line">Address Details</p>--> <div style="height:70px;"> <select name="services_areas_<?=$sr_id?>"> <option value ="none">---select---</option> <?php for($id1=0;$id1<count($services_all);$id1++) {?> <option value="<?=$services_all[$id1]['id']?>"><?=$services_all[$id1]['name']?></option> <? }?> </select></div> <? } ?>
Output for 5.4.0 - 7.1.0
Notice: Undefined variable: type in /in/9SY4O on line 2
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected $end in /in/9SY4O on line 19
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected $ in /in/9SY4O on line 19
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/9SY4O on line 19
Process exited with code 255.