Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125746 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id F044A1A00BD for ; Fri, 4 Oct 2024 14:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1728050995; bh=M6Kgpk1NuJfpJbUnAkFx7z8wfzTULQreuTapR5MpRKU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LUTigsLPjDzQE9pgwXRWP9KynQth85y2yz08duJ1Xwj44CLkFzZbw8qDpE6b5EIMt vc8Rh2JU+JSWfNcmoKyFzDkQdZVWAB3lTIpLOK7/A5Xvx7jRzFTZUmOg4YnIpYOeiI PYn548T84/IOH72XXaP128FqLuQB0nhtgvv3fQWN5RF8slI+NQ4OQvHKQ9bp2gRHkD mRhvlc/sc0/PMDGP1A9PN3Lgzr/MCKDOVl0lepI4CqYZCBar84k6MGPDipRb7ZDJ90 PhoZ6uY01vBGdBwZJVhOPoR/5AaecXlzeThWG3e7KrkpfkIacAtl+iukKYommQSNis +SZQPhNLOA/zg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 94BCD18007A for ; Fri, 4 Oct 2024 14:09:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 4 Oct 2024 14:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1728050858; bh=E0P3KzY2dz3z6KEvl7+QNotReMQYZufMFiKYTKSi/2Y=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=UM0rGcEyncBG7PRwPxA9Xpkt6geXH4IWCIPBRxJIPsp1yk2IOMoe6F38jX0nykdOZ dv6xJEVfUat8JqeiMfTxYbyn5t0UknqW4yKzMcmwH+iuyOiiszcU/B64F1VTO9ZTUQ Ywa7KK5t+xR4R3fXXxiQC0gsCjr9WXCc3z3M7h0HX6Q4Xtaig6SioHeaq64+pO/Tw3 6wFO2F3wfRD2L1S5fQXd7reUFDzi1iqsYOXphOOJuiztPORe1zJmr5yScGWDwj2CAj c3hQflGAEbwlmLLsJ4kTDQyc5YMHBfsHFhYmyLSw17XRJlpbvTrBF8pTwLfRKST3EB wFaHnE691dKzQ== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 04 Oct 2024 16:07:38 +0200 To: "Gina P. Banyard" Cc: Juliette Reinders Folmer , PHP internals , Ayesh Karunaratne Subject: Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function In-Reply-To: <8fvSRjI1k3DrtEYQdV7Dg-eB-0tC7775CM_nQ7HcL21wZfSzOF7cEfYSV7fYiw52a8MVcUe02ICF5IHpPrNdxrs1k8iAzZ98zO0-V8FSOXA=@gpb.moe> References: <66FC7B9F.5070906@adviesenzo.nl> <8fvSRjI1k3DrtEYQdV7Dg-eB-0tC7775CM_nQ7HcL21wZfSzOF7cEfYSV7fYiw52a8MVcUe02ICF5IHpPrNdxrs1k8iAzZ98zO0-V8FSOXA=@gpb.moe> Message-ID: <8b7096b400cdd54781c8e7efe5bdb03b@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2024-10-03 14:01, schrieb Gina P. Banyard: > As a counterpoint to the argument presented on the list that Enums > should still be returned by get_declared_list() because they are > "classes": > Interfaces and traits are also "classes" internally, and yet they are > not returned. > We make a distinction in userland, and this should be followed by the > provided functions. From my userland developer mental model PoV `enum`s are just special classes. Leaving aside Reflection or other introspection functionality and enum object behaves just like a "regular" class object. The same is not true for interfaces and traits, which are structures that help you build a class (including enum classes, which support both interfaces and traits). Best regards Tim Düsterhus