array_init(return_value);
if ( str_len == 0 ) {
- if ( str_type == IS_UNICODE ) {
- add_next_index_unicodel(return_value, USTR_MAKE(""), sizeof("")-1, 0);
- } else {
- add_next_index_stringl(return_value, "", sizeof("")-1, 1);
+ if (limit >= 0 || argc == 2) {
+ if ( str_type == IS_UNICODE ) {
+ add_next_index_unicodel(return_value, USTR_MAKE(""), sizeof("")-1, 0);
+ } else {
+ add_next_index_stringl(return_value, "", sizeof("")-1, 1);
+ }
}
return;
}
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)));
[0]=>
unicode(11) "otherstring"
}
+array(0) {
+}
array(7) {
[0]=>
unicode(0) ""