<?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, 23 May 2013 22:57:37 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Joseph Scott's Blog: Why PHP Strings Equal Zero]]></title>
      <guid>http://www.phpdeveloper.org/news/17679</guid>
      <link>http://www.phpdeveloper.org/news/17679</link>
      <description><![CDATA[<p>
<i>Joseph Scott</i> has a new post to his blog looking at "<a href="http://josephscott.org/archives/2012/03/why-php-strings-equal-zero/">why PHP strings equal zero</a>" - that when you use the "==" operator on a string to compare to zero, it's true.
</p>
<blockquote>
The issue of PHP strings equaling zero has come up a few times recently. [...] Running that will display Equals zero!, which at first glance probably doesn't make much sense. So what is going on here?
</blockquote>
<p>
He gets into the specifics of what's happening - a bit of type jugging, less strict comparison since it's the "==" versus "===" and how the <a href="http://php.net/manual/en/language.types.string.php">PHP manual</a> talks about strings being converted to numbers. 
</p>
<blockquote>
While I still think it is odd that the string gets cast as an integer instead of the other way around, I don't think this is a big deal. I can't recall a single time where I've ever run into this issue in a PHP app. I've only seen it come up in contrived examples like the ones above.
</blockquote>]]></description>
      <pubDate>Thu, 15 Mar 2012 09:47:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ant Phillips' Blog: Singletons, BIRT, Theads and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11975</guid>
      <link>http://www.phpdeveloper.org/news/11975</link>
      <description><![CDATA[<p>
In doing some work with <a href="http://www.projectzero.org/php/">Zero</a> (PHP in Java) and the <a href="http://www.eclipse.org/birt">Eclipse Business Intelligence and Reporting Tools</a> project, <i>Ant Phillips</i> <a href="http://antblah.blogspot.com/2009/02/singletons-and-php.html">had some troubles</a> with multithreaded PHP processes and wanting them all to use the same BIRT instance insted of spawning their own.
</p>
<blockquote>
The problem is that BIRT needs to be started once, and only once, in any given process. Once it has been started up, then it is plain sailing to load reports and render them to HTML. The BIRT runtime should be kept around until the process shuts down. 
</blockquote>
<p>
Two problems came up with this approach - if each PHP process makes its own BIRT process any settings/current data will be wiped out and the BIRT instance would go away whenever the PHP script finishes. He found something that solves both of these problems - the <a href="http://www.projectzero.org/zero/sebring/latest/docs/zero.devguide.doc/zero.core/GlobalContext.html">Zero Global Context</a>. Its a "storage area" that can contain just about anything. He used it to store the BIRT runtime until its told to finish and die off.
</p>]]></description>
      <pubDate>Wed, 18 Feb 2009 12:55:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[An Phillips' Blog: COM/.NET Interop in Zero PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11840</guid>
      <link>http://www.phpdeveloper.org/news/11840</link>
      <description><![CDATA[<p>
<i>Ant Phillips</i> looks a bit at <a href="http://antblah.blogspot.com/2009/01/comnet-interop-in-zero-php.html">some interoperability</a> between the PHP and Project Zero when to comes to using the COM/.NET extension.
</p>
<blockquote>
Zero doesn't currently support the COM/.NET extension in PHP. No matter though, there is a handy open source project called <a href="http://sourceforge.net/projects/jacob-project/">JACOB</a> that bridges between Java and COM/.NET. In fact, there is an easier way to do this using a Groovy library called <a href="http://groovy.codehaus.org/COM+Scripting">Scriptom</a>. This is really just a friendly wrapper around JACOB to provide a better syntax for calling methods and accessing properties. 
</blockquote>
<p>
He also includes a quick introduction and howto on getting the functionality up and working in a Windows environment - download, add the JAR to your path, edit your php.ini and copy and paste some example code in to see it in action.
</p>]]></description>
      <pubDate>Thu, 29 Jan 2009 15:03:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Felix Geisendorfer's Blog: False == 0, or not?]]></title>
      <guid>http://www.phpdeveloper.org/news/8446</guid>
      <link>http://www.phpdeveloper.org/news/8446</link>
      <description><![CDATA[<p>
<i>Felix Geisendorfer</i> has <a href="http://www.thinkingphp.org/2007/08/13/false-0-or-not/">come across something interesting</a> in his coding - an issue where false might not be false in the right situation.
</p>
<blockquote>
So far I've always thought false would evaluate to 0 when used in a computational context. Turns out that this isn't always the case.
</blockquote>
<p>
His <a href="http://www.thinkingphp.org/2007/08/13/false-0-or-not/">code example</a> tries to check is a false value is greater than or equal to a negative number. The result, however (despite the thinking that false is a zero value) turns out to be false.
</p>
<blockquote>
I randomly stumbled upon this when arguing with Mariano today if setting Model::recursive to 'false' has the same effect as setting it to '-1'. Turns out that cake uses a statement like this: if ($recursive > -1) in the core which in turn makes -1 and false do exactly the same thing.
</blockquote>]]></description>
      <pubDate>Tue, 14 Aug 2007 08:45:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Lively's Blog: 81.4 is evil]]></title>
      <guid>http://www.phpdeveloper.org/news/7028</guid>
      <link>http://www.phpdeveloper.org/news/7028</link>
      <description><![CDATA[<p>
On his blog, <i>Mike Lively</i> has a <a href="http://www.ds-o.com/archives/61-81.4-is-evil.html">little reminder</a> for developers out there about working with floating point numbers in your applications, specifically their accuracy.
</p>
<blockquote>
I know many of you all know pretty well that floating point precision and computers don't play nicely with each other. [...] I was working with a piece of code today at the office that was throwing an error saying two values weren't zeroing out when they clearly should have been.
</blockquote>
<p>
<a href="http://www.ds-o.com/archives/61-81.4-is-evil.html">In his code</a> he shows the simple bit that he was using to evaluate if the result of subtraction would come to a certain value. In the comments, others share similar experiences and one even recommends another option to make things a bit more accurate - the <a href="http://www.php.net/manual/en/ref.bc.php">bcmath library</a>.
</p>]]></description>
      <pubDate>Thu, 04 Jan 2007 08:39:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: php|tek Days 0 & 1]]></title>
      <guid>http://www.phpdeveloper.org/news/5244</guid>
      <link>http://www.phpdeveloper.org/news/5244</link>
      <description><![CDATA[<p>
<i>Davey Shafik</i> has already gotten some of his experiences down in blog post form from the php|tek conference today, actually starting with the day previous in his <a href="http://pixelated-dreams.com/archives/225-phptek-Day-0.html">Day 0</a> and <a href="http://pixelated-dreams.com/archives/226-phptek-Day-1.html">Day 1</a> posts.
</p>
<p>
In the <a href="http://pixelated-dreams.com/archives/225-phptek-Day-0.html">Day 0 post</a> he just mentions arriving at the conference and getting things ready, but <a href="http://pixelated-dreams.com/archives/226-phptek-Day-1.html">Day 1</a> sees him giving his "Future Deployment of PHP Applications" talk and his upcoming "Migration to PHP 5.1".
</p>
<p>
He also mentions videoing the presentation from today ("Deployment" talk) and is hoping to get a Flash video of the presentation up for all to see post-conference (a great idea for non-attendees).
</p>]]></description>
      <pubDate>Wed, 26 Apr 2006 16:18:33 -0500</pubDate>
    </item>
  </channel>
</rss>
