3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string ='華中六街';var_dump(mb_detect_encoding($string)); var_dump($without = preg_split('/\s+/', $string)); var_dump($with = preg_split('/\s+/u', $string)); var_dump($with == $without); $string ='華中 六街'; var_dump(mb_detect_encoding($string)); var_dump($without = preg_split('/\s+/', $string)); var_dump($with = preg_split('/\s+/u', $string)); var_dump($with == $without);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0LbBf
function name:  (null)
number of ops:  55
compiled vars:  !0 = $string, !1 = $without, !2 = $with
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%E8%8F%AF%E4%B8%AD%E5%85%AD%E8%A1%97'
          1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'mb_detect_encoding'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                                 
    3     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'preg_split'
          9        SEND_VAL                                                 '%2F%5Cs%2B%2F'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        ASSIGN                                           ~7      !1, $6
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
    4    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'preg_split'
         17        SEND_VAL                                                 '%2F%5Cs%2B%2Fu'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $9      
         20        ASSIGN                                           ~10     !2, $9
         21        SEND_VAL                                                 ~10
         22        DO_ICALL                                                 
    5    23        INIT_FCALL                                               'var_dump'
         24        IS_EQUAL                                         ~12     !2, !1
         25        SEND_VAL                                                 ~12
         26        DO_ICALL                                                 
    7    27        ASSIGN                                                   !0, '%E8%8F%AF%E4%B8%AD+%E5%85%AD%E8%A1%97'
    8    28        INIT_FCALL                                               'var_dump'
         29        INIT_FCALL                                               'mb_detect_encoding'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                         $15     
         32        SEND_VAR                                                 $15
         33        DO_ICALL                                                 
    9    34        INIT_FCALL                                               'var_dump'
         35        INIT_FCALL                                               'preg_split'
         36        SEND_VAL                                                 '%2F%5Cs%2B%2F'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                         $17     
         39        ASSIGN                                           ~18     !1, $17
         40        SEND_VAL                                                 ~18
         41        DO_ICALL                                                 
   10    42        INIT_FCALL                                               'var_dump'
         43        INIT_FCALL                                               'preg_split'
         44        SEND_VAL                                                 '%2F%5Cs%2B%2Fu'
         45        SEND_VAR                                                 !0
         46        DO_ICALL                                         $20     
         47        ASSIGN                                           ~21     !2, $20
         48        SEND_VAL                                                 ~21
         49        DO_ICALL                                                 
   11    50        INIT_FCALL                                               'var_dump'
         51        IS_EQUAL                                         ~23     !2, !1
         52        SEND_VAL                                                 ~23
         53        DO_ICALL                                                 
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.19 ms | 1400 KiB | 19 Q