<?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>Wed, 19 Jun 2013 07:08:53 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gareth Heyes: Tweetable PHP-Non Alpha]]></title>
      <guid>http://www.phpdeveloper.org/news/18885</guid>
      <link>http://www.phpdeveloper.org/news/18885</link>
      <description><![CDATA[<p>
<i>Gareth Heyes</i> has a new post that <a href="http://www.thespanner.co.uk/2012/12/13/tweetable-php-non-alpha/">shares some of his efforts</a> to write "non-alpha PHP", using characters other than the alpha-numeric ones to write executable PHP scripts. In his case, this involves a lot of pluses, underscores and square brackets.
</p>
<blockquote>
I started to try and break the 10 charset limit of PHP non-alpha after @InsertScript showed me that PHP Dev supports [] syntax for arrays. I wondered if it would be possible to break the limit within production PHP. At first I thought you could but then after some testing I found that there was no way to concat without "." and no way to call a string as a function without $ and =. However since I got into PHP Non-alpha again I thought why not try and improve it and make the code tweetable.
</blockquote>
<p>
He works through the whole process of his discovery - starting with the creation of a non-alpha version of "0" (zero), moving into letter creation and finally all the way up to a full word..."assert". The result is tweetable code that echoes that string and contains more symbols than letters. If you're interested in more of this non-alpha kind of coding, check out some of the other posts on <a href="http://www.thespanner.co.uk/">his blog</a>.
</p>]]></description>
      <pubDate>Thu, 13 Dec 2012 09:40:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Functional programming with Underscore.php]]></title>
      <guid>http://www.phpdeveloper.org/news/16849</guid>
      <link>http://www.phpdeveloper.org/news/16849</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Sameer Borate</i> looks at <a href="http://www.codediesel.com/php/functional-programming-with-underscore-php/">using the Underscore.php library</a> to do a little functional programming in PHP. <a href="http://brianhaveri.github.com/Underscore.php/">Underscrore.php</a>is a PHP port of <a href="http://documentcloud.github.com/underscore/">Underscrore.js</a>.
</p>
<blockquote>
Underscore.php provides a utility library for PHP that provides a lot of the functional programming support that a programmer would expect in Ruby, but without adding much overhead during execution. The only caveat is that underscore.php requires PHP 5.3 or greater. Although you could accomplish some of the things using PHP's built in functions, the functional approach looks intuitive and easy to work with.
</blockquote>
<p>
He gives a few simple code examples - one using the "pluck" method to pull certain values out of an array, the "map" method to apply a transformation to each item in an array and some OOP examples showing the use of the "max" and "template" methods.
</p>]]></description>
      <pubDate>Tue, 13 Sep 2011 08:53:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones' Blog: Regarding Underscores]]></title>
      <guid>http://www.phpdeveloper.org/news/15314</guid>
      <link>http://www.phpdeveloper.org/news/15314</link>
      <description><![CDATA[<p>
In response to <a href="http://www.phpdeveloper.org/news/15297">a post</a> from <i>Leszek Stachowski</i> about underscores in PHP class development, <i>Paul Jones</i> has <a href="http://paul-m-jones.com/archives/1641">shared his own thoughts</a> on the matter - that he disagrees with <i>Leszek</i> and suggests keeping the underscore prefix for private methods.
</p>
<blockquote>
I think the underscore-prefix for protected and private is a good convention to keep. As with many things about programming, this convention is not for the program, it is for for the programmer. For example, <a href="http://paul-m-jones.com/archives/276">limiting your line length to about 80 characters</a> is a good idea, not for reasons of "tradition", but because of cognitive limitations of human beings who have to read code. Likewise, using the underscore prefix is an immediate and continuous reminder that some portions of the code are not public. Its purpose is as an aid to the programmer. 
</blockquote>
<p>
He suggests that it offers something similar to the thought process behind the magic methods like __get or __set that both work on a private scope. Check some of <a href="http://paul-m-jones.com/archives/1641#comments">the comments</a> for opinions both for and against the idea from other community members.
</p>]]></description>
      <pubDate>Thu, 21 Oct 2010 10:47:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Leszek Stachowski's Blog: php anachronic coding standards]]></title>
      <guid>http://www.phpdeveloper.org/news/15297</guid>
      <link>http://www.phpdeveloper.org/news/15297</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Leszek Stachowski</i> <a href="http://shazarre.wordpress.com/2010/10/18/php-anachronic-coding-standards/">wonders about a coding convention</a> that's still widely used when it comes to private methods in a class - the underscore prefix.
</p>
<blockquote>
The question which comes instantly to my mind is: why? Is there any reason why this convention should be kept when PHP object oriented programming has gone a long way since PHP 4 (when there was no access modifiers and such underscore was the only fast way to distinguish public from, hmm, not public methods and properties) ? Are, for instance (as one of major OOP languages), Java coding standards pushing towards such naming convention? No!
</blockquote>
<p>
He, like many other developers, are pushing to drop this kind of convention as an outdated reminder of the PHP4 days when "private" didn't exist in the language. Scope modifiers have done away with the need for that underscore completely.
</p>]]></description>
      <pubDate>Mon, 18 Oct 2010 13:46:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SaniSoft Blog:  Help! vendor() is deprecated.]]></title>
      <guid>http://www.phpdeveloper.org/news/10160</guid>
      <link>http://www.phpdeveloper.org/news/10160</link>
      <description><![CDATA[<p>
On the SaniSoft blog today, <i>Tarique Sani</i> has a <a href="http://www.sanisoft.com/blog/2008/05/10/help-vendor-is-deprecated/">quick hack</a> for CakePHP users needing to transition over from the deprecated vendor() call - import().
</p>
<blockquote>
Use of vendor() function to load third party libs in CakePHP has been deprecated for some time now... It has been replaced with the more generic App::import() the usage is simple.
</blockquote>
<p>
There's also a little trick you'll need to know for files with underscores (drop it and replace with an uppercase) and how to get it to be a bit more flexible and recognize vendor files in subdirectories or ones differently named.
</p>]]></description>
      <pubDate>Mon, 12 May 2008 09:35:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Oscar Merida's Blog: Avoiding frustration with PHP Sessions]]></title>
      <guid>http://www.phpdeveloper.org/news/7536</guid>
      <link>http://www.phpdeveloper.org/news/7536</link>
      <description><![CDATA[<p>
On his blog, <i>Oscar Merida</i> has <a href="http://www.oscarm.org/news/detail/1877-avoiding_frustration_with_php_sessions">a quick new post</a> those just starting out with sessions should take a look at. He gives four quick tips of things to watch out for that can help your development process go smoother.
</p>
<blockquote>
PHP's support for sessions make adding "state" to your web application super easy.  Bus because the illusion of state is maintained by storing a Session ID via a user's cookies, you might find yourself losing potentially productive hours chasing down bizarre client side bugs or opening up a potential security hole.  Here are 4 tips to help you avoid wasting your time and securing your site.
</blockquote>
<p>
Items on the list are:
<ul>
<li>Don't use underscores in host names
<li>Commit your sessions before redirects
<li>Prevent session fixation (great security tip!)
<li>Don't expose session_id's
</ul>
Check out <a href="http://www.oscarm.org/news/detail/1877-avoiding_frustration_with_php_sessions">the comments</a> - there's some good recommendations in there as well.
</p>]]></description>
      <pubDate>Fri, 30 Mar 2007 11:28:00 -0500</pubDate>
    </item>
  </channel>
</rss>
