r/PHPhelp • • May 16 '19

PHP Code for graduation cap?

Hi everyone! I'm making a graduation cap to surprise my boyfriend who is about to graduate (we usually don't have graduation caps and gowns where I live). Since he's a php programmer, I would like to put a nice/funny graduation related short php code on the cap. However, I have noooo idea about programming and I didn't even get 'funny' things I found on Google. So if you have any ideas, please shoot!

14 Upvotes

18 comments sorted by

14

u/wh33t May 16 '19

if ($in_debt) { echo "work"; }

2

u/Dr_Midnight May 16 '19 edited May 17 '19

More like...

$debt = TRUE;

while ($debt === true)
{
     print "Work." . PHP_EOL;
}

10

u/Amunium May 17 '19

Why would you typecast a literal bool to a bool?

2

u/Dr_Midnight May 17 '19

That was pointless.

2

u/wh33t May 16 '19

Its gotta fit on a hat yo!

1

u/[deleted] May 17 '19

Thank you guys for your help and ideas, I'll definitely take some of them and I'm sure he'll be very surprised :)

7

u/graveRobbins May 16 '19

Every PHP developer starts by learning this: <?php echo "Hello World!"; ?>

2

u/bkdotcom May 18 '19

<?= 'Hello World' ?>

Or, being PHP, simply Hello World

1

u/mgkimsal May 17 '19

that's so kind and fun of you!

make sure it's not a black hat! (he'll probably get the joke...)

2

u/[deleted] May 17 '19

Googled it, got it - yey! Unfortunately I bought all the (black) stuff already, but I could write something like "sorry for the black hat..", right?!

2

u/mgkimsal May 17 '19

Or “make this your last black hat” or something. Yeah.

Don’t be a black hat your whole career?

Awesome job. You’re so thoughtful !!

2

u/[deleted] May 18 '19

He really deserves celebrating this degree in every possible way, studying after work and on the weekends...urgh. So I'm really proud of him :)

2

u/wh33t May 18 '19

Grey hatting is honestly where it's at, score dope bug bounties or uhh... you know, keep that information for yourself...

3

u/shauny1 May 17 '19

I feel like <?php echo ‘Hello World’ ?> is a winner, everyone can relate to that 😊

1

u/Titanium_Josh May 17 '19

If ($graduation == true && $studentLoans == “unpaid”) { echo “Get a job!”; }

1

u/BitcoinCitadel May 17 '19

Stuffed elephant 🐘

0

u/richardathome May 16 '19

<?php Utility::learnHowToCodeInTheRealWorld(); ?>