[TYPO3-core] RFC: #6829 - New general template-class usable for FE+BE
Dmitry Dulepov [typo3]
dmitry at typo3.org
Mon Nov 26 10:09:56 CET 2007
Hi!
Steffen Kamper wrote:
> What is the advantange against the usage of
> (array) $foo
> ?
If parameter is mixed, than you cannot use "array" hint or PHP will shout at runtime. I.e.:
function foo(array $bar) {
if (!is_array($bar)) {
$bar = array($bar);
}
return $bar;
}
foo(1); // <-- run-time error here!
--
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
More information about the TYPO3-team-core
mailing list