3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['Ù', 'é', '€']; $string = "é & Ù @ ♣ ☂ % & € À"; $acceptedChars = implode('', $arr); $string = preg_replace('/[^ -~' . $acceptedChars . ']/u', '', $string); echo 'Test : ' . $string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qcZme
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr, !1 = $string, !2 = $acceptedChars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, '%C3%A9+%26+%C3%99+%40+%E2%99%A3+%E2%98%82+%25+%26+%E2%82%AC+%C3%80'
    5     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    6     7        INIT_FCALL                                               'preg_replace'
          8        CONCAT                                           ~7      '%2F%5B%5E+-%7E', !2
          9        CONCAT                                           ~8      ~7, '%5D%2Fu'
         10        SEND_VAL                                                 ~8
         11        SEND_VAL                                                 ''
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !1, $9
    8    15        CONCAT                                           ~11     'Test+%3A+', !1
         16        ECHO                                                     ~11
    9    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.33 ms | 1398 KiB | 17 Q