"Hello World"

May 31, 2008 20:22

While interviewing for a job on Friday, I realized would make sense for me to learn the PHP programming language. Later during the office tour, I met a PHP programmer. "PHP?" I said, "I'm going to learn PHP this weekend ( Read more... )

Leave a comment

Comments 7

ericthemage June 1 2008, 03:35:53 UTC
I love the die command, it's so angsty.

fopen($site,"r") or die("Unable to connect to $site");

Reply


lahabiel June 1 2008, 06:40:13 UTC
I always chuckle when computer people act like their skills are so amazing. Once you know how to program, it doesn't take long to learn a new language. I've learned most of the things I need in C++ in the last two days! I don't know what PHP is, but I'm sure a bright guy like you will master it in no time.

Reply

thatguychuck June 2 2008, 16:17:51 UTC
"Once you know how to program..."

That's the rub. Before Saturday I had never written any code but Basic, and that was 20 years ago. It's been an exciting few days.

Reply


scottij June 1 2008, 13:34:17 UTC
PHP is my favorite programming language. I can do things in 5 minutes in PHP that take much longer in any other language.

If you already know C, then PHP is a snap. It's basically C with dollar signs. :-)

My favorite functions in php are file_get_contents() and file_put_contents().

$some_long_content =
file_put_contents("my_file", $some_long_content);

done!

(Well, you should really check for an error as well, but hey.)

php.net is a great resource. I assume you've been there by now...

The one tricky bit about PHP is type-sensitive compares. Make sure you understand this bit of code:

$a = 0;
$b = FALSE;
$c = NULL;

$a == $b is TRUE
$a == $c is TRUE
$a === $b is FALSE
$a === $c is FALSE

Reply


flyinglemurs June 2 2008, 01:08:30 UTC
Your a computer geek too? How did i miss this?

Reply

thatguychuck June 2 2008, 16:03:55 UTC
Since 300 Baud, baby. Eight years old and dialing out to a mainframe to play a little game called Quest. I don't code, but I've always used computers and can bend most any Windows system to my will.

Later on this afternoon I'll give a writeup as to what I'm doing starting next week. It's going to be a hoot. :)

Reply

Geek for profit thatguychuck June 6 2008, 00:23:25 UTC
Yup. I'm a computer geek, too.

It's going to be one hell of a ride. I think I'm going to lock that post in a little while.

It's good to know all kinds of geeks. What flavor are you? I know you're one hell of a drummer. I'm guessing the logic in the rhythm transfers nicely to code. :)

Reply


Leave a comment

Up