On Mar 23, 2020, at 1:51 PM, Ben Ramsey <b...@benramsey.com> wrote:

> > I think Rowan is making the point that *most* of the features found in
> the core PHP distribution are *optional*. Distributions and hosts are
> choosing to enable them. There are very few things in the core distribution
> that cannot be disabled at build time.
> >
> > I’ve run into this numerous times in my userland OSS libraries. It came
> up recently with the ctype functions. Someone’s host had these disabled,
> for whatever reason, so I had to use a polyfill library to provide the
> functionality, for those cases.
>


Thank you, yes, that's exactly what I'm saying. PHP is, right now, a
modular product.

As long as that's true, there will be hosts who disable features you wish
they wouldn't. Some of those can be polyfilled directly (e.g. ctype), some
have to be painfully worked around (e.g. curl), and some are pretty much
impossible because no userland equivalent exists.


On Mon, 23 Mar 2020 at 18:09, Mike Schinkel <m...@newclarity.net> wrote:

> Which makes an even stronger case for why a userland accessible extension
> mechanism is needed.
>


If you're using a fully-managed hosting service, you will always be
severely limited in what you can enable or install - some of the WordPress
hosts you listed don't even let you upload arbitrary PHP, only vetted
WordPress themes and plugins.

If you're using a more flexible shared hosting service, the problem might
instead be that the host lets you run arbitrary userland code but not
switch on extra extensions. In that case, features that make more things
possible from userland would be useful for those extensions which can't
currently be polyfilled. The challenge would be getting something flexible
enough to be more useful than just writing normal PHP, but secure, stable,
and sandboxed enough that shared hosts would let you mess around with it.

Regarding choice of language for that mechanism, I'm not sure we need to
look any further than PHP itself: what we're really talking about is making
facilities available to the average user that are currently only available
to extension developers. We've already made huge strides in one big
advantage, which is speed - if they were starting today, I wonder if the
Phalcon team would bother inventing Zephir, or if they'd just design the
framework with OpCache pre-loading in mind.


Regards,
-- 
Rowan Tommins
[IMSoP]

Reply via email to