3v4l.org

run code in 300+ PHP versions simultaneously
<?php $files = array( 'core/vendor/blah.php', 'vendor/blah.php', 'other/vendor/blah.php', 'test/vendor/test/blah.php', 'what/tester/vendor/blah.php', ); foreach ($files as $file) { if (preg_match('#^core/vendor/|^vendor/#', $file)) { print 'success:' . $file . "\n"; } else { print 'fail:' . $file . "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/00sCm
function name:  (null)
number of ops:  18
compiled vars:  !0 = $files, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1      > FE_RESET_R                                       $3      !0, ->16
          2    > > FE_FETCH_R                                               $3, !1, ->16
   12     3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%23%5Ecore%2Fvendor%2F%7C%5Evendor%2F%23'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7      > JMPZ                                                     $4, ->12
   13     8    >   CONCAT                                           ~5      'success%3A', !1
          9        CONCAT                                           ~6      ~5, '%0A'
         10        ECHO                                                     ~6
         11      > JMP                                                      ->15
   16    12    >   CONCAT                                           ~7      'fail%3A', !1
         13        CONCAT                                           ~8      ~7, '%0A'
         14        ECHO                                                     ~8
   11    15    > > JMP                                                      ->2
         16    >   FE_FREE                                                  $3
   18    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.56 ms | 1395 KiB | 15 Q