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