1--TEST--
2Observer: Retvals are observable that are: IS_REFERENCE, IS_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 &getMessage() {
13    $retval = 'I should be observable';
14    return $retval;
15}
16
17function foo() {
18    return getMessage(); // IS_REFERENCE + IS_VAR
19}
20
21$res = foo(); // Retval used
22foo(); // Retval unused
23
24echo 'Done' . PHP_EOL;
25?>
26--EXPECTF--
27<!-- init '%s%eobserver_retval_%d.php' -->
28<file '%s%eobserver_retval_%d.php'>
29  <!-- init foo() -->
30  <foo>
31    <!-- init getMessage() -->
32    <getMessage>
33    </getMessage:'I should be observable'>
34  </foo:'I should be observable'>
35  <foo>
36    <getMessage>
37    </getMessage:'I should be observable'>
38  </foo:'I should be observable'>
39Done
40</file '%s%eobserver_retval_%d.php'>
41