3v4l.org

run code in 300+ PHP versions simultaneously
<?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].'"},'; } ?>
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
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 Warning: 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 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 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 Warning: 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 8.0.13
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 Warning: 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.4.33
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 7.0.5 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
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.32 - 7.3.33
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 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.0.0 - 7.0.4
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 unknown in /in/dAICv:5 Stack trace: #0 {main} thrown in /in/dAICv on line 5
Process exited with code 255.
Output for 5.6.0 - 5.6.40
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.

preferences:
252.13 ms | 402 KiB | 287 Q