[PHP-DOC] Re: [PHP-DEV] new manual chapter suggestion From: Ramsi Sras (sras <email protected>)
Date: 07/30/01

UNSUBSCRIBE ME PLEASE!!!!!!!!!!!!!!

Alexander Merz schrieb:

> > - use echo "aaa" , "bbb", "ccc" instead of echo "aaa" . "bbb" . "ccc"
> > because with the later you use more memory [Jim]
> > - echo is a little bit faster then print [Rasmus]
> > This would make a new chapter, with some nifty tips
> > about how you can improve the performance of your
> > programs.
> Handle some 'hints' with care. This is typical "assembler thinking", where you
> had a list of the executions time of every command next to the keyboard. PHP is
> a high-level interpreter language and the runtime of a command depends not of
> the architecture of the processor. The speed or memory usage of a functions
> depends on the implementation, which can differs from version to version.
>
> echo "aaa", "bbb" saves at the moment memory, but can you guarantee, that it
> saves memory in 4.1?
>
> Such a chapter would brings beginner to look for time and memory saving
> functions, instead of thinking about the best implementation of a algorithm,
> which could better improve the performance then a bad implemention 'tuned' with
> some nifty tips, independend of the used PHP-version.
>
> I see some sources, where beginners used twenty str_replace's instead of one
> preg_replace, because somebody said to them str_replace is faster then
> preg_replace...
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
> For additional commands, e-mail: php-dev-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>