3v4l.org

run code in 500+ PHP versions simultaneously
<?php $json = '{ "responseCode": 200, "message": "success", "content": [{ "id": "237955080346633702", "form_id": "31751954731962", "ip": "123.123.123.123", "created_at": "2013-06-25 03:38:00", "updated_at": "2013-06-27 04:58:00", "status": "ACTIVE", "new": "1", "answers": { "1": { "text": "Name", "type":"control_fullname", "answer": { "first": "LeBron", "last": "James" }, "prettyFormat": "LeBron James" }, "2": { "text": "Your Message", "type": "control_textarea", "answer":"¡Ay, caramba!" } }}] }'; foreach (json_decode($json, true)['content'] as $set) { echo "{$set['answers'][1]['answer']['first']} {$set['answers'][1]['answer']['last']}\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 22
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/Qa7FI
function name:  (null)
number of ops:  24
compiled vars:  !0 = $json, !1 = $set
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%7B%0A%22responseCode%22%3A+200%2C%0A%22message%22%3A+%22success%22%2C%0A%22content%22%3A+%5B%7B%0A++++%22id%22%3A+%22237955080346633702%22%2C%0A++++%22form_id%22%3A+%2231751954731962%22%2C%0A++++%22ip%22%3A+%22123.123.123.123%22%2C%0A++++%22created_at%22%3A+%222013-06-25+03%3A38%3A00%22%2C%0A++++%22updated_at%22%3A+%222013-06-27+04%3A58%3A00%22%2C%0A++++%22status%22%3A+%22ACTIVE%22%2C%0A++++%22new%22%3A+%221%22%2C%0A++++%22answers%22%3A+%7B%0A++++++++%221%22%3A+%7B%0A++++++++++++%22text%22%3A+%22Name%22%2C%0A++++++++++++%22type%22%3A%22control_fullname%22%2C%0A++++++++++++%22answer%22%3A+%7B%0A++++++++++++++++%22first%22%3A+%22LeBron%22%2C%0A++++++++++++++++%22last%22%3A+%22James%22%0A++++++++++++%7D%2C%0A++++++++++++%22prettyFormat%22%3A+%22LeBron+James%22%0A++++++++%7D%2C%0A++++++++%222%22%3A+%7B%0A++++++++++++%22text%22%3A+%22Your+Message%22%2C%0A++++++++++++%22type%22%3A+%22control_textarea%22%2C%0A++++++++++++%22answer%22%3A%22%C2%A1Ay%2C+caramba%21%22%0A++++++++%7D%0A%7D%7D%5D%0A%7D'
   31     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     <true>
          4        DO_ICALL                                             $3      
          5        FETCH_DIM_R                                          ~4      $3, 'content'
          6      > FE_RESET_R                                           $5      ~4, ->22
          7    > > FE_FETCH_R                                                   $5, !1, ->22
   32     8    >   FETCH_DIM_R                                          ~6      !1, 'answers'
          9        FETCH_DIM_R                                          ~7      ~6, 1
         10        FETCH_DIM_R                                          ~8      ~7, 'answer'
         11        FETCH_DIM_R                                          ~9      ~8, 'first'
         12        ROPE_INIT                                         4  ~15     ~9
         13        ROPE_ADD                                          1  ~15     ~15, '+'
         14        FETCH_DIM_R                                          ~10     !1, 'answers'
         15        FETCH_DIM_R                                          ~11     ~10, 1
         16        FETCH_DIM_R                                          ~12     ~11, 'answer'
         17        FETCH_DIM_R                                          ~13     ~12, 'last'
         18        ROPE_ADD                                          2  ~15     ~15, ~13
         19        ROPE_END                                          3  ~14     ~15, '%0A'
         20        ECHO                                                         ~14
   31    21      > JMP                                                          ->7
         22    >   FE_FREE                                                      $5
   33    23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.9 ms | 2080 KiB | 14 Q