3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo 'PHP_VERSION: ', PHP_VERSION, "\n"; mb_regex_encoding('UTF-8') || exit("mb_regex_encoding('UTF-8') error."); foreach (['0085', '180e'] as $hex) { $utf8 = mb_convert_encoding(pack('N', hexdec($hex)), 'UTF-8', 'UTF-32BE'); echo "U+{$hex}", (mb_ereg_match('\A[\s]\z', $utf8) ? ' match \\s !' : '')."\n"; } foreach (['00ad', '200B'] as $hex) { $utf8 = mb_convert_encoding(pack('N', hexdec($hex)), 'UTF-8', 'UTF-32BE'); echo "U+{$hex}", (mb_ereg_match('\A[[:cntrl:]]\z', $utf8) ? ' match cntrl !' : '')."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 35
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 35
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 35
2 jumps found. (Code = 77) Position 1 = 37, Position 2 = 65
Branch analysis from position: 37
2 jumps found. (Code = 78) Position 1 = 38, Position 2 = 65
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 61
Branch analysis from position: 59
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 61
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 65
Branch analysis from position: 35
filename:       /in/NeqNo
function name:  (null)
number of ops:  67
compiled vars:  !0 = $hex, !1 = $utf8
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mb_regex_encoding'
          1        SEND_VAL                                                 'UTF-8'
          2        DO_ICALL                                         $2      
          3      > JMPNZ_EX                                         ~3      $2, ->6
          4    > > EXIT                                                     'mb_regex_encoding%28%27UTF-8%27%29+error.'
          5*       BOOL                                             ~3      <true>
    4     6    > > FE_RESET_R                                       $4      <array>, ->35
          7    > > FE_FETCH_R                                               $4, !0, ->35
    5     8    >   INIT_FCALL                                               'mb_convert_encoding'
          9        INIT_FCALL                                               'pack'
         10        SEND_VAL                                                 'N'
         11        INIT_FCALL                                               'hexdec'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                         $6      
         16        SEND_VAR                                                 $6
         17        SEND_VAL                                                 'UTF-8'
         18        SEND_VAL                                                 'UTF-32BE'
         19        DO_ICALL                                         $7      
         20        ASSIGN                                                   !1, $7
    6    21        NOP                                                      
         22        FAST_CONCAT                                      ~9      'U%2B', !0
         23        ECHO                                                     ~9
         24        INIT_FCALL                                               'mb_ereg_match'
         25        SEND_VAL                                                 '%5CA%5B%5Cs%5D%5Cz'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $10     
         28      > JMPZ                                                     $10, ->31
         29    >   QM_ASSIGN                                        ~11     '+match+%5Cs+%21'
         30      > JMP                                                      ->32
         31    >   QM_ASSIGN                                        ~11     ''
         32    >   CONCAT                                           ~12     ~11, '%0A'
         33        ECHO                                                     ~12
    4    34      > JMP                                                      ->7
         35    >   FE_FREE                                                  $4
    8    36      > FE_RESET_R                                       $13     <array>, ->65
         37    > > FE_FETCH_R                                               $13, !0, ->65
    9    38    >   INIT_FCALL                                               'mb_convert_encoding'
         39        INIT_FCALL                                               'pack'
         40        SEND_VAL                                                 'N'
         41        INIT_FCALL                                               'hexdec'
         42        SEND_VAR                                                 !0
         43        DO_ICALL                                         $14     
         44        SEND_VAR                                                 $14
         45        DO_ICALL                                         $15     
         46        SEND_VAR                                                 $15
         47        SEND_VAL                                                 'UTF-8'
         48        SEND_VAL                                                 'UTF-32BE'
         49        DO_ICALL                                         $16     
         50        ASSIGN                                                   !1, $16
   10    51        NOP                                                      
         52        FAST_CONCAT                                      ~18     'U%2B', !0
         53        ECHO                                                     ~18
         54        INIT_FCALL                                               'mb_ereg_match'
         55        SEND_VAL                                                 '%5CA%5B%5B%3Acntrl%3A%5D%5D%5Cz'
         56        SEND_VAR                                                 !1
         57        DO_ICALL                                         $19     
         58      > JMPZ                                                     $19, ->61
         59    >   QM_ASSIGN                                        ~20     '+match+cntrl+%21'
         60      > JMP                                                      ->62
         61    >   QM_ASSIGN                                        ~20     ''
         62    >   CONCAT                                           ~21     ~20, '%0A'
         63        ECHO                                                     ~21
    8    64      > JMP                                                      ->37
         65    >   FE_FREE                                                  $13
   11    66      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.71 ms | 1400 KiB | 23 Q