3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); class SessionSaveHandler { public function __construct() { session_set_save_handler( array($this, 'open'), array($this, 'close'), array($this, 'read'), array($this, 'write'), array($this, 'destroy'), array($this, 'gc') ); register_shutdown_function('session_write_close'); } public function open($savePath, $sessionName) { return true; } public function close() { return true; } public function read($id) { global $memcachedConnection; return $memcachedConnection->get($id); } public function write($id, $data) { global $memcachedConnection; $memcachedConnection->set($id, $data, 3600); } public function destroy($id) { global $memcachedConnection; $memcachedConnection->delete($id); return true; } public function gc($maxlifetime) { return true; } } $sessionHandler = new SessionSaveHandler();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gUrJX
function name:  (null)
number of ops:  6
compiled vars:  !0 = $sessionHandler
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
   61     2        NEW                                              $2      'SessionSaveHandler'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
          5      > RETURN                                                   1

Class SessionSaveHandler:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gUrJX
function name:  __construct
number of ops:  30
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'session_set_save_handler'
   11     1        FETCH_THIS                                       ~0      
          2        INIT_ARRAY                                       ~1      ~0
          3        ADD_ARRAY_ELEMENT                                ~1      'open'
          4        SEND_VAL                                                 ~1
   12     5        FETCH_THIS                                       ~2      
          6        INIT_ARRAY                                       ~3      ~2
          7        ADD_ARRAY_ELEMENT                                ~3      'close'
          8        SEND_VAL                                                 ~3
   13     9        FETCH_THIS                                       ~4      
         10        INIT_ARRAY                                       ~5      ~4
         11        ADD_ARRAY_ELEMENT                                ~5      'read'
         12        SEND_VAL                                                 ~5
   14    13        FETCH_THIS                                       ~6      
         14        INIT_ARRAY                                       ~7      ~6
         15        ADD_ARRAY_ELEMENT                                ~7      'write'
         16        SEND_VAL                                                 ~7
   15    17        FETCH_THIS                                       ~8      
         18        INIT_ARRAY                                       ~9      ~8
         19        ADD_ARRAY_ELEMENT                                ~9      'destroy'
         20        SEND_VAL                                                 ~9
   16    21        FETCH_THIS                                       ~10     
         22        INIT_ARRAY                                       ~11     ~10
         23        ADD_ARRAY_ELEMENT                                ~11     'gc'
         24        SEND_VAL                                                 ~11
         25        DO_ICALL                                                 
   19    26        INIT_FCALL                                               'register_shutdown_function'
         27        SEND_VAL                                                 'session_write_close'
         28        DO_ICALL                                                 
   20    29      > RETURN                                                   null

End of function __construct

Function open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gUrJX
function name:  open
number of ops:  4
compiled vars:  !0 = $savePath, !1 = $sessionName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   24     2      > RETURN                                                   <true>
   25     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/gUrJX
function name:  close
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E > > RETURN                                                   <true>
   30     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/gUrJX
function name:  read
number of ops:  7
compiled vars:  !0 = $id, !1 = $memcachedConnection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   34     1        BIND_GLOBAL                                              !1, 'memcachedConnection'
   36     2        INIT_METHOD_CALL                                         !1, 'get'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
   37     6*     > 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/gUrJX
function name:  write
number of ops:  9
compiled vars:  !0 = $id, !1 = $data, !2 = $memcachedConnection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   41     2        BIND_GLOBAL                                              !2, 'memcachedConnection'
   43     3        INIT_METHOD_CALL                                         !2, 'set'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        SEND_VAL_EX                                              3600
          7        DO_FCALL                                      0          
   44     8      > 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/gUrJX
function name:  destroy
number of ops:  7
compiled vars:  !0 = $id, !1 = $memcachedConnection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   RECV                                             !0      
   48     1        BIND_GLOBAL                                              !1, 'memcachedConnection'
   50     2        INIT_METHOD_CALL                                         !1, 'delete'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
   52     5      > RETURN                                                   <true>
   53     6*     > 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/gUrJX
function name:  gc
number of ops:  3
compiled vars:  !0 = $maxlifetime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   55     0  E >   RECV                                             !0      
   57     1      > RETURN                                                   <true>
   58     2*     > RETURN                                                   null

End of function gc

End of class SessionSaveHandler.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.11 ms | 1404 KiB | 19 Q