1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Files
archived-php-src/ext/opcache/tests/jit/assign_042.phpt
T
2021-10-06 12:10:39 +03:00

29 lines
576 B
PHP

--TEST--
JIT ASSIGN: Assign to of reference with 1 refcount
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
opcache.protect_memory=1
--FILE--
<?php
class Test {
public $prop;
function __construct() {
$this->prop = $this->retref();
}
function &retref() {
return str_repeat("a", 5);
}
}
$o = new Test();
var_dump($o);
?>
--EXPECTF--
Notice: Only variable references should be returned by reference in %sassign_042.php on line 8
object(Test)#1 (1) {
["prop"]=>
string(5) "aaaaa"
}