3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "3@ar1A"; $letterStart = preg_match("/^[A-Za-z]/", $pswd); // start with a letter $specialChar= preg_match("/(?=.*[!@#&*%]+)/", $pswd); // one or more special chars in list $numberChar= preg_match("/(?=.*[0-9].*[0-9])/", $pswd); //two or more digits $upperChar= preg_match("/(?=.*[A-Z])/", $pswd); //two or more upper case letters x $lowerChar= preg_match("/(?=.*[a-z].*[a-z])/", $pswd); //two or more lower case letters x $pswdLength = preg_match("/(?=^.{6,20}$)/", $pswd); //length of pswd between min and max echo $letterStart . " " . $specialChar . " " . $numberChar . " " . $upperChar . " " . $lowerChar . " " . $pswdLength;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cEkRU
function name:  (null)
number of ops:  43
compiled vars:  !0 = $pswd, !1 = $letterStart, !2 = $specialChar, !3 = $numberChar, !4 = $upperChar, !5 = $lowerChar, !6 = $pswdLength
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '3%40ar1A'
    3     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5BA-Za-z%5D%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !1, $8
    4     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%2F%28%3F%3D.%2A%5B%21%40%23%26%2A%25%5D%2B%29%2F'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !2, $10
    5    11        INIT_FCALL                                               'preg_match'
         12        SEND_VAL                                                 '%2F%28%3F%3D.%2A%5B0-9%5D.%2A%5B0-9%5D%29%2F'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !3, $12
    6    16        INIT_FCALL                                               'preg_match'
         17        SEND_VAL                                                 '%2F%28%3F%3D.%2A%5BA-Z%5D%29%2F'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $14     
         20        ASSIGN                                                   !4, $14
    7    21        INIT_FCALL                                               'preg_match'
         22        SEND_VAL                                                 '%2F%28%3F%3D.%2A%5Ba-z%5D.%2A%5Ba-z%5D%29%2F'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $16     
         25        ASSIGN                                                   !5, $16
    8    26        INIT_FCALL                                               'preg_match'
         27        SEND_VAL                                                 '%2F%28%3F%3D%5E.%7B6%2C20%7D%24%29%2F'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $18     
         30        ASSIGN                                                   !6, $18
   10    31        CONCAT                                           ~20     !1, '+'
         32        CONCAT                                           ~21     ~20, !2
         33        CONCAT                                           ~22     ~21, '+'
         34        CONCAT                                           ~23     ~22, !3
         35        CONCAT                                           ~24     ~23, '+'
         36        CONCAT                                           ~25     ~24, !4
         37        CONCAT                                           ~26     ~25, '+'
         38        CONCAT                                           ~27     ~26, !5
         39        CONCAT                                           ~28     ~27, '+'
         40        CONCAT                                           ~29     ~28, !6
         41        ECHO                                                     ~29
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.14 ms | 1400 KiB | 15 Q