3v4l.org

run code in 500+ PHP versions simultaneously
<?php $s = '[{"id":2,"category":"Food%2C%20Drinks%20%26%20Clothes","description":"Nasi%20Lemak%2C%20Teh%20Tarik%20","cost":"5","transactionDate":"2016-10-04"},{"id":3,"category":"Food%2C%20Drinks%20%26%20Clothes","description":"Rori%20Canai","cost":"3"}]'; $data = json_decode($s, true); for ($i = 0; $i < count($data); $i++){ echo "id: ".$data[$i]["id"]. ", desc: ".$data[$i]["description"]. ", cost: ".$data[$i]["cost"] . '<br />'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 8
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 8
Branch analysis from position: 25
Branch analysis from position: 8
filename:       /in/2Znq2
function name:  (null)
number of ops:  26
compiled vars:  !0 = $s, !1 = $data, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%7B%22id%22%3A2%2C%22category%22%3A%22Food%252C%2520Drinks%2520%2526%2520Clothes%22%2C%22description%22%3A%22Nasi%2520Lemak%252C%2520Teh%2520Tarik%2520%22%2C%22cost%22%3A%225%22%2C%22transactionDate%22%3A%222016-10-04%22%7D%2C%7B%22id%22%3A3%2C%22category%22%3A%22Food%252C%2520Drinks%2520%2526%2520Clothes%22%2C%22description%22%3A%22Rori%2520Canai%22%2C%22cost%22%3A%223%22%7D%5D'
    4     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        ASSIGN                                                   !2, 0
          7      > JMP                                                      ->22
    6     8    >   FETCH_DIM_R                                      ~7      !1, !2
          9        FETCH_DIM_R                                      ~8      ~7, 'id'
         10        CONCAT                                           ~9      'id%3A+', ~8
         11        CONCAT                                           ~10     ~9, '%2C+desc%3A+'
         12        FETCH_DIM_R                                      ~11     !1, !2
         13        FETCH_DIM_R                                      ~12     ~11, 'description'
         14        CONCAT                                           ~13     ~10, ~12
         15        CONCAT                                           ~14     ~13, '%2C+cost%3A+'
         16        FETCH_DIM_R                                      ~15     !1, !2
         17        FETCH_DIM_R                                      ~16     ~15, 'cost'
         18        CONCAT                                           ~17     ~14, ~16
         19        CONCAT                                           ~18     ~17, '%3Cbr+%2F%3E'
         20        ECHO                                                     ~18
    5    21        PRE_INC                                                  !2
         22    >   COUNT                                            ~20     !1
         23        IS_SMALLER                                               !2, ~20
         24      > JMPNZ                                                    ~21, ->8
    7    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
228.62 ms | 2192 KiB | 14 Q