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 7cf0106 commit ca2c359Copy full SHA for ca2c359
ext/opcache/tests/opcache_revalidation_in_cli.phpt
@@ -0,0 +1,36 @@
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
+var_dump(include $file);
19
20
21
22
+return 1234;
23
24
25
26
27
+sleep(2);
28
+touch($file);
29
30
31
32
+?>
33
+--EXPECT--
34
+int(42)
35
36
+int(1234)
0 commit comments