ID: 47546 Updated by: [email protected] Reported By: jordi dot salvat at localbilinglimited dot com -Status: Open +Status: Closed -Bug Type: Documentation problem +Bug Type: Strings related Operating System: Irrelevant -PHP Version: Irrelevant +PHP Version: 5.2.9 -Assigned To: +Assigned To: kalle New Comment:
This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Fixed in PHP 5.2.10 Previous Comments: ------------------------------------------------------------------------ [2009-03-02 17:25:26] jordi dot salvat at localbilinglimited dot com Description: ------------ http://es.php.net/explode declares that the default value for the 3rd parameter of the explode function is -1. The function, however, behaves differently when -1 is passed explicitly. Reproduce code: --------------- php <<'__END__' <?php $str = 'one|two|three|four'; print_r(explode('|', $str)); print_r(explode('|', $str, -1)); ?> __END__ Expected result: ---------------- >From the documentation, I would expect to see the same result twice. Actual result: -------------- Array ( [0] => one [1] => two [2] => three [3] => four ) Array ( [0] => one [1] => two [2] => three ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47546&edit=1
