3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected function getX() { return 10; } public function lol($y) { return $y * $this->getX(); } } class B extends A { protected function getX() { return 2; } } $bla = new B(); echo $bla->lol(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0C7Ls
function name:  (null)
number of ops:  8
compiled vars:  !0 = $bla
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'lol'
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class A:
Function getx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0C7Ls
function name:  getX
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   10
          1*     > RETURN                                                   null

End of function getx

Function lol:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0C7Ls
function name:  lol
number of ops:  6
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_METHOD_CALL                                         'getX'
          2        DO_FCALL                                      0  $1      
          3        MUL                                              ~2      !0, $1
          4      > RETURN                                                   ~2
    7     5*     > RETURN                                                   null

End of function lol

End of class A.

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

End of function getx

Function lol:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0C7Ls
function name:  lol
number of ops:  6
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_METHOD_CALL                                         'getX'
          2        DO_FCALL                                      0  $1      
          3        MUL                                              ~2      !0, $1
          4      > RETURN                                                   ~2
    7     5*     > RETURN                                                   null

End of function lol

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.86 ms | 1386 KiB | 13 Q