Four years ago I was so bored I made this:
<?php
$lol = "lol";
define("HAHA", $lol, 1);
class ha
{
public function result()
{
return 'This will be the result!';
}
}
class idk
{
public function lol()
{
return array(0, new ha() );
}
}
function lol()
{
return array( new idk() );
}
echo ${HaHa}()[0]->{${$lol}}()[1]->result();
This still works on PHP 7.1! Can you do it with your favorite language?
NOTE: This is just for fun. Don't do this while actually coding!
Top comments (4)
I've barely touched perl, but the program/poem "Black Perl" is infamous:
I wonder if witches today practice TDD.
TDD sounds more alchemical or goetic but I suppose everybody's a syncretist nowadays.
Free grammars are fun: