public static function export($value)
	{
		if (!is_scalar($value))
		{
			throw new InvalidArgumentException(__METHOD__ . '() cannot export non-scalar values');
		}
		if (is_int($value))
		{
			return (string) $value;
		}
		if (is_float($value))
		{
			// Avoid locale issues by using sprintf()
			return preg_replace('(\\.?0+$)', '', sprintf('%F', $value));
		}

		return self::exportString((string) $value);
	}
public static function export($value)
	{
		if (!is_scalar($value))
		{
			throw new InvalidArgumentException(__METHOD__ . '() cannot export non-scalar values');
		}
		if (is_int($value))
		{
			return (string) $value;
		}
		if (is_float($value))
		{
			// Avoid locale issues by using sprintf()
			return preg_replace('(\\.?0+$)', '', sprintf('%F', $value));
		}

		return self::exportString((string) $value);
	}
public static function export ( $ value ) { if ( ! is_scalar ( $ value ) ) { throw new InvalidArgumentException ( __METHOD__ . '() cannot export non-scalar values' ) ; } if ( is_int ( $ value ) ) { return ( string ) $ value ; } if ( is_float ( $ value ) ) { // Avoid locale issues by using sprintf() return preg_replace ( '(\\.?0+$)' , '' , sprintf ( '%F' , $ value ) ) ; } return self :: exportString ( ( string ) $ value ) ; }
Export a literal as an XPath expression

@param  mixed  $value Literal, e.g. "foo"
@return string        XPath expression, e.g. "'foo'"
Export a literal as an XPath expression