3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function run() { return array('Bar', 'getValue'); } private static function getValue() { return 'Foo'; } } class Bar extends Foo { public static function getValue() { return 'Bar'; } } $x = new Bar; $y = $x->run(); echo $y();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4BO4V
function name:  (null)
number of ops:  10
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   24     3        INIT_METHOD_CALL                                         !0, 'run'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   25     6        INIT_DYNAMIC_CALL                                        !1
          7        DO_FCALL                                      0  $7      
          8        ECHO                                                     $7
          9      > RETURN                                                   1

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

End of function run

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

End of function getvalue

End of class Foo.

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

End of function getvalue

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

End of function run

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.43 ms | 1395 KiB | 13 Q