3v4l.org

run code in 500+ PHP versions simultaneously
<?php $_POST['input'] = 'aA1'; if (preg_match('/(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])/', $_POST['input'])) echo "ok\n"; else echo "not ok\n"; if (preg_match('/[a-zA-Z0-9]/', $_POST['input'])) echo "ok\n"; else echo "not ok\n"; if (preg_match('/^[a-zA-Z0-9]+$/', $_POST['input'])) echo "ok\n"; else echo "not ok\n"; $_POST['input'] = 'a1'; if (preg_match('/(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])/', $_POST['input'])) echo "ok\n"; else echo "not ok\n"; if (preg_match('/[a-zA-Z0-9]/', $_POST['input'])) echo "ok\n"; else echo "not ok\n"; if (preg_match('/^[a-zA-Z0-9]+$/', $_POST['input'])) echo "ok\n"; else echo "not ok\n"; $_POST['input'] = 'a#1'; if (preg_match('/(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])/', $_POST['input'])) echo "ok\n"; else echo "not ok\n"; if (preg_match('/[a-zA-Z0-9]/', $_POST['input'])) echo "ok\n"; else echo "not ok\n"; if (preg_match('/^[a-zA-Z0-9]+$/', $_POST['input'])) echo "ok\n"; else echo "not ok\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 71
Branch analysis from position: 69
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 71
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 71
Branch analysis from position: 69
Branch analysis from position: 71
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
Branch analysis from position: 64
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
Branch analysis from position: 57
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
Branch analysis from position: 47
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
Branch analysis from position: 40
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
Branch analysis from position: 33
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
Branch analysis from position: 23
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
Branch analysis from position: 16
filename:       /in/R6nod
function name:  (null)
number of ops:  73
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   FETCH_W                          global              $0      '_POST'
          1        ASSIGN_DIM                                                   $0, 'input'
          2        OP_DATA                                                      'aA1'
    3     3        FETCH_R                          global              ~2      '_POST'
          4        FETCH_DIM_R                                          ~3      ~2, 'input'
          5        FRAMELESS_ICALL_2                preg_match          ~4      '%2F%28%3F%3D.%2A%5BA-Z%5D%29%28%3F%3D.%2A%5Ba-z%5D%29%28%3F%3D.%2A%5B0-9%5D%29%2F', ~3
          6      > JMPZ                                                         ~4, ->9
          7    >   ECHO                                                         'ok%0A'
          8      > JMP                                                          ->10
          9    >   ECHO                                                         'not+ok%0A'
    4    10    >   FETCH_R                          global              ~5      '_POST'
         11        FETCH_DIM_R                                          ~6      ~5, 'input'
         12        FRAMELESS_ICALL_2                preg_match          ~7      '%2F%5Ba-zA-Z0-9%5D%2F', ~6
         13      > JMPZ                                                         ~7, ->16
         14    >   ECHO                                                         'ok%0A'
         15      > JMP                                                          ->17
         16    >   ECHO                                                         'not+ok%0A'
    5    17    >   FETCH_R                          global              ~8      '_POST'
         18        FETCH_DIM_R                                          ~9      ~8, 'input'
         19        FRAMELESS_ICALL_2                preg_match          ~10     '%2F%5E%5Ba-zA-Z0-9%5D%2B%24%2F', ~9
         20      > JMPZ                                                         ~10, ->23
         21    >   ECHO                                                         'ok%0A'
         22      > JMP                                                          ->24
         23    >   ECHO                                                         'not+ok%0A'
    7    24    >   FETCH_W                          global              $11     '_POST'
         25        ASSIGN_DIM                                                   $11, 'input'
         26        OP_DATA                                                      'a1'
    8    27        FETCH_R                          global              ~13     '_POST'
         28        FETCH_DIM_R                                          ~14     ~13, 'input'
         29        FRAMELESS_ICALL_2                preg_match          ~15     '%2F%28%3F%3D.%2A%5BA-Z%5D%29%28%3F%3D.%2A%5Ba-z%5D%29%28%3F%3D.%2A%5B0-9%5D%29%2F', ~14
         30      > JMPZ                                                         ~15, ->33
         31    >   ECHO                                                         'ok%0A'
         32      > JMP                                                          ->34
         33    >   ECHO                                                         'not+ok%0A'
    9    34    >   FETCH_R                          global              ~16     '_POST'
         35        FETCH_DIM_R                                          ~17     ~16, 'input'
         36        FRAMELESS_ICALL_2                preg_match          ~18     '%2F%5Ba-zA-Z0-9%5D%2F', ~17
         37      > JMPZ                                                         ~18, ->40
         38    >   ECHO                                                         'ok%0A'
         39      > JMP                                                          ->41
         40    >   ECHO                                                         'not+ok%0A'
   10    41    >   FETCH_R                          global              ~19     '_POST'
         42        FETCH_DIM_R                                          ~20     ~19, 'input'
         43        FRAMELESS_ICALL_2                preg_match          ~21     '%2F%5E%5Ba-zA-Z0-9%5D%2B%24%2F', ~20
         44      > JMPZ                                                         ~21, ->47
         45    >   ECHO                                                         'ok%0A'
         46      > JMP                                                          ->48
         47    >   ECHO                                                         'not+ok%0A'
   12    48    >   FETCH_W                          global              $22     '_POST'
         49        ASSIGN_DIM                                                   $22, 'input'
         50        OP_DATA                                                      'a%231'
   13    51        FETCH_R                          global              ~24     '_POST'
         52        FETCH_DIM_R                                          ~25     ~24, 'input'
         53        FRAMELESS_ICALL_2                preg_match          ~26     '%2F%28%3F%3D.%2A%5BA-Z%5D%29%28%3F%3D.%2A%5Ba-z%5D%29%28%3F%3D.%2A%5B0-9%5D%29%2F', ~25
         54      > JMPZ                                                         ~26, ->57
         55    >   ECHO                                                         'ok%0A'
         56      > JMP                                                          ->58
         57    >   ECHO                                                         'not+ok%0A'
   14    58    >   FETCH_R                          global              ~27     '_POST'
         59        FETCH_DIM_R                                          ~28     ~27, 'input'
         60        FRAMELESS_ICALL_2                preg_match          ~29     '%2F%5Ba-zA-Z0-9%5D%2F', ~28
         61      > JMPZ                                                         ~29, ->64
         62    >   ECHO                                                         'ok%0A'
         63      > JMP                                                          ->65
         64    >   ECHO                                                         'not+ok%0A'
   15    65    >   FETCH_R                          global              ~30     '_POST'
         66        FETCH_DIM_R                                          ~31     ~30, 'input'
         67        FRAMELESS_ICALL_2                preg_match          ~32     '%2F%5E%5Ba-zA-Z0-9%5D%2B%24%2F', ~31
         68      > JMPZ                                                         ~32, ->71
         69    >   ECHO                                                         'ok%0A'
         70      > JMP                                                          ->72
         71    >   ECHO                                                         'not+ok%0A'
         72    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
245.03 ms | 3315 KiB | 13 Q