Re: Really Need..
| From: | Hannes Magnusson | Date: | Sun, 18 Jan 2009 19:31:09 +0000 |
| Subject: | Re: Really Need.. | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42686@lists.php.net to get a copy of this message | ||
On Sun, Jan 18, 2009 at 17:42, Lukas Kahwe Smith <mls@pooteeweet.org> wrote:
>
> On 17.01.2009, at 18:06, Nathan Rixham wrote:
>
>> a: Optional Static Typing
>> I'm finding an ever increasingly need to be able to staticly type
>> properties, parameters, return types etc (in classes) I know there is type
>> hinting but it's just not enough to do what one needs. Additionally support
>> for staticly typing primatives.
>
> I am not a type hinting fan .. then again I think that PPP is mostly bogus
> for a scripting language as well. I would not mind this stuff if it would
> just all just throw E_STRICT's instead of E_FATAL. To me the point of a glue
It doesn't throw E_FATAL. It throws E_RECOVERABLE_ERROR which doesn't
do anything.
bjori@jessica:~$ cat t.php
<?php
function err() {
return true;
}
set_error_handler("err", E_RECOVERABLE_ERROR);
function bar(array $array) {
foreach($array as $k => $v) {
printf("%s - %s\n", $k, $v);
}
}
bar("hello world");
bjori@jessica:~$ php t.php
Warning: Invalid argument supplied for foreach() in /home/bjori/t.php on line 8
Totally not what you expected, heh?
-Hannes