3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check($value) { return (bool)preg_match('/^([A-ZА-Я]{1}[A-Za-zА-Яа-я]+){1}([\-\s]{1}[A-ZА-Я]{1}[A-Za-zА-Яа-я]+)*$/', $value); }; $test = 'тест'; var_dump(check($test));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PivuA
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, '%D1%82%D0%B5%D1%81%D1%82'
   10     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'check'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function check:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PivuA
function name:  check
number of ops:  8
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%28%5BA-Z%D0%90-%D0%AF%5D%7B1%7D%5BA-Za-z%D0%90-%D0%AF%D0%B0-%D1%8F%5D%2B%29%7B1%7D%28%5B%5C-%5Cs%5D%7B1%7D%5BA-Z%D0%90-%D0%AF%5D%7B1%7D%5BA-Za-z%D0%90-%D0%AF%D0%B0-%D1%8F%5D%2B%29%2A%24%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        BOOL                                             ~2      $1
          6      > RETURN                                                   ~2
    6     7*     > RETURN                                                   null

End of function check

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.88 ms | 1397 KiB | 18 Q