Lisa, the Simpson!
November 23, 2008, 18:35 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 Add Site
 
   Home   Galleries Library Help Login Register  
Pages: [1]
  Print  
Author Topic: Okay, this is crazy...  (Read 1331 times)
Dagdamor
Lisahugger
Administrator
*
Offline Offline

Gender: Male
Posts: 2497

WWW
« on: January 03, 2007, 09:31 »

Found this PHP script on my work's computer some time ago. It works Wink

<?php

class Angel
{
  function
fly()
  {
    echo
"Look at me, I'm flying!";
  }
}

$Lisa=new Angel;
$Lisa->fly();

?>
Logged

When the power of love overcomes the love of power, the world will know peace. - Jimi Hendrix
Suusje
The Saxophonist
Hero Member
*
Offline Offline

Gender: Male
Posts: 577
WWW
« Reply #1 on: January 03, 2007, 11:51 »

Hehe Gigi Nice one Tongue

<?php

function hug ($someone) {
  echo
"Lisa hugs ".$someone;
}

hug("Serge");

?>


Wink
Logged

KANG *to Marge*: You look lovely this evening. Have you decreased in mass?

[ The Grabpics Thread | Cutest Lisa Moments ]
Dagdamor
Lisahugger
Administrator
*
Offline Offline

Gender: Male
Posts: 2497

WWW
« Reply #2 on: January 15, 2007, 06:52 »

Aww @ the previous one Smile

More PHP craziness... was testing things at work today and came out with this:

<?php

function makeFamilyTree($what)
{
  if(
$what=="header") echo "<ul>";
  if(
$what=="footer") echo "</ul>";
}

function
makeFamilyItem($what, $name="")
{
  if(
$what=="header") echo "<li>$name<ul>";
  if(
$what=="footer") echo "</ul></li>";
}

makeFamilyTree("header");
  
makeFamilyItem("header", "Homer");
  
makeFamilyItem("footer");
  
makeFamilyItem("header", "Marge");
    
makeFamilyItem("header", "Bart");
      
makeFamilyItem("header", "Santa's Little Helper");
      
makeFamilyItem("footer");
      
makeFamilyItem("header", "Duncan");
      
makeFamilyItem("footer");
    
makeFamilyItem("footer");
    
makeFamilyItem("header", "Lisa");
      
makeFamilyItem("header", "Snowball");
      
makeFamilyItem("footer");
      
makeFamilyItem("header", "Princess");
      
makeFamilyItem("footer");
    
makeFamilyItem("footer");
    
makeFamilyItem("header", "Maggie");
    
makeFamilyItem("footer");
  
makeFamilyItem("footer");
makeFamilyTree("footer");

?>
Logged

When the power of love overcomes the love of power, the world will know peace. - Jimi Hendrix
SimpReal
Mood Swinger
Administrator
*
Offline Offline

Gender: Male
Posts: 1376

Solving the Equation
WWW
« Reply #3 on: January 15, 2007, 08:48 »

*backs away slowly*

Marge : Ok, no more PHP for you after midnight, young man !
Logged

Did he open up his eyes?
Did he try to touch my hand,
Or is my mind playing tricks on me?
Do you think he hears us cry?
Does he understand
We are here, by his side...
Dagdamor
Lisahugger
Administrator
*
Offline Offline

Gender: Male
Posts: 2497

WWW
« Reply #4 on: January 15, 2007, 09:16 »

Big Grin

Okay, okay... the last one and I'll leave this poor topic alone. Wink

<?php

$subjects
=array("Homer","Marge","Bart","Lisa","Maggie");
$adverbs=array("quickly","slowly","loudly","quietly","carefully","nicely");
$actions=array("kicks","strangles","hugs","tickles","whispers to","yells at");

list(
$who,$whom)=array_rand($subjects,2);
$adverb=$adverbs[array_rand($adverbs)];
$action=$actions[array_rand($actions)];

echo
"$subjects[$who] $adverb $action $subjects[$whom]";

?>
Logged

When the power of love overcomes the love of power, the world will know peace. - Jimi Hendrix
Suusje
The Saxophonist
Hero Member
*
Offline Offline

Gender: Male
Posts: 577
WWW
« Reply #5 on: January 15, 2007, 11:39 »

Maybe it's useful to post what every script does, so people will at least take a look at it Tongue

Serge's last script did this: Clicky
Logged

KANG *to Marge*: You look lovely this evening. Have you decreased in mass?

[ The Grabpics Thread | Cutest Lisa Moments ]
Andreas
Hero Member
*
Offline Offline

Gender: Male
Posts: 502

WWW
« Reply #6 on: January 15, 2007, 12:29 »

Maybe it's useful to post what every script does, so people will at least take a look at it Tongue

Yes, this would be most appreciated, since I have no idea of PHP and programming. Wink
Logged

Andreas
Casper
Sugarcube
Hero Member
*
Offline Offline

Gender: Male
Posts: 696

A world without string...?! Is CHAOS!!

« Reply #7 on: January 15, 2007, 12:55 »

From 'Clicky'
Marge slowly yells at Lisa

haha! Big Grin

Brilliant, I can click this all day!

EDIT(after much clicking):
Bart nicely hugs Lisa

Awww.... so cute... Smile
Logged

Simpson-Realities
Dedicated to Realities

“Be who you are and say what you feel, because those who mind don’t matter and those who matter don’t mind”
-Dr. Seuss.
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media