Download src/php/php-src/ext/opcache/tests/bug65915.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 666 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/opcache/tests/bug65915.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/opcache/tests/bug65915.phpt
-
curl -L -o bug65915.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/opcache/tests/bug65915.phpt
666 Bytes
| --TEST-- | |
| Bug #65915 (Inconsistent results with require return value) | |
| --INI-- | |
| opcache.enable=1 | |
| opcache.enable_cli=1 | |
| opcache.file_cache_only=0 | |
| --EXTENSIONS-- | |
| opcache | |
| --SKIPIF-- | |
| // We don't invalidate the file after the second write. | |
| if (getenv('SKIP_REPEAT')) die("skip Not repeatable"); | |
| --FILE-- | |
| $tmp = __DIR__ . "/bug65915.inc.php"; | |
| file_put_contents($tmp, '<?php return function(){ return "a";};'); | |
| $f = require $tmp; | |
| var_dump($f()); | |
| var_dump(opcache_invalidate($tmp, true)); | |
| file_put_contents($tmp, '<?php return function(){ return "b";};'); | |
| $f = require $tmp; | |
| var_dump($f()); | |
| @unlink($tmp); | |
| --EXPECT-- | |
| string(1) "a" | |
| bool(true) | |
| string(1) "b" | |