<?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 00:30:21 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPro.org: Read Line From File (stream_get_line)]]></title>
      <guid>http://www.phpdeveloper.org/news/12392</guid>
      <link>http://www.phpdeveloper.org/news/12392</link>
      <description><![CDATA[<p>
The PHPro.org website has <a href="http://www.phpro.org/examples/Read-Line-From-File.html">a quick new tutorial</a> about a method (using streams) to get the information from a certain line of a file.
</p>
<blockquote>
Reading files in PHP can be a tricky business if not handled correctly. Most often when confronted with reading a line from, the nearest tool to hand is the file() function. The problem with using the file() function is that it reads the whole file into an array, and thus, into memory [...] A better, and more efficient way is to loop through the file stream using the stream_get_line() function. Care still needs to be taken to clear the buffer on each iteration, or the same problem could potentially arise as with the file() method. 
</blockquote>
<p>
The code calls <a href="http://php.net/fopen">fopen</a> on the file and, while it's not the end of the file, uses the <a href="http://php.net/stream_get_line">stream_get_line</a> function to grab things a line at a time. This saves you from having to read in the entire file (like with a <a href="http://php.net/file_get_contents">file_get_contents</a> or <a href="http://php.net/file">file</a> - especially good for large files.
</p>]]></description>
      <pubDate>Thu, 23 Apr 2009 09:36:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Solar Blog: Solar CLI - Make-Model]]></title>
      <guid>http://www.phpdeveloper.org/news/12114</guid>
      <link>http://www.phpdeveloper.org/news/12114</link>
      <description><![CDATA[<p>
The Solar blog has been updated <a href="http://solarphp.com/blog/read/29-solar-cli-make-model">this a new post</a> continuing on the look at the Solar CLI (started <a href="http://solarphp.com/blog/read/27-solar-cli-getting-started">here</a>) and its "make-model" command.
</p>
<blockquote>
This entry is a <a href="http://solarphp.com/blog/read/27-solar-cli-getting-started">continuation</a> of the Solar CLI series--a series that aims to detail Solar CLI commands, available options, parameters, and usage examples. In this entry we take a look at make-model, a command that can generate models based on a SQL table.
</blockquote>
<p>
<a href="http://solarphp.com/blog/read/29-solar-cli-make-model">The post</a> goes through the available options and parameters that you can give the command to make things easier and includes an example of running the "make-model" on a table in a MySQL database (with the code to add to your Solar configuration file to match).
</p>]]></description>
      <pubDate>Wed, 11 Mar 2009 11:12:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Using the Xdebug Extension's xdebug_call_function() Function ]]></title>
      <guid>http://www.phpdeveloper.org/news/11913</guid>
      <link>http://www.phpdeveloper.org/news/11913</link>
      <description><![CDATA[<p>
<a href="http://www.devshed.com/c/a/PHP/Using-the-Xdebug-Extensions-xdebugcallfunction-Function/">This new tutorial</a> from DevShed takes a look at the XDebug debugging tool for PHP and how the xdebug_call_function method allows for even more flexibility in your testing experience.
</p>
<blockquote>
The Xdebug extension comes equipped with many other functions, however, that allow you to debug PHP applications more deeply. Therefore, in this second article of the series, I'll be discussing how to use another useful function included with the extension, called "xdebug_call_function()," which as its name suggests, can be utilized for keeping track of the functions called by a PHP script.
</blockquote>
<p>
They start with <a href="http://www.devshed.com/c/a/PHP/Using-the-Xdebug-Extensions-xdebugcallfunction-Function/1/">a look back</a> at two of the other xdebug functions - xdebug_call_file and xdebug_call_line - before showing how to use this new function (xdebug_call_function) to get the function that called your custom handler.
</p>]]></description>
      <pubDate>Mon, 09 Feb 2009 12:56:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Richard Heyes' Blog: Reading a specific line in a file]]></title>
      <guid>http://www.phpdeveloper.org/news/9925</guid>
      <link>http://www.phpdeveloper.org/news/9925</link>
      <description><![CDATA[<p>
<i>Richard Heyes</i> has <a href="http://www.phpguru.org/article.php/266">thrown together</a> some code for a simple thing that he's seen developers request over and over again - moving to/reading from a specific line in a file.
</p>
<blockquote>
After reading something on the php-general list I decided that a) I'm bored, and b) I'll write something which handles it. So <a href="http://www.phpguru.org/downloads/LineReader/">here</a> it is.
</blockquote>
<p>
His code is simple - looping through the lines of the file until it locates your desired target (with some error checking along the way). Plus, if it's already fetched, it keeps it in a cached array for future retrieval.
</p>]]></description>
      <pubDate>Mon, 07 Apr 2008 12:56:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: PHP Manual CLI style 2.0]]></title>
      <guid>http://www.phpdeveloper.org/news/9142</guid>
      <link>http://www.phpdeveloper.org/news/9142</link>
      <description><![CDATA[<p>
Sometimes, you just can't get to a web browser to look up something from the PHP manual (or might not want to). Another option is the command line and in <a href="http://www.sitepoint.com/blogs/2007/11/28/php-manual-cli-style-20/">this new post</a> to the SitePoint PHP blog, <i>Troels Knak-Nielsen</i> shows you a method for getting the entire manual entry right at your prompt neatly formatted.
</p>
<blockquote>
One thing, I missed with either of the two [other solutions mentioned], was the ability to see the entire manual entry. It's quite often, that the manual actually holds useful information (Who'd known that!), so I find myself using <a href="http://www.php.net/">www.php.net</a> a lot. Or I did, until I decided to do something about it. Now, shell-scripting isn't what I spent most of my time on, so it's not with out a bit of pride, that I present to you phpm two-oh.
</blockquote>
<p>
Most of the rest of <a href="http://www.sitepoint.com/blogs/2007/11/28/php-manual-cli-style-20/">the post</a> is his bash script ready top cut and paste as well as some simple instructions on getting it working. (An emacs bonus is also included - a method for binding the script to a key to act on the current word.)
</p>]]></description>
      <pubDate>Thu, 29 Nov 2007 09:35:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mikko Koppanen's Blog: Creating a simple line graph]]></title>
      <guid>http://www.phpdeveloper.org/news/8843</guid>
      <link>http://www.phpdeveloper.org/news/8843</link>
      <description><![CDATA[<p>
<i>Mikko Koppanen</i> has <a href="http://valokuva.org/?p=60">another post</a> to his blog today that once again shows the combination of PHP and Imagick to create/output an image - this time, it's a simple line graph.
</p>
<blockquote>
This example demonstrates how Imagick can be used to create graphs. This graphing class itself is mostly a demonstrative example. There are also some hardcoded values in the graph (like the steps in the values on the left hand side) but it should not be hard to refine it into a more elegant graphing solution.
</blockquote>
<p>
The <a href="http://valokuva.org/?p=60">graph</a> is made using the Imagick drawing functions that extends the standard "draw" class. The code produces a graph with a (straight) line drawn from point to point - code and output examples are both included.
</p>]]></description>
      <pubDate>Mon, 15 Oct 2007 12:55:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Wenz's Blog: phpa-norl, a phpa port for Mac OS X and Windows]]></title>
      <guid>http://www.phpdeveloper.org/news/8198</guid>
      <link>http://www.phpdeveloper.org/news/8198</link>
      <description><![CDATA[<p>
On the Hauser & Wenz blog today, <i>Christian Wenz</i> <a href="http://www.hauser-wenz.de/s9y/index.php?/archives/237-phpa-norl,-a-phpa-port-for-Mac-OS-X-and-Windows.html">points out</a> a patched version of the interactive command line PHP client, <a href="http://david.acz.org/phpa/">phpa</a> to work on a Mac OS X machine - <a href="http://www.fischerlaender.net/php/phpa-norl">phpa-norl</a>.
</p>
<blockquote>
phpa is <a href="http://david.acz.org/phpa/">an interactive command line shell for PHP</a> by David Phillips. <a href="http://www.fischerlaender.net/">Stefan Fischerlander</a>, usually known as a SEO expert and Perl admirer, has patched phpa for Mac OS X and Windows (the default builds theredo not seem to support a feature required by phpa). The result: <a href="http://www.fischerlaender.net/php/phpa-norl">phpa-norl</a>. Stefan successfully ran this on OS X, and I could confirm that it runs on Windows, as well
</blockquote>
<p>
He <a href="http://www.hauser-wenz.de/s9y/index.php?/archives/237-phpa-norl,-a-phpa-port-for-Mac-OS-X-and-Windows.html">also mentions</a> some features of the client including a history feature that makes looking back through previous commands simple.
</p>]]></description>
      <pubDate>Mon, 09 Jul 2007 07:58:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Felix Geisendorfer's Blog: Command line fun in CakePHP 1.2]]></title>
      <guid>http://www.phpdeveloper.org/news/6501</guid>
      <link>http://www.phpdeveloper.org/news/6501</link>
      <description><![CDATA[<p>
On his ThinkingPHP blog today, <i>Felix Geisendorfer</i> hands out mor eCakePHP goodness with <a href="http://www.thinkingphp.org/2006/10/16/command-line-fun-in-cakephp-12/">some talk about</a> working with the popular CakePHP framework in an unlikely place - on the command line with the "bake" utility.
</p>
<p>
The "bake" utility is included with the CakePHP distribution and helps a developer scaffold out an application with minimal effort. Things have been changed in the recent distributions, though:
</p>
<blockquote>
Unlike the old bake.php, which was only used to auto-generate code for you, this one follows a much cooler concept. The main idea is to have an interface to a wide variety Tasks.
</blockquote>
<p>
The new and improved "bake" program takes the tasks created and builds out a bit more functionality than just the scaffolding as the version before did. <i>Felix</i> <a href="http://www.thinkingphp.org/2006/10/16/command-line-fun-in-cakephp-12/">includes an example</a> of a task (a simple echo) just to show how it's formatted.
</p>]]></description>
      <pubDate>Mon, 16 Oct 2006 07:18:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPit.net: PHP on the command line]]></title>
      <guid>http://www.phpdeveloper.org/news/4977</guid>
      <link>http://www.phpdeveloper.org/news/4977</link>
      <description><![CDATA[PHPit.net has posted another new tutorial, this time they <a href="http://www.phpit.net/article/php-on-command-line/">look at the command-line</a>, providing the basics to those that have only used PHP in the web-based world.
<p>
<quote>
<i>
PHP is traditionally only used on the internet to power our websites, but it's also capable of doing more. Since version 4.3 PHP ships with a special version which can be used to execute scripts on the command line, and do certain system tasks. If you're a Linux user, you probably know what the command line is, but if you're a Windows user you might not.
</i>
</quote>
<p>
They <a href="http://www.phpit.net/article/php-on-command-line/">show the code/commands</a> in the examples they give in the context of it running on a Windows machine, but it's not a far leap to work with it on a unix-based system as well. They start with the basics - how to get to it, how to use it - before moving on to other features, like taking in arguments. They wrap it up with a sample application, a calculator, that can do the four basic operations on the two numbers entered.]]></description>
      <pubDate>Mon, 13 Mar 2006 07:26:42 -0600</pubDate>
    </item>
  </channel>
</rss>
