<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
<title>PHP - Web Developer Tutorials</title>
<link>http://www.devshed.com</link>
<!-- PubSubHubbub Discovery -->
<link rel="hub"  href="http://devshednet.superfeedr.com/" xmlns="http://www.w3.org/2005/Atom" />
<link rel="self" href="http://www.devshed.com/rss-feeds-11.xml" xmlns="http://www.w3.org/2005/Atom" />
<!-- End Of PubSubHubbub Discovery -->
<atom:link href="http://www.devshed.com/rss-feeds-11.xml" rel="self"/>
<description>PHP Tutorials at Dev Shed.  DevShed is a community focused on both beginner and advanced tutorials in Java, C, PHP, Python, MySQL and Ruby-on-rails...amongst others.</description>
<language>en-us</language>
<lastBuildDate>Mon, 13 Feb 2012 13:37:15 -0500</lastBuildDate>
<pubDate>Mon, 13 Feb 2012 13:37:15 -0500</pubDate>
<item><title>PHP Closures as View Helpers: Lazy-Loading File Data</title>
<pubDate>Mon, 30 Jan 2012 08:00:07 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/PHP-Closures-as-View-Helpers-LazyLoading-File-Data/</link>
		<description><![CDATA[In this second part of a two-part tutorial, you'll learn how to use closures in the development of an extendable template system. This system can be customized at will without struggling too much, thanks to the number of interfaces that it implements.]]></description>
		<content:encoded><![CDATA[As an important part of PHP 5.3's new features, closures have quickly made a mark on the language's field. This is due to their versatile nature, which allows programmers to utilize them in a wide variety of use cases and situations. They not only yield great results when processing array elements in all sorts of clever ways; it's fairly easy to get excellent results with them in the object-oriented programming arena as well. The best way to show you how using anonymous functions can help you to develop more efficient OO applications is with some functional, hands-on examples. With this idea i...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/PHP-Closures-as-View-Helpers-LazyLoading-File-Data/</guid>
</item>
<item><title>Using PHP Closures as View Helpers</title>
<pubDate>Tue, 24 Jan 2012 11:06:09 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/Using-PHP-Closures-as-View-Helpers/</link>
		<description><![CDATA[In this first part of a two-part tutorial, I develop a basic template system that can parse any type of closure assigned as a property of its view object(s).]]></description>
		<content:encoded><![CDATA[Unquestionably, the release of PHP 5.3.x, along with the imminent arrival of PHP 5.4 (at least, at the time of this writing), clearly show the level of maturity that the language has reached in the last few years. The inclusion of support for native namespaces, Late Static Binding, a largely improved SPL and of course the long-awaited traits, are all part of the wealth of niceties that PHP offers to picky developers. Although most of these features have found their own niche over time (with the sole exception of traits, for obvious reasons), there's one more that, because of its versatile natu...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/Using-PHP-Closures-as-View-Helpers/</guid>
</item>
<item><title>PHP File and Operating System Program Execution Functions</title>
<pubDate>Tue, 03 Jan 2012 12:00:04 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/PHP-File-and-Operating-System-Program-Execution-Functions/</link>
		<description><![CDATA[In this conclusion to an eight-part article series on working with a computer's file and operating system with PHP, you'll learn about the functions used in combination with a PHP script to execute system-level programs. This article is excerpted from chapter 10 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[PHP's Program Execution Functions  This section introduces several functions (in addition to the backticks execution operator) used to execute system-level programs via a PHP script. Although at first glance they all appear to be operationally identical, each offers its own syntactical nuances.  exec()  string exec (string command [, array output [, int return_var]])  The exec() function is best-suited for executing an operating system-level application (designated by command) intended to continue executing in the server background. Although the last line of output will be returned, chances ar...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/PHP-File-and-Operating-System-Program-Execution-Functions/</guid>
</item>
<item><title>PHP: Effects of Wrapping Code in Class Constructs</title>
<pubDate>Wed, 28 Dec 2011 08:00:06 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/PHP-Effects-of-Wrapping-Code-in-Class-Constructs/</link>
		<description><![CDATA[In this first part of a two-part tutorial, I use a somewhat contrived example to show why you should avoid coding static helper classes in PHP.]]></description>
		<content:encoded><![CDATA[Let's be honest: how many times have you found yourself writing a custom static helper class, or putting your hands eagerly on one that came bundled with a framework, from the many available out there? If you're anything like me, the answer will be at least  a few (remember that the first step to healing is admitting you have a problem). Static helpers seem to be a great idea at first glance, as they're reusable components that don't require any kind of expensive instantiation for doing common tasks, such as determining base URLs and paths or validating incoming data. But the sad and unavoid...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/PHP-Effects-of-Wrapping-Code-in-Class-Constructs/</guid>
</item>
<item><title>PHP: Building Concrete Validators</title>
<pubDate>Wed, 21 Dec 2011 08:00:05 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/PHP-Building-Concrete-Validators/</link>
		<description><![CDATA[In this two-part tutorial, I show why the use of static helper classes can be detrimental to building robust and scalable object-oriented applications in PHP (though you should take into account that the concept is language agnostic). I also implement a set of instantiable, fine-grained validators, which can be easily tested in isolation, injected into the internals of other objects, and so forth.]]></description>
		<content:encoded><![CDATA[Constructing purely static helper classes can hurt you, especially when you're trying to build applications that adhere to the principles of good object-oriented programming. As I explained extensively in the first part of this tutorial, static helpers are inflexible structures that can only be extended via Inheritance, and that don't exploit the benefits of Polymorphism or dependency injection.        Naturally, the most educational way to learn why static helpers (or any other kind of static class, of course) should be replaced with instantiable classes is through some concrete, easy-to-foll...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/PHP-Building-Concrete-Validators/</guid>
</item>
<item><title>Sanitizing Input with PHP</title>
<pubDate>Mon, 12 Dec 2011 11:30:05 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/Sanitizing-Input-with-PHP/</link>
		<description><![CDATA[In this seventh part of an eight-part article series on using PHP commands with your file and operating systems, you'll learn how and why to sanitize user input. This article is excerpted from chapter 10 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[System-Level Program Execution  Truly lazy programmers know how to make the most of their entire server environment when developing applications, which includes exploiting the functionality of the operating system, file system, installed program base, and programming languages whenever necessary. In this section, you'll learn how PHP can interact with the operating system to call both OS-level programs and third-party installed applications. Done properly, it adds a whole new level of functionality to your PHP programming repertoire. Done poorly, it can be catastrophic not only to your applica...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/Sanitizing-Input-with-PHP/</guid>
</item>
<item><title>Executing Shell Commands with PHP</title>
<pubDate>Wed, 07 Dec 2011 09:30:04 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/Executing-Shell-Commands-with-PHP/</link>
		<description><![CDATA[In this sixth part of an eight-part series on working with the file and operating systems of a computer with PHP, you'll learn how to use PHP to write to a file and how to execute shell commands. This article is excerpted from chapter 10 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[Writing to a File  This section highlights several of the functions used to output data to a file.  fwrite()  int fwrite (resource handle, string string [, int length])  The fwrite() function outputs the contents of string to the resource pointed to by handle. If the optional length parameter is provided, fwrite() will stop writing when length characters have been written. Otherwise, writing will stop when the end of the string is found. Consider this example:   lt;?php $subscriberInfo =  quot;Jason Gilmore|wj@example.com quot;; $fh = fopen( quot;/home/www/data/subscribers.txt quot;,  quot;at ...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/Executing-Shell-Commands-with-PHP/</guid>
</item>
<item><title>Handling File Data with PHP</title>
<pubDate>Tue, 29 Nov 2011 08:00:06 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/Handling-File-Data-with-PHP/</link>
		<description><![CDATA[In this fifth part of an eight-part series on working with file and operating systems with PHP,  you'll learn how to read data from a file and move the file pointer. This article is excerpted from chapter 10 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[Reading from a File  PHP offers numerous methods for reading data from a file, ranging from reading in just one character at a time to reading in the entire file with a single operation. Many of the most useful functions are introduced in this section.  file()  array file (string filename [int use_include_path [, resource context]])  The immensely useful file() function is capable of reading a file into an array, separating each element by the newline character, with the newline still attached to the end of each element. Although simplistic, the importance of this function can't be understated...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/Handling-File-Data-with-PHP/</guid>
</item>
<item><title>File Security and Resources with PHP</title>
<pubDate>Wed, 23 Nov 2011 10:00:07 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/File-Security-and-Resources-with-PHP/</link>
		<description><![CDATA[In this fourth part of an article series on working with the file and operating systems with PHP, you'll learn about file ownership and permissions, and the concept of a resource. This article is excerpted from chapter 10 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[File Ownership and Permissions  These days, security is paramount to any server installation, large or small. Most modern operating systems have embraced the concept of the separation of file rights via a user/group ownership paradigm, which, when properly configured, offers a wonderfully convenient and powerful means for securing data. In this section, you'll learn how to use PHP's built-in functionality to review and manage these permissions.  Note that because PHP scripts typically execute under the guise of the server daemon process owner, some of these functions will fail unless highly in...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/File-Security-and-Resources-with-PHP/</guid>
</item>
<item><title>ArrayObject PHP Class Examples</title>
<pubDate>Wed, 16 Nov 2011 13:00:05 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/ArrayObject-PHP-Class-Examples/</link>
		<description><![CDATA[In this second part of a two-part series on the ArrayObject class from the Standard PHP Library, you'll learn how to handle properties by means of an object syntax.]]></description>
		<content:encoded><![CDATA[As one of the building blocks of the Standard PHP Library (SPL), the ArrayObject class is a traversable, countable structure, which allows you to treat objects as arrays. This functionality seems  irrelevant at first sight, but the class may be a real time-saver in certain situations. That's especially true when you need to create custom implementations (for instance, a dynamic registry or a service locator) without having to implement from scratch the ArrayAccess, IteratorAggregate and Countable SPL interfaces. The best way to get things rolling with ArrayObject is by example. In the first pa...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/ArrayObject-PHP-Class-Examples/</guid>
</item>
<item><title>ArrayObject PHP Class: An Introduction</title>
<pubDate>Wed, 16 Nov 2011 12:30:06 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/ArrayObject-PHP-Class-An-Introduction/</link>
		<description><![CDATA[In this first part of a two-part tutorial, I demonstrate how simple it is to use the ArrayObject SPL class. This class permits you to easily access properties through an array syntax.]]></description>
		<content:encoded><![CDATA[Added to PHP5 and improved in successive releases, the Standard PHP Library (SPL) is one of those things that, once you've used it, makes you wonder how you could live so long (and so painfully) without it. The library provides, right out the box, a set of native interfaces and classes which allow you to perform different tasks, without having to enter  quot;userland. quot; While the SPL's core functionality is unquestionably hard to beat, sometimes it's a little overwhelming; it includes so many classes, and some of them have been assigned some strange names (especially the native iterators)....]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/ArrayObject-PHP-Class-An-Introduction/</guid>
</item>
<item><title>Getting File System Data with PHP</title>
<pubDate>Tue, 15 Nov 2011 08:00:06 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/Getting-File-System-Data-with-PHP/</link>
		<description><![CDATA[In this third part of an eight-part article series on using PHP to work with the file and operating system, you'll learn how to retrieve the size of a directory and find out a file's last access and modification times. This article is excerpted from chapter 10 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[Retrieving a Directory Size  PHP doesn't currently offer a standard function for retrieving the total size of a directory, a task more often required than retrieving total disk space (see disk_total_space()). And although you could make a system-level call to du using exec() or system() (both of which are introduced later in this chapter), such functions are often disabled for security reasons. The alternative solution is to write a custom PHP function that is capable of carrying out this task. A recursive function seems particularly well-suited for this task. One possible variation is offered...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/Getting-File-System-Data-with-PHP/</guid>
</item>
<item><title>PHP Tools for Working with the File and Operating System</title>
<pubDate>Wed, 09 Nov 2011 12:00:07 -0500</pubDate>
<link>http://www.devshed.com/c/a/PHP/PHP-Tools-for-Working-with-the-File-and-Operating-System/</link>
		<description><![CDATA[In this second part of an eight-part article series on the tools PHP provides for working with the file system and operating system, we'll go over file types, links, and how to calculate file, directory and disk sizes. This article is excerpted from chapter 10 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[File Types and Links  Numerous functions are available for learning various details about files and links (or file pointers) found on a file system. Those functions are introduced in this section.  filetype()  string filetype (string filename)  The filetype() function determines and returns the file type of filename. Eight values are possible:    block: A block device such as a floppy disk drive or CD-ROM.    char: A character device, which is responsible for a nonbuffered exchange of data between the operating system and a device such as a terminal or printer.    dir: A directory.    fifo: A ...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/PHP-Tools-for-Working-with-the-File-and-Operating-System/</guid>
</item>
<item><title>Working with the File and Operating System with PHP</title>
<pubDate>Fri, 04 Nov 2011 08:30:05 -0400</pubDate>
<link>http://www.devshed.com/c/a/PHP/Working-with-the-File-and-Operating-System-with-PHP/</link>
		<description><![CDATA[PHP as a language offers the programmer an excellent array of tools for handling file system input and output, as well as executing programs at the shell level. This article series will introduce you to these tools. It is excerpted from chapter 10 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[It's quite rare to write an application that is entirely self-sufficient--that is, a program that does not rely on at least some level of interaction with external resources, such as the underlying file and operating system, and even other programming languages. The reason for this is simple: As languages, file systems, and operating systems have matured, the opportunities for creating much more efficient, scalable, and timely applications have increased greatly as a result of the developer's ability to integrate the tried-and-true features of each component into a singular product. Of course,...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/Working-with-the-File-and-Operating-System-with-PHP/</guid>
</item>
<item><title>PHP Proxy Patterns: Completing a Blog</title>
<pubDate>Mon, 31 Oct 2011 00:14:45 -0400</pubDate>
<link>http://www.devshed.com/c/a/PHP/PHP-Proxy-Patterns-Completing-a-Blog/</link>
		<description><![CDATA[In this third part of a series on proxy objects, we'll create a simple service layer to add to our blog program. With this finished application, you'll see exactly how proxy objects can be powerful allies when you need to persist the entities of a domain model in a database.]]></description>
		<content:encoded><![CDATA[While proxy objects can be utilized in a variety of situations and environments, they yield excellent results when lazy-loading data from an application's persistence layer (usually this layer is seated upon a RDBMS, but it could be a web service or anything else). With the progressive adoption in the PHP field of Domain-Driven Design methodologies, the use of proxies for loading and reconstituting collections of domain objects on request from the underlying storage can help in the implementation of more efficient persistence strategies. This is true despite the need in some cases to create a ...]]></content:encoded>
<category>PHP</category>
<guid isPermaLink="true">http://www.devshed.com/c/a/PHP/PHP-Proxy-Patterns-Completing-a-Blog/</guid>
</item>
</channel>
</rss>

