3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function f1() { $allowed = false; $name = static::f2(); echo($name); } public function f2() { return "hello"; } } class B extends A { public function f2() { return "bye"; } } $b = new B; $b->f1();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZcI5S
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'f1'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZcI5S
function name:  f1
number of ops:  6
compiled vars:  !0 = $allowed, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <false>
    8     1        INIT_STATIC_METHOD_CALL                                  'f2'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !1, $3
    9     4        ECHO                                                     !1
   10     5      > RETURN                                                   null

End of function f1

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

End of function f2

End of class A.

Class B:
Function f2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZcI5S
function name:  f2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E > > RETURN                                                   'bye'
   22     1*     > RETURN                                                   null

End of function f2

Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZcI5S
function name:  f1
number of ops:  6
compiled vars:  !0 = $allowed, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <false>
    8     1        INIT_STATIC_METHOD_CALL                                  'f2'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !1, $3
    9     4        ECHO                                                     !1
   10     5      > RETURN                                                   null

End of function f1

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.97 ms | 1386 KiB | 13 Q