该仓库已于 2025-08-22 归档。您可以查看文件或克隆它,但不能推送、创建工单或合并请求。
文件
dumbo/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test-fail
2014-11-25 16:42:40 +01:00

13 行
279 B
Plaintext

There (mostly) can't be statements outside of namespaces
-----
<?php
echo 1;
namespace A;
-----
Namespace declaration statement has to be the very first statement in the script on line 3
-----
<?php
namespace A {}
echo 1;
-----
No code may exist outside of namespace {} on line 3