mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
fbae590bf0
The QM_ASSIGN code was rewritten to use the standard pattern for handling CVs and VARs.
21 lines
308 B
PHP
21 lines
308 B
PHP
--TEST--
|
|
Leak in QM_ASSIGN when unwrapping references (rc=1)
|
|
--FILE--
|
|
<?php
|
|
|
|
function &ref() {
|
|
$str = "str";
|
|
$str .= "str";
|
|
return $str;
|
|
}
|
|
|
|
var_dump(true ? ref() : ref());
|
|
var_dump(ref() ?: ref());
|
|
var_dump(ref() ?? ref());
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(6) "strstr"
|
|
string(6) "strstr"
|
|
string(6) "strstr"
|