1--TEST--
2Observer: Retvals are observable that are: refcounted, IS_CV
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
12class MyRetval {}
13
14function foo() {
15    $retval = new MyRetval(); // Refcounted
16    return $retval; // IS_CV
17}
18
19$res = foo(); // Retval used
20foo(); // Retval unused
21
22echo 'Done' . PHP_EOL;
23?>
24--EXPECTF--
25<!-- init '%s%eobserver_retval_%d.php' -->
26<file '%s%eobserver_retval_%d.php'>
27  <!-- init foo() -->
28  <foo>
29  </foo:object(MyRetval)#%d>
30  <foo>
31  </foo:object(MyRetval)#%d>
32Done
33</file '%s%eobserver_retval_%d.php'>
34