3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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"; } }
based on n3ZfN
Output for 4.3.0 - 7.2.0
success:core/vendor/blah.php success:vendor/blah.php fail:other/vendor/blah.php fail:test/vendor/test/blah.php fail:what/tester/vendor/blah.php