File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / gd / tests / func.inc
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:31:52 2013 UTC (11 years, 3 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

<?php

function get_gd_version()
{
	return GD_VERSION;
}

function get_php_info()
{
	ob_start();
	phpinfo();
	$info = ob_get_contents();
	ob_end_clean();

	return $info;
}

function get_freetype_version()
{
	$version = 0;
	
	if (preg_match(',FreeType Version => (\d+\.\d+\.\d+),s', get_php_info(), $match)) {
		$version = $match[1];
	}
	
	return $version;
}

function get_libjpeg_version()
{
	$version = 0;
	
	if (preg_match(',libJPEG Version => ([a-z0-9]+),s', get_php_info(), $match)) {
		$version = $match[1];
	}
	
	return $version;
}

function get_libpng_version()
{
	$version = 0;
	
	if (preg_match(',libPNG Version => (\d+\.\d+\.\d+),s', get_php_info(), $match)) {
		$version = $match[1];
	}
	
	return $version;
}

function get_libxpm_version()
{
	$version = 0;
	
	if (preg_match(',libXpm Version => (\d+),s', get_php_info(), $match)) {
		$version = $match[1];
	}
	
	return $version;
}


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>