xref: /php-src/ext/opcache/tests/jit/ret_004.phpt (revision c16ad918)
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
7--FILE--
8<?php
9class A {
10	function foo() {
11	}
12	function bar() {
13		$x = $this->foo();
14		var_dump(str_repeat($x,5));
15	}
16}
17class B extends A {
18	public $prop = "x";
19	function &foo() {
20		return $this->prop;
21	}
22}
23$b = new B;
24$b->bar();
25?>
26--EXPECT--
27string(5) "xxxxx"
28