NYCPHP Meetup

NYPHP.org

[nycphp-talk] I need a very elementary-school explanation of '&'

Phil Powell phillip.powell at adnet-sys.com
Thu Feb 19 15:55:16 EST 2004


$obj =& new Object();
$result =& $obj->getResult();

as opposed to

$obj =& new Object();
$result = $obj->getResult();

Could someone please explain this to me in a very, VERY simple 
not-had-my-beer-yet way?  Readings at www.zend.com and www.php.net were 
fruitless, they might as well have been in Hungarian.  Sorry but this is 
a serious hindrance in my further PHP development because I always 
thought that by doing this you are saving memory:

$result =& $obj->getResult();

That means $result points the same value in memory as $obj->getResult(); 
thereby saving memory allocation and performance.  How off is that?

Thanx
Phil

-- 
Phil Powell
Web Developer
  ADNET Systems, Inc.
  11260 Roger Bacon Drive, Suite 403
  Reston, VA  20190-5203
Phone: (703) 709-7218 x107   Cell: (571) 437-4430   FAX: (703) 709-7219
EMail:  Phillip.Powell at adnet-sys.com      AOL IM: SOA Dude







More information about the talk mailing list