3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check($str) { $cond1 = preg_match('#[a-z].*[a-z]#', $str); $cond2 = preg_match('#[A-Z].*[A-Z]#', $str); return $cond1 && $cond2; } $str = 'CTyZQW9c5j2ja'; var_dump(check($str));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gCj8W
function name:  (null)
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 'CTyZQW9c5j2ja'
   11     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
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/gCj8W
function name:  check
number of ops:  15
compiled vars:  !0 = $str, !1 = $cond1, !2 = $cond2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%23%5Ba-z%5D.%2A%5Ba-z%5D%23'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%23%5BA-Z%5D.%2A%5BA-Z%5D%23'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !2, $5
    6    11      > JMPZ_EX                                          ~7      !1, ->13
         12    >   BOOL                                             ~7      !2
         13    > > RETURN                                                   ~7
    7    14*     > RETURN                                                   null

End of function check

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.99 ms | 1019 KiB | 16 Q