closure->func = *func;
closure->func.common.prototype = NULL;
+ closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
if ((scope == NULL) && (this_ptr != NULL)) {
/* use dummy scope if we're binding an object without specifying a scope */
--- /dev/null
+--TEST--
+Bug #67068 (ReflectionFunction::getClosure returns something that doesn't report as a closure)
+--FILE--
+<?php
+class MyClass {
+ public function method() {}
+}
+
+$object = new MyClass;
+$reflector = new \ReflectionMethod($object, 'method');
+$closure = $reflector->getClosure($object);
+
+$closureReflector = new \ReflectionFunction($closure);
+
+var_dump($closureReflector->isClosure());
+?>
+--EXPECT--
+bool(true)
\ No newline at end of file