3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phrase_array = str_split("wo-rd"); $cleanse = array("!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "+", "=", "\\", "|", "}", "]", "[", "{", "'", '"', "?", "/", ".", ">", ",", "<"); $non_alpha_num = !empty(array_intersect($cleanse, $phrase_array)); $cleanse_length = count($cleanse); $phrase_length = count($phrase_array); if($non_alpha_num){ for($x=0;$x<$cleanse_length-1;$x++){ for($z=0;$z<$phrase_length-1;$z++) if($phrase_array[$z] == $cleanse[$x]){ $match = array_search($cleanse[$x], $phrase_array); array_splice($phrase_array, $match, 1); } } } $cleanse_phrase = implode("", $phrase_array); $phrase_array = explode(" ", strtolower($cleanse_phrase)); $search_value = array_keys($phrase_array, strtolower("word")); echo count($search_value);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 44
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 19
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 21
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 19
Branch analysis from position: 44
Branch analysis from position: 19
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 36
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 21
Branch analysis from position: 40
Branch analysis from position: 21
Branch analysis from position: 36
Branch analysis from position: 44
filename:       /in/NAV7N
function name:  (null)
number of ops:  68
compiled vars:  !0 = $phrase_array, !1 = $cleanse, !2 = $non_alpha_num, !3 = $cleanse_length, !4 = $phrase_length, !5 = $x, !6 = $z, !7 = $match, !8 = $cleanse_phrase, !9 = $search_value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_split'
          1        SEND_VAL                                                 'wo-rd'
          2        DO_ICALL                                         $10     
          3        ASSIGN                                                   !0, $10
    4     4        ASSIGN                                                   !1, <array>
    6     5        INIT_FCALL                                               'array_intersect'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $13     
          9        BOOL_NOT                                         ~14     $13
         10        BOOL_NOT                                         ~15     ~14
         11        ASSIGN                                                   !2, ~15
    7    12        COUNT                                            ~17     !1
         13        ASSIGN                                                   !3, ~17
    8    14        COUNT                                            ~19     !0
         15        ASSIGN                                                   !4, ~19
   10    16      > JMPZ                                                     !2, ->44
   11    17    >   ASSIGN                                                   !5, 0
         18      > JMP                                                      ->41
   12    19    >   ASSIGN                                                   !6, 0
         20      > JMP                                                      ->37
   13    21    >   FETCH_DIM_R                                      ~23     !0, !6
         22        FETCH_DIM_R                                      ~24     !1, !5
         23        IS_EQUAL                                                 ~23, ~24
         24      > JMPZ                                                     ~25, ->36
   14    25    >   INIT_FCALL                                               'array_search'
         26        FETCH_DIM_R                                      ~26     !1, !5
         27        SEND_VAL                                                 ~26
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $27     
         30        ASSIGN                                                   !7, $27
   15    31        INIT_FCALL                                               'array_splice'
         32        SEND_REF                                                 !0
         33        SEND_VAR                                                 !7
         34        SEND_VAL                                                 1
         35        DO_ICALL                                                 
   12    36    >   PRE_INC                                                  !6
         37    >   SUB                                              ~31     !4, 1
         38        IS_SMALLER                                               !6, ~31
         39      > JMPNZ                                                    ~32, ->21
   11    40    >   PRE_INC                                                  !5
         41    >   SUB                                              ~34     !3, 1
         42        IS_SMALLER                                               !5, ~34
         43      > JMPNZ                                                    ~35, ->19
   20    44    >   INIT_FCALL                                               'implode'
         45        SEND_VAL                                                 ''
         46        SEND_VAR                                                 !0
         47        DO_ICALL                                         $36     
         48        ASSIGN                                                   !8, $36
   21    49        INIT_FCALL                                               'explode'
         50        SEND_VAL                                                 '+'
         51        INIT_FCALL                                               'strtolower'
         52        SEND_VAR                                                 !8
         53        DO_ICALL                                         $38     
         54        SEND_VAR                                                 $38
         55        DO_ICALL                                         $39     
         56        ASSIGN                                                   !0, $39
   23    57        INIT_FCALL                                               'array_keys'
         58        SEND_VAR                                                 !0
         59        INIT_FCALL                                               'strtolower'
         60        SEND_VAL                                                 'word'
         61        DO_ICALL                                         $41     
         62        SEND_VAR                                                 $41
         63        DO_ICALL                                         $42     
         64        ASSIGN                                                   !9, $42
   25    65        COUNT                                            ~44     !9
         66        ECHO                                                     ~44
         67      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.24 ms | 1405 KiB | 29 Q