Hi!

In general, it'd be very nice to have some definition of the proposed feature beyond the patch. It would probably answer some of my questions that follow :)

parameters and return values. Objects with __toString methods are
allowed to pass for scalar and string type hints.

What about objects that can be converted to other types (cast_object handler)?

function myTypedFunction returns int(string $stuff, bool, $things, num
$amount) {
        return 'This will cause an error.'
}

What about return "1"? Also I notice it introduces new keyword - returns. Is it necessary? Each new keyword means broken code.

Parameters and return values are strict. Int means int (to the type),

Meaning that int would reject 1.0, true and "1"? bool would reject 1 and 0 and null? Ouch, ouch, ouch.
--
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