Home > Backend Development > PHP Tutorial > A brief introduction to php's this and self

A brief introduction to php's this and self

小云云
Release: 2023-03-20 20:18:01
Original
1596 people have browsed it

This is a very important part in js. This article mainly shares with you a brief introduction to this and self in php. I hope it can help you.

static  $t_follow = 'df_shop_follow';
Copy after login
  • this can only refer to external public, and internal public variables

$this->t_follow
Copy after login
  • self can only access the current The static variable of the page

self::$t_channel
Copy after login
  • this has greater access rights than self

Related recommendations:

Four types of this value modes in JS

Different ways of function calling and detailed explanation of this pointing

this in js Detailed explanation of object usage examples

The above is the detailed content of A brief introduction to php's this and self. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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