3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $foo; public function x() { return $this->foo; } } class Bar extends Foo { public function woo() { $foo = new Foo(); $foo->foo = "yo"; echo $foo->x(); } } $bar = new Bar(); $bar->woo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZ1QB
function name:  (null)
number of ops:  6
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'woo'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZ1QB
function name:  x
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1      > RETURN                                                   ~0
          2*     > RETURN                                                   null

End of function x

End of class Foo.

Class Bar:
Function woo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZ1QB
function name:  woo
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        ASSIGN_OBJ                                               !0, 'foo'
          4        OP_DATA                                                  'yo'
   12     5        INIT_METHOD_CALL                                         !0, 'x'
          6        DO_FCALL                                      0  $5      
          7        ECHO                                                     $5
   13     8      > RETURN                                                   null

End of function woo

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZ1QB
function name:  x
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1      > RETURN                                                   ~0
          2*     > RETURN                                                   null

End of function x

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 1395 KiB | 13 Q