Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124978 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 870E91A00B7 for ; Fri, 16 Aug 2024 15:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723820635; bh=bZ+OlK/4eszODGiK8zQeGHw6bMR+IIvMXYpgIUFcoRs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MUCl80RudnRdqgdZf/z1EvC2acTAMBVIWDi+FWjCoEqcjdDf8qC7p+1NWhA+TFTQL xRNGU5sQbG2g+LpXAEKbcfyYHlO9JwEVZfAXlGnw8XrXYLmBDbOVXSvetNlgLDBsbo SqitjfhKisWT99Q67gLMz3LtBigZ5ydtAloLx2wUbioCM4LA8ellOnAZFnCWwqvuZW s1t/O8fI70tuAtK7oJLpNQxMvx0ZL53nHLycsBwpl3QXkCZaYR3fiDGv0ND8QCon/E 6VVNE6YYJu4+Q8Of8r3ahKpzoshtqtvc3/Y1nKcx9ymZxsb7xTbafsGPmN5/IPrddB XJfrVhNkvPOIA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 80BD1180088 for ; Fri, 16 Aug 2024 15:03:53 +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.6 required=5.0 tests=BAYES_50,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 forward501b.mail.yandex.net (forward501b.mail.yandex.net [178.154.239.145]) (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, 16 Aug 2024 15:03:52 +0000 (UTC) Received: from mail-nwsmtp-smtp-production-main-25.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-25.sas.yp-c.yandex.net [IPv6:2a02:6b8:c1c:3099:0:640:f09b:0]) by forward501b.mail.yandex.net (Yandex) with ESMTPS id 35C0660B81 for ; Fri, 16 Aug 2024 18:02:03 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-25.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 12LQh7A8V4Y0-odOVzONx; Fri, 16 Aug 2024 18:02:02 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.watch; s=mail; t=1723820522; bh=uKTlcsPpX9XU7KlsYhT+SvjPhdeiTxpC1u7+CvELUH4=; h=To:Subject:Message-ID:References:Date:From:Cc:In-Reply-To; b=q5U3fOauqEy/hYlvQWcmZG7E7gq1y5iS05AmOyo1paaXa+2UTKsugwBjFnV6d4D55 Oo83uGBorRlvMRqEo0dTznRyra7Z7K8SWLhQorgTs/4wEixRCEg0yRc1rjSHSxoU0j lzHaDOqRCuHsfEJyb+ltU3ZXtid7hFxVomEXnRCw= Authentication-Results: mail-nwsmtp-smtp-production-main-25.sas.yp-c.yandex.net; dkim=pass header.i=@php.watch Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5b3fff87e6bso2632522a12.0 for ; Fri, 16 Aug 2024 08:02:02 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVt8qnCAHHfcL33lMj7UVazw8Rgm6iCZ8DsTum/gVfyWlqmYTerLc6NdrBZhDwa7+B5OoROkOVLLDA=@lists.php.net X-Gm-Message-State: AOJu0YxVqYHL7bJmBuNWlLxz2Kgc9CfdhJk+8aDzxFdxCGn10je0mW1k RWnbQ5plQJtoWqChsJpce/lADg2ekKk57S+zQZVyhbnDmB4+hdu4CTs6k6MHh7kTZ7h8BMxvD4v l0j1P9trIA4zjvudyX9NNlyCs6O8= X-Google-Smtp-Source: AGHT+IE9pUfSoVQQHBkJcnddpK+xJ0e+1u+JEmiykKVVbt8tTUrio0nYax0eBcIKjTszxVMbjv7G+332eBHJuO9fYHs= X-Received: by 2002:a05:6402:440d:b0:5bb:9b09:8c7e with SMTP id 4fb4d7f45d1cf-5beca7aa4f6mr2317099a12.26.1723820521648; Fri, 16 Aug 2024 08:02:01 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <66BD5F05.8010409@adviesenzo.nl> <8dc51539-20bb-4017-b859-76066e2287e5@gmx.de> In-Reply-To: <8dc51539-20bb-4017-b859-76066e2287e5@gmx.de> Date: Fri, 16 Aug 2024 22:01:34 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PHP-DEV] Should there be a `get_declared_enums()` function ? To: "Christoph M. Becker" Cc: Juliette Reinders Folmer , PHP internals Content-Type: text/plain; charset="UTF-8" From: ayesh@php.watch (Ayesh Karunaratne) > Porting this to C is left as an excercise for the reader. ;) Hint: > > I went ahead and created PR https://github.com/php/php-src/pull/15443 along with tests, UPGRADE notice, etc. I think having a `get_declared_enums` function will be helpful. The implementation is simple and straightforward too.