3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements SessionHandlerInterface { public function close() { return true; } public function destroy($session_id) { return true; } public function gc($maxlifetime) { return true; } public function open($save_path, $session_name) { return true; } public function read($session_id) { return 'testtest|s:7:"testing";'; } public function write($session_id, $session_data) { var_dump(session_status()); return true; } } $test = new Test(); session_set_save_handler($test); session_start(); session_write_close(); var_dump(PHP_SESSION_NONE ); var_dump(PHP_SESSION_ACTIVE );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Z6NJ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'test'
   37     1        NEW                                              $1      'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   38     4        INIT_FCALL                                               'session_set_save_handler'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   39     7        INIT_FCALL                                               'session_start'
          8        DO_ICALL                                                 
   40     9        INIT_FCALL                                               'session_write_close'
         10        DO_ICALL                                                 
   41    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAL                                                 1
         13        DO_ICALL                                                 
   42    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAL                                                 2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class Test:
Function close:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Z6NJ
function name:  close
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   <true>
    8     1*     > RETURN                                                   null

End of function close

Function destroy:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Z6NJ
function name:  destroy
number of ops:  3
compiled vars:  !0 = $session_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1      > RETURN                                                   <true>
   13     2*     > RETURN                                                   null

End of function destroy

Function gc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Z6NJ
function name:  gc
number of ops:  3
compiled vars:  !0 = $maxlifetime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1      > RETURN                                                   <true>
   18     2*     > RETURN                                                   null

End of function gc

Function open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Z6NJ
function name:  open
number of ops:  4
compiled vars:  !0 = $save_path, !1 = $session_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   22     2      > RETURN                                                   <true>
   23     3*     > RETURN                                                   null

End of function open

Function read:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Z6NJ
function name:  read
number of ops:  3
compiled vars:  !0 = $session_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
   27     1      > RETURN                                                   'testtest%7Cs%3A7%3A%22testing%22%3B'
   28     2*     > RETURN                                                   null

End of function read

Function write:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Z6NJ
function name:  write
number of ops:  9
compiled vars:  !0 = $session_id, !1 = $session_data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   32     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'session_status'
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
   33     7      > RETURN                                                   <true>
   34     8*     > RETURN                                                   null

End of function write

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.57 ms | 1400 KiB | 23 Q