[PHP-DEV] Re: [RFC] Type hints (parameter and return value)

2008-04-17 Thread Christian Schneider
Felipe Pena wrote: For parameter type hints, i have completed the actual implementation with the leftover php types: - string (binary string and unicode) - integer (accepting numeric string too) - double (accepting numeric string too) - boolean ('0', '1', true, false) - resource - object

Re: [PHP-DEV] Re: [RFC] Type hints (parameter and return value)

2008-04-17 Thread Arvids Godjuks
Christian Schneider I don't like the difference between function (int) test($value) { ... } and function test(integer $value) { ... } First is function return value should be int, second is function arg should be int. So full syntax will be like this function (integer)

Re: [PHP-DEV] Re: [RFC] Type hints (parameter and return value)

2008-04-17 Thread Christian Schneider
Arvids Godjuks wrote: So full syntax will be like this function (integer) test(integer $value) { ... } I guess you are right: int and integer seem to be aliase and both check for int *or* numeric strings, not the type int. It is also not clear if (string) accepts ints/floats which are often