<?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>sklar.com/blog Comments</title>
    <link>http://www.sklar.com/blog/</link>
    <description>Comments from ...composed of an indefinite, perhaps infinite number of hexagonal galleries...</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:web-blog@sklar.com" />
    <generator>Serendipity 0.8-beta1 - http://www.s9y.org/</generator>
    <pubDate>Thu, 09 Feb 2012 06:11:59 GMT</pubDate>

    <image>
        <url>http://www.sklar.com/blog/templates/sklar-sm/img/s9y_banner_small.png</url>
        <title>RSS: sklar.com/blog Comments - Comments from ...composed of an indefinite, perhaps infinite number of hexagonal galleries...</title>
        <link>http://www.sklar.com/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>
<item>
    <title>: Fast Multiple String Replacement in PHP</title>
    <link>http://www.sklar.com/blog/archives/122-Fast-Multiple-String-Replacement-in-PHP.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/122-Fast-Multiple-String-Replacement-in-PHP.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=122</wfw:comment>
    <author>web-blog@sklar.com (David)</author>
    <content:encoded>
Hi, Jan. The code (for the extension) is a little simpler this way. But it would certainly work just as well as an object instead of a resource that gets passed around.    </content:encoded>
    <pubDate>Thu, 30 Sep 2010 10:10:27 -0400</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/122-guid.html#c7328</guid>
    </item>
<item>
    <title>: Fast Multiple String Replacement in PHP</title>
    <link>http://www.sklar.com/blog/archives/122-Fast-Multiple-String-Replacement-in-PHP.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/122-Fast-Multiple-String-Replacement-in-PHP.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=122</wfw:comment>
    <author>jan.hancic@gmail.com (Jan Han&amp;#269;i&amp;#269;)</author>
    <content:encoded>
Why did you went the functional way, not object oriented?    </content:encoded>
    <pubDate>Wed, 29 Sep 2010 16:36:12 -0400</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/122-guid.html#c7327</guid>
    </item>
<item>
    <title>: Efficiency is not one-dimensional, part MMDXXI</title>
    <link>http://www.sklar.com/blog/archives/36-Efficiency-is-not-one-dimensional,-part-MMDXXI.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/36-Efficiency-is-not-one-dimensional,-part-MMDXXI.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=36</wfw:comment>
    <author>web-blog@sklar.com (David Sklar)</author>
    <content:encoded>
Thanks! Link fixed.    </content:encoded>
    <pubDate>Thu, 03 Jun 2010 10:08:35 -0400</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/36-guid.html#c7306</guid>
    </item>
<item>
    <title>: Efficiency is not one-dimensional, part MMDXXI</title>
    <link>http://www.sklar.com/blog/archives/36-Efficiency-is-not-one-dimensional,-part-MMDXXI.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/36-Efficiency-is-not-one-dimensional,-part-MMDXXI.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=36</wfw:comment>
    <author>alex.moon@webdragon.com.au (Alex)</author>
    <content:encoded>
Link's broken. A copy of the message can be found here: http://lists.nyphp.org/pipermail/talk/2004-April/009305.html    </content:encoded>
    <pubDate>Wed, 02 Jun 2010 23:37:46 -0400</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/36-guid.html#c7305</guid>
    </item>
<item>
    <title>: PHP Microbenchmarking</title>
    <link>http://www.sklar.com/blog/archives/121-PHP-Microbenchmarking.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/121-PHP-Microbenchmarking.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=121</wfw:comment>
    <author>chris@shiflett.org (Chris Shiflett)</author>
    <content:encoded>
He lives! I forgot this blog existed. &lt;img src=&quot;http://www.sklar.com/blog/templates/sklar-sm/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;    </content:encoded>
    <pubDate>Tue, 04 May 2010 14:45:57 -0400</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/121-guid.html#c7303</guid>
    </item>
<item>
    <title>: PHP + Emacs</title>
    <link>http://www.sklar.com/blog/archives/119-PHP-+-Emacs.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/119-PHP-+-Emacs.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=119</wfw:comment>
    <author>sklar@sklar.com (Johny)</author>
    <content:encoded>
Well mhh i am so happy that i don´t have to use emacs anymore why should i drop my beatiful eclipse for emacs ?    </content:encoded>
    <pubDate>Tue, 03 Jun 2008 11:01:31 -0400</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/119-guid.html#c7215</guid>
    </item>
<item>
    <title>: Prolific Name-Sources</title>
    <link>http://www.sklar.com/blog/archives/117-Prolific-Name-Sources.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/117-Prolific-Name-Sources.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=117</wfw:comment>
    <author>sklar@sklar.com (firebus)</author>
    <content:encoded>
A fuzzy-edged bucket (something you'd want to vomit into at burning man?) Is it just people with things named after them? Multiple things? All their names?&lt;br /&gt;
&lt;br /&gt;
I'd suggest Haile Selassie, nee Ras Tafari Mekonnen, since two names are concatenated in Rastafianism (although I guess Ras is really an honorific and not a name). That might be a fuzzy-edge case.    </content:encoded>
    <pubDate>Fri, 28 Mar 2008 19:01:36 -0400</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/117-guid.html#c7212</guid>
    </item>
<item>
    <title>: Let a thousand string concatenations bloom</title>
    <link>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=116</wfw:comment>
    <author>adam@trachtenberg.com (Adam Trachtenberg)</author>
    <content:encoded>
I'm late to the party, but here's my offering:&lt;br /&gt;
&lt;br /&gt;
$alice = array_reduce(array($bob, $charlie), create_function('$a,$b', 'return &quot;$a$b&quot;;'));    </content:encoded>
    <pubDate>Sat, 01 Dec 2007 03:16:02 -0500</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/116-guid.html#c7192</guid>
    </item>
<item>
    <title>: Let a thousand string concatenations bloom</title>
    <link>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=116</wfw:comment>
    <author>jorrit@ncode.nl (Jorrit Schippers)</author>
    <content:encoded>
I suggest using a web service for this &lt;img src=&quot;http://www.sklar.com/blog/templates/sklar-sm/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, 19 Nov 2007 17:01:28 -0500</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/116-guid.html#c7188</guid>
    </item>
<item>
    <title>: Let a thousand string concatenations bloom</title>
    <link>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=116</wfw:comment>
    <author>web-blog@sklar.com (David)</author>
    <content:encoded>
I think Russ's preg_replace() contraption has a certain amount of &quot;ridiculous, but not too ridiculous&quot; elegance, but the combination of using MySQL's CONCAT() function and then extract() in demiurg's I think takes the &quot;hilarious overkill&quot; prize!    </content:encoded>
    <pubDate>Thu, 15 Nov 2007 10:41:19 -0500</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/116-guid.html#c7187</guid>
    </item>
<item>
    <title>: Let a thousand string concatenations bloom</title>
    <link>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=116</wfw:comment>
    <author>demiurg@gmail.com (demiurg)</author>
    <content:encoded>
oh, take my favourite one:&lt;br /&gt;
&lt;br /&gt;
$link = mysql_connect('localhost') or die(&quot;Can't connect&quot;);&lt;br /&gt;
${0} = mysql_select_db('mysql') or die(&quot;Can't select DB&quot;);&lt;br /&gt;
&lt;br /&gt;
$sql = &quot;SELECT CONCAT('&quot;.mysql_real_escape_string($a).&quot;', '&quot;.mysql_real_escape_string($b).&quot;') AS c&quot;;&lt;br /&gt;
$q = mysql_query($sql) or die(&quot;Can't query&quot;);&lt;br /&gt;
$D = mysql_fetch_assoc($q) or die(&quot;Can't get data&quot;);&lt;br /&gt;
extract($D);&lt;br /&gt;
&lt;br /&gt;
feel free to refactor that for your favourite framework =P&lt;br /&gt;
do I win? do I win?    </content:encoded>
    <pubDate>Wed, 14 Nov 2007 18:57:58 -0500</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/116-guid.html#c7186</guid>
    </item>
<item>
    <title>: Let a thousand string concatenations bloom</title>
    <link>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=116</wfw:comment>
    <author>fa@codeschmie.de (fa)</author>
    <content:encoded>
I tried to benchmark&lt;br /&gt;
echo $a,$b;&lt;br /&gt;
vs.&lt;br /&gt;
echo $a.$b;&lt;br /&gt;
at one point and came to the conclusion that from a string length of 35-40 (and assuming $a and $b have about the same length that , starts to get faster.&lt;br /&gt;
&lt;br /&gt;
Not that I've ever seen an application that remotely would benefit from a fast echo/output &lt;img src=&quot;http://www.sklar.com/blog/templates/sklar-sm/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;    </content:encoded>
    <pubDate>Wed, 14 Nov 2007 18:23:33 -0500</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/116-guid.html#c7185</guid>
    </item>
<item>
    <title>: Let a thousand string concatenations bloom</title>
    <link>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=116</wfw:comment>
    <author>russ@firebus.com (firebus)</author>
    <content:encoded>
$alice = '';&lt;br /&gt;
$alice = preg_replace('/$/', $bob, $alice);&lt;br /&gt;
$alice = preg_replace('/$/', $charlie, $alice);    </content:encoded>
    <pubDate>Wed, 14 Nov 2007 17:47:42 -0500</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/116-guid.html#c7184</guid>
    </item>
<item>
    <title>: Let a thousand string concatenations bloom</title>
    <link>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/116-Let-a-thousand-string-concatenations-bloom.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=116</wfw:comment>
    <author>brian@phorum.org (Brian Moon)</author>
    <content:encoded>
The last two are bit gratuitous but yeah, there are a lot of ways to do it.  FWIW, sprintf is fastest.    </content:encoded>
    <pubDate>Wed, 14 Nov 2007 17:40:35 -0500</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/116-guid.html#c7183</guid>
    </item>
<item>
    <title>: DC PHP 2007 Slides</title>
    <link>http://www.sklar.com/blog/archives/115-DC-PHP-2007-Slides.html</link>
<category></category>    <comments>http://www.sklar.com/blog/archives/115-DC-PHP-2007-Slides.html#comments</comments>
    <wfw:comment>http://www.sklar.com/blog/wfwcomment.php?cid=115</wfw:comment>
    <author>quickshiftin@gmail.com (Nathan Nobbe)</author>
    <content:encoded>
Hi David,&lt;br /&gt;
first off let me say i really enjoyed your talk and took a lot home from it; very good stuff.&lt;br /&gt;
anyway i wanted to discuss with you the slide entitled 'Late Static Binding Workaround'.  recently there was a discussion on php-general (mailing list) regarding variable functions.&lt;br /&gt;
here somebody said the same thing you did in your presentation about php being able to resolve static method calls dynamically at runtime in php 5.3, but i believe support is there in 5.2.4.  i see from your slides that youre currently running php 5.2.3 so im not sure if support is there yet.  anyway the reason i didnt bring this up during the talk is the slide doesnt show the ideal code you would like to be able to run, but im guessing it looks something like this:&lt;br /&gt;
    $someClassName::staticClassMethod($args);&lt;br /&gt;
&lt;br /&gt;
the conversation on php-general prompted me to write a test script and i discovered there is such support under php 5.2.4 (perhaps earlier as well, but i havent tested other versions)&lt;br /&gt;
&lt;br /&gt;
anyway would you mind taking a look at the test script and telling me if thats the syntax you were looking for?  if it is you wont have to wait around for php 5.3 &lt;img src=&quot;http://www.sklar.com/blog/templates/sklar-sm/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
here is a stripped down version of the test script to highlight the ability to call static functions dynamically:&lt;br /&gt;
&lt;br /&gt;
-nathan&lt;br /&gt;
&lt;br /&gt;
ps.&lt;br /&gt;
i noticed you are filtering the php code  posted here; please see&lt;br /&gt;
http://www.nabble.com/Re%3A-Function-variables-in-classes-p13532946.html&lt;br /&gt;
&lt;br /&gt;
for the original post from the  mailing list.&lt;br /&gt;
&lt;br /&gt;
class Foo {&lt;br /&gt;
    static public function staticMethod() {&lt;br /&gt;
        echo &lt;u&gt;_METHOD_&lt;/u&gt; . PHP_EOL;&lt;br /&gt;
        var_dump(func_get_args());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$fooStr = 'Foo';&lt;br /&gt;
$fooStr::staticMethod('blah', 1, true);    </content:encoded>
    <pubDate>Tue, 13 Nov 2007 11:58:11 -0500</pubDate>
    <guid isPermaLink="false">http://www.sklar.com/blog/archives/115-guid.html#c7182</guid>
    </item>
</channel>
</rss>

