Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

HIBT.php

Name: Anonymous 2010-09-12 16:01

Can /prog/ rate my code?

<?php
$hibt = YES; //Change this to no if you have not been trolled.

if ($hibt == YES) {
print "IHBT";
} elseif ($hibt == NO) {
print "0/10";
} else {
print "HIBT?";
};
?>

Name: Anonymous 2010-09-12 16:02

I wasn't aware that PHP had atoms.

Name: Anonymous 2010-09-12 16:03

$hibt = NO; //Change this to no if you have not been trolled.

Name: Anonymous 2010-09-12 16:12

>>2
Everything's made up of something, bro.

Name: Anonymous 2010-09-12 16:18

JACKSON 5 GET

Name: Anonymous 2010-09-12 16:38

You should use ===. Also, the closing ?> at the end of a file is not required.

Name: Anonymous 2010-09-12 16:39

>>2
Much better, it just tries to convert every word it doesn't understand to a string. It has bee ndeprecated because of the whole ``pretend to be a real language'' thing, though.

Name: Anonymous 2010-09-12 17:55

>>6
Also, the closing ?> at the end of a file is not required.
Good lord.

Name: Anonymous 2010-09-12 20:41

No indentation, using barewords, using print instead of echo, ending the code with ?>, superfluous braces, ending the control structure with ;, lacking a space after //

The set of levels that code fails on is of infinite cardinality.

Y,IHBT

Name: Anonymous 2010-09-12 20:57

>>8
You mean Lord. Please capitalise God's every name!

Name: Anonymous 2010-09-12 21:07

>>10
Lord is a title. Not everyone holds God as their Lord.

Name: Anonymous 2010-09-12 21:26

>>9
You are right, but for the wrong reasons. I know how to program but when I wrote this shitty thread I was joking around and I wasn't even sober.

Indentation
That was me simply forgetting to do something. Besides, there is no FIOC I am not required to indent.

Using Barewords
This is a pure retard moment on my behalf. I am actually embarrased as to how I could have fucked up this badly. I was not trying to use a string, I was trying to use a boolean. But instead of "true" and "false" I was fucked up and wrote "yes" and "no". I had finished doing massive gravity bong hits before posting this so my mind was a bit fucked up.

Print instead of Echo
Really? Is it that big of a deal?


Superfluous braces
Also not a big deal. Run this program and it will still work. I was just simply taught to do it this way, I know you can do it other ways but this is the way I remember the most.

Ending the code with ?>
This is another ``Optional'' feature. You can choose to end the code with ?> or you can choose not to. It will still work either way.

Ending the control structure with ;
See above 2 examples

Lacking a space after //
See above 3 examples.

I am not a PHP programmer by any means, I am a Python and Lua programmer. I just like to fuck around with PHP because it's fun programming in a language where I don't have to be serious all the time.

Name: Anonymous 2010-09-12 21:32

>>12
I am not a PHP programmer by any means, I am a Python and Lua programmer.
You aren't a programmer at all. You're a code monkey, at most, and a fucking moron.

Name: Anonymous 2010-09-12 21:35

>>12
0/10

Name: Anonymous 2010-09-12 21:56

>>13
Cool true programmer fallacy, bro.

Name: Anonymous 2010-09-12 21:58

>>13
How about you define what it is to be a true programmer? This is an anonymous BBS. You can not judge a person like that just by one post, since you haven't seen anything else by me.

Name: Anonymous 2010-09-12 23:04

This is an anonymous BS.
FTFY

Name: Anonymous 2010-09-12 23:04

>>16
Your ineptitude is more than apparent from >>12.

Name: Anonymous 2010-09-13 1:45

>>17
I like to shoot anonymous BBs at anonymous BBWs.

Name: Anonymous 2010-09-13 4:44

Why is ?> even optional?

Name: Anonymous 2010-09-13 5:54

>>20
If you are using straight up PHP it is optional, if you are embedding it into HTML the ?> becomes mandatory.

You really don't need it, but it's not that bad if you if you do.

Name: Anonymous 2010-09-13 8:39

>>21
Sounds pretty gay. That's like Lisp allowing unmatched parentheses at the end of a file. Except Lisp is good.

Name: Anonymous 2010-09-13 10:42

>>22
Lisp is good because you have to match parentheses.

In PHP, nothing matches.

Name: Anonymous 2010-09-13 13:02

>>21
PHP
embedding it into HTML
deargodwhy

Name: Anonymous 2010-09-13 13:09

>>24
PHP started out as a way to embed Perl into HTML. And then they somehow managed to make it worse.

Name: Anonymous 2010-09-13 13:12

>>24
You thought the <?php ?> tag was coincidental, huh.

Name: Anonymous 2010-09-13 15:54

>>25
Terrible!

Name: Anonymous 2010-12-24 21:09

Name: Anonymous 2011-02-03 8:15

Name: Anonymous 2011-02-04 14:20


Don't change these.
Name: Email:
Entire Thread Thread List