defined( $constant_name ) ? constant( $constant_name ) : null; } /** * @deprecated @see \WPML_PHP_Functions * @param string $function_name The function name, as a string. * * @return bool true if function_name exists and is a function, false otherwise. * This function will return false for constructs, such as include_once and echo. * @return bool */ public function function_exists( $function_name ) { return function_exists( $function_name ); } /** * @deprecated @see \WPML_PHP_Functions * @param string $class_name The class name. The name is matched in a case-insensitive manner. * @param bool $autoload [optional] Whether or not to call &link.autoload; by default. * * @return bool true if class_name is a defined class, false otherwise. * @return bool */ public function class_exists( $class_name, $autoload = true ) { return class_exists( $class_name, $autoload ); } /** * @deprecated @see \WPML_PHP_Functions * @param string $name The extension name * * @return bool true if the extension identified by name is loaded, false otherwise. */ public function extension_loaded( $name ) { return extension_loaded( $name ); } /** * @deprecated @see \WPML_PHP_Functions * @param $string * * @return string */ public function mb_strtolower( $string ) { if ( function_exists( 'mb_strtolower' ) ) { return mb_strtolower( $string ); } return strtolower( $string ); } /** * @deprecated @see \WPML_PHP_Functions * Wrapper for \phpversion() * * * @param string $extension (optional) * * @return string */ public function phpversion( $extension = null ) { if ( defined( 'PHP_VERSION' ) ) { return PHP_VERSION; } else { return phpversion( $extension ); } } /** * @deprecated @see \WPML_PHP_Functions * Compares two "PHP-standardized" version number strings * @see \WPML_WP_API::version_compare * * @param string $version1 * @param string $version2 * @param null $operator * * @return mixed */ public function version_compare( $version1, $version2, $operator = null ) { return version_compare( $version1, $version2, $operator ); } /** * @param array $array * @param int $sort_flags * * @return array */ public function array_unique( $array, $sort_flags = SORT_REGULAR ) { return wpml_array_unique( $array, $sort_flags ); } /** * @deprecated @see \WPML_PHP_Functions * @param string $message * @param int $message_type * @param string $destination * @param string $extra_headers * * @return bool */ public function error_log( $message, $message_type = null, $destination = null, $extra_headers = null ) { return error_log( $message, $message_type, $destination, $extra_headers ); } }