3v4l.org

run code in 300+ PHP versions simultaneously
<?php function depbuild($name, $location, $suffix, $locale) { echo "*** $name - $location - $suffix - $locale\n\n"; $locales = $locale ? array($locale, null) : array(null); $extensions = array_filter(array( ($location && $suffix) ? implode('-', array($location, $suffix)) : null, $suffix ?: null, $location ?: null, )); $extensions[] = null; $routing = array(); foreach ($locales as $lang) { foreach ($extensions as $extension) { echo implode('-', array_filter(array( $name, $extension, $lang, ))) . '.html'.PHP_EOL; } } } $name = 'foo'; $location = array(null, 'GL', 'AS'); $suffix = array(null, 'P','C'); $locale = array(null, 'fr_FR'); foreach($location as $loc) { foreach($suffix as $s) { foreach($locale as $l) { depbuild($name, $loc, $s, $l); echo PHP_EOL.'--------'.PHP_EOL; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 22
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 20
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 18
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 20
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/TnvvK
function name:  (null)
number of ops:  24
compiled vars:  !0 = $name, !1 = $location, !2 = $suffix, !3 = $locale, !4 = $loc, !5 = $s, !6 = $l
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   ASSIGN                                                   !0, 'foo'
   26     1        ASSIGN                                                   !1, <array>
   27     2        ASSIGN                                                   !2, <array>
   28     3        ASSIGN                                                   !3, <array>
   30     4      > FE_RESET_R                                       $11     !1, ->22
          5    > > FE_FETCH_R                                               $11, !4, ->22
   31     6    > > FE_RESET_R                                       $12     !2, ->20
          7    > > FE_FETCH_R                                               $12, !5, ->20
   32     8    > > FE_RESET_R                                       $13     !3, ->18
          9    > > FE_FETCH_R                                               $13, !6, ->18
   33    10    >   INIT_FCALL                                               'depbuild'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !4
         13        SEND_VAR                                                 !5
         14        SEND_VAR                                                 !6
         15        DO_FCALL                                      0          
   34    16        ECHO                                                     '%0A--------%0A'
   32    17      > JMP                                                      ->9
         18    >   FE_FREE                                                  $13
   31    19      > JMP                                                      ->7
         20    >   FE_FREE                                                  $12
   30    21      > JMP                                                      ->5
         22    >   FE_FREE                                                  $11
   37    23      > RETURN                                                   1

Function depbuild:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 33
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 77) Position 1 = 48, Position 2 = 67
Branch analysis from position: 48
2 jumps found. (Code = 78) Position 1 = 49, Position 2 = 67
Branch analysis from position: 49
2 jumps found. (Code = 77) Position 1 = 50, Position 2 = 65
Branch analysis from position: 50
2 jumps found. (Code = 78) Position 1 = 51, Position 2 = 65
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
Branch analysis from position: 65
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
Branch analysis from position: 65
Branch analysis from position: 67
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 67
Branch analysis from position: 33
2 jumps found. (Code = 77) Position 1 = 48, Position 2 = 67
Branch analysis from position: 48
Branch analysis from position: 67
Branch analysis from position: 24
Branch analysis from position: 19
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
Branch analysis from position: 24
filename:       /in/TnvvK
function name:  depbuild
number of ops:  69
compiled vars:  !0 = $name, !1 = $location, !2 = $suffix, !3 = $locale, !4 = $locales, !5 = $extensions, !6 = $routing, !7 = $lang, !8 = $extension
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    4     4        ROPE_INIT                                     9  ~10     '%2A%2A%2A+'
          5        ROPE_ADD                                      1  ~10     ~10, !0
          6        ROPE_ADD                                      2  ~10     ~10, '+-+'
          7        ROPE_ADD                                      3  ~10     ~10, !1
          8        ROPE_ADD                                      4  ~10     ~10, '+-+'
          9        ROPE_ADD                                      5  ~10     ~10, !2
         10        ROPE_ADD                                      6  ~10     ~10, '+-+'
         11        ROPE_ADD                                      7  ~10     ~10, !3
         12        ROPE_END                                      8  ~9      ~10, '%0A%0A'
         13        ECHO                                                     ~9
    5    14      > JMPZ                                                     !3, ->19
         15    >   INIT_ARRAY                                       ~15     !3
         16        ADD_ARRAY_ELEMENT                                ~15     null
         17        QM_ASSIGN                                        ~16     ~15
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~16     <array>
         20    >   ASSIGN                                                   !4, ~16
    6    21        INIT_FCALL                                               'array_filter'
    7    22      > JMPZ_EX                                          ~18     !1, ->24
         23    >   BOOL                                             ~18     !2
         24    > > JMPZ                                                     ~18, ->33
         25    >   INIT_FCALL                                               'implode'
         26        SEND_VAL                                                 '-'
         27        INIT_ARRAY                                       ~19     !1
         28        ADD_ARRAY_ELEMENT                                ~19     !2
         29        SEND_VAL                                                 ~19
         30        DO_ICALL                                         $20     
         31        QM_ASSIGN                                        ~21     $20
         32      > JMP                                                      ->34
         33    >   QM_ASSIGN                                        ~21     null
         34    >   INIT_ARRAY                                       ~22     ~21
    8    35        JMP_SET                                          ~23     !2, ->37
    7    36        QM_ASSIGN                                        ~23     null
         37        ADD_ARRAY_ELEMENT                                ~22     ~23
    9    38        JMP_SET                                          ~24     !1, ->40
    7    39        QM_ASSIGN                                        ~24     null
         40        ADD_ARRAY_ELEMENT                                ~22     ~24
         41        SEND_VAL                                                 ~22
         42        DO_ICALL                                         $25     
    6    43        ASSIGN                                                   !5, $25
   11    44        ASSIGN_DIM                                               !5
         45        OP_DATA                                                  null
   13    46        ASSIGN                                                   !6, <array>
   14    47      > FE_RESET_R                                       $29     !4, ->67
         48    > > FE_FETCH_R                                               $29, !7, ->67
   15    49    > > FE_RESET_R                                       $30     !5, ->65
         50    > > FE_FETCH_R                                               $30, !8, ->65
   16    51    >   INIT_FCALL                                               'implode'
         52        SEND_VAL                                                 '-'
         53        INIT_FCALL                                               'array_filter'
   17    54        INIT_ARRAY                                       ~31     !0
   18    55        ADD_ARRAY_ELEMENT                                ~31     !8
   19    56        ADD_ARRAY_ELEMENT                                ~31     !7
         57        SEND_VAL                                                 ~31
         58        DO_ICALL                                         $32     
         59        SEND_VAR                                                 $32
         60        DO_ICALL                                         $33     
   20    61        CONCAT                                           ~34     $33, '.html'
         62        CONCAT                                           ~35     ~34, '%0A'
         63        ECHO                                                     ~35
   15    64      > JMP                                                      ->50
         65    >   FE_FREE                                                  $30
   14    66      > JMP                                                      ->48
         67    >   FE_FREE                                                  $29
   23    68      > RETURN                                                   null

End of function depbuild

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.36 ms | 1407 KiB | 18 Q