mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

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.
12 lines
284 B
PHP
12 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
|