3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fooList = [ new Foo, new Foo ]; $bar = new Bar($fooList); var_dump(empty($bar->fooList)); // true $fooList = $bar->fooList; var_dump(empty($fooList)); // false class Foo { } class Bar { protected $fooList = []; public function __construct(array $fooList) { $this->fooList = $fooList; } public function __get($property) { return $this->$property; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/meEFH
function name:  (null)
number of ops:  22
compiled vars:  !0 = $fooList, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~4      $2
    5     3        NEW                                              $5      'Foo'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~4      $5
    3     6        ASSIGN                                                   !0, ~4
    8     7        NEW                                              $8      'Bar'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $8
   10    11        INIT_FCALL                                               'var_dump'
         12        ISSET_ISEMPTY_PROP_OBJ                           ~11     !1, 'fooList'
         13        SEND_VAL                                                 ~11
         14        DO_ICALL                                                 
   12    15        FETCH_OBJ_R                                      ~13     !1, 'fooList'
         16        ASSIGN                                                   !0, ~13
   13    17        INIT_FCALL                                               'var_dump'
         18        ISSET_ISEMPTY_CV                                 ~15     !0
         19        SEND_VAL                                                 ~15
         20        DO_ICALL                                                 
   30    21      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/meEFH
function name:  __construct
number of ops:  4
compiled vars:  !0 = $fooList
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        ASSIGN_OBJ                                               'fooList'
          2        OP_DATA                                                  !0
   24     3      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/meEFH
function name:  __get
number of ops:  4
compiled vars:  !0 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   28     1        FETCH_OBJ_R                                      ~1      !0
          2      > RETURN                                                   ~1
   29     3*     > RETURN                                                   null

End of function __get

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.29 ms | 1401 KiB | 15 Q