Spaces In Namespaces
It used to be valid syntax to have a new line or a space in a namespace name. This is not the case in PHP 8.0 anymore.
PHP code
<?php
namespace Vendor
\Package;
echo 1;
?>
Before
1
After
PHP Parse error: syntax error, unexpected fully qualified name "\Package", expecting "{"
Parse error: syntax error, unexpected fully qualified name "\Package", expecting "{"
PHP version change
This behavior changed in 8.0.