I've been checking the documentation about pitfalls.
It says that declaring a function inside a class might cause issues.
Code: Select all
class Util{
function Util::GetMsg(){
return "Test";
}
}
The documentation suggests declaring it next to the class like so:
Code: Select all
class Util{
}
function Util::GetMsg(){
return "Test";
}
Code: Select all
class Util{
function GetMsg(){
return "Test";
}
}
Thank you in advance.