tencent cloud

Serverless Cloud Function

Runtime Environment

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-05-14 15:15:03

PHP Version Selection

Currently, SCF supports the following versions of PHP programming language:
PHP 8.0
PHP 7.4
PHP 7.2
PHP 5.6
You can choose a desired runtime environment when creating a function, such as PHP 8.0, 7.4, 7.2, or 5.6.

Environment Variables

The PHP environment variables built in the current PHP 8.0 and 7.4 runtime environments are as shown in the table below:
Environment Variable Key
Specific Value or Value Source
PHP_INI_SCAN_DIR
/opt/php_extension:/var/user/php_extension
The PHP environment variables built in the current PHP 7.2 and 5.6 runtime environments are as shown in the table below:
Environment Variable Key
Specific Value or Value Source
PHP_INI_SCAN_DIR
/var/user/php_extension:/opt/php_extension
For more information on environment variables, see Environment Variables.

List of Built-in Extensions

Note:
For PHP 7.4 and later, the platform no longer has additional built-in dependency libraries. For more information on the dependencies required by code execution, see Dependency Installation.
If the built-in extensions cannot meet your business requirements, you can install custom extensions as instructed in Dependency Installation. You can print and view the installed extensions at any time by using the print_r(get_loaded_extensions()); code.
The currently installed PHP extensions are listed below:
PHP Versions
PHP Extensions
PHP 8.0
Core, runkit7, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, json, mbstring, session, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysqli, SimpleXML, soap, exif, tokenizer, xml, xmlreader, xmlwriter, runtime, swoole
PHP 7.4
Core, runkit7, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, json, mbstring, session, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysqli, SimpleXML, soap, exif, tokenizer, xml, xmlreader, xmlwriter, swoole
PHP 7.2
Core, runkit7, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, json, mbstring, session, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysqli, SimpleXML, soap, sockets, exif, tidy, tokenizer, xml, xmlreader, xmlwriter, zip, eio, memcached, imagick, mongodb, protobuf, redis, swoole, Zend OPcache
PHP 5.6
Core, runkit, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, json, mbstring, session, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysqli, SimpleXML, soap, sockets, exif, tidy, tokenizer, xml, xmlreader, xmlwriter, zip, eio, memcached, imagick, mongodb, swoole, protobuf, redis, Zend OPcache


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백