Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127733 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 DF34A1A00BC for ; Fri, 20 Jun 2025 12:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750422021; bh=dPN3f4vhqL49jYX0MxF67lZoFf8GDhXN3FMttf1FKpY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hPnvi95LybN4MPx91YHk03Jdz2aQun+IsNPsU8D+hxzME0VULsFynKd1S8y41s6xz r+blm88OTYguKVBeooCz9R3fMEYl4CsvQJ+ZMtwI0d6aKQwe+iHnd1LIQJI/UsO8PR ABbw5L/z4I+qj1jMmFDitf/NlOCJ8mqLPI2nEnM5zr5Dj8wblK2edZqqUU+ZV9esux XH2gHpew2orYXSy8AT+g+7M9cKBOtuq4+MupIpTI91vrA2mNzym6pZjwkLfDimvUb5 /3x6V1iw8PCmwfZ8be7Zjs6i+opy9Pi8PW6PTKRRk6QaWRAw4EDcoZjqtm5teBTWo7 517tWos7C6WRQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3B695180034 for ; Fri, 20 Jun 2025 12:20:19 +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.0 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,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: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.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 ; Fri, 20 Jun 2025 12:20:18 +0000 (UTC) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2349f096605so26441285ad.3 for ; Fri, 20 Jun 2025 05:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750422135; x=1751026935; 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=ZrPJTJGzxC2LceHXU4mOZVHbyUqad4NtVf+ZeGJVtB8=; b=NSYMqWzA9B5x+b3nppAk6IFn6fkX4Mng5few86aHS1H6gTZ29qtXygqslCPEH/SlMu 0ZqiBa53XWLFUS+TAiwlRWAbwHa9QG3vXmZJIRY1R9y0pHN2Qg+Okx/sT2ihtDtwvH5u mQe2vfiP6i/3AaHOBcjV3Xr679T2Vay5Nf9bMg7eTPIL8xpwjBkgrzOS+U59VQX/XrBI ybvMkp4GvYJTOFqpshG+mI1dEOvXrrdkNjeSkKgHS4fNan7eY5hEblyi1+h/FNabvDSK 0NKZSkp5ncOIMQYteuswVhiPeKpwa4vsHwP6AAR1YPMkZJJHQkpRjelulTfVxfFTrAUM 4Ubw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750422135; x=1751026935; h=content-transfer-encoding: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=ZrPJTJGzxC2LceHXU4mOZVHbyUqad4NtVf+ZeGJVtB8=; b=hnxEueQ3tYnn8rczGVC6IVdoRoMMDKZF7zLA2tSzPpjSVlZLgwfEeMb3ZQ6YXBEdqf zUAZbGjon6H4pAw17QzvRv6R1WuLGDRybDJXMUSdQEA92YFZ6xF/DP1ZeoMN08cw/X7G raRFyqO8h1eokq65EJQUVDcTsVecUB3RFzwigkoGl1icMxgTNonfrmH7N0otUm3PZbga ZQQpwHr0wZEyQZwhNO0n8xBHqlniohbq5O5tmhuSWr6QuO11BlL6tvYz3W0OiYKediy5 s+Bfng8yswtZGhgQKS+DkiY7sOPk3+oioB1sap1o++HzEpiRztiEfCmmroMer7VEnKn1 +YZg== X-Gm-Message-State: AOJu0Yyru1Zjy73yu7EWmYbvtDX3n3sZOY61OrlUHgLhcBd68KTBJ9tz FUXNdDOD+xuThygv3Jnv1LiU5WRPeQs0DjIFx2yJMmZa98/8B/nhwfmdeDolXAeVeq69/BAgD4h qKBGXe+LoUP9Zz2HS1jWR6Di+chXh32S62gTcazM= X-Gm-Gg: ASbGncsalZO9VuMq+QKAY81uAT18bTVLgScuWijhOBWnxnUfMgnArNTiNJE/7K9fhyC nZfIDUEidjgh4Eu7EJ8V2EvPmWlM5+FvDZlm2lNKnU+byby+Q8q81pLez7+U4a8enbmB2G9FrYt 3aw6o6pdEyxK7ZmOn6qJ/wdT+Rs9ISIX/ghRgrR7v60Q== X-Google-Smtp-Source: AGHT+IFSNWyV4omS6zZuiqiQP8aO6Em3sDAY0PmUlg6WDO/7hlniv6VoMXUVE7bCAaKIoSbE1t/MHRDj24m3sspDyPA= X-Received: by 2002:a17:902:ce8c:b0:235:ea0d:ae10 with SMTP id d9443c01a7336-237d97ce44cmr45724015ad.12.1750422135204; Fri, 20 Jun 2025 05:22:15 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <73D7B135-ABF8-4EFC-BF16-EA26A5BD1B7A@cmpct.info> <5747e268-1176-4b87-ba58-2a767d45006b@mabe.berlin> In-Reply-To: <5747e268-1176-4b87-ba58-2a767d45006b@mabe.berlin> Date: Fri, 20 Jun 2025 14:21:39 +0200 X-Gm-Features: AX0GCFtKsYhp0P1QbA-nF3GLLtYQHdgj6cF6vzomXXaLJjOxcTcjsS23LMCb3cw Message-ID: Subject: Re: [PHP-DEV] [RFC] Drop support for 32bit builds To: Marc Bennewitz Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: divinity76@gmail.com (Hans Henrik Bergan) On Fri, 20 Jun 2025 at 13:20, Marc Bennewitz wrote: > > > On 19.06.25 18:55, Hans Henrik Bergan wrote: > > On Thu, Jun 19, 2025, 18:24 Ben Ramsey wrote: >> >> > On Jun 19, 2025, at 11:08, Calvin Buckley wrote: >> > >> > On Jun 19, 2025, at 11:08=E2=80=AFAM, Marc Bennewitz wrote: >> >> >> >> Hi, >> >> >> >> During the discussion about the year 2038 issue it turned out that ma= ybe it's time to drop support for 32-bit of PHP completely. >> >> >> >> Based on that I have created an RFC to deprecate 32-bit build in 8.ne= xt and drop support for it in 9. >> >> >> >> RFC: https://wiki.php.net/rfc/drop_32bit_support >> > >> > I think the biggest arguments against this would be: >> > >> > - embedded systems; think of PHP in use for i.e. router web UIs. While= I >> > suspect a lot of these are going to be i.e. AArch64/RV64 in the future= , >> > there might be a long tail of existing systems. Of course, how many >> > would upgrade to PHP 9? >> > >> > - WebAssembly; I don't know how widespread the Memory64 proposal is ye= t. >> > We're using WebAssembly in the docs pages for runnable examples. >> > >> > And some niche cases like i.e. iSH (which emulates x86-32 on iOS). >> > >> > The other options include making zend_long always 64-bit and accept th= e >> > performance penalty for 32-bit, or making 32-bit best-effort rather th= an >> > providing any guarantees. >> >> >> Last night, I was giving some thought to reviving Andrea=E2=80=99s Big I= nteger RFC[^1]. This is something I=E2=80=99ve wanted for a long time (espe= cially for my ramsey/uuid library, among other things). >> >> Andrea had a work-in-progress PR[^2]. I=E2=80=99m not sure the current s= tate of it. It=E2=80=99s from 2014 and was originally written for phpng. I = had planned to start teasing out bits of it into a new branch based on the = current master branch to see how far I could get with it. I wouldn=E2=80=99= t mind some help with that, if anyone=E2=80=99s interested. :-) >> >> If we are able to finish what Andrea started, then we would not need to = drop support for 32bit builds. >> >> Cheers, >> Ben >> >> >> [^1]: https://wiki.php.net/rfc/bigint >> [^2]: https://github.com/php/php-src/pull/876 > > > > > Smallest ramnode.com VPS has 512MB ram. I would run 32bit PHP on a 512mb = ram VPS. I'm not longer a ramnode customer, but I used to be. > I for one would be sad to see 32bit PHP go. > > I have done a quick test on current master with Symfony : > > Without OPCache > x32: mem: 16777216b, t: 0.15017914772034s > x64: mem: 23068672b, t: 0.072926998138428s > > With OPCache > x32: mem: 4194304b, t: 0.01033878326416s > x64: mem: 4194304b, t: 0.0080580711364746s > > As you can see, with opcache enabled it's taking the same amount of memor= y. (I don't know why ... did mostly the same setup as the configure-x32 GH = action) > the php memory allocator allocate large chunks from the OS, checking the OS-allocated memory doesn't tell the whole story, it's possible that the actual usage memory between 32/64 non-OPCache was mi= nor, can you try: register_shutdown_function(function () { var_dump([ "memory_get_usage(real_usage:false)" =3D> memory_get_usage(real_usage: false), "memory_get_usage(real_usage:true)" =3D> memory_get_usage(real_usage: true), "memory_get_peak_usage(real_usage:false)" =3D> memory_get_peak_usage(real_usage: false), "memory_get_peak_usage(real_usage:true)" =3D> memory_get_peak_usage(real_usage: true), ]); });