Re: [RFC] Mixed Typehint

From: Date: Tue, 19 Dec 2017 03:57:04 +0000
Subject: Re: [RFC] Mixed Typehint
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-101373@lists.php.net to get a copy of this message
Am 19.12.2017 um 04:44 schrieb Michael Morris:
On Mon, Dec 18, 2017 at 10:34 PM, Michael Moravec <php.net@majkl578.cz> wrote:
Hello internals, I'd like to propose and discuss Mixed Typehint RFC for PHP 7.3: https://wiki.php.net/rfc/mixed-typehint The purpose of this RFC is to introduce "mixed" typehint on language level to be used as a valid typehint.
If I'm not mistaken, "mixed" is used in documentation when a function has been overloaded to avoid needing to have documentation for all the methods. C allows overloading, and I imagine that PHP functions implemented in the engine using C are using overloading
no, mixed is used in phpdoc comments to say "no type specified at all" when a param accepts anything and in case of "@return mixed" that it can return void, array, int..... the RFC would make phpdoc and code consistent

« previous php.internals (#101373) next »