SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: PHP Vs. PHP

  1. #1
    SitePoint Addict manipura's Avatar
    Join Date
    Apr 2001
    Location
    Calgary,AB
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Vs. PHP

    My cat's breath smells like cat food....
    Explained in PHP.


    <?
    $owner = "manipura";

    if($owner == "buys food") {
    $owner = "$owner - $5";

    if($owner == 'feeds cat'){

    $catsbreath = "cat food";
    $cat = "happy";

    }

    else {
    print "Manipura isn't happy because cat is dead";
    }
    ?>



    <?

    $personatdesk = 'Manipura';
    $stuck_here = '12 hours a day';

    while ($personatdesk = > $stuck_here){

    $brain = 'mush';
    $sex_life = '';

    }

    if ($brain = 'mush' && empty($sex_life)){

    $caffine_intake = ' > normal';
    $cigar_smoking = 'only relaxation';

    $sad_part = 'me';
    }
    else{
    $personatdesk = '';
    $brain = 'druged';
    $sex_life = 'still not enough';
    }

    ?>

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Perl...

    qx(chown qslack $0);

    if($owner->buying_food) {
    $owner->{bank_acct} -= 5;
    }

    if($owner->feeding('cat') {
    my %cat;
    $cat{breath} = 'cat food';
    $cat{emotion} = 'happy';
    }
    else
    {
    my $emotion = 'unhappy';
    $::reason = 'cat is dead';
    }

  3. #3
    SitePoint Addict manipura's Avatar
    Join Date
    Apr 2001
    Location
    Calgary,AB
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Damn, I was beaten by the perl master!

  4. #4
    SitePoint Addict manipura's Avatar
    Join Date
    Apr 2001
    Location
    Calgary,AB
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    while ($mikes_brain > "9 hours of work"){

    $mike = "very stange man";

    }

    if ($mike = "very stange man"){

    $most_people = "laugh at mike";
    $some people = "want to punch mike";
    $the_question = "what do you want to do to mike?";

    }

    if ($most_people == 'you'){
    $mike = "Pleased";
    }
    Else{
    $mike = "fights back";
    }
    }

    while ($mike=='as bored as bored can be'){
    $Mike = "lord of poetry"
    $Brain = "Master of His Own Reality";
    $surrounding = "freak show";
    $mike = "get into the flow";
    $mike = "Here we go";
    }

  5. #5
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On line 7, you accidently put = when you meant ==. Also, $mikes_brain at the beginning is undefined and therefore is 0. Was that a subliminal message that your brain is nothing?

    And, (0 > 9) == 0, so most of your code won't even execute.

  6. #6
    SitePoint Addict manipura's Avatar
    Join Date
    Apr 2001
    Location
    Calgary,AB
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My code won't work???? Man, sounds like my life.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •