1--TEST--
2Observer: Retvals by reference are observable that are: IS_TMP_VAR
3--EXTENSIONS--
4zend_test
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.show_output=1
8zend_test.observer.observe_all=1
9zend_test.observer.show_return_value=1
10--FILE--
11<?php
12function &foo() {
13    $retval = 'I should be ';
14    return $retval . 'observable'; // IS_TMP_VAR
15}
16
17$res = foo(); // Retval used
18foo(); // Retval unused
19
20echo 'Done' . PHP_EOL;
21?>
22--EXPECTF--
23<!-- init '%s%eobserver_retval_by_ref_%d.php' -->
24<file '%s%eobserver_retval_by_ref_%d.php'>
25  <!-- init foo() -->
26  <foo>
27
28Notice: Only variable references should be returned by reference in %s on line %d
29  </foo:'I should be observable'>
30  <foo>
31
32Notice: Only variable references should be returned by reference in %s on line %d
33  </foo:'I should be observable'>
34Done
35</file '%s%eobserver_retval_by_ref_%d.php'>
36