Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php // Start the session session_start(); // Unset all session variables session_u..

Decoded Output download

<?php 
// Start the session 
session_start(); 
 
// Unset all session variables 
session_unset(); 
 
// Destroy the session 
session_destroy(); 
 
// Optionally, you can also delete the session cookie if it's set 
if (ini_get("session.use_cookies")) { 
    $params = session_get_cookie_params(); 
    setcookie(session_name(), '', time() - 42000, 
        $params["path"], $params["domain"], 
        $params["secure"], $params["httponly"] 
    ); 
} 
 
// Redirect to a login page or homepage 
header("Location: login.php"); // Replace with your login page or homepage URL 
exit(); 
?>

Did this file decode correctly?

Original Code

<?php
// Start the session
session_start();

// Unset all session variables
session_unset();

// Destroy the session
session_destroy();

// Optionally, you can also delete the session cookie if it's set
if (ini_get("session.use_cookies")) {
    $params = session_get_cookie_params();
    setcookie(session_name(), '', time() - 42000,
        $params["path"], $params["domain"],
        $params["secure"], $params["httponly"]
    );
}

// Redirect to a login page or homepage
header("Location: login.php"); // Replace with your login page or homepage URL
exit();
?>

Function Calls

session_start 1
session_unset 1

Variables

None

Stats

MD5 e726904b702f78ec27c9c3b4e17fb497
Eval Count 0
Decode Time 42 ms