<?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>Sat, 18 May 2013 04:28:31 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Nikic's Blog: How big are PHP arrays (and values) really? (Hint: BIG!)]]></title>
      <guid>http://www.phpdeveloper.org/news/17270</guid>
      <link>http://www.phpdeveloper.org/news/17270</link>
      <description><![CDATA[<p>
In <a href="http://nikic.github.com/2011/12/12/How-big-are-PHP-arrays-really-Hint-BIG.html">this recent blog post</a> <i>nikic</i> takes an in-depth look at <a href="http://nikic.github.com/2011/12/12/How-big-are-PHP-arrays-really-Hint-BIG.html">how large PHP arrays really are</a> - how memory is used in the creation and management of these handy PHP variable types.
</p>
<blockquote>
In this post I want to investigate the memory usage of PHP arrays (and values in general) using the following script as an example, which creates 100000 unique integer array elements and measures the resulting memory usage. [...] How much would you expect it to be? [...] Now try and run the above code. <a href="http://codepad.viper-7.com/pjB3Wm">You can do it online if you want</a>. This gives me 14649024 bytes. Yes, you heard right, that's 13.97 MB - eightteen times more than we estimated.
</blockquote>
<p>
He goes into the details of PHP's memory management and breaks it down into the different totals (for 64 bit and 32 bit OSes) and details on each - zvalue_value, zvalue, cycles collector, Zend MM allocator and the buckets used to isolate one array (hash table/dictionary) from another. 
</p>
<blockquote>
What does this tell us? PHP ain't C. That's all this should tell us. You can't expect that a super dynamic language like PHP has the same highly efficient memory usage that C has. You just can't.
</blockquote>]]></description>
      <pubDate>Fri, 16 Dec 2011 10:28:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mrinmoy Ghoshal's Blog: Concept of Strings:PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17222</guid>
      <link>http://www.phpdeveloper.org/news/17222</link>
      <description><![CDATA[<p>
If you're new to the PHP language and are looking for the full scoop on working with the string datatype, look no further than <a href="http://myfairywren.wordpress.com/2011/12/01/concept-of-stringsphp/">this new post</a> from <i>Mrinmoy Ghoshal</i>. It's an excellent (and quite complete) resource for just about everything involving <a href="http://www.php.net/manual/en/language.types.string.php">strings</a> in PHP.
</p>
<blockquote>
A <a href="http://www.php.net/manual/en/language.types.string.php">string</a> is series of characters, where a character is the same as a byte. This means that PHP only supports a 256-character set, and hence does not offer native Unicode support. See <a href="http://www.php.net/manual/en/language.types.string.php#language.types.string.details">details of the string type</a>.
</blockquote>
<p>
The tutorial is broken up into different sections for easier consumption:
</p>
<ul>
<li>Single quoted
<li>Double quoted
<li>Heredoc
<li>Nowdoc
<li>Variable parsing
<li>String access and modification by character
<li>Useful functions and operators
<li>Converting to string
<li>String conversion to numbers
<li>Details of the String Type
</ul>]]></description>
      <pubDate>Wed, 07 Dec 2011 09:56:37 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Alberto Viana's Blog: Zend Framework and Oracle XMLType]]></title>
      <guid>http://www.phpdeveloper.org/news/16886</guid>
      <link>http://www.phpdeveloper.org/news/16886</link>
      <description><![CDATA[<p>
<i>Alberto Viana</i> has a new post to his blog about <a href="http://blog.albertoviana.com/2011/09/19/zend-framework-and-oracle-xmltype/">using Oracle ZML Types with a Zend Framework application</a>. He created a custom adapter to create the type and handle the binding/execution on an new OCI8 connection.
</p>
<blockquote>
So few days ago I needed to insert Oracle XMLtype with Zend Framework. I used oracle adapter to wrote it in Zend Framework. I was looking for and I found on Chris Jones Blog.
</blockquote>
<p>
His table has a column defined as an <a href="http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96620/xdb04cre.htm">XMLType</a>, a special data type specifically for working with XML datasets directly in the database. His adapter includes a bit of sample XML and the code needed to bind the data as a CLOB and, using the <a href="http://us.php.net/manual/en/function.oci-lob-writetemporary.php">writeTemporary</a> function.
</p>]]></description>
      <pubDate>Wed, 21 Sep 2011 09:52:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Introduction to PHP Arrays]]></title>
      <guid>http://www.phpdeveloper.org/news/16879</guid>
      <link>http://www.phpdeveloper.org/news/16879</link>
      <description><![CDATA[<p>
On the PHPMaster.com site today, there's a good introduction to a basic data type in PHP - <a href="http://phpmaster.com/introduction-to-php-arrays/">working with arrays</a>. This tutorial is a low level look at what arrays are and how to work with them (briefly).
</p>
<blockquote>
Tables organize data in such a way that we can easily find correlations or perform straightforward computations. A array is essentially a way to organize data in a table-like manner. The name "array" comes from the same Latin roots as the word "arrangement."
</blockquote>
<p>
If you're anything other than completely new to the language, <a href="http://phpmaster.com/introduction-to-php-arrays/">this post</a> won't help you much. If you're new to programming, though, learning about arrays in PHP is key to your budding development skills. For more in-depth looks at using arrays, checkout <a href="http://phpdeveloper.org/search/index/array">these results</a>.
</p>]]></description>
      <pubDate>Tue, 20 Sep 2011 08:54:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Some notes on SQL Server blobs with sqlsrv]]></title>
      <guid>http://www.phpdeveloper.org/news/15470</guid>
      <link>http://www.phpdeveloper.org/news/15470</link>
      <description><![CDATA[<p>
In <a href="http://akrabat.com/php/some-notes-on-sql-server-blobs-with-sqlsrv/">this new post</a> to his blog, <i>Rob Allen</i> has posted notes on some of his experience in working with blobs with SQL Server using UTF-8.
</p>
<blockquote>
This turned out to be easy enough: Use ntext, nvarchar types in the database and add resources.db.params.driver_options.CharacterSet = "UTF-8" to your application.ini 
</blockquote>
<p>
He also includes some code to fix a problem he spotted with storing binary data into a varbinary field giving him an error about string translation. The fix came in the way of replacing the direct <a href="http://php.net/file_get_contents">file_get_contents</a> assignment to a variable over to a binding method that specified the data type as well.
</p>]]></description>
      <pubDate>Mon, 22 Nov 2010 11:15:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeremy Johnstone's Blog: Enums in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11147</guid>
      <link>http://www.phpdeveloper.org/news/11147</link>
      <description><![CDATA[<p>
In <a href="http://www.jeremyjohnstone.com/blog/archives/2008/10/05/enums-in-php/">this new post</a> <i>Jeremy Johnstone</i> looks at creating a class to add that's missing from the basic datatype set of the language - enums.
</p>
<blockquote>
I stumbled across a blog post on <a href="http://it.toolbox.com/blogs/macsploitation/enums-in-php-a-native-implementation-25228">how to implement Enums in PHP via userland code</a> written by Jonathan Hohle. I liked the concept he had, but the implementation was a bit unappealing because it used eval() among other more minor issues. You shouldn't need to generate Enums at runtime, so I took that as a challenge to find a way to do it at compile time, thus making the code much more efficient.
</blockquote>
<p>
His enums would support type hinting and would, ideally, be iterable. He gives the code he's worked up - a base class, another than extends it to make a basic enum structure and some handy changes to support comparisons. A few more changes (and a few other extended classes later) he has some pretty well functioning enums that can even bee iterated through.
</p>]]></description>
      <pubDate>Mon, 06 Oct 2008 07:56:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Maggie Nelson's Blog: PDO_OCI does not support CLOBs]]></title>
      <guid>http://www.phpdeveloper.org/news/8091</guid>
      <link>http://www.phpdeveloper.org/news/8091</link>
      <description><![CDATA[<p>
After struggling with it for a good while, <i>Maggie Nelson</i> finally figured out the answer to her problems with Oracle, PDO and CLOBs - <a href="http://www.objectivelyoriented.com/2007/06/pdo_oci_does_not_support_clobs.html">they're just not supported</a>.
</p>
<blockquote>
<a href="http://netevil.org/uuid/4365876a-cee9-3009-7726-365876a51802">LOB support was added to PDO_OCI</a> in PHP 5.1. This is really cool, however, it appears that the LOB support really means BLOB support. After much investigation and self-doubt (e.g. "what if we're using streams incorrectly?"), we found out that PDO_OCI does not currently support CLOBs (BLOBs only!).
</blockquote>
<p>
The bug's <a href="http://pecl.php.net/bugs/bug.php?id=7943">already been documented</a> and remains open, but <i>Maggie</i> encourages all of the Oracle developers out there with the fact that <a href="http://blogs.oracle.com/opal/">Chris Jones</a> (of Oracle) knows about the issue and plans to correct it in the next release of the extension.
</p>]]></description>
      <pubDate>Wed, 20 Jun 2007 14:07:03 -0500</pubDate>
    </item>
  </channel>
</rss>
