3v4l.org

run code in 300+ PHP versions simultaneously
<?php $textos[] = 'yuqkdp69yHryACb778mvZsbFegIBU#'; $textos[] = 'yuqk#p69yHryACb778mvZsbFigIBUh'; $textos[] = 'yuqksp69yHryACb778m#Zs#Fi#IBUh'; $textos[] = 'yuqksp69yHryACb778mvZsbFigIBUh'; $textos[] = 'yuqksp69yHryACb778mvZsb%igIBUh'; $textos[] = 'yuqksp69yHryACb778mvZsbFigIBU&'; $textos[] = 'yuqksp@9yHryACb778mvZsbFigIBUh'; foreach ($textos as $index => $texto) { for ($i = 0; $i < 10000; $i++) { $inicio = microtime(true); tem_simbolo_na_senha($texto); $fim[$index][] = microtime(true) - $inicio; } echo (int)tem_simbolo_na_senha($texto) . ' - '. $texto . ' demorou ' . array_sum($fim[$index]) / count($fim[$index]); echo PHP_EOL; } function tem_simbolo_na_senha($texto) { $return = 0; $tamanho = mb_strlen($texto, '8bit'); for($i = 0; $i < $tamanho; $i++){ $return |= (int)($texto[$i] === "#" xor $texto[$i] === "@" xor $texto[$i] === "%" xor $texto[$i] === "&"); } return $return !== 0; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 54
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 54
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 19
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 19
Branch analysis from position: 36
Branch analysis from position: 19
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 54
filename:       /in/RDYUQ
function name:  (null)
number of ops:  56
compiled vars:  !0 = $textos, !1 = $texto, !2 = $index, !3 = $i, !4 = $inicio, !5 = $fim
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  'yuqkdp69yHryACb778mvZsbFegIBU%23'
    4     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  'yuqk%23p69yHryACb778mvZsbFigIBUh'
    5     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  'yuqksp69yHryACb778m%23Zs%23Fi%23IBUh'
    6     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  'yuqksp69yHryACb778mvZsbFigIBUh'
    7     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  'yuqksp69yHryACb778mvZsb%25igIBUh'
    8    10        ASSIGN_DIM                                               !0
         11        OP_DATA                                                  'yuqksp69yHryACb778mvZsbFigIBU%26'
    9    12        ASSIGN_DIM                                               !0
         13        OP_DATA                                                  'yuqksp%409yHryACb778mvZsbFigIBUh'
   11    14      > FE_RESET_R                                       $13     !0, ->54
         15    > > FE_FETCH_R                                       ~14     $13, !1, ->54
         16    >   ASSIGN                                                   !2, ~14
   13    17        ASSIGN                                                   !3, 0
         18      > JMP                                                      ->34
   15    19    >   INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $17     
         22        ASSIGN                                                   !4, $17
   17    23        INIT_FCALL_BY_NAME                                       'tem_simbolo_na_senha'
         24        SEND_VAR_EX                                              !1
         25        DO_FCALL                                      0          
   19    26        INIT_FCALL                                               'microtime'
         27        SEND_VAL                                                 <true>
         28        DO_ICALL                                         $22     
         29        SUB                                              ~23     $22, !4
         30        FETCH_DIM_W                                      $20     !5, !2
         31        ASSIGN_DIM                                               $20
         32        OP_DATA                                                  ~23
   13    33        PRE_INC                                                  !3
         34    >   IS_SMALLER                                               !3, 10000
         35      > JMPNZ                                                    ~25, ->19
   23    36    >   INIT_FCALL_BY_NAME                                       'tem_simbolo_na_senha'
         37        SEND_VAR_EX                                              !1
         38        DO_FCALL                                      0  $26     
         39        CAST                                          4  ~27     $26
         40        CONCAT                                           ~28     ~27, '+-+'
         41        CONCAT                                           ~29     ~28, !1
         42        CONCAT                                           ~30     ~29, '+demorou+'
         43        INIT_FCALL                                               'array_sum'
         44        FETCH_DIM_R                                      ~31     !5, !2
         45        SEND_VAL                                                 ~31
         46        DO_ICALL                                         $32     
         47        FETCH_DIM_R                                      ~33     !5, !2
         48        COUNT                                            ~34     ~33
         49        DIV                                              ~35     $32, ~34
         50        CONCAT                                           ~36     ~30, ~35
         51        ECHO                                                     ~36
   24    52        ECHO                                                     '%0A'
   11    53      > JMP                                                      ->15
         54    >   FE_FREE                                                  $13
   43    55      > RETURN                                                   1

Function tem_simbolo_na_senha:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 9
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 9
Branch analysis from position: 25
Branch analysis from position: 9
filename:       /in/RDYUQ
function name:  tem_simbolo_na_senha
number of ops:  28
compiled vars:  !0 = $texto, !1 = $return, !2 = $tamanho, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   31     1        ASSIGN                                                   !1, 0
   33     2        INIT_FCALL                                               'mb_strlen'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '8bit'
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
   35     7        ASSIGN                                                   !3, 0
          8      > JMP                                                      ->23
   37     9    >   FETCH_DIM_R                                      ~8      !0, !3
         10        IS_IDENTICAL                                     ~9      ~8, '%23'
         11        FETCH_DIM_R                                      ~10     !0, !3
         12        IS_IDENTICAL                                     ~11     ~10, '%40'
         13        BOOL_XOR                                         ~12     ~9, ~11
         14        FETCH_DIM_R                                      ~13     !0, !3
         15        IS_IDENTICAL                                     ~14     ~13, '%25'
         16        BOOL_XOR                                         ~15     ~12, ~14
         17        FETCH_DIM_R                                      ~16     !0, !3
         18        IS_IDENTICAL                                     ~17     ~16, '%26'
         19        BOOL_XOR                                         ~18     ~15, ~17
         20        CAST                                          4  ~19     ~18
         21        ASSIGN_OP                                     9          !1, ~19
   35    22        PRE_INC                                                  !3
         23    >   IS_SMALLER                                               !3, !2
         24      > JMPNZ                                                    ~22, ->9
   41    25    >   IS_NOT_IDENTICAL                                 ~23     !1, 0
         26      > RETURN                                                   ~23
   43    27*     > RETURN                                                   null

End of function tem_simbolo_na_senha

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.7 ms | 999 KiB | 16 Q