Hi!

> Now if you pass a closure to the scan method which doesn't follow the 
> signature of the __invoke method, the engine should throw an error.
> 
> What do you think?

You are trying to take typing way beyond what PHP (or probably any
mainstream dynamic language that exists now) provides. There are
languages which provide static type systems capable of doing such
things, but PHP isn't one of them and I don't think it should be. PHP
has no static type control, and IMHO doing type safety validation at
runtime does not seem to be a good proposition for PHP.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to