php-src/Zend/tests/closures/closure_from_callable_lsb.phpt
Nikita Popov ceae9fb540 Closure::fromCallable(): Better LSB handling
The previous fix missed the "late" part of "late static binding" :)
2016-07-05 15:44:17 +02:00

22 lines
326 B
PHP

--TEST--
Testing Closure::fromCallable() functionality: Late static binding
--FILE--
<?php
class A {
public static function test() {
var_dump(static::class);
}
}
class B extends A {
}
Closure::fromCallable(['A', 'test'])();
Closure::fromCallable(['B', 'test'])();
?>
--EXPECT--
string(1) "A"
string(1) "B"