3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<'EOL' { "syndicate-to": [ { "uid": "https://myfavoritesocialnetwork.example/aaronpk", "name": "aaronpk on myfavoritesocialnetwork", "service": { "name": "My Favorite Social Network", "url": "https://myfavoritesocialnetwork.example/", "photo": "https://myfavoritesocialnetwork.example/img/icon.png" }, "user": { "name": "aaronpk", "url": "https://myfavoritesocialnetwork.example/aaronpk", "photo": "https://myfavoritesocialnetwork.example/aaronpk/photo.jpg" } } ] } EOL; $data = json_decode($json, true); var_dump($data); var_dump(json_last_error()); var_dump($data['syndicate-to'][0]['uid']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C299Q
function name:  (null)
number of ops:  21
compiled vars:  !0 = $json, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++%22syndicate-to%22%3A+%5B%0A++++%7B%0A++++++%22uid%22%3A+%22https%3A%2F%2Fmyfavoritesocialnetwork.example%2Faaronpk%22%2C%0A++++++%22name%22%3A+%22aaronpk+on+myfavoritesocialnetwork%22%2C%0A++++++%22service%22%3A+%7B%0A++++++++%22name%22%3A+%22My+Favorite+Social+Network%22%2C%0A++++++++%22url%22%3A+%22https%3A%2F%2Fmyfavoritesocialnetwork.example%2F%22%2C%0A++++++++%22photo%22%3A+%22https%3A%2F%2Fmyfavoritesocialnetwork.example%2Fimg%2Ficon.png%22%0A++++++%7D%2C%0A++++++%22user%22%3A+%7B%0A++++++++%22name%22%3A+%22aaronpk%22%2C%0A++++++++%22url%22%3A+%22https%3A%2F%2Fmyfavoritesocialnetwork.example%2Faaronpk%22%2C%0A++++++++%22photo%22%3A+%22https%3A%2F%2Fmyfavoritesocialnetwork.example%2Faaronpk%2Fphoto.jpg%22%0A++++++%7D%0A++++%7D%0A++%5D%0A%7D'
   24     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   25     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   26     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'json_last_error'
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
   27    14        INIT_FCALL                                               'var_dump'
         15        FETCH_DIM_R                                      ~8      !1, 'syndicate-to'
         16        FETCH_DIM_R                                      ~9      ~8, 0
         17        FETCH_DIM_R                                      ~10     ~9, 'uid'
         18        SEND_VAL                                                 ~10
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.69 ms | 1439 KiB | 16 Q