<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Stubblog - Planet PHP</title>
    <link>http://www.stubbles.org/</link>
    <description>Less slogan, more code.</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1 - http://www.s9y.org/</generator>
    <pubDate>Mon, 15 Feb 2010 15:46:33 GMT</pubDate>

    <image>
        <url>http://www.stubbles.org/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Stubblog - Planet PHP - Less slogan, more code.</title>
        <link>http://www.stubbles.org/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>vfsStream 0.6.0 released</title>
    <link>http://www.stubbles.org/archives/74-vfsStream-0.6.0-released.html</link>
            <category>Announcements</category>
            <category>Planet PHP</category>
            <category>vfsStream</category>
    
    <comments>http://www.stubbles.org/archives/74-vfsStream-0.6.0-released.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=74</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=74</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Seldom in a life of a developer it comes to the point where a bug can be fixed by a feature addition. This February, it happend to vfsStream. A user reported a &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=442&amp;amp;entry_id=74&quot; title=&quot;http://code.google.com/p/bovigo/issues/detail?id=13&quot;  onmouseover=&quot;window.status=&#039;http://code.google.com/p/bovigo/issues/detail?id=13&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;bug&lt;/a&gt; where overwriting an existing vfsStream file with new but smaller content replaced only portions of the file, leaving the rest in place instead of truncating the old content before writing the fresh content. After some investigation it turned out the best fix for the problem was to implement the long scheduled &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=443&amp;amp;entry_id=74&quot; title=&quot;http://code.google.com/p/bovigo/issues/detail?id=7&quot;  onmouseover=&quot;window.status=&#039;http://code.google.com/p/bovigo/issues/detail?id=7&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;feature issue 7&lt;/a&gt;. Thought, said, done. So today I shipped vfsStream 0.6.0 including complete support for for $mode param when opening files.&lt;br /&gt;
&lt;br /&gt;
While I was at it, I added support for the $options param as well, it now evaluates whether STREAM_REPORT_ERRORS is set and acts accordingly when opening a file.&lt;br /&gt;
&lt;br /&gt;
Unfortunately there are bad news as well. Due to &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=444&amp;amp;entry_id=74&quot; title=&quot;http://code.google.com/p/bovigo/issues/detail?id=11&quot;  onmouseover=&quot;window.status=&#039;http://code.google.com/p/bovigo/issues/detail?id=11&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;another issue&lt;/a&gt; I found out that ext/zip does not work with vfsStream, and that there is no way to add support for it in vfsStream. Maybe if someone with slightly more C skills than me (which are equal to zero) might want to look into this problem for a better explanation, as I can only assume that it&#039;s due to ext/zip not supporting userland stream wrappers.&lt;br /&gt;
&lt;br /&gt;
If you like the new additions &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=445&amp;amp;entry_id=74&quot; title=&quot;http://code.google.com/p/bovigo/wiki/vfsStreamDocsInstall&quot;  onmouseover=&quot;window.status=&#039;http://code.google.com/p/bovigo/wiki/vfsStreamDocsInstall&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;get the new release&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Mon, 15 Feb 2010 16:46:33 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/74-guid.html</guid>
    
</item>
<item>
    <title>vfsStream 0.5.0 released</title>
    <link>http://www.stubbles.org/archives/73-vfsStream-0.5.0-released.html</link>
            <category>Announcements</category>
            <category>Planet PHP</category>
            <category>vfsStream</category>
    
    <comments>http://www.stubbles.org/archives/73-vfsStream-0.5.0-released.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=73</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=73</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Today I shipped vfsStream 0.5.0 which brings a new feature thanks to the efforts of Benoit Aubuchon: vfsStream now supports the rename() functionality which allows you to write test cases using vfsStream for methods that rename files. Another patch of him was to change the stat() call to respect the STREAM_URL_STAT_QUIET flag.&lt;br /&gt;
&lt;br /&gt;
One more new feature is the added support for . as current directory alias so that vfs://foo/. resolves to vfs://foo - this allows to use file_exists($dir . &#039;/.&#039;) as workaround for the failing is_executable() call on directories, as described in the comments to the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=440&amp;amp;entry_id=73&quot; title=&quot;http://php.net/is_executable&quot;  onmouseover=&quot;window.status=&#039;http://php.net/is_executable&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;is_executable() documentation in the PHP manual&lt;/a&gt;. Of course this raises the question if vfsStream will support .. as well - if somebody takes the time to create a patch I will incorporate this. I did not look into this issue further, but I guess it might involve recursion and a more advanced parsing of the vfs URL to make it work properly, as there might be cases like vfs://foo/bar/baz/../../dummy.&lt;br /&gt;
&lt;br /&gt;
So &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=441&amp;amp;entry_id=73&quot; title=&quot;http://code.google.com/p/bovigo/wiki/vfsStreamDocsInstall&quot;  onmouseover=&quot;window.status=&#039;http://code.google.com/p/bovigo/wiki/vfsStreamDocsInstall&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;grab the release&lt;/a&gt; and make use of the new features, if you like to. 
    </content:encoded>

    <pubDate>Mon, 25 Jan 2010 17:17:37 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/73-guid.html</guid>
    
</item>
<item>
    <title>Registry Design Pattern - useful or harmful?</title>
    <link>http://www.stubbles.org/archives/70-Registry-Design-Pattern-useful-or-harmful.html</link>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/70-Registry-Design-Pattern-useful-or-harmful.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=70</wfw:comment>

    <slash:comments>13</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=70</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    About a year ago I wrote about &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=431&amp;amp;entry_id=70&quot; title=&quot;http://stubbles.org/archives/56-How-to-get-a-Singleton-right.html&quot;  onmouseover=&quot;window.status=&#039;http://stubbles.org/archives/56-How-to-get-a-Singleton-right.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;How to get a Singleton right&lt;/a&gt;. While nothing has changed my opinion about the Singleton Design Pattern - contrary, I&#039;m even more convinced that it is bad, bad and bad - I still have homework to do. In the comments to this article I was asked about my opinion on the Registry Design Pattern, and I promised it would be worth an own blog entry. Well, I did not anticipate it would take more than a year to write it, but you know, work, and no time, and yada yada yada... so here it is.&lt;br /&gt;
&lt;br /&gt;
When thinking about a Registry one has to consider two points: overall architecture of the application, and implementation of the Registry itself. It&#039;s not that much what you can say about the implementation of a Registry. For PHP, it should just follow one rule to make it testable and to ease testing of classes using the registry: do not make it a Singleton. (You might have guessed that already.) PHP offers the possibility to implement the Registry as a pure static class, where data within the Registry can be stored within a static class variable, and setters as well as getters can also be static methods. There is no value in making it a Singleton, it just more stuff to type where the result is the same: global state. So if you implement it as pure static, the Registry in itself is neither bad or good.&lt;br /&gt;
&lt;br /&gt;
Speaking of global state, it should be common sense by now that global state is a bad idea, at least if this global does not mean the root of the application itself, which leads us to the overall architecture of the application. How is this related to the Registry Design Pattern? The Registry is intended to allow access to configuration data, objects etc. which you don&#039;t want to pass around in your application but require them in different parts (or layers) of your applications. If you have such a need from my point of view this means the application is not fully based on the Dependency Injection principle, it does not separate object creation and business logic as much as it should. If the application is completely based on Dependency Injection, there is no need for a Registry any more.&lt;br /&gt;
&lt;br /&gt;
Did I just say that there is no need for a Registry any more? Well, two exceptions. First, unfortunately in PHP there might be cases where you can not influence the creation of an object instance, and if you want to pass data or other objects to such an instance, you have to take cumbersome actions to pass those. Creation of user land stream wrapper instances is such an example, as those instances are created by PHP itself and there is no possibility to intercept this. Here a Registry might be of help, but it stays what it is: a workaround for a flaw in PHP.&lt;br /&gt;
&lt;br /&gt;
The other exception is the case of using a Dependency Injection framework. You do not need a Registry here - your DI framework already has something like this. It just not called Registry, but it is it&#039;s mechanism where you bind data or objects for example in the case of Stubbles or &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=432&amp;amp;entry_id=70&quot; title=&quot;http://code.google.com/p/google-guice/&quot;  onmouseover=&quot;window.status=&#039;http://code.google.com/p/google-guice/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Google Guice&lt;/a&gt;, and in &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=433&amp;amp;entry_id=70&quot; title=&quot;http://components.symfony-project.org/dependency-injection/&quot;  onmouseover=&quot;window.status=&#039;http://components.symfony-project.org/dependency-injection/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Symfony&lt;/a&gt; it is called Service Container. (Please note that this is just a quick thought I had in the last days, I might be wrong on this.)&lt;br /&gt;
&lt;br /&gt;
To conclude, the Registry itself is neither useful or harmful. The more important question is how strong you apply the Dependency Injection principle in your application. 
    </content:encoded>

    <pubDate>Mon, 04 Jan 2010 00:56:00 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/70-guid.html</guid>
    
</item>
<item>
    <title>PHP Unconference Hamburg: a great event</title>
    <link>http://www.stubbles.org/archives/66-PHP-Unconference-Hamburg-a-great-event.html</link>
            <category>Conferences</category>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/66-PHP-Unconference-Hamburg-a-great-event.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=66</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=66</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    This weekend I attended the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=420&amp;amp;entry_id=66&quot; title=&quot;http://www.php-unconference.de/&quot;  onmouseover=&quot;window.status=&#039;http://www.php-unconference.de/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHP Unconference&lt;/a&gt; in the lovely city of Hamburg (if you don&#039;t count the wheather in). It was a really great event with a superb organisation, from my point of view even better then the some &quot;professional&quot; conferences. So, first a big thank you to the hosts from the PHP Usergroup Hamburg, you did a wonderful job.&lt;br /&gt;
&lt;br /&gt;
Speaking about professional conferences, it&#039;s interesting to see that I&#039;m not the only one with a very sceptical look on the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=421&amp;amp;entry_id=66&quot; title=&quot;http://www.php-conference.com/&quot;  onmouseover=&quot;window.status=&#039;http://www.php-conference.com/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;International PHP Conference&lt;/a&gt;. Other attendees I spoke with had similar thoughts: always the same speakers with nearly the same topics, degrading the purpose of IPC to networking only. It would be more interesting with more fresh blood and a broader range of topics. Of course this would mean more risk for the host, but I believe in the long run the current development will ruin the IPC. Or can I just not imagine that there are so much companies out there paying several hundred Euros just for networking?&lt;br /&gt;
&lt;br /&gt;
From the sessions I attended the Performance pessimization talk was really fun and insightful. Starting with an optimal (hardware) architecture Kris Köhntopp, Johann Hartmann, Stefan Priebsch and Lars Jankofsky made changes to this architecture to decrease its performance one after another. Both the audience and the speakers had very much fun in adding one &quot;improvement&quot; after another.&lt;br /&gt;
&lt;br /&gt;
For the PHP in the Enterprise session I have rather mixed feelings. While Kris Köhntopp made some really good remarks on maturity of business models and their surrounding processes I think the whole session suffered from an undefined target. &quot;Talking about Enterprise PHP&quot; is not sufficient as session target. It was like a &quot;Let&#039;s have a meeting on topic X, but we don&#039;t define an agenda for it.&quot; Well, from that point it was really enterprisy.&lt;br /&gt;
&lt;br /&gt;
Together with Thorsten Rinne I did a presentation on &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=422&amp;amp;entry_id=66&quot; title=&quot;http://downloads.stubbles.net/?download_category=presentations&amp;amp;download_id=phpunconf-testable-code&amp;amp;download_file=testable_code.pdf&quot;  onmouseover=&quot;window.status=&#039;http://downloads.stubbles.net/?download_category=presentations&amp;amp;download_id=phpunconf-testable-code&amp;amp;download_file=testable_code.pdf&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Things to consider for testable code&lt;/a&gt; - I feel a bit sorry for Thorsten as his main purpose was to stress the important points of my presentation rather then talking about refactoring bad code to better code, the topic originally voted for. &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
To my surprise the audience seemed to appreciate it. I was very unsure if it would work out in the way I intended it. Probably I should add more examples for the Dependency Injection part as it was requested to see some real-life code, however I&#039;m not sure how much it helped to better understand how it works. In every case I will add one or another point against Dependency Injection, as it seems that there are only benefits but no drawbacks. If you attended the session and would like to give feedback about what can be improved please drop a comment.&lt;br /&gt;
&lt;br /&gt;
On sunday Oliver Müller (Btw, thanks to Oliver for taking us on a tourist tour around the Reeperbahn on saturday night. &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;) gave an interesting overview of current state-of-the-art technologies for implementing Single Sign-on systems. It raised new questions for a project I will do in the upcoming months.&lt;br /&gt;
&lt;br /&gt;
Another interesting session was from Stefan Priebsch about the Model-View-Controler (MVC) design pattern. While I felt uncomfortable with the label &quot;MVC&quot; on Stubbles for quite some time now the talk finally convinced me to drop this label. MVC in the web is fundamentally different from MVC in desktop gui applications, where it was originally invented for, and there seems to be no common understanding of what MVC in web applications should really look like. That&#039;s not surprising as there are different solutions possible, and it strongly depends on the type and size of the application you create. Heck, there are even frameworks out there with a &quot;Model&quot; class you should inherit all your models from, which is independend of the application totally pointless and makes me cry.&lt;br /&gt;
&lt;br /&gt;
Because the Deployment talk took not place due to a missing speaker I switched to a MySQL High Availability talk. I&#039;m really glad we have database admins in our company which take care of this, but it was interesting to see what the important points are and how such an architecture is build.&lt;br /&gt;
&lt;br /&gt;
The last talk was about experiences on pre-commit-hooks. It was suggested to deny commits if they do not fulfill the coding guidelines. For projects with release cycles of at least several days it seems to be really useful, but if you do several releases per day it has a high chance of getting in the way in the moment you want to deploy a bugfix for a bug you deployed earlier the day. (Please do not comment that one should not do this - it boils down to a business decision if you do it or not, wheighing less quality against time to market.) Doing a php lint check and enforcing a certain style of commit messages however seem to be useful in such projects as well.&lt;br /&gt;
&lt;br /&gt;
Finally: thanks to everyone who attended. It was a great event with really interesting topics, chats and a fantastic atmosphere. 
    </content:encoded>

    <pubDate>Mon, 14 Sep 2009 00:03:51 +0200</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/66-guid.html</guid>
    
</item>
<item>
    <title>Extending objects with new methods at runtime</title>
    <link>http://www.stubbles.org/archives/65-Extending-objects-with-new-methods-at-runtime.html</link>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/65-Extending-objects-with-new-methods-at-runtime.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=65</wfw:comment>

    <slash:comments>12</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=65</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    While the title of this blog entry might sound rather scary to straight OO evangelists it might attract other developers - e.g. those that played around with &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=407&amp;amp;entry_id=65&quot; title=&quot;http://pecl.php.net/package/runkit&quot;  onmouseover=&quot;window.status=&#039;http://pecl.php.net/package/runkit&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;runkit&lt;/a&gt; or had a look into the Ruby world where the language supports adding new methods to a class or just to an instance of a class at runtime (see &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=408&amp;amp;entry_id=65&quot; title=&quot;http://www.rubyist.net/~slagell/ruby/singletonmethods.html&quot;  onmouseover=&quot;window.status=&#039;http://www.rubyist.net/~slagell/ruby/singletonmethods.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;singleton methods&lt;/a&gt;, and &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=409&amp;amp;entry_id=65&quot; title=&quot;http://zef.me/1059/shining-ruby-extending-classes&quot;  onmouseover=&quot;window.status=&#039;http://zef.me/1059/shining-ruby-extending-classes&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;this blog article&lt;/a&gt;; for those not familiar with Ruby: &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=410&amp;amp;entry_id=65&quot; title=&quot;http://www.ruby-doc.org/core/classes/Fixnum.html&quot;  onmouseover=&quot;window.status=&#039;http://www.ruby-doc.org/core/classes/Fixnum.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Fixnum&lt;/a&gt; is a class already defined by Ruby core.)&lt;br /&gt;
&lt;br /&gt;
With the advent of PHP 5.3 adding new methods to an instance of a class at runtime becomes possible with PHP as well, using anonymous functions and a little bit of __call() magic. First, let&#039;s define a new class (boring old foo, bar, baz example for lack of fantasy):&lt;br /&gt;
&lt;code&gt;
class Foo
{
    public function bar()
    {
        echo &quot;This is Foo::bar()\n&quot;;
    }
}
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
As you surely already know you can add public properties to an instance at any time:&lt;br /&gt;
&lt;code&gt;
$foo = new Foo();
$foo-&gt;baz = &#039;Hello World.&#039;`;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
We can use this to store an anonymous function:&lt;br /&gt;
&lt;code&gt;
$foo = new Foo();
$foo-&gt;baz = function () { echo &quot;This is Foo::\$baz()\n&quot;; };
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, we are not able to call this as a method:&lt;br /&gt;
&lt;code&gt;
$foo-&gt;baz();
&lt;/code&gt;&lt;br /&gt;
This will blow up with a fatal error saying &quot;Call to undefined method Foo::baz()&quot;. Of course we could do&lt;br /&gt;
&lt;code&gt;
$func = $foo-&gt;baz;
$func();
&lt;/code&gt;&lt;br /&gt;
but that is not what we wanted to achieve. Let&#039;s add some __call() magic to our Foo class:&lt;br /&gt;
&lt;code&gt;
class Foo
{
    // method bar() omitted

    public function __call($method, $args)
    {
        if (isset($this-&gt;$method) === true) {
            $func = $this-&gt;$method;
            $func();
        }
    }
}
&lt;/code&gt;&lt;br /&gt;
Now we can safely call $foo-&gt;baz() with the desired result. However, compared to Ruby you can not redefine existing methods. Therefore,&lt;br /&gt;
&lt;code&gt;
$foo-&gt;bar = function () { echo &quot;This is Foo::\$bar()\n&quot;; };
$foo-&gt;bar();
&lt;/code&gt;&lt;br /&gt;
will still call the method Foo::bar() defined earlier and ignore the redefinition due to the nature of how __call() works.&lt;br /&gt;
&lt;br /&gt;
What can you do with it?  If you use &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=411&amp;amp;entry_id=65&quot; title=&quot;http://en.wikipedia.org/wiki/Duck_typing&quot;  onmouseover=&quot;window.status=&#039;http://en.wikipedia.org/wiki/Duck_typing&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;duck typing&lt;/a&gt; this might be useful as it reduces the amount of code required for the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=412&amp;amp;entry_id=65&quot; title=&quot;http://en.wikipedia.org/wiki/Adapter_pattern&quot;  onmouseover=&quot;window.status=&#039;http://en.wikipedia.org/wiki/Adapter_pattern&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Adapter design pattern&lt;/a&gt; as you just extend the instance you want to use instead of creating a separate adapter class. The result is the same, both a full fledged adapter class and the closure can only access the public properties and methods of the instance to adapt. Problem is, the class to adapt most likely does not have the required __call() implementation.&lt;br /&gt;
&lt;br /&gt;
Another use case could be a simplified version of the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=413&amp;amp;entry_id=65&quot; title=&quot;http://news.xp-framework.net/article/313/2009/08/29/Extension_methods__Swiss_army_knives_without_the_anti-pattern&quot;  onmouseover=&quot;window.status=&#039;http://news.xp-framework.net/article/313/2009/08/29/Extension_methods__Swiss_army_knives_without_the_anti-pattern&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;extension methods mechanism&lt;/a&gt; where you want to add a method locally without the need to have it available globally in the application.&lt;br /&gt;
&lt;br /&gt;
If you have another good idea of what this can be used for please feel free to comment - just wanted to write my thoughts down. &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Mon, 31 Aug 2009 23:39:55 +0200</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/65-guid.html</guid>
    
</item>
<item>
    <title>vfsStream 0.4.0 released</title>
    <link>http://www.stubbles.org/archives/64-vfsStream-0.4.0-released.html</link>
            <category>Announcements</category>
            <category>Planet PHP</category>
            <category>vfsStream</category>
    
    <comments>http://www.stubbles.org/archives/64-vfsStream-0.4.0-released.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=64</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=64</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Some minutes ago I released &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=387&amp;amp;entry_id=64&quot; title=&quot;http://vfs.bovigo.org/&quot;  onmouseover=&quot;window.status=&#039;http://vfs.bovigo.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;vfsStream&lt;/a&gt; 0.4.0, introducing support for file modes, owners and groups. While I planned to implement this at least since a year it took me three tries to get it implemented, and while implementing this I stumbled about some issues which can not be solved by vfsStream. Major problem is that the PHP functions &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=388&amp;amp;entry_id=64&quot; title=&quot;http://php.net/chmod&quot;  onmouseover=&quot;window.status=&#039;http://php.net/chmod&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;chmod()&lt;/a&gt;, &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=389&amp;amp;entry_id=64&quot; title=&quot;http://php.net/chown&quot;  onmouseover=&quot;window.status=&#039;http://php.net/chown&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;chown()&lt;/a&gt; and &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=390&amp;amp;entry_id=64&quot; title=&quot;http://php.net/chgrp&quot;  onmouseover=&quot;window.status=&#039;http://php.net/chgrp&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;chgrp()&lt;/a&gt; do not work with vfsStream URLs due to limitations imposed by PHP (or possibly by underlying C, not sure). The &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=391&amp;amp;entry_id=64&quot; title=&quot;http://php.net/manual/en/class.streamwrapper.php&quot;  onmouseover=&quot;window.status=&#039;http://php.net/manual/en/class.streamwrapper.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;stream wrapper API&lt;/a&gt; has no support to enable setting file modes, owner or group of a userland stream implementation. This means the usage of file mode support is limited and can not be applied to create tests for classes using one of the three functions. However, it is still possible to use file modes for testing correct usage of is_readable(), is_writable() and is_executable(). Another usage scenario is to make sure directories created with mkdir() receive the correct file mode, see the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=392&amp;amp;entry_id=64&quot; title=&quot;http://code.google.com/p/bovigo/wiki/vfsStreamDocsFilemodeExample&quot;  onmouseover=&quot;window.status=&#039;http://code.google.com/p/bovigo/wiki/vfsStreamDocsFilemodeExample&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;file mode example&lt;/a&gt;. I&#039;m sure users will come up with other usage scenarios I did not even thought of. &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Beside this new feature the release contains a bugfix for vfsStreamDirectory::addChild() to make sure adding another child of the same name as an existing child replaces this existing child, and a fix to return correct results for stat() calls. Grab the release via it&#039;s pear channel pear.php-tools.net and try it out. I suspect the file mode support may contain bugs because I did not have the time to use it in other projects, but after all, it is still in alpha stage. &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Mon, 13 Jul 2009 21:19:59 +0200</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/64-guid.html</guid>
    
</item>
<item>
    <title>Article about vfsStream in german PHP magazine</title>
    <link>http://www.stubbles.org/archives/63-Article-about-vfsStream-in-german-PHP-magazine.html</link>
            <category>Planet PHP</category>
            <category>vfsStream</category>
    
    <comments>http://www.stubbles.org/archives/63-Article-about-vfsStream-in-german-PHP-magazine.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=63</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=63</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    The current issue of the german PHP magazine features an article about &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=385&amp;amp;entry_id=63&quot; title=&quot;http://vfs.bovigo.org/&quot;  onmouseover=&quot;window.status=&#039;http://vfs.bovigo.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;vfsStream&lt;/a&gt;. On three pages &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=386&amp;amp;entry_id=63&quot; title=&quot;http://blog.mike-wittje.de/&quot;  onmouseover=&quot;window.status=&#039;http://blog.mike-wittje.de/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Mike Wittje&lt;/a&gt; (I hope this is the correct Mike, just guessed &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;) describes how vfsStream can be used to simplify and improve unit tests for classes utilizing the file system and file system functions. Thanks to Mike for writing the article, helping to spread the word about vfsStream.&lt;br /&gt;
&lt;br /&gt;
Over the weekend I&#039;m going to test vfsStream with PHP 5.3 and try to fix any issues which pop up. I already received a patch by mail which is said to fix an issue with is_readable() (not tested yet), so it seems reasonable there will be a new release within the upcoming days. 
    </content:encoded>

    <pubDate>Sat, 11 Jul 2009 17:45:54 +0200</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/63-guid.html</guid>
    
</item>
<item>
    <title>vfsStream 0.3.2 released</title>
    <link>http://www.stubbles.org/archives/58-vfsStream-0.3.2-released.html</link>
            <category>Announcements</category>
            <category>Planet PHP</category>
            <category>vfsStream</category>
    
    <comments>http://www.stubbles.org/archives/58-vfsStream-0.3.2-released.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=58</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Nearly about a year passed since the last release of &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=377&amp;amp;entry_id=58&quot; title=&quot;http://vfs.bovigo.org/&quot;  onmouseover=&quot;window.status=&#039;http://vfs.bovigo.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;vfsStream&lt;/a&gt;, and some bugs were found by users of vfsStream. This was quite a surprise for me since I did not expect that anybody would use it. &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
This evening I fixed another bug reported some days ago, and since a patch for another bug was submitted and committed about half a year ago I decided to release version 0.3.2 tonight, so these are the changes:&lt;br /&gt;
&lt;br /&gt;
- added support for trailing slashes on directories in vfsStream urls, patch provided by Gabriel Birke&lt;br /&gt;
- fixed bug #4: vfsstream can only be read once, reported by Christoph Bloemer&lt;br /&gt;
- enabled multiple iterations at the same time over the same directory&lt;br /&gt;
&lt;br /&gt;
A big thank you to the bug reporters for their help to improve vfsStream. This should give me some motivation to go for 0.4.0 and implement support for file modes, at least being able to store and read them - full file mode support will be a hell of a work, not sure if it is worth the effort. 
    </content:encoded>

    <pubDate>Mon, 16 Feb 2009 22:20:05 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/58-guid.html</guid>
    
</item>
<item>
    <title>How to get a Singleton right</title>
    <link>http://www.stubbles.org/archives/56-How-to-get-a-Singleton-right.html</link>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/56-How-to-get-a-Singleton-right.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=56</wfw:comment>

    <slash:comments>22</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Books, tutorials and other design pattern featuring articles often tend to present the Singleton Design Pattern as the first one. This is for two reasons:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;The Singleton is a very easy to understand design pattern, even for developers new to design patterns or relatively new to the object oriented world.&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;The Singleton solves a problem that 99% of these developers have, namely to provide a global access point to some class they make use of everywhere in their application.&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
However, the Singleton design pattern is fundamentally flawed. This is nothing new and is discussed amongst developers since some years now (just &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=373&amp;amp;entry_id=56&quot; title=&quot;http://www.google.com/search?q=evil+singleton&quot;  onmouseover=&quot;window.status=&#039;http://www.google.com/search?q=evil+singleton&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;search for &quot;evil singleton&quot;&lt;/a&gt;). The Singleton violates several rules of good object oriented design. Code using the Singleton class depends on that class. It is not usable without this class, which in turn makes the client code hard to test. The client code is not programmed against an interface but against a concrete class, though promoting tight coupling between the client and the Singleton, instead of the desired loose coupling. Additionally, classes implementing the Singleton pattern itself are hard to test. Singleton just replaces a global variable and hides it in a class - the global state stays in your application. So, when everybody agrees that global state is bad and that its appearance as Singleton implementations does not make the code any better, why is the Singleton design pattern so often used then? &lt;br /&gt;&lt;a href=&quot;http://www.stubbles.org/archives/56-How-to-get-a-Singleton-right.html#extended&quot;&gt;Continue reading &quot;How to get a Singleton right&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 28 Dec 2008 14:13:42 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/56-guid.html</guid>
    
</item>
<item>
    <title>State of annotations in the PHP world</title>
    <link>http://www.stubbles.org/archives/54-State-of-annotations-in-the-PHP-world.html</link>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/54-State-of-annotations-in-the-PHP-world.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=54</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Annotations are a really helpful feature in present-day development. An annotation is a special form of syntactic metadata that can be added to source code elements such as classes, methods, properties and parameters. They do not affect the program semantic directly, but can be used by tools and libraries to handle such annotated code in a certain way. Examples for such usage are marking classes or methods as accessible via web services, marking methods as unit test methods, or to define how an object should be persisted.&lt;br /&gt;
&lt;br /&gt;
Annotations are mainly known from the Java programming language, and since Java 5.0 annotations are a language feature. More important, these annotations are accessible at runtime, which allow various new meta-programming approaches where the domain object stays very clean and does not have any references to the handling code, i.e. when persisting domain objects or rendering them into XML.&lt;br /&gt;
&lt;br /&gt;
Today I want to take a look on the state of annotations in the PHP world. PHP itself does not offer such a feature, so we have to take a look at userland implementations. Such implementations are possible using the reflection API introduced with PHP 5. When looking at userland implementations one has to differentiate between specialised and generic implementations. &lt;br /&gt;&lt;a href=&quot;http://www.stubbles.org/archives/54-State-of-annotations-in-the-PHP-world.html#extended&quot;&gt;Continue reading &quot;State of annotations in the PHP world&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 10 Nov 2008 16:34:06 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/54-guid.html</guid>
    
</item>
<item>
    <title>Speed, speed, speed!</title>
    <link>http://www.stubbles.org/archives/50-Speed,-speed,-speed!.html</link>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/50-Speed,-speed,-speed!.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=50</wfw:comment>

    <slash:comments>9</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=50</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    As requested I did my homework today and tested Stubbles against PHP 5.3 alpha1. Well, actually alpha2-dev, but that should not make that much difference. I don&#039;t know whether 5.3 is PHP on drugs, but runtime of our unit tests dropped from around 45 seconds with 5.2.5 to around 15 seconds on 5.3. Down to one third! This is really impressive. We will have to see how 5.3 will perform with the applications itself, but this raises expectations. &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
The other good news is that we only had two forward compatibility issues, which I instantly fixed. One of them was in a unit test and not relevant to the framework itself, the other had to do with a new check on callbacks which now forbids using private methods in callbacks, even if the callback is triggered from inside the same class.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Update&lt;/strong&gt;&lt;br /&gt;
At first I thought of just another check for the callback thing, but the comments lead me to reinspect the code. I now think it might really be a bug in PHP 5.3, therefore I created a small script to reproduce the effect, see &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=326&amp;amp;entry_id=50&quot; title=&quot;http://stubbles.net/browser/labs/experiments/general/php53/private_callback.php&quot;  onmouseover=&quot;window.status=&#039;http://stubbles.net/browser/labs/experiments/general/php53/private_callback.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;repository&lt;/a&gt;. I sent it it to Lars, who will make sure it gets fixed in the final release. 
    </content:encoded>

    <pubDate>Wed, 06 Aug 2008 18:19:36 +0200</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/50-guid.html</guid>
    
</item>
<item>
    <title>JSON-RPC Proxy Generation with PHP</title>
    <link>http://www.stubbles.org/archives/46-JSON-RPC-Proxy-Generation-with-PHP.html</link>
            <category>Conferences</category>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/46-JSON-RPC-Proxy-Generation-with-PHP.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=46</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=46</wfw:commentRss>
    

    <author>nospam@example.com (Stephan Schmidt)</author>
    <content:encoded>
    Today I gave a talk about JSON-RPC Proxy Generation with PHP at the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=307&amp;amp;entry_id=46&quot;  onmouseover=&quot;window.status=&#039;http://it-republik.de/conferences/dlw-europe/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;DLW Europe Website&quot;&gt;Dynamic Languages World Europe 2008&lt;/a&gt; in Karlsruhe Germany. The presentation covers an introduction to the Proxy and Remote Proxy Design Patterns, JSON in JavaScript and PHP as well as the JSON-RPC protocol specification. Furthermore, the slides also cover the SMD specifications and show how to generate SMD with PHP.&lt;br /&gt;
&lt;br /&gt;
Although Stubbles provides a ready-to-use processor for JSON-RPC and generating JavaScript proxy classes, the presentation takes you through all necessary steps that are needed to implement this on your own. &lt;br /&gt;
&lt;br /&gt;
&lt;object style=&quot;margin:0px&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=stephanschmidtjsonrpcwithphp-1211919750835076-9&quot;/&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;/&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;/&gt;&lt;embed src=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=stephanschmidtjsonrpcwithphp-1211919750835076-9&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
You can either view the presentation on &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=308&amp;amp;entry_id=46&quot;  onmouseover=&quot;window.status=&#039;http://www.slideshare.net/schst/jsonrpc-proxy-generation-with-php-5&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Presentation on slideshare.net&quot;&gt;slideshare.net&lt;/a&gt;, or get the PDF in our &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=309&amp;amp;entry_id=46&quot;  onmouseover=&quot;window.status=&#039;http://downloads.stubbles.net/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Download area&quot;&gt;download area&lt;/a&gt;. If you decide to use our implementation, you can find more information in the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=310&amp;amp;entry_id=46&quot;  onmouseover=&quot;window.status=&#039;http://www.stubbles.net/wiki/Docs/JsonRpc&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;JSON-RPC documentation in the manual&quot;&gt;Stubbles manual&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Tue, 27 May 2008 22:31:11 +0200</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/46-guid.html</guid>
    
</item>
<item>
    <title>Searching for a new job?</title>
    <link>http://www.stubbles.org/archives/44-Searching-for-a-new-job.html</link>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/44-Searching-for-a-new-job.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=44</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=44</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Ìn case you are interested in a new job and speak german: Read on after the break. &lt;br /&gt;&lt;a href=&quot;http://www.stubbles.org/archives/44-Searching-for-a-new-job.html#extended&quot;&gt;Continue reading &quot;Searching for a new job?&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 11 Mar 2008 16:56:59 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/44-guid.html</guid>
    
</item>
<item>
    <title>Traits for PHP</title>
    <link>http://www.stubbles.org/archives/42-Traits-for-PHP.html</link>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/42-Traits-for-PHP.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=42</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=42</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Just stumbled over a &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=279&amp;amp;entry_id=42&quot; title=&quot;http://news.php.net/php.internals/35562&quot;  onmouseover=&quot;window.status=&#039;http://news.php.net/php.internals/35562&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;proposal for traits in PHP&lt;/a&gt;, proposed by &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=280&amp;amp;entry_id=42&quot; title=&quot;http://stefan-marr.de/archives/16-Traits-for-PHP.html&quot;  onmouseover=&quot;window.status=&#039;http://stefan-marr.de/archives/16-Traits-for-PHP.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Stefan Marr&lt;/a&gt;. Being a bit sceptical at first I came to the conclusion that this would be a really useful feature - and save us a bunch of doubled code in Stubbles. After reading the RFC until the end I noticed that I saw a similar concept some weeks before in Java: &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=281&amp;amp;entry_id=42&quot; title=&quot;http://www.qi4j.org/&quot;  onmouseover=&quot;window.status=&#039;http://www.qi4j.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Qi4J&lt;/a&gt; tries to achieve the same, but requires very much code to get this done. As a language construct within PHP it would be very easy to do the same, but easier to learn and to use. Beside some keyword issues (the RFC uses &quot;use&quot; as keyword, but this will of course conflict with &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=282&amp;amp;entry_id=42&quot; title=&quot;http://php.net/manual/en/language.namespaces.using.php&quot;  onmouseover=&quot;window.status=&#039;http://php.net/manual/en/language.namespaces.using.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;namespaces&lt;/a&gt;) I&#039;m wondering what this will have an impact on reflection - the RFC stays unclear about this. What do I get when reflecting a method from a trait, or a method in a class that originally comes out of a trait?&lt;br /&gt;
&lt;br /&gt;
However I&#039;m not very confident that this feature will make its way into PHP - maybe I&#039;ve read to much internals... 
    </content:encoded>

    <pubDate>Mon, 18 Feb 2008 22:04:37 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/42-guid.html</guid>
    
</item>
<item>
    <title>Do not trust the reflection API</title>
    <link>http://www.stubbles.org/archives/40-Do-not-trust-the-reflection-API.html</link>
            <category>Planet PHP</category>
    
    <comments>http://www.stubbles.org/archives/40-Do-not-trust-the-reflection-API.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=40</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=40</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    At least if it comes to internal classes. If you try to get informations about parameters from methods of internal classes - forget that. Examining several internal classes my key findings are: either there is no information about parameters available and the reflection API says the method does not have any parameters, or the information about the parameter is wrong. Some examples I retrieved with the following script:&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.stubbles.org/archives/40-Do-not-trust-the-reflection-API.html#extended&quot;&gt;Continue reading &quot;Do not trust the reflection API&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 26 Jan 2008 13:28:57 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/40-guid.html</guid>
    
</item>

</channel>
</rss>