cvs: peardoc /en/package/php/php-compatinfo/php-compatinfo loadversion.xml

From: Date: Sun, 10 Feb 2008 20:13:16 +0000
Subject: cvs: peardoc /en/package/php/php-compatinfo/php-compatinfo loadversion.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-10469@lists.php.net to get a copy of this message
farell Sun Feb 10 20:13:16 2008 UTC Modified files: /peardoc/en/package/php/php-compatinfo/php-compatinfo loadversion.xml Log: on PHP_CompatInfo API 1.6.0, there are : - loadversion() with new parameter - 2 new usage examples http://cvs.php.net/viewvc.cgi/peardoc/en/package/php/php-compatinfo/php-compatinfo/loadversion.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/en/package/php/php-compatinfo/php-compatinfo/loadversion.xml diff -u peardoc/en/package/php/php-compatinfo/php-compatinfo/loadversion.xml:1.1 peardoc/en/package/php/php-compatinfo/php-compatinfo/loadversion.xml:1.2 --- peardoc/en/package/php/php-compatinfo/php-compatinfo/loadversion.xml:1.1 Tue Jan 22 18:50:55 2008 +++ peardoc/en/package/php/php-compatinfo/php-compatinfo/loadversion.xml Sun Feb 10 20:13:16 2008 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.php.php-compatinfo.php-compatinfo.loadversion"> <refnamediv> <refname><function>PHP_CompatInfo::loadVersion</function></refname> @@ -14,6 +14,7 @@ <funcdef>array <function>PHP_CompatInfo::loadVersion</function></funcdef> <paramdef>string <parameter>$min</parameter></paramdef> <paramdef>string|boolean <parameter> <optional>$max = &false;</optional></parameter></paramdef> + <paramdef>boolean <parameter> <optional>$include_const = &false;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -51,6 +52,17 @@ </para> </listitem> </varlistentry> + <varlistentry> + <term> + <type>boolean</type> + <parameter>$include_const</parameter> + </term> + <listitem> + <para> + (optional) include constants list in final result + </para> + </listitem> + </varlistentry> </variablelist> </para> </refsect1> @@ -58,7 +70,12 @@ <refsect1 id="package.php.php-compatinfo.php-compatinfo.loadversion.returns"> &title.returns; <para> - <emphasis>returns</emphasis> An array of php function names to ignore + <emphasis>returns</emphasis> An array of php function available in version(s) given + </para> + <para> + <emphasis>returns</emphasis> A mixed array of php function + php constants + available in version(s) given. Available with parameter #3 ($include_const) + since API 1.6.0 </para> </refsect1> @@ -81,6 +98,81 @@ &title.note; &note.notstatic; </refsect1> + + <refsect1 id="package.php.php-compatinfo.php-compatinfo.loadversion.example"> + &title.example; + <para> + What's new with PHP version 4.3.10 ? + <programlisting role="php"> + <![CDATA[ +<?php +require_once 'PHP/CompatInfo.php'; + +$pci = new PHP_CompatInfo(); +$res = $pci->loadVersion('4.3.10', '4.3.10', true); +var_export($res); +?> + ]]> + </programlisting> + Result give: 0 function and 2 constants + <screen> +array ( + 'functions' => + array ( + ), + 'constants' => + array ( + 0 => 'PHP_EOL', + 1 => 'UPLOAD_ERR_NO_TMP_DIR', + ), +) + </screen> + </para> + + <para> + What's new since PHP version 5.2.1 ? + <programlisting role="php"> + <![CDATA[ +<?php +require_once 'PHP/CompatInfo.php'; + +$pci = new PHP_CompatInfo(); +$res = $pci->loadVersion('5.2.1'); +var_export($res); +?> + ]]> + </programlisting> + Result give 24 functions + <screen> +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', +) + </screen> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables:

« previous php.pear.doc (#10469) next »