3v4l.org

run code in 300+ PHP versions simultaneously
<?php $exception ='word1|word3|word3|word4' ; $regex = "(?!('.$exception.')((\W+)|$))[a-zA-Z\-_]+/?$"; $myword = 'a-unicode-statement-like-سلام' ; $m = preg_match($regex, $myword); print $m;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jDrUc
function name:  (null)
number of ops:  13
compiled vars:  !0 = $exception, !1 = $regex, !2 = $myword, !3 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'word1%7Cword3%7Cword3%7Cword4'
    4     1        ROPE_INIT                                     3  ~6      '%28%3F%21%28%27.'
          2        ROPE_ADD                                      1  ~6      ~6, !0
          3        ROPE_END                                      2  ~5      ~6, '.%27%29%28%28%5CW%2B%29%7C%24%29%29%5Ba-zA-Z%5C-_%5D%2B%2F%3F%24'
          4        ASSIGN                                                   !1, ~5
    5     5        ASSIGN                                                   !2, 'a-unicode-statement-like-%D8%B3%D9%84%D8%A7%D9%85'
    7     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !3, $10
    8    11        ECHO                                                     !3
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.52 ms | 1394 KiB | 15 Q