Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129426 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 087A61A00BC for ; Mon, 24 Nov 2025 11:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763983276; bh=zgia16CK29aobjyy23ii0HAptJPOLAlp/14QRCgdKcY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=APIVCKYT7vttJnrmJa71N2ZtOgGxUIbNOByYFWweo/YLPOucEogrefZxvHe4TPXHX rDQEvxRUjeRqZmX7VsUr55mrGCrnGUlW5Wxv+yN0ULr2KIW4mcEIiu7lSp6fmy8xuj wT/spH3KMLt235T1GnnRcLFulVhhdbPfMTBmQOD36ZtHPC6CGLLiEMMzUztq98fiob LNM6xxdaSTRk7GeExPtOixmA34kcRNnObOuWF2a49XroFlhDJiW1BRf0R4RruO+Uil +Z2IEbeDHA5CLVCI3Gks3FXAzzIXlvduUNcC1tpS+lmiy9tsV1fPfPrb4Afo5+rQsC NfJ4EPbeyF6PA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2736A18002E for ; Mon, 24 Nov 2025 11:21:16 +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_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, 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-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 ; Mon, 24 Nov 2025 11:21:15 +0000 (UTC) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-640d0ec9651so6985014a12.3 for ; Mon, 24 Nov 2025 03:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763983270; x=1764588070; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zgia16CK29aobjyy23ii0HAptJPOLAlp/14QRCgdKcY=; b=N5FOPKWjDJx285EtGSY4UdDXA5jvMvZ7ek4uWWftCVoutTVGbjeoz1Zkxu7W2LJnUY L8ZbWNlfn1zxxBC1PtxrmDyj9KRogRgqcCA5T+ltfA/X/bMdlZnyREexI1bHchi1N5z+ kHDvYh6Vy+ViP7iBWi7V0ZMNYzLKr2aRL8t0r2GHjolGq5bQRuNH9pzACa9mSuNYK9nE hr/6usMpXHuSoc4mLqlKNaz5I8PT+IvwB2+BUySdtNC1Kepapg71ba/2GxeJP+LNyyw2 8DE1Z4nNlCp3KmueCZAf2dQ2InK3SvtPkj+2H7h7gkWBTeO0hATOjUFBfuKyYCwo0+AL Jw5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763983270; x=1764588070; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zgia16CK29aobjyy23ii0HAptJPOLAlp/14QRCgdKcY=; b=jEmDZV79Xpw38nTxZp21tVQcUCtxmF6yvWilbGtSnD0bvSGiTfGxJTjiMVkmrqKI8H AVM5aWZ/oPDSIdEfJjFi1nRFClikzL9ylsnKtIZulDTNDDbHB62dIKRS34DFxRryiohv eNqz68i39dZa2+8GXIgzA+YNEj3vjm+AOnnnrA85uvaKAmECAGRozLLysPPjWIQdVCzL CpMxCiIgOlJLqhNDzP7f9+o3QO2OQ6lp88EaaEfpnj6tHJPmKsrzfscSiL7r/9oh6ZJJ b07GBTFC825b/ypyT5/k7S3DfucHZaYs3JWl/tMiM5U8ICOd8Jo7pbTBHQO4izJdseSQ 1Ozg== X-Gm-Message-State: AOJu0YyKSl9qz4V5Np9MTeS84I1JuWYNawljtLfkZEbH4ChErHrIIz09 5xafv6TLPOY+e1Sb5SyQ4l2enbFH9rwEI7ZguE8f4IRtkXZKSiwiyP1ZkoCT0QpfKGf7HgLlR9i OUxJZecnlgU9kSV3dGlea/9NFxFvczoEjgF/A X-Gm-Gg: ASbGnctGaqUj8fkUWaaQQFP03v3IwUevGXnP74Ky9na/M/9GTCkFmbP+cmd5s+hYqB+ gPVJDJhqF4MpdJy3pfjhxq0q4zZUYiERqiW+5Dbbx3Q1tTyrtm7IOJiqnRbA4NVtkLg5AHiKjF+ NhDuq0Bp5biwzOqWlPrOQId4vyJioUAfTMDHNOkUEUndvOmb3sgyWxHqrqDzAZDm2Do5WfCJE6n pTP+KbE6mTgFTTDQrgbzojVSoHenpTCKfBsUeclxOHbfz7lekvCYN+oEOiq1g3irCNSxdVzOFLP E/Mwh5UmwhcRNw== X-Google-Smtp-Source: AGHT+IGCxIfbP0khzpWdJDSru/fPwtjdk7sw776iBAI/gaMhoueQat6XRKmri2CSaaIhjdba5CpcRYRH0StkYMcAza0= X-Received: by 2002:a05:6402:354b:b0:643:1659:7593 with SMTP id 4fb4d7f45d1cf-64555d0aad0mr10370190a12.30.1763983269318; Mon, 24 Nov 2025 03:21:09 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <9b6665e9-7daa-4138-9e4d-180425cc7c8c@bastelstu.be> In-Reply-To: <9b6665e9-7daa-4138-9e4d-180425cc7c8c@bastelstu.be> Date: Mon, 24 Nov 2025 12:20:58 +0100 X-Gm-Features: AWmQ_blGhWnBCMXRYnZ45EN57hiQ4JpVwaQ3STCh29Fr7r4YfuT064apFzLGPwg Message-ID: Subject: Re: [PHP-DEV] Re: [RFC] Add pack()/unpack() support for signed integers with specific endianness To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: PHP internals list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: alex.daubois+php@gmail.com (Alexandre Daubois) Hi Tim, Le dim. 23 nov. 2025 =C3=A0 15:45, Tim D=C3=BCsterhus a = =C3=A9crit : > > Initially, endianness modifiers will only be supported for signed integ= er format codes (s, l, q) since unsigned integers already have dedicated en= dian-specific letters. > > While there are already dedicated alternatives, I feel that restricting > the new modifiers to the lowercase versions would be unnecessarily > restrictive. Since the RFC argues that: > > > 2. Intuitive semantics: The < and > symbols visually suggest byte order= direction > > which I agree with, the same argument applies to the uppercase QLS > versions. As a developer I would rather remember l> as "signed long > big-endian" and L> as "unsigned long big-endian" rather than N as > "4-byte network-byte order". > > Since there is no inherent limitation or ambiguity with supporting > modifiers on QLS, I would suggest just allowing it. In fact I think my > PoC patch already supported them. I agree. I just updated the text and tables to reflect the addition of big and little endian unsigned integers throughout the document. > There's also a formatting issue of the =E2=80=9CRationale=E2=80=9D in the= =E2=80=9CProposed > Solution=E2=80=9D section. The text has been cleaned and simplified. Thanks! =E2=80=94 Alexandre Daubois