3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $t1select = "teamvalue"; $position = array(1,2); $sql = "SELECT * FROM `allsquads` WHERE `Team` = '$t1select' AND `Position` = '$position[$i]' OR `Secondary` = '$position[$i]'"; echo sql;
Output for 5.3.0 - 7.1.0
Notice: Undefined variable: i in /in/OdT4X on line 7 Notice: Undefined index: in /in/OdT4X on line 7 Notice: Undefined variable: i in /in/OdT4X on line 8 Notice: Undefined index: in /in/OdT4X on line 8 Notice: Use of undefined constant sql - assumed 'sql' in /in/OdT4X on line 12 sql
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: i in /in/OdT4X on line 7 Notice: Undefined index: in /in/OdT4X on line 7 Notice: Undefined variable: i in /in/OdT4X on line 8 Notice: Undefined index: in /in/OdT4X on line 8 Notice: Use of undefined constant sql - assumed 'sql' in /in/OdT4X on line 12 sql
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/OdT4X on line 7 Notice: Undefined index: in /in/OdT4X on line 7 Notice: Undefined variable: i in /in/OdT4X on line 8 Notice: Undefined index: in /in/OdT4X on line 8 Notice: Use of undefined constant sql - assumed 'sql' in /in/OdT4X on line 12 sql