3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo extends SessionHandler implements SessionHandlerInterface { public function __construct() { if (empty($_COOKIE['PHPSESSID']) OR is_array($_COOKIE['PHPSESSID']) OR $_COOKIE['PHPSESSID'] !== 'foobarbazqux') { unset($_COOKIE['PHPSESSID']); } } } $foo = new Foo(); ini_set('session.use_strict_mode', 1); session_set_save_handler($foo, false); session_start(); var_dump(session_id());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H77Yr
function name:  (null)
number of ops:  20
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'foo', 'sessionhandler'
   13     1        NEW                                              $1      'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   15     4        INIT_FCALL                                               'ini_set'
          5        SEND_VAL                                                 'session.use_strict_mode'
          6        SEND_VAL                                                 1
          7        DO_ICALL                                                 
   16     8        INIT_FCALL                                               'session_set_save_handler'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 <false>
         11        DO_ICALL                                                 
   19    12        INIT_FCALL                                               'session_start'
         13        DO_ICALL                                                 
   20    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'session_id'
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 12
Branch analysis from position: 7
filename:       /in/H77Yr
function name:  __construct
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_IS                                         ~0      '_COOKIE'
          1        ISSET_ISEMPTY_DIM_OBJ                         1  ~1      ~0, 'PHPSESSID'
          2      > JMPNZ_EX                                         ~1      ~1, ->7
          3    >   FETCH_R                      global              ~2      '_COOKIE'
          4        FETCH_DIM_R                                      ~3      ~2, 'PHPSESSID'
          5        TYPE_CHECK                                  128  ~4      ~3
          6        BOOL                                             ~1      ~4
          7    > > JMPNZ_EX                                         ~1      ~1, ->12
          8    >   FETCH_R                      global              ~5      '_COOKIE'
          9        FETCH_DIM_R                                      ~6      ~5, 'PHPSESSID'
         10        IS_NOT_IDENTICAL                                 ~7      ~6, 'foobarbazqux'
         11        BOOL                                             ~1      ~7
         12    > > JMPZ                                                     ~1, ->15
    8    13    >   FETCH_UNSET                                      $8      '_COOKIE'
         14        UNSET_DIM                                                $8, 'PHPSESSID'
   10    15    > > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.93 ms | 1400 KiB | 23 Q