cvs: peardoc /en/package/php/php-compat intro.xml

From: Date: Fri, 04 Jun 2004 09:44:56 +0000
Subject: cvs: peardoc /en/package/php/php-compat intro.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4211@lists.php.net to get a copy of this message
aidan Fri Jun 4 05:44:56 2004 EDT Modified files: /peardoc/en/package/php/php-compat intro.xml Log: Added example tags http://cvs.php.net/diff.php/peardoc/en/package/php/php-compat/intro.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/en/package/php/php-compat/intro.xml diff -u peardoc/en/package/php/php-compat/intro.xml:1.4 peardoc/en/package/php/php-compat/intro.xml:1.5 --- peardoc/en/package/php/php-compat/intro.xml:1.4 Fri Jun 4 00:59:00 2004 +++ peardoc/en/package/php/php-compat/intro.xml Fri Jun 4 05:44:56 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="package.php.php-compat.intro"> <refnamediv> <refname>Introduction</refname> @@ -13,6 +13,8 @@ PHP_Compat provides missing functionality in the form of functions and constants for older versions of PHP. PHP_Compat is very easy to use. To load a function, e.g. <emphasis>file_get_contents()</emphasis> added in PHP5, add the code: + <example> + <title>Loading a component with the class:</title> <programlisting role="php"> <![CDATA[ require_once 'PHP/Compat.php'; @@ -20,14 +22,19 @@ PHP_Compat::loadFunction('file_get_contents'); ]]> </programlisting> +</example> Or, if you don't wish to use the class, simply: + <example> + <title>Loading a component manually:</title> + <programlisting role="php"> <![CDATA[ require_once 'PHP/Compat/Function/file_put_contents.php'; ]]> </programlisting> +</example> The function is then ready to use like you would normally. </para>

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