Would it be correct to say that a PHP object is both a class and any instance it has?

Please allow me a non-coding, more of a terminology question.

Would it be correct to say that a PHP object is both a class and any instance it has?

For example, a class which doesn’t have any instance — is only a class, but a class which does have at least one instance — both that class and its at least one instance should be defined as “an object”.

First, you have a class definition. Each instance of a class (definition) is an Object.

So why do we need the term object at all? If a class’s instance is the object…

In the same way a house is also a blueprint.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.