3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"id":35,"po_code":"PMS201635","purchase_orders":"a:2:{i:0;a:7:{s:2:\\"id\\";s:1:\\"9\\";s:3:\\"qty\\";s:1:\\"2\\";s:4:\\"unit\\";s:7:\\"Capsule\\";s:6:\\"pharma\\";s:12:\\"Ibuprofen IB\\";s:9:\\"packaging\\";s:7:\\"50 caps\\";s:5:\\"price\\";s:2:\\"23\\";s:5:\\"total\\";s:2:\\"46\\";}i:1;a:7:{s:2:\\"id\\";s:2:\\"11\\";s:3:\\"qty\\";s:1:\\"5\\";s:4:\\"unit\\";s:6:\\"Pieces\\";s:6:\\"pharma\\";s:12:\\"Ecotrin oral\\";s:9:\\"packaging\\";s:6:\\"100pcs\\";s:5:\\"price\\";s:2:\\"13\\";s:5:\\"total\\";s:2:\\"65\\";}}","freight_charge":"0","overall_total":"111","created_at":"2016-05-21 16:50:49","updated_at":"2016-05-21 16:50:49","shipped_via":"Select","terms":""}'; $result = json_decode ($json); $arr = unserialize ($result->purchase_orders); foreach($arr as $val){ echo '<pre>'; print_r($val); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/XaFsK
function name:  (null)
number of ops:  19
compiled vars:  !0 = $json, !1 = $result, !2 = $arr, !3 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%22id%22%3A35%2C%22po_code%22%3A%22PMS201635%22%2C%22purchase_orders%22%3A%22a%3A2%3A%7Bi%3A0%3Ba%3A7%3A%7Bs%3A2%3A%5C%22id%5C%22%3Bs%3A1%3A%5C%229%5C%22%3Bs%3A3%3A%5C%22qty%5C%22%3Bs%3A1%3A%5C%222%5C%22%3Bs%3A4%3A%5C%22unit%5C%22%3Bs%3A7%3A%5C%22Capsule%5C%22%3Bs%3A6%3A%5C%22pharma%5C%22%3Bs%3A12%3A%5C%22Ibuprofen+IB%5C%22%3Bs%3A9%3A%5C%22packaging%5C%22%3Bs%3A7%3A%5C%2250+caps%5C%22%3Bs%3A5%3A%5C%22price%5C%22%3Bs%3A2%3A%5C%2223%5C%22%3Bs%3A5%3A%5C%22total%5C%22%3Bs%3A2%3A%5C%2246%5C%22%3B%7Di%3A1%3Ba%3A7%3A%7Bs%3A2%3A%5C%22id%5C%22%3Bs%3A2%3A%5C%2211%5C%22%3Bs%3A3%3A%5C%22qty%5C%22%3Bs%3A1%3A%5C%225%5C%22%3Bs%3A4%3A%5C%22unit%5C%22%3Bs%3A6%3A%5C%22Pieces%5C%22%3Bs%3A6%3A%5C%22pharma%5C%22%3Bs%3A12%3A%5C%22Ecotrin+oral%5C%22%3Bs%3A9%3A%5C%22packaging%5C%22%3Bs%3A6%3A%5C%22100pcs%5C%22%3Bs%3A5%3A%5C%22price%5C%22%3Bs%3A2%3A%5C%2213%5C%22%3Bs%3A5%3A%5C%22total%5C%22%3Bs%3A2%3A%5C%2265%5C%22%3B%7D%7D%22%2C%22freight_charge%22%3A%220%22%2C%22overall_total%22%3A%22111%22%2C%22created_at%22%3A%222016-05-21+16%3A50%3A49%22%2C%22updated_at%22%3A%222016-05-21+16%3A50%3A49%22%2C%22shipped_via%22%3A%22Select%22%2C%22terms%22%3A%22%22%7D'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    4     5        INIT_FCALL                                               'unserialize'
          6        FETCH_OBJ_R                                      ~7      !1, 'purchase_orders'
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !2, $8
    6    10      > FE_RESET_R                                       $10     !2, ->17
         11    > > FE_FETCH_R                                               $10, !3, ->17
    7    12    >   ECHO                                                     '%3Cpre%3E'
    8    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
    6    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $10
    9    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.72 ms | 1396 KiB | 19 Q