array PHP_CompatInfo::loadVersion (
string $min
, string|boolean $max
= false
, boolean $include_const
= false
, boolean $groupby_vers
= false
)
Load components list for a PHP version or subset
$min
PHP minimal version
$max
(optional) PHP maximal version
$include_const
(optional) include constants list in final result
$groupby_vers
(optional) give initial php version of function or constant
returns An array of php function available in version(s) given
returns A mixed array of php function + php constants available in version(s) given. Available with parameter #3 ($include_const) since API 1.6.0
throws no exceptions thrown
since version 1.2.0 (2006-08-23)
This function can not be called statically.
What's new with PHP version 4.3.10 ?
<?php
require_once 'PHP/CompatInfo.php';
$pci = new PHP_CompatInfo();
$res = $pci->loadVersion('4.3.10', '4.3.10', true);
var_export($res);
?>
Result give: 0 function and 2 constants
array ( 'functions' => array ( ), 'constants' => array ( 0 => 'PHP_EOL', 1 => 'UPLOAD_ERR_NO_TMP_DIR', ), )
What's new since PHP version 5.2.1 ?
<?php
require_once 'PHP/CompatInfo.php';
$pci = new PHP_CompatInfo();
$res = $pci->loadVersion('5.2.1');
var_export($res);
?>
Result give only 4 functions (with default Extension Support List provided by version 1.9.0 of PHP_CompatInfo). Depending of your Extension Support List, this result can be different.
array ( 0 => 'php_ini_loaded_file', 1 => 'stream_is_local', 2 => 'stream_socket_shutdown', 3 => 'sys_get_temp_dir', )