3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Some { public $one = '1'; } class Registry { public static $list = []; public static function set($key, $var) { self::$list[$key] = $var; } public static function get($key) { return self::$list[$key]; } } $product = new Some(); Registry::set('product', $product); var_dump(Registry::get('product'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oEnpD
function name:  (null)
number of ops:  14
compiled vars:  !0 = $product
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Some'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_STATIC_METHOD_CALL                                  'Registry', 'set'
          4        SEND_VAL                                                 'product'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
   21     7        INIT_FCALL                                               'var_dump'
          8        INIT_STATIC_METHOD_CALL                                  'Registry', 'get'
          9        SEND_VAL                                                 'product'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Some: [no user functions]
Class Registry:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oEnpD
function name:  set
number of ops:  6
compiled vars:  !0 = $key, !1 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        FETCH_STATIC_PROP_W          global              $2      'list'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
   13     5      > RETURN                                                   null

End of function set

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oEnpD
function name:  get
number of ops:  5
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        FETCH_STATIC_PROP_R          unknown             ~1      'list'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   17     4*     > RETURN                                                   null

End of function get

End of class Registry.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.72 ms | 1396 KiB | 15 Q