Install SPL_Types on PHP 7.1 compiled from source
Asked Answered
E

1

5

I am trying to install SPL_Types extension in my PHP 7.1.8 compiled from source.

I have tried with sudo pecl install SPL_Types and compiling the extension from source, but I get the following output:

https://mega.nz/#!WE5WjajQ!QyVxMYWrsUiDF6Gq09psYBpR5Y336v26PusnlBNd8bg

I know it's not cool to post links, but I was not able to put the hole output here.

Exegete answered 28/8, 2017 at 2:54 Comment(0)
H
7

This extension is outdated now and cannot be build with PHP 7.x. Latest version of this lib released at 2012 and supports only PHP 5.4. Native scalar type declarations support makes this extension mostly useless (maybe except for SplEnum).

With PHP 7.x many of internal PHP API was have significantly changed. As you can see in the attached output, source code of the extension uses dozens of outdated APIs (most of errors caused by missing macros, wrong data types, etc).

For the extension to be built with the new version, it must be updated accordingly: Upgrading PHP extensions from PHP5 to NG. If you are not familiar with C you can try to use unofficial fork or polyfill.

Heredia answered 28/8, 2017 at 12:27 Comment(1)
Thanks for the complete answer. I wanted to use SplEnum. I'll take a look into your links.Exegete

© 2022 - 2024 — McMap. All rights reserved.