1--TEST--
2opcache_invalidate() should invalidate deleted file
3--EXTENSIONS--
4opcache
5--INI--
6opcache.enable=1
7opcache.enable_cli=1
8opcache.validate_timestamps=0
9--FILE--
10<?php
11
12$file = __DIR__ . DIRECTORY_SEPARATOR . pathinfo(__FILE__, PATHINFO_FILENAME) . '.inc';
13file_put_contents($file, <<<PHP
14<?php
15return 42;
16PHP);
17var_dump(include $file);
18unlink($file);
19var_dump(include $file);
20var_dump(opcache_invalidate($file));
21var_dump(@(include $file));
22
23?>
24--EXPECT--
25int(42)
26int(42)
27bool(true)
28bool(false)
29