Stanislav Malyshev wrote: > Hi! > >> 2) use cast syntax >> >> function (int $integerObject) {} >> function ((int) $actualInteger) {} >> >> The tradeoff here is an intellectual one: (int) means something >> different in a method signature than what it means in regular PHP code. > > Actually, it means pretty much the same - conversion to int type. Hi,
You assume that cast type hinting will be the implementation chosen. If the type hinting is in fact validation the way object type hinting is (strict type hinting), no conversion takes place, and the meaning is different. I should have said "if strict type hinting is implemented" in the drawback description to make that clear. Greg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php