- Improved example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@265122 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Felipe Pena 2008-08-19 11:13:12 +00:00
parent ecd61e228d
commit 6fd6778920

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry xml:id="function.property-exists" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>property_exists</refname>
@ -92,6 +92,7 @@
class myClass {
public $mine;
private $xpto;
static protected $test;
static function test() {
var_dump(property_exists('myClass', 'xpto')); //true
@ -100,8 +101,9 @@ class myClass {
var_dump(property_exists('myClass', 'mine')); //true
var_dump(property_exists(new myClass, 'mine')); //true
var_dump(property_exists('myClass', 'xpto')); //true
var_dump(property_exists('myClass', 'xpto')); //true, as of PHP 5.3.0
var_dump(property_exists('myClass', 'bar')); //false
var_dump(property_exists('myClass', 'test')); //true, as of PHP 5.3.0
myClass::test();
?>