<?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, 20 Jun 2013 03:18:39 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Software Gunslinger: PHP is meant to die]]></title>
      <guid>http://www.phpdeveloper.org/news/19417</guid>
      <link>http://www.phpdeveloper.org/news/19417</link>
      <description><![CDATA[<p>
In <a href="http://software-gunslinger.tumblr.com/post/47131406821/php-is-meant-to-die">this new post</a>, titled "PHP is meant to die", the author looks at one weakness he sees in the PHP language - how PHP handles long running scripts and functionality.
</p>
<blockquote>
In my opinion, a lot of the hatred that PHP receives misses the utter basic point: PHP is meant to die. It doesn't mean that a perfectly capable (to some extent) programming language will disappear into nothingness, it just means that your PHP code can't run forever. Now, <a href="http://php.net/releases/index.php">13 years after the first official release</a> in 2000, that concept still looks valid to me.
</blockquote>
<p>
He talks about some of the "dying" that PHP is good at (like making general website-related requests) but notes that if you try to have it do much more, PHP acts up. He points to the complexity of web-based applications and notes that, while PHP is good for some of it, it's not a fit for all functionality. He also covers the bringing of processes to the foreground that are best left in the background and how - despite the best of intentions - making a PHP daemon to solve the problem isn't a viable option.
</p>
<blockquote>
Do you see the pattern? I've inherited projects where PHP was used for daemons or other stuff that's not just regular websites (yes, I'm a hired keyboard), and all of them shared that same problem. No matter how good or clever your idea looked on paper, if you want to keep the processes running forever they will crash, and will do it really fast under load, because of known or unknown reasons. That's nothing you can really control, it's because PHP is meant to die. The basic implementation, the core feature of the language, is to be suicidal, no matter what.
</blockquote>
Link: http://software-gunslinger.tumblr.com/post/47131406821/php-is-meant-to-die]]></description>
      <pubDate>Fri, 05 Apr 2013 10:47:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonathan Hill: What Is Wrong With PHP's Semaphore Extension]]></title>
      <guid>http://www.phpdeveloper.org/news/18893</guid>
      <link>http://www.phpdeveloper.org/news/18893</link>
      <description><![CDATA[<p>
In <a href="http://jonathonhill.net/2012-12-08/what-is-wrong-with-phps-semaphore-extension/">this recent post</a> to his site <i>Jonathan Hill</i> takes a look at the PHP <a href="http://php.net/manual/en/book.sem.php">semaphore extension</a> and talks about some of the issues he's had with it.
</p>
<p>He lists five different pain points he discovered when trying to use the extension:</p>
<ul>
<li>Lack of a true Semaphore
<li>Undefined error handling
<li>Undefined behavior of sem_get()
<li>Cannot disable semaphore auto-releasing
<li>A semaphore may be deleted when other processes are waiting to acquire it
</ul>
<p>
The <a href="http://php.net/manual/en/intro.sem.php">semaphore extension</a> provides a PHP-based wrapper for the System V IPC family of functions (including semaphores, shared memory and inter-process messaging).
</p>]]></description>
      <pubDate>Fri, 14 Dec 2012 11:08:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: PHPBestPractices.org - A Short Practical Guide]]></title>
      <guid>http://www.phpdeveloper.org/news/18396</guid>
      <link>http://www.phpdeveloper.org/news/18396</link>
      <description><![CDATA[<p>
There's another site tossing their hat into the "best practices in PHP" ring (the other being <a href="http://phptherightway.com">PHP The Right Way</a>) with what they call a "short, practical list for common and confusing tasks" in PHP - <a href="http://phpbestpractices.org/">PHPBestPractices.org</a>.
</p>
<blockquote>
[Outdated tutorials and information is] one of the reasons why new PHP programmers are so frequently blamed for ugly, outdated, or insecure code. They can't help it if the first Google result was a four year old article teaching a five year old method! This document tries to address that. It's an attempt to compile a set of basic instructions for what can be considered best practices for common and confusing issues and tasks in PHP. If a low-level task has multiple and confusing approaches in PHP, it belongs here.
</blockquote>
<p>The site has sections for topics like:</p>
<ul>
<li><a href="http://phpbestpractices.org/#mysql">PHP & MySQL</a>
<li><a href="http://phpbestpractices.org/#quotes">Single vs Double Quotes</a>
<li><a href="http://phpbestpractices.org/#regex">PHP regular expressions</a>
<li><a href="http://phpbestpractices.org/#validating-emails">Validating emails</a>
<li><a href="http://phpbestpractices.org/#checking-for-null">Checking null and false values</a>
</ul>
<p>
If you're interested in helping out and adding more content to the site, <a href="http://phpbestpractices.org/#maintainers">contain the maintainer</a> and let him know.
</p>]]></description>
      <pubDate>Thu, 23 Aug 2012 10:07:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Using JIRA's REST API to Create a Dashboard]]></title>
      <guid>http://www.phpdeveloper.org/news/17743</guid>
      <link>http://www.phpdeveloper.org/news/17743</link>
      <description><![CDATA[<p>
In <a href="http://www.lornajane.net/posts/2012/using-jiras-rest-api-to-create-a-dashboard">this recent post</a> to her blog, <i>Lorna Mitchell</i> shows how to use the Jira REST API (provided as a part of some of the newer versions of the tool) to create a "dashboard" of the latest items added to the tracker.
</p>
<blockquote>
Today what you get is an example of integrating with JIRA's REST API, because their recent "upgrade" locked me out of the issue listings pages completely and I really do need to be able to see a list of bugs! Their bug editing screen is quite usable, so it's just the list that I need here, but you could easily call their <a href="http://docs.atlassian.com/jira/REST/latest/">other API methods</a> as you need to. These examples are PHP and use the <a href="http://pecl.php.net/pecl_http>PECL_HTTP</a> extension, because it's awesome, but these examples could be easily adapted to use another language or library.
</blockquote>
<p>
She includes an example of the REST-based URL to fetch the issues (based on the <a href="http://joindin.jira.com">Joind.in Jira tracker</a>), parsing the JSON results and displaying the results as a simple list, looping with a foreach and outputting some HTML.
</p>]]></description>
      <pubDate>Wed, 28 Mar 2012 10:57:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matt Farina's Blog: SplFixedArray, An Underutilized PHP Gem]]></title>
      <guid>http://www.phpdeveloper.org/news/16838</guid>
      <link>http://www.phpdeveloper.org/news/16838</link>
      <description><![CDATA[<p>
<i>Matt Farina</i> has a new post today looking at an "underutilized gem" he's found in the offerings of the Standard PHP Library (SPL) - the <a href="http://engineeredweb.com/blog/11/9/splfixedarray-underutilized-php-gem">SplFixedArray</a>.
</p>
<blockquote>
Arrays in PHP are not arrays per the typical <a href="http://en.wikipedia.org/wiki/Array_data_type">array data type</a>. Instead, as Matt Butcher recently pointed out <a href="http://technosophos.com/content/php-arrays-are-not-arrays">arrays in PHP are similar to hashes in other languages</a>. This can be a very important point to know when tracking down bugs in code and to programmers coming to PHP from other languages. But, what if we wanted something like a traditional array data type? Maybe something that preserved numeric order. Enter <A href="http://engineeredweb.com/blog/11/9/splfixedarray">SplFixedArray</a>.
</blockquote>
<p>
He gives an example of using the SplFixedArray object versus the normal array variables in a simple PHP snippet showing the preservation of numbering order. He also touches on the memory consumption difference between the two, with the fixed array coming in quite a bit lower than the normal array data type (around 25% based on his basic testing). There are some catches to using it, though including incompatibility with array methods and the fact that it doesn't implement things like Iterator or Countable interfaces.
</p>]]></description>
      <pubDate>Fri, 09 Sep 2011 10:43:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Announcing the February 2011 Zend Framework Bug-Hunt]]></title>
      <guid>http://www.phpdeveloper.org/news/15919</guid>
      <link>http://www.phpdeveloper.org/news/15919</link>
      <description><![CDATA[<p>
In a new post to the Zend Developer Zone, <i>Ralph Schindler</i> has posted about this month's <a href="http://devzone.zend.com/article/13063-Announcing-the-February-2011-Zend-Framework-Bug-Hunt-">Bug Hunt Days</a> for the Zend Framework. They start today (Thursday, February 17) and run through Saturday.
</p>
<blockquote>
For those who haven't put the reoccurring event in their calendar, this announcement is for you: Zend Framework Monthly Bug-hunt is here again! This Thursday, Friday and Saturday of February (the 17th, 18th and 19th 2011), we'll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.
</blockquote>
<p>
Last month the event closed 24 issues with a tie for first. If you're wanting to get involved and close even more of <a href="http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=11385&sorter/field=issuekey&sorter/order=ASC">those issues</a>, <a href="http://devzone.zend.com/article/13063-Announcing-the-February-2011-Zend-Framework-Bug-Hunt-">the post</a> has the steps you'll need (including filing a <a href="http://framework.zend.com/cla">CLA</a> with Zend).
</p>]]></description>
      <pubDate>Thu, 17 Feb 2011 06:58:01 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Gthub API: Issues List]]></title>
      <guid>http://www.phpdeveloper.org/news/15717</guid>
      <link>http://www.phpdeveloper.org/news/15717</link>
      <description><![CDATA[<p>
<i>Lorna Mitchell</i> has a handy tip for those PHPers out there that use Github and want to pull off the issues from their project's Issues List quickly and easily - <a href="http://www.lornajane.net/posts/2011/Github-API-Issues-List">use their API</a> (super simple).
</p>
<blockquote>
I looked around for some export functionality for github but I got a lot of posts complaining it wasn't there. Since I hate applications that take your data and refuse to let you remove it, I was disappointed by this news but further inspection showed that although there might be no "export from github" button, there's <a href="http://develop.github.com/p/issues.html">an API that more than has it covered</a>.
</blockquote>
<p>
She gives an example of how to fetch only the currently open issues (the important ones) and pull then back through the API as a JSON message. Her little code snippet uses <a href="http://php.net/file_get_contents">file_get_contents</a>, but this can obviously be adopted to whatever use you might want. You can find out more about the things you can do with the Github API on the <a href="http://develop.github.com">develop.github.com</a> site including features to work with organizations, users, pull requests and <a href="http://gist.github.com">gists</a>.
</p>]]></description>
      <pubDate>Tue, 11 Jan 2011 09:56:26 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukas Smith's Blog: Lets talk about JSON in Symfony2]]></title>
      <guid>http://www.phpdeveloper.org/news/15349</guid>
      <link>http://www.phpdeveloper.org/news/15349</link>
      <description><![CDATA[<p>
<i>Lukas Smith</i> has <a href="http://pooteeweet.org/blog/0/1850#m1850">a new post</a> to his blog looking at some of his experiences with working with JSON in the upcoming version of the Symfony framework (<a href="http://symfony-reloaded.org/">Symfony2</a>), specifically in using the <a href="http://github.com/knplabs/DoctrineUserBundle">DoctrineUserBundle</a> and load views via JSON.
</p>
<blockquote>
Unfortunately right now there are quite a few issues with taking a 3rd party Bundle which wasn't specifically build to be accessible via JSON. So in the end I build a <a href="http://gist.github.com/648702">MultiplexController</a> that can JSON-ify any controller. The name derives from the fact that it also supports calling multiple routes at once and returning all the data from all these routes in one request. But being good OSS citizens here at Liip, we decided to use this opportunity to try and come up with a more sustainable solution. The goal would be to make it essentially possible to have a 3rd party controller return JSON without having to do anything on the controller level.
</blockquote>
<p>
He talks about the "magic" that lets you define the output format you'd like and how it works on the backend with the templating system to use templates based on the requested file. He points out a few issues with the method - a form request problem and that there's no good way to call <a href="http://php.net/json_encode">json_encode</a> from inside a twig template (as well as redirecting after submission).
</p>]]></description>
      <pubDate>Thu, 28 Oct 2010 12:13:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Blue Parabola Blog: How do you measure 'contribution'?]]></title>
      <guid>http://www.phpdeveloper.org/news/12042</guid>
      <link>http://www.phpdeveloper.org/news/12042</link>
      <description><![CDATA[<p>
On the Blue Parabola blog <i>Keith Casey</i> <a href="http://blueparabola.com/blog/how-do-you-measure-contribution">asks the question</a> "how do you measure an individual's contribution?"
</p>
<blockquote>
In the past few weeks, I've been working fast and furious at getting <a href="http://web2project.net/">web2project</a> to our v1.0 milestone.  As part of that effort, I track open issues, problematic modules, community feedback via the forums, death threats via all methods, and other related aspects. 
</blockquote>
<p>
He suggests a few different ideas for measuring how much a user has contributed: lines of code, commit count, issues they've reported, number of issues closed or community involvement. Of course, none of these can truly measure how much an individual has participated in a project, especially since it could be a mix of several of them combined into a whole as the "involvement persona" of any given person.
</p>]]></description>
      <pubDate>Mon, 02 Mar 2009 08:45:19 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonathan Street's Blog: MSN contact grab script included in 'meta' contact grabber]]></title>
      <guid>http://www.phpdeveloper.org/news/7837</guid>
      <link>http://www.phpdeveloper.org/news/7837</link>
      <description><![CDATA[<p>
In his search for "contact grabber" classes, <i>Jonathan Street</i> <a href="http://torrentialwebdev.com/blog/archives/97-MSN-contact-grab-script-included-in-meta-contact-grabber.html">came across</a> one posted to the PHPClasses.org website recently, the <a href="http://www.phpclasses.org/browse/package/3895.html">Contact Grabber</a> class, and decided to give it a shot and report back his findings.
</p>
<blockquote>
I haven't tried it yet but apparently it can connect to hotmail, yahoo, gmail, orkut, rediff and myspace. It is an impressive collection of scripts. [...] Generally speaking I wouldn't have a problem with the script being included in another project. In fact I would encourage it. In this instance though there are a few problems.
</blockquote>
<p>
He breaks it up into a few different kinds of <a href="http://torrentialwebdev.com/blog/archives/97-MSN-contact-grab-script-included-in-meta-contact-grabber.html">issues</a>: inaccuracies, updates, licensing problems, and that the author wouldn't make contact back to <i>Jonathan</i> about some of his problems.
</p>]]></description>
      <pubDate>Mon, 14 May 2007 12:38:00 -0500</pubDate>
    </item>
  </channel>
</rss>
