Variables / Memory Allocation
| From: | Adam Voigt | Date: | Tue, 04 Mar 2003 15:39:21 +0000 |
| Subject: | Variables / Memory Allocation | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-138118@lists.php.net to get a copy of this message | ||
Ok, first, is there any difference in respect to memory or CPU speed
between defining a variable with define() and addressing it without a $,
and simply using $var = "whatever".
Second, putting good programming practices aside, what is the cost
in CPU speed for unsetting a variable after it's done being used, and
is it even worth doing so for those few extra bytes free'd, if PHP will
undefine
it anyway when execution ends?
--
Adam Voigt (adam@cryptocomm.com)
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc