I got really confused with static and non-static functions and class properties when I was trying to run my website.
Can someone explain whether it is better to have the whole website written using Static functions rather than using the non-static methods?
I can’t find much of this on google.
If your method needs access to data in “this->”, then you have to make it a non-static method. Then the object needs to be instantiated (via “new”).
If all your method uses is data contained in function parameters, then consider making your method static. Or create a separate class with static methods only.