3v4l.org

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

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

End of function getfoo

End of class Foo.

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

End of function getfoo

End of class Bar.

Class Baz:
Function getfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UebMF
function name:  getFoo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1        CONCAT                                           ~1      ~0, 'yay'
          2        ECHO                                                     ~1
   17     3      > RETURN                                                   null
   18     4*     > RETURN                                                   null

End of function getfoo

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.36 ms | 1395 KiB | 13 Q