summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/language008a.phpt
blob: 5a12a4e74b5ba075624ca9e25d6684b84ea36d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Visibility can be changed with the as aliasing construct as well.
--FILE--
<?php
error_reporting(E_ALL);

trait HelloWorld {
   public function sayHello() {
     echo 'Hello World!';
   }
}

class MyClass {
   use HelloWorld { sayHello as protected; }
}


$o = new MyClass;
$o->sayHello();

?>
--EXPECTF--	
Fatal error: Call to protected method MyClass::sayHello() from context '' in %s on line %d