Skip to content

Inaccurate warning messages in JIT #16637

@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
namespace NS;
class Test {
	public function test() {
		return preg_match('foo', 'bar');
	}
}
$test = new Test();
$test->test();

Resulted in this output (JIT 1211):

object(NS\Test)#1 (0) {
}

Warning: NS\Test::test(): Delimiter must not be alphanumeric, backslash, or NUL byte in /tmp/test.php on line 6

But I expected this output instead:

object(NS\Test)#1 (0) {
}

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL byte in /tmp/test.php on line 6

PHP Version

nightly

Operating System

ubuntu 22.04

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