summaryrefslogtreecommitdiff
path: root/Zend/tests/bug42802.phpt
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2008-11-11 19:45:29 +0000
committerStanislav Malyshev <stas@php.net>2008-11-11 19:45:29 +0000
commit1b4134c07b8176efb0455b2e87398b0fafbfdce0 (patch)
treea70401d3198dd30f11e49ea1c4b102667bb567c7 /Zend/tests/bug42802.phpt
parentcaa133b3d36ea1fdf3bfbc3da6d8406c2d962862 (diff)
downloadphp-git-1b4134c07b8176efb0455b2e87398b0fafbfdce0.tar.gz
Namespace resolution streamlining patch
[DOC] new resolution rules should be documented soon
Diffstat (limited to 'Zend/tests/bug42802.phpt')
-rwxr-xr-xZend/tests/bug42802.phpt13
1 files changed, 4 insertions, 9 deletions
diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt
index 31d9d34ae3..2aa7061f35 100755
--- a/Zend/tests/bug42802.phpt
+++ b/Zend/tests/bug42802.phpt
@@ -20,26 +20,21 @@ function test3(\foo\bar $bar) {
function test4(\Exception $e) {
echo "ok\n";
}
-function test5(Exception $e) {
- echo "ok\n";
-}
-function test6(\bar $bar) {
+function test5(\bar $bar) {
echo "bug\n";
}
$x = new bar();
-$y = new Exception();
+$y = new \Exception();
test1($x);
test2($x);
test3($x);
test4($y);
-test5($y);
-test6($x);
+test5($x);
--EXPECTF--
ok
ok
ok
ok
-ok
-Catchable fatal error: Argument 1 passed to foo\test6() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line 23
+Catchable fatal error: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php on line %d