[TYPO3-core] optional array arguments

Martin Kutschker Martin.Kutschker at blackbox.net
Wed Apr 26 13:42:49 CEST 2006


Hi!

Dmitry and I have changed the signature of getURL, so that it takes a third argument which is an array and optional.

I wrote:

function getURL($url, $includeHeader = 0, $requestHeaders = '')

Dmitry wrote:

function getURL($url, $includeHeader = 0, $requestHeaders = false)

I don't like my version, but IMHO it's the way TYPO3 uses "undefined" arrays (there are lots of $arrayVar = '' pseudo-declarations all over the place). But I don't like Dmitry's version either.

Coming from a C background I prefer "$var = NULL;" for such uses.

Any opinions?

Masi 



More information about the TYPO3-team-core mailing list