3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { use FooTrait; protected function getPluginDependencies() { var_dump('class'); } public function test() { $this->getPluginDependencies(); } } trait FooTrait { protected function getPluginDependencies() { var_dump('trait'); } } $foo = new Foo(); $foo->test();

preferences:
47.93 ms | 402 KiB | 5 Q