3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Session{ public static function set($name, $value){ $path = explode('/', $name); $count = count($path); $_SESSION[$path[0]][$path[1]] = $value; } } $var = Session::set('mysql/host', '127.0.01'); echo $_SESSION['mysql']['host'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BLN1v
function name:  (null)
number of ops:  10
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'Session', 'set'
          1        SEND_VAL                                                 'mysql%2Fhost'
          2        SEND_VAL                                                 '127.0.01'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
   15     5        FETCH_R                      global              ~3      '_SESSION'
          6        FETCH_DIM_R                                      ~4      ~3, 'mysql'
          7        FETCH_DIM_R                                      ~5      ~4, 'host'
          8        ECHO                                                     ~5
          9      > RETURN                                                   1

Class Session:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BLN1v
function name:  set
number of ops:  16
compiled vars:  !0 = $name, !1 = $value, !2 = $path, !3 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2F'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !2, $4
    8     7        COUNT                                            ~6      !2
          8        ASSIGN                                                   !3, ~6
   10     9        FETCH_DIM_R                                      ~9      !2, 0
         10        FETCH_DIM_R                                      ~11     !2, 1
         11        FETCH_W                      global              $8      '_SESSION'
         12        FETCH_DIM_W                                      $10     $8, ~9
         13        ASSIGN_DIM                                               $10, ~11
         14        OP_DATA                                                  !1
   12    15      > RETURN                                                   null

End of function set

End of class Session.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.51 ms | 1395 KiB | 15 Q