language/predefined/arrayaccess/offsetexists.xml
09003ff79e20ff948b2c9efb2745f7625637d7e4
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="arrayaccess.offsetexists" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>ArrayAccess::offsetExists</refname>
...
...
@@ -9,8 +8,8 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
13
-
<modifier>abstract</modifier> <modifier>public</modifier> <type>bool</type><methodname>ArrayAccess::offsetExists</methodname>
11
+
<methodsynopsis role="ArrayAccess">
12
+
<modifier>public</modifier> <type>bool</type><methodname>ArrayAccess::offsetExists</methodname>
14
13
<methodparam><type>mixed</type><parameter>offset</parameter></methodparam>
15
14
</methodsynopsis>
16
15
<para>
...
...
@@ -52,7 +51,7 @@
52
51
</para>
53
52
<note>
54
53
<para>
55
-
The return value will be casted to <type>boolean</type> if non-boolean was returned.
54
+
The return value will be casted to <type>bool</type> if non-boolean was returned.
56
55
</para>
57
56
</note>
58
57
</refsect1>
...
...
@@ -65,20 +64,21 @@
65
64
<programlisting role="php">
66
65
<![CDATA[
67
66
<?php
68
-
class obj implements arrayaccess {
69
-
public function offsetSet($offset, $value) {
67
+
class obj implements ArrayAccess {
68
+
public function offsetSet($offset, $value): void {
70
69
var_dump(__METHOD__);
71
70
}
72
-
public function offsetExists($var) {
71
+
public function offsetExists($var): bool {
73
72
var_dump(__METHOD__);
74
73
if ($var == "foobar") {
75
74
return true;
76
75
}
77
76
return false;
78
77
}
79
-
public function offsetUnset($var) {
78
+
public function offsetUnset($var): void {
80
79
var_dump(__METHOD__);
81
80
}
81
+
#[\ReturnTypeWillChange]
82
82
public function offsetGet($var) {
83
83
var_dump(__METHOD__);
84
84
return "value";
...
...
@@ -132,7 +132,6 @@ bool(true)
132
132
-->
133
133

134
134
</refentry>
135
-

136
135
<!-- Keep this comment at the end of the file
137
136
Local variables:
138
137
mode: sgml
139
138