PHP_Compat::loadVersion

PEAR Manual


PHP_CompatInfo::loadVersion

PHP_CompatInfo::loadVersion() -- Load components list

Synopsis

    require_once 'PHP/CompatInfo.php';
   

array PHP_CompatInfo::loadVersion ( string $min , string|boolean $max = FALSE , boolean $include_const = FALSE )

Description

Load components list for a PHP version or subset

Parameter

string $min

PHP minimal version

string|boolean $max

(optional) PHP maximal version

boolean $include_const

(optional) include constants list in final result

Return value

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

throws no exceptions thrown

Since

since version 1.2.0 (2006-08-23)

Note

This function can not be called statically.

Example

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 24 functions
array (
  0 => 'cachingiterator::count',
  1 => 'directoryiterator::getbasename',
  2 => 'imagegrabscreen',
  3 => 'imagegrabwindow',
  4 => 'ming_setswfcompression',
  5 => 'mysql_set_charset',
  6 => 'openssl_pkcs12_export',
  7 => 'openssl_pkcs12_export_to_file',
  8 => 'openssl_pkcs12_read',
  9 => 'php_ini_loaded_file',
  10 => 'reflectionextension::info',
  11 => 'regexiterator::setpregflags',
  12 => 'splfileinfo::getbasename',
  13 => 'splfileinfo::getlinktarget',
  14 => 'splfileinfo::getrealpath',
  15 => 'splobjectstorage::serialize',
  16 => 'splobjectstorage::unserialize',
  17 => 'stream_is_local',
  18 => 'stream_socket_shutdown',
  19 => 'swfmovie::namedanchor',
  20 => 'swfmovie::protect',
  21 => 'swfmovie::remove',
  22 => 'sys_get_temp_dir',
  23 => 'tidynode::getparent',
)
   




PHP_Compat::loadVersion

PEAR Manual