View Full Version : & sign
sabret00the
11-28-2005, 05:55 PM
what does it mean in php?
sometimes i see $var =& $data;
but i've never seen the explaination for it.
i've seen the likes of && and || but not a & on it's own.
filburt1
11-29-2005, 01:14 AM
Reference equals. Essentially, modifying $var also modifies $data and vice versa. Saves memory.
& is also bitwise and.
sabret00the
11-29-2005, 08:23 AM
thanks for the education filburt :)
Marco van Herwaarden
11-29-2005, 11:22 AM
It means 'address of'. Instead of one time copying the content of $data to $var, it sets $var to be a pointer to $data.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.