Doc #63869 [Com]: preg_split examples 1&2 are missing expected output

From: Date: Mon, 31 Dec 2012 21:41:44 +0000
Subject: Doc #63869 [Com]: preg_split examples 1&2 are missing expected output
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9335@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 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

« previous php.doc.bugs (#9335) next »