3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php include("config.sys.php"); mysql_connect($hostname, $username, $password) || die("Error!"); mysql_select_db($dbname); mysql_query('SET NAMES utf8'); $snn = array("vk", "mailru", "ok"); foreach ($snn as $snname) { $dbtable = "game_" . $snname; mysql_query("set @i=0"); mysql_query("update $dbtable set srank=(@i:=@i+1) order by topscore desc"); // echo mysql_error(); }
based on MeMC0
Output for 7.0.0 - 7.2.0
Warning: include(config.sys.php): failed to open stream: No such file or directory in /in/h8tnU on line 3 Warning: include(): Failed opening 'config.sys.php' for inclusion (include_path='.:') in /in/h8tnU on line 3 Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/h8tnU:4 Stack trace: #0 {main} thrown in /in/h8tnU on line 4
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Warning: include(config.sys.php): failed to open stream: No such file or directory in /in/h8tnU on line 3 Warning: include(): Failed opening 'config.sys.php' for inclusion (include_path='.:') in /in/h8tnU on line 3 Fatal error: Call to undefined function mysql_connect() in /in/h8tnU on line 4
Process exited with code 255.