1--TEST-- 2Observer: Retvals by reference are observable that are: 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 12function &foo() { 13 $retval = 'I should be observable'; 14 return $retval; // IS_CV 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 </foo:'I should be observable'> 28 <foo> 29 </foo:'I should be observable'> 30Done 31</file '%s%eobserver_retval_by_ref_%d.php'> 32