summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_namespace.phpt
blob: af310c39afb41e23fa147f6e37ffbacc27ba5166 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
Disable functions in namespaces
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/config_disabled_functions_namespace.ini
--FILE--
<?php 
namespace my_super_namespace {
	function my_function() {
		echo "Should not be printed\n";
	}
}
namespace my_second_namespace {
	function my_function() {
		echo "Second namespace\n";
	}
}
namespace {
	function my_function() {
		echo "Anonymous namespace\n";
	}
\strcmp("1", "2");
\my_super_namespace\my_function();
\my_second_namespace\my_function();
my_function();
}
?>
--EXPECTF--
Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php on line 16