3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $hostname_pds = "localhost"; $database_pds = "pds"; $username_pds = "root"; $password_pds = ""; $pds = mysql_connect($hostname_pds, $username_pds, $password_pds) or trigger_error(mysql_error(),E_USER_ERROR); $query = "select emplid from statistics"; $result = mysql_query($query, $pds) or trigger_error('Query failed: ' . mysql_error($pds), E_USER_ERROR); while($result_row = mysql_fetch_assoc($result) ) { $emplid_val=$result_row['emplid']; $sql_text_tuition= "sqlplus -s 'gradsch_query/g18a4s3h@(DESCRIPTION =(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = CS900RPT.et.ncsu.edu)(PORT = 16210)))(CONNECT_DATA =(SERVICE_NAME = CS900RPT.et.ncsu.edu)))' @/etc/oracle/gsoars_residency_by_type $emplid_val"; $tuition_output1=""; $sql_line_tuition = exec($sql_text_tuition,$tuition_output1); }
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/5nPvK:6 Stack trace: #0 {main} thrown in /in/5nPvK on line 6
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2) in /in/5nPvK on line 6 Fatal error: Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2) in /in/5nPvK on line 6
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function mysql_connect() in /in/5nPvK on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/5nPvK on line 6 Fatal error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/5nPvK on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/5nPvK on line 6 Fatal error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/5nPvK on line 6