[PHP-DOC] cvs: phpdoc /en/reference/classobj/functions property-exists.xml
by Nuno Lopes other posts by this author
Feb 28 2006 3:46PM messages near this date
[PHP-DOC] #36564 [Opn->Csd]: "where" should be "were"
|
[PHP-DOC] cvs: phpdoc /en/reference/paradox reference.xml
nlopess Tue Feb 28 23:45:58 2006 UTC
Modified files:
/phpdoc/en/reference/classobj/functions property-exists.xml
Log:
fix explanation/example about visibility of properties
http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/classobj/functions/property-exists.xml?r1
=1.3&r2=1.4&diff_format=u
Index: phpdoc/en/reference/classobj/functions/property-exists.xml
diff -u phpdoc/en/reference/classobj/functions/property-exists.xml:1.3 phpdoc/en/reference/c
lassobj/functions/property-exists.xml:1.4
--- phpdoc/en/reference/classobj/functions/property-exists.xml:1.3 Fri Nov 4 14:12:13 2005
+++ phpdoc/en/reference/classobj/functions/property-exists.xml Tue Feb 28 23:45:58 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.property-exists">
<refnamediv>
<refname> property_exists</refname>
@@ -16,7 +16,7 @@
</methodsynopsis>
<para>
This function checks if the given <parameter> property</parameter> exists in
- the specified class (and if it was declared as public).
+ the specified class (and if it is accessible from the current scope).
</para>
<note>
<para>
@@ -71,11 +71,16 @@
class myClass {
public $mine;
private $xpto;
+
+ static function test() {
+ var_dump(property_exists('myClass', 'xpto')); // true, it can be accessed from here
+ }
}
var_dump(property_exists('myClass', 'mine')); //true
var_dump(property_exists(new myClass, 'mine')); //true
var_dump(property_exists('myClass', 'xpto')); //false, isn't public
+myClass::test();
?>
]]>
|