3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { use Some; function bar () { echo "this is bar" . PHP_EOL; } } trait Some { abstract function bar(); function useBar() { echo "using parent bar function" . PHP_EOL; $this->bar(); } } (new Foo())->useBar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sT2Oh
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'foo'
   21     1        NEW                                                  $0      'Foo'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'useBar'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sT2Oh
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                         'this+is+bar%0A'
    8     1      > RETURN                                                       null

End of function bar

End of class Foo.

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

End of function bar

Function usebar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sT2Oh
function name:  useBar
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                         'using+parent+bar+function%0A'
   17     1        INIT_METHOD_CALL                                             'bar'
          2        DO_FCALL                                          0          
   18     3      > RETURN                                                       null

End of function usebar

End of class Some.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
148.23 ms | 483 KiB | 9 Q