3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Fill up array with names $a[]="Anna"; $a[]="Brittany"; $a[]="Cinderella"; $a[]="Diana"; $a[]="Eva"; $a[]="Fiona"; $a[]="Gunda"; $a[]="Hege"; $a[]="Inga"; $a[]="Johanna"; $a[]="Kitty"; $a[]="Linda"; $a[]="Nina"; $a[]="Ophelia"; $a[]="Petunia"; $a[]="Amanda"; $a[]="Raquel"; $a[]="Cindy"; $a[]="Doris"; $a[]="Eve"; $a[]="Evita"; $a[]="Sunniva"; $a[]="Tove"; $a[]="Unni"; $a[]="Violet"; $a[]="Liza"; $a[]="Elizabeth"; $a[]="Ellen"; $a[]="Wenche"; $a[]="Vicky"; //get the q parameter from URL $q="a"; //lookup all hints from array if length of q>0 if (strlen($q) > 0) { $hint=""; for($i=0; $i<count($a); $i++) { if (strtolower($q)==strtolower(substr($a[$i],0,strlen($q)))) { if ($hint=="") { $hint=$a[$i]; } else { $hint=$hint." , ".$a[$i]; } } } } // Set output to "no suggestion" if no hint were found // or to the correct values if ($hint == "") { $response="no suggestion"; } else { $response=$hint; } //output the response echo $response; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 95
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 92
Branch analysis from position: 92
2 jumps found. (Code = 44) Position 1 = 95, Position 2 = 67
Branch analysis from position: 95
2 jumps found. (Code = 43) Position 1 = 97, Position 2 = 99
Branch analysis from position: 97
1 jumps found. (Code = 42) Position 1 = 100
Branch analysis from position: 100
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 99
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 67
2 jumps found. (Code = 43) Position 1 = 82, Position 2 = 91
Branch analysis from position: 82
2 jumps found. (Code = 43) Position 1 = 84, Position 2 = 87
Branch analysis from position: 84
1 jumps found. (Code = 42) Position 1 = 91
Branch analysis from position: 91
2 jumps found. (Code = 44) Position 1 = 95, Position 2 = 67
Branch analysis from position: 95
Branch analysis from position: 67
Branch analysis from position: 87
2 jumps found. (Code = 44) Position 1 = 95, Position 2 = 67
Branch analysis from position: 95
Branch analysis from position: 67
Branch analysis from position: 91
Branch analysis from position: 95
filename:       /in/CXhjR
function name:  (null)
number of ops:  102
compiled vars:  !0 = $a, !1 = $q, !2 = $hint, !3 = $i, !4 = $response
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  'Anna'
    4     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  'Brittany'
    5     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  'Cinderella'
    6     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  'Diana'
    7     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  'Eva'
    8    10        ASSIGN_DIM                                               !0
         11        OP_DATA                                                  'Fiona'
    9    12        ASSIGN_DIM                                               !0
         13        OP_DATA                                                  'Gunda'
   10    14        ASSIGN_DIM                                               !0
         15        OP_DATA                                                  'Hege'
   11    16        ASSIGN_DIM                                               !0
         17        OP_DATA                                                  'Inga'
   12    18        ASSIGN_DIM                                               !0
         19        OP_DATA                                                  'Johanna'
   13    20        ASSIGN_DIM                                               !0
         21        OP_DATA                                                  'Kitty'
   14    22        ASSIGN_DIM                                               !0
         23        OP_DATA                                                  'Linda'
   15    24        ASSIGN_DIM                                               !0
         25        OP_DATA                                                  'Nina'
   16    26        ASSIGN_DIM                                               !0
         27        OP_DATA                                                  'Ophelia'
   17    28        ASSIGN_DIM                                               !0
         29        OP_DATA                                                  'Petunia'
   18    30        ASSIGN_DIM                                               !0
         31        OP_DATA                                                  'Amanda'
   19    32        ASSIGN_DIM                                               !0
         33        OP_DATA                                                  'Raquel'
   20    34        ASSIGN_DIM                                               !0
         35        OP_DATA                                                  'Cindy'
   21    36        ASSIGN_DIM                                               !0
         37        OP_DATA                                                  'Doris'
   22    38        ASSIGN_DIM                                               !0
         39        OP_DATA                                                  'Eve'
   23    40        ASSIGN_DIM                                               !0
         41        OP_DATA                                                  'Evita'
   24    42        ASSIGN_DIM                                               !0
         43        OP_DATA                                                  'Sunniva'
   25    44        ASSIGN_DIM                                               !0
         45        OP_DATA                                                  'Tove'
   26    46        ASSIGN_DIM                                               !0
         47        OP_DATA                                                  'Unni'
   27    48        ASSIGN_DIM                                               !0
         49        OP_DATA                                                  'Violet'
   28    50        ASSIGN_DIM                                               !0
         51        OP_DATA                                                  'Liza'
   29    52        ASSIGN_DIM                                               !0
         53        OP_DATA                                                  'Elizabeth'
   30    54        ASSIGN_DIM                                               !0
         55        OP_DATA                                                  'Ellen'
   31    56        ASSIGN_DIM                                               !0
         57        OP_DATA                                                  'Wenche'
   32    58        ASSIGN_DIM                                               !0
         59        OP_DATA                                                  'Vicky'
   35    60        ASSIGN                                                   !1, 'a'
   38    61        STRLEN                                           ~36     !1
         62        IS_SMALLER                                               0, ~36
         63      > JMPZ                                                     ~37, ->95
   40    64    >   ASSIGN                                                   !2, ''
   41    65        ASSIGN                                                   !3, 0
         66      > JMP                                                      ->92
   43    67    >   INIT_FCALL                                               'strtolower'
         68        SEND_VAR                                                 !1
         69        DO_ICALL                                         $40     
         70        INIT_FCALL                                               'strtolower'
         71        INIT_FCALL                                               'substr'
         72        FETCH_DIM_R                                      ~41     !0, !3
         73        SEND_VAL                                                 ~41
         74        SEND_VAL                                                 0
         75        STRLEN                                           ~42     !1
         76        SEND_VAL                                                 ~42
         77        DO_ICALL                                         $43     
         78        SEND_VAR                                                 $43
         79        DO_ICALL                                         $44     
         80        IS_EQUAL                                                 $40, $44
         81      > JMPZ                                                     ~45, ->91
   45    82    >   IS_EQUAL                                                 !2, ''
         83      > JMPZ                                                     ~46, ->87
   47    84    >   FETCH_DIM_R                                      ~47     !0, !3
         85        ASSIGN                                                   !2, ~47
         86      > JMP                                                      ->91
   51    87    >   CONCAT                                           ~49     !2, '+%2C+'
         88        FETCH_DIM_R                                      ~50     !0, !3
         89        CONCAT                                           ~51     ~49, ~50
         90        ASSIGN                                                   !2, ~51
   41    91    >   PRE_INC                                                  !3
         92    >   COUNT                                            ~54     !0
         93        IS_SMALLER                                               !3, ~54
         94      > JMPNZ                                                    ~55, ->67
   59    95    >   IS_EQUAL                                                 !2, ''
         96      > JMPZ                                                     ~56, ->99
   61    97    >   ASSIGN                                                   !4, 'no+suggestion'
         98      > JMP                                                      ->100
   65    99    >   ASSIGN                                                   !4, !2
   69   100    >   ECHO                                                     !4
   70   101      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.57 ms | 1396 KiB | 17 Q