<?php const FOO = 1;$a = [FOO => 'A', 'BAR' => 'B'];echo "{$a[FOO]}, {$a[BAR]}";
Standard input is empty
A, B
PHP Notice: Use of undefined constant BAR - assumed 'BAR' in /home/U66H9N/prog.php on line 5
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!