mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Improved example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@265122 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ecd61e228d
commit
6fd6778920
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue