3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '我这是怎么了'; echo preg_replace("/([u4e00-u9fa5].)/","<font color=red>1</font>",$str); $test = "php编程"; if (preg_match("/^[x{4e00}-x{9fa5}]+$/u",$test)) { print("该字符串全部是中文"); } else { print("该字符串不全部是中文"); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1p8r0
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%E6%88%91%E8%BF%99%E6%98%AF%E6%80%8E%E4%B9%88%E4%BA%86'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%5Bu4e00-u9fa5%5D.%29%2F'
          3        SEND_VAL                                                 '%3Cfont+color%3Dred%3E1%3C%2Ffont%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ECHO                                                     $3
    4     7        ASSIGN                                                   !1, 'php%E7%BC%96%E7%A8%8B'
    5     8        INIT_FCALL                                               'preg_match'
          9        SEND_VAL                                                 '%2F%5E%5Bx%7B4e00%7D-x%7B9fa5%7D%5D%2B%24%2Fu'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $5      
         12      > JMPZ                                                     $5, ->15
    6    13    >   ECHO                                                     '%E8%AF%A5%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%85%A8%E9%83%A8%E6%98%AF%E4%B8%AD%E6%96%87'
    5    14      > JMP                                                      ->16
    8    15    >   ECHO                                                     '%E8%AF%A5%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%8D%E5%85%A8%E9%83%A8%E6%98%AF%E4%B8%AD%E6%96%87'
   11    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.53 ms | 1460 KiB | 15 Q