noverify icon indicating copy to clipboard operation
noverify copied to clipboard

Incorrect work with constants containing arrays.

Open i582 opened this issue 3 years ago • 0 comments

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 avatar Mar 03 '21 14:03 i582