Environment Description

Last updated: 2023-09-27 21:31:23

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 do not meet your business requirements, you can install custom extensions as per Dependency Installation. You can view the installed extensions in the function by running print_r(get_loaded_extensions());.
The currently installed PHP extensions are listed below:

PHP 8.0、PHP 7.4

Core
runkit7
date
libxml
openssl
pcre
sqlite3
zlib
bcmath
calendar
ctype
curl
dom
hash
fileinfo
filter
ftp
gd
SPL
iconv
intl
json
mbstring
session
standard
mysqlnd
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
mysqli
SimpleXML
soap
exif
tokenizer
xml
xmlreader
xmlwriter
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