3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = "/^[a-zA-Z ,.\p{Han}]$/"; var_dump(preg_match($re, 'Mr Smith')); var_dump(preg_match($re, 'Mr. Smith')); var_dump(preg_match($re, 'Mr. 123 Smith')); var_dump(preg_match($re, '姓名'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GQlOV
function name:  (null)
number of ops:  30
compiled vars:  !0 = $re
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%5E%5Ba-zA-Z+%2C.%5Cp%7BHan%7D%5D%24%2F'
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'Mr+Smith'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'preg_match'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'Mr.+Smith'
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'preg_match'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 'Mr.+123+Smith'
         19        DO_ICALL                                         $6      
         20        SEND_VAR                                                 $6
         21        DO_ICALL                                                 
    8    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'preg_match'
         24        SEND_VAR                                                 !0
         25        SEND_VAL                                                 '%E5%A7%93%E5%90%8D'
         26        DO_ICALL                                         $8      
         27        SEND_VAR                                                 $8
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.5 ms | 1395 KiB | 17 Q