[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-bugs
Subject: [DOC-BUGS] Doc #63869 [Com]: preg_split examples 1&2 are missing expected output
From: "mail+php at requinix dot net" <php-bugs () lists ! php ! net>
Date: 2012-12-31 21:41:44
Message-ID: E1Tpn7A-000181-Fo () sgrv2 ! php ! net
[Download RAW message or body]
Edit report at https://bugs.php.net/bug.php?id=63869&edit=1
ID: 63869
Comment by: mail+php at requinix dot net
Reported by: news at globtek dot com
Summary: preg_split examples 1&2 are missing expected output
Status: Open
Type: Documentation Problem
Package: *Regular Expressions
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[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
--
PHP Documentation Bugs Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic