Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128505 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 6CCF21A00BC for ; Tue, 19 Aug 2025 07:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1755588660; bh=+Rf+RGTR0DAZF/B2+boNXpSPl3CqBY+Kw0veIo/0jtc=; h=From:Date:Subject:To:From; b=UkwyNx6jMlYvdLo1vSeclMsRoWWrTOOU/Vw+sRVSEaHfrHMB1BK0o1zvjpzjBZamO WU1rGysIe7wb1KgNmaCPWvodJyGK5UmcPAfBWd7IzSO3HnteIjDKX5EQBVdxDz8H0A RoE1fAKfV9N3kdiObslV6Uc/jCAUoU9OuPVP0bi14RndDdxj8NwZLgCm4w2ouquPwB cmWkfPl3+8EAlfKsAECjHfBSZSEdgjoNSSLNUGN//f8fn17KLYwjKK/Sp1iXRztjnY WY1i68WSTuAgwvF5wv/EY+F6hcZivOs4jjq6D+KjRYZ07oqmnwDKi2xVFXCPmfwOy7 9sgoP9DUD3O+w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 53C2C180083 for ; Tue, 19 Aug 2025 07:31:00 +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.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 ; Tue, 19 Aug 2025 07:31:00 +0000 (UTC) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2445806df50so36147475ad.1 for ; Tue, 19 Aug 2025 00:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755588754; x=1756193554; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=+Rf+RGTR0DAZF/B2+boNXpSPl3CqBY+Kw0veIo/0jtc=; b=i7loSGC/tyyx0uaIxPmGmf1fbPeBCP/cNbxvVCTIp/WEsrmWrBXpyCtedu4jtqApkd yvrSRKhjluolElLym+m8Oi26gMSUoRAyRFwxOF8Ow5GFyIgIf8A4dq4Uvc/Wm3qPUysV wpfLkc4ECnuQaQ/dsy348a0OUOFfgp74h5R2ixPqkN6pP78MnKiJ8M0HC2xRttwM13V3 DJ1+ko1A0ukJIZPakX3ObvjdevAH6QweaGs2xbJVn99Vxv+dlZZa15L3WHX0aAVOV5Xc d+9cZrh3JHHv2wjac51XEQ5lU2g9GJyCP03ftGhcu8k6aj4yowCruiv1TAL3xOpqiG/O O/ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755588754; x=1756193554; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+Rf+RGTR0DAZF/B2+boNXpSPl3CqBY+Kw0veIo/0jtc=; b=wsCyNCjSf7M1VceUrYDRZNyHC0pUBQ1YgVqIhDEZhwbX/SCkMuxDpQZi8+adB0NYu7 gd9DdlUZGpt11mp6W/lo/vhG2bxwfHy8yuXLRLjCxJfRp/Ua/9CbTFwc2JHoLlVRpy+0 /ZwbHC5gnE+7UK9EScI2KyCnlpfRkxih9DM7mByY/+X/Px2W7S9FYZtKF1NHmAnRpvmu OSOz1OEv7yaTMWEH74Qf+EZBgNq8Q6X9ZMYpXJtGRCWQItV/nR4xM54KyGMKPLpuInbw nVU8ntub72x1AjjVYNf75d7OPbwblU56+/f09hHE6df/pQkq3OR5Zcb3bkDya5MOOjrJ lEYQ== X-Gm-Message-State: AOJu0YybzVunOnF1eIdyhmo/EORG6OFxwa62DZoEok0ZvVZJJ8+IOsGd dY7IixmBrhUj1wjPk0YBFWv7wADpl5DTIj0IwQHM2wCg6pHJK8qGHzwoaMoo/4t7znx+/53cGa9 SzQiN5sYyVoz4AtlUxGYdQuevffQOupRN+bErW7CxYA== X-Gm-Gg: ASbGncuA0adU/W3eMtn8rQGRBcCsLqsRw+advVZw+cIa7CRpJhnMJIuNBeCjhxN98u3 wrDSByYpfcuVzTY4vP/Lj6N+RuclCZrI41m9cBHtdYHS+LRTXz2f4VC9/irxn6SlwmrV29HGR/h sJ7GXl1xadBoRYHfEUyWeNU+NP/jqAuR1zfKeBx2pblc5aOnLX9oL5PPOUbSpC5jD4C2gMAf4Ls 4jAFtziNA== X-Google-Smtp-Source: AGHT+IEscU9xsX+JB6XDKfxt/z+QXVGBk1rUhsR2N9uzsg7XmYESN8a0cz1VV0c6H2nitykzrAe/N3b1BQ7i4yc3OC8= X-Received: by 2002:a17:903:22ce:b0:234:f580:a11 with SMTP id d9443c01a7336-245e0309271mr20174135ad.19.1755588753921; Tue, 19 Aug 2025 00:32:33 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 19 Aug 2025 09:32:22 +0200 X-Gm-Features: Ac12FXzU9CcP3k8NzzTz_VKJbdQb9A_anH-Al8zUbBdZvddeUUls9YITA-tjctU Message-ID: Subject: [PHP-DEV] [RFC] Add clamp function To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000000c9b61063cb2dc17" From: kylekatarnls@gmail.com (Kyle Katarn) --0000000000000c9b61063cb2dc17 Content-Type: text/plain; charset="UTF-8" Hello, I took a look at thinkverse work on https://wiki.php.net/rfc/clamp and on the open issues (handling NAN and other comparable values not being integer nor float). This new implementation should resolve those issues: https://github.com/php/php-src/pull/19434 If you allow me, I would update the RFC to add this new implementation listed on it, remove the "Open issues" section if you don't see any with the new implementation and would change the status of this RFC to draft to reflect the fact that there is again an open PR for it. Thanks, --0000000000000c9b61063cb2dc17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I took a look at=C2=A0thinkverse= =C2=A0work on=C2=A0https://wiki.php.net/rfc/clamp=C2=A0and on the open issues (ha= ndling NAN and other comparable values not being integer nor float).
<= div>
This new implementation should resolve those=C2=A0issues= :

=

If you allow me, I would update the RFC to add this new= implementation listed on it, remove the "Open issues" section if= you don't see any with the new implementation and would change the sta= tus of this RFC to draft to reflect the fact that there is again an open PR= for it.

Thanks,=C2=A0
--0000000000000c9b61063cb2dc17--