3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function getBar() { return new Bar(); } } class Bar { public function __invoke() { echo 'Bar!'; } } ((new Foo)->getBar())();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vWCUH
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'getBar'
          3        DO_FCALL                                      0  $2      
          4        INIT_DYNAMIC_CALL                                        $2
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function getbar

End of class Foo.

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

End of function __invoke

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.42 ms | 939 KiB | 14 Q