1--TEST-- 2JIT RET: 004 Return a reference when it's not expected 3--INI-- 4opcache.enable=1 5opcache.enable_cli=1 6opcache.file_update_protection=0 7opcache.jit_buffer_size=32M 8--FILE-- 9<?php 10class A { 11 function foo() { 12 } 13 function bar() { 14 $x = $this->foo(); 15 var_dump(str_repeat($x,5)); 16 } 17} 18class B extends A { 19 public $prop = "x"; 20 function &foo() { 21 return $this->prop; 22 } 23} 24$b = new B; 25$b->bar(); 26?> 27--EXPECT-- 28string(5) "xxxxx" 29