S
S
Sergey Zelensky2015-07-28 14:41:43
PHP
Sergey Zelensky, 2015-07-28 14:41:43

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

1 answer(s)
D
D', 2015-07-28
@SergeyZelensky-Rostov

Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION in

This is a PHP version error.
Make sure PHP >= 5.4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question