Skip to content

Commit e14a769

Browse files
committed
Add test for conditional function declaration
1 parent 6263f22 commit e14a769

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
function that is conditionally defined at runtime should not cause compiler error
3+
--FILE--
4+
<?php
5+
6+
if (0) {
7+
function foo() {
8+
}
9+
}
10+
11+
use function bar\foo;
12+
13+
echo "Done";
14+
15+
?>
16+
--EXPECT--
17+
Done

0 commit comments

Comments
 (0)