Hi
On 9/28/23 23:21, Derick Rethans wrote:
Yes, lacking evidence that the name is actually being used: Process
PHP "owns" the top level namespace. This has been documented for decades, too.
I agree here. While I'm totally in favor of using namespaces in core, it
should be done somewhat consistently. If the proc_* functions are in the
global namespace, then so should the resource object.
Choosing a less-than-great classname just because it might break
non-namespaced userland code is likely going to cause sadness in the
future, e.g. for folks that need to use it within a type declaration.
Any decision we make now effectively needs to survive for 10+ years.
'Process' is fine. 'Proc' would be consistent with the function prefix.
'ProcessHandle' would also work, but might not be the ideal choice if /
when the resource object gets methods in the future. There is some
precedent with GMP which got a proper contructor, because if was
forgotten to make the constructor private when initially introducing it:
https://github.com/php/php-src/issues/10155
Best regards
Tim Dsüterhus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php