Re: type hinting

From: Date: Fri, 04 Jan 2008 19:08:32 +0000
Subject: Re: type hinting
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-34454@lists.php.net to get a copy of this message
On Fri, 2008-01-04 at 11:04 -0800, Stanislav Malyshev wrote: > > Well it would be much easier to type hint than to manually document > > every one of your function parameters. > > How is this: > > /* @param $client string Contains the name of the client for the account > > is worse or less clear or harder to write that this: > > processAccount(string $client) > > Note that unless you write the former you code is still undocumented and > knowing it's a string won't help you much. About the same, but the @param comment doesn't stop someone from putting an array into $client.

« previous php.internals (#34454) next »