3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { function foo(callable $fn): void { $fn(); } function a() { $this->foo(function () { echo "yo"; }); } function b() { $this->foo(static function () { echo "yo"; }); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WXcdD
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                       1

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

End of function foo

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WXcdD
function name:  a
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_METHOD_CALL                                             'foo'
          1        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
          2        SEND_VAL_EX                                                  ~0
          3        DO_FCALL                                          0          
          4      > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WXcdD
function name:  {closure:Foo::a():5}
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
          0  E >   ECHO                                                         'yo'
          1      > RETURN                                                       null

End of Dynamic Function 0

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WXcdD
function name:  b
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   INIT_METHOD_CALL                                             'foo'
          1        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
          2        SEND_VAL_EX                                                  ~0
          3        DO_FCALL                                          0          
          4      > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WXcdD
function name:  {closure:Foo::b():6}
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
          0  E >   ECHO                                                         'yo'
          1      > RETURN                                                       null

End of Dynamic Function 0

End of function b

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.26 ms | 1370 KiB | 13 Q