News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Wes Shell's Blog:
Quicky 1 PHP is Loosely Typed '" What does that Mean?
October 09, 2009 @ 12:30:11

Wes Shell has posted a "PHP quicky" to his blog today looking at something at the core of the PHP language - its loosely-typed nature.

A loosely typed language such as PHP is a language that does not require you to declare a variable type when declaring a variable. What does that mean? In PHP when you declare a variable, you can with no need to worry about what kind of data will be stored in that variable.

He compares it to some of the other strictly-typed languages where the variable must be set up and cast to the type and the flexibility that having looser types can have over it. He also looks at some of the drawbacks (ex. can lead to bad code) and advantages (ex. highly dynamic, flexible applications) of this method.

0 comments voice your opinion now!
loosely typed language opinion


David Coallier's Blog:
PHP's Strong typing (SPL_Types) and a bit of ranting about winter...
November 27, 2007 @ 08:42:00

David Coallier has posted a nice overview of what SPL Types are in PHP and a brief example of hos they can be used.

I got karma to SPL_Types and added a new SplFloat() object, a few warning typos and more "flexible" strict modes for different types.

SPL_Types are a way to make PHP strongly typed (no adapting variables) to help make a PHP application "more correct" by forcing the variable's type to stay the same. His example shows the creation of a few variables with these new methods and how they can be used, both correctly and incorrectly.

0 comments voice your opinion now!
spltypes stringly typed variable splfloat spltypes stringly typed variable splfloat



Community Events





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


list language package deployment release api tips series framework interview introduction install bugfix podcast opinion voicesoftheelephpant community laravel symfony library

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