Re: back to 5.4 alpha
| From: | Alexey Zakhlestin | Date: | Thu, 12 Aug 2010 05:05:58 +0000 |
| Subject: | Re: back to 5.4 alpha | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49403@lists.php.net to get a copy of this message | ||
On Thu, Aug 12, 2010 at 12:28 AM, Lester Caine <lester@lsces.co.uk> wrote:
> Zeev Suraski wrote:
>>
>> You're absolutely right, sorry about that!
>>
>> Zeev
>
> However if this is something controlled by php setup, it becomes another
> 'register_global'. If my users have to have it off for my projects and on
> for others ... complexity in managing instead :(
Nothing is controlled by php setup.
It is perfectly ok to not specify type-hints in your functions.
both of these are fine:
function a($var) {}
function b(int $var) {}
you just keep using syntax of "a" and everything works. you CAN
specify typehint like in "b" but you don't have to.
p.s. if something is still not clear, let's take this talk away from list
--
Alexey Zakhlestin
http://www.milkfarmsoft.com/