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"; /*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 = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PZ4QV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $arr
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  ~4      'return+'
          2        ROPE_ADD                                      1  ~4      ~4, !0
          3        ROPE_END                                      2  ~3      ~4, '%3B'
          4        INCLUDE_OR_EVAL                                  $6      ~3, EVAL
          5        ASSIGN                                                   !1, $6
    7     6        TYPE_CHECK                                  128          !1
          7      > JMPZ                                                     ~8, ->10
          8    >   ECHO                                                     'true'
          9      > JMP                                                      ->11
    8    10    >   ECHO                                                     'false'
   12    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.55 ms | 1384 KiB | 13 Q