3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrTest = array(); $anonFunc = function () use (&$arrTest) { $arrTest['test'] = 'hello'; if (!isset($arrTest['test2'])) { return $arrTest['test2'] = 2; } }; var_dump($arrTest); var_dump($anonFunc());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vZ9Ru
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arrTest, !1 = $anonFunc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FvZ9Ru%3A3%240'
          2        BIND_LEXICAL                                             ~3, !0
          3        ASSIGN                                                   !1, ~3
   12     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   13     7        INIT_FCALL                                               'var_dump'
          8        INIT_DYNAMIC_CALL                                        !1
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FvZ9Ru%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vZ9Ru
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $arrTest
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BIND_STATIC                                              !0
    4     1        ASSIGN_DIM                                               !0, 'test'
          2        OP_DATA                                                  'hello'
    6     3        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      !0, 'test2'
          4        BOOL_NOT                                         ~3      ~2
          5      > JMPZ                                                     ~3, ->9
    7     6    >   ASSIGN_DIM                                       ~4      !0, 'test2'
          7        OP_DATA                                                  2
          8      > RETURN                                                   ~4
   10     9    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FvZ9Ru%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.01 ms | 1395 KiB | 15 Q