Skip to content

Instantly share code, notes, and snippets.

@zulus
Created June 30, 2015 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zulus/c9e89446fb496475e112 to your computer and use it in GitHub Desktop.
Save zulus/c9e89446fb496475e112 to your computer and use it in GitHub Desktop.
Bug 459420 - [PHP5.6] Error displayed when using constant array
<?php
const foo = ["2"];
const item = foo[call()]; // incorrect like in php
const el = foo[2]; // incorrect, should be valid
class foo {
const item = foo[0]; // should be valid
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment