3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); if (!isset($_SESSION["username"]) && !isset($_SESSION["s1"]) && !isset($_SESSION["s2"])) { header("Location:input.php"); } else { ini_set('display_errors', 'On'); $greeting = "Welcome " .$_SESSION["username"]. ", let's string your strings " .$_SESSION["s1"]. " and " .$_SESSION["s2"]. "!"; if (!isset($_GET["conxy"])) { $conxvar = ""; // function to conx+y with GET and append parameter to URL } else { $conxvar = "The strings x+y have been concatenated: ". $_SESSION["s1"].$_SESSION["s2"]; echo $conxvar; } if (!isset($_GET["conyx"])) { $conyvar = ""; // function to conx+y with GET and append parameter to URL } else { $conyvar = "The strings y+x have been concatenated: ". $_SESSION["s2"].$_SESSION["s1"]; echo $conyvar; } if (!isset($_GET["conyx"])) { $subvar = ""; // function to check substring with GET and append parameter to URL } else { $compareX = strpos($_SESSION["s2"], $_SESSION["s1"]); $compareY = strpos($_SESSION["s1"], $_SESSION["s2"]); if ($compareX !== false) { $subvar = "String ".$_SESSION["s1"]. " is a substring of " .$_SESSION["s2"]; } else { $subvar = "String ".$_SESSION["s1"]. " is NOT a substring of " .$_SESSION["s2"]; } if ($compareY !== false) { $subvar += " and string ".$_SESSION['s2']. " is a substring of " .$_SESSION['s1']; } else { $subvar += " and string ".$_SESSION['s2']. " is NOT a substring of " .$_SESSION['s1']; } echo $subvar; } }
Output for git.master, git.master_jit, rfc.property-hooks

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:
25.95 ms | 405 KiB | 5 Q