<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://ilia.ws/feeds/atom.xml" rel="self" title="iBlog - Ilia Alshanetsky" type="application/atom+xml" />
    <link href="http://ilia.ws/"                        rel="alternate"    title="iBlog - Ilia Alshanetsky" type="text/html" />
    <link href="http://ilia.ws/rss.php?version=2.0"     rel="alternate"    title="iBlog - Ilia Alshanetsky" type="application/rss+xml" />
    <title type="html">iBlog - Ilia Alshanetsky</title>
    <subtitle type="html">Here be dragons.</subtitle>
    <icon>http://ilia.ws/templates/default/img/s9y_banner_small.png</icon>
    <id>http://ilia.ws/</id>
    <updated>2010-03-11T14:06:20Z</updated>
    <generator uri="http://www.s9y.org/" version="1.4.1">Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:" />

    <entry>
        <link href="http://ilia.ws/archives/214-ConFoo-PHP-5.3-Awesome!-Slides.html" rel="alternate" title="ConFoo PHP 5.3 == Awesome! Slides" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2010-03-11T14:06:20Z</published>
        <updated>2010-03-11T14:06:20Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=214</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=214</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
            <category scheme="http://ilia.ws/categories/3-Talks" label="Talks" term="Talks" />
    
        <id>http://ilia.ws/archives/214-guid.html</id>
        <title type="html">ConFoo PHP 5.3 == Awesome! Slides</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Finally managed to upload my slides from my ConFoo PHP 5.3 == Awesome! talk. <br />
<a href="http://ilia.ws/files/Confoo2010_PHP53.pdf">Slides</a><br />
<br />
Thanks for all the attendees, especially those who asked questions <img src="http://ilia.ws/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/215-ConFoo-PHP-5.3-Awesome!-Slides.html" rel="alternate" title="ConFoo PHP 5.3 == Awesome! Slides" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2010-03-11T14:06:20Z</published>
        <updated>2010-03-11T14:06:20Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=215</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=215</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
            <category scheme="http://ilia.ws/categories/3-Talks" label="Talks" term="Talks" />
    
        <id>http://ilia.ws/archives/215-guid.html</id>
        <title type="html">ConFoo PHP 5.3 == Awesome! Slides</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Finally managed to upload my slides from my ConFoo PHP 5.3 == Awesome! talk. <br />
<a href="http://ilia.ws/files/Confoo2010_PHP53.pdf">Slides</a><br />
<br />
Thanks for all the attendees, especially those who asked questions <img src="http://ilia.ws/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/213-My-Thoughts-on-HipHop.html" rel="alternate" title="My Thoughts on HipHop " />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2010-02-02T21:47:46Z</published>
        <updated>2010-02-08T20:23:19Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=213</wfw:comment>
    
        <slash:comments>17</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=213</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/213-guid.html</id>
        <title type="html">My Thoughts on HipHop </title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                To paraphrase <a href="http://blog.tabini.ca/2010/02/hiphop-what-you-need-to-know/">Marco Tabini</a> if you work with PHP you must be doing so in a pretty deep cave to have not heard of <a href="http://developers.facebook.com/news.php?blog=1&story=358">HipHop for PHP</a> and the fervor around it the prior to its official announcement this morning by Facebook. <br />
<br />
I had a fortune to be part of the small group of PHP community people who were invited to take a peak at its technology prior to its official release in January.  And I must admit it had been quite amusing to read some of the <a href="http://sdtimes.com/blog/post/2010/01/30/Facebook-rewrites-PHP-runtime.aspx">conjectures</a> people were making about what it actually, given how off the mark most of their guesses were.<br />
<br />
<strong>So what is HipHop?</strong><br />
<br />
In the tersest of terms HipHop is a tool that converts PHP code into C++ code that when combined with a PHP compatible engine and extensions (ports of some native PHP extensions Facebook uses) library also written in C++ can be compiled using GCC into a binary. This binary can then be ran on a command line or as a web server daemon that utilizes <a href="http://www.monkey.org/~provos/libevent/">libevent</a>. According to Facebook this can speed up applications by up to 50%, which is a pretty impressive improvement.<br />
<br />
It is not entirely surprising that world's largest PHP deployment, such as Facebook would look at solution that would allow them to halve their not inconsiderable count of servers or double capacity. Releasing this solution as Open Source is I think a great idea, and big kudos to Facebook for doing so.<br />
<br />
From a technical perspective the PHP optimization approach of converting PHP into a compiled language is not a completely new one, <a href="http://www.roadsend.com/home/index.php">Roadsend</a> compiler, a commercial product has been around for a few years now and has been doing that with some degree of success. That said it is not a trivial task and from an engineering perspective presents a fairly tricky development challenge, especially when you want to allow regular, off-the-self scripts to work. Perhaps more importantly, HipHop not a theoretical solution, "for you to test", it actually works, with most of the Facebook's servers running it and doing it well, on millions of lines of converted PHP code on daily basis, very impressive.<br />
<br />
At this point you are probably thinking, that if it is so great and it works, I'll deploy it on my servers as soon as I can get my hands on the source code. Well, unfortunately things are not quite so simple, there are few technical and deployment challenges you need to overcome. <br /><a href="http://ilia.ws/archives/213-My-Thoughts-on-HipHop.html#extended">Continue reading "My Thoughts on HipHop "</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/212-Speaking-at-Confoo.html" rel="alternate" title="Speaking at Confoo" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2010-01-26T13:16:19Z</published>
        <updated>2010-01-26T13:16:19Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=212</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=212</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/212-guid.html</id>
        <title type="html">Speaking at Confoo</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I will be speaking again this year at PHP Quebec conference, which has now been renamed to <a href="http://confoo.ca/en/">Confoo</a> and covers many more topics then just PHP, which should make things even more interesting. With over 100 talks things looks to be an amazing conference, my own talk with cover <a href="http://confoo.ca/en/2010/session/php-5-3-awesome">PHP 5.3 awesomeness</a> <img src="http://ilia.ws/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/211-Igbinary,-The-great-serializer.html" rel="alternate" title="Igbinary, The great serializer" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-11-19T16:05:41Z</published>
        <updated>2009-11-22T12:29:36Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=211</wfw:comment>
    
        <slash:comments>11</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=211</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/211-guid.html</id>
        <title type="html">Igbinary, The great serializer</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                If you are using PHP, chances are that at some point you needed to serialize PHP data, whether it was transparently done for you inside the PHP's session handler or directly so that complex PHP data types (objects &amp; arrays) could be stored in DB or files, most people have done this.<br />
<br />
The default way of doing it is via a native PHP serializer, which creates a clear-text version of the data, which if you are serializing a fair bit of information ends up being rather verbose (read: BIG). This means that you end up having to store more data in memory, read more data from disk, etc... all of which slow down your application. As I was reading docs on <a href="http://zmievski.org/">Andrei's</a> new memcache extension (<a href="http://pecl.php.net/package/memcached">memcached</a>) I came across a binary serialization extension called <a href="http://opensource.dynamoid.com/">Igbinary</a> written by Sulake Dynamoid Oy. This extension promised much more optimal serialization routines by using binary, rather then a clear text format. Sounded, good so I decided to run a few benchmarks on it. <br />
 <br /><a href="http://ilia.ws/archives/211-Igbinary,-The-great-serializer.html#extended">Continue reading "Igbinary, The great serializer"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/210-APC-Memcache-the-High-Performance-Duo-Slides.html" rel="alternate" title="APC &amp; Memcache the High Performance Duo Slides" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-10-21T21:03:08Z</published>
        <updated>2009-10-22T00:12:32Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=210</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=210</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
            <category scheme="http://ilia.ws/categories/3-Talks" label="Talks" term="Talks" />
    
        <id>http://ilia.ws/archives/210-guid.html</id>
        <title type="html">APC &amp; Memcache the High Performance Duo Slides</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                My slides from the "APC &amp; Memcache the High Performance Duo" talk are now online and can be found <a href="http://ilia.ws/files/ZendCon2009_APC_Memcache.pdf">here</a>.<br />
<br />
In the slide I mentioned that memcache is available of *NIX only, which thanks to at least two attendees I know to be incorrect. It appears that there is a working (albeit old, circa 2006) memcache win32 version, which you can find here:<br />
<a href="http://jehiah.cz/projects/memcached-win32/">http://jehiah.cz/projects/memcached-win32/</a><br />
<br />
Once you install it, you'd need to compile memcache PHP extension on win32 and then you should be set. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/209-Common-Optimization-Mistakes.html" rel="alternate" title="Common Optimization Mistakes" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-10-21T00:37:28Z</published>
        <updated>2009-10-21T02:43:01Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=209</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=209</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
            <category scheme="http://ilia.ws/categories/3-Talks" label="Talks" term="Talks" />
    
        <id>http://ilia.ws/archives/209-guid.html</id>
        <title type="html">Common Optimization Mistakes</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                The slides from my "Common Optimization Mistakes" talk are now up and can be found <a href="http://ilia.ws/files/ZendCon2009_Optimization_Mistakes.pdf">here</a>. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/208-PHP-5.3-Awesome-Slides.html" rel="alternate" title="PHP 5.3 == Awesome Slides" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-10-20T18:45:08Z</published>
        <updated>2009-10-21T06:44:29Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=208</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=208</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
            <category scheme="http://ilia.ws/categories/3-Talks" label="Talks" term="Talks" />
    
        <id>http://ilia.ws/archives/208-guid.html</id>
        <title type="html">PHP 5.3 == Awesome Slides</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                The slides from my talk, introducing PHP 5.3 are now up and can be found here:<br />
<a href="http://ilia.ws/files/ZendCon2009_PHP53_Intro.pdf">Slides</a> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/207-Type-Hinting-Conclusion.html" rel="alternate" title="Type Hinting - Conclusion" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-07-21T12:47:17Z</published>
        <updated>2009-07-22T17:53:23Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=207</wfw:comment>
    
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=207</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/207-guid.html</id>
        <title type="html">Type Hinting - Conclusion</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                It has been a rather crazy last two weeks at work, so I didn't get a chance to revisit the type hinting matter. Unfortunately, while initial outpouring of support for inclusion of type hinting into PHP 5.3 and 6 was substantial, it all kinda petered out once more people started voting. To be specific, there is a large amount of support for the feature in general, but very few people seem to think it should go into 5.3.<br />
<br />
I feel that 5.3 is the only release that would make this feature usable, since that is the version of PHP I could see myself using at work in a near future as well as a release other people would be using for the next few years, at least. PHP 6 is just very far a way from any sort of a release, let alone a production worthy version and at the same time there is no tentative agreement on making 5.4 in the near future. If it went to 5.3, which would be "work worthy" I could justify spending the time to maintain the patch across all branches, but with PHP 6 only, it is simply too impractical.<br />
<br />
That said, at work we will transition to 5.3 soon, probably around 5.3.2/3 time, so I do need a type hinting patch. To that effect I've cleaned up and improved the old patch based on comments from various people, notably Stas and Dmitry (thank guys) and made a copy that I intend to use for work.<br />
<br />
The patch is now pure type hinting, no more virtual types like SCALAR and NUMERIC, it also does not offer any type casting support. Basically its just a type hinting patch, with full reflection support. Since the last iteration of the patch the following improvements have been made:<br />
<br />
1) Modify the parser to not reserve string/integer/etc... keywords used for type hinting. Won't break code that uses "class string", etc...<br />
2) Added getTypeHint() reflection method to determine the type of hint a parameter has<br />
3) Revised the parser (thanks Stas) to properly parse out type hints.<br />
<br />
The patch can be found here: <a href="http://ilia.ws/patch/type_hint_final.txt">http://ilia.ws/patch/type_hint_final.txt</a><br />
and the test suit here: <a href="http://ilia.ws/patch/type_hint_tests.tar.bz2">http://ilia.ws/patch/type_hint_tests.tar.bz2</a><br />
<br />
<strong>Update July 22, 2009</strong><br />
<br />
A bug was found by Gwynne, which prevented constants (other then NULL) from being used as default values of type hints, she was also kind enough to provide the patch for the problem. The patch was updated with this fix and an additional test was added for this eventuality. Thanks Gwynne!<br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/206-Type-hinting-rehashed-now-with-type-casting-support.html" rel="alternate" title="Type hinting rehashed (now with type casting support)" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-07-04T17:22:51Z</published>
        <updated>2009-07-10T00:47:13Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=206</wfw:comment>
    
        <slash:comments>14</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=206</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/206-guid.html</id>
        <title type="html">Type hinting rehashed (now with type casting support)</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                There has been a lot of comments both on this blog and the internals list. There seems to be a fairly large group of core developers who like the idea as well as surpassingly large support base on the user level too (wow, didn't think that this many people want type hinting). Unfortunately, there have also been, as is typically on the internals list a few people complaining for the sake of complaining. Their arguments have ranged from type hinting is against PHP's loosely typed nature and people will mis-use it and make PHP into something that it is not, to I don't need or will use it, so no one should get it.<br />
<br />
That said these people are in the minority, albeit a rather vocal one, so progress is being made. There have also been a number of really good suggestions by folks who have reviewed the patch (big thanks guys) and their improvements have been incorporated into the version 2 of the patch. Here is the quick changelog.<br />
<br />
1) Added support for "object" type hint<br />
2) Modified the patch not to break binary compatibility so you can now use patched PHP without having to re-compile your extensions or having issues with binary ones.<br />
3) Added full reflection support, which I appropriated from Felipe's <a href="http://wiki.php.net/rfc/typehint">earlier work</a> on type hinting<br />
4) Added support for type casting, where by you can do things like this function a((int)$foo), which will force PHP to cast the value of $foo to an integer<br />
5) Added tests, which again I partially appropriated from Felipe's earlier work.<br />
<br />
The updated patch is available here: <a href="http://ilia.ws/patch/type_hint_53_v2.txt">http://ilia.ws/patch/type_hint_53_v2.txt</a><br />
The mini test suit which can also show practical examples &amp; limitations of the functionality can be found here: <a href="http://ia.gd/patch/type_hint_tests.tar.bz2">http://ia.gd/patch/type_hint_tests.tar.bz2</a><br />
<br />
I am posting it here for peer review and comment. If all goes well, I am going to post it to internals for a vote, which will hopefully pass. So, if you want the feature in, or you think its crap, watch internals on Monday so you can make your opinion known via a +/- vote. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/205-Type-hinting-for-PHP-5.3.html" rel="alternate" title="Type hinting for PHP 5.3" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-07-01T16:16:02Z</published>
        <updated>2009-07-06T08:32:07Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=205</wfw:comment>
    
        <slash:comments>24</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=205</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/205-guid.html</id>
        <title type="html">Type hinting for PHP 5.3</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                For a few years now at work we've been using a patched version of PHP, one those patching featuring type hinting. Over time this proved to be a very handy feature that allows for a much more readable code and introduces a language based validation layer to ensure that the right data types are getting to your functions and methods. It also caught numerous bugs due to functions returning or passing un-expected values. Best of all this feature does not require any changes on the part of opcode caches (essential component for PHP performance) and allows for simple deployment.<br />
<br />
I and other people have tried a number of times in the past to introduce type hinting into stock PHP, but unfortunately have never been successful. On a general level most people agree it would be a good idea to have, since it is an optional feature and does not introduce any regressions, heck you can even mix type hinted code with the non-type hinted one. The "PROBLEM" has always been combining of PHP's typeless nature with type hinting, which is where the consensus has been difficult (impossible) to reach. To illustrate the problem let's consider the following:<br />
<br />
function foo(int $bar) {}<br />
<br />
Some people would expect that passing "1" (string containing number 1) would be accepted by function foo() and not raise any type errors, since in PHP typically, numbers within strings are considered to be perfectly valid numbers ("1" + "1" == 2). Hence the conflict, some people (I am a part of that group) think that type hinting should be strict, while others think it should be more permissive to be inline with PHP's fluid nature.<br />
<br />
With introduction of PHP 5.3 and free day in the middle of the week (Happy Canada Day to all Canucks) I've decided to port my internal patch to 5.3 and introduce a new 'feature' to it to hopefully bridge the divide. I've added a IS_NUMERIC (numeric) type hint that allows the script author to designate a parameter as having to be number, meaning input of type boolean, long or float as well as strings containing purely numbers will be accepted. This means if were to rewrite my previous function as:<br />
<br />
function foo(numeric $bar) {}<br />
<br />
Then calling foo("112"); would perfectly valid. To further extend basic type hinting support I've also added IS_SCALAR (scalar) type hint that allows a parameter to be designated as scalar, which means it'll accept any boolean, float, string or integer value.<br />
<br />
The patch is available here: <a href="http://ia.gd/patch/type_hint_53.txt">http://ia.gd/patch/type_hint_53.txt</a><br />
<br />
I've also posted it to the internals list in the hope of gathering enough support on the part of PHP developers and users to have it added to 5.3 and future releases of PHP.<br />
<br />
It should be noted that this is not the first idea for type hints, that credit goes to Hannes Magnusson who had posted a <a href="http://php.markmail.org/message/nalhrp5n5p3srj7u#query:+page:1+mid:nalhrp5n5p3srj7u+state:results">similar patch</a> on the internals list back in 2006. Also, back in 2008 Felipe Pena wrote a complete <a href="http://wiki.php.net/rfc/typehint">RFC on type hinting</a> with patches and even test. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/204-PHP-5.3-is-out!.html" rel="alternate" title="PHP 5.3 is out!" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-06-30T14:09:32Z</published>
        <updated>2009-07-01T14:34:36Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=204</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=204</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/204-guid.html</id>
        <title type="html">PHP 5.3 is out!</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                After over 2 years in development, huge amount of commits and changes <a href="http://php.net/releases/5_3_0.php">PHP 5.3.0 is finally out</a>. Kudos to <a href="http://pooteeweet.org/">Lukas M. Smith</a> and <a href="http://schlueters.de/blog/">Johannes Schlüter</a> who have managed this herculean task and overall have done an excellent job.<br />
<br />
There are some really nifty features in this release such as namespaces, closures, mail() logging, a bunch of new extensions and much more. Hopefully, the process of making 5.3 be production ready will be a quick one, as a large amount of testing has already gone into making this release possible. In fact, I be brave enough to say that for non-mission critical environments PHP 5.3 is ready to go as is. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/203-PHP-5.2.10-Released!.html" rel="alternate" title="PHP 5.2.10 Released!" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-06-19T02:39:31Z</published>
        <updated>2009-06-19T12:09:15Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=203</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=203</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/203-guid.html</id>
        <title type="html">PHP 5.2.10 Released!</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                A few hours ago, 11th release of PHP 5.2, 5.2.10 was released to the world. This, as most past 5.2.X releases has been largely focused on bug fixing with quite a few obscure crashes and memory leaks being addressed, in addition to a single security fix in the exif_read_data() function. All in all there are over 100 individual bug fixes in this release and most 5.2.X and definitely all 4.X users should consider upgrading to this version.<br />
<br />
The sources and windows binaries for this release can be found at <a href="http://www.php.net/downloads.php" title="http://www.php.net/downloads.php">http://www.php.net/downloads.php</a> and the detailed changelog itemizing all of the changes can be seen <a href="http://www.php.net/ChangeLog-5.php#5.2.10">here</a>. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/201-Ontario-Monitor-Tax.html" rel="alternate" title="Ontario Monitor Tax" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-06-10T23:24:41Z</published>
        <updated>2009-06-11T12:19:07Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=201</wfw:comment>
    
        <slash:comments>10</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=201</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/2-Stuff" label="Stuff" term="Stuff" />
    
        <id>http://ilia.ws/archives/201-guid.html</id>
        <title type="html">Ontario Monitor Tax</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I was buying 2 monitors for the office today, when a came to paying the bill I discovered a rather nasty surprise. It seems that the Ontario government has decided  to apply a $12.03 per monitor recycling tax as part of their <a href="http://www.ontarioelectronicstewardship.ca/">EOS</a> program. It looks like our liberal provincial government is always on a look out to grab more of our money, so they can spend it on idiotic initiatives such as <a href="http://www.theglobeandmail.com/news/national/scandal-grows-at-ehealth-ontario/article1174148/">eHealth</a>. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://ilia.ws/archives/200-PHP-is-14-Today.html" rel="alternate" title="PHP is 14 Today" />
        <author>
            <name>Ilia Alshanetsky</name>
            <email>ilia@ilia.ws</email>        </author>
    
        <published>2009-06-08T16:58:25Z</published>
        <updated>2009-06-11T17:41:30Z</updated>
        <wfw:comment>http://ilia.ws/wfwcomment.php?cid=200</wfw:comment>
    
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://ilia.ws/rss.php?version=atom1.0&amp;type=comments&amp;cid=200</wfw:commentRss>
    
            <category scheme="http://ilia.ws/categories/1-PHP" label="PHP" term="PHP" />
    
        <id>http://ilia.ws/archives/200-guid.html</id>
        <title type="html">PHP is 14 Today</title>
        <content type="xhtml" xml:base="http://ilia.ws/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Wow, time certainly does fly.<br />
I've started with PHP back in 1997, and A LOT has changed since then in terms of the language's capabilities, user base, and the sheer quantity of sites and applications built on it. Hopefully the next 14 years will bring as many improvements and innovations as the 1st 14 did. Happy B-Day PHP! 
            </div>
        </content>
        
    </entry>

</feed>