3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "wow"; $name="wow"; $pass="wow"; echo sprintf("select id, username from users where username='%s' and password'%s'", mysql_real_escape_string($name), mysql_real_escape_string($pass)); ?>
Output for 7.0.0 - 7.1.0
wow Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /in/jZe6d:5 Stack trace: #0 {main} thrown in /in/jZe6d on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
wow Warning: supplied argument is not a valid MySQL-Link resource in /in/jZe6d on line 5 Warning: supplied argument is not a valid MySQL-Link resource in /in/jZe6d on line 5 select id, username from users where username='' and password''
Output for 5.0.0 - 5.6.28
wow Fatal error: Call to undefined function mysql_real_escape_string() in /in/jZe6d on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
wow Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/jZe6d on line 5 Warning: mysql_real_escape_string(): A link to the server could not be established in /in/jZe6d on line 5 Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/jZe6d on line 5 Warning: mysql_real_escape_string(): A link to the server could not be established in /in/jZe6d on line 5 select id, username from users where username='' and password''
Output for 4.3.1
wow Warning: mysql_real_escape_string() [http://www.php.net/function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/jZe6d on line 5 Warning: mysql_real_escape_string() [http://www.php.net/function.mysql-real-escape-string]: A link to the server could not be established in /in/jZe6d on line 5 Warning: mysql_real_escape_string() [http://www.php.net/function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/jZe6d on line 5 Warning: mysql_real_escape_string() [http://www.php.net/function.mysql-real-escape-string]: A link to the server could not be established in /in/jZe6d on line 5 select id, username from users where username='' and password''
Output for 4.3.0
wow Warning: mysql_real_escape_string() [http://www.php.net/function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/jZe6d on line 5 Warning: mysql_real_escape_string() [http://www.php.net/function.mysql-real-escape-string]: A link to the server could not be established in /in/jZe6d on line 5 Warning: mysql_real_escape_string() [http://www.php.net/function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/jZe6d on line 5 Warning: mysql_real_escape_string() [http://www.php.net/function.mysql-real-escape-string]: A link to the server could not be established in /in/jZe6d on line 5 select id, username from users where username='' and password''