When reading the manual, I discovered by chance a function which is
currently using the multiple datatypes syntax, and found it very usefull :
bool Phar::extractTo ( string $pathto [, string|array $files [, bool
$overwrite = false ]] )
(seen at http://www.php.net/manual/en/phar.extractto.php)
So
I like the idea of being more precise.. But I think it would do more
harm then good in reality.
like Peter pointed out, most functions return atleast 2 different
types, and where we currently list 'mixed' we would have to list even
more.
A gentle lie, like we do today, is a fair compromise imo.
S
Hi Peter,
Yes, NULL values are very useful to know.
I just would add a precision : I don't want the "mixed" datatype to be
compeltely eradicated ! It could be judicious when the data type is
unpredictable, like in this function :
mixed|NULL array_pop (array &$array)
Regards,
Geoffray
2011/10/5
Hi Geoffray,
On 5 October 2011 10:29, Geoffray Warnants wrote:
> Dear PHPDOC Team,
>
> I would like to hear what you have to say about the convention actually used
> in the PHP manual to
> describe "mixed" values, I mean parameters (or return values) that could
> have multiple datatypes.
>
> I do
Dear PHPDOC Team,
I would like to hear what you have to say about the convention actually used
in the PHP manual to
describe "mixed" values, I mean parameters (or return values) that could
have multiple datatypes.
I don't like them so much for some reasons :
- The first think I read about a PHP f