XHTMLDBG Lotto Test with Session Cookies

"next number" "bonus number" "restore session"
array(1) {
  [0]=>
  int(46)
}
NULL
string(26) "n3f2v8c10rjok56s61skhsofv5"
         
if (!isset($_SESSION["LOTTO"])) {
   session_name("LOTTO");
   session_set_cookie_params(0,"/","." . $_SERVER['HTTP_HOST'],false,true);
   session_start();
}

if ( isset($_GET['RESTORE'] ) )
{
   $_SESSION["LOTTO"]["ARR"] = array();
   session_regenerate_id();
   session_destroy();
   header( "location: " . $_SERVER['PHP_SELF'] . "" );
}
else
{
   $_SESSION["LOTTO"]["ARR"] = range(1, 50);

   srand ((float)microtime() * 1000000);

   shuffle($_SESSION["LOTTO"]["ARR"]);

   $n = rand(1, count($_SESSION["LOTTO"]["ARR"]) - 1);

   for ($i = 0;$i < count($_SESSION["LOTTO"]["ARR"]); $i++)
   {
      if (($i == $n) && (count(@$_SESSION["LOTTO"]["ZAHLEN"]) < 6))
      {
         $_SESSION["LOTTO"]["ZAHLEN"][] = array_pop($_SESSION["LOTTO"]["ARR"]);

         if (isset($z) && is_integer($z)) {
               echo $z;
               break;
         }
      }
      elseif (isset($_GET["ZUSATZZAHL"]) && !isset($_SESSION["LOTTO"]["ZUSATZZAHL"]))
      {
         $_SESSION["LOTTO"]["ZUSATZZAHL"] = rand(1, 50);
      }
   }
}