Antony Dovgal
c13e337f27
allow empty prefix (restore 5_2 behavior)
2007-08-10 12:54:38 +00:00
Jani Taskinen
28cf1788a9
MFB: Fixed the fix for bug #42233 and added test for it.
2007-08-10 12:23:16 +00:00
Johannes Schlüter
ab79c3dea9
- Fix build (patch by Ulf Wendel)
2007-08-08 14:52:40 +00:00
Jani Taskinen
f602af17b4
MFB: Fix bug #42233
2007-08-08 07:46:00 +00:00
Dmitry Stogov
53ad22aec3
wrong condition
2007-07-09 14:32:59 +00:00
Antony Dovgal
770215e0c7
synchronized range() behaviour in HEAD with 5_2
2007-06-28 16:06:23 +00:00
Antony Dovgal
6eb6de0fcf
fix folding
2007-06-05 12:17:15 +00:00
Ilia Alshanetsky
66526cee92
MFB
2007-05-28 23:00:25 +00:00
Antony Dovgal
451d4858b3
fix #41432 (extract() does not accept empty prefix)
2007-05-18 14:11:12 +00:00
Wez Furlong
edf3fe4731
MFB, #40848
2007-03-18 20:23:51 +00:00
Stanislav Malyshev
023531f76c
Fix UMR in array_user_key_compare() (MOPB24 by Stefan Esser)
2007-03-16 20:16:05 +00:00
Antony Dovgal
d181d3a0b3
fix #40191 (use of array_unique() with objects triggers segfault)
2007-01-22 08:16:36 +00:00
Sebastian Bergmann
3717df72ae
Bump year.
2007-01-01 09:29:37 +00:00
Hannes Magnusson
5ed5c10517
Fix ZTS build...
2006-12-22 01:07:28 +00:00
Andrei Zmievski
757fb1e01f
Bite the bullet and port the natural comparison algorithm to support
...
UChar strings. Also, simplify the original code.
# Argggghh, post-incremented iteration sucks. That means you, U16_* stuff.
2006-12-21 21:47:56 +00:00
Andrei Zmievski
e722dce575
- Marcus was too quick. Let's put type before zstr in the macros.
...
- Also mark get_include_path() and restore_include_path() with U.
2006-12-19 21:38:59 +00:00
Marcus Boerger
98dce57dd5
- Fix ZVAL_ZSTRL
2006-12-19 21:13:21 +00:00
Brian Shire
3b4c2e0458
-Fixed bug #30074 (apparent symbol table error with extract($blah, EXTR_REFS))
...
# appoligies, I did this in reverse (applied to PHP_5_2) I should have MFH.
2006-12-19 08:02:48 +00:00
Antony Dovgal
6c8ce9805b
fix import_request_variables()
2006-12-06 17:42:47 +00:00
Andrei Zmievski
a775c82161
extract() should convert keys using runtime encoding.
2006-12-05 23:17:06 +00:00
Antony Dovgal
5f29b8e40e
fix #39576 (array_walk() doesn't separate userdata zval)
2006-11-22 10:58:11 +00:00
Andrei Zmievski
b767e3cf9f
Unicode support in import_request_variables().
2006-11-21 22:21:38 +00:00
Antony Dovgal
0ca02684c1
fix array_key_exists() with NULL key in Unicode mode
2006-11-15 22:43:19 +00:00
Antony Dovgal
37754b437f
fix memory leak and typo in zend_parse_parameters(), which caused segfault
...
add test
2006-11-15 22:09:25 +00:00
Ilia Alshanetsky
a65efab679
MFB: php_splice() optimization
2006-11-13 15:34:49 +00:00
Hannes Magnusson
6d22129d9b
Fixed bug#36975 (natcasesort() causes array_pop() to misbehave)
2006-11-12 01:11:58 +00:00
Hannes Magnusson
176b72284c
Error message clean up
...
(patch by Matt W (php_lists -AT- realpain.com))
2006-10-08 13:34:24 +00:00
Ilia Alshanetsky
25ac82bbb6
MFB: optimize zend_hash_init() with known hash table sizes.
2006-10-03 17:45:16 +00:00
Hannes Magnusson
0eaea000db
compact() doesnt throw "wrong param count"
2006-10-03 16:36:57 +00:00
Andrei Zmievski
7ff8b9b090
Bug fixes for substr_replace().
2006-09-20 20:30:19 +00:00
Antony Dovgal
591477b143
support objects in array_walk*()
...
add new tests, fix old ones
2006-09-19 09:33:02 +00:00
Antony Dovgal
cb7a7995b6
fix #34066 (recursive array_walk causes segfault)
...
add tests
2006-09-19 09:02:39 +00:00
Ilia Alshanetsky
803b3f4d77
MFB: Fixed bug #38464 (array_count_values() mishandles numeric strings).
2006-09-06 17:31:47 +00:00
Antony Dovgal
d350e4b038
fix logic and memleak
2006-08-08 18:06:43 +00:00
Antony Dovgal
dbe2092313
implement zend_unicode_to_string() and zend_string_to_unicode()
...
part #2 (of 2)
2006-08-08 16:59:11 +00:00
Andrei Zmievski
768a9227ed
- Adjusted php_u_strtoupper/php_u_strtolower/php_u_strtotitle API to be
...
more sane.
- Upgrade strtoupper(), strtolower(), strtotitle() to use params API.
2006-08-03 23:09:29 +00:00
Dmitry Stogov
be56f79c6f
zts fix
2006-08-02 07:54:41 +00:00
Andrei Zmievski
263d329acd
Fix leaks.
2006-08-02 02:11:56 +00:00
Andrei Zmievski
b67e1d9f92
Add SORT_LOCALE_STRING support to array_multisort() and mark it with U.
2006-08-01 22:28:26 +00:00
Andrei Zmievski
7b0fc1bb1c
Whew. Fix up extract to params API, Unicode support, and simplify it as
...
well.
2006-08-01 21:50:44 +00:00
Andrei Zmievski
bcb2df2974
Apply Matt W's patch (with a fix) for array_combine() binary key safety.
2006-07-21 23:47:40 +00:00
Andrei Zmievski
54528ce322
Remove references to BG(user_compare_fnnc_name).
...
# Less bickering, more coding!
2006-07-21 23:29:25 +00:00
Andrei Zmievski
d32d425468
Make array_*intersect* functions use params API with FCI cache and mark
...
them with U.
2006-07-21 23:25:08 +00:00
Dmitry Stogov
7a09b15702
ZTS fix
2006-07-21 07:34:18 +00:00
Andrei Zmievski
40b4c60b9a
Make array_walk(_recursive) use params API with FCI cache and mark them
...
with U.
2006-07-20 23:21:32 +00:00
Andrei Zmievski
6e9dcc4800
Make all array_*diff* functions use params API (along with FCI cache)
...
and mark them with U.
# What a mess (before my changes of course) :)
2006-07-20 22:51:20 +00:00
Andrei Zmievski
e9a9a26e7e
Rewrite array_map() to use params API with fci cache and mark it with U.
2006-07-20 20:54:23 +00:00
Andrei Zmievski
675832c204
Update array_filter() and array_reduce() to use params API with FCI
...
cache and mark them with U.
2006-07-17 22:18:01 +00:00
Andrei Zmievski
34e5b3befa
Upgrade uasort() and uksort() to use params API with FCI cache and mark
...
them with U.
2006-07-17 21:20:02 +00:00
Andrei Zmievski
fdf280b41b
- Upgrade usort() to support Unicode (including valid Unicode callbacks).
...
- Make usort() use 'f' specifier for function call info/cache.
2006-07-17 20:52:12 +00:00
Marcus Boerger
dd47d64887
- Readd proto
2006-07-15 12:09:13 +00:00
Marcus Boerger
adc5a7f087
- Update array_fill_keys, better unicode support, use new param parsing API
2006-07-15 12:06:10 +00:00
Marcus Boerger
da5c076100
- Add array_fill_keys() (Matt W, php_lists at realplain com)
2006-07-15 10:10:47 +00:00
Andrei Zmievski
853ab6e09f
Adjust array_pad(), array_reverse(), and array_unique() for params API
...
and mark them with U.
2006-07-14 22:41:22 +00:00
Andrei Zmievski
5766cdbd01
- Simplify array_combine() and adjust for params API
...
- Adjust array_count_values() and array_rand() for params API and mark
with U
2006-07-14 22:15:54 +00:00
Andrei Zmievski
40cabdca59
Adjust array_key_exists(), array_slice(), and array_splice() for params
...
API and mark them with U.
2006-07-14 21:16:30 +00:00
Andrei Zmievski
8d28257255
Make array_change_key_case() -- a candidate for the quite possibly the
...
most useless function ever -- use params API and mark it with U.
2006-07-14 20:07:57 +00:00
Andrei Zmievski
6dfb4768b4
Update end(), prev(), next(), reset(), current(), and key() for params
...
API and mark with U.
2006-07-14 18:12:45 +00:00
Andrei Zmievski
0322c14d14
Update array_search()/in_array() for params API and mark with U.
2006-07-14 18:03:13 +00:00
Andrei Zmievski
f344fe0153
Update array_keys() and array_values() for params API and mark with U.
2006-07-14 17:55:27 +00:00
Andrei Zmievski
c30d1ecf11
- Simplify array_fill().
...
- Do params API for a couple of funcs and mark them as Unicode
compliant.
2006-07-14 17:35:54 +00:00
Andrei Zmievski
c8254d82d7
Update array_sum() and array_product() (U).
2006-07-13 22:26:42 +00:00
Andrei Zmievski
8553cf9da8
Mark a few more funcs.
2006-07-13 22:03:42 +00:00
Andrei Zmievski
2fbc36496f
- Let the caller output a warning instead of having
...
zend_get_unified_string_type() do it.
- Mark a few more functions are Unicode compatible.
2006-07-13 21:27:48 +00:00
Andrei Zmievski
c01957091a
- Make compact() normalize variablem name before checking symtable.
...
- Mark tested/upgraded functions with 'U' flag.
2006-07-13 21:08:43 +00:00
Hannes Magnusson
bf0a79d381
Updated protos
...
Fixed vim folding
2006-06-25 19:19:31 +00:00
Andrei Zmievski
a871adf6bb
MFB
2006-06-03 18:58:40 +00:00
Johannes Schlüter
e7747e8d74
- Fix bug #37060 (Type of retval of Countable::count() is not checked)
2006-04-12 19:29:52 +00:00
Derick Rethans
ad6a972de3
- Implemented basic collation support. For some reason "new Collator" gives segfaults when the object's collation resource is used.
...
- The following example shows what is implemented:
<?php
$orig = $strings = array(
'côte',
'cote',
'côté',
'coté',
'fluÃe',
'flüÃe',
);
echo "German phonebook:\n";
$c = collator_create( "de@collation=phonebook" );
foreach($c->sort($strings) as $string) {
echo $string, "\n";
}
echo $c->getAttribute(Collator::FRENCH_COLLATION) == Collator::ON
? "With" : "Without", " french accent sorting order\n";
echo "\nFrench with options:\n";
$c = collator_create( "fr" );
$c->setAttribute(Collator::CASE_FIRST, Collator::UPPER_FIRST);
$c->setAttribute(Collator::CASE_LEVEL, Collator::ON);
$c->setStrength(Collator::SECONDARY);
foreach($c->sort($strings) as $string) {
echo $string, "\n";
}
echo $c->getAttribute(Collator::FRENCH_COLLATION) == Collator::ON
? "With" : "Without", " french accent sorting order\n";
?>
2006-03-26 11:06:24 +00:00
Antony Dovgal
932c5d9e0e
MF51: prevent segfault when exception is thrown from Countable::count()
2006-03-22 22:06:08 +00:00
Antony Dovgal
2c750d7f84
make the code a bit cleaner - no need for two different checks that are doing effectively the same
2006-03-19 22:12:39 +00:00
Dmitry Stogov
c366cc6d1a
Nuke int32_t (everywhere except streams layer) and signed/unsigned warnings
2006-03-02 13:12:45 +00:00
Dmitry Stogov
e3b7f3fd0d
Unicode support: MS Visual C compatibility
2006-02-26 11:57:14 +00:00
Dmitry Stogov
84f0adff86
Unicode support: fixed GLOBALS protection
2006-02-22 13:10:32 +00:00
Dmitry Stogov
0f1209ab3d
Portable unicode string API:
...
- use the same type (int) for zval.value.usr.len and zval.value.str.len
- use union "zstr" as char*/UChar* mixture instead of void*
- Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
- nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Dmitry Stogov
09ca61c125
Made server wide switch for unicode on/off (according to PDM).
2006-02-13 10:23:59 +00:00
Andrei Zmievski
f0a9b2d51b
MFB.
2006-02-07 17:54:52 +00:00
Dmitry Stogov
227295a4f1
Unicode stuff is changed according to decision maden on PDM.
...
Now IS_BINRAY data type is removed and IS_STRING starts behave as IS_BINARY in unicode mode. IS_STRING is incompatible with IS_UNICODE, so ALL functions should be improved to support unicode mode.
2006-01-17 12:18:53 +00:00
Andrey Hristov
9be53ac7a5
cast and fix a warning
2006-01-04 22:42:17 +00:00
foobar
251c5173fd
bump year and license version
2006-01-01 13:10:10 +00:00
Antony Dovgal
64d9c70e4c
tweak the fix
2005-12-27 23:27:02 +00:00
Antony Dovgal
41973d8969
MF51: fix #35821 (array_map() segfaults when exception is throwed from the callback)
2005-12-27 22:33:40 +00:00
foobar
0ac2b74b0b
- Nuke php3 legacy
2005-12-05 22:53:34 +00:00
Ilia Alshanetsky
1321658d91
MFB51: Fixed bug #35014 (array_product() always returns 0).
2005-10-30 13:46:34 +00:00
Dmitry Stogov
44e9370026
Fixed bug #34982 (array_walk_recursive() modifies elements outside function scope)
2005-10-28 09:57:50 +00:00
Dmitry Stogov
47893ed920
Reverted fix for bug #34934 . The bug marked as bogus.
2005-10-24 07:01:43 +00:00
Antony Dovgal
aff2ed53ca
fix ws
2005-10-21 15:54:46 +00:00
Dmitry Stogov
02090106d8
Fixed bug #34934 (offsetExists is not called from array_key_exists)
2005-10-21 15:20:30 +00:00
Antony Dovgal
f3e70f5b8c
fix #34723 (array_count_values() strips leading zeroes)
2005-10-04 20:47:48 +00:00
Ilia Alshanetsky
63cd70e920
GLOBALS protection for extract() function.
2005-10-03 14:01:36 +00:00
Dmitry Stogov
03c6efab67
Additinal fix for bug #34277 (array_filter() crashes with references and objects)
2005-09-12 09:58:35 +00:00
Derick Rethans
161777af26
- Reimplement SORT_LOCALE_STRING with ICU locales.
2005-09-12 09:53:23 +00:00
Dmitry Stogov
cbd1c89e81
Fixed bug #34277 (array_filter() crashes with references and objects)
2005-09-01 11:58:41 +00:00
Dmitry Stogov
f4b8f4e958
Unicode support cleanup
2005-08-23 09:33:46 +00:00
Dmitry Stogov
6b622046dc
zend_is_callable() and zend_make_callable() were changed to return readable function name as zval (instead of string).
2005-08-22 12:22:16 +00:00
Dmitry Stogov
2b5ebdde1d
ZTS fix
2005-08-19 07:49:41 +00:00
Dmitry Stogov
974b209f78
ZTS fix
2005-08-19 07:26:13 +00:00
Andrei Zmievski
fd05d40cbe
Rework range() to be able to work on binary strings and also on Unicode
...
code points. Binary strings are not interpreted as numeric.
2005-08-18 22:51:46 +00:00
Dmitry Stogov
74dafa95d1
Unicode support for extract()
2005-08-18 15:14:08 +00:00
Dmitry Stogov
263d919a20
Unicode support for range()
2005-08-17 15:12:03 +00:00