You are here: Re: [PHP] using ($test)?$true:$false in a string « PHP « IT news, forums, messages
Re: [PHP] using ($test)?$true:$false in a string

Posted by Jochem Maas on 09/29/06 11:32

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 ;)

yes it is actually - everything is in the eye of the beholder.
it just so happens that we often have consensus ;-)

with regard to the bulldozer metaphor - true that using sprintf() is
such a simple case may be excessive BUT I was merely introducing the OP to
something new (possibly) - anyone asking such 'simple' questions is
not at a stage that this kind of efficiency is an issue (i.e. give
them 'whats possible' before telling them 'whats best')

the sprintf() example leaves lots of room for creativity and
code reuse (even by relative newcomers) or aleast the possiblity of
writing more managable code.... Chris Boget liked it anyway :-)


PS - Robert Cummings, I totally agree with your general comments on
internals@ regarding migration/irritation/etc btw. and if I didn't
spend so much time on 'fixing' my working code I might have had time
to take a proper look at your InterJinn project - more's the pity
that I haven't been able to so far :-/

>
>
> 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.
>

 

Navigation:

[Reply to this 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

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