language/predefined/typeerror.xml
14767af0f05dffa6fdb9b49e1a1f4e9ca7022a60
...
...
@@ -1,11 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
-
<phpdoc:exceptionref xml:id="class.typeerror"
5
-
xmlns="http://docbook.org/ns/docbook"
6
-
xmlns:xlink="http://www.w3.org/1999/xlink"
7
-
xmlns:xi="http://www.w3.org/2001/XInclude"
8
-
xmlns:phpdoc="http://php.net/ns/phpdoc">
3
+
<phpdoc:exceptionref xml:id="class.typeerror" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
9
4
<title>TypeError</title>
10
5
<titleabbrev>TypeError</titleabbrev>
11
6

...
...
@@ -15,13 +10,21 @@
15
10
<section xml:id="typeerror.intro">
16
11
&reftitle.intro;
17
12
<para>
18
-
There are three scenarios where a
19
-
<ooclass><classname>TypeError</classname></ooclass> may be thrown. The
20
-
first is where the argument type being passed to a function does not match
21
-
its corresponding declared parameter type. The second is where a value
22
-
being returned from a function does not match the declared function return
23
-
type. The third is where an invalid number of arguments are passed to a
24
-
built-in PHP function (strict mode only).
13
+
A <classname>TypeError</classname> may be thrown when:
14
+
<simplelist>
15
+
<member>
16
+
The value being set for a class property does not match
17
+
the property's corresponding declared type.
18
+
</member>
19
+
<member>
20
+
The argument type being passed to a function does not match
21
+
its corresponding declared parameter type.
22
+
</member>
23
+
<member>
24
+
A value being returned from a function does not match the
25
+
declared function return type.
26
+
</member>
27
+
</simplelist>
25
28
</para>
26
29
</section>
27
30
<!-- }}} -->
...
...
@@ -30,32 +33,61 @@
30
33
&reftitle.classsynopsis;
31
34

32
35
<!-- {{{ Synopsis -->
33
-
<classsynopsis>
34
-
<ooclass><classname>TypeError</classname></ooclass>
36
+
<classsynopsis class="class">
37
+
<ooexception>
38
+
<exceptionname>TypeError</exceptionname>
39
+
</ooexception>
35
40

36
-
<!-- {{{ Class synopsis -->
37
-
<classsynopsisinfo>
38
-
<ooclass>
39
-
<classname>TypeError</classname>
40
-
</ooclass>
41
+
<ooclass>
42
+
<modifier>extends</modifier>
43
+
<classname>Error</classname>
44
+
</ooclass>
41
45

42
-
<ooclass>
43
-
<modifier>extends</modifier>
44
-
<classname>Error</classname>
45
-
</ooclass>
46
-
</classsynopsisinfo>
47
-
<!-- }}} -->
46
+
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
47
+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.error')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Properties;']]))">
48
+
<xi:fallback/>
49
+
</xi:include>
48
50

49
51
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
50
-
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.error')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
52
+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.error')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='Error'])">
53
+
<xi:fallback/>
54
+
</xi:include>
55
+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.error')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Error'])">
56
+
<xi:fallback/>
57
+
</xi:include>
51
58
</classsynopsis>
52
59

53
60
<!-- }}} -->
54
61

55
62
</section>
63
+

64
+
<section xml:id="typeerror.changelog" role="changelog">
65
+
&reftitle.changelog;
66
+
<informaltable>
67
+
<tgroup cols="2">
68
+
<thead>
69
+
<row>
70
+
<entry>&Version;</entry>
71
+
<entry>&Description;</entry>
72
+
</row>
73
+
</thead>
74
+
<tbody>
75
+
<row>
76
+
<entry>7.1.0</entry>
77
+
<entry>
78
+
A <classname>TypeError</classname> is no longer thrown when
79
+
an invalid number of arguments are passed to a built-in PHP function
80
+
in strict mode.
81
+
Instead, an <classname>ArgumentCountError</classname> is raised.
82
+
</entry>
83
+
</row>
84
+
</tbody>
85
+
</tgroup>
86
+
</informaltable>
87
+
</section>
88
+

56
89
</partintro>
57
90
</phpdoc:exceptionref>
58
-
59
91
<!-- Keep this comment at the end of the file
60
92
Local variables:
61
93
mode: sgml
62
94