Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:131005 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 1112A1A00BC for ; Sun, 24 May 2026 20:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1779655118; bh=reXuQQI5uhq8CnUDRwDaDw3L0sfgPWWrch81eNZKu7E=; h=From:Date:Subject:To:From; b=CXEqg1CIWkA9376yirRXyMNy1GY5hTsgqza1oGx/T4WzZdsGfD8/oYwFNkoznbRh3 O890Jhn5HDrnaY8iEsmuT7PBSZx/FqqXjUhICmkBvMvzlSEEae23rB432ma1Tg+U1O ZOC1c5N4pNMubi+sG9l7+wc8DuYR4VlWCPuL34Yj1jGjcNVSA9Zo0c89cgry/eqgJB HWZr650KJCkMHBr7qv/R/qWPANIsyCm8s9i9zG4Mp23bCAlm6agJoFD7mdE+tpGEMH vCuyO5juqFJMe6Slzspq1Q58TTZEOvRmqlzbawm2exA+NEdTJbDN0AexKiAsMceH+Q qBAQVxg2l+Yyg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 25EA4180080 for ; Sun, 24 May 2026 20:38:38 +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,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: No X-Envelope-From: Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 ; Sun, 24 May 2026 20:38:34 +0000 (UTC) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5aa2c25c632so3608178e87.1 for ; Sun, 24 May 2026 13:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779655108; cv=none; d=google.com; s=arc-20240605; b=er5Twjs8eIAR/oQrsRKaSdsFCCAU/dVPbYf4CWtD4sIX85JYNpVrVzB33QiHzsLITe n+N/5WzpwkEM7sOoUc6WcipSprq+CW4kyHxh2QZEnVIPjEfsMV+y7S4nKf38I9RDOyVS LQgqo6PGuDC1fwEbv0Fod32FpBKns91eGWwiX8vRvU+A7TK1JNa0y8Hnl3uWEaRJRQZw fBp54GdsjPV3ME3kfbFcRxpYwWXkAFmBpWr6zWDNC5O76p4P1UetLgZeKyOuqOCZpNND MQ6ZJcp6nDwBlUDew+f6j74XuKGaVGL2oCpx4qFC67l2egee85QhXtt/g4lGaosSYusG X21w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=reXuQQI5uhq8CnUDRwDaDw3L0sfgPWWrch81eNZKu7E=; fh=LsO8Zb/qfr+QGRDKDqG7yqRx5MlxjyNVKSOLXaf9cwc=; b=lWSo78T34RWa/xXK2zrILKzTOTO5Cm9D5NT8gRrA6POdnC/P7UazFAe+Zt3Na+SpNW Pn4KmJgp6x+5wNlWw2eCVR469qCdDW50SLV8+zmdHAANjzDDrKK8gVTcYUXGLArLiBJT wUO56kuuzjxjsnaRIDDVt/De3ovXuGkuW9IyCvHbm5cfatWmrLvYqFFculY2gcbVfrYp 4xzUtEylv+QJrrFjkDb6txBI5hc/81/rRxLAeyU7JGfDhSMEoR28XQX4z6Th27rGhMTp e2phtjp42XnVBVVCChIGU9rn9KJM9+CYkp8vDugmBwsT+ENGk7yhdCrlOm6mh6NvFmD7 m4eQ==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779655108; x=1780259908; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=reXuQQI5uhq8CnUDRwDaDw3L0sfgPWWrch81eNZKu7E=; b=c6eUdV7NEvw+vhbtcT1UFYzapiOpj3Lgo3hrZ69VhP2xrmnnMHiUH7vajpFFmPU96V ekxUvBsdhnP9vzp0hhp3y61FXnlRSdjTDL0cA5sJxuJ3Qcx1x9NzDHoZPsg45kGEIgb0 iCk1ALB/bRZBNeblP5d8o46jbd/0HW/axa2lfAGur/3pmUi6A3TiphW5cyAJVsL0n98V 0b+ACZ5b2WxdOcuE5shpWF8a6w3paj4FcogRQ0HhAWoFoI3AFgft7hoIWot47333Hymx g0BrO3+KDlOsKbKQAUeHQJpMwulx8405BPCeMpUM5QMFDi0Ohq4R4sPEg5xs6VLwoI8D MUKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779655108; x=1780259908; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=reXuQQI5uhq8CnUDRwDaDw3L0sfgPWWrch81eNZKu7E=; b=m5/m8ueP5d74+5mt0Ynfs3hwlB+RqFmi2hACyF7vSzIEO53lxePCrECn2VDgIrsd+E RLBDA5hbmEPMnK4kN3WljWF8DBI9K8K46hgFdH9TzNoJlxDWeyAWXWBh50MfwjKW2Hel QYvu1pqVtZWzplfGUFbcEjh0zupZUQxczQZTukjrLxYTcWbu82h8mSls6yfi3OtG/bea NTgId3jM+5ZH8mkQ+jSnQsqIibc4hoQQ2oHEvfGsdOH7lA4OaBtDdQYnkEtXIgbjp6q+ 3T8bjowPHIahA+w2G67+BaWSyyHsmzcSjNdnGF0VJ2aX8Th86niYM1vHduoUjU6Uo/K4 WPdQ== X-Gm-Message-State: AOJu0YwH8abLxf58avEjJfVNhn1l5pPHxP1CrgkPUXvQYsl0pClKA00o K9eQ0MGfdi1YtjLGH7eMgWMgrrWpKd5sVdDUdkZxQRH+wH89Q9qhRIdhZNl0LWkthEhr/wmbHn4 0EgeC7UkI1xDKCI3P4FxUvkHksPCu/YkRDg== X-Gm-Gg: Acq92OFwOKKO/B/kfkgIQQJ7cDe6J7lVfELPN3qDplaGTYLoUGaMsDMg0/tQ7GLbVvS vovOovJz4nS/RmzBBsUcJomtoo2XtRb8oPP05Qf8PPuSEZSIQjyjUI2PJ0KZjMJWfV06ii5g0jK wFNGmId/YKylYRwSNkcIyQolLF6ULzuhjb2cwsZEpfvaqmZqS/ueP18fJo1AzpGA7XD4MIYIh6E +LZUQCRKwk2Nob/EFoZEyTtvlwV0u2EB1KIo6JVxuFfdX9G5rIS5CmXbBJs2T10IZ0FCxiol1om CuNYGLwh43F5f3E7YVXSHpyw0OXqtct9eHQUnL6WDOfhKkctcoM= X-Received: by 2002:a05:6512:65dc:10b0:5a8:f984:142c with SMTP id 2adb3069b0e04-5aa32328f94mr2799145e87.12.1779655107815; Sun, 24 May 2026 13:38:27 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 25 May 2026 06:38:16 +1000 X-Gm-Features: AVHnY4JEYNlWFvYMsVolIqsRDOW1Ai4HBVRH_Qj9ZSjswp2ms5SAygaV63ISixc Message-ID: Subject: [PHP-DEV] Documenting sscanf()'s and fscanf's underflow To: internals Content-Type: multipart/alternative; boundary="000000000000862e2c0652963e20" From: mickmackusa@gmail.com (mickmackusa) --000000000000862e2c0652963e20 Content-Type: text/plain; charset="UTF-8" Hi all, may I request that the documentation pages for sscanf() and fscanf() be reviewed? Last week, I tripped over a bug in my code because, despite using and loving sscanf() for many years, the function unexpectedly returned -1 for the number of successful captures when I expected 0. I've documented the encounter here: https://stackoverflow.com/q/79942833/2943403 I have been doing a fair amount of Google searching, but either my keywords are not ideal or there really is no mention of this floating around (even the C++ pages that I read don't mention it). Thanks, mickmackusa --000000000000862e2c0652963e20 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all, may I request that the documentation pages for ss= canf() and fscanf() be reviewed?

Last week, I tripped over a bug in my code because, despite using and lo= ving sscanf() for many years, the function unexpectedly returned -1 for the= number of successful captures when I expected 0.
I've documented the encounter here:=C2=A0https://stackoverflow.= com/q/79942833/2943403

I have been doing a fair amount of Google searching, but either my keywo= rds are not ideal or there really is no mention of this floating around (ev= en the C++ pages that I read don't mention it).
=
Thanks,
mickmackusa
--000000000000862e2c0652963e20--