3v4l.org

run code in 500+ PHP versions simultaneously
<?php $result = '[ { "id": 1, "name": "Leanne Graham", "username": "Bret", "email": "Sincere@april.biz", "address": { "street": "Kulas Light", "suite": "Apt. 556", "city": "Gwenborough", "zipcode": "92998-3874", "geo": { "lat": "-37.3159", "lng": "81.1496" } }, "phone": "1-770-736-8031 x56442", "website": "hildegard.org", "company": { "name": "Romaguera-Crona", "catchPhrase": "Multi-layered client-server neural-net", "bs": "harness real-time e-markets" } }]'; $id = 1; $data = json_decode($result, true) ; foreach ($data as $mydata) { if ($mydata["id"] == $id) { echo $mydata["address"]["street"] ; break ; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 17
Branch analysis from position: 17
filename:       /in/oaCPE
function name:  (null)
number of ops:  19
compiled vars:  !0 = $result, !1 = $id, !2 = $data, !3 = $mydata
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%5B%0A%7B%0A%22id%22%3A+1%2C%0A%22name%22%3A+%22Leanne+Graham%22%2C%0A%22username%22%3A+%22Bret%22%2C%0A%22email%22%3A+%22Sincere%40april.biz%22%2C%0A%22address%22%3A+%7B%0A++%22street%22%3A+%22Kulas+Light%22%2C%0A++%22suite%22%3A+%22Apt.+556%22%2C%0A++%22city%22%3A+%22Gwenborough%22%2C%0A++%22zipcode%22%3A+%2292998-3874%22%2C%0A++%22geo%22%3A+%7B%0A++++%22lat%22%3A+%22-37.3159%22%2C%0A++++%22lng%22%3A+%2281.1496%22%0A++%7D%0A%7D%2C%0A%22phone%22%3A+%221-770-736-8031+x56442%22%2C%0A%22website%22%3A+%22hildegard.org%22%2C%0A%22company%22%3A+%7B%0A++%22name%22%3A+%22Romaguera-Crona%22%2C%0A++%22catchPhrase%22%3A+%22Multi-layered+client-server+neural-net%22%2C%0A++%22bs%22%3A+%22harness+real-time+e-markets%22%0A%7D%0A%7D%5D'
   27     1        ASSIGN                                                       !1, 1
   28     2        INIT_FCALL                                                   'json_decode'
          3        SEND_VAR                                                     !0
          4        SEND_VAL                                                     <true>
          5        DO_ICALL                                             $6      
          6        ASSIGN                                                       !2, $6
   29     7      > FE_RESET_R                                           $8      !2, ->17
          8    > > FE_FETCH_R                                                   $8, !3, ->17
   30     9    >   FETCH_DIM_R                                          ~9      !3, 'id'
         10        IS_EQUAL                                                     !1, ~9
         11      > JMPZ                                                         ~10, ->16
   31    12    >   FETCH_DIM_R                                          ~11     !3, 'address'
         13        FETCH_DIM_R                                          ~12     ~11, 'street'
         14        ECHO                                                         ~12
   32    15      > JMP                                                          ->17
   29    16    > > JMP                                                          ->8
         17    >   FE_FREE                                                      $8
   34    18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.22 ms | 2033 KiB | 14 Q