mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
ceae9fb540
The previous fix missed the "late" part of "late static binding" :)
22 lines
326 B
PHP
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"
|