3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $r = '<div class="form-group>'; $label = '<label class="control-label" for="id_f-variants-99999-is_active">Is active</label>'; $label = substr($r, 0, strpos($r, ">")); $label .= '>'; $r .= $label; $r .= '<input id="id_f-variants-99999-is_active" class="form-control checkbox" type="checkbox" name="f-variants-99999-is_active"></input>'; $r .= '<span class="unchecked">hoa</span>'; $r .= '<span class="checked">hoahoahoa</span>'; $r .= '</label>'; $r .= '</div>'; echo($r);
Output for 4.3.0 - 7.1.0
<div class="form-group><div class="form-group><input id="id_f-variants-99999-is_active" class="form-control checkbox" type="checkbox" name="f-variants-99999-is_active"></input><span class="unchecked">hoa</span><span class="checked">hoahoahoa</span></label></div>