Re: Type of Data Returned by a Function
- From: ZeldorBlat <zeldorblat@xxxxxxxxx>
- Date: Sat, 21 Jul 2007 02:19:31 -0000
On Jul 20, 6:32 pm, Sanders Kaufman <bu...@xxxxxxxxxxx> 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 = True;
return $bRetVal;
}
I *think* I can specify that by doing something like this:
function fnFooBar($aryParameters) bool {
$bRetVal = true;
return $bRetVal;
}
Is this correct?
If so, is there a performance gain, or is it just clean coding?
You think you can? Did you even try it? If you did you'd quickly
find that you get a syntax error.
That syntax isn't supported by PHP, and, as far as I know, there is no
way to specify the type of data returned. As such, I'm not sure what
your code analyzer expects you to do about it or why it would complain
about it in the first place.
.
- References:
- Type of Data Returned by a Function
- From: Sanders Kaufman
- Type of Data Returned by a Function
- Prev by Date: Re: Type of Data Returned by a Function
- Next by Date: Re: Type of Data Returned by a Function
- Previous by thread: Re: Type of Data Returned by a Function
- Next by thread: Re: Type of Data Returned by a Function
- Index(es):
Relevant Pages
|