Date: 03/22/00
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: ssilk: "[PHPLIB-DEV] cvs commit"
- Next in thread: Alexander Aulbach: "Re: [PHPLIB-DEV] efficiency of table class"
- Reply: Alexander Aulbach: "Re: [PHPLIB-DEV] efficiency of table class"
- Maybe reply: Spruce Weber: "Re: [PHPLIB-DEV] efficiency of table class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Please respond to my email address, as I'm currently not subscribed to
phplib-dev.
Correct me if I'm wrong, but aren't PHP function parameters passed by value
by default? If such is the case, then every member function in the table
class that takes a DB object or array as a parameter is creating a copy of
that object and then discarding it as soon as it exits that function's
scope. With large arrays or db results, the overhead is tremendous.
If a function doesn't modify an object or array passed to it, then it should
be safe to pass a reference to it rather than a copy of the object...
function verify_db(&$db){}
Can anyone tell me why this would or would not be a good idea?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: ssilk: "[PHPLIB-DEV] cvs commit"
- Next in thread: Alexander Aulbach: "Re: [PHPLIB-DEV] efficiency of table class"
- Reply: Alexander Aulbach: "Re: [PHPLIB-DEV] efficiency of table class"
- Maybe reply: Spruce Weber: "Re: [PHPLIB-DEV] efficiency of table class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

