3v4l.org

run code in 500+ PHP versions simultaneously
<?php // This should work, but *not* generate a binding for $GLOBALS $a = 123; $fn = fn() => $GLOBALS['a']; var_dump($fn());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hj3Ki
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a, !1 = $fn
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, 123
    5     1        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          2        ASSIGN                                                       !1, ~3
    6     3        INIT_FCALL                                                   'var_dump'
          4        INIT_DYNAMIC_CALL                                            !1
          5        DO_FCALL                                          0  $5      
          6        SEND_VAR                                                     $5
          7        DO_ICALL                                                     
          8      > 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/Hj3Ki
function name:  {closure:/in/Hj3Ki:5}
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   FETCH_R                          global              ~0      'a'
          1      > RETURN                                                       ~0
          2*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
138.03 ms | 1309 KiB | 14 Q