Annotation of embedaddon/php/ext/reflection/tests/ReflectionProperty_getModifiers_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test ReflectionProperty::getModifiers() usage.
                      3: --FILE--
                      4: <?php
                      5: 
                      6: class C {
                      7:     public $a1;
                      8:     protected $a2;
                      9:     private $a3;
                     10:     static public $a4;
                     11:     static protected $a5;
                     12:     static private $a6;
                     13: }
                     14: 
                     15: class D extends C {
                     16:     public $a1;
                     17:     protected $a2;
                     18:     private $a3;
                     19:     static public $a4;
                     20:     static protected $a5;
                     21:     static private $a6;
                     22: }
                     23: 
                     24: for ($i = 1;$i <= 6;$i++) {
                     25:     $rp = new ReflectionProperty("C", "a$i");
                     26:     echo "C::a$i: ";
                     27:     var_dump($rp->getModifiers());
                     28:     $rp = new ReflectionProperty("D", "a$i");
                     29:     echo "D::a$i: ";
                     30:     var_dump($rp->getModifiers());
                     31: }
                     32: 
                     33: ?>
                     34: --EXPECTF--
                     35: C::a1: int(256)
                     36: D::a1: int(256)
                     37: C::a2: int(512)
                     38: D::a2: int(512)
                     39: C::a3: int(1024)
                     40: D::a3: int(3072)
                     41: C::a4: int(257)
                     42: D::a4: int(257)
                     43: C::a5: int(513)
                     44: D::a5: int(513)
                     45: C::a6: int(1025)
                     46: D::a6: int(3073)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>