8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaa7380 commit e210c08Copy full SHA for e210c08
ext/opcache/tests/opcache_revalidation_in_cli.phpt
@@ -0,0 +1,42 @@
1
+--TEST--
2
+opcache revalidation should work properly in CLI mode
3
+--EXTENSIONS--
4
+opcache
5
+--INI--
6
+opcache.enable=1
7
+opcache.enable_cli=1
8
+opcache.validate_timestamps=1
9
+opcache.revalidate_freq=1
10
+--FILE--
11
+<?php
12
+$file = __DIR__ . DIRECTORY_SEPARATOR . pathinfo(__FILE__, PATHINFO_FILENAME) . '.inc';
13
+
14
+file_put_contents($file, <<<PHP
15
16
+return 42;
17
+PHP);
18
19
+var_dump(opcache_invalidate($file));
20
21
+var_dump(include $file);
22
23
24
25
+return 1234;
26
27
28
+var_dump(include $file 7F4F span>);
29
30
+sleep(2);
31
+touch($file);
32
33
34
35
+@unlink($file);
36
37
+?>
38
+--EXPECT--
39
+bool(true)
40
+int(42)
41
42
+int(1234)
0 commit comments