News Archive
PhpRiot Newsletter
Your Email Address:

More information

Alex Inführ: PHP non alpha numeric 7 and 6 char code

Note: This article was originally published at PHPDeveloper on 18 December 2012.

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)".