1--TEST-- 2Observer: Ensure opline exists on the execute_data 3--SKIPIF-- 4<?php if (!extension_loaded('zend-test')) die('skip: zend-test extension required'); ?> 5--INI-- 6zend_test.observer.enabled=1 7zend_test.observer.observe_all=1 8zend_test.observer.show_opcode=1 9--FILE-- 10<?php 11function foo() 12{ 13 echo 'Foo' . PHP_EOL; 14} 15 16foo(); 17include __DIR__ . '/observer.inc'; 18echo array_sum([1,2,3]) . PHP_EOL; 19foo(); 20?> 21--EXPECTF-- 22<!-- init '%s%eobserver_opline_%d.php' --> 23<!-- opcode: 'ZEND_INIT_FCALL' --> 24<file '%s%eobserver_opline_%d.php'> 25 <!-- opcode: 'ZEND_INIT_FCALL' --> 26 <!-- init foo() --> 27 <!-- opcode: 'ZEND_ECHO' --> 28 <foo> 29 <!-- opcode: 'ZEND_ECHO' --> 30Foo 31 <!-- opcode: 'ZEND_RETURN' --> 32 </foo> 33 <!-- init '%s%eobserver.inc' --> 34 <!-- opcode: 'ZEND_INIT_FCALL' --> 35 <file '%s%eobserver.inc'> 36 <!-- opcode: 'ZEND_INIT_FCALL' --> 37 <!-- init foo_observer_test() --> 38 <!-- opcode: 'ZEND_ECHO' --> 39 <foo_observer_test> 40 <!-- opcode: 'ZEND_ECHO' --> 41foo_observer_test 42 <!-- opcode: 'ZEND_RETURN' --> 43 </foo_observer_test> 44 <!-- opcode: 'ZEND_RETURN' --> 45 </file '%s%eobserver.inc'> 466 47 <foo> 48 <!-- opcode: 'ZEND_ECHO' --> 49Foo 50 <!-- opcode: 'ZEND_RETURN' --> 51 </foo> 52 <!-- opcode: 'ZEND_RETURN' --> 53</file '%s%eobserver_opline_%d.php'> 54