xref: /PHP-5.6/ext/opcache/tests/issue0140.phpt (revision 6699b1f8)
1--TEST--
2Issue #140: "opcache.enable_file_override" doesn't respect "opcache.revalidate_freq"
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.revalidate_freq=0
7opcache.file_update_protection=0
8--SKIPIF--
9<?php require_once('skipif.inc'); ?>
10<?php if (php_sapi_name() != "cli") die("skip CLI only"); ?>
11--FILE--
12<?php
13define("FILENAME", dirname(__FILE__) . "/issuer0140.inc.php");
14file_put_contents(FILENAME, "1\n");
15
16var_dump(is_readable(FILENAME));
17include(FILENAME);
18var_dump(filemtime(FILENAME));
19
20sleep(2);
21file_put_contents(FILENAME, "2\n");
22
23var_dump(is_readable(FILENAME));
24include(FILENAME);
25var_dump(filemtime(FILENAME));
26
27sleep(2);
28unlink(FILENAME);
29
30var_dump(is_readable(FILENAME));
31var_dump(@include(FILENAME));
32var_dump(@filemtime(FILENAME));
33?>
34--EXPECTF--
35bool(true)
361
37int(%d)
38bool(true)
392
40int(%d)
41bool(false)
42bool(false)
43bool(false)
44