diff --git a/src/base.cc b/src/base.cc index 2c7fcb5..9d3df0a 100644 --- a/src/base.cc +++ b/src/base.cc @@ -160,7 +160,11 @@ namespace php_arma void base_init() { - base_ce = interface_register(zend_ce_countable); + base_ce = interface_register( +#if PHP_VERSION_ID >= 70200 + zend_ce_countable +#endif + ); } PHP_ARMA_INSTANTIATE(base, mat); diff --git a/src/constants.cc b/src/constants.cc index cd7c790..fdf74a8 100644 --- a/src/constants.cc +++ b/src/constants.cc @@ -81,7 +81,8 @@ namespace php_arma ); #endif // ARMA_USE_HDF5 const_declare(features_ce = abstract_class_register(), - std::tuple("OPERATORS", features::operators) + std::tuple("OPERATORS", features::operators), + std::tuple("HDF5", features::hdf5) ); } } diff --git a/stubs/Features.php b/stubs/Features.php index 953dbef..ad0e61c 100644 --- a/stubs/Features.php +++ b/stubs/Features.php @@ -15,4 +15,9 @@ abstract class Features * Whether operator overloading is supported. */ const OPERATORS = true; + + /** + * Whether data can be saved into or loaded from files in HDF5 format. + */ + const HDF5 = true; }