svn: /phpdoc/en/trunk/reference/pcre/functions/ preg-split.xml

From: Date: Sat, 12 Jan 2013 00:11:56 +0000
Subject: svn: /phpdoc/en/trunk/reference/pcre/functions/ preg-split.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-10914@lists.php.net to get a copy of this message
frozenfire Sat, 12 Jan 2013 00:11:56 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=329086 Log: Added example output for examples 1 and 2. Contribution by Ole Aass. Closes bug #63869. Bug: https://bugs.php.net/63869 (Open) preg_split examples 1&2 are missing expected output Changed paths: U phpdoc/en/trunk/reference/pcre/functions/preg-split.xml Modified: phpdoc/en/trunk/reference/pcre/functions/preg-split.xml =================================================================== --- phpdoc/en/trunk/reference/pcre/functions/preg-split.xml 2013-01-11 23:20:03 UTC (rev 329085) +++ phpdoc/en/trunk/reference/pcre/functions/preg-split.xml 2013-01-12 00:11:56 UTC (rev 329086) @@ -146,9 +146,20 @@ // split the phrase by any number of commas or space characters, // which include " ", \r, \t, \n and \f $keywords = preg_split("/[\s,]+/", "hypertext language, programming"); -?> +print_r($keywords); ]]> </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Array +( + [0] => hypertext + [1] => language + [2] => programming +) +]]> + </screen> </example> </para> <para> @@ -160,9 +171,22 @@ $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); -?> ]]> </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Array +( + [0] => s + [1] => t + [2] => r + [3] => i + [4] => n + [5] => g +) +]]> + </screen> </example> </para> <para>

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