Hi!

I like it, it's consistent and to the point. If we must have scalar
typed parameters (I'm not sure but if we do), IMO that's the way to do it.

The issue is the class names though. E.g. see:
https://github.com/ralphschindler/zf2-db/blob/master/research/ColumnType/Integer.php

and:

https://github.com/canaydogan/ObjectValidator/blob/master/src/ObjectValidator/Validator/Int.php

These are uppercase "I", but class names are not case-sensitive... So
we'll need to figure it out. Unfortunately, looking at github,
disallowing "class Int" looks like pretty bad idea. We can make it
lowercase-only, but this would be a bit weird since it's not sensitive
in all other places (unless we change that which is another huge can of
worms).

BTW, right now this code:

function foo(integer $a) { var_dump($a); }
foo(1);

produces this message:

Catchable fatal error: Argument 1 passed to foo() must be an instance of
integer, integer given

which is pretty confusing I'd say :) We'd probably want to rephrase that
message (yes, I know, patching all those tests yet again...)
-- 
Stas Malyshev
smalys...@gmail.com

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

Reply via email to