3v4l.org

run code in 500+ PHP versions simultaneously
<?php function initialize_properties_here($object) { $object->bar = 123; } class Foo { public int $bar; public function __construct() { unset($this->bar); } public function __get(string $name) { initialize_properties_here($this); } } var_dump((new Foo())->bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bsHXH
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                                   'var_dump'
          1        NEW                                                  $0      'Foo'
          2        DO_FCALL                                          0          
          3        FETCH_OBJ_R                                          ~2      $0, 'bar'
          4        SEND_VAL                                                     ~2
          5        DO_ICALL                                                     
          6      > RETURN                                                       1

Function initialize_properties_here:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bsHXH
function name:  initialize_properties_here
number of ops:  4
compiled vars:  !0 = $object
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        ASSIGN_OBJ                                                   !0, 'bar'
          2        OP_DATA                                                      123
    5     3      > RETURN                                                       null

End of function initialize_properties_here

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bsHXH
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   UNSET_OBJ                                                    'bar'
   12     1      > 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/bsHXH
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
   15     1        INIT_FCALL                                                   'initialize_properties_here'
          2        FETCH_THIS                                           ~1      
          3        SEND_VAL                                                     ~1
          4        DO_FCALL                                          0          
   16     5      > RETURN                                                       null

End of function __get

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
179.39 ms | 2801 KiB | 15 Q