1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00

Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix brittle test
This commit is contained in:
Christoph M. Becker
2019-07-01 16:43:47 +02:00

View File

@@ -14,9 +14,16 @@ opcache.file_cache_only=1
<?php
$tmpdir = sys_get_temp_dir();
$pattern = $tmpdir . '/*/*/' . str_replace(':', '', __DIR__) . '/bug78189.php.bin';
foreach (glob($pattern) as $filename) {
var_dump(preg_match('~/[0-9a-f]{32}/~', substr($filename, strlen($tmpdir), 34)));
$filenames = glob($pattern);
if (count($filenames)) {
foreach ($filenames as $filename) {
$part = substr($filename, strlen($tmpdir), 34);
if (!preg_match('~/[0-9a-f]{32}/~', $part)) {
echo "invalid opcache folder: $part\n";
}
}
} else {
echo "no opcache file found!\n";
}
?>
--EXPECT--
int(1)