3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_SESSION = array(); $_SERVER["REQUEST_URI"] = "/register/Y/4/md5"; $Request = array(); $Request["URI"] = $_SERVER["REQUEST_URI"][0] == "/" ? substr($_SERVER["REQUEST_URI"], 1) : $_SERVER["REQUEST_URI"]; if($_SESSION["TeachMe-Server"]["loggedin"] !== true && !(substr($RequestURI, 0, strpos("/", $Request["URI"])) == "register" || substr($Results, 0, strpos("/", $Request["URI"])) == "login")) { header("X-API-Status: 40201 Login Required"); die("<pre>".print_r($Request, true)."</pre>"); }
based on ii6BI
Output for 5.3.0 - 7.1.10
Notice: Undefined index: TeachMe-Server in /in/Ur383 on line 7 Notice: Undefined variable: RequestURI in /in/Ur383 on line 8 Notice: Undefined variable: Results in /in/Ur383 on line 9 Warning: Cannot modify header information - headers already sent by (output started at /in/Ur383:7) in /in/Ur383 on line 11 <pre>Array ( [URI] => register/Y/4/md5 ) </pre>
Output for 5.2.3 - 5.2.17
Notice: Undefined index: TeachMe-Server in /in/Ur383 on line 7 Notice: Undefined variable: RequestURI in /in/Ur383 on line 8 Notice: Undefined variable: Results in /in/Ur383 on line 9 Warning: Cannot modify header information - headers already sent by (output started at /in/Ur383:7) in /in/Ur383 on line 11 <pre>Array ( [URI] => register/Y/4/md5 ) </pre>
Output for 5.0.4 - 5.2.2
Notice: Undefined index: TeachMe-Server in /in/Ur383 on line 7 Notice: Undefined variable: RequestURI in /in/Ur383 on line 8 Notice: Undefined variable: Results in /in/Ur383 on line 9 <pre>Array ( [URI] => register/Y/4/md5 ) </pre>
Output for 4.3.0 - 5.0.3
Notice: Undefined index: TeachMe-Server in /in/Ur383 on line 7 Notice: Undefined variable: RequestURI in /in/Ur383 on line 8 Notice: Undefined variable: Results in /in/Ur383 on line 9 <pre>Array ( [URI] => register/Y/4/md5 ) </pre>