On 27/03/2017 19:28, David CARLIER wrote:
I wanted first to know if php source code can welcome oses specific
features or should it remain as separated php modules ?
Hi David,
I think there is not really a distinction between "PHP source code" and
"separated modules", since pretty much everything above the syntax level
is technically an "extension". As illustration, note that the really
basic functions like string and array manipulation are in the directory
"ext/standard"; obviously, you can't turn that module off, but it is
just one of 72 that are distributed with official builds.
The main difference is between "bundled" extensions and those on PECL
(http://pecl.php.net). If what you're looking at would make sense as a
group of functions / classes in its own right, it might be wise to work
on it first as an independent extension on PECL. This gives you the
freedom to present a proof of concept, release early and often, and make
breaking changes based on experience with early adopters. Once it's
mature, you can ask for it to be adopted into core, where you could
remain as maintainer, but be constrained by the release process and
compatibility promises of the main project.
If it's a more natural fit for an existing extension, though, or more of
a low-level implementation issue, I'd suggest going ahead and proposing
it, and being open to suggestions of how best to proceed for that
particular case.
As for platform-specific features, there certainly are functions, and
entire bundled extensions, that are platform-specific. Quickly glancing
for obvious examples, I can see that ext/com_dotnet is Windows-only,
while ext/posix is unavailable on Windows. Where possible, functionality
is emulated such that it is available on as many platforms as possible,
even if this means degraded functionality (uniqid() is an example that
springs to mind), but sometimes you just want access to a feature that's
unique to one platform.
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php