On 10/08/2011, at 1:10 PM, Frank Thynne wrote:
> To confuse me a bit further, I can't find a definitive list of the
> basic type names. For example, is it "integer" or "int"?
Both.
http://php.net/manual/en/language.types.type-juggling.php#language.types.typecasting
---
Simon Welsh
Admin of http:
On Tue, Aug 9, 2011 at 6:10 PM, Frank Thynne wrote:
> function integer int_func(string $s) {
> // does something like, say, converting "five" to 5
> }
>
As Stuart pointed out, type-hinting currently only works for classes and
arrays. Scalar type-hinting is planned for the future, but for now yo
On 10 Aug 2011 at 02:10, Frank Thynne wrote:
> In the interest of clarity and maintainability I would like to be able
> to write code that makes it clear what kind of arguments a function
> expects and what it returns.
So add the appropriate comments to your functions.
> This is what I tried:
On 10 Aug 2011, at 02:10, Frank Thynne wrote:
> In the interest of clarity and maintainability I would like to be able
> to write code that makes it clear what kind of arguments a function
> expects and what it returns.
>
> This is what I tried:
>
> function integer int_func(string $s) {
> // do
In the interest of clarity and maintainability I would like to be able
to write code that makes it clear what kind of arguments a function
expects and what it returns.
This is what I tried:
function integer int_func(string $s) {
// does something like, say, converting "five" to 5
}
There are t
5 matches
Mail list logo