[TASK] Use PHP_SAPI, PHP_VERSION and M_PI constant instead of functons calls