<?php
/**
* Check whether the current php-armadillo build supports certain feature.
*
* @param bool $feature
* @param string $msg
* @return bool
*/
function arma_supports($feature, $msg) {
if (!$feature) {
echo "skip $msg is not supported.";
return false;
}
return true;
* Check whether operator overloading is supported.
function supports_operator_overloading() {
return arma_supports(Arma\Features::OPERATORS, 'operator overloading');
* Check whether HDF5 data format is supported.
function supports_hdf5() {
return arma_supports(Arma\Features::HDF5, 'HDF5 data format');