How to fix «Parse error: syntax error, unexpected '?'» in PHP?

E.g.:

Parse error: syntax error, unexpected '?' in vendor/zendframework/zend-code/src/Reflection/DocBlock/Tag/VarTag.php on line 69

You need PHP >= 7.1.