I just ran across a template that had an interesting typo. Here is an example.
component {
{
public function hello() {
return "Hello";
}
}
}
See it? The function is surrounded by an extra pair of brackets. ColdFusion just hoists it up just like JavaScript, so I shouldn't be surprised, but wow did that freak me out a bit.
Then for the hell of it I went crazy - and yes - it still works.
component {
{
{
{
{
{
public function hello() {
return "Hello";
}
}
}
}
}
}
}
Anyway... yeah... don't do this. ;)