summaryrefslogtreecommitdiff
path: root/tests/classes/type_hinting_005d.phpt
diff options
context:
space:
mode:
authorRobin Fernandes <robinf@php.net>2008-12-05 22:12:04 +0000
committerRobin Fernandes <robinf@php.net>2008-12-05 22:12:04 +0000
commit5e33549e0da9504f8c62c339eff2cfef786ffe8a (patch)
tree526a7a254027d544fce1aa31c8a55274efc7964b /tests/classes/type_hinting_005d.phpt
parent97a63ab6b4f6bbaaaa3e9623fdeaae2de5c47b8b (diff)
downloadphp-git-5e33549e0da9504f8c62c339eff2cfef786ffe8a.tar.gz
Add some class related tests, fix hard-coded object ID in serialize_001.phpt.
Diffstat (limited to 'tests/classes/type_hinting_005d.phpt')
-rw-r--r--tests/classes/type_hinting_005d.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/classes/type_hinting_005d.phpt b/tests/classes/type_hinting_005d.phpt
new file mode 100644
index 0000000000..47ebf57ee9
--- /dev/null
+++ b/tests/classes/type_hinting_005d.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Check type hint compatibility in overrides with array hints.
+--FILE--
+<?php
+Class C { function f($a) {} }
+
+echo "Array hint, should be nothing.\n";
+Class D extends C { function f(array $a) {} }
+?>
+==DONE==
+--EXPECTF--
+Fatal error: Declaration of D::f() must be compatible with that of C::f() in %s on line 5 \ No newline at end of file