-Поиск по дневнику

Поиск сообщений в rss_thedaily_wtf

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 06.04.2008
Записей:
Комментариев:
Написано: 0


CodeSOD: Clean Up Your Act

Среда, 08 Февраля 2017 г. 14:30 + в цитатник

Censored2

Artie S. writes:

As part of a contract with a customer, we have to maintain some of their legacy applications. I found this today in a custom controller for a very old OpenCart site and am still laughing about it and thought you guys might enjoy it. I suppose it's NSFW, but it's code, right?

I threw in some blocks ( € ) to make things safer for work. The other symbols (!, @) are part of the original sub.


public function isClean($body)
        {
                $bad_words = array('sh€t','sh€tty','sh€ttiest','sh!t','sh!tty','sh!ttiest','f€ck','f€cking','f€cked','f€cker','cunt','piss','pissed','crap','crappy','crappier','crappiest','cr@p','cr@ppy','cr@ppier','cr@ppiest','cock','tits','titties');
                for($i=0;$icode>
[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!

http://thedailywtf.com/articles/clean-up-your-act

Метки:  

 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку