3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<html> <head> <title>BeagleBone Temperatur</title> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Messzeit', 'Temperatur'], <?php $con = mysqli_connect("localhost", "root", "", "casa_db"); $query = "SELECT * FROM TempTable"; $result = mysqli_query($con, $query); mysqli_close($con); while ($row = mysqli_fetch_array($result)) { $time = $row['Messzeit']; $temp = $row['Temperatur']; echo "['$time', $temp],"; } ?> ]); var options = { title: 'BeagleBone gemessene Temperatur', vAxis: { title: "Grad Celsius" } }; var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(data, options); } </script> </head> <body> <div id="chart_div" style="width: 900px; height: 500px;"></div> </body> </html>
based on gBQgI
Output for 7.0.0 - 7.2.0
<html> <head> <title>BeagleBone Temperatur</title> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Messzeit', 'Temperatur'], Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /in/0I0RY:19 Stack trace: #0 {main} thrown in /in/0I0RY on line 19
Process exited with code 255.
Output for 5.3.20 - 5.6.28
<html> <head> <title>BeagleBone Temperatur</title> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Messzeit', 'Temperatur'], Fatal error: Call to undefined function mysqli_connect() in /in/0I0RY on line 19
Process exited with code 255.