3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 'foo'; define('C', static fn (array $bar): array => [$foo, $bar]); var_dump((C)(['bar'])); #[SomeAttr(C)] function baz() {}
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMY4W
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo'
    5     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'C'
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        BIND_LEXICAL                                             ~2, !0
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'var_dump'
          8        FETCH_CONSTANT                                   ~4      'C'
          9        INIT_DYNAMIC_CALL                                        ~4
         10        SEND_VAL_EX                                              <array>
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
   10    14      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMY4W
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $bar, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_ARRAY                                       ~2      !1
          3        ADD_ARRAY_ELEMENT                                ~2      !0
          4        VERIFY_RETURN_TYPE                                       ~2
          5      > RETURN                                                   ~2
          6*       VERIFY_RETURN_TYPE                                       
          7*     > RETURN                                                   null

End of Dynamic Function 0

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMY4W
function name:  baz
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null

End of function baz

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.63 ms | 1000 KiB | 15 Q