3v4l.org

run code in 300+ PHP versions simultaneously
<?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();

preferences:
33.87 ms | 402 KiB | 5 Q