Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127751 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 lists.php.net (Postfix) with ESMTPS id CF6871A00C0 for ; Wed, 25 Jun 2025 12:45:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750855410; bh=CwYsWEcQngWsvT+fVmYYKWKWg1J7uf11PRGsmzpaozk=; h=Date:From:To:Subject:In-Reply-To:References:From; b=KmktKf1saGZIcoMzbdolHpnhbF8mq8iNXxcGd0jlmizlgODyPevfkRSM7MVNkilXu rjPaGHP5ZP9tI9StDJd5Cn8DH5SrZA8Y1YoXINSaF2GguyHubQvAEg6JDbT99C0H25 dnpq2a2WRd1DDZuWucDulIcvByVvBKfXkpt+HAAamar3rmNF+pXSkE09WU478XP+U8 wrJpqbHbB7egCTYMzrtBz1aePWSlCH24aHm8I9InVCSsZGr0xvfjA+PD3biF0RZgZ0 9EmlTpVTF9lEnmS1QP9GvDu+v4cM3ornBzQvlrLLjju81CHXkDMPS8XbyfijzxUWNc Ave/yS4h3F8hw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2228B180088 for ; Wed, 25 Jun 2025 12:43:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (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 ; Wed, 25 Jun 2025 12:43:26 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 4A2741400191 for ; Wed, 25 Jun 2025 08:45:21 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 25 Jun 2025 08:45:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; 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=1750855521; x=1750941921; bh=CwYsWEcQngWsvT+fVmYYKWKWg1J7uf11PRGsmzpaozk=; b= OjkQWw1pExJFckCtocmm+ASh977oIiX2WqETQ7p4r6DkFUJX3gKd3Iwb4Q5Dd3hv 9q+zqA1nGvDFfPg0Dr40ZqE+Gl3mo7UhteIgaOs5TQ3ZCaOfFPARFKTcRFWqjeVM Y4V82tkZXR9VPct4w9S7I+tUvPDjvSdn7HXRDMD9St1QAyOBEkt8bxAQLxJB+FJQ TTCYkX6ZlejzjYAw2sZrB1S5E1Jj/OuDbhZss92L3lx1yDAx0tQBY4EharOXeGDr UebW0FnRUX1OLm8bwwRKkar0D892m1IqSUBTQVsV22Z6urzDeLyTFiPmoBb7A2Rt Xfbii5G9ydqOpnDhKYe7yQ== 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-sender :x-me-sender:x-sasl-enc; s=fm2; t=1750855521; x=1750941921; bh=C wYsWEcQngWsvT+fVmYYKWKWg1J7uf11PRGsmzpaozk=; b=hmPq6e/QTbrEiVY+/ bs+xGGQVv0bqacXGxaDE3acAJuPrrXh7Jcg7qIixEYBZ7AEw2ug1xseYkZzDDTOk em6LRYuzmS+qwfb+PQQvWBfq3PcVbWNfUW5JoSpacIfonbxvmqCOs9SZyUYsclu/ 9zmbxMb45f+fS8rGXvi2xYhryo7Z6USFxjBsi07u6rMhaLs3AQqVUPizDSW3cCQh MxKvVianl7MboRK3XATVd1Lwqoz3LENQ4ee4FMiABhJqpd0Zu8kfl2LhNeuL7mXH 4gddo7ZRBkDT1op2rlk3JYsMbMLKwh9vlpzJzhyKTSRlbE+gmqWjGAsL/+qVS8hQ 09t8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgddvvdektdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvufgfjghfkfggtgfgsehtqhhmtddtreejnecuhfhrohhmpedftfhofigrnhcu vfhomhhmihhnshculgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtoh druhhkqeenucggtffrrghtthgvrhhnpeehleffteeigfevudetfedugedtudevledugeeu geelheeihfehgfdtkeevvefgleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghr tghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrg hlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 25 Jun 2025 08:45:20 -0400 (EDT) Date: Wed, 25 Jun 2025 13:28:44 +0100 To: PHP internals Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_Make_Reflection*=3A=3AgetDocComme?= =?US-ASCII?Q?nt=28=29_return_an_empty_string_instead_of_false?= User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <5CC93165-F6DC-4342-8931-839E58D746A9@rwec.co.uk> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 25 June 2025 11:37:37 BST, "Gina P=2E Banyard" wr= ote: >The getDocComment method of various Reflection classes was always used as= a string, and we thought changing the behaviour in PHP made more sense=2E Looking at the stub file, the use of false instead of null to signal "no v= alue" seems to be used in a bunch of places in that extension=2E For instan= ce, getExtensionName() apparently returns false to indicate a user-defined = function, while getFileName() returns false for the opposite case=2E Returning an empty string when there's actually no comment feels a bit awk= ward and inconsistent - for example, we don't return a "no type" object fro= m getReturnType()=2E I think returning null rather than false for all of these would be prefera= ble=2E From a compatibility point of view, it's not much different from cha= nging to return '' or 0 for those cases, but feels more logical as a design= =2E Rowan Tommins [IMSoP]