Login or Sign Up to become a member!

EXPERTS, INFORMATION, IDEAS & KNOWLEDGE

Social bookmarker Add this

Your profile

Search

July 2009
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

XML Feeds

Authors

« PHP: writing a dal the DAO way part 1ASP.NET Beginner Resources »
The Web Developers Journal

Dear PHP-God(s)(ess)(esses)

by chrissie1


Permalink 11 Jun 2008 12:29 , Categories: Server Programming, PHP

Dear PHP-God(s)(ess)(esses),

I would like to tell you a little story. Once upon a time there was a very nice programming language although they called it Basic. But Basic was not very userfriendly so they made it Visual. At the same time they added some real cool features. Features that made it a mature and responsible language. A nice language to write in. The two best features were

SET OPTION EXPLICIT ON

and

SET OPTION STRICT ON

I will not explain what they do, I know that you are very smart and that you will figure it out. So PLEASE, PLEASE, PLEASE can you give us the same option to save us from despear. The computer really doesn’t like it that I curse and swear like that.
So if we could have this in version 6 I would be ever so grateful and I promise to be a nice uhm, … big boy.

Yours sincerely,

chrissie1.

9 comments »Send a trackback » 1246 views

Trackback address for this post

Trackback URL (right click and copy shortcut/link location)

9 comments

Comment from: AlexCuse [Member] Email
*****
Pretty please?
11/06/08 @ 12:31
Comment from: foamcow [Member] Email
What does it do?
11/06/08 @ 16:08
Comment from: traingamer [Member] Email
When would you have php tell you variables are undefined?
12/06/08 @ 08:28
Comment from: chrissie1 [Member] Email
OPTION EXPLICIT ON makes sure you have to dclare variabeles.

OPTION STRICT ON makes it that datatypes have to match so you can put an in in a stringvariable.

At worst at compile time at best via the GUI.
12/06/08 @ 10:43
Comment from: Donald Organ [Visitor] · http://blog.donaldorgan.com
Doesnt enabling PHP 5's strict mode enable this.
13/06/08 @ 08:29
Comment from: ncloud [Visitor] · http://blog.nicholascloud.com
*----
If you want strong typing, switch languages. I can count on one hand the number of times that explicit typing in PHP would have prevented a problem, and even then, the problem was fairly easy to debug.
13/06/08 @ 08:41
*****
Although I'd really like to have an "OPTION EXPLICIT" thing, I don't think that it would be of much use, because all available libraries that you really want to use don't define their variables, so they become virtually non-existant to your products. :(
13/06/08 @ 09:02
Comment from: André Medeiros [Visitor] Email · http://blog.andremedeiros.info
Well, you could do two things:

1)
error_reporting(E_ALL);
ini_set('display_errors', '1');

2)
Set an error handling function that will crash and burn your application when any error occurs. That would weed out most of your problems.
13/06/08 @ 09:46
Comment from: chrissie1 [Member] Email
For those of you that don't see the humor of this post.

I helped write this site (the glue between the components). And as you can see it is in php. I don't hate it, I just miss those two things.
13/06/08 @ 09:54

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)