diff --git a/language/oop5/traits.xml b/language/oop5/traits.xml index 31828868f3..48b04d4c28 100644 --- a/language/oop5/traits.xml +++ b/language/oop5/traits.xml @@ -65,20 +65,20 @@ class ezcReflectionFunction extends ReflectionFunction { ]]> @@ -253,20 +253,20 @@ class Aliased_Talker { ]]> @@ -287,23 +287,23 @@ class MyClass2 { getWorld(); - } - abstract public function getWorld(); + public function sayHelloWorld() { + echo 'Hello'.$this->getWorld(); + } + abstract public function getWorld(); } class MyHelloWorld { - private $world; - use Hello; - public function getWorld() { - return $this->world; - } - public function setWorld($val) { - $this->world = $val; - } + private $world; + use Hello; + public function getWorld() { + return $this->world; + } + public function setWorld($val) { + $this->world = $val; + } } ?> ]]> @@ -367,24 +367,24 @@ class MyHelloWorld { inc(); // echo 1 - $p = new C2(); $p->inc(); // echo 1 +$o = new C1(); $o->inc(); // echo 1 +$p = new C2(); $p->inc(); // echo 1 ?> ]]> @@ -394,17 +394,17 @@ class MyHelloWorld { ]]>