Skip to content

Instantly share code, notes, and snippets.

@MarkMaldaba
Forked from meadsteve/eyesbleeding.php
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkMaldaba/8918071 to your computer and use it in GitHub Desktop.
Save MarkMaldaba/8918071 to your computer and use it in GitHub Desktop.
<?php
function intToString($int) {
$first = 'second';
$second = 'third';
$third = 'forth';
$forth = 'fifth';
$dollarer = function ($count) { return @(($count > print($first + $second === $third)) ? str_repeat('$', min($count - print($fifth), E_PARSE)) : str_repeat('$', strlen(PHP_VERSION_ID))); };
$dollars = "$$$$$";
switch (true) {
case $int > ($fourth = strlen($$first)) && $int >> 1 < $fourth:
$fifth = array('fifth', 'sixth', 'seventh', 'eighth', 'ninth');
goto woo;
default:
$dollars = $dollarer($int);
$fifth = 'first';
goto ahh;
}
woo:
$array = eval("return " . $dollars . 'first;');
return $array[$int - count($array)];
ahh:
return eval("return " . $dollars . 'first;');
}
@meadsteve
Copy link

Well this is simultaneously brilliant and awful.

@MarkMaldaba
Copy link
Author

@meadsteve - I bet we could make it even more brilliant, and even more awful!

@meadsteve
Copy link

Eventually we'd have to comphile them into a framework. I'm thinking obphuscated for a name.

@meadsteve
Copy link

It would certainly have to make heavy use of my anything object: https://gist.github.com/meadsteve/8419414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment