<?php
interface fooAPI{
public function doFoo();
}
trait fooable{
protected $foo;
public function __construct( $foo ){ $this->_foo = $foo; }
public function doFoo(){ return $this->_foo; }
}
class Foo{
use fooable{
fooable::__construct as _fooable__construct;
_fooable__construct as protected;
}
public function __construct(){
$this->_fooable__construct( "foo" );
}
}
echo (new Foo)->doFoo();
Fatal error: The modifiers of the trait method _fooable__construct() are changed, but this method does not exist. Error in /in/YllN2 on line 13
Process exited with code 255.
Fatal error: The modifiers for the trait alias _fooable__construct() need to be changed in the same statement in which the alias is defined. Error in /in/YllN2 on line 13
Process exited with code 255.
Fatal error: The modifiers for the trait alias _fooable__construct() need to be changed in the same statment in which the alias is defined. Error in /in/YllN2 on line 21
Process exited with code 255.