3v4l.org

run code in 500+ PHP versions simultaneously
<?php // 1. Iniciamos sesión para tener acceso a los datos que queremos borrar session_start(); // 2. Vaciamos el array de sesión por completo $_SESSION = array(); // 3. Borramos la cookie de sesión en el navegador (Seguridad Pro) if (ini_get("session.use_cookies")) { $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"] ); } // 4. Destruimos la sesión en el servidor session_destroy(); /** * 5. REDIRECCIÓN CRÍTICA * Si tu proyecto está en localhost/sigex, usa: header('Location: /sigex/index'); * Si usas el .htaccess que configuramos, simplemente "index" sin .php */ header('Location: ../index.php'); exit(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 29
Branch analysis from position: 8
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 29
filename:       /in/7o8d8
function name:  (null)
number of ops:  37
compiled vars:  !0 = $params
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'session_start'
          1        DO_ICALL                                                     
    6     2        FETCH_W                          global              $2      '_SESSION'
          3        ASSIGN                                                       $2, <array>
    9     4        INIT_FCALL                                                   'ini_get'
          5        SEND_VAL                                                     'session.use_cookies'
          6        DO_ICALL                                             $4      
          7      > JMPZ                                                         $4, ->29
   10     8    >   INIT_FCALL                                                   'session_get_cookie_params'
          9        DO_ICALL                                             $5      
         10        ASSIGN                                                       !0, $5
   11    11        INIT_FCALL                                                   'setcookie'
         12        INIT_FCALL                                                   'session_name'
         13        DO_ICALL                                             $7      
         14        SEND_VAR                                                     $7
         15        SEND_VAL                                                     ''
         16        INIT_FCALL                                                   'time'
         17        DO_ICALL                                             $8      
         18        SUB                                                  ~9      $8, 42000
         19        SEND_VAL                                                     ~9
   12    20        FETCH_DIM_R                                          ~10     !0, 'path'
         21        SEND_VAL                                                     ~10
         22        FETCH_DIM_R                                          ~11     !0, 'domain'
         23        SEND_VAL                                                     ~11
   13    24        FETCH_DIM_R                                          ~12     !0, 'secure'
         25        SEND_VAL                                                     ~12
         26        FETCH_DIM_R                                          ~13     !0, 'httponly'
         27        SEND_VAL                                                     ~13
   11    28        DO_ICALL                                                     
   18    29    >   INIT_FCALL                                                   'session_destroy'
         30        DO_ICALL                                                     
   25    31        INIT_FCALL                                                   'header'
         32        SEND_VAL                                                     'Location%3A+..%2Findex.php'
         33        DO_ICALL                                                     
   26    34      > INIT_FCALL                                                   'exit'
         35*       DO_ICALL                                                     
   27    36*     > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
132.39 ms | 489 KiB | 16 Q