including warnings and errors.
- Added the timezone_name_from_abbr() function that exposes the guessing
mechanism that tries to find a timezone identifier from a timezone
abbreviation and GMT offset.
- Fixed a bug where combined date formats 'c' and 'r' were cut off due to
insufficient space in the buffer.
- Implemented better error and warning handling that is also used for the
date_parse() function.
- Fixed the date::RFC3339 class constant.
- Fixed bug #37017 (strtotime fails before 13:00:00 with some time zones
identifiers)
- Fixed problems with "T" in front of a time string was seen as a time zone
string.
- Fixed a problem were 5 and 6 character timezone abbreviations where not
correctly parsed.
add_((next_)?index|assoc)_(ascii|rt)_stringl?(_ex)?
and
(ZVAL|RETVAL|RETURN)_(ASCII|RT|U)_STRINGL?
#define ZSTR_DUPLICATE (1<<0)
#define ZSTR_AUTOFREE (1<<1)
Duplicate keeps traditional value of '1', additional bit '2' tells
unicode mode conversion to automatically free the original string
in order to avoid leaks due to conversion on a value otherwise being
"given" to the engine.
/* Uses s as-is for non-unicode, or frees s after converting to unicode */
{
char *s = estrdup("Hello");
ZVAL_RT_STRING(pzv, s, ZSTR_AUTOFREE);
}
/* Duplicates for non-unicode, or converts (but doesn't free original) */
{
char *s = "Hello";
ZVAL_RT_STRING(pzv, s, ZSTR_DUPLICATE);
}
/* Uses as-is for non-unicode, or converts (but doesn't free original) */
{
char *s = "Hello";
zval zv;
ZVAL_RT_STRING(&zv, s, 0);
/* use zv for some temporary purpose */
/* It's now necessary to manually free this generated value */
if (UG(unicode)) {
zval_dtor(&zv);
}
}