<?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>Tue, 21 May 2013 08:44:30 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[David Otton's Blog: Neat PHP Tricks: How To Assign References to Globals]]></title>
      <guid>http://www.phpdeveloper.org/news/11375</guid>
      <link>http://www.phpdeveloper.org/news/11375</link>
      <description><![CDATA[<p>
<i>David Otton</i> has a new <a href="http://www.otton.org/2008/11/09/neat-php-tricks-assign-references-globals-workaround/">neat PHP trick</a> posted today - assigning references to global values.
</p>
<blockquote>
What follows isn't so much a PHP trick as a fix for something that really should work, but doesn't. Although the manual implies that the behaviour described below is specific to Zend Engine 1, all my tests were performed against Zend Engine 2.2, PHP 5.2.5.
</blockquote>
<p>
His example compares making a new stdClass both with and without a reference on the it and <a href="http://www.php.net/var_dump">var_dumps</a> out the result. The method with the reference fails silently, however and isn't able to correctly assign it to the global. He recommends a work-around though - setting it directly to the $GLOBALS superglobal.
</p>]]></description>
      <pubDate>Mon, 10 Nov 2008 09:32:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP F1: PHP Session Tutorial]]></title>
      <guid>http://www.phpdeveloper.org/news/8212</guid>
      <link>http://www.phpdeveloper.org/news/8212</link>
      <description><![CDATA[<p>
If you're just getting started with PHP, some things can be a bit confusing. For a lot of developers, sessions seem to hold a bit of mystery and can be difficult to use. To help combat this, PHP F1 has posted <a href="http://www.phpf1.com/tutorial/php-sessions.html">this new tutorial</a> to demystify this super-handy PHP functionality.
</p>
<blockquote>
In this tutorial I will show you how to work with sessions in PHP. You will learn how to transfer information between pages. [...] Using sessions you can transfer data between various pages. If you are using sessions then each of your visitors will got a unique id. This id will identify various visitors and with the help of this id are the user data stored on the server.
</blockquote>
<p>
They introduce what sessions are (the concept behind them), some of the php.ini settings that can be used to change how they work and code to work with assigning values to a session, checking for values in them and removing/destroying the session and its information.
</p>]]></description>
      <pubDate>Tue, 10 Jul 2007 08:46:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Integrating Smarty with the Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/5109</guid>
      <link>http://www.phpdeveloper.org/news/5109</link>
      <description><![CDATA[For anyone that's using or wanted to use Smarty in the future and has been looking into the Zend Framework, you might have hesitated until you know how to tie them both together. Well, wait no more! <a href="http://devzone.zend.com/node/view/id/120">This new post</a> from the Zend Developer Zone shows you exactly how.
<p>
<quote>
<i>
Inspired by this article I started to play around a bit to integrate the Smarty template engine into the Zend Framework. My ambition was to minimize the required code in the controller actions but stay close to the given Zend_View API. I also wanted to integrate the Smarty caching feature. Here is the code I came up with.
</i>
</quote>
<p>
He <a href="http://devzone.zend.com/node/view/id/120">sets up</a> a directory under his Zend library include path for the templates to live in and starts writing code. The first step is a class that's based off the Zend_View_Abstract class to set the initial Smarty variables. He follows this up with serveral methods - __run, assign, and escape before displaying the results with output(). 
<p>
Finally, he gives an example of how to use the class he's created to spit out a Smarty template with all of the data nicely in place.
<p>
More information on the Zend Framework can be found at <a href="http://framework.zend.com">framework.zend.com</a>, and information on Smarty at <a href="http://smarty.php.net/">smarty.php.net</a>]]></description>
      <pubDate>Wed, 05 Apr 2006 07:22:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Kimsal's Blog: Bizarre PHP behaviour]]></title>
      <guid>http://www.phpdeveloper.org/news/4856</guid>
      <link>http://www.phpdeveloper.org/news/4856</link>
      <description><![CDATA[In a <a href="http://fosterburgess.com/kimsal/?p=38">new post</a> on his blog today, <i>Michael Kimsal</i> looks at an abnormality that he's disocvered with constants in PHP.
<p>
<quote>
<i>
Chalk this up as par for the course in the world of PHP, but it doesn't behave as documented. I noticed today that @ work someone is creating database connections, then define()ing the result into a constant. I presumed this was failing silently and because we were generally connecting to only one database (or so I thought initially) that it was simply using the last open connection and still working.
<p>
This does *not* throw an error, but does in fact work. Even going back to PHP 4.3.2 (earliest I've checked). This flies in the face of my understanding of constants for years - well, since 1998 (perhaps earlier) or so.
</i>
</quote>
<p>
<a href="http://fosterburgess.com/kimsal/?p=38">the issue</a> - that a resource can be assigned to a constant - seems to contradict what's listed in <a href="http://us2.php.net/manual/en/language.constants.php">the manual</a>, and he asks later if there are others out there that have seen this same issue...]]></description>
      <pubDate>Thu, 16 Feb 2006 14:40:59 -0600</pubDate>
    </item>
  </channel>
</rss>
