FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Using a single php entry file for a whole site.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Using a single php entry file for a whole site. [message #181878 is a reply to message #181876] Thu, 20 June 2013 22:50 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
Am 21.06.2013 00:33, schrieb Marc van Lieshout:
> Why is using ob_start() poor programming?
> The pair ob_start/ob_get_clean captures the contents of the page in the
> $contents variable.

This discussion may well end in a flame war. What is faster: echoing
with output buffering vs. concatening strings with the dot operator?

ISTM all depends on the implementation. AFAIK string concatenation is a
very cheap operation in Python, for instance, as the string is not
actually built (merely a "pseudo" string containing links to the
concatenated strings). In other languages such as PHP, the characters
have to be copied over to a new string, AFAIK. This probably makes
output buffering faster, but the performance difference may be
neglectable for typical cases. And one never knows, if the
implementation might change in the future.

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Updating old PHP code
Next Topic: Komodo Edit
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 04:05:48 GMT 2024

Total time taken to generate the page: 0.04770 seconds