Re: Literal types RFC

From: Date: Sun, 04 Oct 2020 23:55:48 +0000
Subject: Re: Literal types RFC
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-111997@lists.php.net to get a copy of this message
пн, 5 окт. 2020 г., 02:38 Bogdan Ungureanu <bogdanungureanu21@gmail.com>: > > function getStatus(): "draft" | "published" { } > It sounds that what you're really asking for is enums, e.g. enum Status { Draft, Published }; function getStatus(): Status { ... } >

« previous php.internals (#111997) next »