1--TEST-- 2Observer: Observability of fake closures 3--EXTENSIONS-- 4zend_test 5--INI-- 6zend_test.observer.enabled=1 7zend_test.observer.show_output=1 8zend_test.observer.observe_all=1 9--FILE-- 10<?php 11class Foo 12{ 13 public function bar() 14 { 15 echo 'Called as fake closure.' . PHP_EOL; 16 } 17} 18 19$callable = [new Foo(), 'bar']; 20$closure = \Closure::fromCallable($callable); 21$closure(); 22 23echo 'DONE' . PHP_EOL; 24?> 25--EXPECTF-- 26<!-- init '%s' --> 27<file '%s'> 28 <!-- init Closure::fromCallable() --> 29 <Closure::fromCallable> 30 </Closure::fromCallable> 31 <!-- init Foo::bar() --> 32 <Foo::bar> 33Called as fake closure. 34 </Foo::bar> 35DONE 36</file '%s'> 37