mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Update TypeError description
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337987 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fe70c2fc5f
commit
dcf34fa223
1 changed files with 8 additions and 5 deletions
|
@ -15,11 +15,14 @@
|
|||
<section xml:id="typeerror.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
<ooclass><classname>TypeError</classname></ooclass> is thrown when strict
|
||||
typing is enabled and an invalid argument is given to a function.
|
||||
<ooclass><classname>TypeError</classname></ooclass> is also thrown when an
|
||||
invalid number of arguments are passed to a function.
|
||||
</para>
|
||||
There are three scenarios where a
|
||||
<ooclass><classname>TypeError</classname></ooclass> 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.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue