- var_dump: documentation ( source)
<?php
trait Foo
{
public $hidden;
static function doSomething($obj)
{
unset($obj);
}
function __call($name, $arguments)
{
echo 'hello from overload';
}
}
class Bar
{
use Foo;
function hello()
{
echo 'hello from bar';
}
}
$foo = new Bar();
Bar::doSomething($foo);
var_dump($foo);
$foo->hello();