<?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>Fri, 24 May 2013 16:42:37 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Amazium Blog: PHP in the Dark: Input/Output]]></title>
      <guid>http://www.phpdeveloper.org/news/16815</guid>
      <link>http://www.phpdeveloper.org/news/16815</link>
      <description><![CDATA[<p>
On the Amazium blog <i>Jeroen Keppens</i> has a recent post looking at some of tools available to you when needing to <a href="http://www.amazium.com/blog/php-in-the-dark-input-output">filter input and escape output</a> in your applications. This post specifically covers filtering on command line applications.
</p>
<blockquote>
When you need data input in a web context, you send a GET/POST request to your script. On the command line, things work differently. In this blog post, we will talk obout input and output in php-cli.
</blockquote>
<p>The post is broken up into a few different sections:</p>
<ul>
<li><a href="http://www.amazium.com/blog/php-in-the-dark-input-output/#arguments">Handling arguments</a>
<li><a href="http://www.amazium.com/blog/php-in-the-dark-input-output/#file_descriptors">File descriptors</a>
<li><a href="http://www.amazium.com/blog/php-in-the-dark-input-output/#interactive_input">Interactive input</a>
<li><a href="http://www.amazium.com/blog/php-in-the-dark-input-output/#resources">Resources mentioned in the post</a>
</ul>
<p>
Tools mentioned include everything from <a href="http://php.net/getopt">getopt</a> and <a href="http://pear.php.net/package/Console_Getopt">PEAR's' Console_Getopt</a> out to using file descriptors and working with readline.
</p>]]></description>
      <pubDate>Mon, 05 Sep 2011 11:25:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Stocker's Blog: FOTD: REFLECTIONCLASS()->NEWINSTANCEARGS($ARGS) is "slow"]]></title>
      <guid>http://www.phpdeveloper.org/news/11041</guid>
      <link>http://www.phpdeveloper.org/news/11041</link>
      <description><![CDATA[<p>
<i>Christan Stocker</i> has posted a <a href="http://blog.liip.ch/archive/2008/09/18/fotd-reflectionclass-newinstanceargs-args-is-slow.html">finding of the day</a> that he ran across and wanted to share to help out other developers out there:
</p>
<blockquote>
For okapi we needed to have a function which loads any class with any number of arguments. This is not so easy in PHP as it looks like [...] Since 5.1.3 you can use the reflection extension to do this much nicer.
</blockquote>
<p>
The difference comes in at about half the time for both side of the examples - with the switch and via reflection.
</p>]]></description>
      <pubDate>Thu, 18 Sep 2008 13:17:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPHacks.com: Shell Scripting with PHP CLI]]></title>
      <guid>http://www.phpdeveloper.org/news/5994</guid>
      <link>http://www.phpdeveloper.org/news/5994</link>
      <description><![CDATA[<p>
On PHPHacks.com, there's <a href="http://www.phphacks.com/content/view/32/33/">a new tutorial</a> that covers a a use for PHP that's not utilized nearly enough - working with it on the command line, shell scripting.
</p>
<blockquote>
<p>
As most of us already know, PHP is the best language for developing dynamic web pages available today. Not many people are aware that it can be used as a shell scripting language as well. While PHP as a shell script isn't as robust as Bash or Perl it does have definite advantages, especially if you're like me and are more proficient in PHP than you are in Perl.
</p>
<p>
The requirements for using PHP as a shell language is that you must compile PHP as a CGI binary instead of as an Apache module. There are certain security issues related to this so please refer to the PHP Manual when doing so.
</p>
</blockquote>
<p>
The author shows <a href="http://www.phphacks.com/content/view/32/33/">a simple example first</a>, just outputting information. He also demonstrates how to grab the input parameters and how to read in from the command line interactively (both single lines and multiple).
</p>]]></description>
      <pubDate>Wed, 09 Aug 2006 15:47:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tnx.nl: PHP in Contrast to Perl]]></title>
      <guid>http://www.phpdeveloper.org/news/5415</guid>
      <link>http://www.phpdeveloper.org/news/5415</link>
      <description><![CDATA[<p>
As long as people "choose sides" when it comes to programming languages, there will always be articles <a href="http://tnx.nl/php">like this</a> to compare them. This time, it's a look at PHP versus another much-loved language, Perl.
</p>
<p>
<a href="http://tnx.nl/php">The article</a> takes a look at several different topics under this one umbrella, including:
<ul>
<li>Arguments and return values are extremely inconsistent
<li>PHP has inconsistent function naming
<li>PHP has no lexical scope
<li>PHP has too many functions in the core
</ul>
</p>
<p>
Obviously, they all seem to take a negative slant on PHP, but they do provide some content under each of the headings to back up their claims. They break out the contents of each of these examples to make comparison of Perl's and PHP's similar functionality easier. At the end, they also provide links to other resources and other posters illustrating some of the points <a href="http://tnx.nl/php">they've shown</a>.
</p>]]></description>
      <pubDate>Mon, 22 May 2006 06:21:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Codewalkers.com: Named Arguments Discussion on PHP Mailing List]]></title>
      <guid>http://www.phpdeveloper.org/news/4678</guid>
      <link>http://www.phpdeveloper.org/news/4678</link>
      <description><![CDATA[On Codewalkers.com today, there's a note about an <a href="http://marc.theaimsgroup.com/?t=113333514300001&r=1&w=2">interesting bit of discussion</a> going on over on the PHP mailing lists dealing with "named arguments".
<p>
<quote>
<i>
There is an interesting discussion going on in the internals list on whether or not to have named arguements in php6. The start of the discussion is <a href="http://marc.theaimsgroup.com/?t=113333514300001&r=1&w=2">here</a> with a break off thread <a href="http://marc.theaimsgroup.com/?t=113680871600002&r=1&w=2">here</a>.
</i>
</quote>
<p>
Named arguments would allow you do to something like this:
<p>
<code>
testFunc(name:"test",vals:"stuff")
</code>
<p>
Naming the items in the code and allowing them to be accessed via one variable internal to the function. There are some pretty good arguments on both sides of things, but it still doesn't seem like it's going to be taken much further than this...]]></description>
      <pubDate>Tue, 17 Jan 2006 06:54:21 -0600</pubDate>
    </item>
  </channel>
</rss>
