3v4l.org

run code in 300+ PHP versions simultaneously
<?php $textos[] = 'yuqkdp69yHryACb778mvZsbFegIBU#'; $textos[] = 'yuqk#p69yHryACb778mvZsbFigIBUh'; shuffle($textos); foreach ($textos as $texto) { $fim = []; for ($i = 0; $i < 10000; $i++) { $inicio = microtime(true); tem_simbolo_na_senha($texto); $fim[] = microtime(true) - $inicio; } echo $texto . ' demorou ' . array_sum($fim) / count($fim); echo PHP_EOL; } function tem_simbolo_na_senha($texto) { $texto = str_split($texto); foreach ($texto as $letra) { if ($letra == "#" || $letra == "@" || $letra == "%" || $letra == "&") { return true; } } return false; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 38
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 38
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 12
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 12
Branch analysis from position: 28
Branch analysis from position: 12
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/4AcU6
function name:  (null)
number of ops:  40
compiled vars:  !0 = $textos, !1 = $texto, !2 = $fim, !3 = $i, !4 = $inicio
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'
    6     4        INIT_FCALL                                               'shuffle'
          5        SEND_REF                                                 !0
          6        DO_ICALL                                                 
    8     7      > FE_RESET_R                                       $8      !0, ->38
          8    > > FE_FETCH_R                                               $8, !1, ->38
   10     9    >   ASSIGN                                                   !2, <array>
   12    10        ASSIGN                                                   !3, 0
         11      > JMP                                                      ->26
   14    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $11     
         15        ASSIGN                                                   !4, $11
   16    16        INIT_FCALL_BY_NAME                                       'tem_simbolo_na_senha'
         17        SEND_VAR_EX                                              !1
         18        DO_FCALL                                      0          
   18    19        INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $15     
         22        SUB                                              ~16     $15, !4
         23        ASSIGN_DIM                                               !2
         24        OP_DATA                                                  ~16
   12    25        PRE_INC                                                  !3
         26    >   IS_SMALLER                                               !3, 10000
         27      > JMPNZ                                                    ~18, ->12
   22    28    >   CONCAT                                           ~19     !1, '+demorou+'
         29        INIT_FCALL                                               'array_sum'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                         $20     
         32        COUNT                                            ~21     !2
         33        DIV                                              ~22     $20, ~21
         34        CONCAT                                           ~23     ~19, ~22
         35        ECHO                                                     ~23
   23    36        ECHO                                                     '%0A'
    8    37      > JMP                                                      ->8
         38    >   FE_FREE                                                  $8
   43    39      > RETURN                                                   1

Function tem_simbolo_na_senha:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 17
Branch analysis from position: 14
Branch analysis from position: 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/4AcU6
function name:  tem_simbolo_na_senha
number of ops:  24
compiled vars:  !0 = $texto, !1 = $letra
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   31     1        INIT_FCALL                                               'str_split'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
   33     5      > FE_RESET_R                                       $4      !0, ->21
          6    > > FE_FETCH_R                                               $4, !1, ->21
   35     7    >   IS_EQUAL                                         ~5      !1, '%23'
          8      > JMPNZ_EX                                         ~5      ~5, ->11
          9    >   IS_EQUAL                                         ~6      !1, '%40'
         10        BOOL                                             ~5      ~6
         11    > > JMPNZ_EX                                         ~5      ~5, ->14
         12    >   IS_EQUAL                                         ~7      !1, '%25'
         13        BOOL                                             ~5      ~7
         14    > > JMPNZ_EX                                         ~5      ~5, ->17
         15    >   IS_EQUAL                                         ~8      !1, '%26'
         16        BOOL                                             ~5      ~8
         17    > > JMPZ                                                     ~5, ->20
   36    18    >   FE_FREE                                                  $4
         19      > RETURN                                                   <true>
   33    20    > > JMP                                                      ->6
         21    >   FE_FREE                                                  $4
   41    22      > RETURN                                                   <false>
   43    23*     > RETURN                                                   null

End of function tem_simbolo_na_senha

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
132.67 ms | 1461 KiB | 17 Q