2006-10-17 11:11:45 +00:00
|
|
|
--TEST--
|
|
|
|
ReflectionObject::__toString (filtering privates/protected dynamic properties)
|
2007-04-12 12:43:54 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php extension_loaded('reflection') or die('skip'); ?>
|
2006-10-17 11:11:45 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class C1 {
|
|
|
|
private $p1 = 1;
|
|
|
|
protected $p2 = 2;
|
|
|
|
public $p3 = 3;
|
|
|
|
}
|
2008-08-11 13:35:49 +00:00
|
|
|
|
|
|
|
$x = new C1();
|
|
|
|
$x->z = 4;
|
|
|
|
$x->p3 = 5;
|
|
|
|
|
|
|
|
$obj = new ReflectionObject($x);
|
2006-10-17 11:11:45 +00:00
|
|
|
echo $obj;
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
Object of class [ <user> class C1 ] {
|
|
|
|
@@ %s024.php 2-6
|
|
|
|
|
|
|
|
- Constants [0] {
|
|
|
|
}
|
|
|
|
|
|
|
|
- Static properties [0] {
|
|
|
|
}
|
|
|
|
|
|
|
|
- Static methods [0] {
|
|
|
|
}
|
|
|
|
|
|
|
|
- Properties [3] {
|
|
|
|
Property [ <default> private $p1 ]
|
|
|
|
Property [ <default> protected $p2 ]
|
|
|
|
Property [ <default> public $p3 ]
|
|
|
|
}
|
|
|
|
|
|
|
|
- Dynamic properties [1] {
|
2008-08-11 13:35:49 +00:00
|
|
|
Property [ <dynamic> public $z ]
|
2006-10-17 11:11:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- Methods [0] {
|
|
|
|
}
|
|
|
|
}
|