]> granicus.if.org Git - php/commitdiff
Add test
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 5 Jul 2019 09:00:27 +0000 (11:00 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 5 Jul 2019 09:00:27 +0000 (11:00 +0200)
Forgot to commit this.

ext/opcache/tests/preload_013.phpt [new file with mode: 0644]
ext/opcache/tests/preload_nested_function.inc [new file with mode: 0644]

diff --git a/ext/opcache/tests/preload_013.phpt b/ext/opcache/tests/preload_013.phpt
new file mode 100644 (file)
index 0000000..f6387c0
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Nested function definition
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
+opcache.preload={PWD}/preload_nested_function.inc
+opcache.interned_strings_buffer=0
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+test();
+test2();
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/ext/opcache/tests/preload_nested_function.inc b/ext/opcache/tests/preload_nested_function.inc
new file mode 100644 (file)
index 0000000..534e813
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+function test()
+{
+    function test2() { }
+}
+