The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.
One of a set of tools we're offering as a way of saying thank you for being a part of the community.
Note that there is a magic method __get() defined in the Person class. The magic method is called "magic" because it is invoked without being explicitly called in your code. The constructor __construct() is also a magic method, just like __toString() and __Destruct, etc.
In PHP the definition of overloading is different from most languages. Don't ask me why.
Open in new window
Now after you have run that script, remove the __get() magic method as shown below and run it again. You will get a fatal error. The __get() method is there to give you a way to prevent a fatal run-time error when you (or more likely another programmer) makes a mistake.Open in new window