3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_startup_errors', 1); ini_set('display_errors', 1); error_reporting(-1); include 'dbconfig.php'; session_start(); if(!isset($_SESSION['user_session'])){ echo 'you are not authorised to view the page'; }else if(isset($_SESSION['user_session'])){ $stmt = $db_con->prepare('SELECT * FROM tbl_users WHERE user_id=:id_op'); $stmt->execute(array(':id_op'=>$_SESSION['user_session'])); $row=$stmt->fetch(PDO::FETCH_ASSOC); echo json_encode($row); }
Output for 8.5.1 - 8.5.3
Warning: include(dbconfig.php): Failed to open stream: No such file or directory in /in/ck3jH on line 7 Warning: include(): Failed opening 'dbconfig.php' for inclusion (include_path='.:') in /in/ck3jH on line 7 Warning: session_start(): Session cannot be started after headers have already been sent (sent from /in/ck3jH on line 7) in /in/ck3jH on line 9 you are not authorised to view the page
Output for 8.5.0
Warning: include(): open_basedir restriction in effect. File(dbconfig.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ck3jH on line 7 Warning: include(dbconfig.php): Failed to open stream: Operation not permitted in /in/ck3jH on line 7 Warning: include(): Failed opening 'dbconfig.php' for inclusion (include_path='.:') in /in/ck3jH on line 7 Warning: session_start(): Session cannot be started after headers have already been sent (sent from /in/ck3jH on line 7) in /in/ck3jH on line 9 you are not authorised to view the page
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18
Warning: include(): open_basedir restriction in effect. File(dbconfig.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ck3jH on line 7 Warning: include(dbconfig.php): Failed to open stream: Operation not permitted in /in/ck3jH on line 7 Warning: include(): Failed opening 'dbconfig.php' for inclusion (include_path='.:') in /in/ck3jH on line 7 Warning: session_start(): Session cannot be started after headers have already been sent in /in/ck3jH on line 9 you are not authorised to view the page
Output for 8.0.13
Warning: include(dbconfig.php): Failed to open stream: No such file or directory in /in/ck3jH on line 7 Warning: include(): Failed opening 'dbconfig.php' for inclusion (include_path='.:') in /in/ck3jH on line 7 Warning: session_start(): Session cannot be started after headers have already been sent in /in/ck3jH on line 9 you are not authorised to view the page
Output for 7.3.32 - 7.3.33, 7.4.33
Warning: include(dbconfig.php): failed to open stream: No such file or directory in /in/ck3jH on line 7 Warning: include(): Failed opening 'dbconfig.php' for inclusion (include_path='.:') in /in/ck3jH on line 7 Warning: session_start(): Cannot start session when headers already sent in /in/ck3jH on line 9 you are not authorised to view the page
Output for 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(dbconfig.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ck3jH on line 7 Warning: include(dbconfig.php): failed to open stream: Operation not permitted in /in/ck3jH on line 7 Warning: include(): Failed opening 'dbconfig.php' for inclusion (include_path='.:') in /in/ck3jH on line 7 Warning: session_start(): Cannot start session when headers already sent in /in/ck3jH on line 9 you are not authorised to view the page
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
Warning: include(): open_basedir restriction in effect. File(dbconfig.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ck3jH on line 7 Warning: include(dbconfig.php): failed to open stream: Operation not permitted in /in/ck3jH on line 7 Warning: include(): Failed opening 'dbconfig.php' for inclusion (include_path='.:') in /in/ck3jH on line 7 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/ck3jH:7) in /in/ck3jH on line 9 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/ck3jH:7) in /in/ck3jH on line 9 you are not authorised to view the page

preferences:
104.3 ms | 2145 KiB | 4 Q