Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Web Developer

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

Authors

Search

XML Feeds

Google Ads

« PHP: writing a dal the DAO way part 1ASP.NET Beginner Resources »
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

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.

About the Author

User bio imageChristiaan is a forensic technician who programs on the side, although my function description says that I do IT-things for 90% of the time . I'm an avid VB.NET fan and I use lots of the ALT.Net techniques, like unit-testing, nhibernate, logging, IoC, ...
Social SitingsTwitterLinkedInHomePageLTD RSS Feed
1576 views
submit to reddit Digg!FacebookDotnetkicks

Comments and Feedback

9 comments

Comment from: Alex Ullrich [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.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)