3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getRates() { return array_fill( 0, 10000, array ( 'Board' => 'nin', 'Price' => 32, 'NetPrice' => 32, 'BookingFee' => 12, 'Tax' => 0, 'forfait' => 1, 'ProviderId' => 1 ) ); } $keys = array(); $rates = array(); foreach (getRates() as $rate) { unset($rate['forfait']); unset($rate['ProviderId']); if (!$keys) { foreach (array_keys($rate) as $key) { $keys[] = lcfirst($key == 'Regimen' ? 'board' : $key); } } $rates[] = array_combine($keys, $rate); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 34
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 34
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 27
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 26
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 26
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 26
Branch analysis from position: 27
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/KGbE3
function name:  (null)
number of ops:  36
compiled vars:  !0 = $keys, !1 = $rates, !2 = $rate, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, <array>
   20     1        ASSIGN                                                   !1, <array>
   21     2        INIT_FCALL                                               'getrates'
          3        DO_FCALL                                      0  $6      
          4      > FE_RESET_R                                       $7      $6, ->34
          5    > > FE_FETCH_R                                               $7, !2, ->34
   23     6    >   UNSET_DIM                                                !2, 'forfait'
   24     7        UNSET_DIM                                                !2, 'ProviderId'
   25     8        BOOL_NOT                                         ~8      !0
          9      > JMPZ                                                     ~8, ->27
   26    10    >   INIT_FCALL                                               'array_keys'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $9      
         13      > FE_RESET_R                                       $10     $9, ->26
         14    > > FE_FETCH_R                                               $10, !3, ->26
   27    15    >   INIT_FCALL                                               'lcfirst'
         16        IS_EQUAL                                                 !3, 'Regimen'
         17      > JMPZ                                                     ~12, ->20
         18    >   QM_ASSIGN                                        ~13     'board'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~13     !3
         21    >   SEND_VAL                                                 ~13
         22        DO_ICALL                                         $14     
         23        ASSIGN_DIM                                               !0
         24        OP_DATA                                                  $14
   26    25      > JMP                                                      ->14
         26    >   FE_FREE                                                  $10
   30    27    >   INIT_FCALL                                               'array_combine'
         28        SEND_VAR                                                 !0
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                         $16     
         31        ASSIGN_DIM                                               !1
         32        OP_DATA                                                  $16
   21    33      > JMP                                                      ->5
         34    >   FE_FREE                                                  $7
   31    35      > RETURN                                                   1

Function getrates:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KGbE3
function name:  getRates
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'array_fill'
    5     1        SEND_VAL                                                 0
    6     2        SEND_VAL                                                 10000
    8     3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $0      
          5      > RETURN                                                   $0
   17     6*     > RETURN                                                   null

End of function getrates

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.25 ms | 1403 KiB | 22 Q