mirror of
https://github.com/php/php-src.git
synced 2024-12-14 04:16:30 +08:00
Add test for conditional function declaration
This commit is contained in:
parent
6263f221ff
commit
e14a769c56
@ -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
|
Loading…
Reference in New Issue
Block a user