3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $db = mysqli_connect("162.243.243.156","root","root", "January12"); if ($db->connect_error) { die('Connect Error: ' . $db->connect_error); } $result1 = mysqli_query("SELECT * from Apple ORDER BY Date ASC", $db); $result2 = mysqli_query("SELECT * from Google ORDER BY Date ASC", $db); $Apple = array(); $Google = array(); echo "well..."; while (($row1 = mysqli_fetch_array($result1)) && ($row2 = mysqli_fetch_array($result2))) { echo "is it the date fetch?"; $Date1 = $row1["Date"]->fetch_row($result1); $Date2 = $row2["Date"]->fetch_row($result2); echo "maybe..."; if ($Date1 == $Date2) { $Apple = $row1["Close Price"]->fetch_all(MYSQLI_NUM); $Google = $row2["Close Price"]->fetch_all(MYSQLI_NUM); echo "it worked"; } } ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /in/NjWgp:2 Stack trace: #0 {main} thrown in /in/NjWgp on line 2
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: mysql_connect(): Can't connect to MySQL server on '162.243.243.156' (101) Notice: Cannot access property on non-object in /in/NjWgp on line 3 Catchable fatal error: Argument 1 passed to mysqli_query() must be an instance of mysqli, string given in /in/NjWgp on line 8
Process exited with code 255.
Output for 5.0.0 - 5.6.21
Fatal error: Call to undefined function mysqli_connect() in /in/NjWgp on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: mysqli_connect() in /in/NjWgp on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: mysqli_connect() in /in/NjWgp on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: mysqli_connect() in /in/NjWgp on line 2