Ask HN: What's the coolest PHP snippet you know?
I'm redecorating the office, and came across the challenge of needing 8 lines of PHP to spraypaint onto the wall at LinkUp.
The problem: I can't think of any code that's cool enough to display in 12" lettering for an extended period of time.
What code would you put up? The heart of phpBB? Leaked source code from the early days of Facebook? The first sample code that Rasmus ever made public? A WTF answer from phpGolf?
7 comments
[ 0.24 ms ] story [ 25.3 ms ] threadOne of the code examples from here might be good if you're looking to scare people :-P
Edit: I have a more serious suggestion. Why not pick 8 lines from your own codebase?
The sample I started with is kind of a magic-method interpretation of how our system works:
Oneliner: prints out the latest HN frontpage story
$date = "2011-07-29";
$list($year, $month, $day) = explode("-", $date);
With whatever is cooler than a date, or with the company's creation date.