reference/classobj/functions/property-exists.xml
a4fb7f59310a598b8cb8ca1daa47e557f32ae66e
...
...
@@ -11,7 +11,7 @@
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
13
<type>bool</type><methodname>property_exists</methodname>
14
-
<methodparam><type>mixed</type><parameter>class</parameter></methodparam>
14
+
<methodparam><type class="union"><type>object</type><type>string</type></type><parameter>object_or_class</parameter></methodparam>
15
15
<methodparam><type>string</type><parameter>property</parameter></methodparam>
16
16
</methodsynopsis>
17
17
<para>
...
...
@@ -31,7 +31,7 @@
31
31
<para>
32
32
<variablelist>
33
33
<varlistentry>
34
-
<term><parameter>class</parameter></term>
34
+
<term><parameter>object_or_class</parameter></term>
35
35
<listitem>
36
36
<para>
37
37
The class name or an object of the class to test for
...
...
@@ -52,48 +52,10 @@
52
52
<refsect1 role="returnvalues">
53
53
&reftitle.returnvalues;
54
54
<para>
55
-
Returns &true; if the property exists, &false; if it doesn't exist or
56
-
&null; in case of an error.
55
+
Returns &true; if the property exists, &false; if it doesn't exist.
57
56
</para>
58
57
</refsect1>
59
58

60
-
<refsect1 role="notes">
61
-
&reftitle.notes;
62
-
&note.uses-autoload;
63
-
<note>
64
-
<para>
65
-
The <function>property_exists</function> function cannot detect properties
66
-
that are magically accessible using the <link
67
-
linkend="language.oop5.overloading.members"><literal>__get</literal></link>
68
-
magic method.
69
-
</para>
70
-
</note>
71
-
</refsect1>
72
-

73
-
<refsect1 role="changelog">
74
-
&reftitle.changelog;
75
-
<para>
76
-
<informaltable>
77
-
<tgroup cols="2">
78
-
<thead>
79
-
<row>
80
-
<entry>&Version;</entry>
81
-
<entry>&Description;</entry>
82
-
</row>
83
-
</thead>
84
-
<tbody>
85
-
<row>
86
-
<entry>5.3.0</entry>
87
-
<entry>
88
-
This function checks the existence of a property independent of
89
-
accessibility.
90
-
</entry>
91
-
</row>
92
-
</tbody>
93
-
</tgroup>
94
-
</informaltable>
95
-
</para>
96
-
</refsect1>
97
59
<refsect1 role="examples">
98
60
&reftitle.examples;
99
61
<para>
...
...
@@ -115,9 +77,9 @@ class myClass {
115
77

116
78
var_dump(property_exists('myClass', 'mine')); //true
117
79
var_dump(property_exists(new myClass, 'mine')); //true
118
-
var_dump(property_exists('myClass', 'xpto')); //true, as of PHP 5.3.0
80
+
var_dump(property_exists('myClass', 'xpto')); //true
119
81
var_dump(property_exists('myClass', 'bar')); //false
120
-
var_dump(property_exists('myClass', 'test')); //true, as of PHP 5.3.0
82
+
var_dump(property_exists('myClass', 'test')); //true
121
83
myClass::test();
122
84

123
85
?>
...
...
@@ -126,6 +88,19 @@ myClass::test();
126
88
</example>
127
89
</para>
128
90
</refsect1>
91
+

92
+
<refsect1 role="notes">
93
+
&reftitle.notes;
94
+
&note.uses-autoload;
95
+
<note>
96
+
<para>
97
+
The <function>property_exists</function> function cannot detect properties
98
+
that are magically accessible using the <link linkend="language.oop5.overloading.members"><literal>__get</literal></link>
99
+
magic method.
100
+
</para>
101
+
</note>
102
+
</refsect1>
103
+
129
104
<refsect1 role="seealso">
130
105
&reftitle.seealso;
131
106
<para>
...
...
@@ -135,7 +110,6 @@ myClass::test();
135
110
</para>
136
111
</refsect1>
137
112
</refentry>
138
-

139
113
<!-- Keep this comment at the end of the file
140
114
Local variables:
141
115
mode: sgml
142
116