You are here: Re: Strict types « PHP Programming Language « IT news, forums, messages
Re: Strict types

Posted by Andy Jeffries on 03/30/06 11:58

On Thu, 30 Mar 2006 00:53:47 -0800, Treefrog wrote:
> For a while now I've been wishing PHP had (at least the option to enable)
> strict types. It would help a massive amount in BIG applications, and
> maybe start to taper the millions of lines of crap code that's out there.

To be honest the only real problem is with objects. For large
applications a consistent naming scheme helps with simple variables and in
a lot of cases it's not really important what the variable is.

With regards to objects, PHP5 now has type hints which ensures a parameter
to a function or method is of a given type (class):

function bar(Foo $foo)
{
...
}

Cheers,



Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация