Home  >  Article  >  Backend Development  >  The meaning of & in php

The meaning of & in php

Guanhui
GuanhuiOriginal
2020-05-09 17:08:524392browse

The meaning of & in php

The meaning of & in php

Different names access the same variable content, that is, two variables point to the same content. When one of the variables changes, the contents of the memory are changed, and the value of the other variable is also changed, similar to the pointer in C.

PHP official introduction

PHP supports reference assignment, using the "$var = &$othervar;" syntax. Assignment by reference means that both variables point to the same data, nothing is copied.



## Recommended tutorial: "

PHP Tutorial"

The above is the detailed content of The meaning of & in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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