Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58971 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81234 invoked from network); 15 Mar 2012 19:14:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2012 19:14:24 -0000 Authentication-Results: pb1.pair.com header.from=h.reindl@thelounge.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=h.reindl@thelounge.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thelounge.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: h.reindl@thelounge.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:32891] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/3E-16214-F8F326F4 for ; Thu, 15 Mar 2012 14:14:24 -0500 Received: from srv-rhsoft.rhsoft.net (openvpn-rh.thelounge.net [10.0.0.241]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.thelounge.net (Postfix) with ESMTPSA id BEA8B9A for ; Thu, 15 Mar 2012 20:14:20 +0100 (CET) Message-ID: <4F623F8C.5070209@thelounge.net> Date: Thu, 15 Mar 2012 20:14:20 +0100 Organization: the lounge interactive design User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120314 Thunderbird/11.0 MIME-Version: 1.0 To: internals@lists.php.net References: <4F623BD1.4080009@thelounge.net> In-Reply-To: X-Enigmail-Version: 1.4 OpenPGP: id=7F780279; url=http://arrakis.thelounge.net/gpg/h.reindl_thelounge.net.pub.txt Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig25C080F730BBF32B059C476E" Subject: Re: [PHP-DEV] Small question about performance From: h.reindl@thelounge.net (Reindl Harald) --------------enig25C080F730BBF32B059C476E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable thanks exactly what i assumed, but better to be sure instead wasting somewhere ressources without need :-) Am 15.03.2012 20:10, schrieb Michael Stowe: > The $b on this example would be freed as it is in the function's scope,= and > not the global scope. The exception to this would be a static variable= > within a function, which would persist for future use within the functi= on. >=20 > Class properties on the other hand will persist until the object is > destructed, or until they are unset. >=20 > So for your example, > function test() { > $b =3D 'apple'; > return $b; > } >=20 > You would not need to unset $b as it resides temporarily within the > function, and does not persist outside of the function. --------------enig25C080F730BBF32B059C476E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9iP4wACgkQhmBjz394AnmxjQCgglxRXuxBrPEbNkOS/XMeCKOS wlMAn0avFj4KIKN2lVDsDCUXyQQxVUBl =oKKw -----END PGP SIGNATURE----- --------------enig25C080F730BBF32B059C476E--