3v4l.org

run code in 300+ PHP versions simultaneously
<?php $getPrintReadyListResponse = '{ "printouts": [{ "order_id": 12345, "music_id": 10000, "arrangement": "Arrangement Type", "artist": "Artist Name", "prints_remaining": 2, "title": "A Music Title" }, { "order_id": 12345, "music_id": 10002, "arrangement": "Another Arrangement", "artist": "Another Artist", "prints_remaining": 1, "title": "Another Music Title" }], "success": true }'; $obj = json_decode($getPrintReadyListResponse); //var_dump($obj); // dump what we got $s = $obj->success; foreach ( $obj->printouts as $o) { var_dump($o); // dump what we got echo $o->order_id." ".$o->artist." ".$o->title; }; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 22
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/Go2D4
function name:  (null)
number of ops:  24
compiled vars:  !0 = $getPrintReadyListResponse, !1 = $obj, !2 = $s, !3 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A%09%22printouts%22%3A+%5B%7B%0A%09%09%22order_id%22%3A+12345%2C%0A%09%09%22music_id%22%3A+10000%2C%0A%09%09%22arrangement%22%3A+%22Arrangement+Type%22%2C%0A%09%09%22artist%22%3A+%22Artist+Name%22%2C%0A%09%09%22prints_remaining%22%3A+2%2C%0A%09%09%22title%22%3A+%22A+Music+Title%22%0A%09%7D%2C+%7B%0A%09%09%22order_id%22%3A+12345%2C%0A%09%09%22music_id%22%3A+10002%2C%0A%09%09%22arrangement%22%3A+%22Another+Arrangement%22%2C%0A%09%09%22artist%22%3A+%22Another+Artist%22%2C%0A%09%09%22prints_remaining%22%3A+1%2C%0A%09%09%22title%22%3A+%22Another+Music+Title%22%0A%09%7D%5D%2C%0A%09%22success%22%3A+true%0A%09%7D'
   22     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   25     5        FETCH_OBJ_R                                      ~7      !1, 'success'
          6        ASSIGN                                                   !2, ~7
   27     7        FETCH_OBJ_R                                      ~9      !1, 'printouts'
          8      > FE_RESET_R                                       $10     ~9, ->22
          9    > > FE_FETCH_R                                               $10, !3, ->22
   28    10    >   INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                                 
   29    13        FETCH_OBJ_R                                      ~12     !3, 'order_id'
         14        CONCAT                                           ~13     ~12, '+'
         15        FETCH_OBJ_R                                      ~14     !3, 'artist'
         16        CONCAT                                           ~15     ~13, ~14
         17        CONCAT                                           ~16     ~15, '+'
         18        FETCH_OBJ_R                                      ~17     !3, 'title'
         19        CONCAT                                           ~18     ~16, ~17
         20        ECHO                                                     ~18
   27    21      > JMP                                                      ->9
         22    >   FE_FREE                                                  $10
   32    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.94 ms | 1388 KiB | 17 Q