<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 18 Jun 2013 19:23:21 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPBuilder.com: Six Cool PHP Tricks You May Not Know]]></title>
      <guid>http://www.phpdeveloper.org/news/14398</guid>
      <link>http://www.phpdeveloper.org/news/14398</link>
      <description><![CDATA[<p>
On PHPBuilder.com there's a new article with a few things - <a href="http://www.phpbuilder.com/columns/chrisroane042210.php3">six things, to be exact</a> - that you might not know about the PHP language as written up by <i>Chris Roane</i>.
</p>
<blockquote>
Over the years I've come across some useful tricks in PHP that are not obvious, but are worth mentioning. This is not meant to be a comprehensive list of all the useful tricks that you can do with PHP.
</blockquote>
<p>The list of six includes:</p>
<ul>
<li>Count Characters in a String
<li>Use Single Quotes When Possible
<li>Use Arrays in Form Fields
<li>PHP Output Buffering
</ul>]]></description>
      <pubDate>Fri, 23 Apr 2010 08:44:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Using Timers to Benchmark PHP Applications]]></title>
      <guid>http://www.phpdeveloper.org/news/10082</guid>
      <link>http://www.phpdeveloper.org/news/10082</link>
      <description><![CDATA[<p>
DevShed has posted the <a href="http://www.devshed.com/c/a/PHP/Using-Timers-to-Benchmark-PHP-Applications/">second article</a> in their series looking at benchmarking your PHP scripts. This time they look at the use of "timers" to check on script execution length.
</p>
<blockquote>
Since you already know how to create timer functions and classes, in this tutorial, I'll create some concrete examples that show where these timing mechanisms can be applied in order to evaluate the performance of certain PHP applications.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Using-Timers-to-Benchmark-PHP-Applications/1/">create a few classes</a> that connect to a database and pull out rows (handing it off to a Result class). They use these classes in two examples - one with compression (output buffering) and one without using their Timer class to evaluate the differences.
</p>]]></description>
      <pubDate>Wed, 30 Apr 2008 14:31:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Arnold Daniels' Blog: How I PHP: The Output Handler]]></title>
      <guid>http://www.phpdeveloper.org/news/9062</guid>
      <link>http://www.phpdeveloper.org/news/9062</link>
      <description><![CDATA[<p>
<i>Arnold Daniels</i> has a <a href="http://blog.adaniels.nl/?p=59">quick little tutorial</a> posted to his blog about using the output handler in PHP (one of what he considers a technique that's "missing out" from normal PHP use). His example involves buffering the common page parts - like a template.
</p>
<blockquote>
A website usually has a part which is common across all pages, containing the HTML header, the menu and those kinds of things. This is often solved in one of four ways. [...] All of these methods work, however there is a better way to solve this. You guessed it, by using an output handler.
</blockquote>
<p>
He links to <a href="http://blog.adaniels.nl/wp-content/code/output_handler/beautysalon/">an example</a> he's created and includes the code for his OutputHandler class to make controlling the content easier.
</p>]]></description>
      <pubDate>Fri, 16 Nov 2007 11:17:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[LoopPo Blog: PDML PHP tricks]]></title>
      <guid>http://www.phpdeveloper.org/news/7367</guid>
      <link>http://www.phpdeveloper.org/news/7367</link>
      <description><![CDATA[<p>
A <a href="http://blogs.palgn.com.au/theloopphp/2007/03/01/pdml-php-tricks/">new post</a> on the LooPo blog points out a handy PHP library to make and work with PDF files in PHP - <a href="http://pdml.sourceforge.net/">Portable Document Markup Language (PDML)</a>.
</p>
<blockquote>
I was curious how this works, as it seemed pretty different from previous similar libraries (PDFLib, FPDF), that offered a programmatic API to generate PDF DOMs instead of a markup language.
</blockquote>
<p>
They <a href="http://blogs.palgn.com.au/theloopphp/">describe</a> how it works, what's included with the download and how it uses output buffering to get the job done as well as a few updates and further tips on its usage.
</p>]]></description>
      <pubDate>Thu, 01 Mar 2007 10:48:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Riff Blog: Console encoding in PHP-GTK apps]]></title>
      <guid>http://www.phpdeveloper.org/news/6738</guid>
      <link>http://www.phpdeveloper.org/news/6738</link>
      <description><![CDATA[<p>
PHP-GTKers working in English-related applications, don't have a problem with debugging messages output to a console when debugging, but applications on a more international front have issues with their output. But help has been found in <a href="http://blog.riff.org/2006_11_19_console_encoding_in_php_gtk_apps">this new post</a> on the Riff Blog - a method for correctly encoding PHP-GTK applications.
</p>
<blockquote>
<p>
PHP scripts are typically stored under UTF-8 encoding to limit i18n headaches, while the console in which their output will be displayed is normally configured to some regional encoding, like IBM850 in Windows/XP French.
</p>
<p>
So we need a workaround...
</p>
</blockquote>
<p>
He splits <a href="http://blog.riff.org/2006_11_19_console_encoding_in_php_gtk_apps">the process</a> out into a few steps, each with its own explanation and code:
<ul>
<li>Builtin tools
<li>Buffering
<li>Flushing
<li>PHP-GTK is not PHP for the Web
<li>Auto-flushing
</ul>
All wrapped up with a final solution - using the iconv functionality in combination with some output buffering to correctly display the message.
</p>]]></description>
      <pubDate>Mon, 20 Nov 2006 10:58:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ThinkingPHP: Issues with output buffering in CakePHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5803</guid>
      <link>http://www.phpdeveloper.org/news/5803</link>
      <description><![CDATA[<p>
If you're using the CakePHP framework and are having a problem with output buffering, <a href="http://www.thinkingphp.org/2006/07/16/issues-with-output-buffering-in-cakephp/">this quick tip</a> on the ThinkingPHP blog might work for you.
</p>
<blockquote>
<p>
Output buffering is a useful way to accomblish things in php like gzipping all html output and such. A while ago I wrote about it on this blog (see "A miracle called gzip") as well.
</p>
<p>
The reason I write about it again is, that I have discovered a little issue with it in CakePHP. 
</p>
</blockquote>
<p>
He <a href="http://www.thinkingphp.org/2006/07/16/issues-with-output-buffering-in-cakephp/">notes</a> that if you just use the ob_start with the gzip handler, debug issues arise. The soultion he's come up with, though, isn't quite as simple, but gets the job done in about ten lines and is easy to drop in anywhere.
</p>]]></description>
      <pubDate>Mon, 17 Jul 2006 06:13:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPit.net: Having fun with PHP's output buffer]]></title>
      <guid>http://www.phpdeveloper.org/news/5186</guid>
      <link>http://www.phpdeveloper.org/news/5186</link>
      <description><![CDATA[<p>
One of the more powerful and handy features that PHP offers is output buffering. It allows you more control over when the client's browser gets the information instead of just spewing information at random. It is a little tricky to get the hang of, so PHPit.net has put together <a href="http://www.phpit.net/article/output-buffer-fun-php/">this new tutorial</a> on how to get started.
</p>
<quote>
<i>
<p>
I'm sure most of us have come across the dreaded "Cannot modify header information - headers already sent", and this is usually caused when your script tries to send a header or set a cookie, when it's already sent output. The easiest fix is to make sure no output has been sent, but it's also possible to enable something called output buffering which also solves the problem.
</p>
<p>
In this article I'll first show you how output buffering works, and take you through most of its basic functions. After that we'll have a look at what's possible with output buffering, and show you some neat tricks.
</p>
</i>
</quote>
<p>
The <a href="http://www.phpit.net/article/output-buffer-fun-php/">groundwork</a> is laid first, giving a simple "Hello world" example to show how the code flows. They show how the buffering system works and how to use a callback function to modify the contents of the buffer before outputting (including a full replace function to text within the buffer from an array). They follow that with a look at creating your own HTML tags and using the gzip compression functionality to speed up your pages. 
</p>]]></description>
      <pubDate>Mon, 17 Apr 2006 07:13:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Justin Silverton's Blog: 10 PHP speed improvement tips for apache]]></title>
      <guid>http://www.phpdeveloper.org/news/5166</guid>
      <link>http://www.phpdeveloper.org/news/5166</link>
      <description><![CDATA[<p>
<i>Justin Silverton</i> shares withus today <a href="http://blinduser.blogspot.com/2006/04/10-php-speed-improvement-tips-for.html">ten easy tips</a> for speeding up your PHP applications with Apache.
</p>
<p>
The suggestions include things like:
<ul>
<li>Enabling compression of HTML with the output_handler settings in your php.ini
<li>Move from file-based sessions to shared memory sessions
<li>Use output buffering
<li>Don't use images when text will do
</ul>
</p>
<p>
Some of <a href="http://blinduser.blogspot.com/2006/04/10-php-speed-improvement-tips-for.html">the suggestions</a> are just general web development items (such as that last one), but some web developers out there need to be reminded of them. There are still too many image only sites out there...
</p>]]></description>
      <pubDate>Thu, 13 Apr 2006 06:47:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Using HTTP Compression in PHP - Make Your Web Pages Load Faster]]></title>
      <guid>http://www.phpdeveloper.org/news/5147</guid>
      <link>http://www.phpdeveloper.org/news/5147</link>
      <description><![CDATA[One of the holy grails of web development is to have your pages lost the fastest way possible. People spend hours optimizing images and condensing the amount of data they actually send over the wire to reach this goal. There are, however, other ways to achieve some of the same results, HTTP compression being one of them. For those that aren't familiar with the topic, DevShed has <a href="http://www.devshed.com/c/a/PHP/Using-HTTP-Compression-in-PHP-Make-Your-Web-Pages-Load-Faster/">this new article</a> to bright you up to speed.
<p>
<quote>
<i>
This article, the first of three parts, shows you how to make PHP pages load faster by showing you how to compress dynamic PHP pages. Techniques covered include using PHP's built-in "gzencode()" function, along with output buffering control functions.
<p>
Since PHP offers a powerful built-in library for handling HTTP compressed data, over this series I'll explain the basics of working with HTTP-compressed PHP pages. I'll illustrate, with several code samples, different methods for compressing dynamic PHP pages.
</i>
</quote>
<p>
They start with the basics, writing up a simple script to compress the output from a simple PHP file, one that displays records from a "users" database. With that foundation laid, they move on to the heavy stuff - using more than just simple output buffering to speed up those pages. Their <a href="http://www.devshed.com/c/a/PHP/Using-HTTP-Compression-in-PHP-Make-Your-Web-Pages-Load-Faster/2/">new example</a> makes use of the gzip functions in PHP to compress the data even further. A gzip header is passed off to the browser and it pulls it all neatly compressed over to open on the client-side.]]></description>
      <pubDate>Mon, 10 Apr 2006 15:26:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[O'Reilly: Autofilled PHP Forms]]></title>
      <guid>http://www.phpdeveloper.org/news/5007</guid>
      <link>http://www.phpdeveloper.org/news/5007</link>
      <description><![CDATA[The O'Reilly OnLamp.com site has <a href="http://www.onlamp.com/pub/a/php/2006/03/16/autofill-forms.html?CMP=OTC-6YE827253101&ATT=Autofilled+PHP+Forms">a tutorial posted</a> that takes a look at a simple way to "auto-fill" HTML forms with a little help from PHP.
<p>
<quote>
<i>
I hate typing, but I like writing code. A while ago I started to dread all the rote typing required to handle forms in PHP, and began looking for a Better Way. This article describes how I used PHP's regular expression functions to do most of the heavy lifting required to process forms properly, saving lots of typing and giving me time to do stuff I don't hate, such as writing code (and playing <a href="http://www.nethack.org/">NetHack</a>).
</i>
</quote>
<p>
He <a href="http://www.onlamp.com/pub/a/php/2006/03/16/autofill-forms.html?CMP=OTC-6YE827253101&ATT=Autofilled+PHP+Forms">sets it up</a. by describing a problem that he (and others like, specifically, <a href="http://www.onlamp.com/pub/a/php/2004/04/22/php_css_forms.html">Jeff Cogswell</a>, have had) to display the form, validate the input, and display the results of this validation (or a success message). 
<p>
He takes a little bit different kind of method behind it than several form packages out there - he grabs the HTML output of the form with output buffering and does replaces on that with the previously entered values.]]></description>
      <pubDate>Fri, 17 Mar 2006 07:32:18 -0600</pubDate>
    </item>
  </channel>
</rss>
