3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function lorem($d) { $i = 2; if($d == true) { $i = $i + 10; } else { $i = $i * 10; } } mysql_connect('lorem'); echo lorem(true);
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/1FgLo:11 Stack trace: #0 {main} thrown in /in/1FgLo on line 11
Process exited with code 255.
Output for hhvm-3.10.0 - 3.13.2
Warning: mysql_connect(): Unknown MySQL server host 'lorem' (111) in /in/1FgLo on line 11
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function mysql_connect() in /in/1FgLo on line 11
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: mysql_connect(): Unknown MySQL Server Host 'lorem' (0) in /in/1FgLo on line 11
Output for 4.3.0 - 4.3.1
Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: Unknown MySQL Server Host 'lorem' (0) in /in/1FgLo on line 11