Re: RFC Proposal - Types for Inline Variables

From: Date: Tue, 07 Feb 2023 19:53:59 +0000
Subject: Re: RFC Proposal - Types for Inline Variables
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-119481@lists.php.net to get a copy of this message
2023-02-07 17:21 GMT+01:00, Rowan Tommins <rowan.collins@gmail.com>: > On 07/02/2023 14:07, Olle Härstedt wrote: >> It should perhaps be mentioned that analyzers can use type annotations >> during their process, instead of the more clunky /** @var string */ or >> similar you have to use today for local variables. > > This sounds like you're reaching for Python's approach, where the > language "supports" the type annotation syntax, but doesn't actually do > anything with it. No not really. I'd expect it behave similar to function argument type-hinting in PHP, that is, runtime checks, but where the notation can be used by external tools. Olle

« previous php.internals (#119481) next »