3v4l.org

run code in 300+ 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 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 31
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 31
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/t4h9t
function name:  (null)
number of ops:  33
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.0.0'
          2        SEND_VAL                                                 '7.0'
          3        SEND_VAL                                                 '%3E%3D'
          4        DO_ICALL                                         $4      
          5      > JMPNZ_EX                                         ~5      $4, ->8
          6    > > EXIT                                                     
          7*       BOOL                                             ~5      <true>
    6     8    >   ASSIGN                                                   !0, '%2F%5E%5Ba-z%D0%B0-%D1%8F%5D%2B%24%2Fiu'
    8     9        ASSIGN                                                   !1, <array>
   10    10      > FE_RESET_R                                       $8      !1, ->31
         11    > > FE_FETCH_R                                               $8, !2, ->31
   12    12    >   INIT_FCALL                                               'preg_match'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !3, $9
   14    17        ECHO                                                     !2
   16    18        TYPE_CHECK                                    4          !3
         19      > JMPZ                                                     ~11, ->22
   18    20    >   ECHO                                                     '+-+Error%0D%0A'
         21      > JMP                                                      ->30
   22    22    >   IS_IDENTICAL                                             !3, 0
         23      > JMPZ                                                     ~12, ->26
         24    >   QM_ASSIGN                                        ~13     'not+found'
         25      > JMP                                                      ->27
         26    >   QM_ASSIGN                                        ~13     'found'
         27    >   CONCAT                                           ~14     '+-+', ~13
         28        CONCAT                                           ~15     ~14, '%0D%0A'
         29        ECHO                                                     ~15
   10    30    > > JMP                                                      ->11
         31    >   FE_FREE                                                  $8
   25    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.54 ms | 1416 KiB | 17 Q