3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = json_decode('{ "quiz": { "sport": { "q1": { "question": "Which one is correct team name in NBA?", "options": [ "New York Bulls", "Los Angeles Kings", "Golden State Warriros", "Huston Rocket" ], "answer": "Huston Rocket" } }, "maths": { "q1": { "question": "5 + 7 = ?", "options": [ "10", "11", "12", "13" ], "answer": "12" }, "q2": { "question": "12 - 8 = ?", "options": [ "1", "2", "3", "4" ], "answer": "4" } } } }'); var_dump($obj); foreach ($obj as $v) { var_dump($v); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/buZfO
function name:  (null)
number of ops:  15
compiled vars:  !0 = $obj, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%0A%09%22quiz%22%3A+%7B%0A%09%09%22sport%22%3A+%7B%0A%09%09%09%22q1%22%3A+%7B%0A%09%09%09%09%22question%22%3A+%22Which+one+is+correct+team+name+in+NBA%3F%22%2C%0A%09%09%09%09%22options%22%3A+%5B%0A%09%09%09%09%09%22New+York+Bulls%22%2C%0A%09%09%09%09%09%22Los+Angeles+Kings%22%2C%0A%09%09%09%09%09%22Golden+State+Warriros%22%2C%0A%09%09%09%09%09%22Huston+Rocket%22%0A%09%09%09%09%5D%2C%0A%09%09%09%09%22answer%22%3A+%22Huston+Rocket%22%0A%09%09%09%7D%0A%09%09%7D%2C%0A%09%09%22maths%22%3A+%7B%0A%09%09%09%22q1%22%3A+%7B%0A%09%09%09%09%22question%22%3A+%225+%2B+7+%3D+%3F%22%2C%0A%09%09%09%09%22options%22%3A+%5B%0A%09%09%09%09%09%2210%22%2C%0A%09%09%09%09%09%2211%22%2C%0A%09%09%09%09%09%2212%22%2C%0A%09%09%09%09%09%2213%22%0A%09%09%09%09%5D%2C%0A%09%09%09%09%22answer%22%3A+%2212%22%0A%09%09%09%7D%2C%0A%09%09%09%22q2%22%3A+%7B%0A%09%09%09%09%22question%22%3A+%2212+-+8+%3D+%3F%22%2C%0A%09%09%09%09%22options%22%3A+%5B%0A%09%09%09%09%09%221%22%2C%0A%09%09%09%09%09%222%22%2C%0A%09%09%09%09%09%223%22%2C%0A%09%09%09%09%09%224%22%0A%09%09%09%09%5D%2C%0A%09%09%09%09%22answer%22%3A+%224%22%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   41     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   42     7      > FE_RESET_R                                       $5      !0, ->13
          8    > > FE_FETCH_R                                               $5, !1, ->13
   43     9    >   INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   42    12      > JMP                                                      ->8
         13    >   FE_FREE                                                  $5
   44    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
197.87 ms | 1004 KiB | 15 Q