The meaning of & in php

Guanhui
Release: 2023-03-01 06:58:01
Original
4409 people have browsed it

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!

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