- Output for 8.1.10 - 8.1.33, 8.2.10 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- using parent bar function this is bar
<?php
class Foo {
use Some;
function bar () {
echo "this is bar" . PHP_EOL;
}
}
trait Some {
abstract function bar();
function useBar() {
echo "using parent bar function" . PHP_EOL;
$this->bar();
}
}
(new Foo())->useBar();