3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = array(); $f = function() use (&$result) { $result['name'] = array(); }; $g = function() use ($result) { var_export($result); }; $f(); $g();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a2PgK
function name:  (null)
number of ops:  12
compiled vars:  !0 = $result, !1 = $f, !2 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fa2PgK%3A5%240'
          2        BIND_LEXICAL                                             ~4, !0
          3        ASSIGN                                                   !1, ~4
    9     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fa2PgK%3A9%241'
          5        BIND_LEXICAL                                             ~6, !0
          6        ASSIGN                                                   !2, ~6
   13     7        INIT_DYNAMIC_CALL                                        !1
          8        DO_FCALL                                      0          
   14     9        INIT_DYNAMIC_CALL                                        !2
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fa2PgK%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a2PgK
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    6     1        ASSIGN_DIM                                               !0, 'name'
          2        OP_DATA                                                  <array>
    7     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fa2PgK%3A5%240

Function %00%7Bclosure%7D%2Fin%2Fa2PgK%3A9%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a2PgK
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   BIND_STATIC                                              !0
   10     1        INIT_FCALL                                               'var_export'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   11     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fa2PgK%3A9%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.37 ms | 1396 KiB | 15 Q