<?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>Sat, 11 Feb 2012 18:26:18 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: String Handling Functions]]></title>
      <guid>http://www.phpdeveloper.org/news/17304</guid>
      <link>http://www.phpdeveloper.org/news/17304</link>
      <description><![CDATA[<p>
On PHPMaster.com today <i>James Appleyard</i> has put tother a tutorial for the beginners out there about <a href="http://phpmaster.com/string-handling-functions/">working with strings in PHP</a>, using the huge list of built-in functions to work with your values.
</p>
<blockquote>
PHP has a vast selection of built-in string handling functions that allow you to easily manipulate strings in almost any possible way. [...]  There is no way I can cover every string function in one article, and besides, that is what the PHP manual is for! But what I will do is show how to work with some of the most commonly used string handling functions that you should know. After this, you'll be working with strings as well as any concert violinist!
</blockquote>
<p>
He shows how to use functions to: change the case of string, remove extra whitespace, get the length, slicing them up and doing replacing on some certain characters. You can find more information on these and the complete list of string functions in PHP in <a href="http://us2.php.net/strings">the manual</a>.
</p>]]></description>
      <pubDate>Mon, 26 Dec 2011 15:38:56 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend PHP Certification Blog: PHP Sorting Functions]]></title>
      <guid>http://www.phpdeveloper.org/news/17288</guid>
      <link>http://www.phpdeveloper.org/news/17288</link>
      <description><![CDATA[<p>
On the "Zend PHP Certification" blog (study notes), there's <a href="http://zend-php-certification.com/2011/12/20/php-sorting-functions/>a recent post</a> getting into the details of some of the sorting functions in PHP (like <a href="http://php.net/sort">sort</a> and <a href="http://php.net/natsort">natsort</a>).
</p>
<blockquote>
In all the countless hours I've spent with php, I've maybe used three or four of these sorting functions. I really had no idea that there is a total of eleven functions used for sorting arrays. Anyway, I'm betting that it may be useful to have these memorized before I take the Zend PHP Certification Exam so here is a brief overview of each one.
</blockquote>
<p>
He talks about the various flags that can be used in the sorting (for regular, numeric, string and locale-based string handling) and the parameters to call for normal sorting, "natural" sorting, reverse key sorting and others. You can find specifics on these array sorting methods <a href="http://www.php.net/manual/en/array.sorting.php">in the PHP manual</a>.
</p>]]></description>
      <pubDate>Wed, 21 Dec 2011 11:39:06 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Defining and Using Functions in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17194</guid>
      <link>http://www.phpdeveloper.org/news/17194</link>
      <description><![CDATA[<p>
PHPMaster.com has a new article for those new to the PHP language posted this morning - an <a href="http://phpmaster.com/defining-and-using-functions-in-php/">introduction to using functions</a> and making your code more reusable.
</p>
<blockquote>
Let's start by defining the word "function." A function is a self-contained piece of code which carries out a particular task (or function!). A key benefit of using functions is that they are reusable; if you have a task that needs to be performed a number of times, a function is an ideal solution. They can be either defined by you or by PHP (PHP has a rich collection of built-in functions). This article will focus on programmer-defined functions but will touch briefly on PHP's functions to complete the picture.
</blockquote>
<p>
They include a few code snippets showing the syntax of functions (including their name, arguments and returning a value). They suggest grouping your functions together in your code for easier maintenance and share a handy tip on making a function accept a varying number of arguments.
</p>]]></description>
      <pubDate>Thu, 01 Dec 2011 08:38:21 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: File Security and Resources with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17165</guid>
      <link>http://www.phpdeveloper.org/news/17165</link>
      <description><![CDATA[<p>
In the fourth part of their series looking at working with the filesystem in PHP, DevShed has posted a new tutorial focusing on <a href="http://www.devshed.com/c/a/PHP/File-Security-and-Resources-with-PHP/">security and permission handling</a> for files/resources.
</p>
<blockquote>
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.
</blockquote>
<p>They introduce functions like:</p>
<ul>
<li><a href="http://php.net/chown">chown</a>
<li><a href="http://php.net/chgrp">chgrp</a>
<li><a href="http://php.net/fileperms">fileperms</a>
<li><a href="http://php.net/isexecutable">isexecutable</a>
<li><a href="http://php.net/umask">umask</a>
</ul>
<p>
Sample code is also included to show how to <a href="http://www.devshed.com/c/a/PHP/File-Security-and-Resources-with-PHP/2/">open and close a file</a>.
</p>]]></description>
      <pubDate>Wed, 23 Nov 2011 16:23:27 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Array Handling Functions]]></title>
      <guid>http://www.phpdeveloper.org/news/16974</guid>
      <link>http://www.phpdeveloper.org/news/16974</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial introducing you to <a href="http://phpmaster.com/array-handling-functions/">the array handling features</a> in PHP - sorting, slicing and more.
</p>
<blockquote>
In my <a href="http://phpmaster.com/introduction-to-php-arrays/">previous article on PHP arrays</a> I suggested a number of things that are tables and therefore can also be expressed as arrays. In this article I'll use a pack of playing cards to explore some of the built-in array functions most often needed by PHP programmers.
To highlight some of the array-handling functions PHP offers, I'll be using some components of <a href="http://en.wikipedia.org/wiki/Buraco">Buraco</a> - a game very popular in my part of the world and quite similar to Rummy.
</blockquote>
<p>
In the example he represents a deck of cards with an array of values like "A", "03" and "13". This array is then looped to make the full set of 52 cards and shuffled to deal a "hand". Array functions put to use include <a href="http://php.net/array_rand">array_rand</a>, <a href="http:/php.net/in_array">in_array</a> and <a href="http://php.net/sort">sort</a>.
</p>]]></description>
      <pubDate>Tue, 11 Oct 2011 08:37:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Building a small microframework with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16756</guid>
      <link>http://www.phpdeveloper.org/news/16756</link>
      <description><![CDATA[<p>
In investigating microframeworks and some of the offerings out there <i>Gonzalo Ayuso</i> has done a little exploring of his own. He's <a href="http://gonzalo123.wordpress.com/2011/08/22/building-a-small-microframework-with-php/">worked up a basic microframework</a> and shared it in a new post as a sort of academic exercise.
</p>
<blockquote>
Nowadays microframewors are very popular. Since Blake Mizerany created <a href="http://www.sinatrarb.com/">Sinatra</a> (Ruby), we have a lot of Sinatra clones in PHP world. Probably the most famous (and a really good one) is <a href="http://silex-project.org/">Silex</a>. But we also have several ones, such as <a href="http://www.limonade-php.net/">Limonade</a>, <a href="http://gluephp.com/">GluePHP</a> and <a href="http://www.slimframework.com/">Slim</a>. Those frameworks are similar. 
</blockquote>
<p>
He looks at how several of these frameworks handle routing and setup, mostly using the closures/anonymous function callbacks available in PHP 5.3. His <a href="https://github.com/gonzalo123/microFramework">simple example framework</a> does some basic URI handling to find the requested module, class and function (action) to call. You can even define the output format from options like json, txt, css, js and jsonp. A sample "controller" is included with a "Hello world" and there's a mention of some other options he's exploring including <a href="http://twig-project.org">Twig</a> and <a href="https://github.com/kriswallsmith/assetic">Assetic</a> integration.
</p>]]></description>
      <pubDate>Tue, 23 Aug 2011 09:48:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: New features in PHP5.4 alpha1]]></title>
      <guid>http://www.phpdeveloper.org/news/16547</guid>
      <link>http://www.phpdeveloper.org/news/16547</link>
      <description><![CDATA[<p>
In a new post <i>Gonzalo Ayuso</i> talks about some of the <a href="http://gonzalo123.wordpress.com/2011/07/04/new-features-in-php5-4-alpha1/">new features</a> in the recently released PHP 5.4 alpha, including some code examples.
</p>
<blockquote>
We already have the php5.4 alpha ready for testing. This new release has a few features that I really like. The lack of those features gave me problems in the past. Because of that, I'm very excited waiting for the new stable release of PHP 5.4.
</blockquote>
<p>
There's <a href="http://www.php.net/releases/NEWS_5_4_0_alpha1.txt">several features included in the release</a>, but he spotlights some of the major ones - support for array dereferencing, indirect method calls through arrays, reintroduction of using "$this" in closures and <a href="http://simas.posterous.com/new-to-php-54-traits">traits support</a>.
</p>]]></description>
      <pubDate>Mon, 04 Jul 2011 14:36:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Web Developer Juice: PHP Magic Functions: Best Part of Object Oriented PHP - Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/16361</guid>
      <link>http://www.phpdeveloper.org/news/16361</link>
      <description><![CDATA[<p>
Web Developer Juice has posted <a href="http://www.webdeveloperjuice.com/2011/05/09/php-magic-functions-best-part-of-object-oriented-php-%E2%80%93-part-2/">the second part of their series</a> looking at some of the "magic functions" that PHP has to offer - special functions that do automagic things in your scripts and classes. Part one can be <a href="http://phpdeveloper.org/news/16288">found here</a>.
</p>
<blockquote>
In my <a href="http://www.webdeveloperjuice.com/2011/04/28/php-magic-functions-best-part-of-object-oriente-php/">previous post</a> ( PHP Magic Functions ), I discussed about __construct, __destruct, __call and __callStatic. Lets explore a few more magic functions...
</blockquote>
<p>In this latest part of the series they look at three functions:</p>
<ul>
<li>__set/__get
<li>__invoke
</ul>]]></description>
      <pubDate>Thu, 19 May 2011 10:14:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPCodeBase.com: PHP Magic Function : glob()]]></title>
      <guid>http://www.phpdeveloper.org/news/16134</guid>
      <link>http://www.phpdeveloper.org/news/16134</link>
      <description><![CDATA[<p>
On PHPCodeBase.com there's a recent post looking at <a href="http://www.phpcodebase.com/php-magic-function-glob/">a handy file system function</a> that you can use to search directories simpler than a usual opendir/readdir method - <a href="http://php.net/glob">glob</a>.
</p>
<blockquote>
Are you guys still using <a href="http://php.net/manual/en/function.opendir.php">opendir()</a> function to read the the files from the folder in PHP? Luckily PHP have the <a href="http://php.net/manual/en/function.glob.php">glob()</a> function which perform this task very faster and smarter.
</blockquote>
<p>
He compares an example of the opendir/readdir method to a few line replacement with glob, both searching the same directory for files. He looks at the arguments you can pass into glob - the path to search and a flag that adds special handling to the method (like turning off sorting, modifying the regular expression handling and stopping on errors).
</p>]]></description>
      <pubDate>Fri, 01 Apr 2011 08:21:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SearchCo.de: List of Most Commonly Used PHP Functions]]></title>
      <guid>http://www.phpdeveloper.org/news/16056</guid>
      <link>http://www.phpdeveloper.org/news/16056</link>
      <description><![CDATA[<p>
In a new post to the SearchCo.de blog <i>Ben Boyter</i> generated a listing of the <a href="http://searchco.de/blog/view/list-of-most-commonly-used-php-functions">most commonly used PHP functions/structures</a> based on the contents of several of the major PHP projects from around the web.
</p>
<blockquote>
One thing that I considered some time ago was working out which are the most common functions in a language and adding this as an additional signal to ranking. I couldn't find anywhere else on the web with this question answered so I took my own approch. The method was to take a collection of large PHP projects, including, Wordpress, Mambo, Sphider, Smarty, Drupal, CodeIgniter, dump all their source code into a single file stripped of comments, and then run some simple regex over this file counting the occurance of each function. 
</blockquote>
<p>
His results show the top five as: array, isset, define, empty and assert. The last five ended up being: filemtime, sha1, array_unshift, get_current_user and strchr.
</p>]]></description>
      <pubDate>Wed, 16 Mar 2011 13:26:27 -0500</pubDate>
    </item>
  </channel>
</rss>

