5 Ways to show that you're l33t
Submitted by phrax on Fri, 2004-11-05 15:20. Hall of Fame | Wonky CodeSomebody sent this in yesterday, it's in German, but bad code is bad in any language. There are so many WTFs with this code I had to summarize the best WTFs for you:
list($as,$nl)=explode("0","array_slice0<br>\n");
I guess actually declaring the variables $as and $nl took too many lines of code.» 12 comments | read more
More solutions for idle CPU time.
Submitted by phrax on Tue, 2004-11-02 15:17. Wonky CodeYesterday we had a great example of how to make sure your database isn't slacking off. Here's a example to make sure your web server keeps working hard too.
Also thanks to everybody who submitted a WTF. Keep them coming! :)
<?php
if( $_USER['uid'] > 1 )
{
$usermenu = new Template( $_CONF['path_layout'] );
$usermenu->set_file( array( 'option' => 'useroption.thtml',
'current' => 'useroption_off.thtml' ));
$usermenu->set_var( 'site_url', $_CONF['site_url'] );
$usermenu->set_var( 'layout_url', $_CONF['layout_url'] );
<strong>$usermenu->set_var( 'block_name', str_replace( '_', '-', 'user_block' ));</strong>
if( empty( $title ))
{
$title = DB_getItem( $_TABLES['blocks'], 'title', "name='user_block'" );
}
//....
?>