I have a class called Setup with some static methods. But I'm having trouble understanding something that happens.
I use the methods of the class as follows: Setup::$getMetodoX
so far so good. But for ease of use and not having to include the class on multiple pages, I make an include of that class in my HEAD
.
But when I look at head
I noticed the following line of code: $setup = new Setup();
. So I decided to remove this line, since I know that a class of static methods should not receive an instantiation through new
of PHP.
But to my surprise. Removing this line my system loses its style (css). However, this $setup
variable that instantiates my class is not used anywhere in my project.
So, I would like to understand if this new
of PHP has any other function besides instantiating a class?