RE: [PHP] obfuscated php anyone ?
| From: | John Coggeshall | Date: | Tue, 25 Jul 2000 02:02:49 +0000 |
| Subject: | RE: [PHP] obfuscated php anyone ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7865@lists.php.net to get a copy of this message | ||
Here's a little obfuscated code for you... return number of days in a month
(deals with leap years, etc)
function DaysInMonth($month,$year){
return
31-((($month-(($month<8)?1:0))%2)+(($month==2)?((!($year%((!($year%100))?400
:4)))?1:2):0));
}
-----Original Message-----
From: mohrt@ispi.net [mailto:mohrt@ispi.net]On Behalf Of Monte Ohrt
Sent: Monday, July 24, 2000 9:54 AM
To: Erik
Cc: php-general@lists.php.net
Subject: Re: [PHP] obfuscated php anyone ?
I guess this could fall under obfuscated regular expressions, as this
has nothing to do with the PHP syntax itself. ;-) I have yet to see
any attempts at obfuscated PHP code, but it would be entertaining.
Erik wrote:
>
> Is anyone tracking obfuscations in the spirit of the "obfucated perl"
> awards?
> Just for pain-to-the-brain this one gets my vote. 8^)
>
> $string
>
=preg_replace("/[^\w\d\+\!\@\#\$\%\^\&\*\(\)\[\]\{\}\\\|\;\:\'\"\,\.\<\>\/\?
> \
> +\=\~\`\_\-]+/","",$string);
>
> --
> Regards,
> Erik Stainsby
> network tech by day
> php hacker by night
> beer drinker at any time
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net