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%eobserver_closure_%d.php' -->
27<file '%s%eobserver_closure_%d.php'>
28  <!-- init Foo::bar() -->
29  <Foo::bar>
30Called as fake closure.
31  </Foo::bar>
32DONE
33</file '%s%eobserver_closure_%d.php'>
34