Home > Article > Backend Development > What is called the calling party?
When I was reading the PHP Manual, I saw the section Attributes in Classes and Objects, which said:
When a method is called inside a class definition, there is a pseudo variable $this available. $this is a reference to the calling object (usually the object the method belongs to, but possibly another object if called statically from a second object).
After searching on the Internet, I still understand $this quite well, but I still don’t understand the calling object very well. Could you please explain it in a simple and easy-to-understand description?
When I was reading the PHP Manual, I saw the section Attributes in Classes and Objects, which said:
When a method is called inside a class definition, there is a pseudo variable $this available. $this is a reference to the calling object (usually the object the method belongs to, but possibly another object if called statically from a second object).
After searching on the Internet, I still understand $this quite well, but I still don’t understand the calling object very well. Could you please explain it in a simple and easy-to-understand description?