Re: cvs: phpdoc /en/reference/var/functions is-binary.xml is-buffer.xml is-object.xml is-unicode.xml

From: Date: Tue, 14 Oct 2008 08:25:22 +0000
Subject: Re: cvs: phpdoc /en/reference/var/functions is-binary.xml is-buffer.xml is-object.xml is-unicode.xml
References: 1  Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2231@lists.php.net to get a copy of this message
On Tue, Oct 14, 2008 at 01:35, Kalle Sommer Nielsen <kalle@php.net> wrote: > kalle Mon Oct 13 23:35:15 2008 UTC > > Modified files: > /phpdoc/en/reference/var/functions is-binary.xml is-buffer.xml > is-object.xml is-unicode.xml > Log: > Added examples for: > * is_binary > * is_buffer > * is_object > * is_unicode > > > http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/is-buffer.xml?r1=1.2&r2=1.3&diff_format=u > Index: phpdoc/en/reference/var/functions/is-buffer.xml > diff -u phpdoc/en/reference/var/functions/is-buffer.xml:1.2 > phpdoc/en/reference/var/functions/is-buffer.xml:1.3 > --- phpdoc/en/reference/var/functions/is-buffer.xml:1.2 Wed Jun 20 22:25:34 2007 > +++ phpdoc/en/reference/var/functions/is-buffer.xml Mon Oct 13 23:35:15 2008 > @@ -1,5 +1,5 @@ > <?xml version="1.0" encoding="iso-8859-1"?> > -<!-- $Revision: 1.2 $ --> > +<!-- $Revision: 1.3 $ --> > <refentry xml:id="function.is-buffer" > xmlns="http://docbook.org/ns/docbook"> > <refnamediv> > <refname>is_buffer</refname> > @@ -42,6 +42,52 @@ > &false; otherwise. > </para> > </refsect1> > + > + <refsect1 role="examples"> > + &reftitle.examples; > + <para> > + <example> > + <title><function>is_buffer</function> example</title> > + <programlisting role="php"> > +<![CDATA[ > +<?php > +// Declare some variables with different types > +$types = Array( lowercase array() please. > + 'unicode' => 'Unicode string', > + 'binary' => b'Binary string', > + 'resource' => fopen('php://stdin', > 'r'), > + 'integer' => 42 > + ); > + > +// Test which types thats a buffer > +foreach($types as $type => $value) > +{ > + if(is_buffer($value)) > + { > + echo $type . ' is a either a unicode or binary string'; > + } And this doesn't look like the PEAR CS... -Hannes

« previous php.doc.cvs (#2231) next »