3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = "original"; $generatedPath = array( "/^(?!".$original."$).+$/", '/^(?![0-9]_[0-9]*x[0-9]*$).+$/' ); $test = array('products', 'categories', 'original', '1_22x44','1_22x44a'); foreach ($test as $t) { foreach($generatedPath as $pattern) { if(preg_match($pattern, $t)) { echo $pattern.' : '.$t ."\r\n"; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 23
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 20
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 21
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/fvL7F
function name:  (null)
number of ops:  25
compiled vars:  !0 = $original, !1 = $generatedPath, !2 = $test, !3 = $t, !4 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'original'
    4     1        CONCAT                                           ~6      '%2F%5E%28%3F%21', !0
          2        CONCAT                                           ~7      ~6, '%24%29.%2B%24%2F'
          3        INIT_ARRAY                                       ~8      ~7
    5     4        ADD_ARRAY_ELEMENT                                ~8      '%2F%5E%28%3F%21%5B0-9%5D_%5B0-9%5D%2Ax%5B0-9%5D%2A%24%29.%2B%24%2F'
    3     5        ASSIGN                                                   !1, ~8
    9     6        ASSIGN                                                   !2, <array>
   11     7      > FE_RESET_R                                       $11     !2, ->23
          8    > > FE_FETCH_R                                               $11, !3, ->23
   12     9    > > FE_RESET_R                                       $12     !1, ->21
         10    > > FE_FETCH_R                                               $12, !4, ->21
   13    11    >   INIT_FCALL                                               'preg_match'
         12        SEND_VAR                                                 !4
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                         $13     
         15      > JMPZ                                                     $13, ->20
   14    16    >   CONCAT                                           ~14     !4, '++%3A++'
         17        CONCAT                                           ~15     ~14, !3
         18        CONCAT                                           ~16     ~15, '%0D%0A'
         19        ECHO                                                     ~16
   12    20    > > JMP                                                      ->10
         21    >   FE_FREE                                                  $12
   11    22      > JMP                                                      ->8
         23    >   FE_FREE                                                  $11
   17    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.92 ms | 1396 KiB | 15 Q