<?php
trait behaviour {
protected $_test = 1;
}
class A {
use behaviour;
}
class B extends A {
public function getTest(){
return $this->_test;
}
}
echo (new B)->
Parse error: syntax error, unexpected end of file, expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/DqRrB on line 17
Process exited with code 255.