3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $arrayKey = '[0][1]'; $a[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/c6Lrs
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $arrayKey, !2 = $vars
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                                      $5      !0, 0
          3        ASSIGN_DIM                                               $5, 1
          4        OP_DATA                                                  'two+levels+deep'
    8     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fc6Lrs%3A8%240'
          6        BIND_LEXICAL                                             ~7, !2
          7        ASSIGN                                                   !2, ~7
   13     8        INIT_DYNAMIC_CALL                                        !2
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $9      
         11        ECHO                                                     $9
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fc6Lrs%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c6Lrs
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%2Fc6Lrs%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.01 ms | 939 KiB | 14 Q