¡@

Home 

php Programming Glossary: sayworld

How to overload class constructor within traits in PHP >= 5.4

http://stackoverflow.com/questions/12478124/how-to-overload-class-constructor-within-traits-in-php-5-4

a b echo a b public function sayHello echo 'Hello ' trait SayWorld public function __construct a b c 0 echo int c a b public function.. echo 'World '. a class MyHelloWorld extends Base use SayWorld o new MyHelloWorld 2 3 o sayHello 1 I have an error Fatal error.. to do what you want is class MyHelloWorld extends Base use SayWorld SayWorld __construct as private __swConstruct public function..