You are here: Re: Type of Data Returned by a Function « PHP Programming Language « IT news, forums, messages
Re: Type of Data Returned by a Function

Posted by Rik on 07/21/07 02:25

On Sat, 21 Jul 2007 00:32:06 +0200, Sanders Kaufman <bucky@kaufman.net> =
=

wrote:

> I've noticed that some code analyzers comment that the type of data =

> returned by my functions is "unknown" in the following syntax:
>
> function fnFooBar($aryParameters) {
> $bRetVal =3D True;
> return $bRetVal;
> }
>
> I *think* I can specify that by doing something like this:
>
> function fnFooBar($aryParameters) bool {
> $bRetVal =3D true;
> return $bRetVal;
> }
>
> Is this correct?
> If so, is there a performance gain, or is it just clean coding?


There is no such construct, all types in php are pretty loose.
The only thing I can think of that might have something to do with what =
=

you say are phpdoc comments:

http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutoria=
l_tags.return.pkg.html

Which work a treat for building some fast documentation for other coders=
..
-- =

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

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