diff options
author | Thies C. Arntzen <thies@php.net> | 1999-10-04 13:04:32 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 1999-10-04 13:04:32 +0000 |
commit | 008810dc294f9870b8c53b7d5cf1b9fa41b1f65f (patch) | |
tree | 16f6d7cdbdaf15dd5ac53ff73c96dfe284da6068 | |
parent | 8266f8a5152ad63ce6293f9964694b83db40d237 (diff) | |
download | php-git-008810dc294f9870b8c53b7d5cf1b9fa41b1f65f.tar.gz |
ereg now returns a continious array 0..9 again - empty values are returned as false.
i think this is *more* compatible with PHP3 - unless anybody really dislikes it i'd prefer it like this.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | ext/ereg/ereg.c | 2 | ||||
-rw-r--r-- | ext/standard/reg.c | 2 |
3 files changed, 5 insertions, 0 deletions
@@ -2,6 +2,7 @@ PHP 4.0 CHANGE LOG ChangeLog ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ?? 1999, Version 4.0 Beta 3 +- Fixed backwards incompatibility with ereg() (Thies) - Updated Zend garbage collection with a much more thorough method. (Andi, Zend library) - Added the ability to use variable references in the array() construct. diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index 6382cfd739..c9f84ed973 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -261,6 +261,8 @@ static void _php3_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) end = subs[i].rm_eo; if (start != -1 && end > 0 && start < string_len && end < string_len && start < end) { add_index_stringl(array, i, string+start, end-start, 1); + } else { + add_index_bool(array, i, 0); } } efree(buf); diff --git a/ext/standard/reg.c b/ext/standard/reg.c index 6382cfd739..c9f84ed973 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -261,6 +261,8 @@ static void _php3_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) end = subs[i].rm_eo; if (start != -1 && end > 0 && start < string_len && end < string_len && start < end) { add_index_stringl(array, i, string+start, end-start, 1); + } else { + add_index_bool(array, i, 0); } } efree(buf); |