3v4l.org

run code in 500+ PHP versions simultaneously
<?php // \u{...} syntax is only allowed in PHP 7+ version_compare(PHP_VERSION, "7.0", ">=") || die; $RegularExpression = "/^[a-z\u{0430}-\u{044F}]+$/iu"; $TestStrArray = array('ABC', 'abc', "\u{0410}\u{0411}\u{0412}", "\u{0430}\u{0431}\u{0432}"); foreach ($TestStrArray as $TestStr) { $Result = preg_match($RegularExpression, $TestStr); echo $TestStr; if ($Result === false) { echo ' - Error'."\r\n"; } else { echo ' - '.($Result === 0 ? 'not found' : 'found')."\r\n"; } } // foreach ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 29
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 29
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/t4h9t
function name:  (null)
number of ops:  31
compiled vars:  !0 = $RegularExpression, !1 = $TestStrArray, !2 = $TestStr, !3 = $Result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'version_compare'
          1        SEND_VAL                                                     '8.5.0'
          2        SEND_VAL                                                     '7.0'
          3        SEND_VAL                                                     '%3E%3D'
          4        DO_ICALL                                             $4      
          5      > JMPNZ_EX                                             ~5      $4, ->9
          6    > > INIT_FCALL                                                   'exit'
          7*       DO_ICALL                                             $6      
          8*       BOOL                                                 ~5      $6
    6     9    >   ASSIGN                                                       !0, '%2F%5E%5Ba-z%D0%B0-%D1%8F%5D%2B%24%2Fiu'
    8    10        ASSIGN                                                       !1, <array>
   10    11      > FE_RESET_R                                           $9      !1, ->29
         12    > > FE_FETCH_R                                                   $9, !2, ->29
   12    13    >   FRAMELESS_ICALL_2                preg_match          ~10     !0, !2
         14        ASSIGN                                                       !3, ~10
   14    15        ECHO                                                         !2
   16    16        TYPE_CHECK                                        4          !3
         17      > JMPZ                                                         ~12, ->20
   18    18    >   ECHO                                                         '+-+Error%0D%0A'
   16    19      > JMP                                                          ->28
   22    20    >   IS_IDENTICAL                                                 !3, 0
         21      > JMPZ                                                         ~13, ->24
         22    >   QM_ASSIGN                                            ~14     'not+found'
         23      > JMP                                                          ->25
         24    >   QM_ASSIGN                                            ~14     'found'
         25    >   CONCAT                                               ~15     '+-+', ~14
         26        CONCAT                                               ~16     ~15, '%0D%0A'
         27        ECHO                                                         ~16
   10    28    > > JMP                                                          ->12
         29    >   FE_FREE                                                      $9
   25    30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
224.44 ms | 1648 KiB | 10 Q