Doc #63869 [Opn->Csd]: preg_split examples 1&2 are missing expected output
| From: | frozenfire@php.net | Date: | Sat, 12 Jan 2013 00:12:57 +0000 |
| Subject: | Doc #63869 [Opn->Csd]: preg_split examples 1&2 are missing expected output | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9381@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63869&edit=1
ID: 63869
Updated by: frozenfire@php.net
Reported by: news at globtek dot com
Summary: preg_split examples 1&2 are missing expected output
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: *Regular Expressions
PHP Version: Irrelevant
-Assigned To:
+Assigned To: frozenfire
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2013-01-12 00:11:55] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
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.
------------------------------------------------------------------------
[2012-12-31 21:41:44] mail+php at requinix dot net
Did you know you can submit changes to the online documentation? Look for the edit
link in the top-right corner of manual pages.
Created a patch.
http://edit.php.net/?patchID=795&project=PHP
------------------------------------------------------------------------
[2012-12-28 19:21:09] news at globtek dot com
Description:
------------
---
From manual page: http://www.php.net/function.preg-split#refsect1-function.preg-
split-examples
---
Examples 1&2 for the preg_split documentation page are missing the "The above
example will output" section underneath. It's still useful to see the output
without trying to figure out what the comment is talking about.
The output is included in the expected result section
Test script:
---------------
code examples ran:
example 1:
$keywords = preg_split("/[\s,]+/", "hypertext language, programming");
print_r($keywords);
example 2:
$str = 'string';
$chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
print_r($chars);
Expected result:
----------------
Example 1 expected output:
Array
(
[0] => hypertext
[1] => language
[2] => programming
)
example 2 expected output:
Array
(
[0] => s
[1] => t
[2] => r
[3] => i
[4] => n
[5] => g
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63869&edit=1