NYCPHP Meetup

NYPHP.org

[nycphp-talk] Optimal Object, property, variable passing strategy between classes

Leila Lappin damovand at yahoo.com
Thu Jul 14 22:20:20 EDT 2005



--- Cliff Hirsch <cliff at pinestream.com> wrote:

> Sounds like passing arguments is the best way, or if
> speed is really a
> concern, passing by reference while being really
> careful.
> 
> -----Original Message-----
> From: talk-bounces at lists.nyphp.org
> [mailto:talk-bounces at lists.nyphp.org]
> On Behalf Of csnyder
> Sent: Thursday, July 14, 2005 3:05 PM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] Optimal Object,
> property,variable passing
> strategy between classes
> 
> 
> On 7/14/05, Leila Lappin <damovand at yahoo.com> wrote:
> > In C++ we used be able to declare a
> > parameter as constant and prevent it from being
> > modified.  I'm not sure if
> > 'const'ness is possible in PHP.
> 
> Oh yeah, check out define().
> 
> define( 'WEB_ROOT', '/var/www/html' );
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
> 
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
> 

Hi,

I meant declaring parameters as constants like this,

void foo( const string & var) { 
     // do something with var
}



		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 



More information about the talk mailing list