reference/shmop/functions/shmop-open.xml
f1446c725b05024034664159db4d5f34b56421d0
...
...
@@ -8,10 +8,10 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>resource</type><methodname>shmop_open</methodname>
11
+
<type class="union"><type>Shmop</type><type>false</type></type><methodname>shmop_open</methodname>
12
12
<methodparam><type>int</type><parameter>key</parameter></methodparam>
13
-
<methodparam><type>string</type><parameter>flags</parameter></methodparam>
14
-
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
14
+
<methodparam><type>int</type><parameter>permissions</parameter></methodparam>
15
15
<methodparam><type>int</type><parameter>size</parameter></methodparam>
16
16
</methodsynopsis>
17
17
<para>
...
...
@@ -32,7 +32,7 @@
32
32
</listitem>
33
33
</varlistentry>
34
34
<varlistentry>
35
-
<term><parameter>flags</parameter></term>
35
+
<term><parameter>mode</parameter></term>
36
36
<listitem>
37
37
<para>
38
38
The flags that you can use:
...
...
@@ -73,7 +73,7 @@
73
73
</listitem>
74
74
</varlistentry>
75
75
<varlistentry>
76
-
<term><parameter>mode</parameter></term>
76
+
<term><parameter>permissions</parameter></term>
77
77
<listitem>
78
78
<para>
79
79
The permissions that you wish to assign to your memory segment, those
...
...
@@ -102,12 +102,21 @@
102
102
<refsect1 role="returnvalues">
103
103
&reftitle.returnvalues;
104
104
<para>
105
-
On success <function>shmop_open</function> will return an resource that you can
105
+
On success <function>shmop_open</function> will return a <classname>Shmop</classname> instance that you can
106
106
use to access the shared memory segment you've created. &false; is
107
107
returned on failure.
108
108
</para>
109
109
</refsect1>
110
110

111
+
<refsect1 role="errors">
112
+
&reftitle.errors;
113
+
<para>
114
+
If <parameter>mode</parameter> is invalid, or <parameter>size</parameter> is less than or equal to zero,
115
+
a <classname>ValueError</classname> is thrown.
116
+
On other failures, <constant>E_WARNING</constant> is emitted.
117
+
</para>
118
+
</refsect1>
119
+

111
120
<refsect1 role="changelog">
112
121
&reftitle.changelog;
113
122
<informaltable>
...
...
@@ -120,10 +129,18 @@
120
129
</thead>
121
130
<tbody>
122
131
<row>
123
-
<entry>7.0.0</entry>
132
+
<entry>8.0.0</entry>
124
133
<entry>
125
-
The return type of <function>shmop_open</function> has been changed from
126
-
<type>int</type> to <type>resource</type>.
134
+
On success, this function returns an <classname>Shmop</classname> instance now;
135
+
previously, a <type>resource</type> was returned.
136
+
</entry>
137
+
</row>
138
+
<row>
139
+
<entry>8.0.0</entry>
140
+
<entry>
141
+
If <parameter>mode</parameter> is invalid, or <parameter>size</parameter> is less than or equal to zero,
142
+
a <classname>ValueError</classname> is thrown; previously <constant>E_WARNING</constant> was emitted instead,
143
+
and the function returned &false;.
127
144
</entry>
128
145
</row>
129
146
</tbody>
...
...
@@ -161,7 +178,6 @@ $shm_id = shmop_open($shm_key, "c", 0644, 100);
161
178
</para>
162
179
</refsect1>
163
180
</refentry>
164
-

165
181
<!-- Keep this comment at the end of the file
166
182
Local variables:
167
183
mode: sgml
168
184