3v4l.org

run code in 300+ PHP versions simultaneously
<?php $accountDetails = []; switch ($accountDetails['Response']['Account']['ProductName']) { case 'Orange Advantage': $interestRate = $accountDetails['Response']['RewardsInformation']['OrangeAdvantageRewards']['CurrentInterestRate']; break; case 'Fixed Rate': case 'Mortgage Simplifier': $interestRate = $accountDetails['Response']['RewardsInformation']['HomeLoanRewards']['CurrentInterestRate']; break; case 'Savings Accelerator': $interestRate = $accountDetails['Response']['InterestInformation']['SavingsAcceleratorInterestRate']['CurrentRate']; break; default: $interestRate = $accountDetails['Response']['InterestInformation']['SavingsMaximiserInterestRate']['CurrentRate']; break; }
Finding entry points
Branch analysis from position: 0
6 jumps found. (Code = 188) Position 1 = 14, Position 2 = 20, Position 3 = 20, Position 4 = 26, Position 5 = 32, Position 6 = 5
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 20
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 26
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 26
Branch analysis from position: 20
Branch analysis from position: 20
Branch analysis from position: 14
filename:       /in/gnIWv
function name:  (null)
number of ops:  40
compiled vars:  !0 = $accountDetails, !1 = $interestRate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        FETCH_DIM_R                                      ~3      !0, 'Response'
          2        FETCH_DIM_R                                      ~4      ~3, 'Account'
          3        FETCH_DIM_R                                      ~5      ~4, 'ProductName'
          4      > SWITCH_STRING                                            ~5, [ 'Orange+Advantage':->14, 'Fixed+Rate':->20, 'Mortgage+Simplifier':->20, 'Savings+Accelerator':->26, ], ->32
    4     5    >   CASE                                                     ~5, 'Orange+Advantage'
          6      > JMPNZ                                                    ~6, ->14
    7     7    >   CASE                                                     ~5, 'Fixed+Rate'
          8      > JMPNZ                                                    ~6, ->20
    8     9    >   CASE                                                     ~5, 'Mortgage+Simplifier'
         10      > JMPNZ                                                    ~6, ->20
   11    11    >   CASE                                                     ~5, 'Savings+Accelerator'
         12      > JMPNZ                                                    ~6, ->26
         13    > > JMP                                                      ->32
    5    14    >   FETCH_DIM_R                                      ~7      !0, 'Response'
         15        FETCH_DIM_R                                      ~8      ~7, 'RewardsInformation'
         16        FETCH_DIM_R                                      ~9      ~8, 'OrangeAdvantageRewards'
         17        FETCH_DIM_R                                      ~10     ~9, 'CurrentInterestRate'
         18        ASSIGN                                                   !1, ~10
    6    19      > JMP                                                      ->38
    9    20    >   FETCH_DIM_R                                      ~12     !0, 'Response'
         21        FETCH_DIM_R                                      ~13     ~12, 'RewardsInformation'
         22        FETCH_DIM_R                                      ~14     ~13, 'HomeLoanRewards'
         23        FETCH_DIM_R                                      ~15     ~14, 'CurrentInterestRate'
         24        ASSIGN                                                   !1, ~15
   10    25      > JMP                                                      ->38
   12    26    >   FETCH_DIM_R                                      ~17     !0, 'Response'
         27        FETCH_DIM_R                                      ~18     ~17, 'InterestInformation'
         28        FETCH_DIM_R                                      ~19     ~18, 'SavingsAcceleratorInterestRate'
         29        FETCH_DIM_R                                      ~20     ~19, 'CurrentRate'
         30        ASSIGN                                                   !1, ~20
   13    31      > JMP                                                      ->38
   15    32    >   FETCH_DIM_R                                      ~22     !0, 'Response'
         33        FETCH_DIM_R                                      ~23     ~22, 'InterestInformation'
         34        FETCH_DIM_R                                      ~24     ~23, 'SavingsMaximiserInterestRate'
         35        FETCH_DIM_R                                      ~25     ~24, 'CurrentRate'
         36        ASSIGN                                                   !1, ~25
   16    37      > JMP                                                      ->38
         38    >   FREE                                                     ~5
   17    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.96 ms | 1399 KiB | 13 Q