Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125758 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 2487D1A00BD for ; Sun, 6 Oct 2024 13:30:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1728221579; bh=SktI2M0D8Mz3rh39h4XUz/kMxw2o+26/WexgiJaJi/8=; h=Date:From:To:In-Reply-To:References:Subject:From; b=dR8U/qUdZfxF60vwrxS+Otrw246CvTBygwTf2c2ut5nBGkoVqACkp97YhpngeLEgW P42961M42pip7VXmMuryDRVH9fQatGKGOt5HeKb8oaLhdr18ZxxGcu25dsNYPlvuf3 RZHUdtcSMOSGLVE7SXpLhMHqQDqIgmpIyxxT+UoGxFhxBMa1ulWqA5VSEbX18EmIFi EeIEHilCHgtA5ziXGooyJuSrWm3KA5lirTAmolAqeWJ/u5mpZEn4SaMP44/mCNm5fP r6UvtHV17nl5N7J8HSG8FYTCTGTcIRHVoL0wpS3StjeXtcVvUFBZcPC5JriDBJf3gh GbkyWKvLrvebA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D0178180080 for ; Sun, 6 Oct 2024 13:32:58 +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.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) (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 ; Sun, 6 Oct 2024 13:32:58 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 428D0138022C for ; Sun, 6 Oct 2024 09:30:42 -0400 (EDT) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-01.internal (MEProxy); Sun, 06 Oct 2024 09:30:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm2; t=1728221442; x=1728307842; bh=F5eIuKFz8IoDDIQJS9sbr 1+9WHh4pNCmyp+jAtxskX0=; b=M3vr7u8kTwTPZYuifZWS60S+klhF4573blhpA KtzGZ4ni8y+cu/wiGhIawf59uHQ9/LMUB+ugfR5ZvfVn9oIagZQ+4hMqaIBN6sdn bPaiJJHox5HQxDBSws5zWFuZ57XJrhqgDrJqeNQjyiXPTW2tVcfqbX/8oGBkx0bd uL6tbCoakp7Kw6Id8accRbvfoRW26XTaFmQyxvWObcuYQc0JIzrG8jlTlw/kzXmi CWUGT+n8S77vqJmfB8p0U9ryMew4IevXQM3AOfm6yMevuQO9mbnuXBroM1az4Xbj OBaIxiTCNnhnk8FO/iTSDI2nbnQniztUiWYI/8A706teLrmnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728221442; x= 1728307842; bh=F5eIuKFz8IoDDIQJS9sbr1+9WHh4pNCmyp+jAtxskX0=; b=f vjAf3r8z/GmXYFL2NDaZM18XX7nLCH9k+11r8e7CC7PKl3AUU0gGGJ3INTfi8JG/ ambWFelx2BPYZzEI1MUuygcG8N1OU2GS0MTekI4T6GnhrQe3WDYmN0HN9JOFfphq 1tx7lWd85tahO7oamTNlezxaDVwkgfyww2Lfx5gmo4ubn/a6S5YYcqgLW1+ehZhn e4KpPVBxzCYrL4JC8pWFDTEb31pxwyvptEQ6S2GXFRWVyauHHiDV4IexB2Q9BAkb V3rLxYDUa0vLAb1ZmsEGy3zCDySw1bhYpxe011SNst9QQp16gkCTl82aXi+2x6Ef 8EW6ObVX7iqht0bCqNNaA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvjedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthejredtredttden ucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfih gvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpedugedvlefgueegheefjeet ffduveeltefhfeegjeffffelgedttdevkeegkedugfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggt hhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id CE50729C006F; Sun, 6 Oct 2024 09:30:41 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Sun, 06 Oct 2024 08:30:21 -0500 To: "php internals" Message-ID: <4ac3beb3-2322-44ca-862c-18591636a76f@app.fastmail.com> In-Reply-To: <67023B59.6020301@adviesenzo.nl> References: <66FC7B9F.5070906@adviesenzo.nl> <67023B59.6020301@adviesenzo.nl> Subject: Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Sun, Oct 6, 2024, at 2:25 AM, Juliette Reinders Folmer wrote: > I can imagine combining the alternative approach via > get_declared_symbols() with a new symbol_exists() function like you > suggest above (with a similar slow path to deprecate and remove the old > functions). > > On the plus side, the alternative approach makes for much more > versatile functionality. In a number of the cases I looked at, the > results from various get_declared_*() functions are combined before > further processing, so having a `get-declared_symbols()` function would > allow for simplifying that code. The same can be said for the > *_exists() functions. FWIW, I'd love to have get_declared_symbols() and symbol_exists() functions, regardless of what we do with enums in particular. That's arguably a topic for another RFC, though. (And debatable if functions would count as symbols, but again, topic for another time.) --Larry Garfield