diff options
author | Brian Shire <shire@php.net> | 2008-12-27 05:13:30 +0000 |
---|---|---|
committer | Brian Shire <shire@php.net> | 2008-12-27 05:13:30 +0000 |
commit | d6a1c7a6743ced3e8cbacfabf7d436f528c50cad (patch) | |
tree | 987abc964a89adaced741ff18d5f1dcff8071054 /ext/standard/tests/strings | |
parent | 3b0cd9f64408edb3dbc91e93c24a6d6b54572134 (diff) | |
download | php-git-d6a1c7a6743ced3e8cbacfabf7d436f528c50cad.tar.gz |
fix explode behavior to respect negative limit when string is empty.
Diffstat (limited to 'ext/standard/tests/strings')
-rw-r--r-- | ext/standard/tests/strings/explode.phpt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/standard/tests/strings/explode.phpt b/ext/standard/tests/strings/explode.phpt index 44f5846f05..2ed242a247 100644 --- a/ext/standard/tests/strings/explode.phpt +++ b/ext/standard/tests/strings/explode.phpt @@ -18,6 +18,7 @@ var_dump(@explode("a", NULL)); var_dump(@explode(NULL, a)); var_dump(@explode("abc", "acb")); var_dump(@explode("somestring", "otherstring")); +var_dump(@explode("somestring", "otherstring", -1)); var_dump(@explode("a", "aaaaaa")); var_dump(@explode("==", str_repeat("-=".ord(0)."=-", 10))); var_dump(@explode("=", str_repeat("-=".ord(0)."=-", 10))); @@ -64,6 +65,8 @@ array(1) { [0]=> unicode(11) "otherstring" } +array(0) { +} array(7) { [0]=> unicode(0) "" |