3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface invokable { public function __invoke(int $int) : string; } class Foo implements invokable { public function __invoke(int $int) : string { return 12; } } $foo = new Foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PY5s7
function name:  (null)
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'foo'
   16     1        NEW                                              $1      'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class invokable:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PY5s7
function name:  __invoke
number of ops:  3
compiled vars:  !0 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        VERIFY_RETURN_TYPE                                       
          2      > RETURN                                                   null

End of function __invoke

End of class invokable.

Class Foo:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PY5s7
function name:  __invoke
number of ops:  5
compiled vars:  !0 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        VERIFY_RETURN_TYPE                               ~1      12
          2      > RETURN                                                   ~1
   13     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __invoke

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.35 ms | 1393 KiB | 13 Q