Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Late static binding #2324

Open
BeMySlaveDarlin opened this issue Nov 9, 2021 · 0 comments
Open

Late static binding #2324

BeMySlaveDarlin opened this issue Nov 9, 2021 · 0 comments
Labels

Comments

@BeMySlaveDarlin
Copy link

BeMySlaveDarlin commented Nov 9, 2021

Hi,
Seems construction new static(); inside classes doesn't works.

To check

class Foo {
    public static function baz()
    {
        let obj = new static();

        return get_class(obj);
    }
}

class Bar extends Foo {
}

echo Foo::baz(); //Must be Foo
echo Bar::baz(); //Must be Bar

Thanks.

@Jeckerson Jeckerson added the bug label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants