3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php session_start(); extract(@$_SESSION); include('mysql.php'); extract($_POST); require_once 'tools/HTMLPurifier.standalone.php'; if (@$editFlag != "1"){ $author = $userID; $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); $clean_html = $purifier->purify($userContent); $clean_html = mysqli_real_escape_string($link, $clean_html); $stmt = $link->prepare("INSERT INTO userContent (section, author, content) VALUES (?, ?, ?)"); $stmt->bind_param("iis", $section, $author, $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $sql . "<br>" . $link->error; } } ?>
Output for 7.3.0rc3 - 7.3.0rc6
Warning: include(): open_basedir restriction in effect. File(mysql.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/4Cse1 on line 4 Warning: include(mysql.php): failed to open stream: Operation not permitted in /in/4Cse1 on line 4 Warning: include(): Failed opening 'mysql.php' for inclusion (include_path='.:') in /in/4Cse1 on line 4 Warning: require_once(): open_basedir restriction in effect. File(tools/HTMLPurifier.standalone.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/4Cse1 on line 7 Warning: require_once(tools/HTMLPurifier.standalone.php): failed to open stream: Operation not permitted in /in/4Cse1 on line 7 Fatal error: require_once(): Failed opening required 'tools/HTMLPurifier.standalone.php' (include_path='.:') in /in/4Cse1 on line 7
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.10, 7.2.0, 7.3.0alpha1 - 7.3.0beta1
Warning: include(mysql.php): failed to open stream: No such file or directory in /in/4Cse1 on line 4 Warning: include(): Failed opening 'mysql.php' for inclusion (include_path='.:') in /in/4Cse1 on line 4 Warning: require_once(tools/HTMLPurifier.standalone.php): failed to open stream: No such file or directory in /in/4Cse1 on line 7 Fatal error: require_once(): Failed opening required 'tools/HTMLPurifier.standalone.php' (include_path='.:') in /in/4Cse1 on line 7
Process exited with code 255.
Output for 7.1.20, 7.2.6
Warning: include(): open_basedir restriction in effect. File(mysql.php) is not within the allowed path(s): (/tmp:/in) in /in/4Cse1 on line 4 Warning: include(mysql.php): failed to open stream: Operation not permitted in /in/4Cse1 on line 4 Warning: include(): Failed opening 'mysql.php' for inclusion (include_path='.:') in /in/4Cse1 on line 4 Warning: require_once(): open_basedir restriction in effect. File(tools/HTMLPurifier.standalone.php) is not within the allowed path(s): (/tmp:/in) in /in/4Cse1 on line 7 Warning: require_once(tools/HTMLPurifier.standalone.php): failed to open stream: Operation not permitted in /in/4Cse1 on line 7 Fatal error: require_once(): Failed opening required 'tools/HTMLPurifier.standalone.php' (include_path='.:') in /in/4Cse1 on line 7
Process exited with code 255.
Output for hhvm-3.15.4
Warning: include(mysql.php): File not found in /in/4Cse1 on line 4 Fatal error: Uncaught Error: require_once(tools/HTMLPurifier.standalone.php): File not found in /in/4Cse1:7 Stack trace: #0 {main}
Process exited with code 255.