The advantage of this is that only classes that you want to instantiate & use will be included in your page and will keep memory usage down. Object oriented programming is an amazing feature and is definitely something that you should use, whether exploiting extensions and magic methods or not.Also, if you try to use a set or get on a variable that you don't have access to, ie: accessing a private variable outside the object, it will call the overloading methods.These two do the same thing, except that one is for static methods, and the other not.
There are 4 that I'll run through, and they're all very similar they are . If we try to set or get a variable that doesn't exist, inherently PHP will throw an error, here we can gracefully handle that by actually using a method to handle that.This is very useful if - as with active record methodology - variabes are stored within an array called array.Men and women are pretty similar - a lot more similar than people think, but there are some crucial differences.Some of the shared attributes are things like eye colour, hair colour, height and weight.
Working with classes in PHP is a great way to streamline your code, and make it awesome.
Classes or object oriented (OO) programming are sometimes seen as behemoths of satan, but actually they're easy.