3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $t1select = "teamvalue"; $sql1 = mysql_query("SELECT * FROM `allsquads` WHERE `Team` = '$t1select' AND `Position` = '$position[$i]' OR `Secondary` = '$position[$i]'") or die(mysql_error()); echo sql1;
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/USMEM:5 Stack trace: #0 {main} thrown in /in/USMEM on line 5
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function mysql_query() in /in/USMEM on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Notice: Undefined variable: i in /in/USMEM on line 6 Notice: Undefined variable: position in /in/USMEM on line 6 Notice: Undefined variable: i in /in/USMEM on line 7 Notice: Undefined variable: position in /in/USMEM on line 7 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/USMEM on line 7 Warning: mysql_query(): A link to the server could not be established in /in/USMEM on line 7 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)
Output for 4.3.1
Notice: Undefined variable: i in /in/USMEM on line 6 Notice: Undefined variable: position in /in/USMEM on line 6 Notice: Undefined variable: i in /in/USMEM on line 7 Notice: Undefined variable: position in /in/USMEM on line 7 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/USMEM on line 7 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/USMEM on line 7 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)
Output for 4.3.0
Notice: Undefined variable: i in /in/USMEM on line 6 Notice: Undefined variable: position in /in/USMEM on line 6 Notice: Undefined variable: i in /in/USMEM on line 7 Notice: Undefined variable: position in /in/USMEM on line 7 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/USMEM on line 7 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/USMEM on line 7 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)