<?php declare(strict_types=1);
// strict types are enabled, all three examples should emit wrong key type exception
['1' => true];
$a = '1';
[$a => true];
[1 => true][$a];
// ie. emit type exception when the key type is different than it will be, ie. int for numeric input, otherwise string
Warning: Unsupported declare 'strict_types' in /in/epv5s on line 1
Output for 5.4.0 - 5.4.45
Warning: Unsupported declare 'strict_types' in /in/epv5s on line 1
Parse error: syntax error, unexpected '[' in /in/epv5s on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Warning: Unsupported declare 'strict_types' in /in/epv5s on line 1
Parse error: syntax error, unexpected '[' in /in/epv5s on line 4
Process exited with code 255.