3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = '{"username":"Ellaleeeeeee", "event_source":"browser", "event": "{\"notes\": [{\"note_id\": \"2771\"}]}" }'; $jarray = json_decode($test, true); $jevent = json_decode($jarray['event'], true); echo $jevent['notes'][0]['note_id'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0sOfm
function name:  (null)
number of ops:  17
compiled vars:  !0 = $test, !1 = $jarray, !2 = $jevent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22username%22%3A%22Ellaleeeeeee%22%2C%0A++%22event_source%22%3A%22browser%22%2C%0A++%22event%22%3A%0A++%22%7B%5C%22notes%5C%22%3A+%5B%7B%5C%22note_id%5C%22%3A+%5C%222771%5C%22%7D%5D%7D%22%0A%7D'
   10     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   11     6        INIT_FCALL                                               'json_decode'
          7        FETCH_DIM_R                                      ~6      !1, 'event'
          8        SEND_VAL                                                 ~6
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
   12    12        FETCH_DIM_R                                      ~9      !2, 'notes'
         13        FETCH_DIM_R                                      ~10     ~9, 0
         14        FETCH_DIM_R                                      ~11     ~10, 'note_id'
         15        ECHO                                                     ~11
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
240.59 ms | 1004 KiB | 14 Q