3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_SESSION = array(); $_GET = array("token" => "Y", "uid"=> "4", "key"=>"md5"); $_SERVER["REQUEST_URI"] = "/register/Y/4/md5"; $Request = array(); $Request["URI"] = $_SERVER["REQUEST_URI"][0] == "/" ? substr($_SERVER["REQUEST_URI"], 1) : $_SERVER["REQUEST_URI"]; $Request["URI"] = substr($Request["URI"], 0, strlen($Request["URI"]) - strlen("/".$_GET["token"]."/".$_GET["uid"]."/".$_GET["key"])); 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>"); }
Output for 8.3.0 - 8.3.6
Warning: Undefined array key "TeachMe-Server" in /in/BmaDT on line 9 Warning: Trying to access array offset on null in /in/BmaDT on line 9 Warning: Undefined variable $RequestURI in /in/BmaDT on line 10 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/BmaDT on line 10 Warning: Undefined variable $Results in /in/BmaDT on line 11 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/BmaDT on line 11 Warning: Cannot modify header information - headers already sent by (output started at /in/BmaDT:9) in /in/BmaDT on line 13 <pre>Array ( [URI] => register ) </pre>
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Warning: Undefined array key "TeachMe-Server" in /in/BmaDT on line 9 Warning: Trying to access array offset on value of type null in /in/BmaDT on line 9 Warning: Undefined variable $RequestURI in /in/BmaDT on line 10 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/BmaDT on line 10 Warning: Undefined variable $Results in /in/BmaDT on line 11 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/BmaDT on line 11 Warning: Cannot modify header information - headers already sent by (output started at /in/BmaDT:9) in /in/BmaDT on line 13 <pre>Array ( [URI] => register ) </pre>
Output for 8.0.0 - 8.0.30
Warning: Undefined array key "TeachMe-Server" in /in/BmaDT on line 9 Warning: Trying to access array offset on value of type null in /in/BmaDT on line 9 Warning: Undefined variable $RequestURI in /in/BmaDT on line 10 Warning: Undefined variable $Results in /in/BmaDT on line 11 Warning: Cannot modify header information - headers already sent by (output started at /in/BmaDT:9) in /in/BmaDT on line 13 <pre>Array ( [URI] => register ) </pre>
Output for 7.4.0 - 7.4.33
Notice: Undefined index: TeachMe-Server in /in/BmaDT on line 9 Notice: Trying to access array offset on value of type null in /in/BmaDT on line 9 Notice: Undefined variable: RequestURI in /in/BmaDT on line 10 Notice: Undefined variable: Results in /in/BmaDT on line 11 Warning: Cannot modify header information - headers already sent by (output started at /in/BmaDT:9) in /in/BmaDT on line 13 <pre>Array ( [URI] => register ) </pre>
Output for 7.3.32 - 7.3.33
<pre>Array ( [URI] => register ) </pre>
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31
Notice: Undefined index: TeachMe-Server in /in/BmaDT on line 9 Notice: Undefined variable: RequestURI in /in/BmaDT on line 10 Notice: Undefined variable: Results in /in/BmaDT on line 11 Warning: Cannot modify header information - headers already sent by (output started at /in/BmaDT:9) in /in/BmaDT on line 13 <pre>Array ( [URI] => register ) </pre>
Output for 5.2.3 - 5.2.17
Notice: Undefined index: TeachMe-Server in /in/BmaDT on line 9 Notice: Undefined variable: RequestURI in /in/BmaDT on line 10 Notice: Undefined variable: Results in /in/BmaDT on line 11 Warning: Cannot modify header information - headers already sent by (output started at /in/BmaDT:9) in /in/BmaDT on line 13 <pre>Array ( [URI] => register ) </pre>
Output for 5.0.4 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
Notice: Undefined index: TeachMe-Server in /in/BmaDT on line 9 Notice: Undefined variable: RequestURI in /in/BmaDT on line 10 Notice: Undefined variable: Results in /in/BmaDT on line 11 <pre>Array ( [URI] => register ) </pre>
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.3
Notice: Undefined index: TeachMe-Server in /in/BmaDT on line 9 Notice: Undefined variable: RequestURI in /in/BmaDT on line 10 Notice: Undefined variable: Results in /in/BmaDT on line 11 <pre>Array ( [URI] => register ) </pre>

preferences:
187.99 ms | 402 KiB | 327 Q