On Thu, Nov 2, 2023 at 11:11 PM <dan...@daniil.it> wrote:

> 1) Not all POSIX functions are currently exposed by the POSIX extension,
> sysconf being one of the missing ones (with IMO no good reason to add it)
>

It is exposed:
https://github.com/php/php-src/blob/66e2aa725564c2221ace7a26628afe3957f28237/ext/posix/posix.c#L1232-L1241

Also we already define some SC constants so the only that is needed for
this is just adding a constant which is a very easy thing to do.


>
> 2) I am not aware of the historical reasons that lead to the addition of a
> duplicated, less capable function to the POSIX standard (I'm super duper
> sure there's some reason related to an implementation detail of some 30+
> year-old platform :), but PHP isn't a POSIX-compliant OS, it is not PHP's
> task to expose the entirety of the POSIX standard functions: PHP's task is
> to provide a simple to use language that also exposes some *useful*
> functions from the POSIX standard, and posix_times does not fit the
> definition, in my opinion.
>

But this is a posix extension which sole purpose is to expose POSIX
functions. The extension is available only on POSIX systems. We are not
talking about function in standard extension. In such case I would share
your sentiment but this is a completely different matter.

Cheers

Jakub

Reply via email to