3v4l.org

run code in 300+ PHP versions simultaneously
<?php function clean($str){ $re = "/([0-9a-zA-Z]|\x{500}-\x{6FF}]{0,})/u"; preg_match_all($re, $str, $matches); return isset($matches[0]) ? implode($matches[0]) : ''; } echo clean('a|"bc!@Β£d艾β012艾e^&$ییییfg'); echo "\n"; echo "\n"; echo clean('$$$'); //echo abcd012eییییfg
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bqmV6
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'clean'
          1        SEND_VAL                                                 'a%7C%22bc%21%40%CE%92%C2%A3d%E8%89%BE%CE%B2012%E8%89%BEe%5E%26%24%DB%8C%DB%8C%DB%8C%DB%8Cfg'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   10     4        ECHO                                                     '%0A'
   11     5        ECHO                                                     '%0A'
   12     6        INIT_FCALL                                               'clean'
          7        SEND_VAL                                                 '%24%24%24'
          8        DO_FCALL                                      0  $1      
          9        ECHO                                                     $1
   14    10      > RETURN                                                   1

Function clean:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bqmV6
function name:  clean
number of ops:  18
compiled vars:  !0 = $str, !1 = $re, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, '%2F%28%5B0-9a-zA-Z%5D%7C%5Cx%7B500%7D-%5Cx%7B6FF%7D%5D%7B0%2C%7D%29%2Fu'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    6     7        ISSET_ISEMPTY_DIM_OBJ                         0          !2, 0
          8      > JMPZ                                                     ~5, ->15
          9    >   INIT_FCALL                                               'implode'
         10        FETCH_DIM_R                                      ~6      !2, 0
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        QM_ASSIGN                                        ~8      $7
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~8      ''
         16    > > RETURN                                                   ~8
    7    17*     > RETURN                                                   null

End of function clean

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.5 ms | 1399 KiB | 19 Q