3v4l.org

run code in 500+ PHP versions simultaneously
<?php $json = '{ "status": "400", "msg": "List Of Lotteries", "lotteryRes": { "result": { "Disawar": [ "Disawar" ], "DL Bazzar": [ "DL Bazzar" ], "Faridabad": [ "Faridabad" ], "Gaziyabad": [ "Gaziyabad" ], "X90": [ "X90" ], "Gali": [ "Gali" ], "RAJASTHAN ROYAL": [ "RAJASTHAN ROYAL" ], "Rajasthan Bazaar": [ "Rajasthan Bazaar" ] }, "lottery_date": [ "2018-03-25 05:30:00", "2018-03-31 15:20:00", "2018-03-30 18:15:00", "2018-03-31 20:20:00", "2018-04-04 23:00:00", "2018-04-02 23:25:00", "2018-04-14 16:00:00", "2018-04-13 14:00:00" ] } }'; // $json = file_get_contents('url'); $array = json_decode($json, true); foreach (array_values($array['lotteryRes']['result']) as $key => $result) { echo array_values($result)[0].' '.$array['lotteryRes']['lottery_date'][$key].PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 26
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 26
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/Ki7Od
function name:  (null)
number of ops:  28
compiled vars:  !0 = $json, !1 = $array, !2 = $result, !3 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%7B%0A++%22status%22%3A+%22400%22%2C%0A++%22msg%22%3A+%22List+Of+Lotteries%22%2C%0A++%22lotteryRes%22%3A+%7B%0A++++%22result%22%3A+%7B%0A++++++%22Disawar%22%3A+%5B%0A++++++++%22Disawar%22%0A++++++%5D%2C%0A++++++%22DL+Bazzar%22%3A+%5B%0A++++++++%22DL+Bazzar%22%0A++++++%5D%2C%0A++++++%22Faridabad%22%3A+%5B%0A++++++++%22Faridabad%22%0A++++++%5D%2C%0A++++++%22Gaziyabad%22%3A+%5B%0A++++++++%22Gaziyabad%22%0A++++++%5D%2C%0A++++++%22X90%22%3A+%5B%0A++++++++%22X90%22%0A++++++%5D%2C%0A++++++%22Gali%22%3A+%5B%0A++++++++%22Gali%22%0A++++++%5D%2C%0A++++++%22RAJASTHAN+ROYAL%22%3A+%5B%0A++++++++%22RAJASTHAN+ROYAL%22%0A++++++%5D%2C%0A++++++%22Rajasthan+Bazaar%22%3A+%5B%0A++++++++%22Rajasthan+Bazaar%22%0A++++++%5D%0A++++%7D%2C%0A++++%22lottery_date%22%3A+%5B%0A++++++%222018-03-25+05%3A30%3A00%22%2C%0A++++++%222018-03-31+15%3A20%3A00%22%2C%0A++++++%222018-03-30+18%3A15%3A00%22%2C%0A++++++%222018-03-31+20%3A20%3A00%22%2C%0A++++++%222018-04-04+23%3A00%3A00%22%2C%0A++++++%222018-04-02+23%3A25%3A00%22%2C%0A++++++%222018-04-14+16%3A00%3A00%22%2C%0A++++++%222018-04-13+14%3A00%3A00%22%0A++++%5D%0A++%7D%0A%7D'
   47     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     <true>
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
   49     6        INIT_FCALL                                                   'array_values'
          7        FETCH_DIM_R                                          ~7      !1, 'lotteryRes'
          8        FETCH_DIM_R                                          ~8      ~7, 'result'
          9        SEND_VAL                                                     ~8
         10        DO_ICALL                                             $9      
         11      > FE_RESET_R                                           $10     $9, ->26
         12    > > FE_FETCH_R                                           ~11     $10, !2, ->26
         13    >   ASSIGN                                                       !3, ~11
   50    14        INIT_FCALL                                                   'array_values'
         15        SEND_VAR                                                     !2
         16        DO_ICALL                                             $13     
         17        FETCH_DIM_R                                          ~14     $13, 0
         18        CONCAT                                               ~15     ~14, '+'
         19        FETCH_DIM_R                                          ~16     !1, 'lotteryRes'
         20        FETCH_DIM_R                                          ~17     ~16, 'lottery_date'
         21        FETCH_DIM_R                                          ~18     ~17, !3
         22        CONCAT                                               ~19     ~15, ~18
         23        CONCAT                                               ~20     ~19, '%0A'
         24        ECHO                                                         ~20
   49    25      > JMP                                                          ->12
         26    >   FE_FREE                                                      $10
   51    27      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.97 ms | 2650 KiB | 15 Q