3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!isset($_SESSION)) { header("Location:input.php"); } else { $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 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '{' in /in/GttPF on line 9
Process exited with code 255.

preferences:
197.8 ms | 1395 KiB | 65 Q