I have installed PHP 5.6.40, and have also run command
symfony check:requirements
in accordance with https://symfony.com/doc/3.4/reference/requirements.html Its output is shown below.
/usr/local/bin/symfony: line 1: syntax error near unexpected token
newline' /usr/local/bin/symfony: line 1:'