I came across a weird issue that I cannot explain with namespaces. The function array() does not seem to allow a global reference using \array() in namespaces. Is this expected functionality or some kind of inconsistency in PHP?
The error that is returned is:
PHP Parse error: syntax error, unexpected T_ARRAY, expecting T_STRING in php shell code on line 2
The follow piece of code replicates the error that is shown:
<?php
namespace Testing;
final class Test {
private $properties = \array(
"test" => "testing",
"weird_functionality" => "test"
);
}
?>