3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/a\/(?!(b|c)).*/'; $directories = array( 'a/a', 'a/b', 'a/c', 'a/d' ); foreach ($directories as $d) { if (preg_match($pattern, $d)) { echo "ok:" . $d . "\n"; } else { echo "ng:" . $d . "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/bXbob
function name:  (null)
number of ops:  19
compiled vars:  !0 = $pattern, !1 = $directories, !2 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fa%5C%2F%28%3F%21%28b%7Cc%29%29.%2A%2F'
    4     1        ASSIGN                                                   !1, <array>
   11     2      > FE_RESET_R                                       $5      !1, ->17
          3    > > FE_FETCH_R                                               $5, !2, ->17
   12     4    >   INIT_FCALL                                               'preg_match'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $6      
          8      > JMPZ                                                     $6, ->13
   13     9    >   CONCAT                                           ~7      'ok%3A', !2
         10        CONCAT                                           ~8      ~7, '%0A'
         11        ECHO                                                     ~8
         12      > JMP                                                      ->16
   15    13    >   CONCAT                                           ~9      'ng%3A', !2
         14        CONCAT                                           ~10     ~9, '%0A'
         15        ECHO                                                     ~10
   11    16    > > JMP                                                      ->3
         17    >   FE_FREE                                                  $5
   17    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.99 ms | 1395 KiB | 15 Q