summaryrefslogtreecommitdiff
path: root/Zend/tests/use_function
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2013-08-29 17:15:36 +0200
committerIgor Wiedler <igor@wiedler.ch>2013-08-29 17:16:18 +0200
commite14a769c56f45be26f32506483a7dff5b447fbb7 (patch)
tree72326919a64380cb118ce355506bff4cee9b0e52 /Zend/tests/use_function
parent6263f221ffeaa2a54b11249a40436b6f9bd6ca47 (diff)
downloadphp-git-e14a769c56f45be26f32506483a7dff5b447fbb7.tar.gz
Add test for conditional function declaration
Diffstat (limited to 'Zend/tests/use_function')
-rw-r--r--Zend/tests/use_function/conditional_function_declaration.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/use_function/conditional_function_declaration.phpt b/Zend/tests/use_function/conditional_function_declaration.phpt
new file mode 100644
index 0000000000..ccfb96103a
--- /dev/null
+++ b/Zend/tests/use_function/conditional_function_declaration.phpt
@@ -0,0 +1,17 @@
+--TEST--
+function that is conditionally defined at runtime should not cause compiler error
+--FILE--
+<?php
+
+if (0) {
+ function foo() {
+ }
+}
+
+use function bar\foo;
+
+echo "Done";
+
+?>
+--EXPECT--
+Done