Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128292 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 C1A961A00BC for ; Tue, 29 Jul 2025 11:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753787688; bh=xnQCAZLgLsjLX0WAXugGhnwb+H849oV24Ms9UbwpBmI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mkI5lRPy2CPeIS0S0+GsiHU5OiVfDBfSv7d6bvjAKjeooGq6MkB4PuFDHX77k7QLj NEmWxwmxva2NKL3gCXiq2lLOGr+bLJxVd8wVUZkW+cqZ+vMb3R8vlkYVYn2kRzYGxX KBXdG0NdQ8VjzQCpqMBvlm+9x5WfqJCpLwPW6qgxEHUc+nbGT1AI5Flx3yRfUJNZ/e zYfxOtjLuQLIc8HrKdte9nVwwhlGVuQZmXmjt7eogZwnK0QvBYOd7HyDQyTEWjXhbB 9FVhWMeJfPuujpvMf7G31NGfkjis2tYiOto3wqjLbrzR/iih5COPE5XH3MlQ9M3G0C IXiaq7sx0YTwQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EC664180087 for ; Tue, 29 Jul 2025 11:14:47 +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.4 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, 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 mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) (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, 29 Jul 2025 11:14:47 +0000 (UTC) Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-71a1a0b123eso16863797b3.0 for ; Tue, 29 Jul 2025 04:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753787790; x=1754392590; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xnQCAZLgLsjLX0WAXugGhnwb+H849oV24Ms9UbwpBmI=; b=kk8QY7o89S3OpY8wghKMxHe9bsm3FiDwHTQPqKja2MrEA1N0ub3wpKUd+OzJ9OHGf9 SiKqI/tdxI8OyDplwqQtUM8BelQTIpaB5WzxabOiL/Bw50etrxdM6mxw3V57HpVqbgY1 dV+S8iKKYvDR/q7Yynh+mbS8JmF+/h0LZcszEGT2xXrdIJk7V/hFKPFzkc5BNlv5uhjD 5aKGXjqixJi6LbnWMNDrw2qbnGjYxN27HcirQbTN5l7Odv8WS+KdqgmTg3oOABySBPYK S12H48SIL2MnUWOp29Q1x+1SadkbdQlXHXmgDoD5Ot3/7nNet4YRNkEK4dZ2/evP5ZiW yoPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753787790; x=1754392590; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xnQCAZLgLsjLX0WAXugGhnwb+H849oV24Ms9UbwpBmI=; b=ctTkNEDfyqDVXlOxrBKNk7rSzlCVoLtAqFJkxVpLXche+1xQxZd40W6IEkj87WkoYB 3/rVrqpPB4GpriHfEw3oZ+jwSuuxnqHVh6bSEIyNBOiOsBjZ/YW7nGeTPqVn3q9fdsSD hW2JS3rXd6l1revKIBZQ6uoc32hPFuZ4hlgEuGfKkZQvAtLDUIX6dF2D9UW1edqkfP72 ol3RwZfqkoTwkG9Fe3hpTf35FNnd1ySco4kC/Wm9LL7ijEFriW+zCMd9iIj19bGTlBcm btr6q+sYlfNSuR2fgPLTw2S718dY3AflOMwVjGj8Wi3ls4ZKR4HrhFUSwpfIA6EguelS XkeQ== X-Forwarded-Encrypted: i=1; AJvYcCWhH2r0ZRrrwDPpQ6a6qKlv/sZQuCRTHeiCfylCX14QFkXqkGsYzc9KH7rdOpKJ4e7jfAJ89ozfir8=@lists.php.net X-Gm-Message-State: AOJu0Yx37xdRzk9chrBIL8+PdmOR6koHxWUGONgSElP6ufrKry1OhLQa EjH1olFXKwrUeTy+ymoIjE2QoVCOgECt8aBUPOEuhVzFJ0Rybnm6JpPKd9VxFcFclGWK07QKTkL HpX+ambRzGDdHzbys9pz7ZJRBwrlCvmj32+gtpWE= X-Gm-Gg: ASbGncsWJjeSMS7nG7Y6s5u1iIFxH4KljLuIq2eHh5piJU8/Ql/+iQPfqeqhP+jWFYZ j1GD9jaC5cDbOgLclnG8yKoQ46nrZF6+uJaEIQ46vKmHNYaKV9YSxExVeJ1SvLfySyiWfw7HIDT KzSWF/GUU+O1KH/Eh3qdx06hGtQie4je+eZq+gPxaNBq6wazy0+FQK+FpGJH7KyQyz3twgqhWty JMuPalJ X-Google-Smtp-Source: AGHT+IG5FZuk3LWwUngB6JsCAucgGSJJdXQuSEecr7E3ucuHLp52Gbhi8E2R7MxXM1QEcWtDPnl1RtgUTKnIhSDrgFg= X-Received: by 2002:a05:690c:45c2:b0:71a:1dd3:c9ac with SMTP id 00721157ae682-71a1dd3cd5dmr92112747b3.18.1753787789620; Tue, 29 Jul 2025 04:16:29 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <3b303d303708b13a2de81dc07753da3a@bastelstu.be> <-EPNf2A21qLIrIyEvNmQxV_tNTa1IO5hU-LHGBhjfnVRB33qiwK3yhVV7AxDKSTDUl9ihRpapZLckSgnCn7t9RvUj9Jbtjnx1VLYqCQO6BI=@gpb.moe> <2338ef4d-e9d3-4b16-9b52-8d343976d06d@app.fastmail.com> In-Reply-To: <2338ef4d-e9d3-4b16-9b52-8d343976d06d@app.fastmail.com> Date: Tue, 29 Jul 2025 14:16:12 +0300 X-Gm-Features: Ac12FXxORIRrFFXKQrDN2Mzwe61DhFRfhUF3c2Px7hUtTKiqtbmH7ndVx-v9gB4 Message-ID: Subject: Re: [PHP-DEV] [RFC] Warnings for PHP 8.5 To: Rob Landers Cc: "Gina P. Banyard" , Ilija Tovilo , PHP internals Content-Type: multipart/alternative; boundary="000000000000363d2e063b0f8afe" From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000363d2e063b0f8afe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 29, 2025 at 12:18=E2=80=AFPM Rob Landers wr= ote: > > I am not sure that (int)"INF" or (int)"NAN" is misbehaving. > (int)"Password" also produces `0`, and these are strings. If we had the > time to discuss it properly, I would argue that simply warning when casti= ng > a string to int is the most sensible thing, just like we get an error whe= n > coercing a string to int, which is more consistent across the language th= an > just special casing some strings. > > > This is about INF and NAN, the float values, not the strings "INF" and "NAN". https://3v4l.org/fAFn3 -- Alex --000000000000363d2e063b0f8afe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Tue, Jul 29, 202= 5 at 12:18=E2=80=AFPM Rob Landers <rob@bottled.codes> wrote:

I am not sure that (int)"INF" or (int)"NAN" is = misbehaving. (int)"Password" also produces `0`, and these are str= ings. If we had the time to discuss it properly, I would argue that simply = warning when casting a string to int is the most sensible thing, just like = we get an error when coercing a string to int, which is more consistent acr= oss the language than just special casing some strings.



This is about INF and NAN, the float values, not the = strings "INF" and "NAN".
https://3v4l.org/fAFn3

-- Alex=C2=A0
<= /div> --000000000000363d2e063b0f8afe--