3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stuff = array('germany', 'java', 'help', array('hello', 'help', array('save', 'me', 'python'))); echo recurrsiveTraverseArray($stuff); function recurrsiveTraverseArray($arr, $html=null){ $html = '<ul>'; foreach($arr as $v){ if(is_array($v)){ $html .= recurrsiveTraverseArray($v, $html); }else{ $html .= '<li>'.$v.'</li>'; } } $html .= '</ul>'; return $html; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wivps
function name:  (null)
number of ops:  6
compiled vars:  !0 = $stuff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL_BY_NAME                                       'recurrsiveTraverseArray'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
   16     5      > RETURN                                                   1

Function recurrsivetraversearray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 17
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/Wivps
function name:  recurrsiveTraverseArray
number of ops:  21
compiled vars:  !0 = $arr, !1 = $html, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    6     2        ASSIGN                                                   !1, '%3Cul%3E'
    7     3      > FE_RESET_R                                       $4      !0, ->17
          4    > > FE_FETCH_R                                               $4, !2, ->17
    8     5    >   TYPE_CHECK                                  128          !2
          6      > JMPZ                                                     ~5, ->13
    9     7    >   INIT_FCALL_BY_NAME                                       'recurrsiveTraverseArray'
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $6      
         11        ASSIGN_OP                                     8          !1, $6
    8    12      > JMP                                                      ->16
   11    13    >   CONCAT                                           ~8      '%3Cli%3E', !2
         14        CONCAT                                           ~9      ~8, '%3C%2Fli%3E'
         15        ASSIGN_OP                                     8          !1, ~9
    7    16    > > JMP                                                      ->4
         17    >   FE_FREE                                                  $4
   14    18        ASSIGN_OP                                     8          !1, '%3C%2Ful%3E'
   15    19      > RETURN                                                   !1
   16    20*     > RETURN                                                   null

End of function recurrsivetraversearray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.51 ms | 1003 KiB | 13 Q