3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "response": [ { "flight": { "number": "6204", "iata_number": "HV6204", "icao_number": "TRA6204" } }, { "flight": { "number": "7012", "iata_number": "TB7012", "icao_number": "JAF7012" } }, { "flight": { "number": "6652", "iata_number": "HV6652", "icao_number": "TRA6652" } }, { "flight": { "number": "1925", "iata_number": "W61925", "icao_number": "WZZ1925" } }, { "flight": { "number": "5075", "iata_number": "W65075", "icao_number": "WZZ5075" } }, { "flight": { "number": "4289", "iata_number": "W64289", "icao_number": "WZZ4289" } }, { "flight": { "number": "7861", "iata_number": "W67861", "icao_number": "WZZ7861" } }, { "flight": { "number": "3066", "iata_number": "FR3066", "icao_number": "RYR3066" } } ] }'; $jarr = json_decode($json, true); array_walk_recursive($jarr, function($v, $k) use (&$flights){ if($k == 'iata_number') $flights[] = $v; }); print_r($flights);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Rp9K
function name:  (null)
number of ops:  16
compiled vars:  !0 = $json, !1 = $jarr, !2 = $flights
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%0A++%22response%22%3A+%5B%0A++++%7B%0A++++++%22flight%22%3A+%7B%0A++++++++%22number%22%3A+%226204%22%2C%0A++++++++%22iata_number%22%3A+%22HV6204%22%2C%0A++++++++%22icao_number%22%3A+%22TRA6204%22%0A++++++%7D%0A++++%7D%2C%0A++++%7B%0A++++++%22flight%22%3A+%7B%0A++++++++%22number%22%3A+%227012%22%2C%0A++++++++%22iata_number%22%3A+%22TB7012%22%2C%0A++++++++%22icao_number%22%3A+%22JAF7012%22%0A++++++%7D%0A++++%7D%2C%0A++++%7B%0A++++++%22flight%22%3A+%7B%0A++++++++%22number%22%3A+%226652%22%2C%0A++++++++%22iata_number%22%3A+%22HV6652%22%2C%0A++++++++%22icao_number%22%3A+%22TRA6652%22%0A++++++%7D%0A++++%7D%2C%0A++++%7B%0A++++++%22flight%22%3A+%7B%0A++++++++%22number%22%3A+%221925%22%2C%0A++++++++%22iata_number%22%3A+%22W61925%22%2C%0A++++++++%22icao_number%22%3A+%22WZZ1925%22%0A++++++%7D%0A++++%7D%2C%0A++++%7B%0A++++++%22flight%22%3A+%7B%0A++++++++%22number%22%3A+%225075%22%2C%0A++++++++%22iata_number%22%3A+%22W65075%22%2C%0A++++++++%22icao_number%22%3A+%22WZZ5075%22%0A++++++%7D%0A++++%7D%2C%0A++++%7B%0A++++++%22flight%22%3A+%7B%0A++++++++%22number%22%3A+%224289%22%2C%0A++++++++%22iata_number%22%3A+%22W64289%22%2C%0A++++++++%22icao_number%22%3A+%22WZZ4289%22%0A++++++%7D%0A++++%7D%2C%0A++++%7B%0A++++++%22flight%22%3A+%7B%0A++++++++%22number%22%3A+%227861%22%2C%0A++++++++%22iata_number%22%3A+%22W67861%22%2C%0A++++++++%22icao_number%22%3A+%22WZZ7861%22%0A++++++%7D%0A++++%7D%2C%0A++++%7B%0A++++++%22flight%22%3A+%7B%0A++++++++%22number%22%3A+%223066%22%2C%0A++++++++%22iata_number%22%3A+%22FR3066%22%2C%0A++++++++%22icao_number%22%3A+%22RYR3066%22%0A++++++%7D%0A++++%7D%0A++%5D%0A%7D'
   62     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   63     6        INIT_FCALL                                               'array_walk_recursive'
          7        SEND_REF                                                 !1
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5Rp9K%3A63%240'
          9        BIND_LEXICAL                                             ~6, !2
   65    10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
   66    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5Rp9K%3A63%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/5Rp9K
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $k, !2 = $flights
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   63     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   64     3        IS_EQUAL                                                 !1, 'iata_number'
          4      > JMPZ                                                     ~3, ->7
          5    >   ASSIGN_DIM                                               !2
          6        OP_DATA                                                  !0
   65     7    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5Rp9K%3A63%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.94 ms | 1412 KiB | 19 Q