tencent cloud

All product documents
Serverless Cloud Function
Runtime Environment
Last updated: 2025-02-12 17:34:45
Runtime Environment
Last updated: 2025-02-12 17:34:45

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、
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, sockets, exif, tidy, tokenizer, xml, xmlreader, xmlwriter, zip, eio, memcached, imagick, mongodb, protobuf, redis, swoole, Zend OPcache, runtime
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, runtime
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, protobuf, redis, Zend OPcache, runtime

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon