xref: /php-src/Zend/tests/bug70117.phpt (revision 7aacc705)
1--TEST--
2Bug #70117 (Unexpected return type error)
3--FILE--
4<?php
5
6function &foo() :string {
7    $a = array(1);
8    $b = &$a[0];
9    return $b;
10}
11
12function &foo1() :string {
13    $a = array("ref");
14    return $a[0];
15}
16
17var_dump(foo());
18var_dump(foo1());
19?>
20--EXPECT--
21string(1) "1"
22string(3) "ref"
23