3v4l.org

run code in 500+ PHP versions simultaneously
<?php $patterns = [ '/[\x{ff}\x{100}\x{8000}\x{8002}\x{8004}\x{8006}]/u' => "\u{100}", '/[\x{ff}\x{100}\x{8000}\x{8002}\x{8004}\x{8006}\x{8008}]/u' => "\u{100}", '/[\x{ff}\x{101}\x{8000}\x{8002}\x{8004}\x{8006}\x{8008}]/u' => "\u{101}", ]; foreach ($patterns as $pattern => $str) { if (preg_match($pattern, $str, $m)) { echo "0: ", json_encode($m[0]), "\n"; } else { echo "No match.\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 20
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/iZ91q
function name:  (null)
number of ops:  22
compiled vars:  !0 = $patterns, !1 = $str, !2 = $pattern, !3 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1      > FE_RESET_R                                           $5      !0, ->20
          2    > > FE_FETCH_R                                           ~6      $5, !1, ->20
          3    >   ASSIGN                                                       !2, ~6
   10     4        INIT_FCALL                                                   'preg_match'
          5        SEND_VAR                                                     !2
          6        SEND_VAR                                                     !1
          7        SEND_REF                                                     !3
          8        DO_ICALL                                             $8      
          9      > JMPZ                                                         $8, ->18
   11    10    >   ECHO                                                         '0%3A+'
         11        INIT_FCALL                                                   'json_encode'
         12        FETCH_DIM_R                                          ~9      !3, 0
         13        SEND_VAL                                                     ~9
         14        DO_ICALL                                             $10     
         15        ECHO                                                         $10
         16        ECHO                                                         '%0A'
   10    17      > JMP                                                          ->19
   13    18    >   ECHO                                                         'No+match.%0A'
    9    19    > > JMP                                                          ->2
         20    >   FE_FREE                                                      $5
   15    21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.81 ms | 1448 KiB | 15 Q