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;"); if(is_array($arr)) { echo "true";} else echo "false"; echo count($arr); for ($i = 0 ; i < count($arr) ; $i++ ) { echo $arr[$i]; } /*foreach($arr as $key=>$value){ print_r( $key . " => ". $value); }*/
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 15
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 15
Branch analysis from position: 22
Branch analysis from position: 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
filename:       /in/mRqgc
function name:  (null)
number of ops:  23
compiled vars:  !0 = $string, !1 = $arr, !2 = $i
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  ~5      'return+'
          2        ROPE_ADD                                      1  ~5      ~5, !0
          3        ROPE_END                                      2  ~4      ~5, '%3B'
          4        INCLUDE_OR_EVAL                                  $7      ~4, EVAL
          5        ASSIGN                                                   !1, $7
    7     6        TYPE_CHECK                                  128          !1
          7      > JMPZ                                                     ~9, ->10
          8    >   ECHO                                                     'true'
          9      > JMP                                                      ->11
    8    10    >   ECHO                                                     'false'
   10    11    >   COUNT                                            ~10     !1
         12        ECHO                                                     ~10
   12    13        ASSIGN                                                   !2, 0
         14      > JMP                                                      ->18
   13    15    >   FETCH_DIM_R                                      ~12     !1, !2
         16        ECHO                                                     ~12
   12    17        PRE_INC                                                  !2
         18    >   FETCH_CONSTANT                                   ~14     'i'
         19        COUNT                                            ~15     !1
         20        IS_SMALLER                                               ~14, ~15
         21      > JMPNZ                                                    ~16, ->15
   18    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.8 ms | 1386 KiB | 13 Q