xref: /PHP-5.3/Zend/tests/bug22836.phpt (revision 743c5bb1)
1--TEST--
2Bug #22836 (returning references to NULL)
3--SKIPIF--
4<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
5--FILE--
6<?php
7function &f()
8{
9	$x = "foo";
10	var_dump($x);
11	print "'$x'\n";
12	return ($a);
13}
14for ($i = 0; $i < 8; $i++) {
15	$h =& f();
16}
17?>
18--EXPECTF--
19string(3) "foo"
20'foo'
21string(3) "foo"
22'foo'
23string(3) "foo"
24'foo'
25string(3) "foo"
26'foo'
27string(3) "foo"
28'foo'
29string(3) "foo"
30'foo'
31string(3) "foo"
32'foo'
33string(3) "foo"
34'foo'
35