Reply to Re: [PHP] using ($test)?$true:$false in a string

Your name:

Reply:


Posted by Robert Cummings on 09/29/24 11:33

On Mon, 2005-11-21 at 10:31, Richard Heyes wrote:
> Robert Cummings wrote:
> > On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:
> >
> >>Readability is in the eye of the beholder.
> >
> >
> > But efficiency isn't ;)
>
> Try measuring the difference between the various methods over a
> realistic number of iterations, eg. 100. There's little point in going
> through ones code trying to "optimise" these things. Sure you might gain
> a millisecond here or there, but so what? You'd have to have a
> *seriously* busy site for that to make a difference.

I won't disagree, but I'd say being in the habit of writing semi-optimal
code in the fist place, will save you needing to learn new habits later
when you do work on a *seriously* busy site :) I didn't argue for ''
versus "", but sprintf() is a cycle pig in comparison to either. not
only that, but since it's not a keyword, it incurs stack overhead.

Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация