Home > Backend Development > PHP Tutorial > What is called the calling party?

What is called the calling party?

WBOY
Release: 2016-08-04 09:19:02
Original
981 people have browsed it

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?

Reply content:

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?

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template