Re: [RFC] Add num_available_processors

From: Date: Tue, 27 May 2025 17:13:51 +0000
Subject: Re: [RFC] Add num_available_processors
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 5/27/25 12:01, Derick Rethans wrote:
On 27 May 2025 17:37:47 BST, Ben Ramsey <[email protected]> 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

Attachment: [application/pgp-signature] OpenPGP digital signature OpenPGP_signature.asc

Thread (21 messages)

« previous php.internals (#127483) next »