3v4l.org

run code in 500+ PHP versions simultaneously
<?php $values = array( 'barry', 'barry1', 'Barry1', 'Barry1!', 'barry1!@', ); function validate($value) { return preg_match('/^.*(?=.{4,})(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[\d\X])(?=.*[!$#%]).*$/', $value); } foreach ($values as $value) { var_dump(validate($value)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 10
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/2Snc6
function name:  (null)
number of ops:  12
compiled vars:  !0 = $values, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   16     1      > FE_RESET_R                                           $3      !0, ->10
          2    > > FE_FETCH_R                                                   $3, !1, ->10
   18     3    >   INIT_FCALL                                                   'var_dump'
          4        INIT_FCALL                                                   'validate'
          5        SEND_VAR                                                     !1
          6        DO_FCALL                                          0  $4      
          7        SEND_VAR                                                     $4
          8        DO_ICALL                                                     
   16     9      > JMP                                                          ->2
         10    >   FE_FREE                                                      $3
   19    11      > RETURN                                                       1

Function validate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2Snc6
function name:  validate
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
   13     1        FRAMELESS_ICALL_2                preg_match          ~1      '%2F%5E.%2A%28%3F%3D.%7B4%2C%7D%29%28%3F%3D.%2A%5Ba-zA-Z%5D%29%28%3F%3D.%2A%5B0-9%5D%29%28%3F%3D.%2A%5B%5Cd%5CX%5D%29%28%3F%3D.%2A%5B%21%24%23%25%5D%29.%2A%24%2F', !0
          2      > RETURN                                                       ~1
   14     3*     > RETURN                                                       null

End of function validate

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.14 ms | 2827 KiB | 17 Q