<?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 07:41:10 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jani Hartikainen: Parsing and evaluating PHP in Haskell: Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19079</guid>
      <link>http://www.phpdeveloper.org/news/19079</link>
      <description><![CDATA[<p>
<i>Jani Hartikainen</i> has posted the <a href="http://codeutopia.net/blog/2013/01/23/parsing-and-evaluating-php-in-haskell-part-2/">second article</a> in his series looking at parsing PHP with Haskell (part one is <a href="http://phpdeveloper.org/news/19052">here</a>). In this new article he builds on the parser he built last time and gets to the actual evaluation of the PHP code.
</p>
<blockquote>
Last week I wrote a post about a PHP parser / evaluator I wrote in Haskell. I explained some of the parts on how the parser itself was designed to process PHP code into an abstract source tree. Continuing from where we left off in the <a href="http://codeutopia.net/blog/2013/01/16/parsing-and-evaluating-php-in-haskell-part-1/">previous part</a>, in this post I'll discuss the actual evaluation part.
</blockquote>
<p>
He starts by introducing the structure of the evaluator script, how it's broken up into functionality based on the type of object/data type being handled. He uses a "custom monad transformer stack" to handle the environment for the evaluation as is progresses. He talks about handling statements and expressions, declaring custom functions and the actual execution of the function call. There's also a mention of handling conditionals/looping as well as dealing with PHP's type juggling. 
</p>
<p>
if you're interested in seeing the final result (and maybe trying it out for yourself) you can find the <a href="https://github.com/jhartikainen/hs-language-php">full source on Github</a>.
</p>]]></description>
      <pubDate>Wed, 23 Jan 2013 11:24:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPRefresh.com: Managing Sessions and State with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19024</guid>
      <link>http://www.phpdeveloper.org/news/19024</link>
      <description><![CDATA[<p>
In <a href="http://www.phpfresher.com/php/managing-sessions-and-state-with-php/">this new tutorial</a> on the PHPRefresher.com site, <i>Anand Godar</i> walks you through just about all of the session functionality that comes with PHP and includes some code snippets for explanation.
</p>
<blockquote>
Due to the fast evolution of Web programming, the stateless nature of the HTTP protocol brought many problems to certain Web applications that required maintaining their state across several HTTP requests. This demanded a rapid development of several mechanisms aimed at tackling this issue through diverse methods. Then a session management emerged as a direct response to the above mentioned problem, and currently this mechanism is being used by PHP developers worldwide, in cases where a Web application needs to keep track of its "state" during the occurrence of different HTTP requests.
</blockquote>
<p>
The article starts off with the basics of sessions - what they are, how they're handled and created by PHP - and moves into the specific functions and their use. He talks about starting/ending sessions, their IDs, caching, module handling and working directly with the session cookie (if it exists).
</p>]]></description>
      <pubDate>Fri, 11 Jan 2013 10:25:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Nexen.net: PHPInfo() Stats - Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/6748</guid>
      <link>http://www.phpdeveloper.org/news/6748</link>
      <description><![CDATA[<p>
<i>Damien Seguy</i> has continued his series looking at PHP configurations around the web and is sharing the results in the form of two <a href="http://www.nexen.net/articles/dossier/phpinfos_stats_:_part_2.php">new</a> <a href="http://www.nexen.net/articles/dossier/php_configuration_statitstics.php">reports</a> over on Nexen.net.
</p>
<blockquote>
I just published the second part of the serie about PHP configurations.
This part focuses on three aspects of PHP: PHP extensions, PHP streams, and disabled functions.
</blockquote>
<p>
You can find the statistics themselves <a href="http://www.nexen.net/articles/dossier/phpinfos_stats_:_part_2.php">here</a> and the latest configuration statistics <a href="http://www.nexen.net/articles/dossier/php_configuration_statitstics.php">here</a>. It's interesting to see the drop-off when it comes to the various modules that are installed ("php, ftp and http are the most common. Besides them, tough luck.") and to see the somewhat more gradual curve of which functions are disabled - with system() topping out the list (with good reason).
</p>]]></description>
      <pubDate>Tue, 21 Nov 2006 10:51:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Classes as PHP Functions]]></title>
      <guid>http://www.phpdeveloper.org/news/5985</guid>
      <link>http://www.phpdeveloper.org/news/5985</link>
      <description><![CDATA[<p>
Continuing on in their "PHP functions" series today, DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Classes-as-PHP-Functions/">this next step</a> up the ladder, getting more advanced with the functions they're working with. This time, there's a focus on functions inside classes and creating the classes around them (a sort of introduction to object-oriented programming).
</p>
<blockquote>
Continuing our PHP functions article, we move on to creating classes. Let me say right at the start that you can write perfectly effective and useful PHP code without creating classes or going into object oriented programming. Object oriented programming can be very powerful and PHP programmers are increasingly taking advantage of these capabilities, which have been greatly expanded since PHP4.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Classes-as-PHP-Functions/">start with the creation</a> of a simple class - a human class with two $legs and two $arms. They show a simple display of this data and add another attribute to the class, one for hair color. They then capture the output they've been creating inside a function, report, and show how to execute it. Finally, they show how to use the special function that runs when the object is created - the constructor.
</p>]]></description>
      <pubDate>Wed, 09 Aug 2006 05:49:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jacob Santos' Blog: Global Functions and How to Not Use Them]]></title>
      <guid>http://www.phpdeveloper.org/news/5979</guid>
      <link>http://www.phpdeveloper.org/news/5979</link>
      <description><![CDATA[<p>
In his <a href="http://www.santosj.name/?p=274">latest post</a>, <i>Jacob Santos</i> talks about global functions and some of the dangers behind using them in your code (as per his own experience debugging with them in place).
</p>
<blockquote>
When I develop in PHP and code functions, I always either place them in a file or place them at the top of the script. Well, this is more about C++ and how I totally freaked out my teacher, by breaking his paradigm of thought. You see, you can have a definition of a function at the top of the page and then code the body of the function later.
</blockquote>
<p>
He <a href="http://www.santosj.name/?p=274">soon discovered</a> his problem in debugging the script - he was too used to having the global functions at the top (as in C++) and not mixed in with the code - or at the bottom of the script. 
</p>
<blockquote>
If there is something at least somewhat common about popular scripts that people use and extend, is that the functions are placed in organized manner. Reforming otherwise is a bitch and I remember rewriting the entire script anyway. You can't reform when you can't reuse anything.
</blockquote>]]></description>
      <pubDate>Tue, 08 Aug 2006 06:26:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Greg Beaver's Blog: phpDocumentor and __get/__set/__call - give us your ideas (RFC)]]></title>
      <guid>http://www.phpdeveloper.org/news/5793</guid>
      <link>http://www.phpdeveloper.org/news/5793</link>
      <description><![CDATA[<p>
In his latest post today, <i>Greg Beaver</i> is also <a href="http://greg.chiaraquartet.net/archives/140-phpDocumentor-and-__get__set__call-give-us-your-ideas-RFC.html">taking a look</a> at phpDocumentor and some of the documentation methods it allows, noting that providing the right notes on the "magic" functions has always been a point of difficulty.
</p>
<blockquote>
One of the trickier feature requests for phpDocumentor has been documenting "magic" object properties and methods. By "magic" I am referring to properties and methods that are created dynamically by PHP 5.0+ userspace class methods __get, __set, __isset, __unset and __call. 
</blockquote>
<p>
He <a href="http://greg.chiaraquartet.net/archives/140-phpDocumentor-and-__get__set__call-give-us-your-ideas-RFC.html">gives a code example</a> of creating properties and a magic function (borp). To illustrate his point, he tries to specify the phpDocumentor format that would go with it - not an exact match, but with the help o ffour new tags it's made easier: @property, @property-read, @property-write, and @method.
</p>]]></description>
      <pubDate>Fri, 14 Jul 2006 06:06:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[JellyandCustard.com: Regular Expressions in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5656</guid>
      <link>http://www.phpdeveloper.org/news/5656</link>
      <description><![CDATA[<p>
In <a href="http://www.jellyandcustard.com/2006/06/13/regular-expressions-in-php/">a post</a> from JellyandCustard.com, there's an inside look at regular expressions in PHP - how to use them and what they are.
</p>
<blockquote>
Regular Expressions (regex for short) appear to a lot of people as the 'black art' of coding. Most languages, be it PHP, Java, C, .NET, VB etc have a way of using regular expressions - and they can certainly make your job easier. So lets start on our journey into regular expressions. I am by no means an expert, but hopefully I'll be able to clear the fog that surrounds regular expressions!
</blockquote>
<p>
He <a href="http://www.jellyandcustard.com/2006/06/13/regular-expressions-in-php/">mentions</a> the functions to use and provides a simple example of matching a phone number (US format). They take the regular expression string and break it down into its pieces, explaining how each one works (and relates to the other parts of the expression). They also provide a brief "cheat sheet" of some of the other special characters (including common uses on some).
</p>]]></description>
      <pubDate>Thu, 22 Jun 2006 07:03:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Adding Methods to the Query Processor in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5440</guid>
      <link>http://www.phpdeveloper.org/news/5440</link>
      <description><![CDATA[<p>
DevShed has posted the <a href="http://www.devshed.com/c/a/PHP/Adding-Methods-to-the-Query-Processor-in-PHP/">second part</a> of their "Network Programming in PHP" series today - this time, they enhance the QueryProcessor class they've developed with even more functionality.
</p>
<quote>
<i>
At this point I guess that all the networking PHP built-in functions that I covered in the first article, such as the "gethostbyaddr()", "gethostbyname()", "gethostbynamel()" functions are already familiar to you. So now I will explain what new things you'll learn in this second article of the series. Since I want to continue expanding the "QueryProcessor" class that I coded previously, this installment will focus on adding more methods to it, by using other useful PHP network functions, aimed particularly at running popular Windows networking applications, like "ipconfig," "netstat" and more.
</i>
</quote>
<p>
If you didn't get a change to check out part one, it's definitely suggested that you <a href="http://www.phpdeveloper.org/news/5391">do so</a> before you start on <a href="http://www.devshed.com/c/a/PHP/Adding-Methods-to-the-Query-Processor-in-PHP/">this section</a>. As mentioned, they're going to show you how to add other functionality to the class, including the ability to ping another server, check the current machine's network settings, perform a "netstat" command, and get the MX records for a hostname. At the end, they stick it all together in the complete (so far) class for easy cut and paste.
</p>]]></description>
      <pubDate>Wed, 24 May 2006 12:15:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Using Advanced Functions to Maintain the State of Applications with PHP Sessions]]></title>
      <guid>http://www.phpdeveloper.org/news/5307</guid>
      <link>http://www.phpdeveloper.org/news/5307</link>
      <description><![CDATA[<p>
DevShed continues their "Managing the State of Applications with PHP Sessions" with <a href="http://www.devshed.com/c/a/PHP/Using-Advanced-Functions-to-Maintain-the-State-of-Applications-with-PHP-Sessions/">this new tutorial</a>, part two looking at the more advanced features that PHP has to offer to developers working with sessions.
</p>
<quote>
<i>
<p>
This is part two of the series "Maintaining the state of applications with PHP sessions." In three parts, this series ranges from the basics of session management in PHP, such as creating, registering session data, and destroying sessions, to exploring advanced concepts, like working with different session storage modules and creating custom session handling objects.
</p>
<p>
In this article I'll take a look at them, in order to demonstrate with several code samples how to use them and how to take advantage of their many capabilities. Hopefully, when you finish reading this article, you should have a decent understanding of how to include advanced session handling routines within your own PHP-driven applications.
</p>
</i>
</quote>
<p>
They start with the <a href="http://www.devshed.com/c/a/PHP/Using-Advanced-Functions-to-Maintain-the-State-of-Applications-with-PHP-Sessions/1/">introduction</a> to the session_set_save_handler function, making it simple to adjust how your script deals with sessions. This sets the stage for the next step in the tutorial - the creation of a MySQL handling system to store the visitor's session data. They wrap it all up with the code for the MySQL functions you'll need to get it all working, including handlers for saving, updating, and removing the session data that's in place.
</p>]]></description>
      <pubDate>Thu, 04 May 2006 08:00:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Introduction to Maintaining the State of Applications with PHP Sessions]]></title>
      <guid>http://www.phpdeveloper.org/news/5253</guid>
      <link>http://www.phpdeveloper.org/news/5253</link>
      <description><![CDATA[<p>
DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Introduction-to-Maintaining-the-State-of-Applications-with-PHP-Sessions/">a tutorial</a> that talkes about a simple way to keep track of user information (or any other info) as a user navigates your site - using PHP sessions.
</p>
<quote>
<i>
<p>
In PHP, session management is used to help web applications maintain their state across several HTTP requests when needed. In this first part of a series, you will learn the basics of the PHP built-in session mechanism, as well as some of its many useful functions.
</p>
<p>Since PHP sessions are one of those things that sooner or later you must learn as a PHP developer, in this article I shall provide an overview of them. I will begin with the basics of how to use them, highlighting their strong points and weaknesses, and finally explore some of their most advanced concepts. By the end of this series, you should have all the knowledge that you need to start using the most common PHP session management functions, so you can use them during the development of your own applications.
</p>
</i>
</quote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Introduction-to-Maintaining-the-State-of-Applications-with-PHP-Sessions/">explain</a> the basics of sessions and how they can be used in your apps, how to destroy a session, some of the variou ssession functions, and how you can configure your sessions and session hander to fit your needs.
</p>]]></description>
      <pubDate>Thu, 27 Apr 2006 07:03:05 -0500</pubDate>
    </item>
  </channel>
</rss>
