- Output for 8.1.10 - 8.1.28, 8.2.10 - 8.2.18, 8.3.0 - 8.3.6
- using parent bar function this is bar
<?php
class Foo {
use Some;
function bar () {
echo "this is bar" . PHP_EOL;
}
}
trait Some {
function useBar() {
echo "using parent bar function" . PHP_EOL;
$this->bar();
}
}
(new Foo())->useBar();