3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar { function __invoke(): string { return "hello"; } } } namespace { use Foo\Bar; function f() { $bar = new Bar(); $bar(); } f(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iDj8Z
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'f'
          1        DO_FCALL                                      0          
   21     2      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iDj8Z
function name:  f
number of ops:  6
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Foo%5CBar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_DYNAMIC_CALL                                        !0
          4        DO_FCALL                                      0          
   18     5      > RETURN                                                   null

End of function f

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

End of function __invoke

End of class Foo\Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.71 ms | 1401 KiB | 14 Q