* the code gets smaller because not so many typechecks in every function

What do you mean "not so many"? You need one per checked parameter.

* because the code gets smaller it is faster executed (userspace
typecheck is slower than "engine-space")

If you need single-opcode-level speedups, you probably better off to reimplement the same function in C. If we ever discover the speed of is_integer is a huge problem, we can make it an operator. However, I so far didn't see any evidence of that.

* with type hints byte code optimizer can optimize the code far better

Do you have any optimizer that can do that? Any plans to make one? Any tests showing you can optimize real-life application this way?

* with type hints static analysing tools that check for
bugs/vulnerabilities can perform far better (intra procedural analysis
gives more information)

That is true, type hints do make static analysis easier - strict typing is created exactly for that purpose. However, it only helps if all the code is strictly typed - otherwise you just move point of failure around. And in any case, type won't help you much form most real static analysis purposes, such as security - "string" can hold anything.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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

Reply via email to