3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.61 ms | 1590 KiB | 14 Q