xref: /PHP-5.6/Zend/tests/bug21888.phpt (revision 610c7fbe)
1--TEST--
2Bug #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
9class mom {
10
11  protected $prot = "protected property\n";
12
13  protected function prot() {
14    print "protected method\n";
15  }
16}
17
18class 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--
35protected method
36protected property
37