3v4l.org

run code in 300+ PHP versions simultaneously
<?php class InCommon { private $baz = 'foo'; public function out(){ echo "\nBAZ: ".$this->baz; } } class Foo extends InCommon { } class Bar extends InCommon { public function peek($target){ echo "\n".'peek: '.$target->baz; } public function mess($target){ $target->baz = 'cats'; } } $foo = new Foo(); $bar = new Bar(); $bar->mess($foo); $foo->out(); $bar->peek($foo); $bar->out();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vv3hM
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   22     3        NEW                                              $5      'Bar'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   24     6        INIT_METHOD_CALL                                         !1, 'mess'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
   25     9        INIT_METHOD_CALL                                         !0, 'out'
         10        DO_FCALL                                      0          
   27    11        INIT_METHOD_CALL                                         !1, 'peek'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0          
   28    14        INIT_METHOD_CALL                                         !1, 'out'
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Class InCommon:
Function out:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vv3hM
function name:  out
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'baz'
          1        CONCAT                                           ~1      '%0ABAZ%3A+', ~0
          2        ECHO                                                     ~1
    6     3      > RETURN                                                   null

End of function out

End of class InCommon.

Class Foo:
Function out:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vv3hM
function name:  out
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'baz'
          1        CONCAT                                           ~1      '%0ABAZ%3A+', ~0
          2        ECHO                                                     ~1
    6     3      > RETURN                                                   null

End of function out

End of class Foo.

Class Bar:
Function peek:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vv3hM
function name:  peek
number of ops:  5
compiled vars:  !0 = $target
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        FETCH_OBJ_R                                      ~1      !0, 'baz'
          2        CONCAT                                           ~2      '%0Apeek%3A+', ~1
          3        ECHO                                                     ~2
   16     4      > RETURN                                                   null

End of function peek

Function mess:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vv3hM
function name:  mess
number of ops:  4
compiled vars:  !0 = $target
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        ASSIGN_OBJ                                               !0, 'baz'
          2        OP_DATA                                                  'cats'
   19     3      > RETURN                                                   null

End of function mess

Function out:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vv3hM
function name:  out
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'baz'
          1        CONCAT                                           ~1      '%0ABAZ%3A+', ~0
          2        ECHO                                                     ~1
    6     3      > RETURN                                                   null

End of function out

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.25 ms | 1399 KiB | 13 Q