3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { function call($do); } class C implements I { function call(callable $do) { $do(); } } $c = new C; $c->call(function(){});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qPhp4
function name:  (null)
number of ops:  9
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'c'
   13     1        NEW                                              $1      'C'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   15     4        INIT_METHOD_CALL                                         !0, 'call'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FqPhp4%3A15%241'
          6        SEND_VAL_EX                                              ~4
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FqPhp4%3A15%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qPhp4
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FqPhp4%3A15%241

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

End of function call

End of class I.

Class C:
Function call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qPhp4
function name:  call
number of ops:  4
compiled vars:  !0 = $do
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_DYNAMIC_CALL                                        !0
          2        DO_FCALL                                      0          
   10     3      > RETURN                                                   null

End of function call

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.38 ms | 1394 KiB | 13 Q