mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
c5f93d191e
Due to improvements to early binding, the opcode based check is no longer accurate. Reuse the syntactic check we're already using for declares instead.
13 lines
284 B
PHP
13 lines
284 B
PHP
--TEST--
|
|
Function declaration should not be allowed before namespace declaration
|
|
--FILE--
|
|
<?php
|
|
|
|
function foo() {}
|
|
|
|
namespace Bar;
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in %s on line %d
|