3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( '31' => array( 'Amsterdam' => array(), 'Rotterdam' => array(), 'Den Haag' => array(), 'Utrecht' => array(), 'Eindhoven' => array(), 'Tilburg' => array(), 'Almere' => array( '036' => array( 'BU00340212' => array( 'name' => 'Muziekwijk Noord', 'residents' => array( 'Henk', 'Dirk', 'Jaap', ), ), 'BU00340213' => array( 'name' => 'Muziekwijk Zuid', 'residents' => array( 'Wim', 'Pim', 'Jim', 'Tim', ), ), ) ), 'Groningen' => array(), 'Breda' => array(), 'Nijmegen' => array(), ) ); function recursive($data, $countryCode = null, $countryData = null, $city = null, $cityData = null, $netNummer = null, $netData = null, $cbscode = null, $cbsData = null, $residents = null){ if($residents){ $resident = array_shift($residents); echo $city . '(netnummer: ' . $netNummer . ')(cbscode: ' . $cbscode .'): ' . $resident . '<br>'; if($residents){ recursive($data, $countryCode, $countryData, $city, $cityData, $netNummer, $netData, $cbscode, $cbsData, $residents); } return null; } if($cbscode && $cbsData){ $residents = $cbsData['residents']; recursive($data, $countryCode, $countryData, $city, $cityData, $netNummer, $netData, $cbscode, $cbsData, $residents); } if($countryCode && $countryData && $netData){ $cbscode = key($netData); $cbsData = array_shift($netData); recursive($data, $countryCode, $countryData, $city, $cityData, $netNummer, $netData, $cbscode, $cbsData); } if($countryCode && $countryData && $city && $cityData){ $netNummer = key($cityData); $netData = array_shift($cityData); recursive($data, $countryCode, $countryData, $city, $cityData, $netNummer, $netData); } if($countryCode && $countryData){ $city = key($countryData); $cityData = array_shift($countryData); recursive($data, $countryCode, $countryData, $city, $cityData); } if($data){ $countryCode = key($data); $countryData = array_shift($data); if($countryData){ recursive($data, $countryCode, $countryData); } } return null; } recursive($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rsf5o
function name:  (null)
number of ops:  5
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   86     1        INIT_FCALL                                               'recursive'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function recursive:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 37
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 36
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
Branch analysis from position: 37
2 jumps found. (Code = 46) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 54
Branch analysis from position: 40
2 jumps found. (Code = 46) Position 1 = 55, Position 2 = 56
Branch analysis from position: 55
2 jumps found. (Code = 46) Position 1 = 57, Position 2 = 58
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 78
Branch analysis from position: 59
2 jumps found. (Code = 46) Position 1 = 79, Position 2 = 80
Branch analysis from position: 79
2 jumps found. (Code = 46) Position 1 = 81, Position 2 = 82
Branch analysis from position: 81
2 jumps found. (Code = 46) Position 1 = 83, Position 2 = 84
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 85, Position 2 = 102
Branch analysis from position: 85
2 jumps found. (Code = 46) Position 1 = 103, Position 2 = 104
Branch analysis from position: 103
2 jumps found. (Code = 43) Position 1 = 105, Position 2 = 120
Branch analysis from position: 105
2 jumps found. (Code = 43) Position 1 = 121, Position 2 = 135
Branch analysis from position: 121
2 jumps found. (Code = 43) Position 1 = 130, Position 2 = 135
Branch analysis from position: 130
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 135
Branch analysis from position: 135
Branch analysis from position: 120
Branch analysis from position: 104
Branch analysis from position: 102
Branch analysis from position: 84
Branch analysis from position: 82
Branch analysis from position: 80
Branch analysis from position: 78
Branch analysis from position: 58
Branch analysis from position: 56
Branch analysis from position: 54
Branch analysis from position: 39
filename:       /in/rsf5o
function name:  recursive
number of ops:  137
compiled vars:  !0 = $data, !1 = $countryCode, !2 = $countryData, !3 = $city, !4 = $cityData, !5 = $netNummer, !6 = $netData, !7 = $cbscode, !8 = $cbsData, !9 = $residents, !10 = $resident
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
          3        RECV_INIT                                        !3      null
          4        RECV_INIT                                        !4      null
          5        RECV_INIT                                        !5      null
          6        RECV_INIT                                        !6      null
          7        RECV_INIT                                        !7      null
          8        RECV_INIT                                        !8      null
          9        RECV_INIT                                        !9      null
   41    10      > JMPZ                                                     !9, ->37
   42    11    >   INIT_FCALL                                               'array_shift'
         12        SEND_REF                                                 !9
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !10, $11
   43    15        CONCAT                                           ~13     !3, '%28netnummer%3A+'
         16        CONCAT                                           ~14     ~13, !5
         17        CONCAT                                           ~15     ~14, '%29%28cbscode%3A+'
         18        CONCAT                                           ~16     ~15, !7
         19        CONCAT                                           ~17     ~16, '%29%3A+'
         20        CONCAT                                           ~18     ~17, !10
         21        CONCAT                                           ~19     ~18, '%3Cbr%3E'
         22        ECHO                                                     ~19
   45    23      > JMPZ                                                     !9, ->36
   46    24    >   INIT_FCALL_BY_NAME                                       'recursive'
         25        SEND_VAR_EX                                              !0
         26        SEND_VAR_EX                                              !1
         27        SEND_VAR_EX                                              !2
         28        SEND_VAR_EX                                              !3
         29        SEND_VAR_EX                                              !4
         30        SEND_VAR_EX                                              !5
         31        SEND_VAR_EX                                              !6
         32        SEND_VAR_EX                                              !7
         33        SEND_VAR_EX                                              !8
         34        SEND_VAR_EX                                              !9
         35        DO_FCALL                                      0          
   49    36    > > RETURN                                                   null
   52    37    > > JMPZ_EX                                          ~21     !7, ->39
         38    >   BOOL                                             ~21     !8
         39    > > JMPZ                                                     ~21, ->54
   53    40    >   FETCH_DIM_R                                      ~22     !8, 'residents'
         41        ASSIGN                                                   !9, ~22
   54    42        INIT_FCALL_BY_NAME                                       'recursive'
         43        SEND_VAR_EX                                              !0
         44        SEND_VAR_EX                                              !1
         45        SEND_VAR_EX                                              !2
         46        SEND_VAR_EX                                              !3
         47        SEND_VAR_EX                                              !4
         48        SEND_VAR_EX                                              !5
         49        SEND_VAR_EX                                              !6
         50        SEND_VAR_EX                                              !7
         51        SEND_VAR_EX                                              !8
         52        SEND_VAR_EX                                              !9
         53        DO_FCALL                                      0          
   57    54    > > JMPZ_EX                                          ~25     !1, ->56
         55    >   BOOL                                             ~25     !2
         56    > > JMPZ_EX                                          ~25     ~25, ->58
         57    >   BOOL                                             ~25     !6
         58    > > JMPZ                                                     ~25, ->78
   58    59    >   INIT_FCALL                                               'key'
         60        SEND_VAR                                                 !6
         61        DO_ICALL                                         $26     
         62        ASSIGN                                                   !7, $26
   59    63        INIT_FCALL                                               'array_shift'
         64        SEND_REF                                                 !6
         65        DO_ICALL                                         $28     
         66        ASSIGN                                                   !8, $28
   60    67        INIT_FCALL_BY_NAME                                       'recursive'
         68        SEND_VAR_EX                                              !0
         69        SEND_VAR_EX                                              !1
         70        SEND_VAR_EX                                              !2
         71        SEND_VAR_EX                                              !3
         72        SEND_VAR_EX                                              !4
         73        SEND_VAR_EX                                              !5
         74        SEND_VAR_EX                                              !6
         75        SEND_VAR_EX                                              !7
         76        SEND_VAR_EX                                              !8
         77        DO_FCALL                                      0          
   63    78    > > JMPZ_EX                                          ~31     !1, ->80
         79    >   BOOL                                             ~31     !2
         80    > > JMPZ_EX                                          ~31     ~31, ->82
         81    >   BOOL                                             ~31     !3
         82    > > JMPZ_EX                                          ~31     ~31, ->84
         83    >   BOOL                                             ~31     !4
         84    > > JMPZ                                                     ~31, ->102
   64    85    >   INIT_FCALL                                               'key'
         86        SEND_VAR                                                 !4
         87        DO_ICALL                                         $32     
         88        ASSIGN                                                   !5, $32
   65    89        INIT_FCALL                                               'array_shift'
         90        SEND_REF                                                 !4
         91        DO_ICALL                                         $34     
         92        ASSIGN                                                   !6, $34
   66    93        INIT_FCALL_BY_NAME                                       'recursive'
         94        SEND_VAR_EX                                              !0
         95        SEND_VAR_EX                                              !1
         96        SEND_VAR_EX                                              !2
         97        SEND_VAR_EX                                              !3
         98        SEND_VAR_EX                                              !4
         99        SEND_VAR_EX                                              !5
        100        SEND_VAR_EX                                              !6
        101        DO_FCALL                                      0          
   69   102    > > JMPZ_EX                                          ~37     !1, ->104
        103    >   BOOL                                             ~37     !2
        104    > > JMPZ                                                     ~37, ->120
   70   105    >   INIT_FCALL                                               'key'
        106        SEND_VAR                                                 !2
        107        DO_ICALL                                         $38     
        108        ASSIGN                                                   !3, $38
   71   109        INIT_FCALL                                               'array_shift'
        110        SEND_REF                                                 !2
        111        DO_ICALL                                         $40     
        112        ASSIGN                                                   !4, $40
   72   113        INIT_FCALL_BY_NAME                                       'recursive'
        114        SEND_VAR_EX                                              !0
        115        SEND_VAR_EX                                              !1
        116        SEND_VAR_EX                                              !2
        117        SEND_VAR_EX                                              !3
        118        SEND_VAR_EX                                              !4
        119        DO_FCALL                                      0          
   75   120    > > JMPZ                                                     !0, ->135
   76   121    >   INIT_FCALL                                               'key'
        122        SEND_VAR                                                 !0
        123        DO_ICALL                                         $43     
        124        ASSIGN                                                   !1, $43
   77   125        INIT_FCALL                                               'array_shift'
        126        SEND_REF                                                 !0
        127        DO_ICALL                                         $45     
        128        ASSIGN                                                   !2, $45
   78   129      > JMPZ                                                     !2, ->135
   79   130    >   INIT_FCALL_BY_NAME                                       'recursive'
        131        SEND_VAR_EX                                              !0
        132        SEND_VAR_EX                                              !1
        133        SEND_VAR_EX                                              !2
        134        DO_FCALL                                      0          
   83   135    > > RETURN                                                   null
   84   136*     > RETURN                                                   null

End of function recursive

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.69 ms | 1022 KiB | 16 Q