3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php$con = mysqli_connect("localhost","root","",'oefening'); if (mysqli_connect_errno()) {  echo "Failed to connect to MySQL: " . mysqli_connect_error();   exit(); if(mysqli_query($con,"INSERT INTO persons (voornaam , achternaam , leeftijd)            VALUES ('Peter', 'Griffin','35')")){     echo "De query is gelukt!";     } else {     echo "Please check your query and try again. The error is:" .mysqli_error($con);     } mysqli_close($con);?>
Output for 5.3.0 - 5.4.32
<?php$con = mysqli_connect("localhost","root","",'oefening'); if (mysqli_connect_errno()) {  echo "Failed to connect to MySQL: " . mysqli_connect_error();   exit(); if(mysqli_query($con,"INSERT INTO persons (voornaam , achternaam , leeftijd)            VALUES ('Peter', 'Griffin','35')")){     echo "De query is gelukt!";     } else {     echo "Please check your query and try again. The error is:" .mysqli_error($con);     } mysqli_close($con);?>