<?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>Magnus Määttä - PHP</title>
    <link>http://blog.novell.stoldgods.nu/</link>
    <description>Stoldgods = Stolen goods</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.0.4 - http://www.s9y.org/</generator>
    <pubDate>Fri, 04 Nov 2005 15:37:21 GMT</pubDate>

    <image>
        <url>http://blog.novell.stoldgods.nu/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Magnus Määttä - PHP - Stoldgods = Stolen goods</title>
        <link>http://blog.novell.stoldgods.nu/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Isn't unreadable code fun ?</title>
    <link>http://blog.novell.stoldgods.nu/archives/59-Isnt-unreadable-code-fun.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/59-Isnt-unreadable-code-fun.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=59</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=59</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    How much fun can you have with the tenary operator ?&lt;br /&gt;
Well, since you can do stuff which wouldn&#039;t otherwise be possible for variable variables, it allows for much fun!&lt;br /&gt;
Just have a look at this &quot;beauty&quot;!&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;font-size: 8pt&quot;&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;class&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;test&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;public&amp;#160;function&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;test1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;echo&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Inside&amp;#160;test1()\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;{((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_start&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;debug_print_backtrace&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_get_contents&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;())?(&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_end_clean&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;str_replace&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(array(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;-&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;::&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;&amp;#160;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strpos&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;#0&amp;#160;&amp;#160;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))))?(&lt;br /&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strpos&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;(&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)))?((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;sscanf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;#0&amp;#160;&amp;#160;%s&amp;#160;%s&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;trim&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]==&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)])&lt;br /&gt;:&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)-&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)).(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)-&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)}+&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)}();&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;public&amp;#160;function&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;test2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;echo&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Inside&amp;#160;test2()\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;{((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_start&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;debug_print_backtrace&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_get_contents&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;())?(&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_end_clean&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;str_replace&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(array(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;-&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;::&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;&amp;#160;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strpos&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;#1&amp;#160;&amp;#160;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))))?(&lt;br /&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strpos&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;(&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)))?((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;sscanf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;#1&amp;#160;&amp;#160;%s&amp;#160;%s&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;trim&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]==&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)])&lt;br /&gt;:&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)-&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)).(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)-&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)}+&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)}();&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;public&amp;#160;function&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;test3&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;echo&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Inside&amp;#160;test3()\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;{((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_start&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;debug_print_backtrace&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_get_contents&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;())?(&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ob_end_clean&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()?((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;str_replace&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(array(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;-&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;::&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;&amp;#160;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strpos&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;#1&amp;#160;&amp;#160;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))))?(&lt;br /&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strpos&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;(&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)))?((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;sscanf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;#1&amp;#160;&amp;#160;%s&amp;#160;%s&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;trim&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]==&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)])&lt;br /&gt;:&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)-&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)).(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)-&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)}+&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;):&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)}();&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;public&amp;#160;function&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;test4&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;echo&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Inside&amp;#160;test4()\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$test&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;#160;new&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$test&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;test1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 04 Nov 2005 16:22:36 +0100</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/59-guid.html</guid>
    
</item>
<item>
    <title>PHP scripting for Irssi</title>
    <link>http://blog.novell.stoldgods.nu/archives/58-PHP-scripting-for-Irssi.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/58-PHP-scripting-for-Irssi.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=58</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    The other day, as the only user of php-irssi (if there&#039;s anyone else using it please make yourself known!), Wez asked me to check if it compiled against latest PHP cause someone had some problems with it. It compiled fine but most scripts didn&#039;t work, well, anything that actually did something didn&#039;t work. It turned out to be a signature change related to objects in the PHP_5_1 branch that caused some problems.&lt;br /&gt;
&lt;br /&gt;
It should be fixed now, so if you want to be cool like me and write your IRC scripts in PHP, get php-irssi now!&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ cvs -d:pserver:cvsread@cvs.php.net:/repository login&lt;br /&gt;
Enter phpfi as password&lt;br /&gt;
$ cvs -z5 -d:pserver:cvsread@cvs.php.net:/repository co embed&lt;br /&gt;
&lt;/code&gt; 
    </content:encoded>

    <pubDate>Sat, 29 Oct 2005 17:36:29 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/58-guid.html</guid>
    
</item>
<item>
    <title>Funny blog post by Terry Chay about PHP and security</title>
    <link>http://blog.novell.stoldgods.nu/archives/56-Funny-blog-post-by-Terry-Chay-about-PHP-and-security.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/56-Funny-blog-post-by-Terry-Chay-about-PHP-and-security.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=56</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    Best part:&lt;br /&gt;
&quot;What sort of loser came up with the term enterprise anyway? No doubt it was some hapless biz-marketing closet trekkie geek.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blog.novell.stoldgods.nu/exit.php?url_id=114&amp;amp;entry_id=56&quot; title=&quot;http://terrychay.com/blog/article/php-security-the-oxymoron.shtml&quot;  onmouseover=&quot;window.status=&#039;http://terrychay.com/blog/article/php-security-the-oxymoron.shtml&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Here&#039;s the link.&lt;/a&gt; 
    </content:encoded>

    <pubDate>Thu, 11 Aug 2005 23:44:47 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/56-guid.html</guid>
    
</item>
<item>
    <title>Happy birtday PHP! And goto stuff..</title>
    <link>http://blog.novell.stoldgods.nu/archives/53-Happy-birtday-PHP!-And-goto-stuff...html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/53-Happy-birtday-PHP!-And-goto-stuff...html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=53</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    Today PHP turned one tenth of a century old!&lt;br /&gt;
&lt;br /&gt;
Here is the &lt;a href=&quot;http://blog.novell.stoldgods.nu/exit.php?url_id=107&amp;amp;entry_id=53&quot; title=&quot;http://groups-beta.google.com/group/comp.infosystems.www.authoring.cgi/browse_thread/thread/3f2276e6067acfb0/cc7d43454d64d133&quot;  onmouseover=&quot;window.status=&#039;http://groups-beta.google.com/group/comp.infosystems.www.authoring.cgi/browse_thread/thread/3f2276e6067acfb0/cc7d43454d64d133&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;announcement&lt;/a&gt; for PHP 1.0.&lt;br /&gt;
I still remember some of my first experience with PHP, 2.0-something. Just a few flashes mostly. Coded some stuff in ASP and JSP for a few years before I came back to PHP around version 3.0 or something like that, I&#039;m not exactly sure. Used some more ASP, got burned by it and moved along to a more mature PHP 4.something.something.&lt;br /&gt;
&lt;br /&gt;
In unrelated news, I created a new goto thread - another monster. It&#039;s waaaay too long and it&#039;s mostly comments like &quot;goto is baaaad!! Spaghetti code!! Me no like!&quot; and responses to that. A very few replies which actually brings up technical problems or standpoints. I would say 80% of everything in the thread is just personal opinions.&lt;br /&gt;
But what I don&#039;t understand is why we who want to use it and can use it wisely should be refused to have that option.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a patch by Sara: &lt;a href=&quot;http://blog.novell.stoldgods.nu/exit.php?url_id=108&amp;amp;entry_id=53&quot; title=&quot;http://pecl.org/patches/goto_5.1.0.diff&quot;  onmouseover=&quot;window.status=&#039;http://pecl.org/patches/goto_5.1.0.diff&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;goto_5.1.0.diff&lt;/a&gt;&lt;br /&gt;
And my rework of Sara&#039;s old patch: &lt;a href=&quot;http://blog.novell.stoldgods.nu/exit.php?url_id=109&amp;amp;entry_id=53&quot; title=&quot;http://php.novell.stoldgods.nu/opcode_goto_5.1.0-3.diff&quot;  onmouseover=&quot;window.status=&#039;http://php.novell.stoldgods.nu/opcode_goto_5.1.0-3.diff&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;opcode_goto_5.1.0-3.diff&lt;/a&gt;&lt;br /&gt;
I would recommend using Sara&#039;s new patch instead of my reworked patch of her old code.&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 08 Jun 2005 07:19:14 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/53-guid.html</guid>
    
</item>
<item>
    <title>Updated my CVS scripts</title>
    <link>http://blog.novell.stoldgods.nu/archives/48-Updated-my-CVS-scripts.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/48-Updated-my-CVS-scripts.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=48</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=48</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    I have updated my CVS scripts (loginfo) today. I fixed a few bugs with them.&lt;br /&gt;
&lt;br /&gt;
First of all, if you&#039;re using SMTP to send mail, it will now wait for reply from the SMTP server before going ahead and sending any data to it to make sure the server accept the mail.&lt;br /&gt;
Second fix was for the cvsusers file. I made a small typo last time I touched it so it didn&#039;t use the file so no sender was used in the mails.&lt;br /&gt;
Third fix was for the subject which disappeared when I tried to fix the other two things, so it didn&#039;t affect earlier versions of the script.&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://blog.novell.stoldgods.nu/archives/48-Updated-my-CVS-scripts.html#extended&quot;&gt;Continue reading &quot;Updated my CVS scripts&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 29 May 2005 20:06:25 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/48-guid.html</guid>
    
</item>
<item>
    <title>SWIP - Shell Written In PHP</title>
    <link>http://blog.novell.stoldgods.nu/archives/38-SWIP-Shell-Written-In-PHP.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/38-SWIP-Shell-Written-In-PHP.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=38</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=38</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    Last weekend I wrote a small and simple shell in PHP in about 8 hours. It have some builtin commands, a simple API to add more commands written in PHP, supports ENV vars, have eval (for PHP code) and a &quot;fancy&quot; prompt.&lt;br /&gt;
&lt;br /&gt;
You are probably sitting there thinking &quot;What the hell? Who needs a shell written in PHP?&quot;&lt;br /&gt;
The answer is simple: No one! It&#039;s just a small experiment I wanted to try, that I have been thinking about for some time.&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://blog.novell.stoldgods.nu/archives/38-SWIP-Shell-Written-In-PHP.html#extended&quot;&gt;Continue reading &quot;SWIP - Shell Written In PHP&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 16 Apr 2005 19:44:43 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/38-guid.html</guid>
    
</item>
<item>
    <title>New POSIX function: posix_mknod()</title>
    <link>http://blog.novell.stoldgods.nu/archives/37-New-POSIX-function-posix_mknod.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/37-New-POSIX-function-posix_mknod.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=37</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=37</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    Here&#039;s a patch that adds posix_mknod (man 2 mknod) to the POSIX extension. Useful if you&#039;re going for a &quot;do everything with PHP&quot;-approach (see later entry).&lt;br /&gt;
&lt;br /&gt;
No feature requests exists for it afaik.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blog.novell.stoldgods.nu/exit.php?url_id=100&amp;amp;entry_id=37&quot; title=&quot;http://novell.stoldgods.nu/~magnus/php/mknod.patch&quot;  onmouseover=&quot;window.status=&#039;http://novell.stoldgods.nu/~magnus/php/mknod.patch&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Here&lt;/a&gt; is the patch. 
    </content:encoded>

    <pubDate>Thu, 14 Apr 2005 16:58:42 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/37-guid.html</guid>
    
</item>
<item>
    <title>PHP for Irssi</title>
    <link>http://blog.novell.stoldgods.nu/archives/26-PHP-for-Irssi.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/26-PHP-for-Irssi.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=26</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=26</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    So now I&#039;ve been experimenting with PHP scripting module for Irssi for some time and using it to protect some channels from lamers. Found some problems though..&lt;br /&gt;
&lt;br /&gt;
It seems like it doesn&#039;t free allocated objects after a signal handler have been called and the execution is done, which is why I get over a million memleaks now and then when I reload the module. Too bad Wez doesn&#039;t have time to hack on it right now... 
    </content:encoded>

    <pubDate>Mon, 13 Dec 2004 01:20:21 +0100</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/26-guid.html</guid>
    
</item>
<item>
    <title>Making Irssi scripts with PHP</title>
    <link>http://blog.novell.stoldgods.nu/archives/22-Making-Irssi-scripts-with-PHP.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/22-Making-Irssi-scripts-with-PHP.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=22</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=22</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    Since I lost all data in /home I had to start writing new scripts for Irssi. And I can, without lying, say that I hate Perl. So the obvious thing to do was to try to get php-irssi up and running, which was easy.&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://blog.novell.stoldgods.nu/archives/22-Making-Irssi-scripts-with-PHP.html#extended&quot;&gt;Continue reading &quot;Making Irssi scripts with PHP&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 21 Oct 2004 00:02:59 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/22-guid.html</guid>
    
</item>
<item>
    <title>CVS loginfo</title>
    <link>http://blog.novell.stoldgods.nu/archives/18-CVS-loginfo.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/18-CVS-loginfo.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=18</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=18</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    I forgot to write about this two or was it three days ago..&lt;br /&gt;
I have written a loginfo script for CVS in PHP which should work with both CVS 1.11.x and 1.12.x, I haven&#039;t really tried it since I added 1.12.x support in it. If there are any problems, they should be pretty easy to fix.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://blog.novell.stoldgods.nu/archives/18-CVS-loginfo.html#extended&quot;&gt;Continue reading &quot;CVS loginfo&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 29 Sep 2004 21:40:16 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/18-guid.html</guid>
    
</item>
<item>
    <title>EHUP - Extremely Hacked and Unsupported PHP</title>
    <link>http://blog.novell.stoldgods.nu/archives/14-EHUP-Extremely-Hacked-and-Unsupported-PHP.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/14-EHUP-Extremely-Hacked-and-Unsupported-PHP.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=14</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=14</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    So I&#039;m now working on stripping PHP from everything not needed to run as a daemon on small embed box and also handling things like system init, configuration files, etc..&lt;br /&gt;
The name for this project is EHUP - &lt;b&gt;E&lt;/b&gt;xtremely &lt;b&gt;H&lt;/b&gt;acked and &lt;b&gt;U&lt;/b&gt;nsupported &lt;b&gt;P&lt;/b&gt;HP.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://blog.novell.stoldgods.nu/archives/14-EHUP-Extremely-Hacked-and-Unsupported-PHP.html#extended&quot;&gt;Continue reading &quot;EHUP - Extremely Hacked and Unsupported PHP&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 13 Sep 2004 20:44:19 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/14-guid.html</guid>
    
</item>
<item>
    <title>posix_access function</title>
    <link>http://blog.novell.stoldgods.nu/archives/11-posix_access-function.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/11-posix_access-function.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=11</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=11</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    I put together a patch that adds the POSIX access(2) function to PHP and posted a patch to the internals mailinglist, but no replies yet. It will fix bug &lt;a href=&quot;http://blog.novell.stoldgods.nu/exit.php?url=aHR0cDovL2J1Z3MucGhwLm5ldC8xNDkyNA==&amp;amp;entry_id=11&quot;  onmouseover=&quot;window.status=&#039;http://bugs.php.net/14924&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;PHP Bug #14924&quot;&gt;14924&lt;/a&gt; and partly fix bug &lt;a href=&quot;http://blog.novell.stoldgods.nu/exit.php?url=aHR0cDovL2J1Z3MucGhwLm5ldC8yOTYxNQ==&amp;amp;entry_id=11&quot;  onmouseover=&quot;window.status=&#039;http://bugs.php.net/29615&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;PHP Bug #29615&quot;&gt;29615&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The patch can be found &lt;a href=&quot;http://blog.novell.stoldgods.nu/exit.php?url=aHR0cDovL25vdmVsbC5zdG9sZGdvZHMubnUvfm1hZ251cy9waHAvcG9zaXhfYWNjZXNzLnBhdGNo&amp;amp;entry_id=11&quot;  onmouseover=&quot;window.status=&#039;http://novell.stoldgods.nu/~magnus/php/posix_access.patch&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;Patch for PHP (HEAD) that adds posix_access() function&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
If open_basedir is used and you try to access a file outside allowed dirs it will emulate an EACCES error (Permission denied). 
    </content:encoded>

    <pubDate>Sun, 15 Aug 2004 20:32:07 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/11-guid.html</guid>
    
</item>
<item>
    <title>Give me my precious goto!</title>
    <link>http://blog.novell.stoldgods.nu/archives/10-Give-me-my-precious-goto!.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/10-Give-me-my-precious-goto!.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=10</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=10</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    I&#039;ve been away again for a few days.. Installed a new kernel which didn&#039;t work so good, locked up my machine when I started XMMS, etc. I was using 2.6.7-mm6. But now I&#039;m back with a new working kernel.&lt;br /&gt;
&lt;br /&gt;
So I have catched up a bit on mail and I saw this lengthy thread about goto.&lt;br /&gt;
Sara wrote a patch for PHP to add goto to it, which is great, exactly what I need. But noooooo!&lt;br /&gt;
Some people don&#039;t think we need it (and vetoed it if I understand it correctly) even though lots people voted &lt;u&gt;for&lt;/u&gt; it. They say there are other ways to do what goto does or that it will allow novice programmers to shoot themself in the foot. Sure there are other ways to do goto&#039;s, lots and lots of annoying, messy, hairy, butt-ugly loops!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Goto would be a good thing to have.&lt;/b&gt;&lt;br /&gt;
(1) I wrote a parser a few months ago which rewrites some code to a better format that is better suited for the final parsing.&lt;br /&gt;
&lt;br /&gt;
(2) Then I had to add some features to it that it was missing, but that wasn&#039;t that simple at all. This was probably the first time I cursed PHP for not having goto. I now had to rewrite it all because it was too messy to add the features I needed with all loops and recursive functions to emulate goto. So I rewrote it. It worked really great.&lt;br /&gt;
&lt;br /&gt;
(3) Then I realized I needed yet another feature which wasn&#039;t compitable with the old way I was parsing the files through the loops, so once again I had to rewrite the parser. At this time I started to get a bit pissed off at the lack of goto, but I could handle it. It only took me 4 hours to rewrite it with the added functionality.&lt;br /&gt;
&lt;br /&gt;
(4) A few days ago I yet again found a feature I need which again is incompitable with the current loop structure in one way or another, or I might have to add yet another nested loop, I don&#039;t know. But it&#039;s getting &lt;u&gt;extremly&lt;/u&gt; annoying with all these loops to emulate goto.&lt;br /&gt;
&lt;br /&gt;
Now you might ask yourself why the hell I rewrite it everytime or you think for yourself that my code must suck or that it isn&#039;t commented enough or something. It &lt;u&gt;is&lt;/u&gt;. The thing is that it&#039;s extremly hard to follow the code path between the loops and recursions. The code is in execute-only mode now and it was write-only when I wrote it.&lt;br /&gt;
&lt;br /&gt;
If we had goto it would have saved me atleast 12 hours of coding. 
    </content:encoded>

    <pubDate>Sun, 01 Aug 2004 15:59:38 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/10-guid.html</guid>
    
</item>
<item>
    <title>Language support in Horde/IMP fucked up</title>
    <link>http://blog.novell.stoldgods.nu/archives/8-Language-support-in-HordeIMP-fucked-up.html</link>
            <category>PHP</category>
    
    <comments>http://blog.novell.stoldgods.nu/archives/8-Language-support-in-HordeIMP-fucked-up.html#comments</comments>
    <wfw:comment>http://blog.novell.stoldgods.nu/wfwcomment.php?cid=8</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://blog.novell.stoldgods.nu/rss.php?version=2.0&amp;type=comments&amp;cid=8</wfw:commentRss>
    

    <author>nospam@example.com (Magnus Määttä)</author>
    <content:encoded>
    I have now, together with a friend, been trying to configure horde and imp to support several languages. After a lot of testing we eventually found out how to get the languages working. Almost.&lt;br /&gt;
&lt;br /&gt;
This is like the strangest problem ever. We&#039;re using latest release btw.&lt;br /&gt;
If we make sv_SE default language for horde and imp, the site is in english when we first connect to it (the login screen). Then if we select Swedish we get logged in and everything will be in english. Now, if we choose any other language from the list, we&#039;re getting the site in swedish.&lt;br /&gt;
If we leave the en_US default for horde alone and no default for imp all languages works just fine, &lt;strong&gt;except&lt;/strong&gt; swedish. The site will be in english if swedish is selected now.&lt;br /&gt;
&lt;br /&gt;
We regenerated system locales (/etc/locales.gen) and selected every supported locale, around 170. And we ran make in horde/po and we have all mo-files.&lt;br /&gt;
&lt;br /&gt;
Is it just us or is it really fucked up ? 
    </content:encoded>

    <pubDate>Fri, 16 Jul 2004 03:55:35 +0200</pubDate>
    <guid isPermaLink="false">http://blog.novell.stoldgods.nu/archives/8-guid.html</guid>
    
</item>

</channel>
</rss>
