Answers for "define constructor in trait php"

PHP
0

define constructor in trait php

class MyHelloWorld extends Base {

    use SayWorld {
        SayWorld::__construct as private __swConstruct;
    }

    public function __construct($a, $b, $c = 0)
    {
        $this->__swConstruct($a, $b, $c);
    }
}
Posted by: Guest on April-11-2021

Browse Popular Code Answers by Language