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

Incorrect work with constants containing arrays. #944

Open
i582 opened this issue Mar 3, 2021 · 0 comments
Open

Incorrect work with constants containing arrays. #944

i582 opened this issue Mar 3, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@i582
Copy link
Contributor

i582 commented Mar 3, 2021

Code Example

<?php

class Foo {
    const A = [];
    const B = [];

    const C = self::A + self::B;
}

function f() {
    Foo::C[0]; // Foo::C is a float type
}

Actual Behavior

Foo::C is a float type.

Expected Behavior

Foo::C is an array type.

@i582 i582 added the bug Something isn't working label Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant