3v4l.org

run code in 300+ PHP versions simultaneously
<?php function createAttributeCollections($pricingAttributes = null, $permutation = array()){ //permutation result if (empty($pricingAttributes)) { yield join(',', $permutation ); //permutation } else { //permutation loop for ($i = count($pricingAttributes) - 1; $i >= 0; --$i) { $newpricingAttributes = $pricingAttributes; $newPermutations = $permutation; list($foo) = array_splice($newpricingAttributes, $i, 1); array_unshift($newPermutations, $foo); createAttributeCollections($newpricingAttributes, $newPermutations); } } } $results = createAttributeCollections(array('A','B','G','U')); foreach($results as $result){ echo $result.'<br>'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/AaDeR
function name:  (null)
number of ops:  11
compiled vars:  !0 = $results, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'createattributecollections'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
   22     4      > FE_RESET_R                                       $4      !0, ->9
          5    > > FE_FETCH_R                                               $4, !1, ->9
   23     6    >   CONCAT                                           ~5      !1, '%3Cbr%3E'
          7        ECHO                                                     ~5
   22     8      > JMP                                                      ->5
          9    >   FE_FREE                                                  $4
   24    10      > RETURN                                                   1

Function createattributecollections:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 15
Branch analysis from position: 36
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 15
Branch analysis from position: 36
Branch analysis from position: 15
filename:       /in/AaDeR
function name:  createAttributeCollections
number of ops:  37
compiled vars:  !0 = $pricingAttributes, !1 = $permutation, !2 = $i, !3 = $newpricingAttributes, !4 = $newPermutations, !5 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      <array>
          2        GENERATOR_CREATE                                         
    5     3        ISSET_ISEMPTY_CV                                         !0
          4      > JMPZ                                                     ~6, ->11
    6     5    >   INIT_FCALL                                               'join'
          6        SEND_VAL                                                 '%2C'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        YIELD                                                    $7
         10      > JMP                                                      ->36
   10    11    >   COUNT                                            ~9      !0
         12        SUB                                              ~10     ~9, 1
         13        ASSIGN                                                   !2, ~10
         14      > JMP                                                      ->34
   11    15    >   ASSIGN                                                   !3, !0
   12    16        ASSIGN                                                   !4, !1
   13    17        INIT_FCALL                                               'array_splice'
         18        SEND_REF                                                 !3
         19        SEND_VAR                                                 !2
         20        SEND_VAL                                                 1
         21        DO_ICALL                                         $14     
         22        FETCH_LIST_R                                     $15     $14, 0
         23        ASSIGN                                                   !5, $15
         24        FREE                                                     $14
   14    25        INIT_FCALL                                               'array_unshift'
         26        SEND_REF                                                 !4
         27        SEND_VAR                                                 !5
         28        DO_ICALL                                                 
   15    29        INIT_FCALL_BY_NAME                                       'createAttributeCollections'
         30        SEND_VAR_EX                                              !3
         31        SEND_VAR_EX                                              !4
         32        DO_FCALL                                      0          
   10    33        PRE_DEC                                                  !2
         34    >   IS_SMALLER_OR_EQUAL                                      0, !2
         35      > JMPNZ                                                    ~20, ->15
   18    36    > > GENERATOR_RETURN                                         

End of function createattributecollections

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.82 ms | 1394 KiB | 20 Q