- var_dump: documentation ( source)
<?php
class TestParent
{
public function execute(array $data)
{
return array(
'test' => 'test'
);
}
}
trait TestTrait
{
public function execute(int $id)
{
return $id + 1;
}
}
class TestClass extends TestParent
{
use TestTrait;
function __construct()
{
var_dump($this->execute());
}
}
new TestClass();