reference/classobj/functions/get-called-class.xml
fe33a5685ef58fd545cfacc1e19ba6411379feab
...
...
@@ -15,10 +15,50 @@
15
15
Gets the name of the class the static method is called in.
16
16
</para>
17
17
</refsect1>
18
+

19
+
<refsect1 role="parameters">
20
+
&reftitle.parameters;
21
+
&no.function.parameters;
22
+
</refsect1>
23
+
18
24
<refsect1 role="returnvalues">
19
25
&reftitle.returnvalues;
20
26
<para>
21
-
Returns the class name. Returns &false; if called from outside a class.
27
+
Returns the class name.
28
+
</para>
29
+
</refsect1>
30
+
<refsect1 role="errors">
31
+
&reftitle.errors;
32
+
<para>
33
+
If <function>get_called_class</function> is called from outside a class,
34
+
an <classname>Error</classname> is thrown. Prior to PHP 8.0.0,
35
+
an <constant>E_WARNING</constant> level error was raised.
36
+
</para>
37
+
</refsect1>
38
+
<refsect1 role="changelog">
39
+
&reftitle.changelog;
40
+
<para>
41
+
<informaltable>
42
+
<tgroup cols="2">
43
+
<thead>
44
+
<row>
45
+
<entry>&Version;</entry>
46
+
<entry>&Description;</entry>
47
+
</row>
48
+
</thead>
49
+
<tbody>
50
+
<row>
51
+
<entry>8.0.0</entry>
52
+
<entry>
53
+
Calling this function from outside a class,
54
+
will now throw an <classname>Error</classname>.
55
+
Previously, an <constant>E_WARNING</constant> was raised
56
+
and the function returned &false;.
57
+
</entry>
58
+
</row>
59
+
</tbody>
60
+
</tgroup>
61
+
</informaltable>
22
62
</para>
23
63
</refsect1>
24
64
<refsect1 role="examples">
25
65