Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Why doesn't Smarty pass the params by reference?

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
Rival7
Smarty n00b


Joined: 17 Feb 2004
Posts: 2

PostPosted: Tue Feb 17, 2004 4:05 pm    Post subject: Why doesn't Smarty pass the params by reference? Reply with quote

I use the Smarty html_options function to build some rather large menu selections (2MB+) for a reporting system. Is there a reason why Smarty doesn't pass the $params by reference? This could surely speed some things up. Comments?

function smarty_function_html_options($params, &$smarty)
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7365
Location: Lincoln Nebraska, USA

PostPosted: Tue Feb 17, 2004 5:45 pm    Post subject: Reply with quote

Only objects need to be passed by ref explicitly, PHP handles the $params value as a reference unless you alter it.
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Tue Feb 17, 2004 5:50 pm    Post subject: Reply with quote

hmmm. I was under the impression that large arrays benefited from explicit by-ref as well, but I may be mis-remembering.
Back to top
View user's profile Send private message
Rival7
Smarty n00b


Joined: 17 Feb 2004
Posts: 2

PostPosted: Mon Feb 23, 2004 6:08 pm    Post subject: Reply with quote

Can someone confirm is the this correct? Any documentation out there? Or is this a Zend optimizer feature?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP