Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bbPress 0.9.0.4 and 1.0-alpha-5 released


_ck_
Participant

@_ck_

Thanks for the fix Sam.

What’s really scary is the code it replaced.

I can’t believe what I was seeing – did they really build the $table on EACH and EVERY call instead of making it static? That’s some serious non-performance thinking.

I mean just look at it, ugh:

function htmlspecialchars_decode( $str, $quote_style = ENT_COMPAT ) {
$table = array_flip( get_html_translation_table( HTML_SPECIALCHARS, $quote_style ) );
$table = array_merge( array( ''' => "'" ), $table, array( '&' => "&", '&' => "&" ) );
return strtr( $str, $table );

on EVERY call it builds $table?

Well it’s gone now so I guess that’s what counts.

I hope the error catching routine doesn’t slow things down too much.

Personally I am waiting for PHP 5.3 to finally “upgrade” from PHP 4

It won’t be worth it until then.

Skip to toolbar