3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Récupère les colonnes présents J+ dans la table boiti_evenet_queue_time pour l'affichage include("db.php"); $req_columns = 'SELECT column_name as nom_colonne FROM information_schema.columns WHERE table_name = "boiti_event_queue_time" AND table_schema="ptc_stat"'; $req_columns = $bdd->prepare($req_columns); $req_columns->execute() or die('Erreur : '.$req_columns->errorInfo().''); $req_columns = $req_columns->fetchAll(PDO::FETCH_ASSOC); $length = count($req_columns); for ($i = 1; $i < $length; $i++) { echo '{title:"'.$req_columns[$i][nom_colonne].'",field:"'.$req_columns[$i][nom_colonne].'"},'; } ?>
based on cqXmu
Output for 7.0.28 - 7.2.11, 7.3.0rc1 - 7.3.0rc3
Warning: include(): open_basedir restriction in effect. File(db.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/dAICv on line 3 Warning: include(db.php): failed to open stream: Operation not permitted in /in/dAICv on line 3 Warning: include(): Failed opening 'db.php' for inclusion (include_path='.:') in /in/dAICv on line 3 Notice: Undefined variable: bdd in /in/dAICv on line 5 Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/dAICv:5 Stack trace: #0 {main} thrown in /in/dAICv on line 5
Process exited with code 255.
Output for 7.3.0alpha1 - 7.3.0beta3
Warning: include(db.php): failed to open stream: No such file or directory in /in/dAICv on line 3 Warning: include(): Failed opening 'db.php' for inclusion (include_path='.:') in /in/dAICv on line 3 Notice: Undefined variable: bdd in /in/dAICv on line 5 Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/dAICv:5 Stack trace: #0 {main} thrown in /in/dAICv on line 5
Process exited with code 255.
Output for 5.6.38
Warning: include(): open_basedir restriction in effect. File(db.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/dAICv on line 3 Warning: include(db.php): failed to open stream: Operation not permitted in /in/dAICv on line 3 Warning: include(): Failed opening 'db.php' for inclusion (include_path='.:') in /in/dAICv on line 3 Notice: Undefined variable: bdd in /in/dAICv on line 5 Fatal error: Call to a member function prepare() on null in /in/dAICv on line 5
Process exited with code 255.