3v4l.org

run code in 300+ PHP versions simultaneously
<?php $apicalldata = '{ "status": "OK", "droplets": [ { "id": 100823, "name": "test222", "image_id": 420, "size_id":33, "region_id": 1, "backups_active": false, "ip_address": "127.0.0.1", "private_ip_address": null, "locked": false, "status": "active", "created_at": "2013-01-01T09:30:00Z" } ] }'; $call = json_decode($apicalldata); $droplets = $call->droplets; $myDroplet = $droplets[0]; $myDropletID = $myDroplet->id; echo $myDropletID;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZuTLn
function name:  (null)
number of ops:  13
compiled vars:  !0 = $apicalldata, !1 = $call, !2 = $droplets, !3 = $myDroplet, !4 = $myDropletID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A%22status%22%3A+%22OK%22%2C%0A%22droplets%22%3A+%5B%0A++%7B%0A++%22id%22%3A+100823%2C%0A++%22name%22%3A+%22test222%22%2C%0A++%22image_id%22%3A+420%2C%0A++%22size_id%22%3A33%2C%0A++%22region_id%22%3A+1%2C%0A++%22backups_active%22%3A+false%2C%0A++%22ip_address%22%3A+%22127.0.0.1%22%2C%0A++%22private_ip_address%22%3A+null%2C%0A++%22locked%22%3A+false%2C%0A++%22status%22%3A+%22active%22%2C%0A++%22created_at%22%3A+%222013-01-01T09%3A30%3A00Z%22%0A%7D%0A+%5D%0A+%7D'
   22     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
   24     5        FETCH_OBJ_R                                      ~8      !1, 'droplets'
          6        ASSIGN                                                   !2, ~8
   25     7        FETCH_DIM_R                                      ~10     !2, 0
          8        ASSIGN                                                   !3, ~10
   26     9        FETCH_OBJ_R                                      ~12     !3, 'id'
         10        ASSIGN                                                   !4, ~12
   27    11        ECHO                                                     !4
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.21 ms | 1394 KiB | 15 Q