3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FileSessionHandler { private $savePath; function open($savePath, $sessionName) { return true; } function close() { return true; } function read($id) { return 'lol|s:222:"1";lol2|s:1:"1";'; } function write($id, $data) { } function destroy($id) { } function gc($maxlifetime) { } } $handler = new FileSessionHandler(); session_set_save_handler( array($handler, 'open'), array($handler, 'close'), array($handler, 'read'), array($handler, 'write'), array($handler, 'destroy'), array($handler, 'gc') ); register_shutdown_function('session_write_close'); session_start(); var_dump($_SESSION);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tWYcZ
function name:  (null)
number of ops:  33
compiled vars:  !0 = $handler
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   NEW                                              $1      'FileSessionHandler'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   39     3        INIT_FCALL                                               'session_set_save_handler'
   40     4        INIT_ARRAY                                       ~4      !0
          5        ADD_ARRAY_ELEMENT                                ~4      'open'
          6        SEND_VAL                                                 ~4
   41     7        INIT_ARRAY                                       ~5      !0
          8        ADD_ARRAY_ELEMENT                                ~5      'close'
          9        SEND_VAL                                                 ~5
   42    10        INIT_ARRAY                                       ~6      !0
         11        ADD_ARRAY_ELEMENT                                ~6      'read'
         12        SEND_VAL                                                 ~6
   43    13        INIT_ARRAY                                       ~7      !0
         14        ADD_ARRAY_ELEMENT                                ~7      'write'
         15        SEND_VAL                                                 ~7
   44    16        INIT_ARRAY                                       ~8      !0
         17        ADD_ARRAY_ELEMENT                                ~8      'destroy'
         18        SEND_VAL                                                 ~8
   45    19        INIT_ARRAY                                       ~9      !0
         20        ADD_ARRAY_ELEMENT                                ~9      'gc'
         21        SEND_VAL                                                 ~9
         22        DO_ICALL                                                 
   48    23        INIT_FCALL                                               'register_shutdown_function'
         24        SEND_VAL                                                 'session_write_close'
         25        DO_ICALL                                                 
   50    26        INIT_FCALL                                               'session_start'
         27        DO_ICALL                                                 
   51    28        INIT_FCALL                                               'var_dump'
         29        FETCH_R                      global              ~13     '_SESSION'
         30        SEND_VAL                                                 ~13
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Class FileSessionHandler:
Function open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tWYcZ
function name:  open
number of ops:  4
compiled vars:  !0 = $savePath, !1 = $sessionName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2      > RETURN                                                   <true>
   10     3*     > RETURN                                                   null

End of function open

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

End of function close

Function read:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tWYcZ
function name:  read
number of ops:  3
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1      > RETURN                                                   'lol%7Cs%3A222%3A%221%22%3Blol2%7Cs%3A1%3A%221%22%3B'
   20     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/tWYcZ
function name:  write
number of ops:  3
compiled vars:  !0 = $id, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   25     2      > RETURN                                                   null

End of function write

Function destroy:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tWYcZ
function name:  destroy
number of ops:  2
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   30     1      > 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/tWYcZ
function name:  gc
number of ops:  2
compiled vars:  !0 = $maxlifetime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   35     1      > RETURN                                                   null

End of function gc

End of class FileSessionHandler.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.72 ms | 1392 KiB | 21 Q