Answer the question
In order to leave comments, you need to log in
How to autoload trait php?
there is an autoloader class (registered via spl_autoload_register()) works in this way, there is a folder map in which you can search for interface classes, when you find include, I registered a separate folder for traits, added it to the folder map,
but as a result, when trying to connect the trait in the class mistake
Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION in
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question