3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $_bar = 'baz'; public function __construct() { $array = array(&$this->_bar); foreach ($array as &$field) { $field = 'bat'; } } } $foo = new Foo; echo $foo->_bar;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/No97s
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        FETCH_OBJ_R                                      ~4      !0, '_bar'
          4        ECHO                                                     ~4
          5      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 126) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/No97s
function name:  __construct
number of ops:  9
compiled vars:  !0 = $array, !1 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_OBJ_W                                      $2      '_bar'
          1        INIT_ARRAY                                       ~3      $2
          2        ASSIGN                                                   !0, ~3
    7     3      > FE_RESET_RW                                      $5      !0, ->7
          4    > > FE_FETCH_RW                                              $5, !1, ->7
    8     5    >   ASSIGN                                                   !1, 'bat'
    7     6      > JMP                                                      ->4
          7    >   FE_FREE                                                  $5
   10     8      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.01 ms | 1393 KiB | 13 Q