<?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>Thu, 24 May 2012 15:45:58 -0500</pubDate>
    <ttl>30</ttl>
    <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[PHPMaster.com: Using the Ternary Operator]]></title>
      <guid>http://www.phpdeveloper.org/news/17068</guid>
      <link>http://www.phpdeveloper.org/news/17068</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing the use of a sometimes overlooked (but very handy) alternate syntax that PHP includes - the <a href="http://phpmaster.com/using-the-ternary-operator/">ternary operator</a>, a short-hand if/else.
</p>
<blockquote>
You're probably already familiar with PHP's if statement. It's very similar to its counterparts in many other programming languages and represents one of the most fundamental concepts in programming. [...] But there's a way to build on this concept and increase your $coolFactor a bit in the process. Allow me to introduce you to the ternary operator, which serves as a shorthand notation for if statements.
</blockquote>
<p>
They introduce the ternary operator's syntax, the ":" and "?" operators and includes a few pieces of code showing its use. Thankfully they also include a warning - don't overuse or abuse it...and especially don't nest them - that just leads to headaches.
</p>]]></description>
      <pubDate>Tue, 01 Nov 2011 09:43:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DeveloperDrive.com: Common Mistakes to Avoid When Coding in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17012</guid>
      <link>http://www.phpdeveloper.org/news/17012</link>
      <description><![CDATA[<p>
On the DeveloperDrive.com site today, there's a new post with a few reminders for PHP developers out there of things it's easy to forget when writing your applications - some <a href="http://www.developerdrive.com/2011/10/common-mistakes-to-avoid-when-coding-in-php/">common mistakes to avoid</a>.
</p>
<blockquote>
Despite the high expectations placed on them at times, developers are human. They were the last time we checked anyways. As humans, we are bound to make mistakes from time to time. And simple, common mistakes often slip past our filters the more comfortable we become with something. [...] But knowing what these common mistakes are and how to avoid them can really help speed up the development process and keep our clients smiling.
</blockquote>
<p>
His list includes three big ones that, if forgotten, could end up being detrimental to your application (sooner or later) - poor housekeeping/organization of code, forgetting punctuation and forgetting to validate input from users.
</p>]]></description>
      <pubDate>Wed, 19 Oct 2011 09:17:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Hyperpolyglot.org: Syntax for Common Tasks - Side-by-side (Ruby, Perl, Python & PHP)]]></title>
      <guid>http://www.phpdeveloper.org/news/16717</guid>
      <link>http://www.phpdeveloper.org/news/16717</link>
      <description><![CDATA[<p>
On Hyperpolyglot.org there's an <a href="http://hyperpolyglot.org/scripting">interesting listing of scripting language syntax</a> - PHP, Python, Ruby and Perl - showing some of their common syntax and data structures side by side.
</p>
<p>
Sections of the reference sheet include 
</p>
<ul>
<li>arithmetic and logic
<li>arrays
<li>execution control
<li>libraries and modules
<li>objects
<li>reflection
</ul>
<p>
It's interesting to see how the various languages compare, where some have shortcuts for things and others fail at the same (or make it much more difficult). Descriptions for the different row types are <a href="http://hyperpolyglot.org/scripting#general">also included</a>.
</p>]]></description>
      <pubDate>Mon, 15 Aug 2011 10:12:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stas Malyshev's Blog: Shortcuts]]></title>
      <guid>http://www.phpdeveloper.org/news/16680</guid>
      <link>http://www.phpdeveloper.org/news/16680</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Stas Malyshev</i> <a href="http://php100.wordpress.com/2011/08/03/shortcuts/">talks about shortcuts</a> - those things that languages include to make your code shorter and your life easier...or do they?
</p>
<blockquote>
PHP is notorious among scripting languages for it's verbose syntax - you have to spell out many things that are much shorter in other languages. Some people think it's very bad that they can't be "expressive", meaning writing more clever code with less keystrokes. Sometimes they are right, sometimes they are not.
</blockquote>
<p>
He talks about the upcoming syntax change in PHP 5.4 for defining arrays (being able to use square brackets) and how it makes sense based on the standards of other languages using a similar syntax. He gives one bad example from Python, though - how Python 2 handled the catching of exceptions and assigning the result.
</p>
<blockquote>
Some people in PHP community think all "shortcuts" are best to be avoided. I think some of them could be useful, provided clarity is not sacrificed and there's not "too much magic". 
</blockquote>]]></description>
      <pubDate>Fri, 05 Aug 2011 10:50:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Freek Lijten's Blog: Currently on PHP's internals...]]></title>
      <guid>http://www.phpdeveloper.org/news/16476</guid>
      <link>http://www.phpdeveloper.org/news/16476</link>
      <description><![CDATA[<p>
<i>Freek Lijten</i> has a recent post looking at some of the <a href="http://www.freeklijten.nl/home/2011/06/10/Currently-on-PHPs-internals...">types of discussions that happen</a> on the php-internals mailing list.
</p>
<blockquote>
The internals list is the place to be to hear about the current state of PHP. It is one of PHP's many mailing lists, but this is the one where (core) developers discuss new features, current bugs and wild ideas. If you want to keep up with things it is a good idea to sign up, it is not an extremely high volume list and if you ignore the noise it is quite informative. In this article I would like to share examples of stuff typically discussed on the list.
</blockquote>
<p>
He mentions feature requests in general and, more specifically things like traits support (multiple inheritance), array dereferencing, callable arrays and the debate over the short array syntax.
</p>]]></description>
      <pubDate>Thu, 16 Jun 2011 08:57:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[RubySource.com: Confessions of a Converted PHP Developer: Ugly Code]]></title>
      <guid>http://www.phpdeveloper.org/news/16191</guid>
      <link>http://www.phpdeveloper.org/news/16191</link>
      <description><![CDATA[<p>
On RubySource.com there's a recent post with a bit of a confession from an ex-PHP developer who's moved over to Ruby about <a href="http://rubysource.com/confessions-of-a-converted-php-developer-ugly-code/">some of he is experiences</a> in making the shift and why he's a convert now.
</p>
<blockquote>
I've been a PHP developer for nearly a decade, and in January this year I started developing in Ruby. While initially a sceptic, I'm now a convert - and I'm here to share my experiences with you. [...]  I'd like to think of myself as a fairly good PHP developer, and the idea of moving to Rails was both scary and exciting. [...] In Ruby's defence, these are frustrations that are well made up for with the delights of finding out how easy other things are to do - and any learning process has its frustrations.
</blockquote>
<p>
He compares a bit of code that would take a list of email addresses and pull out the domain parts of each, grabbing only the unique ones. He includes some PHP code (using anonymous functions in PHP 5.3) to get the job done and compares it to the Ruby method that's a bit more fluid and readable. He talks about some of his frustrations during the learning process of creating code like this and includes his steps as he evolved through it.
</p>]]></description>
      <pubDate>Wed, 13 Apr 2011 13:12:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ServerGrove Blog: Editing Twig Templates in Dreamweaver]]></title>
      <guid>http://www.phpdeveloper.org/news/15998</guid>
      <link>http://www.phpdeveloper.org/news/15998</link>
      <description><![CDATA[<p>
On the ServerGrove blog today there's a new post showing how you can set up Dreamweaver to be able to <a href="http://blog.servergrove.com/2011/03/03/editing-twig-templates-in-dreamweaver/">edit Twig templates</a> directly, complete with syntax highlighting.
</p>
<blockquote>
If you are a designer working with Symfony developers you will soon encounter Twig. Twig is a template engine for PHP that has been adopted by Symfony 2, and from a designers perspective, it's a major improvement over the way things are done in Symfony! For designers who have used templating systems like Smarty before, Twig is going to be a walk in the park, if you have not used a templating system before, Twig is a great place to start. 
</blockquote>
<p>
It's a simple two-step process to get things up and working. You just need to tell Dreamweaver that ".twig" files should be recognized as code and set up the syntax highlighting in the "MMDocumentTypes" XML configuration file (might be a little tricky for non-development types). This change tells the program to open them with HTML syntax highlighting.
</p>]]></description>
      <pubDate>Fri, 04 Mar 2011 10:16:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mayflower Blog: PHP_CodeBrowser goes stable]]></title>
      <guid>http://www.phpdeveloper.org/news/15582</guid>
      <link>http://www.phpdeveloper.org/news/15582</link>
      <description><![CDATA[<p>
According to <a href="http://blog.mayflower.de/archives/626-PHP_CodeBrowser-goes-stable.html">this new post</a> on the Mayflower blog, the <a href="https://github.com/mayflowergmbh/PHP_CodeBrowser">PHP_CodeBrowser</a> PEAR package has finally reached a stable state.
</p>
<blockquote>
We already <a href="http://github.com/mayflowergmbh/PHP_CodeBrowser">wrote about CodeBrowser 0.9 in August</a> and after fixing a few minor bugs the <a href="http://opensource.mayflower.de/">Mayflower Open Source Labs Team</a> is very happy to present PHP_CodeBrowser 1.0.0.
</blockquote>
<p>
The PHP_CodeBrowser package allows quality assurance tools (like <a href="http://phpunit.de">PHPUnit</a>) to create enhanced output including syntax highlighting and colored error sections. It comes with some basic template, CSS, Javascript and image files as well as a plugin system to allow for custom handling of certain error types. You can install it from the pear.phpunit.de PEAR channel or you can check out the <a href="https://github.com/mayflowergmbh/PHP_CodeBrowser">source on github</a>.
</p>]]></description>
      <pubDate>Wed, 15 Dec 2010 10:54:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: 10 Productivity-boosting Tools for Your PHP Development]]></title>
      <guid>http://www.phpdeveloper.org/news/15014</guid>
      <link>http://www.phpdeveloper.org/news/15014</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's <a href="http://www.phpbuilder.com/columns//top-10-productivity-tools/Jason_Gilmore082410.php3">a list of ten tools</a> that can help you increase your productivity in your PHP development including ones for testing, automation and debugging.
</p>
<blockquote>
Frustration can quickly set in when you are dealing with menial and often repetitive tasks such as manual code testing and deployment, yet you strive to become a more efficient programmer by <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">staying DRY</a>. So why not extend that quest to other parts of the application lifecycle, streamlining and automating such tasks? In this article I'll introduce you to ten PHP development tools that will help you do exactly that, leaving you with more time to concentrate on building great websites.
</blockquote>
<p>His list of ten tools consists of:</p>
<ul>
<li><a href="http://phpunit.de">PHPUnit</a>
<li><a href="http://phing.info">Phing</a>
<li><a href="http://github.com">Github</a>
<li><a href="http://www.firephp.org/">FirePHP</a>
<li><a href="http://xdebug.org/">XDebug</a>
<li><a href="http://pear.php.net/">PEAR</a>
<li><a href="http://pear.php.net/package/PHP_CodeSniffer">PHP_CodeSniffer</a>
<li><a href="http://www.phpdoc.org/">phpDocumentor</a>
<li><a href="http://pear.php.net/package/PHP_Beautifier">PHP_Beautifier</a>
<li><a href="http://phpundercontrol.org/">phpUnderControl</a>
</ul>]]></description>
      <pubDate>Wed, 25 Aug 2010 08:23:06 -0500</pubDate>
    </item>
  </channel>
</rss>

