3v4l.org

run code in 300+ PHP versions simultaneously
<?php function CountRepeats_nonletters($first_input, $second_input) { $phrase_array = str_split($second_input); $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<27;$x++){ for($z=0;$z<$phrase_length-2;$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($first_input)); return count($search_value); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fujQv
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E > > RETURN                                                   1

Function countrepeats_nonletters:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 45
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 21
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 23
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 21
Branch analysis from position: 45
Branch analysis from position: 21
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 38
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 23
Branch analysis from position: 42
Branch analysis from position: 23
Branch analysis from position: 38
Branch analysis from position: 45
filename:       /in/fujQv
function name:  CountRepeats_nonletters
number of ops:  69
compiled vars:  !0 = $first_input, !1 = $second_input, !2 = $phrase_array, !3 = $cleanse, !4 = $non_alpha_num, !5 = $cleanse_length, !6 = $phrase_length, !7 = $x, !8 = $z, !9 = $match, !10 = $cleanse_phrase, !11 = $search_value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'str_split'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $12     
          5        ASSIGN                                                   !2, $12
    6     6        ASSIGN                                                   !3, <array>
    8     7        INIT_FCALL                                               'array_intersect'
          8        SEND_VAR                                                 !3
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $15     
         11        BOOL_NOT                                         ~16     $15
         12        BOOL_NOT                                         ~17     ~16
         13        ASSIGN                                                   !4, ~17
    9    14        COUNT                                            ~19     !3
         15        ASSIGN                                                   !5, ~19
   10    16        COUNT                                            ~21     !2
         17        ASSIGN                                                   !6, ~21
   13    18      > JMPZ                                                     !4, ->45
   14    19    >   ASSIGN                                                   !7, 0
         20      > JMP                                                      ->43
   15    21    >   ASSIGN                                                   !8, 0
         22      > JMP                                                      ->39
   16    23    >   FETCH_DIM_R                                      ~25     !2, !8
         24        FETCH_DIM_R                                      ~26     !3, !7
         25        IS_EQUAL                                                 ~25, ~26
         26      > JMPZ                                                     ~27, ->38
   17    27    >   INIT_FCALL                                               'array_search'
         28        FETCH_DIM_R                                      ~28     !3, !7
         29        SEND_VAL                                                 ~28
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                         $29     
         32        ASSIGN                                                   !9, $29
   18    33        INIT_FCALL                                               'array_splice'
         34        SEND_REF                                                 !2
         35        SEND_VAR                                                 !9
         36        SEND_VAL                                                 1
         37        DO_ICALL                                                 
   15    38    >   PRE_INC                                                  !8
         39    >   SUB                                              ~33     !6, 2
         40        IS_SMALLER                                               !8, ~33
         41      > JMPNZ                                                    ~34, ->23
   14    42    >   PRE_INC                                                  !7
         43    >   IS_SMALLER                                               !7, 27
         44      > JMPNZ                                                    ~36, ->21
   23    45    >   INIT_FCALL                                               'implode'
         46        SEND_VAL                                                 ''
         47        SEND_VAR                                                 !2
         48        DO_ICALL                                         $37     
         49        ASSIGN                                                   !10, $37
   25    50        INIT_FCALL                                               'explode'
         51        SEND_VAL                                                 '+'
         52        INIT_FCALL                                               'strtolower'
         53        SEND_VAR                                                 !10
         54        DO_ICALL                                         $39     
         55        SEND_VAR                                                 $39
         56        DO_ICALL                                         $40     
         57        ASSIGN                                                   !2, $40
   26    58        INIT_FCALL                                               'array_keys'
         59        SEND_VAR                                                 !2
         60        INIT_FCALL                                               'strtolower'
         61        SEND_VAR                                                 !0
         62        DO_ICALL                                         $42     
         63        SEND_VAR                                                 $42
         64        DO_ICALL                                         $43     
         65        ASSIGN                                                   !11, $43
   28    66        COUNT                                            ~45     !11
         67      > RETURN                                                   ~45
   29    68*     > RETURN                                                   null

End of function countrepeats_nonletters

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.94 ms | 1400 KiB | 29 Q