Annotation of embedaddon/php/Zend/tests/bug21888.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #21888 (protected property and protected method of the same name)
                      3: --SKIPIF--
                      4: <?php 
                      5:        if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); 
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: class mom {
                     10: 
                     11:   protected $prot = "protected property\n";
                     12: 
                     13:   protected function prot() {
                     14:     print "protected method\n";
                     15:   } 
                     16: }
                     17: 
                     18: class child extends mom {
                     19:   
                     20:   public function callMom() {
                     21:     $this->prot();
                     22:   }
                     23:   
                     24:   public function viewMom() {
                     25:     print $this->prot;
                     26:   }
                     27:   
                     28: }
                     29: 
                     30: $c = new child();
                     31: $c->callMom();
                     32: $c->viewMom();
                     33: ?>
                     34: --EXPECT--
                     35: protected method
                     36: protected property

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