WTF - Some PHP Obfuscation.

Status
Not open for further replies.

daviddoran

New Member
Today I was messing about in PHP and wondered how confusing you could make some PHP code. I had seen (as many may have) very obfuscated Perl code and the like but I never thought you could do it with PHP.
So, here is something I put together which outputs a little message.

I have removed one character below, can you find which character is missing and what message is displayed?

Code:
$_='ca';${$_{1}}=8;${$_{0}}=chr(ord($_)-1);$_;${${$_{0}}{0}}=
ord('l')-100;$c{0}=chr(116>>$b-7);*$_;$a<<=($b%8==0);$_; $c.=
chr((2<<2<<($b>>2)<<2>>2)+13).chr(-7+(-$b+2*$a<<1));echo $c ;
 

georgiecasey

New Member
I tried for a while but then gave up. Me PHP knowledge is too limited for that.
 

ph3n0m

New Member
Code:
$_='ca';${$_{1}}=8;${$_{0}}=chr(ord($_)-1);$_;${${$_{0}}{0}}=
ord('l')-100;$c{0}=chr(116>>$b-7);*$_;$a<<=($b%8==0);$_; $c.=
chr((2<<2<<($b>>2)<<2>>2)+13).chr(-7+(-$b+2*$a<<1));echo $c ;
[/QUOTE]

well based on the code above - I removed a character and got

Code:
:-)
 

daviddoran

New Member
Yes, you can just remove the * because the *$_; part is simply padding for that line. In the original code I had 7*$_; to pad out the line without any spaces, but there is a few uneccesary $_; just to pad out the lines.
 
Status
Not open for further replies.
Top