3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '[ "example2" => "index.php", "submenu" => ["name" => "sub menu","hi" => "index.php","hello" => "index.php"], "example3" => "index.php" ]'; $arr = eval("return $string;"); foreach($arr as $foo){ if (is_array($foo)) { foreach ($foo as $key => $val) { echo "$key => $val\n"; } } else { echo "$foo\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 25
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 25
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 19
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/vgtJZ
function name:  (null)
number of ops:  27
compiled vars:  !0 = $string, !1 = $arr, !2 = $foo, !3 = $val, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B+%22example2%22+%3D%3E+%22index.php%22%2C+%22submenu%22+%3D%3E+%5B%22name%22+%3D%3E+%22sub+menu%22%2C%22hi%22+%3D%3E+%22index.php%22%2C%22hello%22+%3D%3E+%22index.php%22%5D%2C+%22example3%22+%3D%3E+%22index.php%22+%5D'
    5     1        ROPE_INIT                                     3  ~7      'return+'
          2        ROPE_ADD                                      1  ~7      ~7, !0
          3        ROPE_END                                      2  ~6      ~7, '%3B'
          4        INCLUDE_OR_EVAL                                  $9      ~6, EVAL
          5        ASSIGN                                                   !1, $9
    7     6      > FE_RESET_R                                       $11     !1, ->25
          7    > > FE_FETCH_R                                               $11, !2, ->25
    8     8    >   TYPE_CHECK                                  128          !2
          9      > JMPZ                                                     ~12, ->21
    9    10    > > FE_RESET_R                                       $13     !2, ->19
         11    > > FE_FETCH_R                                       ~14     $13, !3, ->19
         12    >   ASSIGN                                                   !4, ~14
   10    13        ROPE_INIT                                     4  ~17     !4
         14        ROPE_ADD                                      1  ~17     ~17, '+%3D%3E+'
         15        ROPE_ADD                                      2  ~17     ~17, !3
         16        ROPE_END                                      3  ~16     ~17, '%0A'
         17        ECHO                                                     ~16
    9    18      > JMP                                                      ->11
         19    >   FE_FREE                                                  $13
         20      > JMP                                                      ->24
   13    21    >   NOP                                                      
         22        FAST_CONCAT                                      ~19     !2, '%0A'
         23        ECHO                                                     ~19
    7    24    > > JMP                                                      ->7
         25    >   FE_FREE                                                  $11
   15    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.03 ms | 1395 KiB | 13 Q