Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121388 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 47033 invoked from network); 18 Oct 2023 13:00:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Oct 2023 13:00:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 223E21804B4 for ; Wed, 18 Oct 2023 06:00:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 18 Oct 2023 06:00:36 -0700 (PDT) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-53ed4688b9fso5289068a12.0 for ; Wed, 18 Oct 2023 06:00:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697634035; x=1698238835; 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=pnC3WKxUaPBN5L/hLKYODR1lS0ZIy1SuMrgCj5brdaA=; b=A8y/87q1AtaqxxxAeLLZZX6rs9sX974mrH1keWNbBTW9S6wzNETjPfrHbE3zqjTNL1 E+cLbQPh3O7ZJWd0ozVk/W8KuTHlXCb9jFvghZi8eXBdp9Rr+1mwnCeps2d7KYieN44l yKwB1pmHrPUlV1WDMOB4z7vyKl4ghYctqxDX3QQ91DiHEb1NLTGesqYvr1fQOM5Mbb2f HgM3rBNX+utXzxosWY97kh+z1huJQbuWNgawGxoDsLcXos2iEdfNUFTpcLGF3PcXEf2v xxyc/I+bpqcFa/XKicgnXNHQIb+F7pHLuNvzTbn5e6ykgOy+uvdXWmFmP9e2+3d0m97w mG1A== X-Gm-Message-State: AOJu0YyjFISXggWn9Jn94jhMhpJVUkLFVNdX9c/lwJxIT4QbPieTCi1Q pF54/m/tnLV0tvw7xiwL5X8Z1NDlr/Ul/ajK3ah6BjWi0rQ= X-Google-Smtp-Source: AGHT+IHTiDNk4PihhoLcXmpP4ocleETqwp3W+JsqwQLqCUbPOyE8YXJr1iKLlpR3WCzrClokd6JzAafhso4pGEUgKv0= X-Received: by 2002:a05:6402:26c4:b0:53d:ed7a:11f2 with SMTP id x4-20020a05640226c400b0053ded7a11f2mr4389703edd.38.1697634034921; Wed, 18 Oct 2023 06:00:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 18 Oct 2023 14:00:23 +0100 Message-ID: To: Daniil Gentili Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000009c32cd0607fd3948" Subject: Re: [PHP-DEV] Deprecate posix_times From: bukka@php.net (Jakub Zelenka) --0000000000009c32cd0607fd3948 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Tue, Oct 17, 2023 at 6:39=E2=80=AFPM Daniil Gentili w= rote: > Hi everyone, > > I would like to submit an RFC (and related PR) to deprecate posix_times > for PHP 8.4, removing it for PHP 9. > The times() is defined by POSIX and I don't see a reason why it couldn't be exposed even though there is a better alternative. I think posix extension should just expose posix defined functions and it is thus a low level extension. > > There are multiple reasons to deprecate this function: > > 1) > > The values which times(2) returns are expressed as the number of clock > ticks elapsed since the process was started: the frequency of the > aforementioned clock varies from platform to platform, and PHP does not > expose the sysconf(2) function, which is what should be used to fetch > the clock frequency, invoking `sysconf(_SC_CLK_TCK)`. > > I think the only thing that is needed is to expose _SC_CLK_TCK as POSIX_SC_CLK_TCK and add a note to docs about it in the same way how this is documented for the C counterpart. Cheers Jakub --0000000000009c32cd0607fd3948--