Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: CairoSvgSurface::getVersions - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: CairoSvgSurface::getVersions

2025-05-18

CairoSvgSurface::getVersions

cairo_svg_surface_get_versions

(PECL cairo >= 0.1.0)

CairoSvgSurface::getVersions -- cairo_svg_surface_get_versionsUsed to retrieve a list of supported SVG versions

说明

面向对象风格 (method):

public static CairoSvgSurface::getVersions ( void ) : array

过程化风格:

cairo_svg_get_versions ( void ) : array

Returns a numerically indexed array of currently available CairoSvgVersion constants. In order to retrieve the string values for each item, use CairoSvgSurface::versionToString().

参数

此函数没有参数。

返回值

Returns a numerically indexed array of integer values.

范例

Example #1 CairoSvgSurface::getVersions() example

<?php
/* Grab our list of versions */
$versions CairoSvgSurface::getVersions();
var_dump($versions);

/* echo the string name of each version */
foreach($versions as $id) {
    echo 
CairoSvgSurface::versionToString($id), PHP_EOL;
}
?>

以上例程的输出类似于:

array(2) {
  [0]=>
  int(0)
  [1]=>
  int(1)
}
SVG 1.1
SVG 1.2

Example #2 过程化风格

<?php
/* Grab our list of versions */
$versions cairo_svg_surface_get_versions();
var_dump($versions);

/* echo the string name of each version */
foreach($versions as $id) {
    echo 
cairo_svg_surface_version_to_string($id), PHP_EOL;
}
?>

以上例程的输出类似于:

array(2) {
  [0]=>
  int(0)
  [1]=>
  int(1)
}
SVG 1.1
SVG 1.2

参见

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/cairosvgsurface.getversions.php

冷却塔厂家 广告
中文GPT4.0无需注册 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3