Re: proc_open() resource to opaque object migration

From: Date: Thu, 05 Oct 2023 19:18:57 +0000
Subject: Re: proc_open() resource to opaque object migration
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-121238@lists.php.net to get a copy of this message
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

« previous php.internals (#121238) next »