Re: [RFC] [Vote] Callable types (now: Callable prototypes)

From: Date: Mon, 23 May 2016 17:05:50 +0000
Subject: Re: [RFC] [Vote] Callable types (now: Callable prototypes)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-93452@lists.php.net to get a copy of this message
Hey, I have a question regarding strict/weak types. Currently, you cannot pass a callable function(string $foo) {} to a signature requiring (callable(int)), if I understood the code correctly. But weak types actually should allow that as it's totally fine to pass an integer to a string in weak mode. Is there any particular reason to this seemingly arbitrary restriction? Bob > Am 23.05.2016 um 16:27 schrieb Nikita Nefedov <inefedor@gmail.com>: > > Evening internals, > > With this message I'd like to go to vote > with the Callable prototypes RFC targeted at 7.1: > https://wiki.php.net/rfc/callable-types > > We've renamed it (previously was "Callable types") as RFC names often > dictate how users will call the feature and I want it to be more > accurate/descriptive. > > Also the reflection part was added although I'm short on time currently, > so implementation for that will be ready later. (speaking of implementation, > it also currently doesn't use cache_slots - also something I'll add when > I have a little bit of time) > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#93452) next »