summaryrefslogtreecommitdiff
path: root/Zend/tests/use_function/conditional_function_declaration.phpt
blob: 02ac0803f09e771c22216565a2827014070f36c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
function that is conditionally defined is subject to symbol use checks
--FILE--
<?php

if (0) {
    function foo() {
    }
}

use function bar\foo;

echo "Done";

?>
--EXPECTF--
Fatal error: Cannot use function bar\foo as foo because the name is already in use in %s on line %d