A true PHP ‘huh?’…
I really get into some of the things they find over at The PHP WTF. They really do make you go WTF when you look at the code. The latest one is a classic.
function Odcesti($slovo,$nazevsloupce)
{$exp = explode(” “, strtolower($slovo));
$query = implode(“%”, $exp);$query=StrTr($query,
“xC1xC8xCFxC9xCCxCDxBCxD2xD3xD4xD8×8A”.
“x8DxDAxD9xDDx8ExE1xE8xEFxE9xECxED”.
“xBExF2xF4xF3xF8×9Ax9DxFAxF9xFDx9E”,
“acdeeilnoorstuuyzacdeeilnoorstuuyz”);return ” LOWER(
REPLACE( REPLACE( REPLACE( REPLACE( REPLACE( REPLACE(
REPLACE( REPLACE( REPLACE( REPLACE( REPLACE( REPLACE(
REPLACE( REPLACE( REPLACE( REPLACE( REPLACE(
REPLACE( REPLACE( REPLACE( REPLACE( REPLACE( REPLACE(
REPLACE( REPLACE( REPLACE( REPLACE( REPLACE( REPLACE(
REPLACE( REPLACE( REPLACE( REPLACE( REPLACE($nazevsloupce,
‘xC1′,’a'),’xC8′,’c'),’xCF’,'d’),’xC9′,’e'),’xCC’,'e’),
‘xCD’,'i’),’xBC’,'l’),’xD2′,’n'),’xD3′,’o'),’xD4′,’o'),
‘xD8′,’r'),’x8A’,’s’),’x8D’,'t’),’xDA’,'u’),’xD9′,’u'),
‘xDD’,'y’),’x8E’,'z’),’xE1′,’a'),’xE8′,’c'),’xEF’,'d’),
‘xE9′,’e'),’xEC’,'e’),’xED’,'i’),’xBE’,'l’),’xF2′,’n'),
‘xF4′,’o'),’xF3′,’o'),’xF8′,’r'),’x9A’,’s’),’x9D’,'t’),
‘xFA’,'u’),’xF9′,’u'),’xFD’,'y’),’x9E’,'z’)) like ‘%$query%’”;
}
And to quote my source, “There’s nothing like doing 35 string operations in a SQL query to make sure your database isn’t slacking off”.
Goodness gracious!
Pick up your copy of the WordPress Bible, a wildly popular resource for beginners and experts alike.
Popularity: 1% [?]



Search