mirror of
https://github.com/php/php-src.git
synced 2026-04-30 03:33:17 +02:00
1f19401ffa
In this case it's not sufficient to replace the JMP_NULL operand, as it keeps the temporary alive and there may be more uses later. Fix this by generalizing existing handling for other similar opcodes like CASE/SWITCH and LIST_R. Fixes oss-fuzz 5820123475214336.
17 lines
250 B
PHP
17 lines
250 B
PHP
--TEST--
|
|
Constant propagation with nullsafe operator
|
|
--FILE--
|
|
<?php
|
|
|
|
class Bar { const FOO = "foo"; }
|
|
|
|
try {
|
|
Bar::FOO?->length();
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Call to a member function length() on string
|