3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vars = array(); $arrayKey = '[0][1]'; $vars[0][1] = "two levels deep"; $vars = function($str) use ($vars) { return eval('return $vars'.$str.';'); }; echo $vars($arrayKey);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6kOkH
function name:  (null)
number of ops:  13
compiled vars:  !0 = $vars, !1 = $arrayKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, '%5B0%5D%5B1%5D'
    6     2        FETCH_DIM_W                                      $4      !0, 0
          3        ASSIGN_DIM                                               $4, 1
          4        OP_DATA                                                  'two+levels+deep'
    8     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6kOkH%3A8%240'
          6        BIND_LEXICAL                                             ~6, !0
          7        ASSIGN                                                   !0, ~6
   13     8        INIT_DYNAMIC_CALL                                        !0
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $8      
         11        ECHO                                                     $8
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F6kOkH%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6kOkH
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $str, !1 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   10     2        CONCAT                                           ~2      'return+%24vars', !0
          3        CONCAT                                           ~3      ~2, '%3B'
          4        INCLUDE_OR_EVAL                                  $4      ~3, EVAL
          5      > RETURN                                                   $4
   11     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F6kOkH%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.74 ms | 1394 KiB | 13 Q