3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); include('mysql.php'); $editFlag = $_POST['editFlag'] ?? false; $section = 1; require_once 'tools/HTMLPurifier.standalone.php'; $stmt = $link->prepare("INSERT INTO userContent (section, author, content) VALUES (?, ?, ?)"); $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); if ($editFlag != "1"){ $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $stmt . "<br>" . $link->error; } } else { $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $stmt . "<br>" . $link->error; } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: include(): open_basedir restriction in effect. File(mysql.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/iO73e on line 4 Warning: include(mysql.php): Failed to open stream: Operation not permitted in /in/iO73e on line 4 Warning: include(): Failed opening 'mysql.php' for inclusion (include_path='.:') in /in/iO73e 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/iO73e on line 7 Warning: require_once(tools/HTMLPurifier.standalone.php): Failed to open stream: Operation not permitted in /in/iO73e on line 7 Fatal error: Uncaught Error: Failed opening required 'tools/HTMLPurifier.standalone.php' (include_path='.:') in /in/iO73e:7 Stack trace: #0 {main} thrown in /in/iO73e on line 7
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.64 ms | 402 KiB | 8 Q