Thank you. Maybe related:
<?php
declare(strict_types=1);
const c = ['foo' => true];
echo c['bar'];
echo c['FOO'];
$a = ['foo' => true];
echo $a['bar'];
echo $bar;
Single Problem (which disappears without declare(strict_types=1);
) has unexpected message:
[{
"resource": "....php",
"owner": "_generated_diagnostic_collection_name_#7",
"code": "PHP0406",
"severity": 4,
"message": "Argument '1' passed to echo() is expected to be of type string, bool given",
"source": "PHP",
"startLineNumber": 9,
"startColumn": 6,
"endLineNumber": 8,
"endColumn": 15
}]
"bool given" is not true.
Expecing problem at line 5 and 6, accessing const[undefined].
Expecting problem at line 6, undefined $bar.