0

When setting up a custom library in Zend Framework what is the difference between autoloadernamepaces[] = "foo" and autoloadernamespaces.foo = "foo"?

Piotr
  • 5,543
  • 1
  • 31
  • 37
user1347693
  • 15
  • 2
  • 3
  • 7

1 Answers1

2

What you'll get in the config in the end is basically an array. One has a numerical index while the other has the provided key

autoloadernamespaces[] = "foo" 
// results into this
array(0 => "foo");

autoloadernamespaces.foo = "foo"
array("foo" => "foo");

The advantage with the latter would be that you can always address it with a name. This might be not needed with autoloader namespaces but for other configurations this could be a life saver.

Adrian World
  • 3,118
  • 2
  • 16
  • 25