|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-10-10 13:24 UTC] lange at haas-media dot de
$test = 'This is a text with an $id inside';
$matches = preg_split('#(\$[a-z]*)#', $test,
PREG_SPLIT_DELIM_CAPTURE);
echo '<pre>';
print_r($matches);
echo '</pre>';
expected output:
Array
(
[0] => "This is a text with an "
[1] => $id
[2] => " inside"
)
output produced in the real world:
Array
(
[0] => "This is a text with an "
[1] => " inside"
)
maybe this will help to hunt the bug down.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
$test = 'This is a text with an $id inside'; $matches = preg_split('#(\$[a-z]*)#', $test, PREG_SPLIT_DELIM_CAPTURE); echo '<pre>'; print_r($matches); echo '</pre>'; expected output: Array ( [0] => "This is a text with an " [1] => $id [2] => " inside" ) output produced in the real world: Array ( [0] => "This is a text with an " [1] => " inside" ) maybe this will help to hunt the bug down. -- edit important note: actually no bug at all, missed the limit param. --- a wise man said: do not report a bug after a hard 10 hour work day.