3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $host = "1.2.3.4"; $usr = "root"; $pw = ""; $db = "x"; try { $mysqli = new Mysqli($host,$usr,$pw,$db); $connected = true; } catch (mysqli_sql_exception $e) { throw $e; }
based on NO0uM
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'Mysqli' not found in /in/iffYh:7 Stack trace: #0 {main} thrown in /in/iffYh on line 7
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Class 'Mysqli' not found in /in/iffYh on line 7
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/iffYh on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '{' in /in/iffYh on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/iffYh on line 6
Process exited with code 255.