3v4l.org

run code in 300+ PHP versions simultaneously
<?php $flight = [ [ "SearchId" => "fca84241-dd9b-4cf2-bd6f-2f221dcc2b91", "Results" => [ 0 => [ "ResultID" => "f0a54871-d728-424a-8e97-94e22308ac44", "IsRefundable" => true, "Fares" => [ 0 => [ "BaseFare" => 2775.0, "Tax" => 725.0, "Currency" => "BDT", "OtherCharges" => 0.0, "Discount" => 0.0, "AgentMarkUp" => 0.0, "PaxType" => "Adult", "PassengerCount" => 1, "ServiceFee" => 0.0, ] ], "Discount" => 0.0, "Validatingcarrier" => "BG", "LastTicketDate" => "2022-05-30T00:00:00", "segments" => [], "TotalFare" => 3500.0, "TotalFareWithAgentMarkup" => 3500.0, "Currency" => "BDT", "Availabilty" => 1, "FareType" => "InstantTicketing", "isMiniRulesAvailable" => false, "HoldAllowed" => false ] ] ] ]; foreach ($flight as $key => $teamArray) { echo $teamArray["SearchId"] . PHP_EOL; foreach($teamArray["Results"] as $result) { echo ($result["Fares"][0]["BaseFare"]) . PHP_EOL; echo ($result["Fares"][0]["Tax"]) . PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 23
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 21
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/a04IR
function name:  (null)
number of ops:  25
compiled vars:  !0 = $flight, !1 = $teamArray, !2 = $key, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   39     1      > FE_RESET_R                                       $5      !0, ->23
          2    > > FE_FETCH_R                                       ~6      $5, !1, ->23
          3    >   ASSIGN                                                   !2, ~6
   40     4        FETCH_DIM_R                                      ~8      !1, 'SearchId'
          5        CONCAT                                           ~9      ~8, '%0A'
          6        ECHO                                                     ~9
   41     7        FETCH_DIM_R                                      ~10     !1, 'Results'
          8      > FE_RESET_R                                       $11     ~10, ->21
          9    > > FE_FETCH_R                                               $11, !3, ->21
   42    10    >   FETCH_DIM_R                                      ~12     !3, 'Fares'
         11        FETCH_DIM_R                                      ~13     ~12, 0
         12        FETCH_DIM_R                                      ~14     ~13, 'BaseFare'
         13        CONCAT                                           ~15     ~14, '%0A'
         14        ECHO                                                     ~15
   43    15        FETCH_DIM_R                                      ~16     !3, 'Fares'
         16        FETCH_DIM_R                                      ~17     ~16, 0
         17        FETCH_DIM_R                                      ~18     ~17, 'Tax'
         18        CONCAT                                           ~19     ~18, '%0A'
         19        ECHO                                                     ~19
   41    20      > JMP                                                      ->9
         21    >   FE_FREE                                                  $11
   39    22      > JMP                                                      ->2
         23    >   FE_FREE                                                  $5
   45    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.35 ms | 998 KiB | 13 Q