Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Inconsistent use of E_WARNING and E_COMPILE_WARNING in zend_compile.c #18510

Copy link
Copy link
Open
@TimWolla

Description

@TimWolla
Issue body actions

Description

The following code:

<?php

set_error_handler(function (int $errno, string $errstr) {
	var_dump($errno, $errstr);
}, E_ALL);

include('test7.php');

and

<?php

use Foo;

function foo(integer $foo) {
	
}

Resulted in this output:

int(2)
string(60) "The use statement with non-compound name 'Foo' has no effect"

Warning: "integer" will be interpreted as a class name. Did you mean "int"? Write "\integer" to suppress this warning in php-src/test7.php on line 5

But I expected this output instead:

Warning: The use statement with non-compound name 'Foo' has no effect in php-src/test7.php on line 3

Warning: "integer" will be interpreted as a class name. Did you mean "int"? Write "\integer" to suppress this warning in php-src/test7.php on line 5

or

int(2)
string(60) "The use statement with non-compound name 'Foo' has no effect"
int(2)
string(108) ""integer" will be interpreted as a class name. Did you mean "int"? Write "\integer" to suppress this warning"

The same applies to other warnings emitted during compilation.

PHP Version

git master

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.