Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Alex Inführ:
PHP non alpha numeric 7 and 6 char code
Dec 17, 2012 @ 15:32:02

Following along with the non-alpha PHP code that Gareth Heyes recently posted about, Alex Inführ has created some of his own using only dollar signs, underscores, equals, plus and parentheses.

I used the following charset: $_=+(); As you can see only 7 chars. In the end the function log will be created,because this won't exceed the memory limit. In the beginning I created the php function assert and it was 99 mb large php file, way too big to get executed.

He uses a few tricks to get the language to create strings (counting to infinity), changing the letters in the resulting string, He includes the steps in the process and a large block of the non-alpha PHP code at the end of the post, a 46KByte block that echoes "log(12)".

tagged: nonalpha code characters six seven tutorial

Link:

Gareth Heyes:
Tweetable PHP-Non Alpha
Dec 13, 2012 @ 15:40:25

Gareth Heyes has a new post that shares some of his efforts to write "non-alpha PHP", using characters other than the alpha-numeric ones to write executable PHP scripts. In his case, this involves a lot of pluses, underscores and square brackets.

I started to try and break the 10 charset limit of PHP non-alpha after @InsertScript showed me that PHP Dev supports [] syntax for arrays. I wondered if it would be possible to break the limit within production PHP. At first I thought you could but then after some testing I found that there was no way to concat without “.” and no way to call a string as a function without $ and =. However since I got into PHP Non-alpha again I thought why not try and improve it and make the code tweetable.

He works through the whole process of his discovery - starting with the creation of a non-alpha version of "0" (zero), moving into letter creation and finally all the way up to a full word..."assert". The result is tweetable code that echoes that string and contains more symbols than letters. If you're interested in more of this non-alpha kind of coding, check out some of the other posts on his blog.

tagged: nonalpha code tweet plus underscore squarebracket

Link:

Gareth Heyes:
PHP nonalpha tutorial
Aug 22, 2012 @ 13:53:02

Gareth Heyes has another post to his site on the topic of "non-alpha PHP code", this time getting a bit more into the process and how his examples are parsed by PHP into more familiar functionality.

My first post on PHP non-alpha numeric code was a bit brief, in the excitement of the discovery I failed to detail in depth the process. I’ve decided to follow up with a tutorial and hopefully explain the process better for anyone wanting to learn or improve the technique. The basis of PHP non-alphanumeric code is to take advantage of the fact that PHP automatically converts Arrays into a string “Array” when using in a string context.

He includes some basic examples showing how, with just a combination of things like "+", "_" and "[" or "]" you can reproduce similar output to echoing out an array and use that "Array" output string to get to other strings (like the letter "B"). There's also a more lengthy example showing how to build up the string "print 1+1" and have it execute using this technique.

tagged: interpretation nonalpha tutorial special character

Link:


Trending Topics: