Re: [RFC] Add num_available_processors

From: Date: Sat, 24 May 2025 17:42:34 +0000
Subject: Re: [RFC] Add num_available_processors
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi

In my opinion, the return type should not be nullable.
Returning NULL when the platform (or PHP on that platform) doesn't support getting this
information is an anti-pattern.
Instead, availability of the necessary functionality should be checked at configure time and the
function should be made conditionally available.
That way, the return type can just be "int".

Kind regards
Niels


Thread (21 messages)

« previous php.internals (#127445) next »