3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_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 puhOT
Output for 5.2.3 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: _SESSION in /in/ii6BI on line 6 Notice: Undefined variable: RequestURI in /in/ii6BI on line 7 Notice: Undefined variable: Results in /in/ii6BI on line 8 Warning: Cannot modify header information - headers already sent by (output started at /in/ii6BI:6) in /in/ii6BI on line 10 <pre>Array ( [URI] => register/Y/4/md5 ) </pre>
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: TeachMe-Server in /in/ii6BI on line 6 Notice: Undefined variable: RequestURI in /in/ii6BI on line 7 Notice: Undefined variable: Results in /in/ii6BI on line 8 <pre>Array ( [URI] => register/Y/4/md5 ) </pre>
Output for 5.0.4 - 5.2.2
Notice: Undefined variable: _SESSION in /in/ii6BI on line 6 Notice: Undefined variable: RequestURI in /in/ii6BI on line 7 Notice: Undefined variable: Results in /in/ii6BI on line 8 <pre>Array ( [URI] => register/Y/4/md5 ) </pre>
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: _SESSION in /in/ii6BI on line 6 Notice: Undefined variable: RequestURI in /in/ii6BI on line 7 Notice: Undefined variable: Results in /in/ii6BI on line 8 <pre>Array ( [URI] => register/Y/4/md5 ) </pre>