On Wed, Jul 1, 2009 at 22:50, Stanislav Malyshev<s...@zend.com> wrote:
> No, internal typehint doesn't work the way "int" typehint works with this
> patch. Internal typehint (zend_parse_parameters) do conversions, see

You are wrong. Internal type hinting is done in the form of argument
information.
Those are identical to the userspace type hinting.

ZEND_BEGIN_ARG_INFO(arginfo_foo, 0)
    ZEND_ARG_OBJ_INFO(0, MyClass, argumentName, 0)
ZEND_END_ARG_INFO();

is the same as the userspace form of:

function foo(MyClass $argumentName) {}

The current patch is missing a ZEND_ARG_STRING_INFO(0, argumentName,
0) which would be the same as
fnuction foo(string $argumentName){}
If that is the onlything you are worrying about then thats easily fixed.


zend_parse_parameters(... abcdefg)
is the same as
function($a, $b, $c..) { $a = (int) $a; $b = (string) $b; $c = (array) $c...}


-Hannes

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

Reply via email to