Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129509 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 B024E1A00BC for ; Tue, 2 Dec 2025 13:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764683157; bh=1z3JODYi0QnEOJcYOQRQsPl9RQSHRUp+6+6OryAL+W0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=VQ8AI0iR7Sr6DRUyX9ZAPU+UoeMIyFR16/XszO6XGQLcjYF56qTrok6+SRH85ep21 QbhR239r1zlu33mf9pAhZMzVt0Pt3YoeqtXsElpYdA7/Zl5yxpZRtnHdrDeIuqbkNx +46iaFsCboofDY8n97WBX8jYqzfT1Va0sVe8xL3h0tjiVuti7xRHIehqGaiFlJ/vMg qjDPkfla0XaMOC0+/5+bChkaoC7/ncc84s/5AErsNofDVJVo95yWkPsvqsXohT/SMJ 6KqmFIvMcmJEu3Oog4sUXeKb4RVAME6adGFUlhziP2CYLIfwZ+/OoaUA4MCwGFEU8d 9H1Sn6RSmt5QQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C7B0518004C for ; Tue, 2 Dec 2025 13:45:55 +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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail.kd2.org (carotte.kd2.org [188.165.240.126]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 2 Dec 2025 13:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bohwaz.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=CCm97C0b4qDNZebK2dPap1a6c5llxn5u/ywiDcJZwVo=; b=x2HwytI/tGQEF0XRbOwAvkbwN5 NeclWAhC6YOtmH/4cMFLFi+14Qyv1tQltEQ78ab7fsG2JJmm6b5nQddQe2Ah3DIfgeDruSpwVa9AL +8cYgnmvhBYWXDeXNdEsk8XBdcrQypZNeC+AgVgFd/gv+Pl+6Q36vMJFECceMmrvdeGk=; Received-SPF: softfail (mail.kd2.org: transitioning domain of bohwaz.net does not designate 2a02:8429:27d2:9a01:4827:377d:f354:b45d as permitted sender) client-ip=2a02:8429:27d2:9a01:4827:377d:f354:b45d; envelope-from=php@bohwaz.net; helo=platypus; Received: from 2a02-8429-27d2-9a01-4827-377d-f354-b45d.rev.sfr.net ([2a02:8429:27d2:9a01:4827:377d:f354:b45d] helo=platypus) by mail.kd2.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vQQhR-0000000GKon-1UHE for internals@lists.php.net; Tue, 02 Dec 2025 14:45:49 +0100 Date: Tue, 2 Dec 2025 14:45:42 +0100 To: internals@lists.php.net Subject: Re: [PHP-DEV] Change output of gettype? Message-ID: <20251202144542.004e203f@platypus> In-Reply-To: References: <20251201211236.566237a1@platypus> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-pc-linux-gnu) X-Face: #"dGtXaYpS9,C:d{FJZ<@4|;AL[R;I`|\;HN}zkw(rmBsu$)Dhed/z8e%U@Ra@JQ;,Nx?Xopxa+:gb?}efqG\/7TnBPHBRjU^g}$;rL4"jYrE#M^%*(?;Qb{HHbOf"q}bnOjU.'SEL:||\2*swZ>NN9pe(pnejy{ijk9%/8 list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Invalid-HELO: HELO is no FQDN (contains no dot) (See RFC2821 4.1.1.1) X-Sender-Verify: FAILED () X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) From: php@bohwaz.net (BohwaZ) > And if I remember correctly, that's exactly why get_debug_type() was > introduced: no BC break, and it does the job. > > You should simply use get_debug_type() everywhere and never use > gettype() ever again. This is the most sensible move you can make, it > really is the function you should use in most case. Ah! I've never heard of this function before in my last 25 years of PHP ^^ I'll open a PR to change the doc about gettype to make it clearer in the gettype page that get_debug_type should be used in priority. Thanks.