Page 1 of 1
Quick Challenge - A PHP script in 58 characters.
Posted: Wed Sep 10, 2008 2:29 pm
by onion2k
I'm going to buy myself a nice new iPod Nano because my old one is a bit wrecked and I need it for mountain biking. They come with free laser engraving on the back .. so I'm thinking of getting a short PHP script on mine! Yes, I am
that geeky.
So as a little inspiration I figure we should have a little competition (no prizes) to see who can come up with the coolest/silliest/most interesting script that fits in the 58 character limit. Bonus marks for getting it to do something relevant like echo'ing out "This is an iPod" or the URL of PHPDN or something.
If the winning entry is better than anything I can come up with I might well go with it.. your script could be immortalised on the back of a mod's iPod! Amazing!
One more rule - You can't use short tags. I refuse to have them on my iPod. If you need that much space just leave out the opening tag.
Re: Quick Challenge - A PHP script in 58 characters.
Posted: Wed Sep 10, 2008 5:19 pm
by pickle
Code: Select all
<?PHP function lost(){if($found)return(123-4567);} ?>
There's room to put your area code & another dash in if necessary.
Edit: I use an iPod Shuffle for biking. You don't need the screen, you don't need the capacity, the Shuffle is cheaper, and it comes with a built-in clip for clipping to your shorts or backpack.
Re: Quick Challenge - A PHP script in 58 characters.
Posted: Wed Sep 10, 2008 5:37 pm
by onion2k
Nice. I like that.
EDIT: Argh. Stupid Apple. I've just discovered they don't allow any of "~*<>\ ... they could have said that
before you try to buy.
EDIT 2: I liked your idea so much I went with a version of it... My iPod will say:
Code: Select all
function lost($found){return;
echo('e: xxxx@xxxx.com');}
Technically the function is wrong because it'd always return before the echo gets called, and the parameter isn't used, but it's only for show. I even had to set up a new email address for it to make it fit properly.

Re: Quick Challenge - A PHP script in 58 characters.
Posted: Wed Sep 10, 2008 5:48 pm
by pickle
You could take off the opening & closing tags. It wouldn't advertise your PHPetish as well though.
Re: Quick Challenge - A PHP script in 58 characters.
Posted: Wed Sep 10, 2008 5:57 pm
by VirtuosiMedia
Code: Select all
<?php
$iShower = $_GET['clean'];
if($iShower){
echo getdate();
}
?>
Re: Quick Challenge - A PHP script in 58 characters.
Posted: Thu Sep 11, 2008 9:43 am
by pickle
No idea how many characters this is - slight modification of ~VirtuosiMedia's snippet:
Code: Select all
<?php
$i->shower = $_GET['clean'];
if($i->shower)
$i->getdate();
?>
Re: Quick Challenge - A PHP script in 58 characters.
Posted: Thu Sep 11, 2008 10:51 am
by jayshields
What about
Code: Select all
<?php
if($i->shower && $_GET['clean'])
$i->task = getdate();
?>
Re: Quick Challenge - A PHP script in 58 characters.
Posted: Thu Sep 11, 2008 2:08 pm
by onion2k
Why are these snippets all about having a shower? Are you lot trying to tell me something?

Re: Quick Challenge - A PHP script in 58 characters.
Posted: Thu Sep 11, 2008 2:26 pm
by pickle
We're not saying anything dude...we're just saying.
Re: Quick Challenge - A PHP script in 58 characters.
Posted: Thu Sep 11, 2008 7:07 pm
by VirtuosiMedia
Sorry, that's just my quirky sense of humor.