Description
This function lists the system's PHP versions.
Examples
cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/LangPHP/php_get_installed_versions
LiveAPI PHP Class
$cpanel
=
new
CPANEL();
$php_get_installed_versions
=
$cpanel
->uapi(
'LangPHP'
,
'php_get_installed_versions'
);
LiveAPI Perl Module
my
$cpliveapi
= Cpanel::LiveAPI->new();
my
$php_get_installed_versions
=
$cpliveapi
->uapi(
'LangPHP'
,
'php_get_installed_versions'
,
);
cPanel Template Toolkit
[% execute( 'LangPHP', 'php_get_installed_versions' ) %]
Command Line
uapi --user=username LangPHP php_get_installed_versions
|
Output (JSON)
{
"messages":null,
"errors":null,
"status":1,
"metadata":{
},
"data":{
"versions":[
"ea-php54",
"ea-php55",
"ea-php56"
]
}
}
Parameters
This function does not accept parameters.
Returns
Return
|
Type
|
Description
|
Possible values
|
Example
|
versions
|
array
|
The installed PHP versions.
|
- ea-php53
- ea-php54
- ea-php55
- ea-php56
- Any custom PHP package name.
|
ea-php54
|