3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '中文'; preg_match('/^[\pL\pM\pN_-]+$/u', $string, $matches1); preg_match('/^[a-z0-9_-]+$/u', $string, $matches2); var_dump($matches1); var_dump($matches2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bUGlb
function name:  (null)
number of ops:  18
compiled vars:  !0 = $string, !1 = $matches1, !2 = $matches2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%E4%B8%AD%E6%96%87'
    5     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5B%5CpL%5CpM%5CpN_-%5D%2B%24%2Fu'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%2F%5E%5Ba-z0-9_-%5D%2B%24%2Fu'
          8        SEND_VAR                                                 !0
          9        SEND_REF                                                 !2
         10        DO_ICALL                                                 
    8    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
    9    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.52 ms | 935 KiB | 18 Q