Fixing the “Syntax Error, Unexpected ‘?’” in PHP
You are not alone. This error often comes when you working with the null coalescing operator (??), which was introduced in PHP 7.0. If your server is an older version of PHP (such as 5.6), this syntax will be invalid. Why Does This Error Happen? The null coalescing operator ?? is a shorthand approach in…
