--- /dev/null
+--TEST--
+Testing Closure::fromCallable() functionality: Late static binding
+--FILE--
+<?php
+
+class Foo {
+ const BAR = 1;
+ public static function method() {
+ return static::BAR;
+ }
+}
+var_dump(Closure::fromCallable(['Foo', 'method'])());
+
+?>
+--EXPECT--
+int(1)
ZVAL_OBJ(&instance, fcc.object);
zend_create_fake_closure(return_value, mptr, mptr->common.scope, fcc.object->ce, &instance);
} else {
- zend_create_fake_closure(return_value, mptr, mptr->common.scope, NULL, NULL);
+ zend_create_fake_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
}
return SUCCESS;