On 08/02/2015 20:33, Zeev Suraski wrote:
FWIW, while I think strict types - stricter than even strict languages -
don't belong in PHP, this syntax is clearly a step up from declare(), which
was definitely not intended for this purpose.

I'm kind of intrigued what purpose it *was* intended for. I've always found it a rather odd part of the language, but this seems as logical a use for it as any.

For years, it had exactly one "execution directive", which worked in concert with a runtime event handler (ticks=N + register_tick_function). In PHP 5.3, a completely unrelated directive was added, to specify the encoding of the file (something that more obviously has to be detected by the compiler).

Was there an original idea of what it would be used for that never came to fruition? Or is there something I'm missing that connects "ticks" and "encoding", but excludes "strict_types"?

Regards,

--
Rowan Collins
[IMSoP]


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to