source: src/router/php7/Zend/tests/closures/closure_from_callable_lsb.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 326 bytes
Line 
1--TEST--
2Testing Closure::fromCallable() functionality: Late static binding
3--FILE--
4<?php
5
6class A {
7    public static function test() {
8        var_dump(static::class);
9    }
10}
11
12class B extends A {
13}
14
15Closure::fromCallable(['A', 'test'])();
16Closure::fromCallable(['B', 'test'])();
17
18?>
19--EXPECT--
20string(1) "A"
21string(1) "B"
Note: See TracBrowser for help on using the repository browser.