Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127665 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 54B801A00BC for ; Sun, 15 Jun 2025 17:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750008501; bh=VIUA4uZHKGRAZ+edNDvpS5ZcAN/mL2UYowoDzgR0mtY=; h=Date:From:To:Subject:In-Reply-To:References:From; b=nlvxvJlwbZG9sOwH4Hi+zNAhRebDpZ6zeTzUamKLjSQHy41FlZaPLI/+IRsRNI9Y/ LZ2MUvDU9cggGCrt2JSlRu7qlCToKwaCf5k57Qhsq3w3I8nuZs+9zI7HNAoHZSB+gG p3pxWoJ/dNNPVA65NHYB24neU+EExIeXXdLyP6vvLPOssTzNzgGaGzeipPKURHVLVP qfqTEtjPDDjJCKuN9vp90vfYFpO5SlaBCxsJTSOLNG42ZnbKvv7I6RnARmHm/wg9mL 2t78Sudx5ad6tlUbwon7jWgkBRNCpl62EDFS8QBmGlKwZ9/SouRXtmCLeAZlWYn4sP LfqGefhjG6giQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5EFE0180081 for ; Sun, 15 Jun 2025 17:28:20 +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_MISSING,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 a.server2k.de (a.server2k.de [37.120.186.15]) (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, 15 Jun 2025 17:28:19 +0000 (UTC) Received: from webmail.server2k.de (localhost [127.0.0.1]) by a.server2k.de (Postfix) with ESMTPSA id 97AD34008B for ; Sun, 15 Jun 2025 19:30:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=danielkesselberg.de; s=dkim; t=1750008617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FLnmRyC878WsVd7065KL1iz1eJw8I89VT6KaTIMmHxw=; b=gqTmRLv54n5NUYOhVPcQbaT6/aYzwmzMty916x7naiJszgeNQnhlZ0RL5nq8RwapRdg6Ow BTM4yymqN09vUBn6vWrXUHpw1r+K6N6jMjmxxaen0y4J+OlomowLGx2jgxWSupTq9zvcgE Y7QvV+IQPpRW6ZJQ8Dkxorj0oqFLFgM= Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Sun, 15 Jun 2025 19:30:16 +0200 To: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Add num_available_processors In-Reply-To: <20250527171352.552DD1A00BD@lists.php.net> References: <8b76a3d4-4583-4849-a75f-00f645191247@gmail.com> <57f7ed3e-6bef-434d-83db-fd729ff43fc9@gmail.com> <20250527163747.ADA6D1A00BD@lists.php.net> <0FC66A63-1284-41AF-AA27-27F657EB57AF@php.net> <20250527171352.552DD1A00BD@lists.php.net> Message-ID: X-Sender: mail@danielkesselberg.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit From: mail@danielkesselberg.de (Daniel Kesselberg) Hi, Thanks for all your feedback on the RFC. I've updated the RFC to incorporate most of your feedback: https://wiki.php.net/rfc/num_available_processors 1) The limitation, that the CPU affinity mask is ignored 2) The naming discussion 3) Function availability on unsupported platforms 4) Return type How do we continue? ;) I see there are various ideas how to approach it, is that something you would vote (let's do a or b) on, or how does that work? Best Daniel On 2025-05-27 19:13, Ben Ramsey wrote: > On 5/27/25 12:01, Derick Rethans wrote: >> On 27 May 2025 17:37:47 BST, Ben Ramsey wrote: >>> >>> Are you suggesting that the function itself not be available or that >>> it throws when you attempt to call it on a system that doesn't >>> support it? >>> >>> I don't like the idea of the function not being available if the >>> system doesn't support the functionality. Users would have to call >>> function_exists() before using the function, in those cases. >> >> >> This has been the accepted practise for years, if not decades. >> >> If functionality isn't available, the function shouldn't exist. We do >> the same for posix (such as posix_getrlimit) and DNS related >> functions. >> >> This also allows for polyfills. >> >> cheers >> Derick > > > I see. Carry on, then. :-) > > Cheers, > Ben