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

Home » Imported messages » comp.lang.php » calling a value into another php script...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: calling a value into another php script... [message #182704 is a reply to message #182703] Fri, 30 August 2013 14:30 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Fri, 30 Aug 2013 08:49:14 -0400, Jerry Stuckle wrote:

> On 8/30/2013 5:57 AM, Thomas 'The PointedEars Twat' Lahn wrote:

>> Like actually recommending to *disable* output buffering on a
>> production site, when having output buffering *enabled* is *the*
>> *proven*, simple measure to make a PHP-powered site faster, thus more
>> user-friendly.

The only benefit I've ever seen from PHP output buffering is it allows
you to output a page and then change the headers at the end if for some
reason you have a need to ... as long as the buffer was big enough to
hold the whole page, otherwise you're fucked anyway, which is probably
why sensible coders always make sure they send all the headers *before*
sending the output.

Anyway, as you say, the browser is probably buffering the page,
especially if it's using compression, so all that buffering in php will
do is increase the memory footprint of the process.

This may in some cases mean that the output is "buffered" in the script,
by which I mean you build the output as a variable, or possibly a
collection of variables and an:

echo <<< EOT

.......

EOT;

where you insert those variables into the output, but IME it is better to
make sure that you get the whole headers before data thing right, rather
than rely on buffering and the "I wonder if tweaking this parameter will
reduce my memory footprint" whims of a future site administrator to do it
for you.

Especially as the future site admin is probably going to be a new hire
they recruited in a panic when the old unix admin retired, is probably
fresh out of college, and has no idea about real world IT.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[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
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: PHP wirdwrap()
Next Topic: str_replace & assign to a var?
Goto Forum:
  

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

Current Time: Sun Dec 01 04:49:31 GMT 2024

Total time taken to generate the page: 0.04209 seconds