简体   繁体   中英

double $ statement in php

double $语句在PHP中代表什么?

It means a variable variable :

$a = 'b';
$b = 'test';
print $$a; // test

For the most part (although there are exceptions if you know what you're doing) they are bad practice and whenever you see someone using them arrays are probably the better idea.

It means "The author should be using an associative array".

(It is a variable variable )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM