3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { } class B { } class Cache { protected $store = array(); public function store($object) { $this->store[] = $object; } public function gc() { foreach ($this->store as $object) { debug_zval_dump($object); } } } $cache = new Cache(); $cache->store($a = new A); $cache->store(new B); $cache->gc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLFBj
function name:  (null)
number of ops:  17
compiled vars:  !0 = $cache, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $2      'Cache'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   29     3        INIT_METHOD_CALL                                         !0, 'store'
          4        NEW                                              $5      'A'
          5        DO_FCALL                                      0          
          6        ASSIGN                                           ~7      !1, $5
          7        SEND_VAL_EX                                              ~7
          8        DO_FCALL                                      0          
   30     9        INIT_METHOD_CALL                                         !0, 'store'
         10        NEW                                              $9      'B'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $9
         13        DO_FCALL                                      0          
   32    14        INIT_METHOD_CALL                                         !0, 'gc'
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]
Class Cache:
Function store:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLFBj
function name:  store
number of ops:  5
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        FETCH_OBJ_W                                      $1      'store'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   18     4      > RETURN                                                   null

End of function store

Function gc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/SLFBj
function name:  gc
number of ops:  9
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   FETCH_OBJ_R                                      ~1      'store'
          1      > FE_RESET_R                                       $2      ~1, ->7
          2    > > FE_FETCH_R                                               $2, !0, ->7
   23     3    >   INIT_FCALL                                               'debug_zval_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   22     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $2
   25     8      > RETURN                                                   null

End of function gc

End of class Cache.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.43 ms | 1400 KiB | 15 Q