3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function another() { echo "hello another"; $this->bingo(); } protected function test() { return 'pass'; } function bingo() { echo "talk"; } } class B extends A { public function run() { return $this->test(); } } $b = new B(); $b->another(); var_dump($b->run());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8GU3q
function name:  (null)
number of ops:  11
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
   27     3        INIT_METHOD_CALL                                         !0, 'another'
          4        DO_FCALL                                      0          
   29     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'run'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class A:
Function another:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8GU3q
function name:  another
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'hello+another'
    8     1        INIT_METHOD_CALL                                         'bingo'
          2        DO_FCALL                                      0          
    9     3      > RETURN                                                   null

End of function another

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

End of function test

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

End of function bingo

End of class A.

Class B:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8GU3q
function name:  run
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_METHOD_CALL                                         'test'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function run

Function another:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8GU3q
function name:  another
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'hello+another'
    8     1        INIT_METHOD_CALL                                         'bingo'
          2        DO_FCALL                                      0          
    9     3      > RETURN                                                   null

End of function another

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

End of function test

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

End of function bingo

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.4 ms | 1400 KiB | 15 Q