3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pwd = "abc123AABC44555"; $pattern = '/(.)\1+/'; $x = str_split($pwd); sort($x); $pwdSorted = implode("", $x); echo (int)preg_match_all($pattern, $pwdSorted, $repChars).PHP_EOL; print_r($repChars);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/idg1i
function name:  (null)
number of ops:  26
compiled vars:  !0 = $pwd, !1 = $pattern, !2 = $x, !3 = $pwdSorted, !4 = $repChars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'abc123AABC44555'
    3     1        ASSIGN                                                   !1, '%2F%28.%29%5C1%2B%2F'
    4     2        INIT_FCALL                                               'str_split'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
          6        INIT_FCALL                                               'sort'
          7        SEND_REF                                                 !2
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'implode'
         10        SEND_VAL                                                 ''
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !3, $10
    6    14        INIT_FCALL                                               'preg_match_all'
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !3
         17        SEND_REF                                                 !4
         18        DO_ICALL                                         $12     
         19        CAST                                          4  ~13     $12
         20        CONCAT                                           ~14     ~13, '%0A'
         21        ECHO                                                     ~14
    7    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.05 ms | 1395 KiB | 23 Q