3v4l.org

run code in 300+ PHP versions simultaneously
<?php function MySwal($items, $k){ if ($items[$k] != "end") { //if ($items != "end") { echo <<<MySWALSTUFF_A <p> at {$k} : processing {$items[$k]} . next item is {$items[$k+1]} MySWALSTUFF_A; //include this later echo MySwal($items, ($k+1)); //recursive function } else { //else for if item is !=end echo "<HR><h3>This is the end, beautiful friend... </h3>"; }//if for item != end ends here :-) } MySwal(array('one', 'two', 'end'), 0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SuXLR
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'myswal'
          1        SEND_VAL                                                 <array>
          2        SEND_VAL                                                 0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function myswal:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SuXLR
function name:  MySwal
number of ops:  24
compiled vars:  !0 = $items, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        FETCH_DIM_R                                      ~2      !0, !1
          3        IS_NOT_EQUAL                                             ~2, 'end'
          4      > JMPZ                                                     ~3, ->22
    8     5    >   ROPE_INIT                                     6  ~8      '++++%3Cp%3E+at+'
          6        ROPE_ADD                                      1  ~8      ~8, !1
          7        ROPE_ADD                                      2  ~8      ~8, '+%3A+processing+'
          8        FETCH_DIM_R                                      ~4      !0, !1
          9        ROPE_ADD                                      3  ~8      ~8, ~4
         10        ROPE_ADD                                      4  ~8      ~8, '+.+next+item+is+'
         11        ADD                                              ~5      !1, 1
         12        FETCH_DIM_R                                      ~6      !0, ~5
         13        ROPE_END                                      5  ~7      ~8, ~6
         14        ECHO                                                     ~7
   11    15        INIT_FCALL_BY_NAME                                       'MySwal'
         16        SEND_VAR_EX                                              !0
         17        ADD                                              ~11     !1, 1
         18        SEND_VAL_EX                                              ~11
         19        DO_FCALL                                      0  $12     
         20        ECHO                                                     $12
    5    21      > JMP                                                      ->23
   17    22    >   ECHO                                                     '%3CHR%3E%3Ch3%3EThis+is+the+end%2C+beautiful+friend...+%3C%2Fh3%3E'
   23    23    > > RETURN                                                   null

End of function myswal

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.87 ms | 1002 KiB | 14 Q