Aaaaaarrrrrrrgggggghhhhhh!!!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Aaaaaarrrrrrrgggggghhhhhh!!!!!

Post by BDKR »

OK folks! I hope this helps someone else. And it's a good thing I allready shave my head!

If you are creating any command lines apps or utilities and need to parse user input, WATCH OUT! Perhaps there is something I don't know, but trying to test for command line args thar are zero, as in 0, is a pain in the arse! The only way to test for it is to first cast the argument to a string, then check if it's '0' as opposed to 0! What's up with that?! Is there something I'm missing here? Anybody got a large caliber handgun?

:evil:

Well, I got it figured, but I had to go get my arse kicked by the Sarge (Quake III) just to vent some steam.

BDKR
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

not to put a dampner on your already stressful time but did you ever try using the === operator? http://www.php.net/manual/en/language.o ... arison.php
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

not to put a dampner on your already stressful time...
No, that's really allright! I played Quake and made some coffee: things are good again. Besides, I just wanted to run my mouth a little.
...but did you ever try using the === operator?
As a matter of fact, no. 8O I'm kicking myself and laughing at the same time as I've allways known about that particular operator. Maybe it was the quiche (did I spell that right?) I had for lunch or too busy thinking about the Columbia disaster.

Cheers and thanx,
BDKR
Post Reply