<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Using an output callback and ob_gzhandler together</title>
	<link>http://www.phpit.net/blog/using-an-output-callback-and-ob_gzhandler-together/</link>
	<description>PHPit has dozens of PHP articles, codesnippets and FAQ's.</description>
	<pubDate>Fri, 16 May 2008 05:45:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>

	<item>
		<title>by: Arnold Daniels</title>
		<link>http://www.phpit.net/blog/using-an-output-callback-and-ob_gzhandler-together/#comment-1088</link>
		<pubDate>Tue, 11 Apr 2006 11:26:01 +0000</pubDate>
		<guid>http://www.phpit.net/blog/using-an-output-callback-and-ob_gzhandler-together/#comment-1088</guid>
					<description>Yes you might do that, though this is not a logical thing to do. What actualy happends is:
  1.) The outputbuffer 'My name is Dennis  Pallett' is zipped by the ob_gzhandler.
  2.) The zipped buffer is send down to the next callback 'mycallback'
  3.) Function 'mycallback' unzipps the buffer
  4.) Function 'mycallback' replaces 'Dennis Pallett'
  5.) Function 'mycallback' rezipps the buffer

The callbacks are called as 'last in, first out'. You could simply change the order of the callbacks to get the expected result.

</description>
		<content:encoded><![CDATA[<p>Yes you might do that, though this is not a logical thing to do. What actualy happends is:<br />
  1.) The outputbuffer &#8216;My name is Dennis  Pallett&#8217; is zipped by the ob_gzhandler.<br />
  2.) The zipped buffer is send down to the next callback &#8216;mycallback&#8217;<br />
  3.) Function &#8216;mycallback&#8217; unzipps the buffer<br />
  4.) Function &#8216;mycallback&#8217; replaces &#8216;Dennis Pallett&#8217;<br />
  5.) Function &#8216;mycallback&#8217; rezipps the buffer</p>
<p>The callbacks are called as &#8216;last in, first out&#8217;. You could simply change the order of the callbacks to get the expected result.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
