News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
Brian Moon's Blog:
Initializing & typing variables with settype()
September 14, 2006 @ 07:01:47

In his latest post, Brian Moon talks about a method to help you and your code fit into an E_STRICT style of coding - the settype function.

These days, the way to develop is to have E_ALL and maybe even throw in E_STRICT if you are really hard core. That of course means having all your variables initialized before they are used.

In his view, defining them is good, but it's more "elegant" to use the settype function to make it more clear where they are defined. He also includes a function, using settype, that ensures that the entered values are what they should be (i.e. and int is an int).

0 comments voice your opinion now!
initializing typing variables settype declare e_strict initializing typing variables settype declare e_strict



Similar Posts

Debuggable Blog: Better array syntax for PHP: Here's your chance to weigh in

Justin Silverton\'s Blog: patTemplate and php

Sara Golemon\'s Blog: Compiled Variables

John Cox\'s Blog: IIS / Apache $_SERVER Comparison (cheatsheet)

Brian Moon's Blog: Initializing & typing variables with settype()


Community Events











Don't see your event here?
Let us know!


PHP5 release mysql security cakephp example book zend zendframework conference PEAR framework package code application job database releases ajax developer

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework