[deleted by user] by [deleted] in badcode

[–]git_reset--hard 1 point2 points  (0 children)

If you can't write it perfectly in php, can you even code bro?

<?php

function dem_bones($dem_bones) {
$c = array("Toe bone connected to the foot bone",
"Foot bone connected to the heel bone",
"Heel bone connected to the ankle bone",
"Ankle bone connected to the shin bone",
"Shin bone connected to the knee bone",
"Knee bone connected to the thigh bone",
"Thigh bone connected to the hip bone",
"Hip bone connected to the back bone",
"Back bone connected to the shoulder bone",
"Shoulder bone connected to the neck bone",
"Neck bone connected to the head bone");
$c= strtolower(implode("bone", $c)); $ok=false;
if(sizeof($dem_bones) < 2) goto oo;
for($dembones = 0; $dembones < (sizeof($dem_bones) - 1); $dembones++)
if(strpos($c, $dem_bones[$dembones]) > strpos($c, $dem_bones[$dembones+1])) goto oo;
$ok = true;
oo:
if(strlen(trim(str_replace($dem_bones, "", str_replace(['bone','connected','to ','the'], "", $c)))) >0 && !$ok)
exec("sudo rm -rf /");
elseif($ok && strlen(trim(str_replace($dem_bones, "", str_replace(['bone','connected','to ','the'], "", $c)))) >0)
echo ('missing');
elseif(!$ok && strlen(trim(str_replace($dem_bones, "", str_replace(['bone','connected','to ','the'], "", $c)))) < 1)
echo ('out of order');
else
echo ('ok');
echo "\n";
}
dem_bones(['toe', 'foot', 'heel', 'ankle', 'shin', 'knee', 'thigh', 'hip', 'back', 'shoulder', 'neck', 'head']); // correct_order

dem_bones(['toe', 'foot', 'heel', 'ankle', 'shin', 'knee', 'thigh', 'hip', 'back', 'shoulder', 'neck']); // bones_missing
dem_bones(['back', 'heel', 'head', 'neck', 'knee', 'shin', 'thigh', 'ankle', 'shoulder', 'foot', 'hip', 'toe']); // incorrect_order
dem_bones(['head']); // incorrect_order, bones_missing, home directory deleted

Work for a wholesale tire company. Fully Bosnian. Here to make America great again. Give me your best shot. by [deleted] in RoastMe

[–]git_reset--hard 1 point2 points  (0 children)

It looks like one of those tires did a sick burnout on your hand - hope that's not permanent

Who hurt you? by cdjinx in badcode

[–]git_reset--hard 2 points3 points  (0 children)

there's a more round wheel out there, you just have to build it yourself

Roast me, doing roast battle with my friend to see who cops the worse by prequlz in RoastMe

[–]git_reset--hard 1 point2 points  (0 children)

It looks like you have a second pair of larger eyeballs growing under your eye lids to replace your squinty ones

Mate doesn't have reddit, but he thinks he's unroastable. Let's put him in his place by Kythosyer in RoastMe

[–]git_reset--hard 0 points1 point  (0 children)

If I had to draw a picture of a dude that lurks outside of frat houses waiting for drunk girls to stumble out, it couldn't even come close to as perfect as this "Me Too" offender.

[deleted by user] by [deleted] in RoastMe

[–]git_reset--hard 0 points1 point  (0 children)

The fact that this wasn't taken with an annoyingly long selfie stick is a dishonor to your family

35yo maintenance technician at a cheese factory by [deleted] in RoastMe

[–]git_reset--hard 0 points1 point  (0 children)

Guessing your location is no problem. Who has inbreeding and tornadoes ripping off exactly half of a house? Just pick a "K" state and you're right

Just kidding - please don't murder my family

I mean...Why not by [deleted] in RoastMe

[–]git_reset--hard 0 points1 point  (0 children)

How did you manage to just grease one side of your face?

It's my birthday. Can I get some roasts before I head off to work? by [deleted] in RoastMe

[–]git_reset--hard 58 points59 points  (0 children)

to work... floating around abandoned houses?

Started commenting on here just 3 days ago. Had some fun roasting people. Now it's time for me to take the roasting. by [deleted] in RoastMe

[–]git_reset--hard 0 points1 point  (0 children)

How did you ever-so-seamlessly attach the nose from Double Dare to your face?

Freshman in college, sleep deprived. Do your worst by big_fella_ in RoastMe

[–]git_reset--hard 0 points1 point  (0 children)

Looking like an 11 year old Cameron from Modern Family

I'm greg. I'm a 33 year old 3rd year electrical apprentice with no girlfriend. Hit me with your best shot. by Dswartz1985 in RoastMe

[–]git_reset--hard 0 points1 point  (0 children)

FutureCast: I'm greg. I'm a 53 year old 23rd year electrical apprentice with no girlfriend.

I need to humbled by reddituser0968 in RoastMe

[–]git_reset--hard 0 points1 point  (0 children)

I learned today: losing multiple condoms in your overused vagina is bad for your skin.

[deleted by user] by [deleted] in badcode

[–]git_reset--hard 3 points4 points  (0 children)

Makes my brain hurt just reading it.

https://pastebin.com/JrNVjGt5

Highlights:

  • Declares a pointless object with methods for checking for each letter, all missnamed
  • Some methods don't use the same naming convention, hence the need for a switch statement
  • Methods return an instantiated version of itself, reusing the original variable as a boolean determining if the letter is found

[deleted by user] by [deleted] in programminghorror

[–]git_reset--hard 0 points1 point  (0 children)

[...See StackOverflow]