Jump to content

redbullmarky

Staff Alumni
  • Content Count

    2,863
  • Joined

  • Last visited

    Never

Community Reputation

2 Neutral

About redbullmarky

  • Rank
    Prolific Member
  • Birthday 01/16/1980

Profile Information

  • Gender
    Male
  • Location
    Bedfordshire, England
  1. ...shouldnt really be using an FTP program or building websites anyway
  2. lol an "Insult" generator and a person that eats animals and chucks up - beats "Hello World" any day
  3. oops. this line: $verbs = array('dislikes', 'sits on', 'licks', 'sucks', 'looks like', 'does', 'discusses the pros and cons of Web 2.0', 'loves', 'caresses', 'slides onto', 'hates', 'kisses', 'learns PHP with', 'has an AJAX interface with'); should be 'discusses the pros and cons of Web 2.0 with'
  4. dirty little sod, aint he?! BTW, can we standardise spaces/tabs? when it gets really tempting to try this out in our fave text editor, it doesnt always work for some reason unless the tabs/spaces are deleted+replaced. no idea why...
  5. <?php $relatives = array('mother', 'father', 'sister', 'brother','uncle', 'auntie'); $verbs = array('dislikes', 'sits on', 'licks', 'sucks', 'looks like', 'does', 'discusses the pros and cons of Web 2.0', 'loves', 'caresses', 'slides onto', 'hates', 'kisses', 'learns PHP with', 'has an AJAX interface with'); $animals = array('dogs', 'cats', 'horses', 'birds', 'giraffes', 'elephants', 'hippos', 'hamsters', 'gerbils', 'monkeys'); function insult($secondary_person) { global $relatives; global $verbs; global $animals; $r_size = sizeof($relatives) - 1; $v_size = sizeof($verbs) - 1; $a_size = sizeof($animals) - 1; $r_rand = rand(0, $r_size); $v_rand1 = rand(0, $v_size); $v_rand2 = rand(0, $v_size); $a_rand = rand(0, $a_size); $insult = "Your {$relatives[$r_rand]} {$verbs[$v_rand1]} $secondary_person and {$verbs[$v_rand1]} {$animals[$a_rand]}"; return $insult; } class Greeting { function Greeting() { echo "Hello World!"; } } interface Actor { public function speak(); public function meet($person); } class Franky implements Actor { private $person; public function meet($person){ $this->person = $person; } public function speak($insult_them = false){ if($this->person == null){ $greet = new Greeting(); echo '<br />'; } else { echo 'Hello '.$this->person.'!<br />'; if ($insult_them) { echo insult($this->person) . '<br />'; } } } } $h = new Franky; $h->speak(); $h->meet('Jesus'); $h->speak(true); ?> edit: i am not responsible for the output of this sample program. if you find it offends, then blame PHP, not me. everything in the above code is clean, non-offensive English.
  6. <?php class Greeting { function Greeting() { echo "Hello World!"; } } $greet = new Greeting(); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.