From dcf34fa22352cc9536e38996fcbef4c6cebc752e Mon Sep 17 00:00:00 2001 From: Thomas Punt Date: Mon, 12 Oct 2015 19:26:37 +0000 Subject: [PATCH] Update TypeError description git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337987 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/predefined/typeerror.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/language/predefined/typeerror.xml b/language/predefined/typeerror.xml index 67eda95fcb..8a6c7d05e3 100644 --- a/language/predefined/typeerror.xml +++ b/language/predefined/typeerror.xml @@ -15,11 +15,14 @@
&reftitle.intro; - TypeError is thrown when strict - typing is enabled and an invalid argument is given to a function. - TypeError is also thrown when an - invalid number of arguments are passed to a function. - + There are three scenarios where a + TypeError may be thrown. The + first is where the argument type being passed to a function does not match + its corresponding declared parameter type (strict mode only). The second is + where a value being returned from a function does not match the declared + function return type (strict mode only, again). The third is where an + invalid number of arguments are passed to a built-in PHP function. +