You are here: Re: curly braces or square brackets? « PHP Programming Language « IT news, forums, messages
Re: curly braces or square brackets?

Posted by Rik Wasmus on 10/16/07 22:56

On Wed, 17 Oct 2007 00:31:50 +0200, Grande News <bint@csgs.com> wrote:

> Hi, I've got some PHP code that looks like this
>
> $cura=3D ord($data{$pnum*2});
> $curb =3D ord($data{$pnum*2+1});
>
> Notice the curly braces -- does using them make any difference, or wil=
l
> square brackets do the same thing?

It will do the same thing. However:
http://www.php.net/~derick/meeting-notes.html#cleanup-for-vs

Although it still doesn't throw an E_STRICT in 5.2, I'd use square =

brackets instead of curly braces.
-- =

Rik Wasmus

 

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

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