Yes. In your second example, the PHP processor checks to see if the "table" is defined as a constant before changing it to an array key, so it does one more check than necessary. It can also be a problem.
Consider this:
const table = 'text';
$a = array( table => 'myTable', order => 'myOrder' );
$table = $a[table]
Now PHP interprets your array as $ a [text], which is not what you want.
source
share