summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/calendar/julian.c2
-rw-r--r--ext/calendar/tests/unixtojd.phpt4
-rw-r--r--ext/com_dotnet/com_com.c3
-rw-r--r--ext/com_dotnet/com_extension.c2
-rw-r--r--ext/com_dotnet/com_typeinfo.c8
-rw-r--r--ext/com_dotnet/com_variant.c11
-rw-r--r--ext/ctype/ctype.xml2
-rw-r--r--ext/curl/tests/bug68089.phpt2
-rw-r--r--ext/curl/tests/curl_multi_init_param.phpt27
-rw-r--r--ext/date/lib/parse_tz.c6
-rw-r--r--ext/date/lib/timezonedb.h1356
-rw-r--r--ext/date/tests/002.phpt2
-rw-r--r--ext/date/tests/bug13142.phpt2
-rw-r--r--ext/date/tests/bug26317.phpt2
-rw-r--r--ext/date/tests/bug26320.phpt2
-rw-r--r--ext/date/tests/date_interval_create_from_date_string.phpt34
-rw-r--r--ext/date/tests/date_interval_create_from_date_string_nullparam.phpt42
-rw-r--r--ext/date/tests/date_interval_create_from_date_string_wrongparam_001.phpt11
-rw-r--r--ext/date/tests/date_interval_create_from_date_string_wrongparam_002.phpt9
-rw-r--r--ext/date/tests/date_timestamp_set.phpt19
-rw-r--r--ext/date/tests/date_timestamp_set_nullparam.phpt17
-rw-r--r--ext/date/tests/date_timestamp_set_nullparam2.phpt24
-rw-r--r--ext/date/tests/date_timestamp_set_wrongparam_001.phpt17
-rw-r--r--ext/date/tests/date_timestamp_set_wrongparam_002.phpt15
-rw-r--r--ext/date/tests/date_timestamp_set_wrongparam_003.phpt19
-rw-r--r--ext/date/tests/date_timestamp_set_wrongparam_004.phpt17
-rw-r--r--ext/date/tests/timezone_version_get.phpt13
-rw-r--r--ext/date/tests/timezone_version_get_basic1.phpt12
-rwxr-xr-xext/dba/README2
-rw-r--r--ext/ereg/regex/regcomp.c2
-rw-r--r--ext/exif/tests/bug68113.phpt6
-rw-r--r--ext/fileinfo/fileinfo.php2
-rw-r--r--ext/fileinfo/libmagic/patchlevel.h2
-rw-r--r--ext/fileinfo/tests/magic14
-rw-r--r--ext/filter/filter.c2
-rw-r--r--ext/ftp/ftp.h4
-rw-r--r--ext/gd/config.w323
-rw-r--r--ext/gd/libgd/gd.h2
-rw-r--r--ext/gd/libgd/gd_arc_f_buggy.c2
-rw-r--r--ext/gd/libgd/gdft.c2
-rw-r--r--ext/gd/libgd/webpimg.c4
-rw-r--r--ext/gd/libgd/webpimg.h2
-rw-r--r--ext/gd/tests/imagealphablending_error1.phpt19
-rw-r--r--ext/gd/tests/imagecolorresolvealpha_error3.phpt19
-rw-r--r--ext/gd/tests/imagesavealpha_error2.phpt19
-rw-r--r--ext/gettext/tests/66265/de_DE/LC_MESSAGES/domain.mobin0 -> 458 bytes
-rw-r--r--ext/gettext/tests/66265/de_DE/LC_MESSAGES/domain.po17
-rw-r--r--ext/gettext/tests/66265/en_US/LC_MESSAGES/domain.mobin0 -> 445 bytes
-rw-r--r--ext/gettext/tests/66265/en_US/LC_MESSAGES/domain.po17
-rw-r--r--ext/gettext/tests/66265/fr_FR/LC_MESSAGES/domain.mobin0 -> 458 bytes
-rw-r--r--ext/gettext/tests/66265/fr_FR/LC_MESSAGES/domain.po17
-rw-r--r--ext/gettext/tests/bug66267.phpt55
-rw-r--r--ext/iconv/tests/iconv_basic_001-win32.phpt19
-rw-r--r--ext/iconv/tests/iconv_basic_001.phpt19
-rw-r--r--ext/interbase/tests/002.phpt2
-rw-r--r--ext/interbase/tests/003.phpt2
-rw-r--r--ext/interbase/tests/004.phpt2
-rw-r--r--ext/interbase/tests/005.phpt4
-rw-r--r--ext/interbase/tests/006.phpt2
-rw-r--r--ext/interbase/tests/007.phpt2
-rw-r--r--ext/interbase/tests/008.phpt2
-rw-r--r--ext/intl/collator/collator_convert.c2
-rw-r--r--ext/intl/collator/collator_sort.c2
-rw-r--r--ext/intl/doc/datefmt_api.php4
-rw-r--r--ext/intl/intl_convert.c2
-rw-r--r--ext/intl/tests/bug60192-compare.phpt2
-rw-r--r--ext/intl/tests/bug60192-getlocale.phpt2
-rw-r--r--ext/intl/tests/bug60192-getsortkey.phpt2
-rw-r--r--ext/intl/tests/bug60192-sort.phpt2
-rw-r--r--ext/intl/tests/bug60192-sortwithsortkeys.phpt2
-rw-r--r--ext/intl/tests/bug67052-win32.phpt30
-rw-r--r--ext/intl/tests/bug67052.phpt5
-rw-r--r--ext/intl/tests/collator_create3.phpt3
-rw-r--r--ext/intl/tests/collator_create4.phpt79
-rw-r--r--ext/intl/tests/collator_get_error_code.phpt2
-rw-r--r--ext/intl/tests/collator_get_error_message.phpt2
-rw-r--r--ext/intl/tests/collator_get_sort_key_variant3.phpt3
-rw-r--r--ext/intl/tests/collator_get_sort_key_variant4.phpt98
-rw-r--r--ext/intl/tests/dateformat_calendars_variant2.phpt1
-rw-r--r--ext/intl/tests/dateformat_calendars_variant3.phpt45
-rw-r--r--ext/intl/tests/dateformat_create_cal_arg_variant3.phpt1
-rw-r--r--ext/intl/tests/dateformat_create_cal_arg_variant4.phpt53
-rw-r--r--ext/intl/tests/dateformat_formatObject_calendar_variant3.phpt1
-rw-r--r--ext/intl/tests/dateformat_formatObject_calendar_variant4.phpt40
-rw-r--r--ext/intl/tests/dateformat_formatObject_datetime_variant3.phpt1
-rw-r--r--ext/intl/tests/dateformat_formatObject_datetime_variant4.phpt33
-rw-r--r--ext/intl/tests/dateformat_get_set_calendar_variant3.phpt1
-rw-r--r--ext/intl/tests/dateformat_get_set_calendar_variant4.phpt55
-rw-r--r--ext/intl/tests/dateformat_get_set_timezone_variant3.phpt1
-rw-r--r--ext/intl/tests/dateformat_get_set_timezone_variant4.phpt62
-rw-r--r--ext/intl/tests/dateformat_timezone_arg_variations3.phpt1
-rw-r--r--ext/intl/tests/dateformat_timezone_arg_variations4.phpt46
-rw-r--r--ext/intl/tests/formatter_format4.phpt3
-rw-r--r--ext/intl/tests/formatter_format5.phpt130
-rw-r--r--ext/intl/tests/msgfmt_format_intlcalendar_variant3.phpt1
-rw-r--r--ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt30
-rw-r--r--ext/libxml/libxml.c2
-rw-r--r--ext/mbstring/README_PHP3-i18n-ja4
-rw-r--r--ext/mbstring/libmbfl/filters/unicode_prop.h2
-rw-r--r--ext/mbstring/libmbfl/mbfl/mbfl_consts.h2
-rw-r--r--ext/mbstring/tests/mb_strtolower_variation3.phpt2
-rw-r--r--ext/mbstring/tests/mb_strtoupper_variation3.phpt2
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt2
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt2
-rw-r--r--ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt2
-rw-r--r--ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt2
-rw-r--r--ext/mysql/tests/mysql_deprecated_api.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_ps_select_union.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_result_references.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt4
-rw-r--r--ext/mysqlnd/mysqlnd.c4
-rw-r--r--ext/mysqlnd/mysqlnd.h2
-rw-r--r--ext/oci8/oci8.c2
-rw-r--r--ext/oci8/tests/bug36010.phpt2
-rw-r--r--ext/odbc/php_odbc.c6
-rw-r--r--ext/odbc/tests/bug60616.phpt2
-rw-r--r--ext/opcache/Optimizer/optimize_func_calls.c2
-rw-r--r--ext/opcache/Optimizer/zend_optimizer.c8
-rw-r--r--ext/opcache/ZendAccelerator.c19
-rw-r--r--ext/opcache/ZendAccelerator.h1
-rw-r--r--ext/opcache/zend_accelerator_module.c4
-rw-r--r--ext/openssl/tests/bug64802.phpt2
-rw-r--r--ext/pcntl/README2
-rw-r--r--ext/pcre/pcrelib/ChangeLog4
-rw-r--r--ext/pcre/pcrelib/HACKING2
-rw-r--r--ext/pcre/pcrelib/README2
-rw-r--r--ext/pcre/pcrelib/doc/pcre.txt2
-rw-r--r--ext/pcre/pcrelib/pcre_exec.c2
-rw-r--r--ext/pcre/pcrelib/pcre_printint.c2
-rw-r--r--ext/pcre/pcrelib/pcre_study.c2
-rw-r--r--ext/pcre/pcrelib/pcredemo.c4
-rw-r--r--ext/pcre/pcrelib/sljit/sljitLir.c2
-rw-r--r--ext/pcre/pcrelib/sljit/sljitLir.h4
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeARM_32.c4
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c2
-rw-r--r--ext/pdo/pdo_dbh.c2
-rw-r--r--ext/pdo/pdo_stmt.c25
-rw-r--r--ext/pdo/tests/bug_39656.phpt2
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt4
-rw-r--r--ext/pdo_oci/oci_driver.c2
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c9
-rw-r--r--ext/pdo_pgsql/tests/bug62593.phpt15
-rw-r--r--ext/pgsql/README2
-rw-r--r--ext/pgsql/pgsql.c6
-rw-r--r--ext/pgsql/tests/80_bug36625.phpt8
-rw-r--r--ext/phar/Makefile.frag2
-rw-r--r--ext/phar/func_interceptors.c2
-rw-r--r--ext/readline/tests/readline_read_history_error_001.phpt14
-rw-r--r--ext/reflection/php_reflection.c10
-rw-r--r--ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt16
-rw-r--r--ext/session/session.c24
-rw-r--r--ext/session/tests/session_set_save_handler_iface_003.phpt3
-rw-r--r--ext/session/tests/session_set_save_handler_sid_001.phpt3
-rw-r--r--ext/session/tests/session_set_save_handler_write_short_circuit.phpt1
-rw-r--r--ext/shmop/README2
-rw-r--r--ext/snmp/snmp.c8
-rw-r--r--ext/soap/TODO.old2
-rw-r--r--ext/soap/interop/client_round2_interop.php18
-rw-r--r--ext/soap/package.xml2
-rw-r--r--ext/soap/php_sdl.h2
-rw-r--r--ext/soap/php_soap.h2
-rw-r--r--ext/soap/soap.c19
-rw-r--r--ext/soap/tests/bug68361.phpt114
-rw-r--r--ext/soap/tests/bugs/bug27742.wsdl4
-rw-r--r--ext/soap/tests/bugs/bug50698_2.phpt2
-rw-r--r--ext/sockets/php_sockets.h2
-rw-r--r--ext/sockets/sockets.c4
-rw-r--r--ext/sockets/tests/mcast_ipv4_send.phpt131
-rw-r--r--ext/spl/internal/recursivecachingiterator.inc2
-rwxr-xr-xext/spl/spl.php2
-rw-r--r--ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt2
-rw-r--r--ext/spl/tests/bug53071.phpt2
-rw-r--r--ext/sqlite3/libsqlite/sqlite3.c126
-rw-r--r--ext/standard/array.c6
-rw-r--r--ext/standard/basic_functions.c27
-rw-r--r--ext/standard/basic_functions.h4
-rw-r--r--ext/standard/dir.c2
-rw-r--r--ext/standard/exec.c6
-rw-r--r--ext/standard/file.c124
-rw-r--r--ext/standard/filestat.c2
-rw-r--r--ext/standard/flock_compat.h2
-rw-r--r--ext/standard/ftp_fopen_wrapper.c9
-rw-r--r--ext/standard/html_tables/ents_html401.txt2
-rw-r--r--ext/standard/image.c4
-rw-r--r--ext/standard/incomplete_class.c2
-rw-r--r--ext/standard/metaphone.c2
-rw-r--r--ext/standard/password.c24
-rw-r--r--ext/standard/php_fopen_wrapper.c2
-rw-r--r--ext/standard/php_fopen_wrappers.h4
-rw-r--r--ext/standard/php_incomplete_class.h2
-rw-r--r--ext/standard/php_var.h1
-rw-r--r--ext/standard/rand.c2
-rw-r--r--ext/standard/scanf.h2
-rw-r--r--ext/standard/string.c6
-rw-r--r--ext/standard/tests/array/array_search_variation4.phpt2
-rw-r--r--ext/standard/tests/array/in_array_variation4.phpt2
-rw-r--r--ext/standard/tests/file/fgetc_variation1.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation6-win32.phpt2
-rw-r--r--ext/standard/tests/file/fgets_variation6.phpt2
-rw-r--r--ext/standard/tests/file/file.inc4
-rw-r--r--ext/standard/tests/file/fscanf_variation18.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation2.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation20.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation27.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation33.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation39.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation45.phpt4
-rw-r--r--ext/standard/tests/file/fscanf_variation9.phpt4
-rw-r--r--ext/standard/tests/general_functions/bug39322.phpt2
-rw-r--r--ext/standard/tests/general_functions/getrusage_basic.phpt2
-rw-r--r--ext/standard/tests/general_functions/intval.phpt4
-rw-r--r--ext/standard/tests/general_functions/is_int.phpt4
-rw-r--r--ext/standard/tests/general_functions/is_int_64bit.phpt4
-rw-r--r--ext/standard/tests/general_functions/php_uname_error.phpt2
-rw-r--r--ext/standard/tests/general_functions/strval.phpt4
-rw-r--r--ext/standard/tests/general_functions/var_export-locale.phpt4
-rw-r--r--ext/standard/tests/general_functions/var_export_basic1.phpt4
-rw-r--r--ext/standard/tests/image/test1bpix.bmpbin690138 -> 690138 bytes
-rw-r--r--ext/standard/tests/serialize/precision.phpt4
-rw-r--r--ext/standard/tests/serialize/serialization_error_001.phpt6
-rw-r--r--ext/standard/tests/serialize/unserialize_classes.phpt88
-rw-r--r--ext/standard/tests/strings/addcslashes_005.phpt12
-rw-r--r--ext/standard/tests/strings/bin2hex_001.phpt11
-rw-r--r--ext/standard/tests/strings/sprintf_variation10.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation19.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation21.phptbin5046 -> 5048 bytes
-rw-r--r--ext/standard/tests/strings/sprintf_variation28.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation28_64bit.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation3.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation34.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation34_64bit.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation40.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation40_64bit.phpt4
-rw-r--r--ext/standard/tests/strings/sprintf_variation46.phpt4
-rw-r--r--ext/standard/tests/strings/str_pad.phptbin9818 -> 9818 bytes
-rw-r--r--ext/standard/tests/strings/str_repeat.phptbin16786 -> 16786 bytes
-rw-r--r--ext/standard/tests/strings/strncasecmp_variation6.phpt4
-rw-r--r--ext/standard/tests/strings/strncmp_variation6.phpt4
-rw-r--r--ext/standard/var.c36
-rw-r--r--ext/standard/var_unserializer.c113
-rw-r--r--ext/standard/var_unserializer.re46
-rw-r--r--ext/tokenizer/tests/token_get_all_variation17.phpt4
-rw-r--r--ext/wddx/php_wddx_api.h2
-rw-r--r--ext/wddx/wddx.c5
-rw-r--r--ext/xmlrpc/libxmlrpc/xml_to_soap.c2
-rw-r--r--ext/xmlwriter/tests/011.phpt35
-rw-r--r--ext/xmlwriter/tests/012.phpt38
-rw-r--r--ext/xmlwriter/tests/OO_010.phpt36
-rw-r--r--ext/xmlwriter/tests/OO_011.phpt39
-rw-r--r--ext/xsl/tests/xsltprocessor_hasExsltSupport.phpt13
-rw-r--r--ext/xsl/tests/xsltprocessor_hasExsltSupport_not_available_extension.phpt13
-rw-r--r--ext/xsl/tests/xsltprocessor_hasExsltSupport_wrongparam_001.phpt13
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToDoc.phpt51
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToDoc_nullparam.phpt54
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_001.phpt56
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_002.phpt54
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_003.phpt56
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_004.phpt56
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToURI.phpt53
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToURI_nullparam.phpt54
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_001.phpt57
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_002.phpt57
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_003.phpt57
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_004.phpt56
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToXML.phpt61
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToXML_nullparam.phpt54
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_001.phpt55
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_002.phpt54
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_003.phpt55
-rw-r--r--ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_004.phpt55
-rw-r--r--ext/zip/php_zip.c2
-rw-r--r--ext/zlib/tests/gzfile_variation4.phpt2
-rw-r--r--ext/zlib/tests/readgzfile_variation4.phpt2
-rw-r--r--ext/zlib/zlib.c12
-rw-r--r--ext/zlib/zlib_filter.c2
-rw-r--r--ext/zlib/zlib_win32_howto.txt2
278 files changed, 4029 insertions, 1284 deletions
diff --git a/ext/calendar/julian.c b/ext/calendar/julian.c
index 659ffc1740..904727ff04 100644
--- a/ext/calendar/julian.c
+++ b/ext/calendar/julian.c
@@ -47,7 +47,7 @@
*
* CALENDAR OVERVIEW
*
- * Julias Ceasar created the calendar in 46 B.C. as a modified form of
+ * Julius Caesar created the calendar in 46 B.C. as a modified form of
* the old Roman republican calendar which was based on lunar cycles.
* The new Julian calendar set fixed lengths for the months, abandoning
* the lunar cycle. It also specified that there would be exactly 12
diff --git a/ext/calendar/tests/unixtojd.phpt b/ext/calendar/tests/unixtojd.phpt
index 4eeb1ca93e..6183cae9ee 100644
--- a/ext/calendar/tests/unixtojd.phpt
+++ b/ext/calendar/tests/unixtojd.phpt
@@ -21,10 +21,10 @@ putenv('TZ=UTC');
// -uses --INI-- section with date.timezone=UTC
// -uses putenv('TZ=UTC')
// date.timezone=UTC
-// -if ommitted from easter_date.phpt, outputs DATE_TZ_ERRMSG warning
+// -if omitted from easter_date.phpt, outputs DATE_TZ_ERRMSG warning
// -easter_date() calls mktime() and localtime()
// -whereas unixtojd(1000000000) calls localtime(1000000000)
-// -if ommitted from unixtojd.phpt, does NOT output DATE_TZ_ERRMSG
+// -if omitted from unixtojd.phpt, does NOT output DATE_TZ_ERRMSG
//
// unixtojd() calls php_localtime_r() which for Pacific timezone systems, returns a time -8 hours
// -this incorrect localtime is passed to the julian date conversion (GregorianToSDN) function which works (probably correctly)
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c
index e1a9503dff..7de6d949bb 100644
--- a/ext/com_dotnet/com_com.c
+++ b/ext/com_dotnet/com_com.c
@@ -254,7 +254,7 @@ PHP_FUNCTION(com_create_instance)
ITypeLib_Release(TL);
}
} else if (obj->typeinfo && COMG(autoreg_on)) {
- int idx;
+ UINT idx;
if (SUCCEEDED(ITypeInfo_GetContainingTypeLib(obj->typeinfo, &TL, &idx))) {
/* check if the library is already in the cache by getting its name */
@@ -693,7 +693,6 @@ PHP_FUNCTION(com_event_sink)
{
zval *object, *sinkobject, *sink=NULL;
char *dispname = NULL, *typelibname = NULL;
- zend_bool gotguid = 0;
php_com_dotnet_object *obj;
ITypeInfo *typeinfo = NULL;
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c
index 7e15865950..e4ed4916af 100644
--- a/ext/com_dotnet/com_extension.c
+++ b/ext/com_dotnet/com_extension.c
@@ -387,7 +387,7 @@ PHP_MINIT_FUNCTION(com_dotnet)
#define COM_ERR_CONST(x) { \
zend_long __tmp; \
- ULongToUIntPtr(x, &__tmp); \
+ ULongToIntPtr(x, &__tmp); \
REGISTER_LONG_CONSTANT(#x, __tmp, CONST_CS|CONST_PERSISTENT); \
}
diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c
index 17b69d2460..f07d7ff65d 100644
--- a/ext/com_dotnet/com_typeinfo.c
+++ b/ext/com_dotnet/com_typeinfo.c
@@ -67,11 +67,11 @@ PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codep
hr = LoadRegTypeLib((REFGUID)&clsid, major_i, minor_i, LANG_NEUTRAL, &TL);
/* if that failed, assumed that the GUID is actually a CLSID and
- * attemp to get the library via an instance of that class */
+ * attempt to get the library via an instance of that class */
if (FAILED(hr) && (major == NULL || minor == NULL)) {
IDispatch *disp = NULL;
ITypeInfo *info = NULL;
- int idx;
+ UINT idx;
if (SUCCEEDED(hr = CoCreateInstance(&clsid, NULL, CLSCTX_SERVER, &IID_IDispatch, (LPVOID*)&disp)) &&
SUCCEEDED(hr = IDispatch_GetTypeInfo(disp, 0, LANG_NEUTRAL, &info))) {
@@ -96,7 +96,7 @@ PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codep
DWORD VersionCount;
char version[20];
char *libname;
- DWORD libnamelen;
+ long libnamelen;
if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, "TypeLib", 0, KEY_READ, &hkey) &&
ERROR_SUCCESS == RegQueryInfoKey(hkey, NULL, NULL, NULL, &SubKeys,
@@ -116,7 +116,7 @@ PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codep
continue;
}
/* get the default value for this key and compare */
- libnamelen = (DWORD)strlen(search_string)+1;
+ libnamelen = (long)strlen(search_string)+1;
if (ERROR_SUCCESS == RegQueryValue(hsubkey, version, libname, &libnamelen)) {
if (0 == stricmp(libname, search_string)) {
char *str = NULL;
diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c
index 6a81eed102..7317b8d0e4 100644
--- a/ext/com_dotnet/com_variant.c
+++ b/ext/com_dotnet/com_variant.c
@@ -39,8 +39,7 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
HashPosition pos;
int keytype;
zend_string *strindex;
- zend_long intindex = -1;
- zend_long max_index = 0;
+ zend_ulong intindex = 0;
VARIANT *va;
zval *item;
@@ -54,15 +53,15 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
goto bogus;
} else if (HASH_KEY_NON_EXISTENT == keytype) {
break;
- }
- if (intindex > max_index) {
- max_index = intindex;
+ } else if (intindex > UINT_MAX) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "COM: max number %u of elements in safe array exceeded", UINT_MAX);
+ break;
}
}
/* allocate the structure */
bound.lLbound = 0;
- bound.cElements = (ULONG)(intindex + 1);
+ bound.cElements = zend_hash_num_elements(HASH_OF(z));
sa = SafeArrayCreate(VT_VARIANT, 1, &bound);
/* get a lock on the array itself */
diff --git a/ext/ctype/ctype.xml b/ext/ctype/ctype.xml
index 5837b9b5d0..0e7c714b70 100644
--- a/ext/ctype/ctype.xml
+++ b/ext/ctype/ctype.xml
@@ -9,7 +9,7 @@
current locale.
</para>
<para>
- When called with an integer argument theese functions
+ When called with an integer argument these functions
behave exactly like their C counterparts.
</para>
<para>
diff --git a/ext/curl/tests/bug68089.phpt b/ext/curl/tests/bug68089.phpt
index 3bd5889709..d65441b2cc 100644
--- a/ext/curl/tests/bug68089.phpt
+++ b/ext/curl/tests/bug68089.phpt
@@ -13,6 +13,6 @@ var_dump(curl_setopt($ch, CURLOPT_URL, $url));
?>
Done
--EXPECTF--
-Warning: curl_setopt(): Curl option contains invalid characters (\0) in %s/bug68089.php on line 4
+Warning: curl_setopt(): Curl option contains invalid characters (\0) in %s%ebug68089.php on line 4
bool(false)
Done
diff --git a/ext/curl/tests/curl_multi_init_param.phpt b/ext/curl/tests/curl_multi_init_param.phpt
new file mode 100644
index 0000000000..e7848976aa
--- /dev/null
+++ b/ext/curl/tests/curl_multi_init_param.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test curl_multi_init() fail if any parameter is passed
+--CREDITS--
+Paulo Eduardo <pauloelr [at] gmail [dot] com>
+#testfest SP 2014
+--SKIPIF--
+<?php if (!extension_loaded("curl")) print "skip"; ?>
+--FILE--
+<?php
+/* Prototype : resource curl_multi_init(void)
+ * Description : Returns a new cURL multi handle
+ * Source code : ext/curl/multi.c
+ * Test documentation: http://wiki.php.net/qa/temp/ext/curl
+ */
+
+// start testing
+
+//create the multiple cURL handle
+$mh = curl_multi_init('test');
+var_dump($mh);
+
+?>
+===DONE===
+--EXPECTF--
+Warning: curl_multi_init() expects exactly 0 parameters, %d given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
index a503f9e01e..eb6d0af310 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -336,7 +336,7 @@ static ttinfo* fetch_timezone_offset(timelib_tzinfo *tz, timelib_sll ts, timelib
{
uint32_t i;
- /* If there is no transistion time, we pick the first one, if that doesn't
+ /* If there is no transition time, we pick the first one, if that doesn't
* exist we return NULL */
if (!tz->timecnt || !tz->trans) {
*transition_time = 0;
@@ -346,8 +346,8 @@ static ttinfo* fetch_timezone_offset(timelib_tzinfo *tz, timelib_sll ts, timelib
return NULL;
}
- /* If the TS is lower than the first transistion time, then we scan over
- * all the transistion times to find the first non-DST one, or the first
+ /* If the TS is lower than the first transition time, then we scan over
+ * all the transition times to find the first non-DST one, or the first
* one in case there are only DST entries. Not sure which smartass came up
* with this idea in the first though :) */
if (ts < tz->trans[0]) {
diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h
index 0fd9bfbe10..157f0f4941 100644
--- a/ext/date/lib/timezonedb.h
+++ b/ext/date/lib/timezonedb.h
@@ -2,589 +2,589 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[583] = {
{ "Africa/Abidjan" , 0x000000 },
{ "Africa/Accra" , 0x000055 },
{ "Africa/Addis_Ababa" , 0x00019D },
- { "Africa/Algiers" , 0x0001F3 },
- { "Africa/Asmara" , 0x00031E },
- { "Africa/Asmera" , 0x000374 },
- { "Africa/Bamako" , 0x0003CA },
- { "Africa/Bangui" , 0x00041F },
- { "Africa/Banjul" , 0x000474 },
- { "Africa/Bissau" , 0x0004C9 },
- { "Africa/Blantyre" , 0x00052F },
- { "Africa/Brazzaville" , 0x000584 },
- { "Africa/Bujumbura" , 0x0005D9 },
- { "Africa/Cairo" , 0x00062E },
- { "Africa/Casablanca" , 0x000A15 },
- { "Africa/Ceuta" , 0x000C77 },
- { "Africa/Conakry" , 0x000F7E },
- { "Africa/Dakar" , 0x000FD3 },
- { "Africa/Dar_es_Salaam" , 0x001028 },
- { "Africa/Djibouti" , 0x001095 },
- { "Africa/Douala" , 0x0010EA },
- { "Africa/El_Aaiun" , 0x00113F },
- { "Africa/Freetown" , 0x00136A },
- { "Africa/Gaborone" , 0x0013BF },
- { "Africa/Harare" , 0x001414 },
- { "Africa/Johannesburg" , 0x001469 },
- { "Africa/Juba" , 0x0014D7 },
- { "Africa/Kampala" , 0x0015EA },
- { "Africa/Khartoum" , 0x001669 },
- { "Africa/Kigali" , 0x00177C },
- { "Africa/Kinshasa" , 0x0017D1 },
- { "Africa/Lagos" , 0x00183D },
- { "Africa/Libreville" , 0x001892 },
- { "Africa/Lome" , 0x0018E7 },
- { "Africa/Luanda" , 0x00193C },
- { "Africa/Lubumbashi" , 0x001991 },
- { "Africa/Lusaka" , 0x0019FD },
- { "Africa/Malabo" , 0x001A52 },
- { "Africa/Maputo" , 0x001AA7 },
- { "Africa/Maseru" , 0x001AFC },
- { "Africa/Mbabane" , 0x001B6A },
- { "Africa/Mogadishu" , 0x001BD8 },
- { "Africa/Monrovia" , 0x001C33 },
- { "Africa/Nairobi" , 0x001C99 },
- { "Africa/Ndjamena" , 0x001D18 },
- { "Africa/Niamey" , 0x001D84 },
- { "Africa/Nouakchott" , 0x001DD9 },
- { "Africa/Ouagadougou" , 0x001E2E },
- { "Africa/Porto-Novo" , 0x001E83 },
- { "Africa/Sao_Tome" , 0x001ED8 },
- { "Africa/Timbuktu" , 0x001F2D },
- { "Africa/Tripoli" , 0x001F82 },
- { "Africa/Tunis" , 0x00208B },
- { "Africa/Windhoek" , 0x00219D },
- { "America/Adak" , 0x0023E4 },
- { "America/Anchorage" , 0x00275A },
- { "America/Anguilla" , 0x002ACE },
- { "America/Antigua" , 0x002B23 },
- { "America/Araguaina" , 0x002B89 },
- { "America/Argentina/Buenos_Aires" , 0x002CEE },
- { "America/Argentina/Catamarca" , 0x002E9C },
- { "America/Argentina/ComodRivadavia" , 0x00305D },
- { "America/Argentina/Cordoba" , 0x003203 },
- { "America/Argentina/Jujuy" , 0x0033D8 },
- { "America/Argentina/La_Rioja" , 0x00358C },
- { "America/Argentina/Mendoza" , 0x003744 },
- { "America/Argentina/Rio_Gallegos" , 0x003904 },
- { "America/Argentina/Salta" , 0x003AB9 },
- { "America/Argentina/San_Juan" , 0x003C65 },
- { "America/Argentina/San_Luis" , 0x003E1D },
- { "America/Argentina/Tucuman" , 0x003FE3 },
- { "America/Argentina/Ushuaia" , 0x00419F },
- { "America/Aruba" , 0x00435A },
- { "America/Asuncion" , 0x0043C0 },
- { "America/Atikokan" , 0x0046A5 },
- { "America/Atka" , 0x00477B },
- { "America/Bahia" , 0x004AE1 },
- { "America/Bahia_Banderas" , 0x004C74 },
- { "America/Barbados" , 0x004EED },
- { "America/Belem" , 0x004F87 },
- { "America/Belize" , 0x005082 },
- { "America/Blanc-Sablon" , 0x0051FE },
- { "America/Boa_Vista" , 0x0052B2 },
- { "America/Bogota" , 0x0053BB },
- { "America/Boise" , 0x005427 },
- { "America/Buenos_Aires" , 0x0057BE },
- { "America/Cambridge_Bay" , 0x005957 },
- { "America/Campo_Grande" , 0x005C7F },
- { "America/Cancun" , 0x005F6E },
- { "America/Caracas" , 0x0061B0 },
- { "America/Catamarca" , 0x006217 },
- { "America/Cayenne" , 0x0063BD },
- { "America/Cayman" , 0x00641F },
- { "America/Chicago" , 0x006474 },
- { "America/Chihuahua" , 0x00698B },
- { "America/Coral_Harbour" , 0x006BF6 },
- { "America/Cordoba" , 0x006C88 },
- { "America/Costa_Rica" , 0x006E2E },
- { "America/Creston" , 0x006EB8 },
- { "America/Cuiaba" , 0x006F44 },
- { "America/Curacao" , 0x007222 },
- { "America/Danmarkshavn" , 0x007288 },
- { "America/Dawson" , 0x0073CC },
- { "America/Dawson_Creek" , 0x0076E9 },
- { "America/Denver" , 0x0078C3 },
- { "America/Detroit" , 0x007C49 },
- { "America/Dominica" , 0x007FA8 },
- { "America/Edmonton" , 0x007FFD },
- { "America/Eirunepe" , 0x0083B5 },
- { "America/El_Salvador" , 0x0084CD },
- { "America/Ensenada" , 0x008542 },
- { "America/Fort_Wayne" , 0x0089E9 },
- { "America/Fortaleza" , 0x0088AB },
- { "America/Glace_Bay" , 0x008C53 },
- { "America/Godthab" , 0x008FCA },
- { "America/Goose_Bay" , 0x00928E },
- { "America/Grand_Turk" , 0x00974B },
- { "America/Grenada" , 0x009920 },
- { "America/Guadeloupe" , 0x009975 },
- { "America/Guatemala" , 0x0099CA },
- { "America/Guayaquil" , 0x009A53 },
- { "America/Guyana" , 0x009AB0 },
- { "America/Halifax" , 0x009B31 },
- { "America/Havana" , 0x00A047 },
- { "America/Hermosillo" , 0x00A3BA },
- { "America/Indiana/Indianapolis" , 0x00A498 },
- { "America/Indiana/Knox" , 0x00A729 },
- { "America/Indiana/Marengo" , 0x00AAC0 },
- { "America/Indiana/Petersburg" , 0x00AD66 },
- { "America/Indiana/Tell_City" , 0x00B2B3 },
- { "America/Indiana/Vevay" , 0x00B54C },
- { "America/Indiana/Vincennes" , 0x00B787 },
- { "America/Indiana/Winamac" , 0x00BA3B },
- { "America/Indianapolis" , 0x00B049 },
- { "America/Inuvik" , 0x00BCF4 },
- { "America/Iqaluit" , 0x00BFEB },
- { "America/Jamaica" , 0x00C30D },
- { "America/Jujuy" , 0x00C3D2 },
- { "America/Juneau" , 0x00C57C },
- { "America/Kentucky/Louisville" , 0x00C8FA },
- { "America/Kentucky/Monticello" , 0x00CD18 },
- { "America/Knox_IN" , 0x00D09D },
- { "America/Kralendijk" , 0x00D40E },
- { "America/La_Paz" , 0x00D474 },
- { "America/Lima" , 0x00D4DB },
- { "America/Los_Angeles" , 0x00D583 },
- { "America/Louisville" , 0x00D994 },
- { "America/Lower_Princes" , 0x00DD89 },
- { "America/Maceio" , 0x00DDEF },
- { "America/Managua" , 0x00DF29 },
- { "America/Manaus" , 0x00DFDC },
- { "America/Marigot" , 0x00E0DE },
- { "America/Martinique" , 0x00E133 },
- { "America/Matamoros" , 0x00E19F },
- { "America/Mazatlan" , 0x00E3F8 },
- { "America/Mendoza" , 0x00E665 },
- { "America/Menominee" , 0x00E819 },
- { "America/Merida" , 0x00EB9A },
- { "America/Metlakatla" , 0x00EDD5 },
- { "America/Mexico_City" , 0x00EF10 },
- { "America/Miquelon" , 0x00F18B },
- { "America/Moncton" , 0x00F3FD },
- { "America/Monterrey" , 0x00F894 },
- { "America/Montevideo" , 0x00FAF7 },
- { "America/Montreal" , 0x00FE09 },
- { "America/Montserrat" , 0x0102F9 },
- { "America/Nassau" , 0x01034E },
- { "America/New_York" , 0x010693 },
- { "America/Nipigon" , 0x010B9E },
- { "America/Nome" , 0x010EEF },
- { "America/Noronha" , 0x01126D },
- { "America/North_Dakota/Beulah" , 0x01139D },
- { "America/North_Dakota/Center" , 0x011731 },
- { "America/North_Dakota/New_Salem" , 0x011AC5 },
- { "America/Ojinaga" , 0x011E6E },
- { "America/Panama" , 0x0120CF },
- { "America/Pangnirtung" , 0x012124 },
- { "America/Paramaribo" , 0x01245A },
- { "America/Phoenix" , 0x0124EC },
- { "America/Port-au-Prince" , 0x0125AA },
- { "America/Port_of_Spain" , 0x0128CE },
- { "America/Porto_Acre" , 0x0127CA },
- { "America/Porto_Velho" , 0x012923 },
- { "America/Puerto_Rico" , 0x012A19 },
- { "America/Rainy_River" , 0x012A84 },
- { "America/Rankin_Inlet" , 0x012DBC },
- { "America/Recife" , 0x0130A2 },
- { "America/Regina" , 0x0131CC },
- { "America/Resolute" , 0x01338A },
- { "America/Rio_Branco" , 0x013672 },
- { "America/Rosario" , 0x01377A },
- { "America/Santa_Isabel" , 0x013920 },
- { "America/Santarem" , 0x013CC3 },
- { "America/Santiago" , 0x013DC8 },
- { "America/Santo_Domingo" , 0x014171 },
- { "America/Sao_Paulo" , 0x014237 },
- { "America/Scoresbysund" , 0x014546 },
- { "America/Shiprock" , 0x014834 },
- { "America/Sitka" , 0x014BAD },
- { "America/St_Barthelemy" , 0x014F35 },
- { "America/St_Johns" , 0x014F8A },
- { "America/St_Kitts" , 0x0154DD },
- { "America/St_Lucia" , 0x015532 },
- { "America/St_Thomas" , 0x015587 },
- { "America/St_Vincent" , 0x0155DC },
- { "America/Swift_Current" , 0x015631 },
- { "America/Tegucigalpa" , 0x015752 },
- { "America/Thule" , 0x0157D1 },
- { "America/Thunder_Bay" , 0x015A18 },
- { "America/Tijuana" , 0x015D61 },
- { "America/Toronto" , 0x0160FA },
- { "America/Tortola" , 0x01661A },
- { "America/Vancouver" , 0x01666F },
- { "America/Virgin" , 0x016AAC },
- { "America/Whitehorse" , 0x016B01 },
- { "America/Winnipeg" , 0x016E1E },
- { "America/Yakutat" , 0x01725E },
- { "America/Yellowknife" , 0x0175C9 },
- { "Antarctica/Casey" , 0x0178D9 },
- { "Antarctica/Davis" , 0x017977 },
- { "Antarctica/DumontDUrville" , 0x017A18 },
- { "Antarctica/Macquarie" , 0x017AA9 },
- { "Antarctica/Mawson" , 0x017CF6 },
- { "Antarctica/McMurdo" , 0x017D72 },
- { "Antarctica/Palmer" , 0x01811D },
- { "Antarctica/Rothera" , 0x018439 },
- { "Antarctica/South_Pole" , 0x0184AF },
- { "Antarctica/Syowa" , 0x01882D },
- { "Antarctica/Troll" , 0x01889B },
- { "Antarctica/Vostok" , 0x018A6D },
- { "Arctic/Longyearbyen" , 0x018ADE },
- { "Asia/Aden" , 0x018E10 },
- { "Asia/Almaty" , 0x018E65 },
- { "Asia/Amman" , 0x018FE4 },
- { "Asia/Anadyr" , 0x01929A },
- { "Asia/Aqtau" , 0x01949C },
- { "Asia/Aqtobe" , 0x01969B },
- { "Asia/Ashgabat" , 0x019853 },
- { "Asia/Ashkhabad" , 0x019970 },
- { "Asia/Baghdad" , 0x019A8D },
- { "Asia/Bahrain" , 0x019C02 },
- { "Asia/Baku" , 0x019C68 },
- { "Asia/Bangkok" , 0x019F50 },
- { "Asia/Beirut" , 0x019FA5 },
- { "Asia/Bishkek" , 0x01A2B2 },
- { "Asia/Brunei" , 0x01A45E },
- { "Asia/Calcutta" , 0x01A4C0 },
- { "Asia/Chita" , 0x01A539 },
- { "Asia/Choibalsan" , 0x01A74E },
- { "Asia/Chongqing" , 0x01A8C7 },
- { "Asia/Chungking" , 0x01A967 },
- { "Asia/Colombo" , 0x01AA07 },
- { "Asia/Dacca" , 0x01AAA3 },
- { "Asia/Damascus" , 0x01AB49 },
- { "Asia/Dhaka" , 0x01AE99 },
- { "Asia/Dili" , 0x01AF3F },
- { "Asia/Dubai" , 0x01AFC9 },
- { "Asia/Dushanbe" , 0x01B01E },
- { "Asia/Gaza" , 0x01B121 },
- { "Asia/Harbin" , 0x01B474 },
- { "Asia/Hebron" , 0x01B514 },
- { "Asia/Ho_Chi_Minh" , 0x01B870 },
- { "Asia/Hong_Kong" , 0x01B912 },
- { "Asia/Hovd" , 0x01BAD4 },
- { "Asia/Irkutsk" , 0x01BC4C },
- { "Asia/Istanbul" , 0x01BE37 },
- { "Asia/Jakarta" , 0x01C224 },
- { "Asia/Jayapura" , 0x01C2CE },
- { "Asia/Jerusalem" , 0x01C36B },
- { "Asia/Kabul" , 0x01C69A },
- { "Asia/Kamchatka" , 0x01C6EB },
- { "Asia/Karachi" , 0x01C8E4 },
- { "Asia/Kashgar" , 0x01C999 },
- { "Asia/Kathmandu" , 0x01C9EE },
- { "Asia/Katmandu" , 0x01CA54 },
- { "Asia/Khandyga" , 0x01CABA },
- { "Asia/Kolkata" , 0x01CCE4 },
- { "Asia/Krasnoyarsk" , 0x01CD5D },
- { "Asia/Kuala_Lumpur" , 0x01CF4A },
- { "Asia/Kuching" , 0x01D007 },
- { "Asia/Kuwait" , 0x01D0F5 },
- { "Asia/Macao" , 0x01D14A },
- { "Asia/Macau" , 0x01D285 },
- { "Asia/Magadan" , 0x01D3C0 },
- { "Asia/Makassar" , 0x01D5C4 },
- { "Asia/Manila" , 0x01D689 },
- { "Asia/Muscat" , 0x01D70E },
- { "Asia/Nicosia" , 0x01D763 },
- { "Asia/Novokuznetsk" , 0x01DA4B },
- { "Asia/Novosibirsk" , 0x01DC6B },
- { "Asia/Omsk" , 0x01DE5B },
- { "Asia/Oral" , 0x01E047 },
- { "Asia/Phnom_Penh" , 0x01E217 },
- { "Asia/Pontianak" , 0x01E26C },
- { "Asia/Pyongyang" , 0x01E32E },
- { "Asia/Qatar" , 0x01E3BE },
- { "Asia/Qyzylorda" , 0x01E424 },
- { "Asia/Rangoon" , 0x01E5FA },
- { "Asia/Riyadh" , 0x01E672 },
- { "Asia/Saigon" , 0x01E6C7 },
- { "Asia/Sakhalin" , 0x01E769 },
- { "Asia/Samarkand" , 0x01E966 },
- { "Asia/Seoul" , 0x01EA9C },
- { "Asia/Shanghai" , 0x01EB63 },
- { "Asia/Singapore" , 0x01EC0F },
- { "Asia/Srednekolymsk" , 0x01ECC6 },
- { "Asia/Taipei" , 0x01EEC6 },
- { "Asia/Tashkent" , 0x01EFF7 },
- { "Asia/Tbilisi" , 0x01F128 },
- { "Asia/Tehran" , 0x01F2E2 },
- { "Asia/Tel_Aviv" , 0x01F550 },
- { "Asia/Thimbu" , 0x01F87F },
- { "Asia/Thimphu" , 0x01F8E5 },
- { "Asia/Tokyo" , 0x01F94B },
- { "Asia/Ujung_Pandang" , 0x01F9D5 },
- { "Asia/Ulaanbaatar" , 0x01FA52 },
- { "Asia/Ulan_Bator" , 0x01FBAD },
- { "Asia/Urumqi" , 0x01FCFA },
- { "Asia/Ust-Nera" , 0x01FD5C },
- { "Asia/Vientiane" , 0x01FF6E },
- { "Asia/Vladivostok" , 0x01FFC3 },
- { "Asia/Yakutsk" , 0x0201AD },
- { "Asia/Yekaterinburg" , 0x020397 },
- { "Asia/Yerevan" , 0x0205B8 },
- { "Atlantic/Azores" , 0x0207B8 },
- { "Atlantic/Bermuda" , 0x020CBB },
- { "Atlantic/Canary" , 0x020F9C },
- { "Atlantic/Cape_Verde" , 0x021272 },
- { "Atlantic/Faeroe" , 0x0212EB },
- { "Atlantic/Faroe" , 0x02158F },
- { "Atlantic/Jan_Mayen" , 0x021833 },
- { "Atlantic/Madeira" , 0x021B65 },
- { "Atlantic/Reykjavik" , 0x02206E },
- { "Atlantic/South_Georgia" , 0x022227 },
- { "Atlantic/St_Helena" , 0x022439 },
- { "Atlantic/Stanley" , 0x02226B },
- { "Australia/ACT" , 0x02248E },
- { "Australia/Adelaide" , 0x0227B1 },
- { "Australia/Brisbane" , 0x022AE3 },
- { "Australia/Broken_Hill" , 0x022BB0 },
- { "Australia/Canberra" , 0x022EF4 },
- { "Australia/Currie" , 0x023217 },
- { "Australia/Darwin" , 0x023550 },
- { "Australia/Eucla" , 0x0235DC },
- { "Australia/Hobart" , 0x0236B8 },
- { "Australia/LHI" , 0x023A1C },
- { "Australia/Lindeman" , 0x023CBD },
- { "Australia/Lord_Howe" , 0x023DA4 },
- { "Australia/Melbourne" , 0x024055 },
- { "Australia/North" , 0x024380 },
- { "Australia/NSW" , 0x0243FA },
- { "Australia/Perth" , 0x02471D },
- { "Australia/Queensland" , 0x0247FB },
- { "Australia/South" , 0x0248AD },
- { "Australia/Sydney" , 0x024BD0 },
- { "Australia/Tasmania" , 0x024F13 },
- { "Australia/Victoria" , 0x02525E },
- { "Australia/West" , 0x025581 },
- { "Australia/Yancowinna" , 0x02563D },
- { "Brazil/Acre" , 0x025965 },
- { "Brazil/DeNoronha" , 0x025A69 },
- { "Brazil/East" , 0x025B89 },
- { "Brazil/West" , 0x025E66 },
- { "Canada/Atlantic" , 0x025F5E },
- { "Canada/Central" , 0x026446 },
- { "Canada/East-Saskatchewan" , 0x026D50 },
- { "Canada/Eastern" , 0x026860 },
- { "Canada/Mountain" , 0x026ED9 },
- { "Canada/Newfoundland" , 0x02724F },
- { "Canada/Pacific" , 0x02777A },
- { "Canada/Saskatchewan" , 0x027B93 },
- { "Canada/Yukon" , 0x027D1C },
- { "CET" , 0x02801F },
- { "Chile/Continental" , 0x028328 },
- { "Chile/EasterIsland" , 0x0286C3 },
- { "CST6CDT" , 0x028A05 },
- { "Cuba" , 0x028D56 },
- { "EET" , 0x0290C9 },
- { "Egypt" , 0x02937C },
- { "Eire" , 0x029763 },
- { "EST" , 0x029C74 },
- { "EST5EDT" , 0x029CB8 },
- { "Etc/GMT" , 0x02A009 },
- { "Etc/GMT+0" , 0x02A0D5 },
- { "Etc/GMT+1" , 0x02A15F },
- { "Etc/GMT+10" , 0x02A1EC },
- { "Etc/GMT+11" , 0x02A27A },
- { "Etc/GMT+12" , 0x02A308 },
- { "Etc/GMT+2" , 0x02A423 },
- { "Etc/GMT+3" , 0x02A4AF },
- { "Etc/GMT+4" , 0x02A53B },
- { "Etc/GMT+5" , 0x02A5C7 },
- { "Etc/GMT+6" , 0x02A653 },
- { "Etc/GMT+7" , 0x02A6DF },
- { "Etc/GMT+8" , 0x02A76B },
- { "Etc/GMT+9" , 0x02A7F7 },
- { "Etc/GMT-0" , 0x02A091 },
- { "Etc/GMT-1" , 0x02A119 },
- { "Etc/GMT-10" , 0x02A1A5 },
- { "Etc/GMT-11" , 0x02A233 },
- { "Etc/GMT-12" , 0x02A2C1 },
- { "Etc/GMT-13" , 0x02A34F },
- { "Etc/GMT-14" , 0x02A396 },
- { "Etc/GMT-2" , 0x02A3DD },
- { "Etc/GMT-3" , 0x02A469 },
- { "Etc/GMT-4" , 0x02A4F5 },
- { "Etc/GMT-5" , 0x02A581 },
- { "Etc/GMT-6" , 0x02A60D },
- { "Etc/GMT-7" , 0x02A699 },
- { "Etc/GMT-8" , 0x02A725 },
- { "Etc/GMT-9" , 0x02A7B1 },
- { "Etc/GMT0" , 0x02A04D },
- { "Etc/Greenwich" , 0x02A83D },
- { "Etc/UCT" , 0x02A881 },
- { "Etc/Universal" , 0x02A8C5 },
- { "Etc/UTC" , 0x02A909 },
- { "Etc/Zulu" , 0x02A94D },
- { "Europe/Amsterdam" , 0x02A991 },
- { "Europe/Andorra" , 0x02ADCF },
- { "Europe/Athens" , 0x02B04B },
- { "Europe/Belfast" , 0x02B38E },
- { "Europe/Belgrade" , 0x02B8C5 },
- { "Europe/Berlin" , 0x02BB8E },
- { "Europe/Bratislava" , 0x02BEF2 },
- { "Europe/Brussels" , 0x02C224 },
- { "Europe/Bucharest" , 0x02C65B },
- { "Europe/Budapest" , 0x02C985 },
- { "Europe/Busingen" , 0x02CCEE },
- { "Europe/Chisinau" , 0x02CFA5 },
- { "Europe/Copenhagen" , 0x02D333 },
- { "Europe/Dublin" , 0x02D63D },
- { "Europe/Gibraltar" , 0x02DB4E },
- { "Europe/Guernsey" , 0x02DFA5 },
- { "Europe/Helsinki" , 0x02E4DC },
- { "Europe/Isle_of_Man" , 0x02E792 },
- { "Europe/Istanbul" , 0x02ECC9 },
- { "Europe/Jersey" , 0x02F0B6 },
- { "Europe/Kaliningrad" , 0x02F5ED },
- { "Europe/Kiev" , 0x02F858 },
- { "Europe/Lisbon" , 0x02FB74 },
- { "Europe/Ljubljana" , 0x030078 },
- { "Europe/London" , 0x030341 },
- { "Europe/Luxembourg" , 0x030878 },
- { "Europe/Madrid" , 0x030CCE },
- { "Europe/Malta" , 0x031094 },
- { "Europe/Mariehamn" , 0x03144D },
- { "Europe/Minsk" , 0x031703 },
- { "Europe/Monaco" , 0x031916 },
- { "Europe/Moscow" , 0x031D51 },
- { "Europe/Nicosia" , 0x031FAB },
- { "Europe/Oslo" , 0x032293 },
- { "Europe/Paris" , 0x0325C5 },
- { "Europe/Podgorica" , 0x032A0B },
- { "Europe/Prague" , 0x032CD4 },
- { "Europe/Riga" , 0x033006 },
- { "Europe/Rome" , 0x03334B },
- { "Europe/Samara" , 0x03370E },
- { "Europe/San_Marino" , 0x033977 },
- { "Europe/Sarajevo" , 0x033D3A },
- { "Europe/Simferopol" , 0x034003 },
- { "Europe/Skopje" , 0x034254 },
- { "Europe/Sofia" , 0x03451D },
- { "Europe/Stockholm" , 0x034825 },
- { "Europe/Tallinn" , 0x034AD4 },
- { "Europe/Tirane" , 0x034E0E },
- { "Europe/Tiraspol" , 0x035114 },
- { "Europe/Uzhgorod" , 0x0354A2 },
- { "Europe/Vaduz" , 0x0357B9 },
- { "Europe/Vatican" , 0x035A68 },
- { "Europe/Vienna" , 0x035E2B },
- { "Europe/Vilnius" , 0x036158 },
- { "Europe/Volgograd" , 0x036497 },
- { "Europe/Warsaw" , 0x0366B8 },
- { "Europe/Zagreb" , 0x036A99 },
- { "Europe/Zaporozhye" , 0x036D62 },
- { "Europe/Zurich" , 0x0370A3 },
- { "Factory" , 0x037352 },
- { "GB" , 0x0373C3 },
- { "GB-Eire" , 0x0378FA },
- { "GMT" , 0x037E31 },
- { "GMT+0" , 0x037EFD },
- { "GMT-0" , 0x037EB9 },
- { "GMT0" , 0x037E75 },
- { "Greenwich" , 0x037F41 },
- { "Hongkong" , 0x037F85 },
- { "HST" , 0x038147 },
- { "Iceland" , 0x03818B },
- { "Indian/Antananarivo" , 0x038344 },
- { "Indian/Chagos" , 0x0383B8 },
- { "Indian/Christmas" , 0x03841A },
- { "Indian/Cocos" , 0x03845E },
- { "Indian/Comoro" , 0x0384A2 },
- { "Indian/Kerguelen" , 0x0384F7 },
- { "Indian/Mahe" , 0x03854C },
- { "Indian/Maldives" , 0x0385A1 },
- { "Indian/Mauritius" , 0x0385F6 },
- { "Indian/Mayotte" , 0x03866C },
- { "Indian/Reunion" , 0x0386C1 },
- { "Iran" , 0x038716 },
- { "Israel" , 0x038984 },
- { "Jamaica" , 0x038CB3 },
- { "Japan" , 0x038D78 },
- { "Kwajalein" , 0x038E02 },
- { "Libya" , 0x038E65 },
- { "MET" , 0x038F6E },
- { "Mexico/BajaNorte" , 0x039277 },
- { "Mexico/BajaSur" , 0x0395E0 },
- { "Mexico/General" , 0x039825 },
- { "MST" , 0x039A83 },
- { "MST7MDT" , 0x039AC7 },
- { "Navajo" , 0x039E18 },
- { "NZ" , 0x03A191 },
- { "NZ-CHAT" , 0x03A50F },
- { "Pacific/Apia" , 0x03A7F3 },
- { "Pacific/Auckland" , 0x03A98F },
- { "Pacific/Bougainville" , 0x03AD1B },
- { "Pacific/Chatham" , 0x03AD92 },
- { "Pacific/Chuuk" , 0x03B085 },
- { "Pacific/Easter" , 0x03B0DE },
- { "Pacific/Efate" , 0x03B42D },
- { "Pacific/Enderbury" , 0x03B4F3 },
- { "Pacific/Fakaofo" , 0x03B561 },
- { "Pacific/Fiji" , 0x03B5B2 },
- { "Pacific/Funafuti" , 0x03B745 },
- { "Pacific/Galapagos" , 0x03B789 },
- { "Pacific/Gambier" , 0x03B801 },
- { "Pacific/Guadalcanal" , 0x03B866 },
- { "Pacific/Guam" , 0x03B8BB },
- { "Pacific/Honolulu" , 0x03B911 },
- { "Pacific/Johnston" , 0x03B988 },
- { "Pacific/Kiritimati" , 0x03BA07 },
- { "Pacific/Kosrae" , 0x03BA72 },
- { "Pacific/Kwajalein" , 0x03BACF },
- { "Pacific/Majuro" , 0x03BB3B },
- { "Pacific/Marquesas" , 0x03BB9A },
- { "Pacific/Midway" , 0x03BC01 },
- { "Pacific/Nauru" , 0x03BC8B },
- { "Pacific/Niue" , 0x03BD03 },
- { "Pacific/Norfolk" , 0x03BD61 },
- { "Pacific/Noumea" , 0x03BDB6 },
- { "Pacific/Pago_Pago" , 0x03BE46 },
- { "Pacific/Palau" , 0x03BEBD },
- { "Pacific/Pitcairn" , 0x03BF01 },
- { "Pacific/Pohnpei" , 0x03BF56 },
- { "Pacific/Ponape" , 0x03BFAB },
- { "Pacific/Port_Moresby" , 0x03BFF0 },
- { "Pacific/Rarotonga" , 0x03C042 },
- { "Pacific/Saipan" , 0x03C11E },
- { "Pacific/Samoa" , 0x03C181 },
- { "Pacific/Tahiti" , 0x03C1F8 },
- { "Pacific/Tarawa" , 0x03C25D },
- { "Pacific/Tongatapu" , 0x03C2B1 },
- { "Pacific/Truk" , 0x03C33D },
- { "Pacific/Wake" , 0x03C382 },
- { "Pacific/Wallis" , 0x03C3D2 },
- { "Pacific/Yap" , 0x03C416 },
- { "Poland" , 0x03C45B },
- { "Portugal" , 0x03C83C },
- { "PRC" , 0x03CD38 },
- { "PST8PDT" , 0x03CDD8 },
- { "ROC" , 0x03D129 },
- { "ROK" , 0x03D25A },
- { "Singapore" , 0x03D321 },
- { "Turkey" , 0x03D3D8 },
- { "UCT" , 0x03D7C5 },
- { "Universal" , 0x03D809 },
- { "US/Alaska" , 0x03D84D },
- { "US/Aleutian" , 0x03DBB6 },
- { "US/Arizona" , 0x03DF1C },
- { "US/Central" , 0x03DFAA },
- { "US/East-Indiana" , 0x03E9B4 },
- { "US/Eastern" , 0x03E4B5 },
- { "US/Hawaii" , 0x03EC1E },
- { "US/Indiana-Starke" , 0x03EC8F },
- { "US/Michigan" , 0x03F000 },
- { "US/Mountain" , 0x03F337 },
- { "US/Pacific" , 0x03F6B0 },
- { "US/Pacific-New" , 0x03FAB5 },
- { "US/Samoa" , 0x03FEBA },
- { "UTC" , 0x03FF31 },
- { "W-SU" , 0x040228 },
- { "WET" , 0x03FF75 },
- { "Zulu" , 0x04046B },
+ { "Africa/Algiers" , 0x00021C },
+ { "Africa/Asmara" , 0x000347 },
+ { "Africa/Asmera" , 0x0003C6 },
+ { "Africa/Bamako" , 0x000445 },
+ { "Africa/Bangui" , 0x00049A },
+ { "Africa/Banjul" , 0x0004EF },
+ { "Africa/Bissau" , 0x000544 },
+ { "Africa/Blantyre" , 0x0005AA },
+ { "Africa/Brazzaville" , 0x0005FF },
+ { "Africa/Bujumbura" , 0x000654 },
+ { "Africa/Cairo" , 0x0006A9 },
+ { "Africa/Casablanca" , 0x000A90 },
+ { "Africa/Ceuta" , 0x000CF2 },
+ { "Africa/Conakry" , 0x000FF9 },
+ { "Africa/Dakar" , 0x00104E },
+ { "Africa/Dar_es_Salaam" , 0x0010A3 },
+ { "Africa/Djibouti" , 0x001122 },
+ { "Africa/Douala" , 0x0011A1 },
+ { "Africa/El_Aaiun" , 0x0011F6 },
+ { "Africa/Freetown" , 0x001421 },
+ { "Africa/Gaborone" , 0x001476 },
+ { "Africa/Harare" , 0x0014CB },
+ { "Africa/Johannesburg" , 0x001520 },
+ { "Africa/Juba" , 0x00158E },
+ { "Africa/Kampala" , 0x0016A1 },
+ { "Africa/Khartoum" , 0x001720 },
+ { "Africa/Kigali" , 0x001833 },
+ { "Africa/Kinshasa" , 0x001888 },
+ { "Africa/Lagos" , 0x0018F4 },
+ { "Africa/Libreville" , 0x001949 },
+ { "Africa/Lome" , 0x00199E },
+ { "Africa/Luanda" , 0x0019F3 },
+ { "Africa/Lubumbashi" , 0x001A48 },
+ { "Africa/Lusaka" , 0x001AB4 },
+ { "Africa/Malabo" , 0x001B09 },
+ { "Africa/Maputo" , 0x001B5E },
+ { "Africa/Maseru" , 0x001BB3 },
+ { "Africa/Mbabane" , 0x001C21 },
+ { "Africa/Mogadishu" , 0x001C8F },
+ { "Africa/Monrovia" , 0x001D0E },
+ { "Africa/Nairobi" , 0x001D74 },
+ { "Africa/Ndjamena" , 0x001DF3 },
+ { "Africa/Niamey" , 0x001E5F },
+ { "Africa/Nouakchott" , 0x001EB4 },
+ { "Africa/Ouagadougou" , 0x001F09 },
+ { "Africa/Porto-Novo" , 0x001F5E },
+ { "Africa/Sao_Tome" , 0x001FB3 },
+ { "Africa/Timbuktu" , 0x002008 },
+ { "Africa/Tripoli" , 0x00205D },
+ { "Africa/Tunis" , 0x002166 },
+ { "Africa/Windhoek" , 0x002278 },
+ { "America/Adak" , 0x0024BF },
+ { "America/Anchorage" , 0x002835 },
+ { "America/Anguilla" , 0x002BA9 },
+ { "America/Antigua" , 0x002BFE },
+ { "America/Araguaina" , 0x002C64 },
+ { "America/Argentina/Buenos_Aires" , 0x002DC9 },
+ { "America/Argentina/Catamarca" , 0x002F77 },
+ { "America/Argentina/ComodRivadavia" , 0x003138 },
+ { "America/Argentina/Cordoba" , 0x0032DE },
+ { "America/Argentina/Jujuy" , 0x0034B3 },
+ { "America/Argentina/La_Rioja" , 0x003667 },
+ { "America/Argentina/Mendoza" , 0x00381F },
+ { "America/Argentina/Rio_Gallegos" , 0x0039DF },
+ { "America/Argentina/Salta" , 0x003B94 },
+ { "America/Argentina/San_Juan" , 0x003D40 },
+ { "America/Argentina/San_Luis" , 0x003EF8 },
+ { "America/Argentina/Tucuman" , 0x0040BE },
+ { "America/Argentina/Ushuaia" , 0x00427A },
+ { "America/Aruba" , 0x004435 },
+ { "America/Asuncion" , 0x00449B },
+ { "America/Atikokan" , 0x004780 },
+ { "America/Atka" , 0x004856 },
+ { "America/Bahia" , 0x004BBC },
+ { "America/Bahia_Banderas" , 0x004D4F },
+ { "America/Barbados" , 0x004FC8 },
+ { "America/Belem" , 0x005062 },
+ { "America/Belize" , 0x00515D },
+ { "America/Blanc-Sablon" , 0x0052D9 },
+ { "America/Boa_Vista" , 0x00538D },
+ { "America/Bogota" , 0x005496 },
+ { "America/Boise" , 0x005502 },
+ { "America/Buenos_Aires" , 0x005899 },
+ { "America/Cambridge_Bay" , 0x005A32 },
+ { "America/Campo_Grande" , 0x005D5A },
+ { "America/Cancun" , 0x006049 },
+ { "America/Caracas" , 0x00628B },
+ { "America/Catamarca" , 0x0062F2 },
+ { "America/Cayenne" , 0x006498 },
+ { "America/Cayman" , 0x0064FA },
+ { "America/Chicago" , 0x00654F },
+ { "America/Chihuahua" , 0x006A66 },
+ { "America/Coral_Harbour" , 0x006CD1 },
+ { "America/Cordoba" , 0x006D63 },
+ { "America/Costa_Rica" , 0x006F09 },
+ { "America/Creston" , 0x006F93 },
+ { "America/Cuiaba" , 0x00701F },
+ { "America/Curacao" , 0x0072FD },
+ { "America/Danmarkshavn" , 0x007363 },
+ { "America/Dawson" , 0x0074A7 },
+ { "America/Dawson_Creek" , 0x0077C4 },
+ { "America/Denver" , 0x00799E },
+ { "America/Detroit" , 0x007D24 },
+ { "America/Dominica" , 0x008083 },
+ { "America/Edmonton" , 0x0080D8 },
+ { "America/Eirunepe" , 0x008490 },
+ { "America/El_Salvador" , 0x0085A8 },
+ { "America/Ensenada" , 0x00861D },
+ { "America/Fort_Wayne" , 0x008AC4 },
+ { "America/Fortaleza" , 0x008986 },
+ { "America/Glace_Bay" , 0x008D2E },
+ { "America/Godthab" , 0x0090A5 },
+ { "America/Goose_Bay" , 0x009369 },
+ { "America/Grand_Turk" , 0x009826 },
+ { "America/Grenada" , 0x009A05 },
+ { "America/Guadeloupe" , 0x009A5A },
+ { "America/Guatemala" , 0x009AAF },
+ { "America/Guayaquil" , 0x009B38 },
+ { "America/Guyana" , 0x009B95 },
+ { "America/Halifax" , 0x009C16 },
+ { "America/Havana" , 0x00A12C },
+ { "America/Hermosillo" , 0x00A49F },
+ { "America/Indiana/Indianapolis" , 0x00A57D },
+ { "America/Indiana/Knox" , 0x00A80E },
+ { "America/Indiana/Marengo" , 0x00ABA5 },
+ { "America/Indiana/Petersburg" , 0x00AE4B },
+ { "America/Indiana/Tell_City" , 0x00B398 },
+ { "America/Indiana/Vevay" , 0x00B631 },
+ { "America/Indiana/Vincennes" , 0x00B86C },
+ { "America/Indiana/Winamac" , 0x00BB20 },
+ { "America/Indianapolis" , 0x00B12E },
+ { "America/Inuvik" , 0x00BDD9 },
+ { "America/Iqaluit" , 0x00C0D0 },
+ { "America/Jamaica" , 0x00C3F2 },
+ { "America/Jujuy" , 0x00C4B7 },
+ { "America/Juneau" , 0x00C661 },
+ { "America/Kentucky/Louisville" , 0x00C9DF },
+ { "America/Kentucky/Monticello" , 0x00CDFD },
+ { "America/Knox_IN" , 0x00D182 },
+ { "America/Kralendijk" , 0x00D4F3 },
+ { "America/La_Paz" , 0x00D559 },
+ { "America/Lima" , 0x00D5C0 },
+ { "America/Los_Angeles" , 0x00D668 },
+ { "America/Louisville" , 0x00DA79 },
+ { "America/Lower_Princes" , 0x00DE6E },
+ { "America/Maceio" , 0x00DED4 },
+ { "America/Managua" , 0x00E00E },
+ { "America/Manaus" , 0x00E0C1 },
+ { "America/Marigot" , 0x00E1C3 },
+ { "America/Martinique" , 0x00E218 },
+ { "America/Matamoros" , 0x00E284 },
+ { "America/Mazatlan" , 0x00E4DD },
+ { "America/Mendoza" , 0x00E74A },
+ { "America/Menominee" , 0x00E8FE },
+ { "America/Merida" , 0x00EC7F },
+ { "America/Metlakatla" , 0x00EEBA },
+ { "America/Mexico_City" , 0x00EFF5 },
+ { "America/Miquelon" , 0x00F270 },
+ { "America/Moncton" , 0x00F4E2 },
+ { "America/Monterrey" , 0x00F979 },
+ { "America/Montevideo" , 0x00FBDC },
+ { "America/Montreal" , 0x00FEEE },
+ { "America/Montserrat" , 0x0103DE },
+ { "America/Nassau" , 0x010433 },
+ { "America/New_York" , 0x010778 },
+ { "America/Nipigon" , 0x010C83 },
+ { "America/Nome" , 0x010FD4 },
+ { "America/Noronha" , 0x011352 },
+ { "America/North_Dakota/Beulah" , 0x011482 },
+ { "America/North_Dakota/Center" , 0x011816 },
+ { "America/North_Dakota/New_Salem" , 0x011BAA },
+ { "America/Ojinaga" , 0x011F53 },
+ { "America/Panama" , 0x0121B4 },
+ { "America/Pangnirtung" , 0x012209 },
+ { "America/Paramaribo" , 0x01253F },
+ { "America/Phoenix" , 0x0125D1 },
+ { "America/Port-au-Prince" , 0x01268F },
+ { "America/Port_of_Spain" , 0x0129B3 },
+ { "America/Porto_Acre" , 0x0128AF },
+ { "America/Porto_Velho" , 0x012A08 },
+ { "America/Puerto_Rico" , 0x012AFE },
+ { "America/Rainy_River" , 0x012B69 },
+ { "America/Rankin_Inlet" , 0x012EA1 },
+ { "America/Recife" , 0x013187 },
+ { "America/Regina" , 0x0132B1 },
+ { "America/Resolute" , 0x01346F },
+ { "America/Rio_Branco" , 0x013757 },
+ { "America/Rosario" , 0x01385F },
+ { "America/Santa_Isabel" , 0x013A05 },
+ { "America/Santarem" , 0x013DA8 },
+ { "America/Santiago" , 0x013EAD },
+ { "America/Santo_Domingo" , 0x014256 },
+ { "America/Sao_Paulo" , 0x01431C },
+ { "America/Scoresbysund" , 0x01462B },
+ { "America/Shiprock" , 0x014919 },
+ { "America/Sitka" , 0x014C92 },
+ { "America/St_Barthelemy" , 0x01501A },
+ { "America/St_Johns" , 0x01506F },
+ { "America/St_Kitts" , 0x0155C2 },
+ { "America/St_Lucia" , 0x015617 },
+ { "America/St_Thomas" , 0x01566C },
+ { "America/St_Vincent" , 0x0156C1 },
+ { "America/Swift_Current" , 0x015716 },
+ { "America/Tegucigalpa" , 0x015837 },
+ { "America/Thule" , 0x0158B6 },
+ { "America/Thunder_Bay" , 0x015AFD },
+ { "America/Tijuana" , 0x015E46 },
+ { "America/Toronto" , 0x0161DF },
+ { "America/Tortola" , 0x0166FF },
+ { "America/Vancouver" , 0x016754 },
+ { "America/Virgin" , 0x016B91 },
+ { "America/Whitehorse" , 0x016BE6 },
+ { "America/Winnipeg" , 0x016F03 },
+ { "America/Yakutat" , 0x017343 },
+ { "America/Yellowknife" , 0x0176AE },
+ { "Antarctica/Casey" , 0x0179BE },
+ { "Antarctica/Davis" , 0x017A5C },
+ { "Antarctica/DumontDUrville" , 0x017AFD },
+ { "Antarctica/Macquarie" , 0x017B8E },
+ { "Antarctica/Mawson" , 0x017DDB },
+ { "Antarctica/McMurdo" , 0x017E57 },
+ { "Antarctica/Palmer" , 0x018202 },
+ { "Antarctica/Rothera" , 0x01851E },
+ { "Antarctica/South_Pole" , 0x018594 },
+ { "Antarctica/Syowa" , 0x018912 },
+ { "Antarctica/Troll" , 0x018980 },
+ { "Antarctica/Vostok" , 0x018B52 },
+ { "Arctic/Longyearbyen" , 0x018BC3 },
+ { "Asia/Aden" , 0x018EF5 },
+ { "Asia/Almaty" , 0x018F4A },
+ { "Asia/Amman" , 0x0190C9 },
+ { "Asia/Anadyr" , 0x01937F },
+ { "Asia/Aqtau" , 0x019581 },
+ { "Asia/Aqtobe" , 0x019780 },
+ { "Asia/Ashgabat" , 0x019938 },
+ { "Asia/Ashkhabad" , 0x019A55 },
+ { "Asia/Baghdad" , 0x019B72 },
+ { "Asia/Bahrain" , 0x019CE7 },
+ { "Asia/Baku" , 0x019D4D },
+ { "Asia/Bangkok" , 0x01A035 },
+ { "Asia/Beirut" , 0x01A08A },
+ { "Asia/Bishkek" , 0x01A397 },
+ { "Asia/Brunei" , 0x01A543 },
+ { "Asia/Calcutta" , 0x01A5A5 },
+ { "Asia/Chita" , 0x01A61E },
+ { "Asia/Choibalsan" , 0x01A833 },
+ { "Asia/Chongqing" , 0x01A9AC },
+ { "Asia/Chungking" , 0x01AA4C },
+ { "Asia/Colombo" , 0x01AAEC },
+ { "Asia/Dacca" , 0x01AB88 },
+ { "Asia/Damascus" , 0x01AC2E },
+ { "Asia/Dhaka" , 0x01AF7E },
+ { "Asia/Dili" , 0x01B024 },
+ { "Asia/Dubai" , 0x01B0AE },
+ { "Asia/Dushanbe" , 0x01B103 },
+ { "Asia/Gaza" , 0x01B206 },
+ { "Asia/Harbin" , 0x01B559 },
+ { "Asia/Hebron" , 0x01B5F9 },
+ { "Asia/Ho_Chi_Minh" , 0x01B955 },
+ { "Asia/Hong_Kong" , 0x01B9F7 },
+ { "Asia/Hovd" , 0x01BBB9 },
+ { "Asia/Irkutsk" , 0x01BD31 },
+ { "Asia/Istanbul" , 0x01BF1C },
+ { "Asia/Jakarta" , 0x01C309 },
+ { "Asia/Jayapura" , 0x01C3B3 },
+ { "Asia/Jerusalem" , 0x01C450 },
+ { "Asia/Kabul" , 0x01C77F },
+ { "Asia/Kamchatka" , 0x01C7D0 },
+ { "Asia/Karachi" , 0x01C9C9 },
+ { "Asia/Kashgar" , 0x01CA7E },
+ { "Asia/Kathmandu" , 0x01CAD3 },
+ { "Asia/Katmandu" , 0x01CB39 },
+ { "Asia/Khandyga" , 0x01CB9F },
+ { "Asia/Kolkata" , 0x01CDC9 },
+ { "Asia/Krasnoyarsk" , 0x01CE42 },
+ { "Asia/Kuala_Lumpur" , 0x01D02F },
+ { "Asia/Kuching" , 0x01D0EC },
+ { "Asia/Kuwait" , 0x01D1DA },
+ { "Asia/Macao" , 0x01D22F },
+ { "Asia/Macau" , 0x01D36A },
+ { "Asia/Magadan" , 0x01D4A5 },
+ { "Asia/Makassar" , 0x01D6A9 },
+ { "Asia/Manila" , 0x01D76E },
+ { "Asia/Muscat" , 0x01D7F3 },
+ { "Asia/Nicosia" , 0x01D848 },
+ { "Asia/Novokuznetsk" , 0x01DB30 },
+ { "Asia/Novosibirsk" , 0x01DD50 },
+ { "Asia/Omsk" , 0x01DF40 },
+ { "Asia/Oral" , 0x01E12C },
+ { "Asia/Phnom_Penh" , 0x01E2FC },
+ { "Asia/Pontianak" , 0x01E351 },
+ { "Asia/Pyongyang" , 0x01E413 },
+ { "Asia/Qatar" , 0x01E498 },
+ { "Asia/Qyzylorda" , 0x01E4FE },
+ { "Asia/Rangoon" , 0x01E6D4 },
+ { "Asia/Riyadh" , 0x01E74C },
+ { "Asia/Saigon" , 0x01E7A1 },
+ { "Asia/Sakhalin" , 0x01E843 },
+ { "Asia/Samarkand" , 0x01EA40 },
+ { "Asia/Seoul" , 0x01EB76 },
+ { "Asia/Shanghai" , 0x01EC69 },
+ { "Asia/Singapore" , 0x01ED15 },
+ { "Asia/Srednekolymsk" , 0x01EDCC },
+ { "Asia/Taipei" , 0x01EFCC },
+ { "Asia/Tashkent" , 0x01F0FD },
+ { "Asia/Tbilisi" , 0x01F22E },
+ { "Asia/Tehran" , 0x01F3E8 },
+ { "Asia/Tel_Aviv" , 0x01F656 },
+ { "Asia/Thimbu" , 0x01F985 },
+ { "Asia/Thimphu" , 0x01F9EB },
+ { "Asia/Tokyo" , 0x01FA51 },
+ { "Asia/Ujung_Pandang" , 0x01FADB },
+ { "Asia/Ulaanbaatar" , 0x01FB58 },
+ { "Asia/Ulan_Bator" , 0x01FCB3 },
+ { "Asia/Urumqi" , 0x01FE00 },
+ { "Asia/Ust-Nera" , 0x01FE62 },
+ { "Asia/Vientiane" , 0x020074 },
+ { "Asia/Vladivostok" , 0x0200C9 },
+ { "Asia/Yakutsk" , 0x0202B3 },
+ { "Asia/Yekaterinburg" , 0x02049D },
+ { "Asia/Yerevan" , 0x0206BE },
+ { "Atlantic/Azores" , 0x0208BE },
+ { "Atlantic/Bermuda" , 0x020DC1 },
+ { "Atlantic/Canary" , 0x0210A2 },
+ { "Atlantic/Cape_Verde" , 0x021378 },
+ { "Atlantic/Faeroe" , 0x0213F1 },
+ { "Atlantic/Faroe" , 0x021695 },
+ { "Atlantic/Jan_Mayen" , 0x021939 },
+ { "Atlantic/Madeira" , 0x021C6B },
+ { "Atlantic/Reykjavik" , 0x022174 },
+ { "Atlantic/South_Georgia" , 0x02232D },
+ { "Atlantic/St_Helena" , 0x02253F },
+ { "Atlantic/Stanley" , 0x022371 },
+ { "Australia/ACT" , 0x022594 },
+ { "Australia/Adelaide" , 0x0228B7 },
+ { "Australia/Brisbane" , 0x022BE9 },
+ { "Australia/Broken_Hill" , 0x022CB6 },
+ { "Australia/Canberra" , 0x022FFA },
+ { "Australia/Currie" , 0x02331D },
+ { "Australia/Darwin" , 0x023656 },
+ { "Australia/Eucla" , 0x0236E2 },
+ { "Australia/Hobart" , 0x0237BE },
+ { "Australia/LHI" , 0x023B22 },
+ { "Australia/Lindeman" , 0x023DC3 },
+ { "Australia/Lord_Howe" , 0x023EAA },
+ { "Australia/Melbourne" , 0x02415B },
+ { "Australia/North" , 0x024486 },
+ { "Australia/NSW" , 0x024500 },
+ { "Australia/Perth" , 0x024823 },
+ { "Australia/Queensland" , 0x024901 },
+ { "Australia/South" , 0x0249B3 },
+ { "Australia/Sydney" , 0x024CD6 },
+ { "Australia/Tasmania" , 0x025019 },
+ { "Australia/Victoria" , 0x025364 },
+ { "Australia/West" , 0x025687 },
+ { "Australia/Yancowinna" , 0x025743 },
+ { "Brazil/Acre" , 0x025A6B },
+ { "Brazil/DeNoronha" , 0x025B6F },
+ { "Brazil/East" , 0x025C8F },
+ { "Brazil/West" , 0x025F6C },
+ { "Canada/Atlantic" , 0x026064 },
+ { "Canada/Central" , 0x02654C },
+ { "Canada/East-Saskatchewan" , 0x026E56 },
+ { "Canada/Eastern" , 0x026966 },
+ { "Canada/Mountain" , 0x026FDF },
+ { "Canada/Newfoundland" , 0x027355 },
+ { "Canada/Pacific" , 0x027880 },
+ { "Canada/Saskatchewan" , 0x027C99 },
+ { "Canada/Yukon" , 0x027E22 },
+ { "CET" , 0x028125 },
+ { "Chile/Continental" , 0x02842E },
+ { "Chile/EasterIsland" , 0x0287C9 },
+ { "CST6CDT" , 0x028B0B },
+ { "Cuba" , 0x028E5C },
+ { "EET" , 0x0291CF },
+ { "Egypt" , 0x029482 },
+ { "Eire" , 0x029869 },
+ { "EST" , 0x029D7A },
+ { "EST5EDT" , 0x029DBE },
+ { "Etc/GMT" , 0x02A10F },
+ { "Etc/GMT+0" , 0x02A1DB },
+ { "Etc/GMT+1" , 0x02A265 },
+ { "Etc/GMT+10" , 0x02A2F2 },
+ { "Etc/GMT+11" , 0x02A380 },
+ { "Etc/GMT+12" , 0x02A40E },
+ { "Etc/GMT+2" , 0x02A529 },
+ { "Etc/GMT+3" , 0x02A5B5 },
+ { "Etc/GMT+4" , 0x02A641 },
+ { "Etc/GMT+5" , 0x02A6CD },
+ { "Etc/GMT+6" , 0x02A759 },
+ { "Etc/GMT+7" , 0x02A7E5 },
+ { "Etc/GMT+8" , 0x02A871 },
+ { "Etc/GMT+9" , 0x02A8FD },
+ { "Etc/GMT-0" , 0x02A197 },
+ { "Etc/GMT-1" , 0x02A21F },
+ { "Etc/GMT-10" , 0x02A2AB },
+ { "Etc/GMT-11" , 0x02A339 },
+ { "Etc/GMT-12" , 0x02A3C7 },
+ { "Etc/GMT-13" , 0x02A455 },
+ { "Etc/GMT-14" , 0x02A49C },
+ { "Etc/GMT-2" , 0x02A4E3 },
+ { "Etc/GMT-3" , 0x02A56F },
+ { "Etc/GMT-4" , 0x02A5FB },
+ { "Etc/GMT-5" , 0x02A687 },
+ { "Etc/GMT-6" , 0x02A713 },
+ { "Etc/GMT-7" , 0x02A79F },
+ { "Etc/GMT-8" , 0x02A82B },
+ { "Etc/GMT-9" , 0x02A8B7 },
+ { "Etc/GMT0" , 0x02A153 },
+ { "Etc/Greenwich" , 0x02A943 },
+ { "Etc/UCT" , 0x02A987 },
+ { "Etc/Universal" , 0x02A9CB },
+ { "Etc/UTC" , 0x02AA0F },
+ { "Etc/Zulu" , 0x02AA53 },
+ { "Europe/Amsterdam" , 0x02AA97 },
+ { "Europe/Andorra" , 0x02AED5 },
+ { "Europe/Athens" , 0x02B151 },
+ { "Europe/Belfast" , 0x02B494 },
+ { "Europe/Belgrade" , 0x02B9CB },
+ { "Europe/Berlin" , 0x02BC94 },
+ { "Europe/Bratislava" , 0x02BFF8 },
+ { "Europe/Brussels" , 0x02C32A },
+ { "Europe/Bucharest" , 0x02C761 },
+ { "Europe/Budapest" , 0x02CA8B },
+ { "Europe/Busingen" , 0x02CDF4 },
+ { "Europe/Chisinau" , 0x02D0AB },
+ { "Europe/Copenhagen" , 0x02D439 },
+ { "Europe/Dublin" , 0x02D743 },
+ { "Europe/Gibraltar" , 0x02DC54 },
+ { "Europe/Guernsey" , 0x02E0AB },
+ { "Europe/Helsinki" , 0x02E5E2 },
+ { "Europe/Isle_of_Man" , 0x02E898 },
+ { "Europe/Istanbul" , 0x02EDCF },
+ { "Europe/Jersey" , 0x02F1BC },
+ { "Europe/Kaliningrad" , 0x02F6F3 },
+ { "Europe/Kiev" , 0x02F95E },
+ { "Europe/Lisbon" , 0x02FC7A },
+ { "Europe/Ljubljana" , 0x03017E },
+ { "Europe/London" , 0x030447 },
+ { "Europe/Luxembourg" , 0x03097E },
+ { "Europe/Madrid" , 0x030DD4 },
+ { "Europe/Malta" , 0x03119A },
+ { "Europe/Mariehamn" , 0x031553 },
+ { "Europe/Minsk" , 0x031809 },
+ { "Europe/Monaco" , 0x031A1C },
+ { "Europe/Moscow" , 0x031E57 },
+ { "Europe/Nicosia" , 0x0320B1 },
+ { "Europe/Oslo" , 0x032399 },
+ { "Europe/Paris" , 0x0326CB },
+ { "Europe/Podgorica" , 0x032B11 },
+ { "Europe/Prague" , 0x032DDA },
+ { "Europe/Riga" , 0x03310C },
+ { "Europe/Rome" , 0x033451 },
+ { "Europe/Samara" , 0x033814 },
+ { "Europe/San_Marino" , 0x033A7D },
+ { "Europe/Sarajevo" , 0x033E40 },
+ { "Europe/Simferopol" , 0x034109 },
+ { "Europe/Skopje" , 0x03435A },
+ { "Europe/Sofia" , 0x034623 },
+ { "Europe/Stockholm" , 0x03492B },
+ { "Europe/Tallinn" , 0x034BDA },
+ { "Europe/Tirane" , 0x034F14 },
+ { "Europe/Tiraspol" , 0x03521A },
+ { "Europe/Uzhgorod" , 0x0355A8 },
+ { "Europe/Vaduz" , 0x0358BF },
+ { "Europe/Vatican" , 0x035B6E },
+ { "Europe/Vienna" , 0x035F31 },
+ { "Europe/Vilnius" , 0x03625E },
+ { "Europe/Volgograd" , 0x03659D },
+ { "Europe/Warsaw" , 0x0367BE },
+ { "Europe/Zagreb" , 0x036B9F },
+ { "Europe/Zaporozhye" , 0x036E68 },
+ { "Europe/Zurich" , 0x0371A9 },
+ { "Factory" , 0x037458 },
+ { "GB" , 0x0374C9 },
+ { "GB-Eire" , 0x037A00 },
+ { "GMT" , 0x037F37 },
+ { "GMT+0" , 0x038003 },
+ { "GMT-0" , 0x037FBF },
+ { "GMT0" , 0x037F7B },
+ { "Greenwich" , 0x038047 },
+ { "Hongkong" , 0x03808B },
+ { "HST" , 0x03824D },
+ { "Iceland" , 0x038291 },
+ { "Indian/Antananarivo" , 0x03844A },
+ { "Indian/Chagos" , 0x0384C9 },
+ { "Indian/Christmas" , 0x03852B },
+ { "Indian/Cocos" , 0x03856F },
+ { "Indian/Comoro" , 0x0385B3 },
+ { "Indian/Kerguelen" , 0x038632 },
+ { "Indian/Mahe" , 0x038687 },
+ { "Indian/Maldives" , 0x0386DC },
+ { "Indian/Mauritius" , 0x038731 },
+ { "Indian/Mayotte" , 0x0387A7 },
+ { "Indian/Reunion" , 0x038826 },
+ { "Iran" , 0x03887B },
+ { "Israel" , 0x038AE9 },
+ { "Jamaica" , 0x038E18 },
+ { "Japan" , 0x038EDD },
+ { "Kwajalein" , 0x038F67 },
+ { "Libya" , 0x038FCA },
+ { "MET" , 0x0390D3 },
+ { "Mexico/BajaNorte" , 0x0393DC },
+ { "Mexico/BajaSur" , 0x039745 },
+ { "Mexico/General" , 0x03998A },
+ { "MST" , 0x039BE8 },
+ { "MST7MDT" , 0x039C2C },
+ { "Navajo" , 0x039F7D },
+ { "NZ" , 0x03A2F6 },
+ { "NZ-CHAT" , 0x03A674 },
+ { "Pacific/Apia" , 0x03A958 },
+ { "Pacific/Auckland" , 0x03AAF4 },
+ { "Pacific/Bougainville" , 0x03AE80 },
+ { "Pacific/Chatham" , 0x03AEF7 },
+ { "Pacific/Chuuk" , 0x03B1EA },
+ { "Pacific/Easter" , 0x03B243 },
+ { "Pacific/Efate" , 0x03B592 },
+ { "Pacific/Enderbury" , 0x03B658 },
+ { "Pacific/Fakaofo" , 0x03B6C6 },
+ { "Pacific/Fiji" , 0x03B717 },
+ { "Pacific/Funafuti" , 0x03B8AA },
+ { "Pacific/Galapagos" , 0x03B8EE },
+ { "Pacific/Gambier" , 0x03B966 },
+ { "Pacific/Guadalcanal" , 0x03B9CB },
+ { "Pacific/Guam" , 0x03BA20 },
+ { "Pacific/Honolulu" , 0x03BA76 },
+ { "Pacific/Johnston" , 0x03BAED },
+ { "Pacific/Kiritimati" , 0x03BB6C },
+ { "Pacific/Kosrae" , 0x03BBD7 },
+ { "Pacific/Kwajalein" , 0x03BC34 },
+ { "Pacific/Majuro" , 0x03BCA0 },
+ { "Pacific/Marquesas" , 0x03BCFF },
+ { "Pacific/Midway" , 0x03BD66 },
+ { "Pacific/Nauru" , 0x03BDF0 },
+ { "Pacific/Niue" , 0x03BE68 },
+ { "Pacific/Norfolk" , 0x03BEC6 },
+ { "Pacific/Noumea" , 0x03BF1B },
+ { "Pacific/Pago_Pago" , 0x03BFAB },
+ { "Pacific/Palau" , 0x03C022 },
+ { "Pacific/Pitcairn" , 0x03C066 },
+ { "Pacific/Pohnpei" , 0x03C0BB },
+ { "Pacific/Ponape" , 0x03C110 },
+ { "Pacific/Port_Moresby" , 0x03C155 },
+ { "Pacific/Rarotonga" , 0x03C1A7 },
+ { "Pacific/Saipan" , 0x03C283 },
+ { "Pacific/Samoa" , 0x03C2E6 },
+ { "Pacific/Tahiti" , 0x03C35D },
+ { "Pacific/Tarawa" , 0x03C3C2 },
+ { "Pacific/Tongatapu" , 0x03C416 },
+ { "Pacific/Truk" , 0x03C4A2 },
+ { "Pacific/Wake" , 0x03C4E7 },
+ { "Pacific/Wallis" , 0x03C537 },
+ { "Pacific/Yap" , 0x03C57B },
+ { "Poland" , 0x03C5C0 },
+ { "Portugal" , 0x03C9A1 },
+ { "PRC" , 0x03CE9D },
+ { "PST8PDT" , 0x03CF3D },
+ { "ROC" , 0x03D28E },
+ { "ROK" , 0x03D3BF },
+ { "Singapore" , 0x03D4B2 },
+ { "Turkey" , 0x03D569 },
+ { "UCT" , 0x03D956 },
+ { "Universal" , 0x03D99A },
+ { "US/Alaska" , 0x03D9DE },
+ { "US/Aleutian" , 0x03DD47 },
+ { "US/Arizona" , 0x03E0AD },
+ { "US/Central" , 0x03E13B },
+ { "US/East-Indiana" , 0x03EB45 },
+ { "US/Eastern" , 0x03E646 },
+ { "US/Hawaii" , 0x03EDAF },
+ { "US/Indiana-Starke" , 0x03EE20 },
+ { "US/Michigan" , 0x03F191 },
+ { "US/Mountain" , 0x03F4C8 },
+ { "US/Pacific" , 0x03F841 },
+ { "US/Pacific-New" , 0x03FC46 },
+ { "US/Samoa" , 0x04004B },
+ { "UTC" , 0x0400C2 },
+ { "W-SU" , 0x0403B9 },
+ { "WET" , 0x040106 },
+ { "Zulu" , 0x0405FC },
};
/* This is a generated file, do not modify */
-const unsigned char timelib_timezone_db_data_builtin[263343] = {
+const unsigned char timelib_timezone_db_data_builtin[263744] = {
/* Africa/Abidjan */
@@ -620,11 +620,13 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Africa/Addis_Ababa */
0x50, 0x48, 0x50, 0x31, 0x01, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xC0, 0xAF, 0xF2, 0x98,
-0x01, 0x00, 0x00, 0x24, 0x68, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x05, 0x41, 0x44, 0x4D,
-0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x1C, 0xE5, 0x01, 0x4D,
-0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x97, 0x1C, 0xE5, 0x01, 0x4D, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00,
/* Africa/Algiers */
0x50, 0x48, 0x50, 0x31, 0x01, 0x44, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -649,19 +651,23 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Africa/Asmara */
0x50, 0x48, 0x50, 0x31, 0x01, 0x45, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xC0, 0xAF, 0xF2, 0x98,
-0x01, 0x00, 0x00, 0x24, 0x68, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x05, 0x41, 0x44, 0x4D,
-0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xB9, 0xD5, 0x01, 0x4D,
-0xFD, 0x4D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xA0, 0xB9, 0xD5, 0x01, 0x4D, 0xFD, 0x4D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Asmera */
0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xC0, 0xAF, 0xF2, 0x98,
-0x01, 0x00, 0x00, 0x24, 0x68, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x05, 0x41, 0x44, 0x4D,
-0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12,
-0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Africa/Bamako */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -895,20 +901,23 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Africa/Dar_es_Salaam */
0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0E, 0xB6, 0xA3, 0xD3, 0xAC,
-0xD6, 0x9D, 0x7F, 0xD0, 0xEF, 0x12, 0x66, 0xD4, 0x01, 0x02, 0x01, 0x00, 0x00, 0x24, 0xD4, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0xF4, 0x00, 0x01, 0x4E, 0x99, 0x8D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x7E, 0xF4, 0x00, 0x01, 0x4E, 0x99, 0x8D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Djibouti */
0x50, 0x48, 0x50, 0x31, 0x01, 0x44, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF3, 0xD2, 0x0C,
-0x01, 0x00, 0x00, 0x28, 0x74, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x07, 0x80, 0x01, 0x54, 0x7F,
-0xF8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x9B, 0x07, 0x80, 0x01, 0x54, 0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00,
/* Africa/Douala */
0x50, 0x48, 0x50, 0x31, 0x01, 0x43, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1011,9 +1020,9 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Africa/Kampala */
0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDF, 0x1C,
-0xB4, 0xC2, 0x9A, 0xD0, 0xD6, 0x9D, 0x86, 0xD8, 0xE7, 0x8C, 0x47, 0x54, 0x01, 0x02, 0x03, 0x01,
-0x00, 0x00, 0x1E, 0x64, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x89, 0xCF, 0xF2, 0x01, 0x44, 0x1F, 0x42, 0x00, 0x00, 0x00, 0x00,
@@ -1140,11 +1149,13 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Africa/Mogadishu */
0x50, 0x48, 0x50, 0x31, 0x01, 0x53, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xB6, 0xA3, 0xCE, 0x50,
-0xE7, 0x8C, 0x4A, 0xD8, 0x01, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x28,
-0x00, 0x04, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x8C, 0x7B, 0x8A, 0x01, 0x57, 0xE1, 0xDA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x8C, 0x7B, 0x8A, 0x01, 0x57, 0xE1, 0xDA, 0x00, 0x00, 0x00, 0x00,
/* Africa/Monrovia */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4C, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3306,7 +3317,7 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* America/Grand_Turk */
0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x93, 0x0F, 0xB4, 0xFF,
+0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x93, 0x0F, 0xB4, 0xFF,
0x11, 0x89, 0x65, 0xF0, 0x12, 0x79, 0x48, 0xE0, 0x13, 0x69, 0x47, 0xF0, 0x14, 0x59, 0x2A, 0xE0,
0x15, 0x49, 0x29, 0xF0, 0x16, 0x39, 0x0C, 0xE0, 0x17, 0x29, 0x0B, 0xF0, 0x18, 0x22, 0x29, 0x60,
0x19, 0x08, 0xED, 0xF0, 0x1A, 0x02, 0x0B, 0x60, 0x1A, 0xF2, 0x0A, 0x70, 0x1B, 0xE1, 0xED, 0x60,
@@ -3325,15 +3336,15 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60,
0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60,
0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60,
+0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00, 0xFF,
-0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
-0x0C, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x15, 0xAA, 0x00, 0xA6, 0x1E,
-0x0A, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x03, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF,
+0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0x4B, 0x4D, 0x54, 0x00, 0x45,
+0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xAA, 0x15, 0xAA, 0x00, 0xA6, 0x1E, 0x0A, 0x00, 0x00, 0x00, 0x00,
/* America/Grenada */
0x50, 0x48, 0x50, 0x31, 0x01, 0x47, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9074,14 +9085,13 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Asia/Pyongyang */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0x85, 0x93, 0x7E, 0x78,
-0xB0, 0xFE, 0x8D, 0xF0, 0xB8, 0x84, 0xB4, 0x78, 0xC3, 0x55, 0x3B, 0x70, 0xD2, 0x2F, 0x61, 0x70,
-0xE2, 0x4F, 0x29, 0xF0, 0xF0, 0x35, 0x78, 0x80, 0x01, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x00,
-0x00, 0x77, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00,
-0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x00, 0x4B, 0x53, 0x54,
-0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xDD, 0x22, 0x01, 0xD2, 0x89, 0x98, 0x00, 0x00, 0x00, 0x00,
-
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0x8B, 0xD7, 0xF1, 0x9C,
+0x92, 0xE6, 0x16, 0xF8, 0xC3, 0x55, 0x3B, 0x70, 0xD2, 0x2F, 0x61, 0x70, 0x01, 0x02, 0x03, 0x04,
+0x00, 0x00, 0x75, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90,
+0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D,
+0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xDD, 0x22, 0x01, 0xD2, 0x89,
+0x98, 0x00, 0x00, 0x00, 0x00,
/* Asia/Qatar */
0x50, 0x48, 0x50, 0x31, 0x01, 0x51, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9214,17 +9224,20 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Asia/Seoul */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x11, 0x85, 0x93, 0x7E, 0x78,
-0xB0, 0xFE, 0x8D, 0xF0, 0xB8, 0x84, 0xB4, 0x78, 0xC3, 0x55, 0x3B, 0x70, 0xD2, 0x43, 0x27, 0xF0,
-0xE2, 0x4F, 0x29, 0xF0, 0xED, 0xE1, 0x92, 0x80, 0xEE, 0x81, 0x09, 0xF0, 0xF0, 0x35, 0x78, 0x80,
-0xFD, 0xA5, 0x0A, 0xF8, 0x20, 0xA3, 0x44, 0x70, 0x21, 0x6E, 0x3D, 0x60, 0x22, 0x83, 0x26, 0x70,
-0x23, 0x4E, 0x1F, 0x60, 0x01, 0x00, 0x01, 0x02, 0x03, 0x05, 0x04, 0x05, 0x00, 0x03, 0x06, 0x03,
-0x06, 0x03, 0x00, 0x00, 0x77, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00,
-0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D,
-0x00, 0x00, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0D, 0x4B, 0x53, 0x54, 0x00,
-0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xA0, 0x38, 0x01,
-0xD4, 0x64, 0xDA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0x8B, 0xD7, 0xF0, 0x78,
+0x92, 0xE6, 0x16, 0xF8, 0xC3, 0x55, 0x3B, 0x70, 0xD2, 0x43, 0x27, 0xF0, 0xE2, 0x4F, 0x29, 0xF0,
+0xE4, 0x6B, 0xB7, 0xF8, 0xE5, 0x13, 0x18, 0x68, 0xE6, 0x62, 0x03, 0x78, 0xE7, 0x11, 0x4C, 0xE8,
+0xE8, 0x2F, 0x70, 0x78, 0xE8, 0xE7, 0xF4, 0x68, 0xEA, 0x0F, 0x52, 0x78, 0xEA, 0xC7, 0xD6, 0x68,
+0xEB, 0xEF, 0x34, 0x78, 0xEC, 0xA7, 0xB8, 0x68, 0xED, 0xCF, 0x16, 0x78, 0xEE, 0x87, 0x9A, 0x68,
+0xF0, 0x35, 0x71, 0x78, 0x20, 0xA3, 0x60, 0x90, 0x21, 0x6E, 0x67, 0x90, 0x22, 0x83, 0x42, 0x90,
+0x23, 0x4E, 0x49, 0x90, 0x01, 0x02, 0x03, 0x04, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05,
+0x01, 0x05, 0x01, 0x05, 0x01, 0x04, 0x06, 0x04, 0x06, 0x04, 0x00, 0x00, 0x77, 0x08, 0x00, 0x00,
+0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90,
+0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98, 0x01, 0x11, 0x00, 0x00,
+0x8C, 0xA0, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54,
+0x00, 0x4A, 0x53, 0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xA0, 0x38, 0x01, 0xD4, 0x64, 0xDA, 0x00,
+0x00, 0x00, 0x00,
/* Asia/Shanghai */
0x50, 0x48, 0x50, 0x31, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16232,12 +16245,12 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Indian/Antananarivo */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xF3, 0xCD, 0xF4,
-0xE2, 0x33, 0xC0, 0xC0, 0xE2, 0xAB, 0xB9, 0x40, 0x01, 0x02, 0x03, 0x00, 0x00, 0x2C, 0x8C, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x00, 0x00, 0x2A,
-0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x45, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x76, 0xED, 0x01, 0x5B, 0x29, 0xB2,
-0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x6C, 0x76, 0xED, 0x01, 0x5B, 0x29, 0xB2, 0x00, 0x00, 0x00, 0x00,
/* Indian/Chagos */
0x50, 0x48, 0x50, 0x31, 0x01, 0x49, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16264,11 +16277,13 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Indian/Comoro */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF3, 0xD1, 0xF0,
-0x01, 0x00, 0x00, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x80, 0x72, 0x01, 0x54, 0xAD,
-0x8A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x77, 0x80, 0x72, 0x01, 0x54, 0xAD, 0x8A, 0x00, 0x00, 0x00, 0x00,
/* Indian/Kerguelen */
0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16306,11 +16321,13 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* Indian/Mayotte */
0x50, 0x48, 0x50, 0x31, 0x01, 0x59, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF3, 0xD0, 0x18,
-0x01, 0x00, 0x00, 0x2A, 0x68, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0xD2, 0xC2, 0x01, 0x57, 0xAD,
-0xC5, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC,
+0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01,
+0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28,
+0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x75, 0xD2, 0xC2, 0x01, 0x57, 0xAD, 0xC5, 0x00, 0x00, 0x00, 0x00,
/* Indian/Reunion */
0x50, 0x48, 0x50, 0x31, 0x01, 0x52, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17688,17 +17705,20 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
/* ROK */
0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x11, 0x85, 0x93, 0x7E, 0x78,
-0xB0, 0xFE, 0x8D, 0xF0, 0xB8, 0x84, 0xB4, 0x78, 0xC3, 0x55, 0x3B, 0x70, 0xD2, 0x43, 0x27, 0xF0,
-0xE2, 0x4F, 0x29, 0xF0, 0xED, 0xE1, 0x92, 0x80, 0xEE, 0x81, 0x09, 0xF0, 0xF0, 0x35, 0x78, 0x80,
-0xFD, 0xA5, 0x0A, 0xF8, 0x20, 0xA3, 0x44, 0x70, 0x21, 0x6E, 0x3D, 0x60, 0x22, 0x83, 0x26, 0x70,
-0x23, 0x4E, 0x1F, 0x60, 0x01, 0x00, 0x01, 0x02, 0x03, 0x05, 0x04, 0x05, 0x00, 0x03, 0x06, 0x03,
-0x06, 0x03, 0x00, 0x00, 0x77, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00,
-0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D,
-0x00, 0x00, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0D, 0x4B, 0x53, 0x54, 0x00,
-0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0x8B, 0xD7, 0xF0, 0x78,
+0x92, 0xE6, 0x16, 0xF8, 0xC3, 0x55, 0x3B, 0x70, 0xD2, 0x43, 0x27, 0xF0, 0xE2, 0x4F, 0x29, 0xF0,
+0xE4, 0x6B, 0xB7, 0xF8, 0xE5, 0x13, 0x18, 0x68, 0xE6, 0x62, 0x03, 0x78, 0xE7, 0x11, 0x4C, 0xE8,
+0xE8, 0x2F, 0x70, 0x78, 0xE8, 0xE7, 0xF4, 0x68, 0xEA, 0x0F, 0x52, 0x78, 0xEA, 0xC7, 0xD6, 0x68,
+0xEB, 0xEF, 0x34, 0x78, 0xEC, 0xA7, 0xB8, 0x68, 0xED, 0xCF, 0x16, 0x78, 0xEE, 0x87, 0x9A, 0x68,
+0xF0, 0x35, 0x71, 0x78, 0x20, 0xA3, 0x60, 0x90, 0x21, 0x6E, 0x67, 0x90, 0x22, 0x83, 0x42, 0x90,
+0x23, 0x4E, 0x49, 0x90, 0x01, 0x02, 0x03, 0x04, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05,
+0x01, 0x05, 0x01, 0x05, 0x01, 0x04, 0x06, 0x04, 0x06, 0x04, 0x00, 0x00, 0x77, 0x08, 0x00, 0x00,
+0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90,
+0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98, 0x01, 0x11, 0x00, 0x00,
+0x8C, 0xA0, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54,
+0x00, 0x4A, 0x53, 0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
+0x00, 0x00, 0x00,
/* Singapore */
0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18547,4 +18567,4 @@ const unsigned char timelib_timezone_db_data_builtin[263343] = {
0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
0x00, 0x00, 0x00, 0x00, };
-const timelib_tzdb timezonedb_builtin = { "2014.9", 583, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2014.10", 583, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
diff --git a/ext/date/tests/002.phpt b/ext/date/tests/002.phpt
index 92d0d5f105..adbea5e231 100644
--- a/ext/date/tests/002.phpt
+++ b/ext/date/tests/002.phpt
@@ -3,7 +3,7 @@ strtotime() function
--SKIPIF--
<?php
if (!@putenv("TZ=EST5") || getenv("TZ") != 'EST5') {
- die("skip unable to change TZ enviroment variable\n");
+ die("skip unable to change TZ environment variable\n");
}
?>
--FILE--
diff --git a/ext/date/tests/bug13142.phpt b/ext/date/tests/bug13142.phpt
index 5254142baa..5849a94427 100644
--- a/ext/date/tests/bug13142.phpt
+++ b/ext/date/tests/bug13142.phpt
@@ -8,7 +8,7 @@ if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
die("skip. set TZ env is not supported at runtime.");
}
if (!@putenv("TZ=US/Eastern") || getenv("TZ") != 'US/Eastern') {
- die("skip unable to change TZ enviroment variable\n");
+ die("skip unable to change TZ environment variable\n");
}
?>
--FILE--
diff --git a/ext/date/tests/bug26317.phpt b/ext/date/tests/bug26317.phpt
index 5b79bec525..27d6ff1250 100644
--- a/ext/date/tests/bug26317.phpt
+++ b/ext/date/tests/bug26317.phpt
@@ -4,7 +4,7 @@ Bug #26317 (military timezone offset signedness)
date.timezone=GMT0
--SKIPIF--
if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') {
- die("skip unable to change TZ enviroment variable\n");
+ die("skip unable to change TZ environment variable\n");
}
--FILE--
<?php
diff --git a/ext/date/tests/bug26320.phpt b/ext/date/tests/bug26320.phpt
index c8aeb00c9f..e742c39da5 100644
--- a/ext/date/tests/bug26320.phpt
+++ b/ext/date/tests/bug26320.phpt
@@ -4,7 +4,7 @@ Bug #26320 (strtotime handling of XML Schema/ISO 8601 format)
date.timezone=GMT0
--SKIPIF--
if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') {
- die("skip unable to change TZ enviroment variable\n");
+ die("skip unable to change TZ environment variable\n");
}
--FILE--
<?php
diff --git a/ext/date/tests/date_interval_create_from_date_string.phpt b/ext/date/tests/date_interval_create_from_date_string.phpt
new file mode 100644
index 0000000000..9a1745c9ac
--- /dev/null
+++ b/ext/date/tests/date_interval_create_from_date_string.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test date_interval_create_from_date_string() function : basic functionality
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--FILE--
+<?php
+$string = '1 day'; //P1D
+$i = date_interval_create_from_date_string($string);
+var_dump($i->d);
+
+$string = '2 weeks'; //14 days
+$i = date_interval_create_from_date_string($string);
+var_dump($i->d);
+
+$string = '3 months';
+$i = date_interval_create_from_date_string($string);
+var_dump($i->m);
+
+$string = '4 years';
+$i = date_interval_create_from_date_string($string);
+var_dump($i->y);
+
+$string = '1 year + 1 day';
+$i = date_interval_create_from_date_string($string);
+var_dump($i->y);
+var_dump($i->d);
+?>
+--EXPECTF--
+int(1)
+int(14)
+int(3)
+int(4)
+int(1)
+int(1) \ No newline at end of file
diff --git a/ext/date/tests/date_interval_create_from_date_string_nullparam.phpt b/ext/date/tests/date_interval_create_from_date_string_nullparam.phpt
new file mode 100644
index 0000000000..369db5714a
--- /dev/null
+++ b/ext/date/tests/date_interval_create_from_date_string_nullparam.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test date_interval_create_from_date_string() function : null parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--FILE--
+<?php
+$i = date_interval_create_from_date_string(null); //returns a empty object
+var_dump($i);
+?>
+--EXPECTF--
+object(DateInterval)#1 (15) {
+ ["y"]=>
+ int(0)
+ ["m"]=>
+ int(0)
+ ["d"]=>
+ int(0)
+ ["h"]=>
+ int(0)
+ ["i"]=>
+ int(0)
+ ["s"]=>
+ int(0)
+ ["weekday"]=>
+ int(0)
+ ["weekday_behavior"]=>
+ int(0)
+ ["first_last_day_of"]=>
+ int(0)
+ ["invert"]=>
+ int(0)
+ ["days"]=>
+ int(0)
+ ["special_type"]=>
+ int(0)
+ ["special_amount"]=>
+ int(0)
+ ["have_weekday_relative"]=>
+ int(0)
+ ["have_special_relative"]=>
+ int(0)
+} \ No newline at end of file
diff --git a/ext/date/tests/date_interval_create_from_date_string_wrongparam_001.phpt b/ext/date/tests/date_interval_create_from_date_string_wrongparam_001.phpt
new file mode 100644
index 0000000000..15db956553
--- /dev/null
+++ b/ext/date/tests/date_interval_create_from_date_string_wrongparam_001.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Test date_interval_create_from_date_string() function : wrong parameter (array)
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--FILE--
+<?php
+$wrong_parameter = array();
+$i = date_interval_create_from_date_string($wrong_parameter);
+?>
+--EXPECTF--
+Warning: date_interval_create_from_date_string() expects parameter 1 to be string, array given in %s on line %d \ No newline at end of file
diff --git a/ext/date/tests/date_interval_create_from_date_string_wrongparam_002.phpt b/ext/date/tests/date_interval_create_from_date_string_wrongparam_002.phpt
new file mode 100644
index 0000000000..a3407c3967
--- /dev/null
+++ b/ext/date/tests/date_interval_create_from_date_string_wrongparam_002.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Test date_interval_create_from_date_string() function : with 2 parameters (wrong).
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--FILE--
+<?php
+$i = date_interval_create_from_date_string('1 year', 'wrong');
+?>
+--EXPECTF--
+Warning: date_interval_create_from_date_string() expects exactly 1 parameter, 2 given in %s on line %d \ No newline at end of file
diff --git a/ext/date/tests/date_timestamp_set.phpt b/ext/date/tests/date_timestamp_set.phpt
new file mode 100644
index 0000000000..e01660193f
--- /dev/null
+++ b/ext/date/tests/date_timestamp_set.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Test the basics to function date_timestamp_set().
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--INI--
+date.timezone = UTC;
+date_default_timezone_set("America/Sao_Paulo");
+--FILE--
+<?php
+$dftz021 = date_default_timezone_get(); //UTC
+
+$dtms021 = date_create();
+
+date_timestamp_set($dtms021, 1234567890);
+
+var_dump(date_format($dtms021, 'B => (U) => T Y-M-d H:i:s'));
+?>
+--EXPECTF--
+string(47) "021 => (1234567890) => UTC 2009-Feb-13 23:31:30" \ No newline at end of file
diff --git a/ext/date/tests/date_timestamp_set_nullparam.phpt b/ext/date/tests/date_timestamp_set_nullparam.phpt
new file mode 100644
index 0000000000..1bcb800242
--- /dev/null
+++ b/ext/date/tests/date_timestamp_set_nullparam.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test the function date_timestamp_set() with first null parameter.
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--INI--
+date.timezone = UTC;
+date_default_timezone_set("America/Sao_Paulo");
+--FILE--
+<?php
+$dftz021 = date_default_timezone_get(); //UTC
+
+$dtms021 = date_create();
+
+date_timestamp_set(null, 1234567890);
+?>
+--EXPECTF--
+Warning: date_timestamp_set() expects parameter 1 to be DateTime, null given in %s on line %d \ No newline at end of file
diff --git a/ext/date/tests/date_timestamp_set_nullparam2.phpt b/ext/date/tests/date_timestamp_set_nullparam2.phpt
new file mode 100644
index 0000000000..1442da4426
--- /dev/null
+++ b/ext/date/tests/date_timestamp_set_nullparam2.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Test the function date_timestamp_set() with second null parameter.
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--INI--
+date.timezone = UTC;
+date_default_timezone_set("America/Sao_Paulo");
+--FILE--
+<?php
+$dftz021 = date_default_timezone_get(); //UTC
+
+$dtms021 = date_create();
+
+var_dump(date_timestamp_set($dtms021, null));
+?>
+--EXPECTF--
+object(DateTime)#1 (3) {
+ ["date"]=>
+ string(26) "1970-01-01 00:00:00.000000"
+ ["timezone_type"]=>
+ int(3)
+ ["timezone"]=>
+ string(3) "UTC"
+} \ No newline at end of file
diff --git a/ext/date/tests/date_timestamp_set_wrongparam_001.phpt b/ext/date/tests/date_timestamp_set_wrongparam_001.phpt
new file mode 100644
index 0000000000..9a0fca99c1
--- /dev/null
+++ b/ext/date/tests/date_timestamp_set_wrongparam_001.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Check the function date_timestamp_set() with first parameter wrong (array).
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--INI--
+date.timezone = UTC;
+date_default_timezone_set("America/Sao_Paulo");
+--FILE--
+<?php
+$dftz021 = date_default_timezone_get(); //UTC
+
+$dtms021 = array();
+
+date_timestamp_set($dtms021, 123456789);
+?>
+--EXPECTF--
+Warning: date_timestamp_set() expects parameter 1 to be DateTime, array given in %s on line %d \ No newline at end of file
diff --git a/ext/date/tests/date_timestamp_set_wrongparam_002.phpt b/ext/date/tests/date_timestamp_set_wrongparam_002.phpt
new file mode 100644
index 0000000000..ed31cb217d
--- /dev/null
+++ b/ext/date/tests/date_timestamp_set_wrongparam_002.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Check the function date_timestamp_set() with first parameter wrong (integer).
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--INI--
+date.timezone = UTC;
+date_default_timezone_set("America/Sao_Paulo");
+--FILE--
+<?php
+$dftz021 = date_default_timezone_get(); //UTC
+
+date_timestamp_set(987654321, 123456789);
+?>
+--EXPECTF--
+Warning: date_timestamp_set() expects parameter 1 to be DateTime, integer given in %s on line %d \ No newline at end of file
diff --git a/ext/date/tests/date_timestamp_set_wrongparam_003.phpt b/ext/date/tests/date_timestamp_set_wrongparam_003.phpt
new file mode 100644
index 0000000000..f965334d9d
--- /dev/null
+++ b/ext/date/tests/date_timestamp_set_wrongparam_003.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Check the function date_timestamp_set() with second parameter wrong (array).
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--INI--
+date.timezone = UTC;
+date_default_timezone_set("America/Sao_Paulo");
+--FILE--
+<?php
+$dftz021 = date_default_timezone_get(); //UTC
+
+$dtms021 = new DateTime();
+
+$wrong_parameter = array();
+
+date_timestamp_set($dtms021, $wrong_parameter);
+?>
+--EXPECTF--
+Warning: date_timestamp_set() expects parameter 2 to be long, array given in %s on line %d \ No newline at end of file
diff --git a/ext/date/tests/date_timestamp_set_wrongparam_004.phpt b/ext/date/tests/date_timestamp_set_wrongparam_004.phpt
new file mode 100644
index 0000000000..b171e98bd4
--- /dev/null
+++ b/ext/date/tests/date_timestamp_set_wrongparam_004.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Check the function date_timestamp_set() with 3 parameters.
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--INI--
+date.timezone = UTC;
+date_default_timezone_set("America/Sao_Paulo");
+--FILE--
+<?php
+$dftz021 = date_default_timezone_get(); //UTC
+
+$dtms021 = new DateTime();
+
+date_timestamp_set($dtms021, 123456789, 'error');
+?>
+--EXPECTF--
+Warning: date_timestamp_set() expects exactly 2 parameters, 3 given in %s on line %d \ No newline at end of file
diff --git a/ext/date/tests/timezone_version_get.phpt b/ext/date/tests/timezone_version_get.phpt
new file mode 100644
index 0000000000..e076004289
--- /dev/null
+++ b/ext/date/tests/timezone_version_get.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Test the basics to function timezone_version_get().
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--INI--
+date.timezone = UTC;
+date_default_timezone_set("America/Sao_Paulo");
+--FILE--
+<?php
+var_dump(timezone_version_get());
+?>
+--EXPECTREGEX--
+string\([6-7]\) \"20[0-9][0-9]\.[1-9][0-9]?\" \ No newline at end of file
diff --git a/ext/date/tests/timezone_version_get_basic1.phpt b/ext/date/tests/timezone_version_get_basic1.phpt
new file mode 100644
index 0000000000..27224e3d44
--- /dev/null
+++ b/ext/date/tests/timezone_version_get_basic1.phpt
@@ -0,0 +1,12 @@
+--TEST--
+timezone_version_get: Test that timezone_location_get returns a date concatenated with a dot and a version number
+--CREDITS--
+Rodrigo Wanderley de Melo Cardoso <rodrigogepem@gmail.com>
+#PHPTestFest2014 São Paulo 2014-07-05
+--INI--
+date.timezone=UTC
+--FILE--
+<?php $versionTimezone = timezone_version_get();
+echo $versionTimezone; ?>
+--EXPECTREGEX--
+^[12][0-9]{3}.[0-9]+$ \ No newline at end of file
diff --git a/ext/dba/README b/ext/dba/README
index 0c22830e54..a79413f100 100755
--- a/ext/dba/README
+++ b/ext/dba/README
@@ -39,7 +39,7 @@ inifile This is available since PHP 4.3.3 to be able to modify php.ini
As the functions dba_firstkey() and dba_nextkey() return string
representations of the key there is a new function dba_key_split()
available since PHP 5 which allows to convert the string keys into
- array keys without loosing FALSE.
+ array keys without losing FALSE.
qdbm This is available since PHP 5.0.0. The qdbm library can be loaded
from http://qdbm.sourceforge.net.
diff --git a/ext/ereg/regex/regcomp.c b/ext/ereg/regex/regcomp.c
index 156eee9329..730bcf568a 100644
--- a/ext/ereg/regex/regcomp.c
+++ b/ext/ereg/regex/regcomp.c
@@ -450,7 +450,7 @@ int starordinary; /* is a leading * an ordinary character? */
register sopno subno;
# define BACKSL (1<<CHAR_BIT)
- pos = HERE(); /* repetion op, if any, covers from here */
+ pos = HERE(); /* repetition op, if any, covers from here */
assert(MORE()); /* caller should have ensured this */
c = GETNEXT();
diff --git a/ext/exif/tests/bug68113.phpt b/ext/exif/tests/bug68113.phpt
index 0fa4c4aca8..e4a1cbf53b 100644
--- a/ext/exif/tests/bug68113.phpt
+++ b/ext/exif/tests/bug68113.phpt
@@ -10,8 +10,8 @@ var_dump(exif_thumbnail(__DIR__."/bug68113.jpg"));
?>
Done
--EXPECTF--
-Warning: exif_thumbnail(bug68113.jpg): File structure corrupted in %s/bug68113.php on line 2
+Warning: exif_thumbnail(bug68113.jpg): File structure corrupted in %s%ebug68113.php on line 2
-Warning: exif_thumbnail(bug68113.jpg): Invalid JPEG file in %s/bug68113.php on line 2
+Warning: exif_thumbnail(bug68113.jpg): Invalid JPEG file in %s%ebug68113.php on line 2
bool(false)
-Done \ No newline at end of file
+Done
diff --git a/ext/fileinfo/fileinfo.php b/ext/fileinfo/fileinfo.php
index 1ee9efbeb8..791d03a213 100644
--- a/ext/fileinfo/fileinfo.php
+++ b/ext/fileinfo/fileinfo.php
@@ -3,7 +3,7 @@ if(!extension_loaded('fileinfo')) {
dl('fileinfo.' . PHP_SHLIB_SUFFIX);
}
if(!extension_loaded('fileinfo')) {
- die("fileinfo extension is not avaliable, please compile it.\n");
+ die("fileinfo extension is not available, please compile it.\n");
}
// normal operation
diff --git a/ext/fileinfo/libmagic/patchlevel.h b/ext/fileinfo/libmagic/patchlevel.h
index a53c6830d8..65551b402e 100644
--- a/ext/fileinfo/libmagic/patchlevel.h
+++ b/ext/fileinfo/libmagic/patchlevel.h
@@ -351,7 +351,7 @@
*
* Revision 1.8 93/02/19 15:01:26 ian
* Numerous changes from Guy Harris too numerous to mention but including
- * byte-order independance, fixing "old-style masking", etc. etc. A bugfix
+ * byte-order independence, fixing "old-style masking", etc. etc. A bugfix
* for broken symlinks from martin@@d255s004.zfe.siemens.de.
*
* Revision 1.7 93/01/05 14:57:27 ian
diff --git a/ext/fileinfo/tests/magic b/ext/fileinfo/tests/magic
index 4e1ce98ed2..938ac5f73a 100644
--- a/ext/fileinfo/tests/magic
+++ b/ext/fileinfo/tests/magic
@@ -3918,7 +3918,7 @@
>7 string x version %.2s
# We skip the path here, because it is often long (so file will
# truncate it) and mostly redundant.
-# The inverted index functionality was added some time betwen
+# The inverted index functionality was added some time between
# versions 11 and 15, so look for -q if version is above 14:
>7 string >14
>>10 search/100 \ -q\ with inverted index
@@ -3972,7 +3972,7 @@
# .cwk
0 string \002\000\210\003\102\117\102\117\000\001\206 Claris works document
# .plt
-0 string \020\341\000\000\010\010 Claris Works pallete files .plt
+0 string \020\341\000\000\010\010 Claris Works palette files .plt
# .msp a dictionary file I am not sure about this I have only one .msp file
0 string \002\271\262\000\040\002\000\164 Claris works dictionary
@@ -4443,9 +4443,9 @@
>6 byte&0x04 =0x8 \b, [4-Scr]
#------------------------------------------------------------------------------
-# gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format
+# game boy: file(1) magic for the Nintendo (Color) Game Boy raw ROM format
#
-0x104 belong 0xCEED6666 Gameboy ROM:
+0x104 belong 0xCEED6666 Game Boy ROM:
>0x134 string >\0 "%.16s"
>0x146 byte 0x03 \b,[SGB]
>0x147 byte 0x00 \b, [ROM ONLY]
@@ -4605,8 +4605,8 @@
0 string \x01ZZZZZ\x01 3DO "Opera" file system
# From Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
-0 string GBS Nintendo Gameboy Music/Audio Data
-12 string GameBoy\ Music\ Module Nintendo Gameboy Music Module
+0 string GBS Nintendo Game Boy Music/Audio Data
+12 string GameBoy\ Music\ Module Nintendo Game Boy Music Module
# Playstations Patch Files from: From: Thomas Klausner <tk@giga.or.at>
0 string PPF30 Playstation Patch File version 3.0
@@ -15279,7 +15279,7 @@
# $File: oasis,v 1.1 2011/03/15 02:09:38 christos Exp $
# OASIS
# Summary: OASIS stream file
-# Long descripton: Open Artwork System Interchange Standard
+# Long description: Open Artwork System Interchange Standard
# File extension: .oas
# Full name: Ben Cowley (bcowley@broadcom.com)
# Philip Dixon (pdixon@broadcom.com)
diff --git a/ext/filter/filter.c b/ext/filter/filter.c
index 530dce6f53..46c3fb2eea 100644
--- a/ext/filter/filter.c
+++ b/ext/filter/filter.c
@@ -760,7 +760,7 @@ PHP_FUNCTION(filter_input)
/* }}} */
/* {{{ proto mixed filter_var(mixed variable [, long filter [, mixed options]])
- * Returns the filtered version of the vriable.
+ * Returns the filtered version of the variable.
*/
PHP_FUNCTION(filter_var)
{
diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h
index f2051fe195..e54eda0790 100644
--- a/ext/ftp/ftp.h
+++ b/ext/ftp/ftp.h
@@ -69,8 +69,8 @@ typedef struct ftpbuf
ftptype_t type; /* current transfer type */
int pasv; /* 0=off; 1=pasv; 2=ready */
php_sockaddr_storage pasvaddr; /* passive mode address */
- zend_long timeout_sec; /* User configureable timeout (seconds) */
- int autoseek; /* User configureable autoseek flag */
+ zend_long timeout_sec; /* User configurable timeout (seconds) */
+ int autoseek; /* User configurable autoseek flag */
int nb; /* "nonblocking" transfer in progress */
databuf_t *data; /* Data connection for "nonblocking" transfers */
diff --git a/ext/gd/config.w32 b/ext/gd/config.w32
index 2127fc5dce..da6d0d2ff5 100644
--- a/ext/gd/config.w32
+++ b/ext/gd/config.w32
@@ -83,6 +83,9 @@ if (PHP_GD != "no") {
/D USE_GD_IOCTX \
/D MSWIN32 \
");
+ if (ICC_TOOLSET) {
+ ADD_FLAG("LDFLAGS_GD", "/nodefaultlib:libcmt");
+ }
PHP_INSTALL_HEADERS("", "ext/gd ext/gd/libgd" );
} else {
diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h
index b61d972e80..0ace31ba03 100644
--- a/ext/gd/libgd/gd.h
+++ b/ext/gd/libgd/gd.h
@@ -782,7 +782,7 @@ int gdImageBrightness(gdImagePtr src, int brightness);
/* Set the contrast level <contrast> for the image <src> */
int gdImageContrast(gdImagePtr src, double contrast);
-/* Simply adds or substracts respectively red, green or blue to a pixel */
+/* Simply adds or subtracts respectively red, green or blue to a pixel */
int gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha);
/* Image convolution by a 3x3 custom matrix */
diff --git a/ext/gd/libgd/gd_arc_f_buggy.c b/ext/gd/libgd/gd_arc_f_buggy.c
index c26e42171a..ffab551230 100644
--- a/ext/gd/libgd/gd_arc_f_buggy.c
+++ b/ext/gd/libgd/gd_arc_f_buggy.c
@@ -1,6 +1,6 @@
/* This is potentially great stuff, but fails against the test
program at the end. This would probably be much more
- efficent than the implementation currently in gd.c if the
+ efficient than the implementation currently in gd.c if the
errors in the output were corrected. TBB */
#if 0
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index 4148cf47bb..763efcf68c 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -464,7 +464,7 @@ static void *fontFetch (char **error, void *key)
return NULL;
}
- /* FIXME - This mapping stuff is imcomplete - where is the spec? */
+ /* FIXME - This mapping stuff is incomplete - where is the spec? */
/* EAM - It's worse than that. It's pointless to match character encodings here.
* As currently written, the stored a->face->charmap only matches one of
* the actual charmaps and we cannot know at this stage if it is the right
diff --git a/ext/gd/libgd/webpimg.c b/ext/gd/libgd/webpimg.c
index 01bef93c48..95a8081e05 100644
--- a/ext/gd/libgd/webpimg.c
+++ b/ext/gd/libgd/webpimg.c
@@ -169,7 +169,7 @@ static inline uint32 get_le32(const uint8* const data) {
* Y2/U2/V2: The Y/U/V data of the second image
*
* Returns the PSNR (http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio)
- * value computed bewteen the two images
+ * value computed between the two images
*/
double GetPSNRYuv(const uint8* Y1,
const uint8* U1,
@@ -210,7 +210,7 @@ double GetPSNRYuv(const uint8* Y1,
* imgdata: data buffer containing webp image
* imgdata_size: size of the imgdata buffer
*
- * Returns the PSNR value computed bewteen the two images
+ * Returns the PSNR value computed between the two images
*/
double WebPGetPSNR(const uint8* Y1,
const uint8* U1,
diff --git a/ext/gd/libgd/webpimg.h b/ext/gd/libgd/webpimg.h
index db23de5bb2..bc0f9722bd 100644
--- a/ext/gd/libgd/webpimg.h
+++ b/ext/gd/libgd/webpimg.h
@@ -57,7 +57,7 @@ typedef enum WebPResultType {
* 3. p_Y/p_U/p_V : pointer to the Y/U/V data buffer (this routine will
* allocate memory for the buffer, fill the buffer with
* appropriate data and transfer owner ship of the buffer
- * to caller. Caller is reponsible for freeing the memory).
+ * to caller. Caller is responsible for freeing the memory).
* Note that the memory for Y, U, V buffers is alloacted
* in one chunk, hence one should call free(*p_Y) only.
* Do not try to free the U and V buffers.
diff --git a/ext/gd/tests/imagealphablending_error1.phpt b/ext/gd/tests/imagealphablending_error1.phpt
new file mode 100644
index 0000000000..6d49f32b07
--- /dev/null
+++ b/ext/gd/tests/imagealphablending_error1.phpt
@@ -0,0 +1,19 @@
+--TEST--
+test imagealphablending without arguments
+
+--CREDITS--
+Marcelo Diniz <marcelo.leo27 [at] gmail [dot] com
+‪#‎phpspMaisTestFest PHPSP on 2014-07-05
+
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available.");
+?>
+
+--FILE--
+<?php
+imagealphablending();
+?>
+
+--EXPECTF--
+Warning: imagealphablending() expects exactly 2 parameters, 0 given in %s on line %d \ No newline at end of file
diff --git a/ext/gd/tests/imagecolorresolvealpha_error3.phpt b/ext/gd/tests/imagecolorresolvealpha_error3.phpt
new file mode 100644
index 0000000000..735b4c97db
--- /dev/null
+++ b/ext/gd/tests/imagecolorresolvealpha_error3.phpt
@@ -0,0 +1,19 @@
+--TEST--
+test imagecolorresolvealpha without arguments
+
+--CREDITS--
+Marcelo Diniz <marcelo.leo27 [at] gmail [dot] com
+‪#‎phpspMaisTestFest PHPSP on 2014-07-05
+
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available.");
+?>
+
+--FILE--
+<?php
+imagecolorresolvealpha();
+?>
+
+--EXPECTF--
+Warning: imagecolorresolvealpha() expects exactly 5 parameters, 0 given in %s on line %d \ No newline at end of file
diff --git a/ext/gd/tests/imagesavealpha_error2.phpt b/ext/gd/tests/imagesavealpha_error2.phpt
new file mode 100644
index 0000000000..1a7083d526
--- /dev/null
+++ b/ext/gd/tests/imagesavealpha_error2.phpt
@@ -0,0 +1,19 @@
+--TEST--
+test imagesavealpha without arguments
+
+--CREDITS--
+Marcelo Diniz <marcelo.leo27 [at] gmail [dot] com
+‪#‎phpspMaisTestFest PHPSP on 2014-07-05
+
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available.");
+?>
+
+--FILE--
+<?php
+imagesavealpha();
+?>
+
+--EXPECTF--
+Warning: imagesavealpha() expects exactly 2 parameters, 0 given in %s on line %d \ No newline at end of file
diff --git a/ext/gettext/tests/66265/de_DE/LC_MESSAGES/domain.mo b/ext/gettext/tests/66265/de_DE/LC_MESSAGES/domain.mo
new file mode 100644
index 0000000000..1aaba7b27b
--- /dev/null
+++ b/ext/gettext/tests/66265/de_DE/LC_MESSAGES/domain.mo
Binary files differ
diff --git a/ext/gettext/tests/66265/de_DE/LC_MESSAGES/domain.po b/ext/gettext/tests/66265/de_DE/LC_MESSAGES/domain.po
new file mode 100644
index 0000000000..d2496d78fc
--- /dev/null
+++ b/ext/gettext/tests/66265/de_DE/LC_MESSAGES/domain.po
@@ -0,0 +1,17 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: bugs.php.net/66265\n"
+"POT-Creation-Date: 2014-11-20 16:33+0100\n"
+"PO-Revision-Date: 2014-11-20 16:40+0100\n"
+"Last-Translator: <ab@php.net>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.10\n"
+"X-Poedit-Basepath: .\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Language: de_DE\n"
+
+msgid "hello"
+msgstr "hallo"
diff --git a/ext/gettext/tests/66265/en_US/LC_MESSAGES/domain.mo b/ext/gettext/tests/66265/en_US/LC_MESSAGES/domain.mo
new file mode 100644
index 0000000000..79d02c1732
--- /dev/null
+++ b/ext/gettext/tests/66265/en_US/LC_MESSAGES/domain.mo
Binary files differ
diff --git a/ext/gettext/tests/66265/en_US/LC_MESSAGES/domain.po b/ext/gettext/tests/66265/en_US/LC_MESSAGES/domain.po
new file mode 100644
index 0000000000..670d7ddadf
--- /dev/null
+++ b/ext/gettext/tests/66265/en_US/LC_MESSAGES/domain.po
@@ -0,0 +1,17 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: bugs.php.net/66265\n"
+"POT-Creation-Date: 2014-11-20 16:33+0100\n"
+"PO-Revision-Date: 2014-11-20 16:40+0100\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.10\n"
+"X-Poedit-Basepath: .\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Language: en_US\n"
+
+msgid "hello"
+msgstr "hello"
diff --git a/ext/gettext/tests/66265/fr_FR/LC_MESSAGES/domain.mo b/ext/gettext/tests/66265/fr_FR/LC_MESSAGES/domain.mo
new file mode 100644
index 0000000000..c2f3cdd6b7
--- /dev/null
+++ b/ext/gettext/tests/66265/fr_FR/LC_MESSAGES/domain.mo
Binary files differ
diff --git a/ext/gettext/tests/66265/fr_FR/LC_MESSAGES/domain.po b/ext/gettext/tests/66265/fr_FR/LC_MESSAGES/domain.po
new file mode 100644
index 0000000000..c2f708c526
--- /dev/null
+++ b/ext/gettext/tests/66265/fr_FR/LC_MESSAGES/domain.po
@@ -0,0 +1,17 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: bugs.php.net/66265\n"
+"POT-Creation-Date: 2014-11-20 16:33+0100\n"
+"PO-Revision-Date: 2014-11-20 16:59+0100\n"
+"Last-Translator: <ab@php.net>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.10\n"
+"X-Poedit-Basepath: .\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Language: fr_FR\n"
+
+msgid "hello"
+msgstr "salut"
diff --git a/ext/gettext/tests/bug66267.phpt b/ext/gettext/tests/bug66267.phpt
new file mode 100644
index 0000000000..26963acb7e
--- /dev/null
+++ b/ext/gettext/tests/bug66267.phpt
@@ -0,0 +1,55 @@
+--TEST--
+#66265: gettext doesn't switch locales within the same script
+--SKIPIF--
+<?php
+if (!extension_loaded("gettext")) {
+ die("skip\n");
+}
+if (PHP_ZTS) {
+ /* this is supposed to fail on the TS build at least on Windows,
+ should be even XFAIL till it's fixed there */
+ die("skip NTS only");
+}
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ $loc = ["de_DE", "fr_FR", "en_US"];
+ foreach($loc as $l) {
+ if (!setlocale(LC_ALL, $l)) {
+ die("SKIP '$l' locale not supported.");
+ }
+ }
+}
+?>
+--FILE--
+<?php
+
+$domain = 'domain';
+
+$loc = ["de_DE", "fr_FR", "en_US"];
+
+foreach ($loc as $l) {
+ putenv("LC_ALL=$l");
+
+ $path = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . "66265");
+ bindtextdomain($domain, $path);
+ bind_textdomain_codeset($domain, "UTF-8");
+ textdomain($domain);
+
+ echo 'LC_ALL=', getenv('LC_ALL'), "\n";
+ echo 'hello=', _('hello'), "\n";
+ echo "\n";
+}
+
+?>
+==DONE==
+--EXPECTF--
+LC_ALL=de_DE
+hello=hallo
+
+LC_ALL=fr_FR
+hello=salut
+
+LC_ALL=en_US
+hello=hello
+
+==DONE==
+
diff --git a/ext/iconv/tests/iconv_basic_001-win32.phpt b/ext/iconv/tests/iconv_basic_001-win32.phpt
new file mode 100644
index 0000000000..59a3dbd863
--- /dev/null
+++ b/ext/iconv/tests/iconv_basic_001-win32.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Test the basics to function iconv.
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
+<?php if(substr(PHP_OS, 0, 3) != 'WIN' ) {die('skip windows only test');} ?>
+--FILE--
+<?php
+$in_charset = 'UTF-8';
+$out_charset = 'ASCII//TRANSLIT';
+$string_to_translate = 'Žluťoučký kůň\n';
+
+$string_out = iconv($in_charset, $out_charset, $string_to_translate);
+
+var_dump($string_out);
+?>
+--EXPECT--
+string(16) "Zlutouck'y kun\n"
diff --git a/ext/iconv/tests/iconv_basic_001.phpt b/ext/iconv/tests/iconv_basic_001.phpt
new file mode 100644
index 0000000000..6fcb5dbe8a
--- /dev/null
+++ b/ext/iconv/tests/iconv_basic_001.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Test the basics to function iconv.
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
+<?php if(substr(PHP_OS, 0, 3) == 'WIN' ) {die('skip not for windows');} ?>
+--FILE--
+<?php
+$in_charset = 'UTF-8';
+$out_charset = 'ASCII//TRANSLIT';
+$string_to_translate = 'Žluťoučký kůň\n';
+
+$string_out = iconv($in_charset, $out_charset, $string_to_translate);
+
+var_dump($string_out);
+?>
+--EXPECT--
+string(15) "Zlutoucky kun\n"
diff --git a/ext/interbase/tests/002.phpt b/ext/interbase/tests/002.phpt
index 070a6f0069..37b0a4f344 100644
--- a/ext/interbase/tests/002.phpt
+++ b/ext/interbase/tests/002.phpt
@@ -3,7 +3,7 @@ InterBase: connect, close and pconnect
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
-<?php /* $Id$ */
+<?php
require("interbase.inc");
diff --git a/ext/interbase/tests/003.phpt b/ext/interbase/tests/003.phpt
index 652e3bdc52..8ee86d3e9e 100644
--- a/ext/interbase/tests/003.phpt
+++ b/ext/interbase/tests/003.phpt
@@ -3,7 +3,7 @@ InterBase: misc sql types (may take a while)
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
-<?php /* $Id$ */
+<?php
require("interbase.inc");
ibase_connect($test_base);
diff --git a/ext/interbase/tests/004.phpt b/ext/interbase/tests/004.phpt
index 579445dbdd..e81474a4c4 100644
--- a/ext/interbase/tests/004.phpt
+++ b/ext/interbase/tests/004.phpt
@@ -3,7 +3,7 @@ InterBase: BLOB test
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
-<?php /* $Id$ */
+<?php
require("interbase.inc");
diff --git a/ext/interbase/tests/005.phpt b/ext/interbase/tests/005.phpt
index c5167c132e..cb68b0a1d5 100644
--- a/ext/interbase/tests/005.phpt
+++ b/ext/interbase/tests/005.phpt
@@ -3,7 +3,7 @@ InterBase: transactions
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
-<?php /* $Id$ */
+<?php
require("interbase.inc");
@@ -63,7 +63,7 @@ simple default transaction test without ibase_trans()
/*
default transaction on default link
First open transaction on link will be default.
-$tr_def_l1 may be ommited. All queryes without link and trans
+$tr_def_l1 may be omitted. All queryes without link and trans
parameters run in this context
*/
diff --git a/ext/interbase/tests/006.phpt b/ext/interbase/tests/006.phpt
index ad6120f393..a32807eec0 100644
--- a/ext/interbase/tests/006.phpt
+++ b/ext/interbase/tests/006.phpt
@@ -3,7 +3,7 @@ InterBase: binding (may take a while)
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
-<?php /* $Id$ */
+<?php
require("interbase.inc");
diff --git a/ext/interbase/tests/007.phpt b/ext/interbase/tests/007.phpt
index 069b7eda26..92e7c73984 100644
--- a/ext/interbase/tests/007.phpt
+++ b/ext/interbase/tests/007.phpt
@@ -3,7 +3,7 @@ InterBase: array handling
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
-<?php /* $Id$ */
+<?php
require("interbase.inc");
diff --git a/ext/interbase/tests/008.phpt b/ext/interbase/tests/008.phpt
index 8292fc38c5..6728b9d7d3 100644
--- a/ext/interbase/tests/008.phpt
+++ b/ext/interbase/tests/008.phpt
@@ -6,7 +6,7 @@ if (PHP_OS == "WINNT") echo "skip";
include("skipif.inc");
?>
--FILE--
-<?php /* $Id$ */
+<?php
require("interbase.inc");
diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c
index bc279b25f7..607add2fcf 100644
--- a/ext/intl/collator/collator_convert.c
+++ b/ext/intl/collator/collator_convert.c
@@ -273,7 +273,7 @@ zval* collator_convert_object_to_string( zval* obj, zval *rv TSRMLS_DC )
}
}
- /* Object wasn't successfuly converted => bail out. */
+ /* Object wasn't successfully converted => bail out. */
if( zstr == NULL )
{
COLLATOR_CONVERT_RETURN_FAILED( obj );
diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c
index 4fd7c4597e..6f29c9b6de 100644
--- a/ext/intl/collator/collator_sort.c
+++ b/ext/intl/collator/collator_sort.c
@@ -482,7 +482,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys )
sortKeyIndxBuf = erealloc( sortKeyIndxBuf, sortKeyIndxBufSize );
}
- sortKeyIndxBuf[sortKeyCount].key = (char*)sortKeyBufOffset; /* remeber just offset, cause address */
+ sortKeyIndxBuf[sortKeyCount].key = (char*)sortKeyBufOffset; /* remember just offset, cause address */
/* of 'sortKeyBuf' may be changed due to realloc. */
sortKeyIndxBuf[sortKeyCount].zstr = hashData;
diff --git a/ext/intl/doc/datefmt_api.php b/ext/intl/doc/datefmt_api.php
index 272abdb57c..2084e1a2c8 100644
--- a/ext/intl/doc/datefmt_api.php
+++ b/ext/intl/doc/datefmt_api.php
@@ -150,7 +150,7 @@ class DateFormatter {
* time patterns, parsing as much as possible to obtain a value.
* 'false' sets the parser to strictly parse strings into dates.
* Extra space, unrecognized tokens, or invalid values
- * ("Feburary 30th") are not accepted.
+ * ("February 30th") are not accepted.
*
* @return boolean 'true' if successful; 'false' if an error occurred.
*/
@@ -338,7 +338,7 @@ class DateFormatter {
* time patterns, parsing as much as possible to obtain a value.
* 'false' sets the parser to strictly parse strings into dates.
* Extra space, unrecognized tokens, or invalid values
- * ("Feburary 30th") are not accepted.
+ * ("February 30th") are not accepted.
*
* @return boolean 'true' if successful; 'false' if an error occurred.
*/
diff --git a/ext/intl/intl_convert.c b/ext/intl/intl_convert.c
index 7f756b9e7f..50a742082f 100644
--- a/ext/intl/intl_convert.c
+++ b/ext/intl/intl_convert.c
@@ -61,7 +61,7 @@ void intl_convert_utf8_to_utf16(
if( *status == U_ZERO_ERROR )
{
- /* String is converted successfuly */
+ /* String is converted successfully */
(*target)[dst_len] = 0;
*target_len = dst_len;
return;
diff --git a/ext/intl/tests/bug60192-compare.phpt b/ext/intl/tests/bug60192-compare.phpt
index 0fd24cce80..12f3273538 100644
--- a/ext/intl/tests/bug60192-compare.phpt
+++ b/ext/intl/tests/bug60192-compare.phpt
@@ -8,7 +8,7 @@ Bug #60192 (SegFault when Collator not constructed properly)
<?php
class Collator2 extends Collator{
public function __construct() {
- // ommitting parent::__construct($someLocale);
+ // omitting parent::__construct($someLocale);
}
}
diff --git a/ext/intl/tests/bug60192-getlocale.phpt b/ext/intl/tests/bug60192-getlocale.phpt
index 50e3ec35e4..9f340c5f67 100644
--- a/ext/intl/tests/bug60192-getlocale.phpt
+++ b/ext/intl/tests/bug60192-getlocale.phpt
@@ -9,7 +9,7 @@ Bug #60192 (SegFault when Collator not constructed properly)
class Collator2 extends Collator{
public function __construct() {
- // ommitting parent::__construct($someLocale);
+ // omitting parent::__construct($someLocale);
}
}
diff --git a/ext/intl/tests/bug60192-getsortkey.phpt b/ext/intl/tests/bug60192-getsortkey.phpt
index 39755ae8f9..f3e68f9c61 100644
--- a/ext/intl/tests/bug60192-getsortkey.phpt
+++ b/ext/intl/tests/bug60192-getsortkey.phpt
@@ -9,7 +9,7 @@ Bug #60192 (SegFault when Collator not constructed properly)
class Collator2 extends Collator{
public function __construct() {
- // ommitting parent::__construct($someLocale);
+ // omitting parent::__construct($someLocale);
}
}
diff --git a/ext/intl/tests/bug60192-sort.phpt b/ext/intl/tests/bug60192-sort.phpt
index 57057215e6..ee506d3a5a 100644
--- a/ext/intl/tests/bug60192-sort.phpt
+++ b/ext/intl/tests/bug60192-sort.phpt
@@ -9,7 +9,7 @@ Bug #60192 (SegFault when Collator not constructed properly)
class Collator2 extends Collator{
public function __construct() {
- // ommitting parent::__construct($someLocale);
+ // omitting parent::__construct($someLocale);
}
}
diff --git a/ext/intl/tests/bug60192-sortwithsortkeys.phpt b/ext/intl/tests/bug60192-sortwithsortkeys.phpt
index 445f4a03b9..c26b2daf85 100644
--- a/ext/intl/tests/bug60192-sortwithsortkeys.phpt
+++ b/ext/intl/tests/bug60192-sortwithsortkeys.phpt
@@ -9,7 +9,7 @@ Bug #60192 (SegFault when Collator not constructed properly)
class Collator2 extends Collator{
public function __construct() {
- // ommitting parent::__construct($someLocale);
+ // omitting parent::__construct($someLocale);
}
}
diff --git a/ext/intl/tests/bug67052-win32.phpt b/ext/intl/tests/bug67052-win32.phpt
new file mode 100644
index 0000000000..5bc6497bea
--- /dev/null
+++ b/ext/intl/tests/bug67052-win32.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #67052 - NumberFormatter::parse() resets LC_NUMERIC setting
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die("skip Valid only on Windows");
+}
+?>
+--FILE--
+<?php
+
+function ut_main()
+{
+ setlocale(LC_ALL, 'de-de');
+ $fmt = new NumberFormatter( 'sl_SI.UTF-8', NumberFormatter::DECIMAL);
+ $num = "1.234.567,891";
+ $res_str = $fmt->parse($num)."\n";
+ $res_str .= setlocale(LC_NUMERIC, 0);
+ return $res_str;
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+
+?>
+--EXPECT--
+1234567,891
+de-de
+
diff --git a/ext/intl/tests/bug67052.phpt b/ext/intl/tests/bug67052.phpt
index c8363b9c7a..8edd65de71 100644
--- a/ext/intl/tests/bug67052.phpt
+++ b/ext/intl/tests/bug67052.phpt
@@ -2,6 +2,11 @@
Bug #67052 - NumberFormatter::parse() resets LC_NUMERIC setting
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die("skip Valid only on non Windows");
+}
+?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_create3.phpt b/ext/intl/tests/collator_create3.phpt
index c602e794cd..5041e635fa 100644
--- a/ext/intl/tests/collator_create3.phpt
+++ b/ext/intl/tests/collator_create3.phpt
@@ -1,8 +1,9 @@
--TEST--
-create() icu >= 53.1
+create() icu >= 53.1 && icu < 54.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_create4.phpt b/ext/intl/tests/collator_create4.phpt
new file mode 100644
index 0000000000..2c22e6a442
--- /dev/null
+++ b/ext/intl/tests/collator_create4.phpt
@@ -0,0 +1,79 @@
+--TEST--
+create() icu >= 53.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Try creating collator with different locales
+ * with Procedural and Object methods.
+ */
+
+function ut_main()
+{
+ $res_str = '';
+
+ $locales = array(
+ 'EN-US-ODESSA',
+ 'UK_UA_ODESSA',
+ 'uk-ua_CALIFORNIA@currency=;currency=GRN',
+ '',
+ 'root',
+ 'uk@currency=EURO',
+ '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
+ );
+
+ foreach( $locales as $locale )
+ {
+ // Create Collator with the current locale.
+ $coll = ut_coll_create( $locale );
+ if( !is_object($coll) )
+ {
+ $res_str .= "Error creating collator with '$locale' locale: " .
+ intl_get_error_message() . "\n";
+ continue;
+ }
+
+ // Get the requested, valid and actual locales.
+ $vloc = ut_coll_get_locale( $coll, Locale::VALID_LOCALE );
+ $aloc = ut_coll_get_locale( $coll, Locale::ACTUAL_LOCALE );
+
+ // Show them.
+ $res_str .= "Locale: '$locale'\n" .
+ " ULOC_REQUESTED_LOCALE = '$locale'\n" .
+ " ULOC_VALID_LOCALE = '$vloc'\n" .
+ " ULOC_ACTUAL_LOCALE = '$aloc'\n";
+ }
+
+ return $res_str;
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+
+?>
+--EXPECTF--
+Locale: 'EN-US-ODESSA'
+ ULOC_REQUESTED_LOCALE = 'EN-US-ODESSA'
+ ULOC_VALID_LOCALE = 'en_US'
+ ULOC_ACTUAL_LOCALE = 'root'
+Locale: 'UK_UA_ODESSA'
+ ULOC_REQUESTED_LOCALE = 'UK_UA_ODESSA'
+ ULOC_VALID_LOCALE = 'uk'
+ ULOC_ACTUAL_LOCALE = 'uk'
+Error creating collator with 'uk-ua_CALIFORNIA@currency=;currency=GRN' locale: collator_create: unable to open ICU collator: U_ILLEGAL_ARGUMENT_ERROR
+Locale: ''
+ ULOC_REQUESTED_LOCALE = ''
+ ULOC_VALID_LOCALE = '%s'
+ ULOC_ACTUAL_LOCALE = '%s'
+Locale: 'root'
+ ULOC_REQUESTED_LOCALE = 'root'
+ ULOC_VALID_LOCALE = 'root'
+ ULOC_ACTUAL_LOCALE = 'root'
+Locale: 'uk@currency=EURO'
+ ULOC_REQUESTED_LOCALE = 'uk@currency=EURO'
+ ULOC_VALID_LOCALE = 'uk'
+ ULOC_ACTUAL_LOCALE = 'uk'
+Error creating collator with '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than 80 characters: U_ILLEGAL_ARGUMENT_ERROR
diff --git a/ext/intl/tests/collator_get_error_code.phpt b/ext/intl/tests/collator_get_error_code.phpt
index 45a8e710f4..c886943d5d 100644
--- a/ext/intl/tests/collator_get_error_code.phpt
+++ b/ext/intl/tests/collator_get_error_code.phpt
@@ -6,7 +6,7 @@ get_error_code()
<?php
/*
- * Retreive error code.
+ * Retrieve error code.
*/
diff --git a/ext/intl/tests/collator_get_error_message.phpt b/ext/intl/tests/collator_get_error_message.phpt
index af4b9c3821..2c1cc79a5f 100644
--- a/ext/intl/tests/collator_get_error_message.phpt
+++ b/ext/intl/tests/collator_get_error_message.phpt
@@ -6,7 +6,7 @@ get_error_message()
<?php
/*
- * Retreive error message.
+ * Retrieve error message.
*/
diff --git a/ext/intl/tests/collator_get_sort_key_variant3.phpt b/ext/intl/tests/collator_get_sort_key_variant3.phpt
index cc2a23b2b8..f4cb88e3e7 100644
--- a/ext/intl/tests/collator_get_sort_key_variant3.phpt
+++ b/ext/intl/tests/collator_get_sort_key_variant3.phpt
@@ -1,8 +1,9 @@
--TEST--
-collator_get_sort_key()
+collator_get_sort_key() icu >= 53.1 && icu < 54.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_get_sort_key_variant4.phpt b/ext/intl/tests/collator_get_sort_key_variant4.phpt
new file mode 100644
index 0000000000..2c86f21111
--- /dev/null
+++ b/ext/intl/tests/collator_get_sort_key_variant4.phpt
@@ -0,0 +1,98 @@
+--TEST--
+collator_get_sort_key() icu >= 54.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Get sort keys using various locales
+ */
+function sort_arrays( $locale, $data )
+{
+ $res_str = '';
+
+ $coll = ut_coll_create( $locale );
+
+ foreach($data as $value) {
+ $res_val = ut_coll_get_sort_key( $coll, $value );
+ $res_str .= "source: ".$value."\n".
+ "key: ".bin2hex($res_val)."\n";
+ }
+
+ return $res_str;
+}
+
+
+function ut_main()
+{
+ $res_str = '';
+
+ // Regular strings keys
+ $test_params = array(
+ 'abc', 'abd', 'aaa',
+ 'аа', 'а', 'z',
+ '', null , '3',
+ 'y' , 'i' , 'k'
+ );
+
+ $res_str .= sort_arrays( 'en_US', $test_params );
+
+ // Sort a non-ASCII array using ru_RU locale.
+ $test_params = array(
+ 'абг', 'абв', 'жжж', 'эюя'
+ );
+
+ $res_str .= sort_arrays( 'ru_RU', $test_params );
+
+ // Sort an array using Lithuanian locale.
+ $res_str .= sort_arrays( 'lt_LT', $test_params );
+
+ return $res_str . "\n";
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+?>
+--EXPECT--
+source: abc
+key: 292b2d01070107
+source: abd
+key: 292b2f01070107
+source: aaa
+key: 29292901070107
+source: аа
+key: 5e060601060106
+source: а
+key: 5e0601050105
+source: z
+key: 5b01050105
+source:
+key: 0101
+source:
+key: 0101
+source: 3
+key: 1a01050105
+source: y
+key: 5901050105
+source: i
+key: 3901050105
+source: k
+key: 3d01050105
+source: абг
+key: 2806101401070107
+source: абв
+key: 2806101201070107
+source: жжж
+key: 2830303001070107
+source: эюя
+key: 28ccd0d401070107
+source: абг
+key: 5e06101401070107
+source: абв
+key: 5e06101201070107
+source: жжж
+key: 5e30303001070107
+source: эюя
+key: 5eccd0d401070107
diff --git a/ext/intl/tests/dateformat_calendars_variant2.phpt b/ext/intl/tests/dateformat_calendars_variant2.phpt
index 61cdea8408..b3b1701c55 100644
--- a/ext/intl/tests/dateformat_calendars_variant2.phpt
+++ b/ext/intl/tests/dateformat_calendars_variant2.phpt
@@ -6,6 +6,7 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_calendars_variant3.phpt b/ext/intl/tests/dateformat_calendars_variant3.phpt
new file mode 100644
index 0000000000..36a67e6f04
--- /dev/null
+++ b/ext/intl/tests/dateformat_calendars_variant3.phpt
@@ -0,0 +1,45 @@
+--TEST--
+IntlDateFormatter, calendars and time zone
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$fmt1 = new IntlDateFormatter('en_US',
+ IntlDateFormatter::FULL,
+ IntlDateFormatter::FULL,
+ 'GMT+05:12',
+ IntlDateFormatter::TRADITIONAL);
+$fmt2 = new IntlDateFormatter('en_US',
+ IntlDateFormatter::FULL,
+ IntlDateFormatter::FULL,
+ 'GMT+05:12',
+ IntlDateFormatter::GREGORIAN);
+$fmt3 = new IntlDateFormatter('en_US@calendar=hebrew',
+ IntlDateFormatter::FULL,
+ IntlDateFormatter::FULL,
+ 'GMT+05:12',
+ IntlDateFormatter::TRADITIONAL);
+var_dump($fmt1->format(strtotime('2012-01-01 00:00:00 +0000')));
+var_dump($fmt2->format(strtotime('2012-01-01 00:00:00 +0000')));
+var_dump($fmt3->format(strtotime('2012-01-01 00:00:00 +0000')));
+
+new IntlDateFormatter('en_US@calendar=hebrew',
+ IntlDateFormatter::FULL,
+ IntlDateFormatter::FULL,
+ 'GMT+05:12',
+ -1);
+?>
+==DONE==
+--EXPECTF--
+string(47) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12"
+string(47) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12"
+string(44) "Sunday, 6 Tevet 5772 at 5:12:00 AM GMT+05:12"
+
+Warning: IntlDateFormatter::__construct(): datefmt_create: invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %sdateformat_calendars_variant%d.php on line %d
+==DONE==
diff --git a/ext/intl/tests/dateformat_create_cal_arg_variant3.phpt b/ext/intl/tests/dateformat_create_cal_arg_variant3.phpt
index 8a8c45d412..1beff145de 100644
--- a/ext/intl/tests/dateformat_create_cal_arg_variant3.phpt
+++ b/ext/intl/tests/dateformat_create_cal_arg_variant3.phpt
@@ -4,6 +4,7 @@ IntlDateFormatter: several forms of the calendar arg
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_create_cal_arg_variant4.phpt b/ext/intl/tests/dateformat_create_cal_arg_variant4.phpt
new file mode 100644
index 0000000000..4086e4558a
--- /dev/null
+++ b/ext/intl/tests/dateformat_create_cal_arg_variant4.phpt
@@ -0,0 +1,53 @@
+--TEST--
+IntlDateFormatter: several forms of the calendar arg
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$ts = strtotime('2012-01-01 00:00:00 UTC');
+
+$cal = new IntlGregorianCalendar('UTC', NULL);
+$df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal);
+echo $df->format($ts), "\n";
+
+$cal = IntlCalendar::createInstance('UTC', 'en@calendar=islamic');
+$df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal);
+echo $df->format($ts), "\n";
+
+//override calendar's timezone
+$cal = new IntlGregorianCalendar('UTC', NULL);
+$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Madrid', $cal);
+echo $df->format($ts), "\n";
+
+//default calendar is gregorian
+$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0);
+echo $df->format($ts), "\n";
+
+//try now with traditional
+$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0, NULL, IntlDateFormatter::TRADITIONAL);
+echo $df->format($ts), "\n";
+
+//the timezone can be overridden when not specifying a calendar
+$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0, 'UTC', IntlDateFormatter::TRADITIONAL);
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, 'UTC', 0);
+echo $df->format($ts), "\n";
+
+?>
+==DONE==
+--EXPECTF--
+domingo%S 1 de enero de 2012, 0:00:00 (GMT)
+domingo%S 8 de Safar de 1433, 0:00:00 (GMT)
+domingo, 1 de enero de 2012, 1:00:00 (hora estándar de Europa central)
+sábado, 31 de diciembre de 2011 d. C., 23:00:00 (hora estándar de las Azores)
+sábado, 7 de Safar de 1433 AH, 23:00:00 (hora estándar de las Azores)
+domingo%S 8 de Safar de 1433 AH, 0:00:00 (GMT)
+domingo%S 1 de enero de 2012, 0:00:00 (GMT)
+==DONE==
diff --git a/ext/intl/tests/dateformat_formatObject_calendar_variant3.phpt b/ext/intl/tests/dateformat_formatObject_calendar_variant3.phpt
index 0c5486263f..0312524148 100644
--- a/ext/intl/tests/dateformat_formatObject_calendar_variant3.phpt
+++ b/ext/intl/tests/dateformat_formatObject_calendar_variant3.phpt
@@ -4,6 +4,7 @@ IntlDateFormatter::formatObject(): IntlCalendar tests
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_formatObject_calendar_variant4.phpt b/ext/intl/tests/dateformat_formatObject_calendar_variant4.phpt
new file mode 100644
index 0000000000..2ca57c245f
--- /dev/null
+++ b/ext/intl/tests/dateformat_formatObject_calendar_variant4.phpt
@@ -0,0 +1,40 @@
+--TEST--
+IntlDateFormatter::formatObject(): IntlCalendar tests
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", "Europe/Lisbon");
+
+$cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon
+echo IntlDateFormatter::formatObject($cal), "\n";
+echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n";
+echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n";
+echo IntlDateFormatter::formatObject($cal, array(IntlDateFormatter::SHORT, IntlDateFormatter::FULL), "en-US"), "\n";
+echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n";
+
+$cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00');
+echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n";
+
+$cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil');
+$cal->setTime(strtotime('2012-01-01 00:00:00')*1000.);
+echo IntlDateFormatter::formatObject($cal), "\n";
+echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL, "en-US"), "\n";
+
+?>
+==DONE==
+
+--EXPECTF--
+01/01/2012, 00:00:00
+domingo, 1 de janeiro de 2012 às 00:00:00 Hora Padrão %Sda Europa Ocidental
+Jan 1, 2012, 12:00:00 AM
+1/1/12, 12:00:00 AM Western European Standard %STime
+Sun 2012-01-1 00,00,00.000 Portugal Time
+domingo, 1 de janeiro de 2012 às 05:00:00 GMT+03:00
+06/02/1433, 00:00:00
+Sunday, Safar 6, 1433 at 12:00:00 AM Western European Standard Time
+==DONE==
diff --git a/ext/intl/tests/dateformat_formatObject_datetime_variant3.phpt b/ext/intl/tests/dateformat_formatObject_datetime_variant3.phpt
index fec88e9d13..5ee72446f1 100644
--- a/ext/intl/tests/dateformat_formatObject_datetime_variant3.phpt
+++ b/ext/intl/tests/dateformat_formatObject_datetime_variant3.phpt
@@ -4,6 +4,7 @@ IntlDateFormatter::formatObject(): DateTime tests
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_formatObject_datetime_variant4.phpt b/ext/intl/tests/dateformat_formatObject_datetime_variant4.phpt
new file mode 100644
index 0000000000..c47e2b59bd
--- /dev/null
+++ b/ext/intl/tests/dateformat_formatObject_datetime_variant4.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlDateFormatter::formatObject(): DateTime tests
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", "Europe/Lisbon");
+
+$dt = new DateTime('2012-01-01 00:00:00'); //Europe/Lisbon
+echo IntlDateFormatter::formatObject($dt), "\n";
+echo IntlDateFormatter::formatObject($dt, IntlDateFormatter::FULL), "\n";
+echo IntlDateFormatter::formatObject($dt, null, "en-US"), "\n";
+echo IntlDateFormatter::formatObject($dt, array(IntlDateFormatter::SHORT, IntlDateFormatter::FULL), "en-US"), "\n";
+echo IntlDateFormatter::formatObject($dt, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n";
+
+$dt = new DateTime('2012-01-01 05:00:00+03:00');
+echo IntlDateFormatter::formatObject($dt, IntlDateFormatter::FULL), "\n";
+
+?>
+==DONE==
+
+--EXPECTF--
+01/01/2012, 00:00:00
+domingo, 1 de janeiro de 2012 às 00:00:00 Hora Padrão %Sda Europa Ocidental
+Jan 1, 2012, 12:00:00 AM
+1/1/12, 12:00:00 AM Western European Standard %STime
+Sun 2012-01-1 00,00,00.000 Portugal Time
+domingo, 1 de janeiro de 2012 às 05:00:00 GMT+03:00
+==DONE==
diff --git a/ext/intl/tests/dateformat_get_set_calendar_variant3.phpt b/ext/intl/tests/dateformat_get_set_calendar_variant3.phpt
index 5dee52db92..97f2911cfe 100644
--- a/ext/intl/tests/dateformat_get_set_calendar_variant3.phpt
+++ b/ext/intl/tests/dateformat_get_set_calendar_variant3.phpt
@@ -4,6 +4,7 @@ IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject()
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_get_set_calendar_variant4.phpt b/ext/intl/tests/dateformat_get_set_calendar_variant4.phpt
new file mode 100644
index 0000000000..dc9db09740
--- /dev/null
+++ b/ext/intl/tests/dateformat_get_set_calendar_variant4.phpt
@@ -0,0 +1,55 @@
+--TEST--
+IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject()
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$ts = strtotime('2012-01-01 00:00:00 UTC');
+
+function d(IntlDateFormatter $df) {
+global $ts;
+echo $df->format($ts), "\n";
+var_dump($df->getCalendar(),
+$df->getCalendarObject()->getType(),
+$df->getCalendarObject()->getTimeZone()->getId());
+echo "\n";
+}
+
+$df = new IntlDateFormatter('fr@calendar=islamic', 0, 0, 'Europe/Minsk');
+d($df);
+
+
+//changing the calendar with a cal type should not change tz
+$df->setCalendar(IntlDateFormatter::TRADITIONAL);
+d($df);
+
+//but changing with an actual calendar should
+$cal = IntlCalendar::createInstance("UTC");
+$df->setCalendar($cal);
+d($df);
+
+?>
+==DONE==
+--EXPECT--
+dimanche 1 janvier 2012 ap. J.-C. à 03:00:00 heure de Kaliningrad
+int(1)
+string(9) "gregorian"
+string(12) "Europe/Minsk"
+
+dimanche 8 safar 1433 AH à 03:00:00 heure de Kaliningrad
+int(0)
+string(7) "islamic"
+string(12) "Europe/Minsk"
+
+dimanche 1 janvier 2012 ap. J.-C. à 00:00:00 UTC
+bool(false)
+string(9) "gregorian"
+string(3) "UTC"
+
+==DONE==
diff --git a/ext/intl/tests/dateformat_get_set_timezone_variant3.phpt b/ext/intl/tests/dateformat_get_set_timezone_variant3.phpt
index fe0663e069..a06bbc1eaa 100644
--- a/ext/intl/tests/dateformat_get_set_timezone_variant3.phpt
+++ b/ext/intl/tests/dateformat_get_set_timezone_variant3.phpt
@@ -4,6 +4,7 @@ IntlDateFormatter: get/setTimeZone()
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_get_set_timezone_variant4.phpt b/ext/intl/tests/dateformat_get_set_timezone_variant4.phpt
new file mode 100644
index 0000000000..adedd74965
--- /dev/null
+++ b/ext/intl/tests/dateformat_get_set_timezone_variant4.phpt
@@ -0,0 +1,62 @@
+--TEST--
+IntlDateFormatter: get/setTimeZone()
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$ts = strtotime('2012-01-01 00:00:00 UTC');
+
+function d(IntlDateFormatter $df) {
+global $ts;
+echo $df->format($ts), "\n";
+var_dump(
+$df->getTimeZoneID(),
+$df->getTimeZone()->getID());
+echo "\n";
+}
+
+$df = new IntlDateFormatter('pt_PT', 0, 0, 'Europe/Minsk');
+d($df);
+
+$df->setTimeZone(NULL);
+d($df);
+
+$df->setTimeZone('Europe/Madrid');
+d($df);
+
+$df->setTimeZone(IntlTimeZone::createTimeZone('Europe/Paris'));
+d($df);
+
+$df->setTimeZone(new DateTimeZone('Europe/Amsterdam'));
+d($df);
+
+?>
+==DONE==
+--EXPECTF--
+domingo, 1 de janeiro de 2012 às 03:00:00 Hor%s do Extremo Leste da Europa
+string(12) "Europe/Minsk"
+string(12) "Europe/Minsk"
+
+sábado, 31 de dezembro de 2011 às 23:00:00 Hor%s Padrão %Sdos Açores
+string(15) "Atlantic/Azores"
+string(15) "Atlantic/Azores"
+
+domingo, 1 de janeiro de 2012 às 01:00:00 Hor%s Padrão %Sda Europa Central
+string(13) "Europe/Madrid"
+string(13) "Europe/Madrid"
+
+domingo, 1 de janeiro de 2012 às 01:00:00 Hor%s Padrão %Sda Europa Central
+string(12) "Europe/Paris"
+string(12) "Europe/Paris"
+
+domingo, 1 de janeiro de 2012 às 01:00:00 Hor%s Padrão %Sda Europa Central
+string(16) "Europe/Amsterdam"
+string(16) "Europe/Amsterdam"
+
+==DONE==
diff --git a/ext/intl/tests/dateformat_timezone_arg_variations3.phpt b/ext/intl/tests/dateformat_timezone_arg_variations3.phpt
index 0ef743ea43..f8aaf2bd4a 100644
--- a/ext/intl/tests/dateformat_timezone_arg_variations3.phpt
+++ b/ext/intl/tests/dateformat_timezone_arg_variations3.phpt
@@ -4,6 +4,7 @@ IntlDateFormatter: several forms of the timezone arg
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_timezone_arg_variations4.phpt b/ext/intl/tests/dateformat_timezone_arg_variations4.phpt
new file mode 100644
index 0000000000..7be709a66f
--- /dev/null
+++ b/ext/intl/tests/dateformat_timezone_arg_variations4.phpt
@@ -0,0 +1,46 @@
+--TEST--
+IntlDateFormatter: several forms of the timezone arg
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$ts = strtotime('2012-01-01 00:00:00 UTC');
+
+//should use Atlantic/Azores
+$df = new IntlDateFormatter('es_ES', 0, 0, NULL);
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam');
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, new DateTimeZone('Europe/Lisbon'));
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, IntlTimeZone::createTimeZone('America/New_York'));
+echo $df->format($ts), "\n";
+
+//time zone has priority
+$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam', new IntlGregorianCalendar('Europe/Lisbon'));
+echo $df->format($ts), "\n";
+
+//calendar has priority
+$df = new IntlDateFormatter('es_ES', 0, 0, NULL, new IntlGregorianCalendar('Europe/Lisbon'));
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam', 0);
+echo $df->format($ts), "\n";
+
+--EXPECTF--
+sábado, 31 de diciembre de 2011, 23:00:00 (hora estándar de las Azores)
+domingo, 1 de enero de 2012, 1:00:00 (hora estándar de Europa central)
+domingo, 1 de enero de 2012, 0:00:00 (hora estándar de Europa occidental)
+sábado, 31 de diciembre de 2011, 19:00:00 (hora estándar oriental)
+domingo, 1 de enero de 2012, 1:00:00 (hora estándar de Europa central)
+domingo, 1 de enero de 2012, 0:00:00 (hora estándar de Europa occidental)
+domingo, 1 de enero de 2012, 1:00:00 (hora estándar de Europa central)
+
diff --git a/ext/intl/tests/formatter_format4.phpt b/ext/intl/tests/formatter_format4.phpt
index 88d457bdb3..96dd7be53e 100644
--- a/ext/intl/tests/formatter_format4.phpt
+++ b/ext/intl/tests/formatter_format4.phpt
@@ -1,8 +1,9 @@
--TEST--
-numfmt_format() icu >= 53.1
+numfmt_format() icu >= 53.1 && icu < 54.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_format5.phpt b/ext/intl/tests/formatter_format5.phpt
new file mode 100644
index 0000000000..cbaf140a0f
--- /dev/null
+++ b/ext/intl/tests/formatter_format5.phpt
@@ -0,0 +1,130 @@
+--TEST--
+numfmt_format() icu >= 54.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Format a number using misc locales/patterns.
+ */
+
+/*
+ * TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed
+ * currency and percent formatting.
+ */
+
+function ut_main()
+{
+ $styles = array(
+ NumberFormatter::PATTERN_DECIMAL => '##.#####################',
+ NumberFormatter::DECIMAL => '',
+ NumberFormatter::CURRENCY => '',
+ NumberFormatter::PERCENT => '',
+ NumberFormatter::SCIENTIFIC => '',
+ NumberFormatter::SPELLOUT => '@@@@@@@',
+ NumberFormatter::ORDINAL => '',
+ NumberFormatter::DURATION => '',
+ NumberFormatter::PATTERN_RULEBASED => '#####.###',
+ 1234999, // bad one
+ );
+
+ $integer = array(
+ NumberFormatter::ORDINAL => '',
+ NumberFormatter::DURATION => '',
+ );
+ $locales = array(
+ 'en_US',
+ 'ru_UA',
+ 'de',
+ 'fr',
+ 'en_UK'
+ );
+
+ $str_res = '';
+ $number = 1234567.891234567890000;
+
+ foreach( $locales as $locale )
+ {
+ $str_res .= "\nLocale is: $locale\n";
+ foreach( $styles as $style => $pattern )
+ {
+ $fmt = ut_nfmt_create( $locale, $style, $pattern );
+
+ if(!$fmt) {
+ $str_res .= "Bad formatter!\n";
+ continue;
+ }
+ $str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
+ }
+ }
+ return $str_res;
+}
+
+include_once( 'ut_common.inc' );
+
+// Run the test
+ut_run();
+
+?>
+--EXPECTREGEX--
+Locale is: en_US
+'1234567.89123457'
+'1,234,567.891'
+'\$1,234,567.89'
+'123,456,789%'
+'1.23456789123457E6'
+'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
+'1,234,567(th|ᵗʰ)'
+'342:56:07'
+'#####.###'
+'USD1,234,567.89'
+
+Locale is: ru_UA
+'1234567,89123457'
+'1 234 567,891'
+'1 234 567,89 ?(грн\.|₴)'
+'123 456 789 ?%'
+'1,23456789123457E6'
+'один миллион двести тридцать четыре тысячи пятьсот шестьдесят семь запятая восемь девять один два три четыре пять семь'
+'1 234 567.?'
+'1 234 567'
+'#####.###'
+'1 234 567,89 UAH'
+
+Locale is: de
+'1234567,89123457'
+'1.234.567,891'
+'(¤ )?1.234.567,89( ¤)?'
+'123\.456\.789 %'
+'1,23456789123457E6'
+'eine Million zwei­hundert­vier­und­dreißig­tausend­fünf­hundert­sieben­und­sechzig Komma acht neun eins zwei drei vier fünf sieben'
+'1.234.567.?'
+'1.234.567'
+'#####.###'
+'1.234.567,89 ¤¤'
+
+Locale is: fr
+'1234567,89123457'
+'1 234 567,891'
+'1 234 567,89 ¤'
+'123 456 789 ?%'
+'1,23456789123457E6'
+'un million deux cent trente-quatre mille cinq cent soixante-sept virgule huit neuf un deux trois quatre cinq sept'
+'1 234 567e'
+'1 234 567'
+'#####.###'
+'1 234 567,89 ¤¤'
+
+Locale is: en_UK
+'1234567.89123457'
+'1,234,567.891'
+'¤1,234,567.89'
+'123,456,789%'
+'1.23456789123457E6'
+'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
+'1,234,567(th|ᵗʰ)'
+'342:56:07'
+'#####.###'
+'¤¤1,234,567.89'
diff --git a/ext/intl/tests/msgfmt_format_intlcalendar_variant3.phpt b/ext/intl/tests/msgfmt_format_intlcalendar_variant3.phpt
index c390366b5e..766c508d31 100644
--- a/ext/intl/tests/msgfmt_format_intlcalendar_variant3.phpt
+++ b/ext/intl/tests/msgfmt_format_intlcalendar_variant3.phpt
@@ -4,6 +4,7 @@ MessageFormat accepts IntlCalendar args
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') >= 0) die('skip for ICU < 54.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt b/ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt
new file mode 100644
index 0000000000..8f778b9029
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt
@@ -0,0 +1,30 @@
+--TEST--
+MessageFormat accepts IntlCalendar args
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+//ini_set("intl.default_locale", "nl");
+ini_set('date.timezone', 'Europe/Lisbon');
+
+$cal = new IntlGregorianCalendar(2012,04,17,17,35,36);
+
+$msgf = new MessageFormatter('pt_PT', '{0,date,full} {0,time,h:m:s a V}');
+echo $msgf->format(array($cal)), "\n";
+
+//NOT FIXED:
+/*$msgf = new MessageFormatter('en_US',
+'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}');
+
+echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
+ $msgf->format(array($time, 'time')), "\n";
+*/
+
+?>
+==DONE==
+--EXPECT--
+quinta-feira, 17 de maio de 2012 5:35:36 da tarde ptlis
+==DONE==
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index d9e92541e9..3e4fb60825 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -1143,7 +1143,7 @@ zval *php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node ex
{
php_libxml_func_handler export_hnd;
- /* Initialize in case this module hasnt been loaded yet */
+ /* Initialize in case this module hasn't been loaded yet */
php_libxml_initialize();
export_hnd.export_func = export_function;
diff --git a/ext/mbstring/README_PHP3-i18n-ja b/ext/mbstring/README_PHP3-i18n-ja
index 869fe3e495..eabe9e90f2 100644
--- a/ext/mbstring/README_PHP3-i18n-ja
+++ b/ext/mbstring/README_PHP3-i18n-ja
@@ -371,7 +371,7 @@ o i18n.internal_encoding - internal encoding
encodings, following conditions have to be satisfied in order
to use them:
- per byte encoding
- - single byte charactor in range of 00h-7fh which is compatible
+ - single byte character in range of 00h-7fh which is compatible
with ASCII
- multibyte without 00h-7fh
In case of Japanese, EUC-JP and UTF-8 are the only encoding that
@@ -408,7 +408,7 @@ o i18n.script_encoding - script encoding
entering the script parser.
Be aware that auto detection may fail under some conditions.
- For best auto detection, add multibyte charactor at beginning of
+ For best auto detection, add multibyte character at beginning of
script.
diff --git a/ext/mbstring/libmbfl/filters/unicode_prop.h b/ext/mbstring/libmbfl/filters/unicode_prop.h
index d21ec61dfb..4feb5756e3 100644
--- a/ext/mbstring/libmbfl/filters/unicode_prop.h
+++ b/ext/mbstring/libmbfl/filters/unicode_prop.h
@@ -22,7 +22,7 @@
*
*/
-/* charactor property table */
+/* character property table */
#define MBFL_CHP_CTL 0x01
#define MBFL_CHP_DIGIT 0x02
#define MBFL_CHP_UALPHA 0x04
diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h
index 6a630c8fcd..b11119a80b 100644
--- a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h
+++ b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h
@@ -45,7 +45,7 @@
#define MBFL_ENCTYPE_ENC_STRM 0x00002000
#define MBFL_ENCTYPE_GL_UNSAFE 0x00004000
-/* wchar plane, special charactor */
+/* wchar plane, special character */
#define MBFL_WCSPLANE_MASK 0xffff
#define MBFL_WCSPLANE_UCS2MAX 0x00010000
#define MBFL_WCSPLANE_UTF32MAX 0x00110000
diff --git a/ext/mbstring/tests/mb_strtolower_variation3.phpt b/ext/mbstring/tests/mb_strtolower_variation3.phpt
index 08b3467853..99256e1ec4 100644
--- a/ext/mbstring/tests/mb_strtolower_variation3.phpt
+++ b/ext/mbstring/tests/mb_strtolower_variation3.phpt
@@ -14,7 +14,7 @@ function_exists('mb_strtolower') or die("skip mb_strtolower() is not available i
/*
* Pass a Japanese string and a mixed Japanese and ASCII string to mb_strtolower
- * to check correct conversion is occuring (Japanese characters should not be converted).
+ * to check correct conversion is occurring (Japanese characters should not be converted).
*/
echo "*** Testing mb_strtolower() : usage variations ***\n";
diff --git a/ext/mbstring/tests/mb_strtoupper_variation3.phpt b/ext/mbstring/tests/mb_strtoupper_variation3.phpt
index a4bf3b128f..f0cb0fa47c 100644
--- a/ext/mbstring/tests/mb_strtoupper_variation3.phpt
+++ b/ext/mbstring/tests/mb_strtoupper_variation3.phpt
@@ -14,7 +14,7 @@ function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available i
/*
* Pass a Japanese string and a mixed Japanese and ASCII string to mb_strtolower
- * to check correct conversion is occuring (Japanese characters should not be converted).
+ * to check correct conversion is occurring (Japanese characters should not be converted).
*/
echo "*** Testing mb_strtoupper() : usage variations ***\n";
diff --git a/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt b/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
index e718107b9b..ace9f829d8 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
@@ -23,7 +23,7 @@ $cipher = MCRYPT_TRIPLEDES;
$data = b"This is the secret message which must be encrypted";
$mode = MCRYPT_DECRYPT;
-// tripledes uses keys upto 192 bits (24 bytes)
+// tripledes uses keys up to 192 bits (24 bytes)
$keys = array(
b'12345678',
b'12345678901234567890',
diff --git a/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt b/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
index 7e29579779..65ef3ad8e2 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
@@ -23,7 +23,7 @@ $cipher = MCRYPT_TRIPLEDES;
$data = b"This is the secret message which must be encrypted";
$mode = MCRYPT_ENCRYPT;
-// tripledes uses keys upto 192 bits (24 bytes)
+// tripledes uses keys up to 192 bits (24 bytes)
$keys = array(
b'12345678',
b'12345678901234567890',
diff --git a/ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt b/ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt
index 51a64943b2..8b3cbd8366 100644
--- a/ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt
+++ b/ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt
@@ -21,13 +21,13 @@ echo "*** Testing mcrypt_encrypt() : TripleDES functionality ***\n";
//test tripledes, aes
//test different lengths of key, iv
//test no iv being passed on CBC, ECB
-//test upto 32 bytes with unlimited strength
+//test up to 32 bytes with unlimited strength
$cipher = MCRYPT_TRIPLEDES;
$mode = MCRYPT_MODE_CBC;
$data = b'This is the secret message which must be encrypted';
-// tripledes uses keys upto 192 bits (24 bytes)
+// tripledes uses keys up to 192 bits (24 bytes)
$keys = array(
b'12345678',
b'12345678901234567890',
diff --git a/ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt b/ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt
index 941eb7935f..ea6b2c2160 100644
--- a/ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt
+++ b/ext/mcrypt/tests/mcrypt_encrypt_3des_ecb.phpt
@@ -20,7 +20,7 @@ $cipher = MCRYPT_TRIPLEDES;
$mode = MCRYPT_MODE_ECB;
$data = b'This is the secret message which must be encrypted';
-// tripledes uses keys upto 192 bits (24 bytes)
+// tripledes uses keys up to 192 bits (24 bytes)
$keys = array(
b'12345678',
b'12345678901234567890',
diff --git a/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt b/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt
index 621f7b1dbd..5f5a4bea56 100644
--- a/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt
+++ b/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt
@@ -30,7 +30,7 @@ $cipher = MCRYPT_RIJNDAEL_128;
$mode = MCRYPT_MODE_CBC;
$data = b'This is the secret message which must be encrypted';
-// keys upto 128 bits (16 bytes)
+// keys up to 128 bits (16 bytes)
$keys = array(
null,
'',
diff --git a/ext/mysql/tests/mysql_deprecated_api.phpt b/ext/mysql/tests/mysql_deprecated_api.phpt
index ebf72375cf..8844617c66 100644
--- a/ext/mysql/tests/mysql_deprecated_api.phpt
+++ b/ext/mysql/tests/mysql_deprecated_api.phpt
@@ -13,7 +13,7 @@ error_reporting=E_ALL | E_NOTICE | E_STRICT
/*
We use an extra test to cover deprecation warning.
Due to this extra test we can silence deprecation warnings
- in have other test using @ operator without loosing the information
+ in have other test using @ operator without losing the information
which function is deprecated and, without reducing test portability.
*/
include "table.inc";
diff --git a/ext/mysqli/tests/mysqli_ps_select_union.phpt b/ext/mysqli/tests/mysqli_ps_select_union.phpt
index fed81b309d..a4659c4267 100644
--- a/ext/mysqli/tests/mysqli_ps_select_union.phpt
+++ b/ext/mysqli/tests/mysqli_ps_select_union.phpt
@@ -44,8 +44,8 @@ require_once('skipifconnectfailure.inc');
if ($IS_MYSQLND) {
/*
Advantage mysqlnd -
- The metadata mysqlnd has availabe after prepare is better than
- the one made availabe by the MySQL Client Library (libmysql).
+ The metadata mysqlnd has available after prepare is better than
+ the one made available by the MySQL Client Library (libmysql).
"libmysql" will give wrong results and that is OK -
http://bugs.mysql.com/bug.php?id=47483
*/
diff --git a/ext/mysqli/tests/mysqli_result_references.phpt b/ext/mysqli/tests/mysqli_result_references.phpt
index 9b5d476ac4..e009267754 100644
--- a/ext/mysqli/tests/mysqli_result_references.phpt
+++ b/ext/mysqli/tests/mysqli_result_references.phpt
@@ -19,7 +19,7 @@ require_once('skipifconnectfailure.inc');
$idx = 0;
while ($row = mysqli_fetch_assoc($res)) {
- /* mysqlnd: force seperation - create copies */
+ /* mysqlnd: force separation - create copies */
$references[$idx] = array(
'id' => &$row['id'],
'label' => $row['label'] . '');
@@ -30,7 +30,7 @@ require_once('skipifconnectfailure.inc');
mysqli_data_seek($res, 0);
while ($row = mysqli_fetch_assoc($res)) {
- /* mysqlnd: force seperation - create copies */
+ /* mysqlnd: force separation - create copies */
$references[$idx] = array(
'id' => &$row['id'],
'label' => $row['label'] . '');
@@ -48,7 +48,7 @@ require_once('skipifconnectfailure.inc');
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
while ($row = mysqli_fetch_assoc($res)) {
- /* mysqlnd: force seperation - create copies*/
+ /* mysqlnd: force separation - create copies*/
$references[$idx] = array(
'id' => &$row['id'],
'label' => $row['label'] . '');
diff --git a/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt b/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt
index 3935365257..60c5491b54 100644
--- a/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt
+++ b/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt
@@ -48,7 +48,7 @@ if ((version_compare(PHP_VERSION, '6.0', '==') == 1))
$references[$idx]['row_copy'] = $rows[$i];
$references[$idx]['id_ref'] = &$rows[$i]['id'];
$references[$idx]['id_copy'] = $rows[$i]['id'];
- /* enforce seperation */
+ /* enforce separation */
$references[$idx]['id_copy_mod']= $rows[$i]['id'] + 0;
}
mysqli_free_result($res);
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt
index 03d15902af..e7bce112af 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt
@@ -21,9 +21,9 @@ require_once('skipifconnectfailure.inc');
echo "Test 1:\n";
$stmt = $link->prepare("SELECT ? FOO");
- var_dump($foo); // here you can see the bar member var beeing a string
+ var_dump($foo); // here you can see the bar member var being a string
$stmt->bind_param("s", $foo->bar);
- var_dump($foo); // this will show $foo->bar beeing a reference string
+ var_dump($foo); // this will show $foo->bar being a reference string
$stmt->bind_result($one);
$stmt->execute();
$stmt->fetch();
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 41f34e366a..08a10dbbd1 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -1306,7 +1306,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p
stream = (*p)->data->net->data->m.get_stream((*p)->data->net TSRMLS_CC);
DBG_INF_FMT("conn=%llu stream=%p", (*p)->data->thread_id, stream);
if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
- (void*)&this_fd, 1) && this_fd >= 0) {
+ (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) {
PHP_SAFE_FD_SET(this_fd, fds);
@@ -1336,7 +1336,7 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds
stream = (*fwd)->data->net->data->m.get_stream((*fwd)->data->net TSRMLS_CC);
DBG_INF_FMT("conn=%llu stream=%p", (*fwd)->data->thread_id, stream);
if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
- (void*)&this_fd, 1) && this_fd >= 0) {
+ (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) {
if (PHP_SAFE_FD_ISSET(this_fd, fds)) {
if (disproportion) {
*bckwd = *fwd;
diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h
index 1a23781eb0..aab977d24c 100644
--- a/ext/mysqlnd/mysqlnd.h
+++ b/ext/mysqlnd/mysqlnd.h
@@ -29,7 +29,7 @@
#define MYSQLND_STRING_TO_INT_CONVERSION
/*
- This force mysqlnd to do a single (or more depending on ammount of data)
+ This force mysqlnd to do a single (or more depending on amount of data)
non-blocking read() calls before sending a command to the server. Useful
for debugging, if previous function hasn't consumed all the output sent
to it - like stmt_send_long_data() error because the data was larger that
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index dba13ced93..122a27fd48 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -1475,7 +1475,7 @@ static void php_oci_pconnection_list_np_dtor(zend_resource *entry TSRMLS_DC)
* semantics. With the PECL OCI 1.3.x extensions, we release pconnections when oci_close
* takes the refcount to zero.
*
- * If oci_old_close_semantics is set, we artifically bump up the refcount and decremented
+ * If oci_old_close_semantics is set, we artificially bump up the refcount and decremented
* only at request shutdown.
*/
php_oci_connection_release(connection TSRMLS_CC);
diff --git a/ext/oci8/tests/bug36010.phpt b/ext/oci8/tests/bug36010.phpt
index d181046871..3ad49ecad8 100644
--- a/ext/oci8/tests/bug36010.phpt
+++ b/ext/oci8/tests/bug36010.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #36010 (Crash when executing SQL statment with lob parameter twice)
+Bug #36010 (Crash when executing SQL statement with lob parameter twice)
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 6729163996..594a37383e 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -437,7 +437,7 @@ static void _free_odbc_result(zend_resource *rsrc TSRMLS_DC)
(SQLUSMALLINT) SQL_COMMIT);
#endif
rc = SQLFreeStmt(res->stmt,SQL_DROP);
- /* We don't want the connection to be closed after the last statment has been closed
+ /* We don't want the connection to be closed after the last statement has been closed
* Connections will be closed on shutdown
* zend_list_delete(res->conn_ptr->id);
*/
@@ -2493,8 +2493,8 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
*
* We do have to hash non-persistent connections, and reuse connections.
* In the case where two connects were being made, without closing the first
- * connect, access violations were occuring. This is because some of the
- * "globals" in this module should actualy be per-connection variables. I
+ * connect, access violations were occurring. This is because some of the
+ * "globals" in this module should actually be per-connection variables. I
* simply fixed things to get them working for now. Shane
*/
/* {{{ odbc_do_connect */
diff --git a/ext/odbc/tests/bug60616.phpt b/ext/odbc/tests/bug60616.phpt
index 937049a9b8..72226f23bb 100644
--- a/ext/odbc/tests/bug60616.phpt
+++ b/ext/odbc/tests/bug60616.phpt
@@ -12,7 +12,7 @@ $euc_jp = base64_decode($euc_jp_base64);
$ascii = 'abcdefghijklmnopqrstuvwxyz;]=#0123456789';
include 'config.inc';
-ini_set("odbc.defaultlrl", 4); // Set artifically low
+ini_set("odbc.defaultlrl", 4); // Set artificially low
$conn = odbc_connect($dsn, $user, $pass);
diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c
index aa62a4542d..9031a38f56 100644
--- a/ext/opcache/Optimizer/optimize_func_calls.c
+++ b/ext/opcache/Optimizer/optimize_func_calls.c
@@ -143,8 +143,6 @@ void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx TSRMLS
if (!(opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) && call_stack[call - 1].func) {
if (ARG_SHOULD_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) {
opline->extended_value |= ZEND_ARG_COMPILE_TIME_BOUND | ZEND_ARG_SEND_BY_REF;
- } else if (opline->extended_value) {
- opline->extended_value |= ZEND_ARG_COMPILE_TIME_BOUND;
} else {
opline->opcode = ZEND_SEND_VAR;
opline->extended_value = 0;
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c
index 1a6d0b675a..589028368f 100644
--- a/ext/opcache/Optimizer/zend_optimizer.c
+++ b/ext/opcache/Optimizer/zend_optimizer.c
@@ -283,6 +283,14 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array,
case ZEND_ASSIGN_DIM:
case ZEND_SEPARATE:
return 0;
+ case ZEND_SEND_VAR:
+ opline->extended_value = 0;
+ opline->opcode = ZEND_SEND_VAL;
+ break;
+ case ZEND_SEND_VAR_EX:
+ opline->extended_value = 0;
+ opline->opcode = ZEND_SEND_VAL_EX;
+ break;
case ZEND_SEND_VAR_NO_REF:
if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) {
if (opline->extended_value & ZEND_ARG_SEND_BY_REF) {
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index b5d446a54b..34b5b47808 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -824,7 +824,7 @@ static inline int do_validate_timestamps(zend_persistent_script *persistent_scri
zend_file_handle ps_handle;
char *full_path_ptr = NULL;
- /** check that the persistant script is indeed the same file we cached
+ /** check that the persistent script is indeed the same file we cached
* (if part of the path is a symlink than it possible that the user will change it)
* See bug #15140
*/
@@ -875,12 +875,12 @@ static inline int do_validate_timestamps(zend_persistent_script *persistent_scri
int validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file_handle TSRMLS_DC)
{
if (ZCG(accel_directives).revalidate_freq &&
- (persistent_script->dynamic_members.revalidate >= ZCSG(revalidate_at))) {
+ persistent_script->dynamic_members.revalidate >= ZCG(request_time)) {
return SUCCESS;
} else if (do_validate_timestamps(persistent_script, file_handle TSRMLS_CC) == FAILURE) {
return FAILURE;
} else {
- persistent_script->dynamic_members.revalidate = ZCSG(revalidate_at);
+ persistent_script->dynamic_members.revalidate = ZCG(request_time) + ZCG(accel_directives).revalidate_freq;
return SUCCESS;
}
}
@@ -1421,7 +1421,7 @@ static zend_persistent_script *compile_and_cache_file(zend_file_handle *file_han
* otherwise we have a race-condition.
*/
new_persistent_script->timestamp = timestamp;
- new_persistent_script->dynamic_members.revalidate = ZCSG(revalidate_at);
+ new_persistent_script->dynamic_members.revalidate = ZCG(request_time) + ZCG(accel_directives).revalidate_freq;
}
if (file_handle->opened_path) {
@@ -1891,13 +1891,6 @@ static void accel_activate(void)
zend_accel_error(ACCEL_LOG_WARNING, "Internal functions count changed - was %d, now %d", ZCG(internal_functions_count), zend_hash_num_elements(&ZCG(function_table)));
}
- if (ZCG(accel_directives).validate_timestamps) {
- time_t now = ZCG(request_time);
- if (now > ZCSG(revalidate_at) + (time_t)ZCG(accel_directives).revalidate_freq) {
- ZCSG(revalidate_at) = now;
- }
- }
-
ZCG(cwd) = NULL;
SHM_PROTECT();
@@ -2347,10 +2340,6 @@ static int accel_startup(zend_extension *extension)
accelerator_orig_zend_resolve_path = zend_resolve_path;
zend_resolve_path = persistent_zend_resolve_path;
- if (ZCG(accel_directives).validate_timestamps) {
- ZCSG(revalidate_at) = zend_accel_get_time() + ZCG(accel_directives).revalidate_freq;
- }
-
/* Override chdir() function */
if ((func = zend_hash_str_find_ptr(CG(function_table), "chdir", sizeof("chdir")-1)) != NULL &&
func->type == ZEND_INTERNAL_FUNCTION) {
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index 28c3d21102..619ade025d 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -270,7 +270,6 @@ typedef struct _zend_accel_shared_globals {
LONGLONG restart_in;
#endif
zend_bool restart_in_progress;
- time_t revalidate_at;
/* Interned Strings Support */
char *interned_strings_start;
char *interned_strings_top;
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index fcaf96408c..3cde5188ca 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -242,7 +242,7 @@ static ZEND_INI_MH(OnEnable)
}
ZEND_INI_BEGIN()
- STD_PHP_INI_BOOLEAN("opcache.enable" , "1", PHP_INI_ALL, OnEnable, enabled , zend_accel_globals, accel_globals)
+ STD_PHP_INI_BOOLEAN("opcache.enable" , "1", PHP_INI_ALL, OnEnable, enabled , zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.use_cwd" , "1", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.use_cwd , zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.validate_timestamps", "1", PHP_INI_ALL , OnUpdateBool, accel_directives.validate_timestamps, zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.inherited_hack" , "1", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.inherited_hack , zend_accel_globals, accel_globals)
@@ -448,7 +448,7 @@ static zend_module_entry accel_module_entry = {
NULL,
NULL,
zend_accel_info,
- ACCELERATOR_VERSION "FE",
+ ACCELERATOR_VERSION "FE",
STANDARD_MODULE_PROPERTIES
};
diff --git a/ext/openssl/tests/bug64802.phpt b/ext/openssl/tests/bug64802.phpt
index be0b5f9b5b..3a1e4fb03c 100644
--- a/ext/openssl/tests/bug64802.phpt
+++ b/ext/openssl/tests/bug64802.phpt
@@ -3,7 +3,7 @@ Bug #64802: openssl_x509_parse fails to parse subject properly in some cases
--SKIPIF--
<?php
if (!extension_loaded("openssl")) die("skip");
-if (!defined(OPENSSL_KEYTYPE_EC)) die("skip no EC available);
+if (!defined('OPENSSL_KEYTYPE_EC')) die("skip no EC available");
?>
--FILE--
<?php
diff --git a/ext/pcntl/README b/ext/pcntl/README
index cadd11121c..7b80924e49 100644
--- a/ext/pcntl/README
+++ b/ext/pcntl/README
@@ -1,7 +1,7 @@
Process Control Module for PHP (pcntl)
This module will attempt to implement all features related to process spawning and
-control (fork(), waitpid(), signal(), WIF's, etc). This is extremly experimental,
+control (fork(), waitpid(), signal(), WIF's, etc). This is extremely experimental,
with hope to become stable on most UNIX's. I greatly apreciate any feedback, fixes,
and or suggestions on how to improve/better implement
this functionality.
diff --git a/ext/pcre/pcrelib/ChangeLog b/ext/pcre/pcrelib/ChangeLog
index 279398ef40..f07c59787b 100644
--- a/ext/pcre/pcrelib/ChangeLog
+++ b/ext/pcre/pcrelib/ChangeLog
@@ -1544,7 +1544,7 @@ Version 8.10 25-Jun-2010
7. Minor change to pcretest.c to avoid a compiler warning.
-8. Added four artifical Unicode properties to help with an option to make
+8. Added four artificial Unicode properties to help with an option to make
\s etc use properties (see next item). The new properties are: Xan
(alphanumeric), Xsp (Perl space), Xps (POSIX space), and Xwd (word).
@@ -4169,7 +4169,7 @@ Version 4.3 21-May-03
(i) The utf8_table... variables are now declared "const".
(ii) The code for \cx, which used the "case flipping" table to upper case
- lower case letters, now just substracts 32. This is ASCII-specific,
+ lower case letters, now just subtracts 32. This is ASCII-specific,
but the whole concept of \cx is ASCII-specific, so it seems
reasonable.
diff --git a/ext/pcre/pcrelib/HACKING b/ext/pcre/pcrelib/HACKING
index 691b7a14e5..8395504212 100644
--- a/ext/pcre/pcrelib/HACKING
+++ b/ext/pcre/pcrelib/HACKING
@@ -360,7 +360,7 @@ reference number if the reference is to a unique capturing group (either by
number or by name). When named groups are used, there may be more than one
group with the same name. In this case, a reference by name generates OP_DNREF
or OP_DNREFI. These are followed by two counts: the index (not the byte offset)
-in the group name table of the first entry for the requred name, followed by
+in the group name table of the first entry for the required name, followed by
the number of groups with the same name.
diff --git a/ext/pcre/pcrelib/README b/ext/pcre/pcrelib/README
index 88f2dfd4ef..5a1d553fff 100644
--- a/ext/pcre/pcrelib/README
+++ b/ext/pcre/pcrelib/README
@@ -392,7 +392,7 @@ library. They are also documented in the pcrebuild man page.
avoided by linking with libedit (which has a BSD licence) instead.
Enabling libreadline causes the -lreadline option to be added to the pcretest
- build. In many operating environments with a sytem-installed readline
+ build. In many operating environments with a system-installed readline
library this is sufficient. However, in some environments (e.g. if an
unmodified distribution version of readline is in use), it may be necessary
to specify something like LIBS="-lncurses" as well. This is because, to quote
diff --git a/ext/pcre/pcrelib/doc/pcre.txt b/ext/pcre/pcrelib/doc/pcre.txt
index 14cbb8bf2b..548d80b90f 100644
--- a/ext/pcre/pcrelib/doc/pcre.txt
+++ b/ext/pcre/pcrelib/doc/pcre.txt
@@ -1242,7 +1242,7 @@ PCRETEST OPTION FOR LIBREADLINE SUPPORT
pcretest linked in this way, there may be licensing issues.
Setting this option causes the -lreadline option to be added to the
- pcretest build. In many operating environments with a sytem-installed
+ pcretest build. In many operating environments with a system-installed
libreadline this is sufficient. However, in some environments (e.g. if
an unmodified distribution version of readline is in use), some extra
configuration may be necessary. The INSTALL file for libreadline says
diff --git a/ext/pcre/pcrelib/pcre_exec.c b/ext/pcre/pcrelib/pcre_exec.c
index ab58735d5c..be0af11633 100644
--- a/ext/pcre/pcrelib/pcre_exec.c
+++ b/ext/pcre/pcrelib/pcre_exec.c
@@ -1038,7 +1038,7 @@ for (;;)
the result of a recursive call to match() whatever happened so it was
possible to reduce stack usage by turning this into a tail recursion,
except in the case of a possibly empty group. However, now that there is
- the possiblity of (*THEN) occurring in the final alternative, this
+ the possibility of (*THEN) occurring in the final alternative, this
optimization is no longer always possible.
We can optimize if we know there are no (*THEN)s in the pattern; at present
diff --git a/ext/pcre/pcrelib/pcre_printint.c b/ext/pcre/pcrelib/pcre_printint.c
index 8cbb161395..1a91c50046 100644
--- a/ext/pcre/pcrelib/pcre_printint.c
+++ b/ext/pcre/pcrelib/pcre_printint.c
@@ -68,7 +68,7 @@ appropriately for an application, not for building PCRE. */
#include "pcre.h"
#include "pcre_internal.h"
-/* These are the funtions that are contained within. It doesn't seem worth
+/* These are the functions that are contained within. It doesn't seem worth
having a separate .h file just for this. */
#endif /* PCRE_INCLUDED */
diff --git a/ext/pcre/pcrelib/pcre_study.c b/ext/pcre/pcrelib/pcre_study.c
index 2fe43c6920..0e26db9d6c 100644
--- a/ext/pcre/pcrelib/pcre_study.c
+++ b/ext/pcre/pcrelib/pcre_study.c
@@ -988,7 +988,7 @@ do
tcode = set_table_bit(start_bits, tcode + 1, TRUE, cd, utf);
break;
- /* Single-char upto sets the bit and tries the next */
+ /* Single-char up to sets the bit and tries the next */
case OP_UPTO:
case OP_MINUPTO:
diff --git a/ext/pcre/pcrelib/pcredemo.c b/ext/pcre/pcrelib/pcredemo.c
index 946aba45cd..1ca77f1537 100644
--- a/ext/pcre/pcrelib/pcredemo.c
+++ b/ext/pcre/pcrelib/pcredemo.c
@@ -144,7 +144,7 @@ if (rc < 0)
return 1;
}
-/* Match succeded */
+/* Match succeeded */
printf("\nMatch succeeded at offset %d\n", ovector[0]);
@@ -362,7 +362,7 @@ for (;;)
return 1;
}
- /* Match succeded */
+ /* Match succeeded */
printf("\nMatch succeeded again at offset %d\n", ovector[0]);
diff --git a/ext/pcre/pcrelib/sljit/sljitLir.c b/ext/pcre/pcrelib/sljit/sljitLir.c
index 1acecba8b4..0afce2524a 100644
--- a/ext/pcre/pcrelib/sljit/sljitLir.c
+++ b/ext/pcre/pcrelib/sljit/sljitLir.c
@@ -1428,7 +1428,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler
#endif
if (SLJIT_UNLIKELY((src1 & SLJIT_IMM) && !(src2 & SLJIT_IMM))) {
- /* Immediate is prefered as second argument by most architectures. */
+ /* Immediate is preferred as second argument by most architectures. */
switch (condition) {
case SLJIT_C_LESS:
condition = SLJIT_C_GREATER;
diff --git a/ext/pcre/pcrelib/sljit/sljitLir.h b/ext/pcre/pcrelib/sljit/sljitLir.h
index e2cd21846d..9c9acdfe21 100644
--- a/ext/pcre/pcrelib/sljit/sljitLir.h
+++ b/ext/pcre/pcrelib/sljit/sljitLir.h
@@ -90,7 +90,7 @@ of sljitConfigInternal.h */
#define SLJIT_SUCCESS 0
/* After the call of sljit_generate_code(), the error code of the compiler
is set to this value to avoid future sljit calls (in debug mode at least).
- The complier should be freed after sljit_generate_code(). */
+ The compiler should be freed after sljit_generate_code(). */
#define SLJIT_ERR_COMPILED 1
/* Cannot allocate non executable memory. */
#define SLJIT_ERR_ALLOC_FAILED 2
@@ -898,7 +898,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi
/* After the code generation the address for label, jump and const instructions
are computed. Since these structures are freed by sljit_free_compiler, the
- addresses must be preserved by the user program elsewere. */
+ addresses must be preserved by the user program elsewhere. */
static SLJIT_INLINE sljit_uw sljit_get_label_addr(struct sljit_label *label) { return label->addr; }
static SLJIT_INLINE sljit_uw sljit_get_jump_addr(struct sljit_jump *jump) { return jump->addr; }
static SLJIT_INLINE sljit_uw sljit_get_const_addr(struct sljit_const *const_) { return const_->addr; }
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeARM_32.c b/ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
index 6747c4f617..1342eaebf1 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
@@ -304,7 +304,7 @@ static sljit_uw patch_pc_relative_loads(sljit_uw *last_pc_patch, sljit_uw *code_
return counter;
}
-/* In some rare ocasions we may need future patches. The probability is close to 0 in practice. */
+/* In some rare occasions we may need future patches. The probability is close to 0 in practice. */
struct future_patch {
struct future_patch* next;
sljit_si index;
@@ -1205,7 +1205,7 @@ static sljit_si generate_int(struct sljit_compiler *compiler, sljit_si reg, slji
sljit_uw imm2;
sljit_si rol;
- /* Step1: Search a zero byte (8 continous zero bit). */
+ /* Step1: Search a zero byte (8 continuous zero bit). */
mask = 0xff000000;
rol = 8;
while(1) {
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c b/ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
index d0b392e7a4..548b6c446f 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
@@ -1843,7 +1843,7 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
if (src1 != dst)
overflow_ra = reg_map[src1];
else {
- /* Rare ocasion. */
+ /* Rare occasion. */
FAIL_IF(ADD(TMP_EREG2, reg_map[src1], ZERO));
overflow_ra = TMP_EREG2;
}
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index aca52ebf20..8e35c1ee9a 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -472,7 +472,7 @@ static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt
}
/* }}} */
-/* {{{ proto object PDO::prepare(string statment [, array options])
+/* {{{ proto object PDO::prepare(string statement [, array options])
Prepares a statement for execution and returns a statement object */
static PHP_METHOD(PDO, prepare)
{
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 705d08bacf..27cc157ed7 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -2016,7 +2016,7 @@ static PHP_METHOD(PDOStatement, setFetchMode)
/* }}} */
/* {{{ proto bool PDOStatement::nextRowset()
- Advances to the next rowset in a multi-rowset statement handle. Returns true if it succeded, false otherwise */
+ Advances to the next rowset in a multi-rowset statement handle. Returns true if it succeeded, false otherwise */
static int pdo_stmt_do_next_rowset(pdo_stmt_t *stmt TSRMLS_DC)
{
@@ -2486,6 +2486,7 @@ static zval *row_prop_read(zval *object, zval *member, int type, void **cache_sl
pdo_stmt_t *stmt = row->stmt;
int colno = -1;
zval zobj;
+ zend_long lval;
ZVAL_NULL(rv);
if (stmt) {
@@ -2493,6 +2494,11 @@ static zval *row_prop_read(zval *object, zval *member, int type, void **cache_sl
if (Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count) {
fetch_value(stmt, rv, Z_LVAL_P(member), NULL TSRMLS_CC);
}
+ } else if (Z_TYPE_P(member) == IS_STRING
+ && is_numeric_string_ex(Z_STRVAL_P(member), Z_STRLEN_P(member), &lval, NULL, 0, NULL) == IS_LONG) {
+ if (lval >= 0 && lval < stmt->column_count) {
+ fetch_value(stmt, rv, lval, NULL TSRMLS_CC);
+ }
} else {
convert_to_string(member);
/* TODO: replace this with a hash of available column names to column
@@ -2541,19 +2547,24 @@ static int row_prop_exists(zval *object, zval *member, int check_empty, void **c
pdo_row_t *row = (pdo_row_t *)Z_OBJ_P(object);
pdo_stmt_t *stmt = row->stmt;
int colno = -1;
+ zend_long lval;
if (stmt) {
if (Z_TYPE_P(member) == IS_LONG) {
return Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count;
+ } else if (Z_TYPE_P(member) == IS_STRING) {
+ if (is_numeric_string_ex(Z_STRVAL_P(member), Z_STRLEN_P(member), &lval, NULL, 0, NULL) == IS_LONG) {
+ return lval >=0 && lval < stmt->column_count;
+ }
} else {
convert_to_string(member);
+ }
- /* TODO: replace this with a hash of available column names to column
- * numbers */
- for (colno = 0; colno < stmt->column_count; colno++) {
- if (strcmp(stmt->columns[colno].name, Z_STRVAL_P(member)) == 0) {
- return 1;
- }
+ /* TODO: replace this with a hash of available column names to column
+ * numbers */
+ for (colno = 0; colno < stmt->column_count; colno++) {
+ if (strcmp(stmt->columns[colno].name, Z_STRVAL_P(member)) == 0) {
+ return 1;
}
}
}
diff --git a/ext/pdo/tests/bug_39656.phpt b/ext/pdo/tests/bug_39656.phpt
index 7d113ef4aa..9ee54916bb 100644
--- a/ext/pdo/tests/bug_39656.phpt
+++ b/ext/pdo/tests/bug_39656.phpt
@@ -1,5 +1,5 @@
--TEST--
-PDO Common: Bug #39656 (Crash when calling fetch() on a PDO statment object after closeCursor())
+PDO Common: Bug #39656 (Crash when calling fetch() on a PDO statement object after closeCursor())
--SKIPIF--
<?php
if (!extension_loaded('pdo')) die('skip');
diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt
index 96489ef861..f809e02b11 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt
@@ -49,7 +49,7 @@ MySQLPDOTest::skip();
}
if ($label !== $value) {
- printf("[%03d + 3] Returned value seems to be wrong (%d vs. %d charachters). Check manually\n",
+ printf("[%03d + 3] Returned value seems to be wrong (%d vs. %d characters). Check manually\n",
$offset, strlen($label), strlen($value));
return false;
}
@@ -64,7 +64,7 @@ MySQLPDOTest::skip();
$ret = $stmt->fetch(PDO::FETCH_ASSOC);
if ($ret['label'] !== $value) {
- printf("[%03d + 3] Returned value seems to be wrong (%d vs. %d charachters). Check manually\n",
+ printf("[%03d + 3] Returned value seems to be wrong (%d vs. %d characters). Check manually\n",
$offset, strlen($ret['label']), strlen($value));
return false;
}
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c
index 9132999461..2abc84ba33 100644
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
@@ -174,7 +174,7 @@ ub4 _oci_error(OCIError *err, pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *what, swor
}
if (stmt) {
- /* always propogate the error code back up to the dbh,
+ /* always propagate the error code back up to the dbh,
* so that we can catch the error information when execute
* is called via query. See Bug #33707 */
if (H->einfo.errmsg) {
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index 9e8fc746fa..49fbc63745 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -376,15 +376,10 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
/* We need to manually convert to a pg native boolean value */
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL &&
((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) {
- zval *parameter;
- if (Z_ISREF(param->parameter)) {
- parameter = Z_REFVAL(param->parameter);
- } else {
- parameter = &param->parameter;
- }
SEPARATE_ZVAL(&param->parameter);
param->param_type = PDO_PARAM_STR;
- ZVAL_STRINGL(parameter, Z_TYPE_P(parameter) == IS_TRUE ? "t" : "f", 1);
+ convert_to_boolean(&param->parameter);
+ ZVAL_STRINGL(&param->parameter, Z_TYPE_P(&param->parameter) == IS_TRUE ? "t" : "f", 1);
}
}
return 1;
diff --git a/ext/pdo_pgsql/tests/bug62593.phpt b/ext/pdo_pgsql/tests/bug62593.phpt
index e3ebf46ed5..4ab4566f00 100644
--- a/ext/pdo_pgsql/tests/bug62593.phpt
+++ b/ext/pdo_pgsql/tests/bug62593.phpt
@@ -34,6 +34,19 @@ $query->execute();
$errors[] = $query->errorInfo();
var_dump($value);
+// Try with strings - Bug #68351
+$value = '0';
+$query->bindParam(':foo', $value, PDO::PARAM_BOOL);
+$query->execute();
+$errors[] = $query->errorInfo();
+var_dump($query->fetchColumn());
+
+$value = "abc";
+$query->bindParam(':foo', $value, PDO::PARAM_BOOL);
+$query->execute();
+$errors[] = $query->errorInfo();
+var_dump($query->fetchColumn());
+
$expect = 'No errors found';
foreach ($errors as $error)
@@ -48,4 +61,6 @@ echo $expect;
--EXPECTF--
bool(true)
bool(false)
+bool(true)
+bool(false)
No errors found
diff --git a/ext/pgsql/README b/ext/pgsql/README
index 785b4f034b..86df804fbd 100644
--- a/ext/pgsql/README
+++ b/ext/pgsql/README
@@ -43,7 +43,7 @@ module with specific version. You need to install PostgreSQL
somewhere in your system to build PHP with PostgreSQL support.
==== Note For PostgreSQL 7.2 ====
-I've tested upto 7.2.2.
+I've tested up to 7.2.2.
==== TODO List ===
Make pg_convert() smater.
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 4b1cc31cc8..119a47f24c 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1373,7 +1373,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
/* ensure that the link did not die */
if (PGG(auto_reset_persistent) & 1) {
/* need to send & get something from backend to
- make sure we catch CONNECTION_BAD everytime */
+ make sure we catch CONNECTION_BAD every time */
PGresult *pg_result;
pg_result = PQexec(le->ptr, "select 1");
PQclear(pg_result);
@@ -1478,7 +1478,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
PGG(num_links)++;
}
- /* set notice processer */
+ /* set notice processor */
if (! PGG(ignore_notices) && Z_TYPE_P(return_value) == IS_RESOURCE) {
PQsetNoticeProcessor(pgsql, _php_pgsql_notice_handler, (void*)Z_RES_HANDLE_P(return_value));
}
@@ -4344,7 +4344,7 @@ PHP_FUNCTION(pg_escape_bytea)
#endif
to = (char *)PQescapeBytea((unsigned char*)from, from_len, &to_len);
- RETVAL_STRINGL(to, to_len-1); /* to_len includes addtional '\0' */
+ RETVAL_STRINGL(to, to_len-1); /* to_len includes additional '\0' */
}
/* }}} */
diff --git a/ext/pgsql/tests/80_bug36625.phpt b/ext/pgsql/tests/80_bug36625.phpt
index e1b7fa1b50..87dd84adc4 100644
--- a/ext/pgsql/tests/80_bug36625.phpt
+++ b/ext/pgsql/tests/80_bug36625.phpt
@@ -42,7 +42,13 @@ var_dump(file_exists($tracefile));
?>
===DONE===
--CLEAN--
-<?php unlink($tracefile); ?>
+<?php
+
+$tracefile = dirname(__FILE__) . '/trace.tmp';
+
+unlink($tracefile);
+
+?>
--EXPECTF--
bool(false)
resource(%d) of type (pgsql result)
diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
index faa9db0c70..6516ddfabd 100644
--- a/ext/phar/Makefile.frag
+++ b/ext/phar/Makefile.frag
@@ -39,7 +39,7 @@ install-pharcmd: pharcmd
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
$(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)
-@rm -f $(INSTALL_ROOT)$(bindir)/phar
- $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar
+ $(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar
@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
@$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1
@$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.phar.1
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c
index 6d6cbc4918..bd7324c78e 100644
--- a/ext/phar/func_interceptors.c
+++ b/ext/phar/func_interceptors.c
@@ -564,7 +564,7 @@ static void phar_fancy_stat(zend_stat_t *stat_sb, int type, zval *return_value T
#else
ZVAL_LONG(&stat_blocks,-1);
#endif
- /* Store numeric indexes in propper order */
+ /* Store numeric indexes in proper order */
zend_hash_next_index_insert(HASH_OF(return_value), &stat_dev);
zend_hash_next_index_insert(HASH_OF(return_value), &stat_ino);
zend_hash_next_index_insert(HASH_OF(return_value), &stat_mode);
diff --git a/ext/readline/tests/readline_read_history_error_001.phpt b/ext/readline/tests/readline_read_history_error_001.phpt
new file mode 100644
index 0000000000..0a65a66d5c
--- /dev/null
+++ b/ext/readline/tests/readline_read_history_error_001.phpt
@@ -0,0 +1,14 @@
+--TEST--
+readline_read_history() function - Error cases
+--CREDITS--
+Pedro Manoel Evangelista <pedro.evangelista at gmail dot com>
+--SKIPIF--
+<?php if (!extension_loaded("readline") || !function_exists('readline_read_history')) die("skip"); ?>
+--FILE--
+<?php
+var_dump(readline_read_history());
+var_dump(readline_read_history('nofile'));
+?>
+--EXPECT--
+bool(false)
+bool(false)
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 3d44c35b62..e9c59ea86e 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3359,12 +3359,10 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
continue;
}
prop = NULL;
- if (prop_info->offset >= 0) {
- if (statics && (prop_info->flags & ZEND_ACC_STATIC) != 0) {
- prop = &ce->default_static_members_table[prop_info->offset];
- } else if (!statics && (prop_info->flags & ZEND_ACC_STATIC) == 0) {
- prop = &ce->default_properties_table[prop_info->offset];
- }
+ if (statics && (prop_info->flags & ZEND_ACC_STATIC) != 0) {
+ prop = &ce->default_static_members_table[prop_info->offset];
+ } else if (!statics && (prop_info->flags & ZEND_ACC_STATIC) == 0) {
+ prop = &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)];
}
if (!prop) {
continue;
diff --git a/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt b/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
index 4772f6548d..5655d19972 100644
--- a/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
+++ b/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
@@ -41,11 +41,11 @@ Name: arr1
Is passed by reference: yes
Can be passed by value: yes
-Name: SORT_ASC_or_SORT_DESC
+Name: sort_order
Is passed by reference: yes
Can be passed by value: yes
-Name: SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING
+Name: sort_flags
Is passed by reference: yes
Can be passed by value: yes
@@ -53,18 +53,6 @@ Name: arr2
Is passed by reference: yes
Can be passed by value: yes
-Name: SORT_ASC_or_SORT_DESC
-Is passed by reference: yes
-Can be passed by value: yes
-
-Name: SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING
-Is passed by reference: yes
-Can be passed by value: yes
-
-Name: more_array_and_sort_options
-Is passed by reference: yes
-Can be passed by value: yes
-
=> sort:
Name: arg
diff --git a/ext/session/session.c b/ext/session/session.c
index dae965b048..8d112c3a18 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -506,17 +506,8 @@ static void php_session_initialize(TSRMLS_D) /* {{{ */
PS(session_status) = php_session_active;
}
if (val) {
- PHP_MD5_CTX context;
-
- /* Store read data's MD5 hash */
- PHP_MD5Init(&context);
- PHP_MD5Update(&context, val->val, val->len);
- PHP_MD5Final(PS(session_data_hash), &context);
-
php_session_decode(val->val, val->len TSRMLS_CC);
zend_string_release(val);
- } else {
- memset(PS(session_data_hash),'\0', 16);
}
if (!PS(use_cookies) && PS(send_cookie)) {
@@ -538,19 +529,7 @@ static void php_session_save_current_state(TSRMLS_D) /* {{{ */
val = php_session_encode(TSRMLS_C);
if (val) {
- PHP_MD5_CTX context;
- unsigned char digest[16];
-
- /* Generate data's MD5 hash */
- PHP_MD5Init(&context);
- PHP_MD5Update(&context, val->val, val->len);
- PHP_MD5Final(digest, &context);
- /* Write only when save is required */
- if (memcmp(digest, PS(session_data_hash), 16)) {
- ret = PS(mod)->s_write(&PS(mod_data), PS(id), val TSRMLS_CC);
- } else {
- ret = SUCCESS;
- }
+ ret = PS(mod)->s_write(&PS(mod_data), PS(id), val TSRMLS_CC);
zend_string_release(val);
} else {
ret = PS(mod)->s_write(&PS(mod_data), PS(id), STR_EMPTY_ALLOC() TSRMLS_CC);
@@ -1971,7 +1950,6 @@ static PHP_FUNCTION(session_regenerate_id)
RETURN_FALSE;
}
zend_string_release(PS(id));
- memset(PS(session_data_hash),'\0', 16);
}
PS(id) = PS(mod)->s_create_sid(&PS(mod_data) TSRMLS_CC);
diff --git a/ext/session/tests/session_set_save_handler_iface_003.phpt b/ext/session/tests/session_set_save_handler_iface_003.phpt
index bd757dce63..4d7ed3b7ee 100644
--- a/ext/session/tests/session_set_save_handler_iface_003.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_003.phpt
@@ -38,7 +38,8 @@ class MySession2 implements SessionHandlerInterface, SessionIdInterface {
}
public function write($id, $data) {
- return file_put_contents($this->path . $id, $data);
+ // Empty $data = 0 = false
+ return (bool)file_put_contents($this->path . $id, $data);
}
public function destroy($id) {
diff --git a/ext/session/tests/session_set_save_handler_sid_001.phpt b/ext/session/tests/session_set_save_handler_sid_001.phpt
index 0dc4fc11cf..24ba5d7489 100644
--- a/ext/session/tests/session_set_save_handler_sid_001.phpt
+++ b/ext/session/tests/session_set_save_handler_sid_001.phpt
@@ -32,7 +32,8 @@ class MySession2 {
}
public function write($id, $data) {
- return file_put_contents($this->path . $id, $data);
+ // Empty $data = 0 = false
+ return (bool)file_put_contents($this->path . $id, $data);
}
public function destroy($id) {
diff --git a/ext/session/tests/session_set_save_handler_write_short_circuit.phpt b/ext/session/tests/session_set_save_handler_write_short_circuit.phpt
index 02ca182ec6..08da29a8fd 100644
--- a/ext/session/tests/session_set_save_handler_write_short_circuit.phpt
+++ b/ext/session/tests/session_set_save_handler_write_short_circuit.phpt
@@ -5,6 +5,7 @@ session.save_path=
session.name=PHPSESSID
--SKIPIF--
<?php include('skipif.inc'); ?>
+skip - Waiting RFC patch merge
--FILE--
<?php
diff --git a/ext/shmop/README b/ext/shmop/README
index a8ea03af91..c4970376b0 100644
--- a/ext/shmop/README
+++ b/ext/shmop/README
@@ -6,7 +6,7 @@ Shared Memory Operations Extension to PHP
to communicate the deamon via SHM. PHP already had a shared memory
extension (sysvshm) written by Christian Cartus <cartus@atrior.de>,
unfortunately this extension was designed with PHP only in mind and
- offers high level features which are extremly bothersome for basic SHM
+ offers high level features which are extremely bothersome for basic SHM
we had in mind. After spending a day trying to reverse engineer and figure
out the format of sysvshm we decided that it would be much easier to
add our own extension to php for simple SHM operations, we were right :)).
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 250b1f0ebe..90c1bff951 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -1588,7 +1588,7 @@ PHP_FUNCTION(snmpwalk)
/* }}} */
/* {{{ proto mixed snmprealwalk(string host, string community, mixed object_id [, int timeout [, int retries]])
- Return all objects including their respective object id withing the specified one */
+ Return all objects including their respective object id within the specified one */
PHP_FUNCTION(snmprealwalk)
{
php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_WALK, SNMP_VERSION_1);
@@ -1616,7 +1616,7 @@ PHP_FUNCTION(snmp_get_quick_print)
/* }}} */
/* {{{ proto bool snmp_set_quick_print(int quick_print)
- Return all objects including their respective object id withing the specified one */
+ Return all objects including their respective object id within the specified one */
PHP_FUNCTION(snmp_set_quick_print)
{
zend_long a1;
@@ -1698,7 +1698,7 @@ PHP_FUNCTION(snmp2_walk)
/* }}} */
/* {{{ proto mixed snmp2_real_walk(string host, string community, mixed object_id [, int timeout [, int retries]])
- Return all objects including their respective object id withing the specified one */
+ Return all objects including their respective object id within the specified one */
PHP_FUNCTION(snmp2_real_walk)
{
php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_WALK, SNMP_VERSION_2c);
@@ -1893,7 +1893,7 @@ PHP_METHOD(snmp, getnext)
/* }}} */
/* {{{ proto mixed SNMP::walk(mixed object_id [, bool $suffix_as_key = FALSE [, int $max_repetitions [, int $non_repeaters]])
- Return all objects including their respective object id withing the specified one as array of oid->value pairs */
+ Return all objects including their respective object id within the specified one as array of oid->value pairs */
PHP_METHOD(snmp, walk)
{
php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_WALK, (-1));
diff --git a/ext/soap/TODO.old b/ext/soap/TODO.old
index b219c61f8a..821dc31072 100644
--- a/ext/soap/TODO.old
+++ b/ext/soap/TODO.old
@@ -18,7 +18,7 @@ when using wsdls and function names are similar find the best match
void test(int);
void test(string);
maybe use the same alogrithim as ext/java.
-investigate further http keep_alive... inital testing proved slower.. maybe php_streams will speed things up..
+investigate further http keep_alive... initial testing proved slower.. maybe php_streams will speed things up..
provide schema 1999/2001 support....
through memory leak testing
possible using shared memory for sdl caching...
diff --git a/ext/soap/interop/client_round2_interop.php b/ext/soap/interop/client_round2_interop.php
index fd5767cc17..bd52f28771 100644
--- a/ext/soap/interop/client_round2_interop.php
+++ b/ext/soap/interop/client_round2_interop.php
@@ -93,7 +93,7 @@ class Interop_Client
function _fetchEndpoints(&$soapclient, $test) {
$this->_getEndpoints($test, 1);
- // retreive endpoints from the endpoint server
+ // retrieve endpoints from the endpoint server
$endpointArray = $soapclient->__soapCall("GetEndpointInfo",array("groupName"=>$test),array('soapaction'=>"http://soapinterop.org/",'uri'=>"http://soapinterop.org/"));
if (is_soap_fault($endpointArray) || PEAR::isError($endpointArray)) {
if ($this->html) print "<pre>";
@@ -133,7 +133,7 @@ class Interop_Client
/**
* fetchEndpoints
- * retreive endpoints interop server
+ * retrieve endpoints interop server
*
* @return boolean result
* @access private
@@ -158,7 +158,7 @@ class Interop_Client
}
return NULL;
}
- // retreive all endpoints now
+ // retrieve all endpoints now
$this->currentTest = $test;
$x = $this->_getEndpoints($test);
return $x;
@@ -166,7 +166,7 @@ class Interop_Client
/**
* getEndpoints
- * retreive endpoints from either database or interop server
+ * retrieve endpoints from either database or interop server
*
* @param string base (see local var $tests)
* @param boolean all (if false, only get valid endpoints, status=1)
@@ -182,7 +182,7 @@ class Interop_Client
/**
* _getEndpoints
- * retreive endpoints from database
+ * retrieve endpoints from database
*
* @param string base (see local var $tests)
* @param boolean all (if false, only get valid endpoints, status=1)
@@ -222,7 +222,7 @@ class Interop_Client
/**
* getResults
- * retreive results from the database, stuff them into the endpoint array
+ * retrieve results from the database, stuff them into the endpoint array
*
* @access private
*/
@@ -230,7 +230,7 @@ class Interop_Client
// be sure we have the right endpoints for this test result
$this->getEndpoints($test);
- // retreive the results and put them into the endpoint info
+ // retrieve the results and put them into the endpoint info
$sql = "select * from results where class='$test' and type='$type' and wsdl=$wsdl";
$results = $this->dbc->getAll($sql,NULL, DB_FETCHMODE_ASSOC );
foreach ($results as $result) {
@@ -657,12 +657,12 @@ try {
/**
* getResults
- * retreive results from the database, stuff them into the endpoint array
+ * retrieve results from the database, stuff them into the endpoint array
*
* @access private
*/
function getMethodList($test = 'base') {
- // retreive the results and put them into the endpoint info
+ // retrieve the results and put them into the endpoint info
$sql = "select distinct(function) from results where class='$test' order by function";
$results = $this->dbc->getAll($sql);
$ar = array();
diff --git a/ext/soap/package.xml b/ext/soap/package.xml
index e43fd36024..6c68f8dd4c 100644
--- a/ext/soap/package.xml
+++ b/ext/soap/package.xml
@@ -34,7 +34,7 @@
<date>2002-07-07</date>
<state>alpha</state>
<notes>
- - First offical PEAR/PECL release
+ - First official PEAR/PECL release
</notes>
</release>
<filelist>
diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h
index cf6e26b179..9ecf40c067 100644
--- a/ext/soap/php_sdl.h
+++ b/ext/soap/php_sdl.h
@@ -87,7 +87,7 @@ struct _sdlBinding {
void *bindingAttributes; /* sdlSoapBindingPtr */
};
-/* Soap Binding Specfic stuff */
+/* Soap Binding Specific stuff */
struct _sdlSoapBinding {
sdlEncodingStyle style;
sdlTransport transport; /* not implemented yet */
diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h
index 6d36792981..f32555cd93 100644
--- a/ext/soap/php_soap.h
+++ b/ext/soap/php_soap.h
@@ -92,7 +92,7 @@ struct _soapService {
zend_class_entry *ce;
zval *argv;
int argc;
- int persistance;
+ int persistence;
} soap_class;
zval soap_object;
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 2b37622a7a..0e7d004564 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -1259,7 +1259,7 @@ PHP_METHOD(SoapServer, setPersistence)
if (service->type == SOAP_CLASS) {
if (value == SOAP_PERSISTENCE_SESSION ||
value == SOAP_PERSISTENCE_REQUEST) {
- service->soap_class.persistance = value;
+ service->soap_class.persistence = value;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to set persistence with bogus value (%pd)", value);
return;
@@ -1299,7 +1299,7 @@ PHP_METHOD(SoapServer, setClass)
service->type = SOAP_CLASS;
service->soap_class.ce = ce;
- service->soap_class.persistance = SOAP_PERSISTENCE_REQUEST;
+ service->soap_class.persistence = SOAP_PERSISTENCE_REQUEST;
service->soap_class.argc = num_args;
if (service->soap_class.argc > 0) {
int i;
@@ -1657,7 +1657,7 @@ PHP_METHOD(SoapServer, handle)
} else if (service->type == SOAP_CLASS) {
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
/* If persistent then set soap_obj from from the previous created session (if available) */
- if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+ if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
zval *tmp_soap;
zval *session_vars;
@@ -1741,7 +1741,7 @@ PHP_METHOD(SoapServer, handle)
}
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
/* If session then update session hash with new object */
- if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+ if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
zval *tmp_soap_pp;
zval *session_vars = &PS(http_session_vars);
@@ -1848,7 +1848,7 @@ PHP_METHOD(SoapServer, handle)
call_status = call_user_function(NULL, soap_obj, &function_name, &retval, num_params, params TSRMLS_CC);
if (service->type == SOAP_CLASS) {
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
- if (service->soap_class.persistance != SOAP_PERSISTENCE_SESSION) {
+ if (service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
zval_ptr_dtor(soap_obj);
soap_obj = NULL;
}
@@ -1875,7 +1875,7 @@ PHP_METHOD(SoapServer, handle)
}
if (service->type == SOAP_CLASS) {
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
- if (soap_obj && service->soap_class.persistance != SOAP_PERSISTENCE_SESSION) {
+ if (soap_obj && service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
#else
if (soap_obj) {
#endif
@@ -1919,7 +1919,7 @@ PHP_METHOD(SoapServer, handle)
}
if (service->type == SOAP_CLASS) {
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
- if (soap_obj && service->soap_class.persistance != SOAP_PERSISTENCE_SESSION) {
+ if (soap_obj && service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
#else
if (soap_obj) {
#endif
@@ -3113,7 +3113,7 @@ PHP_METHOD(SoapClient, __doRequest)
/* {{{ proto void SoapClient::__setCookie(string name [, strung value])
Sets cookie thet will sent with SOAP request.
- The call to this function will effect all folowing calls of SOAP methods.
+ The call to this function will effect all following calls of SOAP methods.
If value is not specified cookie is removed. */
PHP_METHOD(SoapClient, __setCookie)
{
@@ -4711,6 +4711,7 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
if (type->attributes &&
(attr = zend_hash_str_find_ptr(type->attributes, SOAP_1_1_ENC_NAMESPACE":arrayType",
sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType")-1)) != NULL &&
+ attr->extraAttributes &&
(ext = zend_hash_str_find_ptr(attr->extraAttributes, WSDL_NAMESPACE":arrayType", sizeof(WSDL_NAMESPACE":arrayType")-1)) != NULL) {
char *end = strchr(ext->val, '[');
int len;
@@ -4734,6 +4735,7 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
if (type->attributes &&
(attr = zend_hash_str_find_ptr(type->attributes, SOAP_1_2_ENC_NAMESPACE":itemType",
sizeof(SOAP_1_2_ENC_NAMESPACE":itemType")-1)) != NULL &&
+ attr->extraAttributes &&
(ext = zend_hash_str_find_ptr(attr->extraAttributes, WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":arrayType")-1)) != NULL) {
smart_str_appends(buf, ext->val);
smart_str_appendc(buf, ' ');
@@ -4751,6 +4753,7 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
if (type->attributes &&
(attr = zend_hash_str_find_ptr(type->attributes, SOAP_1_2_ENC_NAMESPACE":arraySize",
sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize")-1)) != NULL &&
+ attr->extraAttributes &&
(ext = zend_hash_str_find_ptr(attr->extraAttributes, WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":arraySize")-1)) != NULL) {
smart_str_appendc(buf, '[');
smart_str_appends(buf, ext->val);
diff --git a/ext/soap/tests/bug68361.phpt b/ext/soap/tests/bug68361.phpt
new file mode 100644
index 0000000000..6dbba8a425
--- /dev/null
+++ b/ext/soap/tests/bug68361.phpt
@@ -0,0 +1,114 @@
+--TEST--
+Bug #68361 Segmentation fault on SoapClient::__getTypes
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$xml = <<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="TestServer" targetNamespace="http://foo.bar/testserver" xmlns:tns="http://foo.bar/testserver" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://foo.bar/testserver/types">
+ <types>
+ <xsd:schema targetNamespace="http://foo.bar/testserver/types" xmlns="http://foo.bar/testserver/types">
+ <xsd:complexType name="ArrayOfEmployeeReturn">
+ <xsd:complexContent>
+ <xsd:restriction base="soapenc:Array">
+ <xsd:attribute ref="soapenc:arrayType" arrayType="ns:Employee[]"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="Employee">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:int"/>
+ <xsd:element name="department" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="age" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="Employee" nillable="true" type="ns:Employee"/>
+ <xsd:complexType name="User">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="age" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="User" nillable="true" type="ns:User"/>
+ </xsd:schema>
+ </types>
+ <message name="getEmployeeRequest">
+ <part name="name" type="xsd:name"/>
+ </message>
+ <message name="getEmployeeResponse">
+ <part name="employeeReturn" type="ns:ArrayOfEmployeeReturn"/>
+ </message>
+ <message name="getUserRequest">
+ <part name="id" type="xsd:id"/>
+ </message>
+ <message name="getUserResponse">
+ <part name="userReturn" element="ns:User"/>
+ </message>
+ <portType name="TestServerPortType">
+ <operation name="getEmployee">
+ <input message="tns:getEmployeeRequest"/>
+ <output message="tns:getEmployeeResponse"/>
+ </operation>
+ <operation name="getUser">
+ <input message="tns:getUserRequest"/>
+ <output message="tns:getUserResponse"/>
+ </operation>
+ </portType>
+ <binding name="TestServerBinding" type="tns:TestServerPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getEmployee">
+ <soap:operation soapAction="http://foo.bar/testserver/#getEmployee"/>
+ <input>
+ <soap:body use="literal" namespace="http://foo.bar/testserver"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://foo.bar/testserver"/>
+ </output>
+ </operation>
+ <operation name="getUser">
+ <soap:operation soapAction="http://foo.bar/testserver/#getUser"/>
+ <input>
+ <soap:body use="literal" namespace="http://foo.bar/testserver"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://foo.bar/testserver"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="TestServerService">
+ <port name="TestServerPort" binding="tns:TestServerBinding">
+ <soap:address location="http://localhost/wsdl-creator/TestClass.php"/>
+ </port>
+ </service>
+</definitions>
+XML;
+
+file_put_contents(__DIR__ . "/bug68361.xml", $xml);
+$client = new SoapClient(__DIR__ . "/bug68361.xml");
+
+$res = $client->__getTypes(); // Segmentation fault here
+
+print_r($res);
+?>
+--CLEAN--
+<?php
+unlink(__DIR__ . "/bug68361.xml");
+?>
+--EXPECT--
+Array
+(
+ [0] => anyType ArrayOfEmployeeReturn[]
+ [1] => struct Employee {
+ int id;
+ string department;
+ string name;
+ int age;
+}
+ [2] => struct User {
+ string name;
+ int age;
+}
+)
diff --git a/ext/soap/tests/bugs/bug27742.wsdl b/ext/soap/tests/bugs/bug27742.wsdl
index 7f1514acbf..a9429981c3 100644
--- a/ext/soap/tests/bugs/bug27742.wsdl
+++ b/ext/soap/tests/bugs/bug27742.wsdl
@@ -726,7 +726,7 @@
</element>
<element name="genres">
<annotation>
- <documentation xml:lang="en">Containes genre information where available for the program records. A program may have more than one genre with different relevence factors.</documentation>
+ <documentation xml:lang="en">Contains genre information where available for the program records. A program may have more than one genre with different relevance factors.</documentation>
</annotation>
<complexType>
<sequence maxOccurs="unbounded">
@@ -749,7 +749,7 @@
</element>
<element name="relevance" type="xsd:int">
<annotation>
- <documentation xml:lang="en">A relevence factor that applies to the genre classification for the program. A relevence factor of 1 indicates that this is the top-level genre under which the program is classified.</documentation>
+ <documentation xml:lang="en">A relevance factor that applies to the genre classification for the program. A relevance factor of 1 indicates that this is the top-level genre under which the program is classified.</documentation>
</annotation>
</element>
</sequence>
diff --git a/ext/soap/tests/bugs/bug50698_2.phpt b/ext/soap/tests/bugs/bug50698_2.phpt
index a39f4b56bf..7ff667423c 100644
--- a/ext/soap/tests/bugs/bug50698_2.phpt
+++ b/ext/soap/tests/bugs/bug50698_2.phpt
@@ -1,5 +1,5 @@
--TEST--
-Request #50698_2 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large mix of compatiable and incompatiable endpoints.)
+Request #50698_2 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large mix of compatible and incompatiable endpoints.)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index b1ee5798c9..209b4d1659 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -70,6 +70,8 @@ struct sockaddr_un {
#endif
PHP_SOCKETS_API int php_sockets_le_socket(void);
+PHP_SOCKETS_API php_socket *php_create_socket(void);
+PHP_SOCKETS_API void php_destroy_socket(zend_resource *rsrc TSRMLS_DC);
#define php_sockets_le_socket_name "Socket"
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index 0dab51bed6..584d98576f 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -384,7 +384,7 @@ PHP_SOCKETS_API int php_sockets_le_socket(void) /* {{{ */
/* allocating function to make programming errors due to uninitialized fields
* less likely */
-static php_socket *php_create_socket(void) /* {{{ */
+PHP_SOCKETS_API php_socket *php_create_socket(void) /* {{{ */
{
php_socket *php_sock = emalloc(sizeof(php_socket));
@@ -398,7 +398,7 @@ static php_socket *php_create_socket(void) /* {{{ */
}
/* }}} */
-static void php_destroy_socket(zend_resource *rsrc TSRMLS_DC) /* {{{ */
+PHP_SOCKETS_API void php_destroy_socket(zend_resource *rsrc TSRMLS_DC) /* {{{ */
{
php_socket *php_sock = rsrc->ptr;
diff --git a/ext/sockets/tests/mcast_ipv4_send.phpt b/ext/sockets/tests/mcast_ipv4_send.phpt
index ac5bce9162..0dd858f297 100644
--- a/ext/sockets/tests/mcast_ipv4_send.phpt
+++ b/ext/sockets/tests/mcast_ipv4_send.phpt
@@ -1,65 +1,66 @@
---TEST--
-Multicast support: IPv4 send options
---SKIPIF--
-<?php
-if (!extension_loaded('sockets')) {
- die('skip sockets extension not available.');
-}
-if (socket_set_option($s, $level, IP_MULTICAST_IF, 1) === false) {
- die("skip interface 1 either doesn't exist or has no ipv4 address");
-}
---FILE--
-<?php
-$domain = AF_INET;
-$level = IPPROTO_IP;
-$s = socket_create($domain, SOCK_DGRAM, SOL_UDP) or die("err");
-
-echo "Setting IP_MULTICAST_TTL\n";
-$r = socket_set_option($s, $level, IP_MULTICAST_TTL, 9);
-var_dump($r);
-$r = socket_get_option($s, $level, IP_MULTICAST_TTL);
-var_dump($r);
-echo "\n";
-
-echo "Setting IP_MULTICAST_LOOP\n";
-$r = socket_set_option($s, $level, IP_MULTICAST_LOOP, 0);
-var_dump($r);
-$r = socket_get_option($s, $level, IP_MULTICAST_LOOP);
-var_dump($r);
-$r = socket_set_option($s, $level, IP_MULTICAST_LOOP, 1);
-var_dump($r);
-$r = socket_get_option($s, $level, IP_MULTICAST_LOOP);
-var_dump($r);
-echo "\n";
-
-echo "Setting IP_MULTICAST_IF\n";
-echo "interface 0:\n";
-$r = socket_set_option($s, $level, IP_MULTICAST_IF, 0);
-var_dump($r);
-$r = socket_get_option($s, $level, IP_MULTICAST_IF);
-var_dump($r);
-echo "interface 1:\n";
-$r = socket_set_option($s, $level, IP_MULTICAST_IF, 1);
-var_dump($r);
-$r = socket_get_option($s, $level, IP_MULTICAST_IF);
-var_dump($r);
-echo "\n";
-
---EXPECT--
-Setting IP_MULTICAST_TTL
-bool(true)
-int(9)
-
-Setting IP_MULTICAST_LOOP
-bool(true)
-int(0)
-bool(true)
-int(1)
-
-Setting IP_MULTICAST_IF
-interface 0:
-bool(true)
-int(0)
-interface 1:
-bool(true)
-int(1)
+--TEST--
+Multicast support: IPv4 send options
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('skip sockets extension not available.');
+}
+$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die("err");
+if (socket_set_option($s, IPPROTO_IP, IP_MULTICAST_IF, 1) === false) {
+ die("skip interface 1 either doesn't exist or has no ipv4 address");
+}
+--FILE--
+<?php
+$domain = AF_INET;
+$level = IPPROTO_IP;
+$s = socket_create($domain, SOCK_DGRAM, SOL_UDP) or die("err");
+
+echo "Setting IP_MULTICAST_TTL\n";
+$r = socket_set_option($s, $level, IP_MULTICAST_TTL, 9);
+var_dump($r);
+$r = socket_get_option($s, $level, IP_MULTICAST_TTL);
+var_dump($r);
+echo "\n";
+
+echo "Setting IP_MULTICAST_LOOP\n";
+$r = socket_set_option($s, $level, IP_MULTICAST_LOOP, 0);
+var_dump($r);
+$r = socket_get_option($s, $level, IP_MULTICAST_LOOP);
+var_dump($r);
+$r = socket_set_option($s, $level, IP_MULTICAST_LOOP, 1);
+var_dump($r);
+$r = socket_get_option($s, $level, IP_MULTICAST_LOOP);
+var_dump($r);
+echo "\n";
+
+echo "Setting IP_MULTICAST_IF\n";
+echo "interface 0:\n";
+$r = socket_set_option($s, $level, IP_MULTICAST_IF, 0);
+var_dump($r);
+$r = socket_get_option($s, $level, IP_MULTICAST_IF);
+var_dump($r);
+echo "interface 1:\n";
+$r = socket_set_option($s, $level, IP_MULTICAST_IF, 1);
+var_dump($r);
+$r = socket_get_option($s, $level, IP_MULTICAST_IF);
+var_dump($r);
+echo "\n";
+
+--EXPECT--
+Setting IP_MULTICAST_TTL
+bool(true)
+int(9)
+
+Setting IP_MULTICAST_LOOP
+bool(true)
+int(0)
+bool(true)
+int(1)
+
+Setting IP_MULTICAST_IF
+interface 0:
+bool(true)
+int(0)
+interface 1:
+bool(true)
+int(1)
diff --git a/ext/spl/internal/recursivecachingiterator.inc b/ext/spl/internal/recursivecachingiterator.inc
index 0676d435f2..cd5d3e31f5 100644
--- a/ext/spl/internal/recursivecachingiterator.inc
+++ b/ext/spl/internal/recursivecachingiterator.inc
@@ -80,7 +80,7 @@ class RecursiveCachingIterator extends CachingIterator implements RecursiveItera
/** @return whether the current element has children
* @note The check whether the Iterator for the children can be created was
* already executed. Hence when flag CATCH_GET_CHILD was given in
- * constructor this fucntion returns false so that getChildren does
+ * constructor this function returns false so that getChildren does
* not try to access those children.
*/
function hasChildren()
diff --git a/ext/spl/spl.php b/ext/spl/spl.php
index c276f1f2ee..ff9d1b6bbe 100755
--- a/ext/spl/spl.php
+++ b/ext/spl/spl.php
@@ -958,7 +958,7 @@ class SplFileInfo
*
* @param mode open mode
* @param use_include_path whether to search include paths (don't use)
- * @param context resource context to pased to open function
+ * @param context resource context to passed to open function
* @throw RuntimeException if file cannot be opened (e.g. insufficient
* access rights).
* @return The opened file as a SplFileObject instance
diff --git a/ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt b/ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt
index f57fe78fb8..659f61c80d 100644
--- a/ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt
+++ b/ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt
@@ -1,5 +1,5 @@
--TEST--
-Tries to create a SplFixedArray using the fromArray() function and a multi dimentional array.
+Tries to create a SplFixedArray using the fromArray() function and a multi dimensional array.
--CREDITS--
Philip Norton philipnorton42@gmail.com
--FILE--
diff --git a/ext/spl/tests/bug53071.phpt b/ext/spl/tests/bug53071.phpt
index c2c2605e2e..9d5dac4cd0 100644
--- a/ext/spl/tests/bug53071.phpt
+++ b/ext/spl/tests/bug53071.phpt
@@ -12,7 +12,7 @@ function LimitedScope()
$myA = new myClass();
$myB = new SplObjectStorage();
$myC = new myClass();
- $myC->member = $myA; // myC has a referece to myA
+ $myC->member = $myA; // myC has a reference to myA
$myB->Attach($myC); // myB attaches myC
$myA->member = $myB; // myA has myB, comleting the cycle
}
diff --git a/ext/sqlite3/libsqlite/sqlite3.c b/ext/sqlite3/libsqlite/sqlite3.c
index e5aa96f6b0..99aeccc46f 100644
--- a/ext/sqlite3/libsqlite/sqlite3.c
+++ b/ext/sqlite3/libsqlite/sqlite3.c
@@ -10022,7 +10022,7 @@ SQLITE_PRIVATE void sqlite3PCacheSetDefault(void);
** shared locks begins at SHARED_FIRST.
**
** The same locking strategy and
-** byte ranges are used for Unix. This leaves open the possiblity of having
+** byte ranges are used for Unix. This leaves open the possibility of having
** clients on win95, winNT, and unix all talking to the same shared file
** and all locking correctly. To do so would require that samba (or whatever
** tool is being used for file sharing) implements locks correctly between
@@ -11971,7 +11971,7 @@ struct TriggerStep {
u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT */
u8 orconf; /* OE_Rollback etc. */
Trigger *pTrig; /* The trigger that this step is a part of */
- Select *pSelect; /* SELECT statment or RHS of INSERT INTO .. SELECT ... */
+ Select *pSelect; /* SELECT statement or RHS of INSERT INTO .. SELECT ... */
Token target; /* Target table for DELETE, UPDATE, INSERT */
Expr *pWhere; /* The WHERE clause for DELETE or UPDATE steps */
ExprList *pExprList; /* SET clause for UPDATE. */
@@ -13019,7 +13019,7 @@ SQLITE_PRIVATE int sqlite3MemdebugNoType(void*,u8);
**
*************************************************************************
**
-** This file contains definitions of global variables and contants.
+** This file contains definitions of global variables and constants.
*/
/* An array to map all upper-case characters into their corresponding
@@ -13908,7 +13908,7 @@ struct Mem {
#endif
/*
-** Each auxilliary data pointer stored by a user defined function
+** Each auxiliary data pointer stored by a user defined function
** implementation calling sqlite3_set_auxdata() is stored in an instance
** of this structure. All such structures associated with a single VM
** are stored in a linked list headed at Vdbe.pAuxData. All are destroyed
@@ -17632,7 +17632,7 @@ SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void){
** 1. All memory allocations sizes are rounded up to a power of 2.
**
** 2. If two adjacent free blocks are the halves of a larger block,
-** then the two blocks are coalesed into the single larger block.
+** then the two blocks are coalesced into the single larger block.
**
** 3. New memory is allocated from the first available free block.
**
@@ -18570,7 +18570,7 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
/*
** The sqlite3_mutex.id, sqlite3_mutex.nRef, and sqlite3_mutex.owner fields
-** are necessary under two condidtions: (1) Debug builds and (2) using
+** are necessary under two conditions: (1) Debug builds and (2) using
** home-grown mutexes. Encapsulate these conditions into a single #define.
*/
#if defined(SQLITE_DEBUG) || defined(SQLITE_HOMEGROWN_RECURSIVE_MUTEX)
@@ -21904,7 +21904,7 @@ SQLITE_PRIVATE void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
** occur.
**
** 2002-Feb-14: This routine is extended to remove MS-Access style
-** brackets from around identifers. For example: "[a-b-c]" becomes
+** brackets from around identifiers. For example: "[a-b-c]" becomes
** "a-b-c".
*/
SQLITE_PRIVATE int sqlite3Dequote(char *z){
@@ -22146,7 +22146,7 @@ do_atof_calc:
/* store the result */
*pResult = result;
- /* return true if number and no extra non-whitespace chracters after */
+ /* return true if number and no extra non-whitespace characters after */
return z>=zEnd && nDigits>0 && eValid && nonNum==0;
#else
return !sqlite3Atoi64(z, pResult, length, enc);
@@ -22837,7 +22837,7 @@ SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
}
/*
-** Attempt to add, substract, or multiply the 64-bit signed value iB against
+** Attempt to add, subtract, or multiply the 64-bit signed value iB against
** the other 64-bit signed integer at *pA and store the result in *pA.
** Return 0 on success. Or if the operation would have resulted in an
** overflow, leave *pA unchanged and return 1.
@@ -26863,7 +26863,7 @@ static int unixRead(
#endif
#if SQLITE_MAX_MMAP_SIZE>0
- /* Deal with as much of this read request as possible by transfering
+ /* Deal with as much of this read request as possible by transferring
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
if( offset+amt <= pFile->mmapSize ){
@@ -26998,7 +26998,7 @@ static int unixWrite(
#endif
#if SQLITE_MAX_MMAP_SIZE>0
- /* Deal with as much of this write request as possible by transfering
+ /* Deal with as much of this write request as possible by transferring
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
if( offset+amt <= pFile->mmapSize ){
@@ -28557,7 +28557,7 @@ static int unixUnfetch(sqlite3_file *fd, i64 iOff, void *p){
** looks at the filesystem type and tries to guess the best locking
** strategy from that.
**
-** For finder-funtion F, two objects are created:
+** For finder-function F, two objects are created:
**
** (1) The real finder-function named "FImpt()".
**
@@ -29998,7 +29998,7 @@ static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){
** setting the environment variable SQLITE_FORCE_PROXY_LOCKING to 1 will
** force proxy locking to be used for every database file opened, and 0
** will force automatic proxy locking to be disabled for all database
-** files (explicity calling the SQLITE_SET_LOCKPROXYFILE pragma or
+** files (explicitly calling the SQLITE_SET_LOCKPROXYFILE pragma or
** sqlite_file_control API is not affected by SQLITE_FORCE_PROXY_LOCKING).
*/
@@ -30529,7 +30529,7 @@ static int proxyTakeConch(unixFile *pFile){
fprintf(stderr, "fchmod %o FAILED with %d %s\n",
cmode, code, strerror(code));
} else {
- fprintf(stderr, "fchmod %o SUCCEDED\n",cmode);
+ fprintf(stderr, "fchmod %o SUCCEEDED\n",cmode);
}
}else{
int code = errno;
@@ -33761,7 +33761,7 @@ static int winRead(
pFile->h, pBuf, amt, offset, pFile->locktype));
#if SQLITE_MAX_MMAP_SIZE>0
- /* Deal with as much of this read request as possible by transfering
+ /* Deal with as much of this read request as possible by transferring
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
if( offset+amt <= pFile->mmapSize ){
@@ -33833,7 +33833,7 @@ static int winWrite(
pFile->h, pBuf, amt, offset, pFile->locktype));
#if SQLITE_MAX_MMAP_SIZE>0
- /* Deal with as much of this write request as possible by transfering
+ /* Deal with as much of this write request as possible by transferring
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
if( offset+amt <= pFile->mmapSize ){
@@ -33965,7 +33965,7 @@ static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
#ifdef SQLITE_TEST
/*
** Count the number of fullsyncs and normal syncs. This is used to test
-** that syncs and fullsyncs are occuring at the right times.
+** that syncs and fullsyncs are occurring at the right times.
*/
SQLITE_API int sqlite3_sync_count = 0;
SQLITE_API int sqlite3_fullsync_count = 0;
@@ -39330,8 +39330,8 @@ SQLITE_PRIVATE int sqlite3RowSetNext(RowSet *p, i64 *pRowid){
** Check to see if element iRowid was inserted into the rowset as
** part of any insert batch prior to iBatch. Return 1 or 0.
**
-** If this is the first test of a new batch and if there exist entires
-** on pRowSet->pEntry, then sort those entires into the forest at
+** If this is the first test of a new batch and if there exist entries
+** on pRowSet->pEntry, then sort those entries into the forest at
** pRowSet->pForest so that they can be tested.
*/
SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, u8 iBatch, sqlite3_int64 iRowid){
@@ -39613,7 +39613,7 @@ SQLITE_PRIVATE int sqlite3WalFramesize(Wal *pWal);
** Definition: Two databases (or the same database at two points it time)
** are said to be "logically equivalent" if they give the same answer to
** all queries. Note in particular the content of freelist leaf
-** pages can be changed arbitarily without effecting the logical equivalence
+** pages can be changed arbitrarily without effecting the logical equivalence
** of the database.
**
** (7) At any time, if any subset, including the empty set and the total set,
@@ -39838,7 +39838,7 @@ int sqlite3PagerTrace=1; /* True to enable tracing */
** outstanding transactions have been abandoned, the pager is able to
** transition back to OPEN state, discarding the contents of the
** page-cache and any other in-memory state at the same time. Everything
-** is reloaded from disk (and, if necessary, hot-journal rollback peformed)
+** is reloaded from disk (and, if necessary, hot-journal rollback performed)
** when a read-transaction is next opened on the pager (transitioning
** the pager into READER state). At that point the system has recovered
** from the error.
@@ -41196,7 +41196,7 @@ static int writeMasterJournal(Pager *pPager, const char *zMaster){
}
pPager->journalOff += (nMaster+20);
- /* If the pager is in peristent-journal mode, then the physical
+ /* If the pager is in persistent-journal mode, then the physical
** journal-file may extend past the end of the master-journal name
** and 8 bytes of magic data just written to the file. This is
** dangerous because the code to rollback a hot-journal file
@@ -41369,7 +41369,7 @@ static void pager_unlock(Pager *pPager){
/*
** This function is called whenever an IOERR or FULL error that requires
-** the pager to transition into the ERROR state may ahve occurred.
+** the pager to transition into the ERROR state may have occurred.
** The first argument is a pointer to the pager structure, the second
** the error-code about to be returned by a pager API function. The
** value returned is a copy of the second argument to this function.
@@ -48080,7 +48080,7 @@ SQLITE_PRIVATE int sqlite3WalOpen(
}
/*
-** Change the size to which the WAL file is trucated on each reset.
+** Change the size to which the WAL file is truncated on each reset.
*/
SQLITE_PRIVATE void sqlite3WalLimit(Wal *pWal, i64 iLimit){
if( pWal ) pWal->mxWalSize = iLimit;
@@ -54531,7 +54531,7 @@ SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
** compiler to crash when getCellInfo() is implemented as a macro.
** But there is a measureable speed advantage to using the macro on gcc
** (when less compiler optimizations like -Os or -O0 are used and the
-** compiler is not doing agressive inlining.) So we use a real function
+** compiler is not doing aggressive inlining.) So we use a real function
** for MSVC and a macro for everything else. Ticket #2457.
*/
#ifndef NDEBUG
@@ -54929,7 +54929,7 @@ static int accessPayload(
/*
** Read part of the key associated with cursor pCur. Exactly
-** "amt" bytes will be transfered into pBuf[]. The transfer
+** "amt" bytes will be transferred into pBuf[]. The transfer
** begins at "offset".
**
** The caller must ensure that pCur is pointing to a valid row
@@ -54949,7 +54949,7 @@ SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor *pCur, u32 offset, u32 amt, void *pB
/*
** Read part of the data associated with cursor pCur. Exactly
-** "amt" bytes will be transfered into pBuf[]. The transfer
+** "amt" bytes will be transferred into pBuf[]. The transfer
** begins at "offset".
**
** Return SQLITE_OK on success or an error code if anything goes
@@ -62945,7 +62945,7 @@ SQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe *p){
**
** This function may be called exact once on a each virtual machine.
** After this routine is called the VM has been "packaged" and is ready
-** to run. After this routine is called, futher calls to
+** to run. After this routine is called, further calls to
** sqlite3VdbeAddOp() functions are prohibited. This routine disconnects
** the Vdbe from the Parse object that helped generate it so that the
** the Vdbe becomes an independent entity and the Parse object can be
@@ -62997,7 +62997,7 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady(
/* Allocate space for memory registers, SQL variables, VDBE cursors and
** an array to marshal SQL function arguments in.
*/
- zCsr = (u8*)&p->aOp[p->nOp]; /* Memory avaliable for allocation */
+ zCsr = (u8*)&p->aOp[p->nOp]; /* Memory available for allocation */
zEnd = (u8*)&p->aOp[pParse->nOpAlloc]; /* First byte past end of zCsr[] */
resolveP2Values(p, &nArg);
@@ -63323,7 +63323,7 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
/* The complex case - There is a multi-file write-transaction active.
** This requires a master journal file to ensure the transaction is
- ** committed atomicly.
+ ** committed atomically.
*/
#ifndef SQLITE_OMIT_DISKIO
else{
@@ -65560,7 +65560,7 @@ SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){
** The following routines are used by user-defined functions to specify
** the function result.
**
-** The setStrOrError() funtion calls sqlite3VdbeMemSetStr() to store the
+** The setStrOrError() function calls sqlite3VdbeMemSetStr() to store the
** result as a string or blob but if the string or blob is too large, it
** then sets the error code to SQLITE_TOOBIG
*/
@@ -65981,7 +65981,7 @@ SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
}
/*
-** Return the auxilary data pointer, if any, for the iArg'th argument to
+** Return the auxiliary data pointer, if any, for the iArg'th argument to
** the user-function defined by pCtx.
*/
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
@@ -65996,7 +65996,7 @@ SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
}
/*
-** Set the auxilary data pointer and delete function, for the iArg'th
+** Set the auxiliary data pointer and delete function, for the iArg'th
** argument to the user-function defined by pCtx. Any previous value is
** deleted by calling the delete function specified when it was set.
*/
@@ -75506,7 +75506,7 @@ SQLITE_PRIVATE int sqlite3MemJournalSize(void){
/*
** Walk an expression tree. Invoke the callback once for each node
-** of the expression, while decending. (In other words, the callback
+** of the expression, while descending. (In other words, the callback
** is invoked before visiting children.)
**
** The return value from the callback should be one of the WRC_*
@@ -77026,7 +77026,7 @@ SQLITE_PRIVATE int sqlite3ResolveExprNames(
/*
** Resolve all names in all expressions of a SELECT and in all
-** decendents of the SELECT, including compounds off of p->pPrior,
+** descendants of the SELECT, including compounds off of p->pPrior,
** subqueries in expressions, and subqueries used as FROM clause
** terms.
**
@@ -77119,7 +77119,7 @@ SQLITE_PRIVATE void sqlite3ResolveSelfReference(
** affinity of that column is returned. Otherwise, 0x00 is returned,
** indicating no affinity for the expression.
**
-** i.e. the WHERE clause expresssions in the following statements all
+** i.e. the WHERE clause expressions in the following statements all
** have an affinity:
**
** CREATE TABLE t1(a);
@@ -77835,7 +77835,7 @@ static int exprStructSize(Expr *p){
** Note that with flags==EXPRDUP_REDUCE, this routines works on full-size
** (unreduced) Expr objects as they or originally constructed by the parser.
** During expression analysis, extra information is computed and moved into
-** later parts of teh Expr object and that extra information might get chopped
+** later parts of the Expr object and that extra information might get chopped
** off if the expression is reduced. Note also that it does not work to
** make a EXPRDUP_REDUCE copy of a reduced expression. It is only legal
** to reduce a pristine expression tree from the parser. The implementation
@@ -81503,7 +81503,7 @@ static void renameParentFunc(
** ALTER TABLE command. The first argument is the text of a CREATE TRIGGER
** statement. The second is a table name. The table name in the CREATE
** TRIGGER statement is replaced with the third argument and the result
-** returned. This is analagous to renameTableFunc() above, except for CREATE
+** returned. This is analogous to renameTableFunc() above, except for CREATE
** TRIGGER, not CREATE INDEX and CREATE TABLE.
*/
static void renameTriggerFunc(
@@ -83682,7 +83682,7 @@ static void initAvgEq(Index *pIdx){
/* Set nSum to the number of distinct (iCol+1) field prefixes that
** occur in the stat4 table for this index before pFinal. Set
** sumEq to the sum of the nEq values for column iCol for the same
- ** set (adding the value only once where there exist dupicate
+ ** set (adding the value only once where there exist duplicate
** prefixes). */
for(i=0; i<(pIdx->nSample-1); i++){
if( aSample[i].anDLt[iCol]!=aSample[i+1].anDLt[iCol] ){
@@ -95333,7 +95333,7 @@ static int xferOptimization(
}
#endif
#ifndef SQLITE_OMIT_FOREIGN_KEY
- /* Disallow the transfer optimization if the destination table constains
+ /* Disallow the transfer optimization if the destination table contains
** any foreign key constraints. This is more restrictive than necessary.
** But the main beneficiary of the transfer optimization is the VACUUM
** command, and the VACUUM command disables foreign key constraints. So
@@ -96561,7 +96561,7 @@ static int sqlite3LoadExtension(
** entry point name "sqlite3_extension_init" was not found, then
** construct an entry point name "sqlite3_X_init" where the X is
** replaced by the lowercase value of every ASCII alphabetic
- ** character in the filename after the last "/" upto the first ".",
+ ** character in the filename after the last "/" up to the first ".",
** and eliding the first three characters if they are "lib".
** Examples:
**
@@ -101878,7 +101878,7 @@ static void generateWithRecursiveQuery(
int iQueue; /* The Queue table */
int iDistinct = 0; /* To ensure unique results if UNION */
int eDest = SRT_Table; /* How to write to Queue */
- SelectDest destQueue; /* SelectDest targetting the Queue table */
+ SelectDest destQueue; /* SelectDest targeting the Queue table */
int i; /* Loop counter */
int rc; /* Result code */
ExprList *pOrderBy; /* The ORDER BY clause */
@@ -102383,7 +102383,7 @@ multi_select_end:
/*
** Code an output subroutine for a coroutine implementation of a
-** SELECT statment.
+** SELECT statement.
**
** The data to be output is contained in pIn->iSdst. There are
** pIn->nSdst columns to be output. pDest is where the output should
@@ -103184,7 +103184,7 @@ static int flattenSubquery(
pSubSrc = pSub->pSrc;
assert( pSubSrc );
/* Prior to version 3.1.2, when LIMIT and OFFSET had to be simple constants,
- ** not arbitrary expresssions, we allowed some combining of LIMIT and OFFSET
+ ** not arbitrary expressions, we allowed some combining of LIMIT and OFFSET
** because they could be computed at compile-time. But when LIMIT and OFFSET
** became arbitrary expressions, we were forced to add restrictions (13)
** and (14). */
@@ -103570,7 +103570,7 @@ static u8 minMaxQuery(AggInfo *pAggInfo, ExprList **ppMinMax){
/*
** The select statement passed as the first argument is an aggregate query.
-** The second argment is the associated aggregate-info object. This
+** The second argument is the associated aggregate-info object. This
** function tests if the SELECT is of the form:
**
** SELECT count(*) FROM <tbl>
@@ -103903,7 +103903,7 @@ static void selectPopWith(Walker *pWalker, Select *p){
** without worrying about messing up the presistent representation
** of the view.
**
-** (3) Add terms to the WHERE clause to accomodate the NATURAL keyword
+** (3) Add terms to the WHERE clause to accommodate the NATURAL keyword
** on joins and the ON and USING clause of joins.
**
** (4) Scan the list of columns in the result set (pEList) looking
@@ -104871,7 +104871,7 @@ SQLITE_PRIVATE int sqlite3Select(
*/
if( pGroupBy ){
KeyInfo *pKeyInfo; /* Keying information for the group by clause */
- int j1; /* A-vs-B comparision jump */
+ int j1; /* A-vs-B comparison jump */
int addrOutputRow; /* Start of subroutine that outputs a result row */
int regOutputRow; /* Return address register for output subroutine */
int addrSetAbort; /* Set the abort flag and return */
@@ -107168,7 +107168,7 @@ SQLITE_PRIVATE void sqlite3Update(
}
/* Populate the array of registers beginning at regNew with the new
- ** row data. This array is used to check constaints, create the new
+ ** row data. This array is used to check constraints, create the new
** table and index records, and as the values for any new.* references
** made by triggers.
**
@@ -107542,7 +107542,7 @@ static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
** step (3) requires additional temporary disk space approximately equal
** to the size of the original database for the rollback journal.
** Hence, temporary disk space that is approximately 2x the size of the
-** orginal database is required. Every page of the database is written
+** original database is required. Every page of the database is written
** approximately 3 times: Once for step (2) and twice for step (3).
** Two writes per page are required in step (3) because the original
** database content must be written into the rollback journal prior to
@@ -109122,7 +109122,7 @@ static int whereLoopResize(sqlite3*, WhereLoop*, int);
** 1. Then using those as a basis to compute the N best WherePath objects
** of length 2. And so forth until the length of WherePaths equals the
** number of nodes in the FROM clause. The best (lowest cost) WherePath
-** at the end is the choosen query plan.
+** at the end is the chosen query plan.
*/
struct WherePath {
Bitmask maskLoop; /* Bitmask of all WhereLoop objects in this path */
@@ -110367,7 +110367,7 @@ static void exprAnalyzeOrTerm(
}
if( (chngToIN & getMask(&pWInfo->sMaskSet, pOrTerm->leftCursor))==0 ){
/* This term must be of the form t1.a==t2.b where t2 is in the
- ** chngToIN set but t1 is not. This term will be either preceeded
+ ** chngToIN set but t1 is not. This term will be either preceded
** or follwed by an inverted copy (t2.b==t1.a). Skip this term
** and use its inversion. */
testcase( pOrTerm->wtFlags & TERM_COPIED );
@@ -111396,7 +111396,7 @@ static void whereKeyStats(
** number of rows that the index scan is expected to visit without
** considering the range constraints. If nEq is 0, this is the number of
** rows in the index. Assuming no error occurs, *pnOut is adjusted (reduced)
-** to account for the range contraints pLower and pUpper.
+** to account for the range constraints pLower and pUpper.
**
** In the absence of sqlite_stat4 ANALYZE data, or if such data cannot be
** used, each range inequality reduces the search space by a factor of 4.
@@ -114067,7 +114067,7 @@ static int whereLoopAddAll(WhereLoopBuilder *pBuilder){
** strict. With GROUP BY and DISTINCT the only requirement is that
** equivalent rows appear immediately adjacent to one another. GROUP BY
** and DISTINT do not require rows to appear in any particular order as long
-** as equivelent rows are grouped together. Thus for GROUP BY and DISTINCT
+** as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT
** the pOrderBy terms can be matched in any order. With ORDER BY, the
** pOrderBy terms must be matched in strict left-to-right order.
*/
@@ -119734,7 +119734,7 @@ SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[];
** a statement.
**
** (4) CREATE The keyword CREATE has been seen at the beginning of a
-** statement, possibly preceeded by EXPLAIN and/or followed by
+** statement, possibly preceded by EXPLAIN and/or followed by
** TEMP or TEMPORARY
**
** (5) TRIGGER We are in the middle of a trigger definition that must be
@@ -119787,7 +119787,7 @@ SQLITE_API int sqlite3_complete(const char *zSql){
};
#else
/* If triggers are not supported by this compile then the statement machine
- ** used to detect the end of a statement is much simplier
+ ** used to detect the end of a statement is much simpler
*/
static const u8 trans[3][3] = {
/* Token: */
@@ -124622,7 +124622,7 @@ struct Fts3Table {
#endif
#ifdef SQLITE_TEST
- /* True to disable the incremental doclist optimization. This is controled
+ /* True to disable the incremental doclist optimization. This is controlled
** by special insert command 'test-no-incr-doclist'. */
int bNoIncrDoclist;
#endif
@@ -124665,7 +124665,7 @@ struct Fts3Cursor {
/*
** The Fts3Cursor.eSearch member is always set to one of the following.
-** Actualy, Fts3Cursor.eSearch can be greater than or equal to
+** Actually, Fts3Cursor.eSearch can be greater than or equal to
** FTS3_FULLTEXT_SEARCH. If so, then Fts3Cursor.eSearch - 2 is the index
** of the column to be searched. For example, in
**
@@ -132785,7 +132785,7 @@ static const char cType[] = {
**
** In these routine, the letters are in reverse order. So the 'y' rule
** is that 'y' is a consonant unless it is followed by another
-** consonent.
+** consonant.
*/
static int isVowel(const char*);
static int isConsonant(const char *z){
@@ -132881,7 +132881,7 @@ static int doubleConsonant(const char *z){
/*
** Return TRUE if the word ends with three letters which
-** are consonant-vowel-consonent and where the final consonant
+** are consonant-vowel-consonant and where the final consonant
** is not 'w', 'x', or 'y'.
**
** The word is reversed here. So we are really checking the
@@ -132897,7 +132897,7 @@ static int star_oh(const char *z){
/*
** If the word ends with zFrom and xCond() is true for the stem
-** of the word that preceeds the zFrom ending, then change the
+** of the word that precedes the zFrom ending, then change the
** ending to zTo.
**
** The input word *pz and zFrom are both in reverse order. zTo
@@ -139692,7 +139692,7 @@ SQLITE_PRIVATE int sqlite3Fts3DeferToken(
/*
** SQLite value pRowid contains the rowid of a row that may or may not be
** present in the FTS3 table. If it is, delete it and adjust the contents
-** of subsiduary data structures accordingly.
+** of subsidiary data structures accordingly.
*/
static int fts3DeleteByRowid(
Fts3Table *p,
@@ -140399,7 +140399,7 @@ static int fts3StringAppend(
}
/* If there is insufficient space allocated at StrBuffer.z, use realloc()
- ** to grow the buffer until so that it is big enough to accomadate the
+ ** to grow the buffer until so that it is big enough to accommodate the
** appended data.
*/
if( pStr->n+nAppend+1>=pStr->nAlloc ){
@@ -141300,7 +141300,7 @@ SQLITE_PRIVATE void sqlite3Fts3Offsets(
sCtx.iTerm = 0;
(void)fts3ExprIterate(pCsr->pExpr, fts3ExprTermOffsetInit, (void *)&sCtx);
- /* Retreive the text stored in column iCol. If an SQL NULL is stored
+ /* Retrieve the text stored in column iCol. If an SQL NULL is stored
** in column iCol, jump immediately to the next iteration of the loop.
** If an OOM occurs while retrieving the data (this can happen if SQLite
** needs to transform the data from utf-16 to utf-8), return SQLITE_NOMEM
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 57d0065b25..bacd98cf30 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -615,7 +615,7 @@ PHP_FUNCTION(usort)
return;
}
- /* Increase reference counter, so the attemts to modify the array in user
+ /* Increase reference counter, so the attempts to modify the array in user
* comparison function will create a copy of array and won't affect the
* original array. The fact of modification is detected using refcount
* comparison. The result of sorting in such case is undefined and the
@@ -660,7 +660,7 @@ PHP_FUNCTION(uasort)
return;
}
- /* Increase reference counter, so the attemts to modify the array in user
+ /* Increase reference counter, so the attempts to modify the array in user
* comparison function will create a copy of array and won't affect the
* original array. The fact of modification is detected using refcount
* comparison. The result of sorting in such case is undefined and the
@@ -748,7 +748,7 @@ PHP_FUNCTION(uksort)
return;
}
- /* Increase reference counter, so the attemts to modify the array in user
+ /* Increase reference counter, so the attempts to modify the array in user
* comparison function will create a copy of array and won't affect the
* original array. The fact of modification is detected using refcount
* comparison. The result of sorting in such case is undefined and the
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index a168069cfb..9ffe0fe14e 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -549,12 +549,9 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_multisort, 0, 0, 1)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr2)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
- ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, more_array_and_sort_options)
+ ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, sort_order)
+ ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, sort_flags)
+ ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, arr2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_rand, 0, 0, 1)
@@ -4114,13 +4111,17 @@ PHP_FUNCTION(putenv)
if (putenv(pe.putenv_string) == 0) { /* success */
# else
error_code = SetEnvironmentVariable(pe.key, value);
-# if _MSC_VER < 1500
- /* Yet another VC6 bug, unset may return env not found */
- if (error_code != 0 ||
- (error_code == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND)) {
-# else
- if (error_code != 0) { /* success */
-# endif
+
+ if (error_code != 0
+# ifndef ZTS
+ /* We need both SetEnvironmentVariable and _putenv here as some
+ dependency lib could use either way to read the environment.
+ Obviously the CRT version will be useful more often. But
+ generally, doing both brings us on the safe track at least
+ in NTS build. */
+ && _putenv(pe.putenv_string) == 0
+# endif
+ ) { /* success */
# endif
#endif
zend_hash_str_add_mem(&BG(putenv_ht), pe.key, pe.key_len, &pe, sizeof(putenv_entry));
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index ee0e025c5d..5adc9a9a11 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -34,6 +34,10 @@
#include "url_scanner_ex.h"
+#if defined(_WIN32) && defined(__clang__)
+#include <intrin.h>
+#endif
+
extern zend_module_entry basic_functions_module;
#define basic_functions_module_ptr &basic_functions_module
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index a822ac4da0..6a09ce3af5 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -517,7 +517,7 @@ no_results:
continue;
}
}
- /* we need to do this everytime since GLOB_ONLYDIR does not guarantee that
+ /* we need to do this every time since GLOB_ONLYDIR does not guarantee that
* all directories will be filtered. GNU libc documentation states the
* following:
* If the information about the type of the file is easily available
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 6106fe2c86..ca6942a9c9 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -242,9 +242,11 @@ PHP_FUNCTION(passthru)
PHPAPI zend_string *php_escape_shell_cmd(char *str)
{
register int x, y, l = (int)strlen(str);
- char *p = NULL;
size_t estimate = (2 * l) + 1;
zend_string *cmd;
+#ifndef PHP_WIN32
+ char *p = NULL;
+#endif
TSRMLS_FETCH();
@@ -277,7 +279,7 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str)
cmd->val[y++] = str[x];
break;
#else
- /* % is Windows specific for enviromental variables, ^%PATH% will
+ /* % is Windows specific for environmental variables, ^%PATH% will
output PATH whil ^%PATH^% not. escapeshellcmd->val will escape all %.
*/
case '%':
diff --git a/ext/standard/file.c b/ext/standard/file.c
index ff7c5433eb..e7d870d719 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -339,16 +339,16 @@ static int flock_values[] = { LOCK_SH, LOCK_EX, LOCK_UN };
Portable file locking */
PHP_FUNCTION(flock)
{
- zval *arg1, *arg3 = NULL;
+ zval *res, *wouldblock = NULL;
int act;
php_stream *stream;
zend_long operation = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z/", &arg1, &operation, &arg3) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z/", &res, &operation, &wouldblock) == FAILURE) {
return;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
act = operation & 3;
if (act < 1 || act > 3) {
@@ -356,16 +356,16 @@ PHP_FUNCTION(flock)
RETURN_FALSE;
}
- if (arg3) {
- zval_dtor(arg3);
- ZVAL_LONG(arg3, 0);
+ if (wouldblock) {
+ zval_dtor(wouldblock);
+ ZVAL_LONG(wouldblock, 0);
}
/* flock_values contains all possible actions if (operation & 4) we won't block on the lock */
act = flock_values[act - 1] | (operation & PHP_LOCK_NB ? LOCK_NB : 0);
if (php_stream_lock(stream, act)) {
- if (operation && errno == EWOULDBLOCK && arg3) {
- ZVAL_LONG(arg3, 1);
+ if (operation && errno == EWOULDBLOCK && wouldblock) {
+ ZVAL_LONG(wouldblock, 1);
}
RETURN_FALSE;
}
@@ -887,20 +887,20 @@ PHP_NAMED_FUNCTION(php_if_fopen)
Close an open file pointer */
PHPAPI PHP_FUNCTION(fclose)
{
- zval *arg1;
+ zval *res;
php_stream *stream;
#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
RETURN_FALSE;
}
#else
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_RESOURCE(arg1)
+ Z_PARAM_RESOURCE(res)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
#endif
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
if ((stream->flags & PHP_STREAM_FLAG_NO_FCLOSE) != 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%pd is not a valid stream resource", stream->res->handle);
@@ -965,14 +965,14 @@ PHP_FUNCTION(popen)
Close a file pointer opened by popen() */
PHP_FUNCTION(pclose)
{
- zval *arg1;
+ zval *res;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
FG(pclose_wait) = 1;
zend_list_close(stream->res);
@@ -985,14 +985,14 @@ PHP_FUNCTION(pclose)
Test for end-of-file on a file pointer */
PHPAPI PHP_FUNCTION(feof)
{
- zval *arg1;
+ zval *res;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
if (php_stream_eof(stream)) {
RETURN_TRUE;
@@ -1006,18 +1006,18 @@ PHPAPI PHP_FUNCTION(feof)
Get a line from file pointer */
PHPAPI PHP_FUNCTION(fgets)
{
- zval *arg1;
+ zval *res;
zend_long len = 1024;
char *buf = NULL;
int argc = ZEND_NUM_ARGS();
size_t line_len = 0;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &arg1, &len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &res, &len) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
if (argc == 1) {
/* ask streams to give us a buffer of an appropriate size */
@@ -1062,16 +1062,16 @@ exit_failed:
Get a character from file pointer */
PHPAPI PHP_FUNCTION(fgetc)
{
- zval *arg1;
+ zval *res;
char buf[2];
int result;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
result = php_stream_getc(stream);
@@ -1193,39 +1193,33 @@ PHP_FUNCTION(fscanf)
Binary-safe file write */
PHPAPI PHP_FUNCTION(fwrite)
{
- zval *arg1;
- char *arg2;
- size_t arg2len;
+ zval *res;
+ char *input;
+ size_t inputlen;
size_t ret;
size_t num_bytes;
- zend_long arg3 = 0;
- char *buffer = NULL;
+ zend_long maxlen = 0;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &arg1, &arg2, &arg2len, &arg3) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &res, &input, &inputlen, &maxlen) == FAILURE) {
RETURN_FALSE;
}
if (ZEND_NUM_ARGS() == 2) {
- num_bytes = arg2len;
+ num_bytes = inputlen;
+ } else if (maxlen <= 0) {
+ num_bytes = 0;
} else {
- if (arg3 > 0) {
- num_bytes = MIN((size_t)arg3, arg2len);
- } else {
- num_bytes = 0;
- }
+ num_bytes = MIN((size_t) maxlen, inputlen);
}
if (!num_bytes) {
RETURN_LONG(0);
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
- ret = php_stream_write(stream, buffer ? buffer : arg2, num_bytes);
- if (buffer) {
- efree(buffer);
- }
+ ret = php_stream_write(stream, input, num_bytes);
RETURN_LONG(ret);
}
@@ -1235,15 +1229,15 @@ PHPAPI PHP_FUNCTION(fwrite)
Flushes output */
PHPAPI PHP_FUNCTION(fflush)
{
- zval *arg1;
+ zval *res;
int ret;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
ret = php_stream_flush(stream);
if (ret) {
@@ -1257,14 +1251,14 @@ PHPAPI PHP_FUNCTION(fflush)
Rewind the position of a file pointer */
PHPAPI PHP_FUNCTION(rewind)
{
- zval *arg1;
+ zval *res;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
if (-1 == php_stream_rewind(stream)) {
RETURN_FALSE;
@@ -1277,15 +1271,15 @@ PHPAPI PHP_FUNCTION(rewind)
Get file pointer's read/write position */
PHPAPI PHP_FUNCTION(ftell)
{
- zval *arg1;
+ zval *res;
zend_long ret;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
ret = php_stream_tell(stream);
if (ret == -1) {
@@ -1299,17 +1293,17 @@ PHPAPI PHP_FUNCTION(ftell)
Seek on a file pointer */
PHPAPI PHP_FUNCTION(fseek)
{
- zval *arg1;
- zend_long arg2, whence = SEEK_SET;
+ zval *res;
+ zend_long offset, whence = SEEK_SET;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|l", &arg1, &arg2, &whence) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|l", &res, &offset, &whence) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
- RETURN_LONG(php_stream_seek(stream, arg2, (int)whence));
+ RETURN_LONG(php_stream_seek(stream, offset, (int) whence));
}
/* }}} */
@@ -1411,7 +1405,7 @@ PHP_FUNCTION(readfile)
Return or change the umask */
PHP_FUNCTION(umask)
{
- zend_long arg1 = 0;
+ zend_long mask = 0;
int oldumask;
oldumask = umask(077);
@@ -1420,14 +1414,14 @@ PHP_FUNCTION(umask)
BG(umask) = oldumask;
}
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &mask) == FAILURE) {
RETURN_FALSE;
}
if (ZEND_NUM_ARGS() == 0) {
umask(oldumask);
} else {
- umask((int)arg1);
+ umask((int) mask);
}
RETURN_LONG(oldumask);
@@ -1438,15 +1432,15 @@ PHP_FUNCTION(umask)
Output all remaining data from a file pointer */
PHPAPI PHP_FUNCTION(fpassthru)
{
- zval *arg1;
+ zval *res;
size_t size;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
size = php_stream_passthru(stream);
RETURN_LONG(size);
@@ -1607,7 +1601,7 @@ PHP_NAMED_FUNCTION(php_if_fstat)
#else
ZVAL_LONG(&stat_blocks,-1);
#endif
- /* Store numeric indexes in propper order */
+ /* Store numeric indexes in proper order */
zend_hash_next_index_insert(HASH_OF(return_value), &stat_dev);
zend_hash_next_index_insert(HASH_OF(return_value), &stat_ino);
zend_hash_next_index_insert(HASH_OF(return_value), &stat_mode);
@@ -1780,15 +1774,15 @@ safe_to_copy:
Binary-safe file read */
PHPAPI PHP_FUNCTION(fread)
{
- zval *arg1;
+ zval *res;
zend_long len;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &res, &len) == FAILURE) {
RETURN_FALSE;
}
- PHP_STREAM_TO_ZVAL(stream, arg1);
+ PHP_STREAM_TO_ZVAL(stream, res);
if (len <= 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0");
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 53aede1469..80d4ca4388 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -1048,7 +1048,7 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
#else
ZVAL_LONG(&stat_blocks,-1);
#endif
- /* Store numeric indexes in propper order */
+ /* Store numeric indexes in proper order */
zend_hash_next_index_insert(HASH_OF(return_value), &stat_dev);
zend_hash_next_index_insert(HASH_OF(return_value), &stat_ino);
zend_hash_next_index_insert(HASH_OF(return_value), &stat_mode);
diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h
index 14405022b6..ac3f52697b 100644
--- a/ext/standard/flock_compat.h
+++ b/ext/standard/flock_compat.h
@@ -21,7 +21,7 @@
#ifndef FLOCK_COMPAT_H
#define FLOCK_COMPAT_H
-/* php_flock internally uses fcntl whther or not flock is available
+/* php_flock internally uses fcntl whether or not flock is available
* This way our php_flock even works on NFS files.
* More info: /usr/src/linux/Documentation
*/
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
index ed93345bac..526a45b470 100644
--- a/ext/standard/ftp_fopen_wrapper.c
+++ b/ext/standard/ftp_fopen_wrapper.c
@@ -635,11 +635,10 @@ static size_t php_ftp_dirstream_read(php_stream *stream, char *buf, size_t count
zend_string_release(basename);
/* Trim off trailing whitespace characters */
- tmp_len--;
while (tmp_len > 0 &&
- (ent->d_name[tmp_len] == '\n' || ent->d_name[tmp_len] == '\r' ||
- ent->d_name[tmp_len] == '\t' || ent->d_name[tmp_len] == ' ')) {
- ent->d_name[tmp_len--] = '\0';
+ (ent->d_name[tmp_len - 1] == '\n' || ent->d_name[tmp_len - 1] == '\r' ||
+ ent->d_name[tmp_len - 1] == '\t' || ent->d_name[tmp_len - 1] == ' ')) {
+ ent->d_name[--tmp_len] = '\0';
}
return sizeof(php_stream_dirent);
@@ -789,7 +788,7 @@ static int php_stream_ftp_url_stat(php_stream_wrapper *wrapper, const char *url,
goto stat_errexit;
}
- ssb->sb.st_mode = 0644; /* FTP won't give us a valid mode, so aproximate one based on being readable */
+ ssb->sb.st_mode = 0644; /* FTP won't give us a valid mode, so approximate one based on being readable */
php_stream_printf(stream TSRMLS_CC, "CWD %s\r\n", (resource->path != NULL ? resource->path : "/")); /* If we can CWD to it, it's a directory (maybe a link, but we can't tell) */
result = GET_FTP_RESULT(stream);
if (result < 200 || result > 299) {
diff --git a/ext/standard/html_tables/ents_html401.txt b/ext/standard/html_tables/ents_html401.txt
index 7e1564b229..bd3ded9fde 100644
--- a/ext/standard/html_tables/ents_html401.txt
+++ b/ext/standard/html_tables/ents_html401.txt
@@ -1,4 +1,4 @@
-#039 0027 //artifical; there's no &apos; in HTML 4.01
+#039 0027 //artificial; there's no &apos; in HTML 4.01
nbsp 00A0
iexcl 00A1
cent 00A2
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 54159e3785..adeb1c5be6 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -461,7 +461,7 @@ static int php_read_APP(php_stream * stream, unsigned int marker, zval *info TSR
snprintf(markername, sizeof(markername), "APP%d", marker - M_APP0);
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(info), markername, strlen(markername))) == NULL) {
- /* XXX we onyl catch the 1st tag of it's kind! */
+ /* XXX we only catch the 1st tag of it's kind! */
add_assoc_stringl(info, markername, buffer, length);
}
@@ -533,7 +533,7 @@ static struct gfxinfo *php_handle_jpeg (php_stream * stream, zval *info TSRMLS_D
case M_APP14:
case M_APP15:
if (info) {
- if (!php_read_APP(stream, marker, info TSRMLS_CC)) { /* read all the app markes... */
+ if (!php_read_APP(stream, marker, info TSRMLS_CC)) { /* read all the app marks... */
return result;
}
} else {
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index 011407da29..bb1b9c5a6a 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -150,7 +150,7 @@ PHPAPI zend_string *php_lookup_class_name(zval *object)
/* {{{ php_store_class_name
*/
-PHPAPI void php_store_class_name(zval *object, const char *name, uint32_t len)
+PHPAPI void php_store_class_name(zval *object, const char *name, size_t len)
{
zval val;
TSRMLS_FETCH();
diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c
index 5327869a50..55b8509f04 100644
--- a/ext/standard/metaphone.c
+++ b/ext/standard/metaphone.c
@@ -90,7 +90,7 @@ char _codes[26] =
/* These letters are passed through unchanged */
#define NOCHANGE(c) (ENCODE(c) & 2) /* FJMNR */
-/* These form dipthongs when preceding H */
+/* These form diphthongs when preceding H */
#define AFFECTH(c) (ENCODE(c) & 4) /* CGPST */
/* These make C and G soft */
diff --git a/ext/standard/password.c b/ext/standard/password.c
index c58c28ab3c..087b3ace76 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -278,7 +278,7 @@ PHP_FUNCTION(password_verify)
}
/* We're using this method instead of == in order to provide
- * resistence towards timing attacks. This is a constant time
+ * resistance towards timing attacks. This is a constant time
* equality check that will always check every byte of both
* values. */
for (i = 0; i < hash_len; i++) {
@@ -345,12 +345,11 @@ PHP_FUNCTION(password_hash)
if (options && (option_buffer = zend_symtable_str_find(options, "salt", sizeof("salt")-1)) != NULL) {
char *buffer;
- size_t buffer_len_int = 0;
- size_t buffer_len;
+ size_t buffer_len = 0;
switch (Z_TYPE_P(option_buffer)) {
case IS_STRING:
buffer = estrndup(Z_STRVAL_P(option_buffer), Z_STRLEN_P(option_buffer));
- buffer_len_int = Z_STRLEN_P(option_buffer);
+ buffer_len = Z_STRLEN_P(option_buffer);
break;
case IS_LONG:
case IS_DOUBLE:
@@ -361,7 +360,7 @@ PHP_FUNCTION(password_hash)
convert_to_string(&cast_option_buffer);
if (Z_TYPE(cast_option_buffer) == IS_STRING) {
buffer = estrndup(Z_STRVAL(cast_option_buffer), Z_STRLEN(cast_option_buffer));
- buffer_len_int = Z_STRLEN(cast_option_buffer);
+ buffer_len = Z_STRLEN(cast_option_buffer);
zval_dtor(&cast_option_buffer);
break;
}
@@ -377,16 +376,19 @@ PHP_FUNCTION(password_hash)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Non-string salt parameter supplied");
RETURN_NULL();
}
- if (buffer_len_int < 0) {
+
+ /* XXX all the crypt related APIs work with int for string length.
+ That should be revised for size_t and then we maybe don't require
+ the > INT_MAX check. */
+ if (buffer_len > INT_MAX) {
efree(hash_format);
efree(buffer);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long");
- }
- buffer_len = (size_t) buffer_len_int;
- if (buffer_len < required_salt_len) {
+ RETURN_NULL();
+ } else if (buffer_len < required_salt_len) {
efree(hash_format);
efree(buffer);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %lu expecting %lu", (unsigned long) buffer_len, (unsigned long) required_salt_len);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %zd expecting %zd", buffer_len, required_salt_len);
RETURN_NULL();
} else if (php_password_salt_is_alphabet(buffer, buffer_len) == FAILURE) {
salt = safe_emalloc(required_salt_len, 1, 1);
@@ -394,7 +396,7 @@ PHP_FUNCTION(password_hash)
efree(hash_format);
efree(buffer);
efree(salt);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %lu", (unsigned long) buffer_len);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %zd", buffer_len);
RETURN_NULL();
}
salt_len = required_salt_len;
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index 1989a2eabc..8026b08d45 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -418,7 +418,7 @@ static php_stream_wrapper_ops php_stdio_wops = {
NULL /* rmdir */
};
-php_stream_wrapper php_stream_php_wrapper = {
+PHPAPI php_stream_wrapper php_stream_php_wrapper = {
&php_stdio_wops,
NULL,
0, /* is_url */
diff --git a/ext/standard/php_fopen_wrappers.h b/ext/standard/php_fopen_wrappers.h
index 084efc291c..6d6a5bde27 100644
--- a/ext/standard/php_fopen_wrappers.h
+++ b/ext/standard/php_fopen_wrappers.h
@@ -27,7 +27,7 @@ php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, const char *pa
php_stream *php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
extern PHPAPI php_stream_wrapper php_stream_http_wrapper;
extern PHPAPI php_stream_wrapper php_stream_ftp_wrapper;
-extern php_stream_wrapper php_stream_php_wrapper;
-extern php_stream_wrapper php_plain_files_wrapper;
+extern PHPAPI php_stream_wrapper php_stream_php_wrapper;
+extern PHPAPI php_stream_wrapper php_plain_files_wrapper;
#endif
diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h
index 177e960765..fa2747f3bf 100644
--- a/ext/standard/php_incomplete_class.h
+++ b/ext/standard/php_incomplete_class.h
@@ -54,7 +54,7 @@ extern "C" {
PHPAPI zend_class_entry *php_create_incomplete_class(TSRMLS_D);
PHPAPI zend_string *php_lookup_class_name(zval *object);
-PHPAPI void php_store_class_name(zval *object, const char *name, uint32_t len);
+PHPAPI void php_store_class_name(zval *object, const char *name, size_t len);
#ifdef __cplusplus
};
diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h
index 23225cdc42..a4df8f51f9 100644
--- a/ext/standard/php_var.h
+++ b/ext/standard/php_var.h
@@ -57,6 +57,7 @@ PHPAPI void php_var_serialize(smart_str *buf, zval *struc, php_serialize_data_t
PHPAPI int php_var_unserialize(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC);
PHPAPI int php_var_unserialize_ref(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC);
PHPAPI int php_var_unserialize_intern(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC);
+PHPAPI int php_var_unserialize_ex(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash, HashTable *classes TSRMLS_DC);
#define PHP_VAR_SERIALIZE_INIT(d) \
do { \
diff --git a/ext/standard/rand.c b/ext/standard/rand.c
index 55388e3c13..47b55af466 100644
--- a/ext/standard/rand.c
+++ b/ext/standard/rand.c
@@ -271,7 +271,7 @@ PHP_FUNCTION(mt_srand)
* We have a problem here in that only n==M will get mapped to b which
# means the chances of getting b is much much less than getting any of
# the other values in the range. We can fix this by increasing our range
- # artifically and using:
+ # artificially and using:
#
# n' = a + n(b-a+1)/M
*
diff --git a/ext/standard/scanf.h b/ext/standard/scanf.h
index ddb9803512..6d9e8a443c 100644
--- a/ext/standard/scanf.h
+++ b/ext/standard/scanf.h
@@ -23,7 +23,7 @@
#define SCAN_MAX_ARGS 0xFF /* Maximum number of variable which can be */
- /* passed to (f|s)scanf. This is an artifical */
+ /* passed to (f|s)scanf. This is an artificial */
/* upper limit to keep resources in check and */
/* minimize the possibility of exploits */
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 152ae6d66f..c5c6520cf7 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -2807,7 +2807,7 @@ static void php_strtr_array(zval *return_value, char *str, size_t slen, HashTabl
char *key;
smart_str result = {0};
- /* we will collect all possible key lenghts */
+ /* we will collect all possible key lengths */
ZVAL_NULL(&dummy);
zend_hash_init(&num_hash, 8, NULL, NULL, 0);
@@ -2829,7 +2829,7 @@ static void php_strtr_array(zval *return_value, char *str, size_t slen, HashTabl
if (len < minlen) {
minlen = len;
}
- /* remember possible key lenght */
+ /* remember possible key length */
zend_hash_index_add(&num_hash, len, &dummy);
}
} ZEND_HASH_FOREACH_END();
@@ -2854,7 +2854,7 @@ static void php_strtr_array(zval *return_value, char *str, size_t slen, HashTabl
if (len < minlen) {
minlen = len;
}
- /* remember possible key lenght */
+ /* remember possible key length */
zend_hash_index_add(&num_hash, len, &dummy);
} else {
len = str_key->len;
diff --git a/ext/standard/tests/array/array_search_variation4.phpt b/ext/standard/tests/array/array_search_variation4.phpt
index c247879ccc..7feb2ef147 100644
--- a/ext/standard/tests/array/array_search_variation4.phpt
+++ b/ext/standard/tests/array/array_search_variation4.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test array_search() function : usage variations - haystack as resource/multi dimentional array
+Test array_search() function : usage variations - haystack as resource/multi dimensional array
--FILE--
<?php
/*
diff --git a/ext/standard/tests/array/in_array_variation4.phpt b/ext/standard/tests/array/in_array_variation4.phpt
index a27bb196b4..9a5312b268 100644
--- a/ext/standard/tests/array/in_array_variation4.phpt
+++ b/ext/standard/tests/array/in_array_variation4.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test in_array() function : usage variations - haystack as resource/multi dimentional array
+Test in_array() function : usage variations - haystack as resource/multi dimensional array
--FILE--
<?php
/*
diff --git a/ext/standard/tests/file/fgetc_variation1.phpt b/ext/standard/tests/file/fgetc_variation1.phpt
index 007b2e0f9c..03258cac5d 100644
--- a/ext/standard/tests/file/fgetc_variation1.phpt
+++ b/ext/standard/tests/file/fgetc_variation1.phpt
@@ -34,7 +34,7 @@ for(; $loop_counter < count($file_modes); $loop_counter++) {
var_dump( feof($file_handle) ); // expected false
var_dump( ftell($file_handle) ); // ensure that file pointer is at eof
var_dump( fgetc($file_handle) ); // try n read a char, none expected
- var_dump( feof($file_handle) ); // ensure thta file pointer is at eof
+ var_dump( feof($file_handle) ); // ensure that file pointer is at eof
var_dump( ftell($file_handle) ); // file pointer position
// close the file handle
diff --git a/ext/standard/tests/file/fgets_variation6-win32.phpt b/ext/standard/tests/file/fgets_variation6-win32.phpt
index 14cb46f185..0334050aaa 100644
--- a/ext/standard/tests/file/fgets_variation6-win32.phpt
+++ b/ext/standard/tests/file/fgets_variation6-win32.phpt
@@ -49,7 +49,7 @@ foreach($file_modes as $file_mode) {
var_dump( fgets($file_handle) ); // try n read a line, none expected
var_dump( ftell($file_handle) ); // file pointer position
- var_dump( feof($file_handle) ); // ensure thta file pointer is at eof
+ var_dump( feof($file_handle) ); // ensure that file pointer is at eof
//close file
fclose($file_handle);
diff --git a/ext/standard/tests/file/fgets_variation6.phpt b/ext/standard/tests/file/fgets_variation6.phpt
index da6c2149b9..69215d9020 100644
--- a/ext/standard/tests/file/fgets_variation6.phpt
+++ b/ext/standard/tests/file/fgets_variation6.phpt
@@ -49,7 +49,7 @@ foreach($file_modes as $file_mode) {
var_dump( fgets($file_handle) ); // try n read a line, none expected
var_dump( ftell($file_handle) ); // file pointer position
- var_dump( feof($file_handle) ); // ensure thta file pointer is at eof
+ var_dump( feof($file_handle) ); // ensure that file pointer is at eof
//close file
fclose($file_handle);
diff --git a/ext/standard/tests/file/file.inc b/ext/standard/tests/file/file.inc
index b3cd99e1c1..aff9d107d9 100644
--- a/ext/standard/tests/file/file.inc
+++ b/ext/standard/tests/file/file.inc
@@ -451,7 +451,7 @@ function delete_file($filename) {
Description: Deletes given number of files if exists.
$file_path = location of the files
$name_prefix = prefix for the filename, rest of the name is incremental(increment by 1 only)
- numeric starting from suffix upto count
+ numeric starting from suffix up to count
$count = number of files to be deleted
$name_suffix = first numeric suffix in the name
Returns: An array with following key/value pair
@@ -495,7 +495,7 @@ function delete_files($file_path,
$file_path = location of link files
$link_file_count = Number of link files
$link_name_prefix = prefix for the linkname, rest of the name is incremental(increment by 1 only)
- numeric starting from $link_name_suffix upto count
+ numeric starting from $link_name_suffix up to count
$link_name_suffix = first numeric suffix in the name
Returns: An array with following key/value pair
diff --git a/ext/standard/tests/file/fscanf_variation18.phpt b/ext/standard/tests/file/fscanf_variation18.phpt
index 71b72984b8..bdd444d0e5 100644
--- a/ext/standard/tests/file/fscanf_variation18.phpt
+++ b/ext/standard/tests/file/fscanf_variation18.phpt
@@ -35,8 +35,8 @@ $integer_values = array (
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/file/fscanf_variation2.phpt b/ext/standard/tests/file/fscanf_variation2.phpt
index 77ae474ccc..8179aee78e 100644
--- a/ext/standard/tests/file/fscanf_variation2.phpt
+++ b/ext/standard/tests/file/fscanf_variation2.phpt
@@ -34,8 +34,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/file/fscanf_variation20.phpt b/ext/standard/tests/file/fscanf_variation20.phpt
index 7ce609c680..3c176773ed 100644
--- a/ext/standard/tests/file/fscanf_variation20.phpt
+++ b/ext/standard/tests/file/fscanf_variation20.phpt
@@ -34,8 +34,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/file/fscanf_variation27.phpt b/ext/standard/tests/file/fscanf_variation27.phpt
index 7a691fcc60..04f2dd5a62 100644
--- a/ext/standard/tests/file/fscanf_variation27.phpt
+++ b/ext/standard/tests/file/fscanf_variation27.phpt
@@ -34,8 +34,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/file/fscanf_variation33.phpt b/ext/standard/tests/file/fscanf_variation33.phpt
index 7ecff33fb9..2dc404ac76 100644
--- a/ext/standard/tests/file/fscanf_variation33.phpt
+++ b/ext/standard/tests/file/fscanf_variation33.phpt
@@ -40,8 +40,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/file/fscanf_variation39.phpt b/ext/standard/tests/file/fscanf_variation39.phpt
index 1b17015bc1..30d299662a 100644
--- a/ext/standard/tests/file/fscanf_variation39.phpt
+++ b/ext/standard/tests/file/fscanf_variation39.phpt
@@ -40,8 +40,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/file/fscanf_variation45.phpt b/ext/standard/tests/file/fscanf_variation45.phpt
index 7db0cc9748..cfd1fe2c4f 100644
--- a/ext/standard/tests/file/fscanf_variation45.phpt
+++ b/ext/standard/tests/file/fscanf_variation45.phpt
@@ -34,8 +34,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/file/fscanf_variation9.phpt b/ext/standard/tests/file/fscanf_variation9.phpt
index f3551f08d2..609c3ef139 100644
--- a/ext/standard/tests/file/fscanf_variation9.phpt
+++ b/ext/standard/tests/file/fscanf_variation9.phpt
@@ -41,8 +41,8 @@ $integer_values = array (
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/general_functions/bug39322.phpt b/ext/standard/tests/general_functions/bug39322.phpt
index a9f83c75bf..da06e89847 100644
--- a/ext/standard/tests/general_functions/bug39322.phpt
+++ b/ext/standard/tests/general_functions/bug39322.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #39322 (proc_terminate() loosing process resource)
+Bug #39322 (proc_terminate() losing process resource)
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
diff --git a/ext/standard/tests/general_functions/getrusage_basic.phpt b/ext/standard/tests/general_functions/getrusage_basic.phpt
index c9b34597cf..0e5b42c420 100644
--- a/ext/standard/tests/general_functions/getrusage_basic.phpt
+++ b/ext/standard/tests/general_functions/getrusage_basic.phpt
@@ -18,7 +18,7 @@ echo "Simple testcase for getrusage() function\n";
$dat = getrusage();
if (!is_array($dat)) {
- echo "TEST FAILED : getrusage shoudl return an array\n";
+ echo "TEST FAILED : getrusage should return an array\n";
}
// echo the fields which are common to all platforms
diff --git a/ext/standard/tests/general_functions/intval.phpt b/ext/standard/tests/general_functions/intval.phpt
index 7986e2dd14..095d66e3f2 100644
--- a/ext/standard/tests/general_functions/intval.phpt
+++ b/ext/standard/tests/general_functions/intval.phpt
@@ -25,8 +25,8 @@ $valid_ints = array(
'0Xfff',
'0XFA',
-0x80000000, // max negative integer as hexadecimal
- '0x7fffffff', // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ '0x7fffffff', // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
'0123', // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/general_functions/is_int.phpt b/ext/standard/tests/general_functions/is_int.phpt
index 7cc3f3b2f5..3aed0c9f17 100644
--- a/ext/standard/tests/general_functions/is_int.phpt
+++ b/ext/standard/tests/general_functions/is_int.phpt
@@ -25,8 +25,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/general_functions/is_int_64bit.phpt b/ext/standard/tests/general_functions/is_int_64bit.phpt
index 9de376eb1c..6f7f5162cd 100644
--- a/ext/standard/tests/general_functions/is_int_64bit.phpt
+++ b/ext/standard/tests/general_functions/is_int_64bit.phpt
@@ -27,8 +27,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/general_functions/php_uname_error.phpt b/ext/standard/tests/general_functions/php_uname_error.phpt
index 5e221b75cc..ca4c3d4022 100644
--- a/ext/standard/tests/general_functions/php_uname_error.phpt
+++ b/ext/standard/tests/general_functions/php_uname_error.phpt
@@ -12,7 +12,7 @@ echo "\n-- Testing php_uname() function with more than expected no. of arguments
var_dump( php_uname('a', true) );
echo "\n-- Testing php_uname() function with invalid mode --\n";
-// am invalid mode shoudl result in same o/p as mode 'a'
+// am invalid mode should result in same o/p as mode 'a'
var_dump( php_uname('z') == php_uname('z') );
class barClass {
diff --git a/ext/standard/tests/general_functions/strval.phpt b/ext/standard/tests/general_functions/strval.phpt
index 372ac6701e..89f5c591e8 100644
--- a/ext/standard/tests/general_functions/strval.phpt
+++ b/ext/standard/tests/general_functions/strval.phpt
@@ -43,8 +43,8 @@ $scalars = array(
/* floats */
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt
index b6f87c431c..b4d122e7b3 100644
--- a/ext/standard/tests/general_functions/var_export-locale.phpt
+++ b/ext/standard/tests/general_functions/var_export-locale.phpt
@@ -31,8 +31,8 @@ $valid_ints = array(
'0Xfff',
'0XFA',
-0x80000000, // max negative integer as hexadecimal
- '0x7fffffff', // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ '0x7fffffff', // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
'0123', // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/general_functions/var_export_basic1.phpt b/ext/standard/tests/general_functions/var_export_basic1.phpt
index 3a734c7fe0..8a23fe341b 100644
--- a/ext/standard/tests/general_functions/var_export_basic1.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic1.phpt
@@ -23,8 +23,8 @@ $valid_ints = array(
"'0Xfff'" => '0Xfff',
"'0XFA'" => '0XFA',
"-0x80000000" => -0x80000000, // max negative integer as hexadecimal
- "'0x7fffffff'" => '0x7fffffff', // max postive integer as hexadecimal
- "0x7FFFFFFF" => 0x7FFFFFFF, // max postive integer as hexadecimal
+ "'0x7fffffff'" => '0x7fffffff', // max positive integer as hexadecimal
+ "0x7FFFFFFF" => 0x7FFFFFFF, // max positive integer as hexadecimal
"'0123'" => '0123', // integer as octal
"01912" => 01912, // should be quivalent to octal 1
"-020000000000" => -020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/image/test1bpix.bmp b/ext/standard/tests/image/test1bpix.bmp
index 5522e503d2..ddac2a0dda 100644
--- a/ext/standard/tests/image/test1bpix.bmp
+++ b/ext/standard/tests/image/test1bpix.bmp
Binary files differ
diff --git a/ext/standard/tests/serialize/precision.phpt b/ext/standard/tests/serialize/precision.phpt
index 142b2cecf8..229c514e69 100644
--- a/ext/standard/tests/serialize/precision.phpt
+++ b/ext/standard/tests/serialize/precision.phpt
@@ -15,8 +15,8 @@ $numbers = array(
"0100000000001000", //2^-1022. + 10^-Accuracy[2^-1022.]*1.01
"ffffffffffffef7f", //2^1024. (maximum normal double)
"feffffffffffef7f", //2^1024. - 10^-Accuracy[2^1024.]
- "0100000000000000", //minumum subnormal double
- "0200000000000000", //2nd minumum subnormal double
+ "0100000000000000", //minimum subnormal double
+ "0200000000000000", //2nd minimum subnormal double
"fffffffffffff000", //maximum subnormal double
"fefffffffffff000", //2nd maximum subnormal double
"0000000000000f7f", //+inf
diff --git a/ext/standard/tests/serialize/serialization_error_001.phpt b/ext/standard/tests/serialize/serialization_error_001.phpt
index da6f50cc02..014128b19f 100644
--- a/ext/standard/tests/serialize/serialization_error_001.phpt
+++ b/ext/standard/tests/serialize/serialization_error_001.phpt
@@ -21,7 +21,7 @@ var_dump( unserialize() );
//Test serialize with one more than the expected number of arguments
var_dump( serialize(1,2) );
-var_dump( unserialize(1,2) );
+var_dump( unserialize(1,2,3) );
echo "Done";
?>
@@ -31,12 +31,12 @@ echo "Done";
Warning: serialize() expects exactly 1 parameter, 0 given in %s on line 16
NULL
-Warning: unserialize() expects exactly 1 parameter, 0 given in %s on line 17
+Warning: unserialize() expects at least 1 parameter, 0 given in %s on line 17
bool(false)
Warning: serialize() expects exactly 1 parameter, 2 given in %s on line 20
NULL
-Warning: unserialize() expects exactly 1 parameter, 2 given in %s on line 21
+Warning: unserialize() expects at most 2 parameters, 3 given in %s on line 21
bool(false)
Done
diff --git a/ext/standard/tests/serialize/unserialize_classes.phpt b/ext/standard/tests/serialize/unserialize_classes.phpt
new file mode 100644
index 0000000000..2a9d8a743c
--- /dev/null
+++ b/ext/standard/tests/serialize/unserialize_classes.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Test unserialize() with second parameter
+--FILE--
+<?php
+class foo {
+ public $x = "bar";
+}
+$z = array(new foo(), 2, "3");
+$s = serialize($z);
+
+var_dump(unserialize($s));
+var_dump(unserialize($s, ["allowed_classes" => false]));
+var_dump(unserialize($s, ["allowed_classes" => true]));
+var_dump(unserialize($s, ["allowed_classes" => ["bar"]]));
+var_dump(unserialize($s, ["allowed_classes" => ["FOO"]]));
+var_dump(unserialize($s, ["allowed_classes" => ["bar", "foO"]]));
+
+--EXPECTF--
+array(3) {
+ [0]=>
+ object(foo)#%d (1) {
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(__PHP_Incomplete_Class)#%d (2) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(3) "foo"
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(foo)#%d (1) {
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(__PHP_Incomplete_Class)#%d (2) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(3) "foo"
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(foo)#%d (1) {
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(foo)#%d (1) {
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
diff --git a/ext/standard/tests/strings/addcslashes_005.phpt b/ext/standard/tests/strings/addcslashes_005.phpt
new file mode 100644
index 0000000000..f0b2fbcecb
--- /dev/null
+++ b/ext/standard/tests/strings/addcslashes_005.phpt
@@ -0,0 +1,12 @@
+--TEST--
+addcslashes(); function test with warning
+--CREDITS--
+ marcosptf - <marcosptf@yahoo.com.br>
+#phptestfest PHPSP on Google - Sao Paulo - Brazil - 2014-06-05
+--FILE--
+<?php
+echo addcslashes("zoo['.']","z..A");
+?>
+--EXPECTF--
+Warning: addcslashes(): Invalid '..'-range, '..'-range needs to be incrementing in %s on line %d
+\zoo['\.']
diff --git a/ext/standard/tests/strings/bin2hex_001.phpt b/ext/standard/tests/strings/bin2hex_001.phpt
new file mode 100644
index 0000000000..e73500a30e
--- /dev/null
+++ b/ext/standard/tests/strings/bin2hex_001.phpt
@@ -0,0 +1,11 @@
+--TEST--
+bin2hex(); function test
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+#phptestfest PHPSP on Google - Sao Paulo - Brazil - 2014-06-05
+--FILE--
+<?php
+echo bin2hex("123456");
+?>
+--EXPECT--
+313233343536
diff --git a/ext/standard/tests/strings/sprintf_variation10.phpt b/ext/standard/tests/strings/sprintf_variation10.phpt
index 702dc34c77..e989d9f8b8 100644
--- a/ext/standard/tests/strings/sprintf_variation10.phpt
+++ b/ext/standard/tests/strings/sprintf_variation10.phpt
@@ -23,8 +23,8 @@ $integer_values = array (
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation19.phpt b/ext/standard/tests/strings/sprintf_variation19.phpt
index ae7b910573..542ba52aa3 100644
--- a/ext/standard/tests/strings/sprintf_variation19.phpt
+++ b/ext/standard/tests/strings/sprintf_variation19.phpt
@@ -23,8 +23,8 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation21.phpt b/ext/standard/tests/strings/sprintf_variation21.phpt
index afedfcaf7c..cbbf16e066 100644
--- a/ext/standard/tests/strings/sprintf_variation21.phpt
+++ b/ext/standard/tests/strings/sprintf_variation21.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/sprintf_variation28.phpt b/ext/standard/tests/strings/sprintf_variation28.phpt
index 8fad68b0d9..40af96f960 100644
--- a/ext/standard/tests/strings/sprintf_variation28.phpt
+++ b/ext/standard/tests/strings/sprintf_variation28.phpt
@@ -29,8 +29,8 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation28_64bit.phpt b/ext/standard/tests/strings/sprintf_variation28_64bit.phpt
index cd83093a74..92fdf78da1 100644
--- a/ext/standard/tests/strings/sprintf_variation28_64bit.phpt
+++ b/ext/standard/tests/strings/sprintf_variation28_64bit.phpt
@@ -25,8 +25,8 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation3.phpt b/ext/standard/tests/strings/sprintf_variation3.phpt
index 51a89ea08b..0435cf3d77 100644
--- a/ext/standard/tests/strings/sprintf_variation3.phpt
+++ b/ext/standard/tests/strings/sprintf_variation3.phpt
@@ -23,8 +23,8 @@ $valid_ints = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation34.phpt b/ext/standard/tests/strings/sprintf_variation34.phpt
index c6186b6780..8a5cd809d6 100644
--- a/ext/standard/tests/strings/sprintf_variation34.phpt
+++ b/ext/standard/tests/strings/sprintf_variation34.phpt
@@ -29,8 +29,8 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation34_64bit.phpt b/ext/standard/tests/strings/sprintf_variation34_64bit.phpt
index f9a7805f98..27e3f0c73e 100644
--- a/ext/standard/tests/strings/sprintf_variation34_64bit.phpt
+++ b/ext/standard/tests/strings/sprintf_variation34_64bit.phpt
@@ -25,8 +25,8 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation40.phpt b/ext/standard/tests/strings/sprintf_variation40.phpt
index 0da6a10b8a..6efcee0608 100644
--- a/ext/standard/tests/strings/sprintf_variation40.phpt
+++ b/ext/standard/tests/strings/sprintf_variation40.phpt
@@ -29,8 +29,8 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation40_64bit.phpt b/ext/standard/tests/strings/sprintf_variation40_64bit.phpt
index da6f37ace4..029e94c782 100644
--- a/ext/standard/tests/strings/sprintf_variation40_64bit.phpt
+++ b/ext/standard/tests/strings/sprintf_variation40_64bit.phpt
@@ -25,8 +25,8 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/sprintf_variation46.phpt b/ext/standard/tests/strings/sprintf_variation46.phpt
index 36aef14dd8..311d8c192a 100644
--- a/ext/standard/tests/strings/sprintf_variation46.phpt
+++ b/ext/standard/tests/strings/sprintf_variation46.phpt
@@ -23,8 +23,8 @@ $integer_values = array(
0Xfff,
0XFA,
-0x80000000, // max negative integer as hexadecimal
- 0x7fffffff, // max postive integer as hexadecimal
- 0x7FFFFFFF, // max postive integer as hexadecimal
+ 0x7fffffff, // max positive integer as hexadecimal
+ 0x7FFFFFFF, // max positive integer as hexadecimal
0123, // integer as octal
01912, // should be quivalent to octal 1
-020000000000, // max negative integer as octal
diff --git a/ext/standard/tests/strings/str_pad.phpt b/ext/standard/tests/strings/str_pad.phpt
index 645d8ff385..0c0c2026cd 100644
--- a/ext/standard/tests/strings/str_pad.phpt
+++ b/ext/standard/tests/strings/str_pad.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt
index 73c193b6d7..795050a9a4 100644
--- a/ext/standard/tests/strings/str_repeat.phpt
+++ b/ext/standard/tests/strings/str_repeat.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strncasecmp_variation6.phpt b/ext/standard/tests/strings/strncasecmp_variation6.phpt
index 765032b773..56276e9554 100644
--- a/ext/standard/tests/strings/strncasecmp_variation6.phpt
+++ b/ext/standard/tests/strings/strncasecmp_variation6.phpt
@@ -13,11 +13,11 @@ echo "*** Test strncasecmp() function: with binary inputs ***\n";
/* A binary function should work with all 256 characters that a character(8-bit) can take */
echo "\n-- Checking with all 256 characters given, in binary format --\n";
-/* loop through to get all 256 character's equivelent binary value, and check working of strncasecmp() */
+/* loop through to get all 256 character's equivalent binary value, and check working of strncasecmp() */
$count = 1;
for($ASCII = 0; $ASCII <= 255; $ASCII++) {
$str1 = decbin($ASCII); //ASCII value in binary form
- $str2 = decbin( ord( chr($ASCII) ) ); //Getting equivelent ASCII value for the character in binary form
+ $str2 = decbin( ord( chr($ASCII) ) ); //Getting equivalent ASCII value for the character in binary form
echo "-- Iteration $count --\n";
var_dump( strncasecmp($str1, $str2, 8) ); //comparing all the 8-bits; expected: int(0)
var_dump( strncasecmp($str1, $str2, 4) ); //comparing only 4-bits; expected: int(0)
diff --git a/ext/standard/tests/strings/strncmp_variation6.phpt b/ext/standard/tests/strings/strncmp_variation6.phpt
index 7a79d29a51..b3b918920e 100644
--- a/ext/standard/tests/strings/strncmp_variation6.phpt
+++ b/ext/standard/tests/strings/strncmp_variation6.phpt
@@ -13,11 +13,11 @@ echo "*** Test strncmp() function: with binary inputs ***\n";
echo "\n-- Checking with all 256 characters given, in binary format --\n";
/* A binary function should work with all 256 characters that a character(8-bit) can take */
-/* loop through to get all 256 character's equivelent binary value, and check working of strncmp() */
+/* loop through to get all 256 character's equivalent binary value, and check working of strncmp() */
$count = 1;
for($ASCII = 0; $ASCII <= 255; $ASCII++) {
$str1 = decbin($ASCII); //ASCII value in binary form
- $str2 = decbin( ord( chr($ASCII) ) ); //Getting equivelent ASCII value for the character in binary form
+ $str2 = decbin( ord( chr($ASCII) ) ); //Getting equivalent ASCII value for the character in binary form
echo "-- Iteration $count --\n";
var_dump( strncmp($str1, $str2, 8) ); //comparing all the 8-bits; expected: int(0)
var_dump( strncmp($str1, $str2, 4) ); //comparing only 4-bits; expected: int(0)
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 4f0bd24bdc..24bdd385a5 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -990,7 +990,7 @@ PHP_FUNCTION(serialize)
}
/* }}} */
-/* {{{ proto mixed unserialize(string variable_representation)
+/* {{{ proto mixed unserialize(string variable_representation[, bool|array allowed_classes])
Takes a string representation of variable and recreates it */
PHP_FUNCTION(unserialize)
{
@@ -998,8 +998,10 @@ PHP_FUNCTION(unserialize)
size_t buf_len;
const unsigned char *p;
php_unserialize_data_t var_hash;
+ zval *options = NULL, *classes = NULL;
+ HashTable *class_hash = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &buf, &buf_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a", &buf, &buf_len, &options) == FAILURE) {
RETURN_FALSE;
}
@@ -1009,8 +1011,32 @@ PHP_FUNCTION(unserialize)
p = (const unsigned char*) buf;
PHP_VAR_UNSERIALIZE_INIT(var_hash);
- if (!php_var_unserialize(return_value, &p, p + buf_len, &var_hash TSRMLS_CC)) {
+ if(options != NULL) {
+ classes = zend_hash_str_find(Z_ARRVAL_P(options), "allowed_classes", sizeof("allowed_classes")-1);
+ if(classes && (Z_TYPE_P(classes) == IS_ARRAY || !zend_is_true(classes TSRMLS_CC))) {
+ ALLOC_HASHTABLE(class_hash);
+ zend_hash_init(class_hash, (Z_TYPE_P(classes) == IS_ARRAY)?zend_hash_num_elements(Z_ARRVAL_P(classes)):0, NULL, NULL, 0);
+ }
+ if(class_hash && Z_TYPE_P(classes) == IS_ARRAY) {
+ zval *entry;
+ zend_string *lcname;
+
+ ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(classes), entry) {
+ convert_to_string_ex(entry);
+ lcname = zend_string_alloc(Z_STRLEN_P(entry), 0);
+ zend_str_tolower_copy(lcname->val, Z_STRVAL_P(entry), Z_STRLEN_P(entry));
+ zend_hash_add_empty_element(class_hash, lcname);
+ zend_string_release(lcname);
+ } ZEND_HASH_FOREACH_END();
+ }
+ }
+
+ if (!php_var_unserialize_ex(return_value, &p, p + buf_len, &var_hash, class_hash TSRMLS_CC)) {
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
+ if(class_hash) {
+ zend_hash_destroy(class_hash);
+ FREE_HASHTABLE(class_hash);
+ }
zval_dtor(return_value);
if (!EG(exception)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Error at offset " ZEND_LONG_FMT " of %d bytes", (zend_long)((char*)p - buf), buf_len);
@@ -1018,6 +1044,10 @@ PHP_FUNCTION(unserialize)
RETURN_FALSE;
}
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
+ if(class_hash) {
+ zend_hash_destroy(class_hash);
+ FREE_HASHTABLE(class_hash);
+ }
}
/* }}} */
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index 9be2b0658a..d8b94e75cc 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -226,6 +226,26 @@ static zend_string *unserialize_str(const unsigned char **p, size_t len, size_t
return str;
}
+static inline int unserialize_allowed_class(zend_string *class_name, HashTable *classes)
+{
+ zend_string *lcname;
+ int res;
+ ALLOCA_FLAG(use_heap)
+
+ if(classes == NULL) {
+ return 1;
+ }
+ if(!zend_hash_num_elements(classes)) {
+ return 0;
+ }
+
+ STR_ALLOCA_ALLOC(lcname, class_name->len, use_heap);
+ zend_str_tolower_copy(lcname->val, class_name->val, class_name->len);
+ res = zend_hash_exists(classes, lcname);
+ STR_ALLOCA_FREE(lcname, use_heap);
+ return res;
+}
+
#define YYFILL(n) do { } while (0)
#define YYCTYPE unsigned char
#define YYCURSOR cursor
@@ -233,7 +253,7 @@ static zend_string *unserialize_str(const unsigned char **p, size_t len, size_t
#define YYMARKER marker
-#line 241 "ext/standard/var_unserializer.re"
+#line 261 "ext/standard/var_unserializer.re"
@@ -293,8 +313,8 @@ static inline size_t parse_uiv(const unsigned char *p)
return result;
}
-#define UNSERIALIZE_PARAMETER zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC
-#define UNSERIALIZE_PASSTHRU rval, p, max, var_hash TSRMLS_CC
+#define UNSERIALIZE_PARAMETER zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash, HashTable *classes TSRMLS_DC
+#define UNSERIALIZE_PASSTHRU rval, p, max, var_hash, classes TSRMLS_CC
static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, zend_long elements, int objprops)
{
@@ -302,7 +322,8 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, zend
zval key, *data, d, *old_data;
ZVAL_UNDEF(&key);
- if (!php_var_unserialize(&key, p, max, NULL TSRMLS_CC)) {
+
+ if (!php_var_unserialize_ex(&key, p, max, NULL, classes TSRMLS_CC)) {
zval_dtor(&key);
return 0;
}
@@ -354,7 +375,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, zend
zval_dtor(&key);
- if (!php_var_unserialize(data, p, max, var_hash TSRMLS_CC)) {
+ if (!php_var_unserialize_ex(data, p, max, var_hash, classes TSRMLS_CC)) {
return 0;
}
@@ -462,7 +483,14 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements)
# pragma optimize("", on)
#endif
-PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
+PHPAPI int php_var_unserialize(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC)
+{
+ HashTable *classes = NULL;
+ return php_var_unserialize_ex(UNSERIALIZE_PASSTHRU);
+}
+
+
+PHPAPI int php_var_unserialize_ex(UNSERIALIZE_PARAMETER)
{
const unsigned char *cursor, *limit, *marker, *start;
zval *rval_ref;
@@ -481,7 +509,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
start = cursor;
-#line 485 "ext/standard/var_unserializer.c"
+#line 513 "ext/standard/var_unserializer.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -541,9 +569,9 @@ yy2:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy95;
yy3:
-#line 826 "ext/standard/var_unserializer.re"
+#line 860 "ext/standard/var_unserializer.re"
{ return 0; }
-#line 547 "ext/standard/var_unserializer.c"
+#line 575 "ext/standard/var_unserializer.c"
yy4:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy89;
@@ -586,13 +614,13 @@ yy13:
goto yy3;
yy14:
++YYCURSOR;
-#line 820 "ext/standard/var_unserializer.re"
+#line 854 "ext/standard/var_unserializer.re"
{
/* this is the case where we have less data than planned */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of serialized data");
return 0; /* not sure if it should be 0 or 1 here? */
}
-#line 596 "ext/standard/var_unserializer.c"
+#line 624 "ext/standard/var_unserializer.c"
yy16:
yych = *++YYCURSOR;
goto yy3;
@@ -618,11 +646,12 @@ yy20:
if (yybm[0+yych] & 128) {
goto yy20;
}
- if (yych != ':') goto yy18;
+ if (yych <= '/') goto yy18;
+ if (yych >= ';') goto yy18;
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 681 "ext/standard/var_unserializer.re"
+#line 709 "ext/standard/var_unserializer.re"
{
size_t len, len2, len3, maxlen;
zend_long elements;
@@ -672,6 +701,12 @@ yy20:
class_name = zend_string_init(str, len, 0);
do {
+ if(!unserialize_allowed_class(class_name, classes)) {
+ incomplete_class = 1;
+ ce = PHP_IC_ENTRY;
+ break;
+ }
+
/* Try to find class directly */
BG(serialize_lock)++;
ce = zend_lookup_class(class_name TSRMLS_CC);
@@ -761,7 +796,7 @@ yy20:
return object_common2(UNSERIALIZE_PASSTHRU, elements);
}
-#line 765 "ext/standard/var_unserializer.c"
+#line 800 "ext/standard/var_unserializer.c"
yy25:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -786,7 +821,7 @@ yy27:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 673 "ext/standard/var_unserializer.re"
+#line 701 "ext/standard/var_unserializer.re"
{
//??? INIT_PZVAL(rval);
@@ -794,7 +829,7 @@ yy27:
return object_common2(UNSERIALIZE_PASSTHRU,
object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR));
}
-#line 798 "ext/standard/var_unserializer.c"
+#line 833 "ext/standard/var_unserializer.c"
yy32:
yych = *++YYCURSOR;
if (yych == '+') goto yy33;
@@ -815,7 +850,7 @@ yy34:
yych = *++YYCURSOR;
if (yych != '{') goto yy18;
++YYCURSOR;
-#line 652 "ext/standard/var_unserializer.re"
+#line 680 "ext/standard/var_unserializer.re"
{
zend_long elements = parse_iv(start + 2);
/* use iv() not uiv() in order to check data range */
@@ -826,7 +861,7 @@ yy34:
}
array_init_size(rval, elements);
-//??? we can't convert from packed to hash during unserialization, becaue
+//??? we can't convert from packed to hash during unserialization, because
//??? reference to some zvals might be keept in var_hash (to support references)
zend_hash_real_init(Z_ARRVAL_P(rval), 0);
@@ -836,7 +871,7 @@ yy34:
return finish_nested_data(UNSERIALIZE_PASSTHRU);
}
-#line 840 "ext/standard/var_unserializer.c"
+#line 875 "ext/standard/var_unserializer.c"
yy39:
yych = *++YYCURSOR;
if (yych == '+') goto yy40;
@@ -857,7 +892,7 @@ yy41:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 624 "ext/standard/var_unserializer.re"
+#line 652 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
zend_string *str;
@@ -885,7 +920,7 @@ yy41:
ZVAL_STR(rval, str);
return 1;
}
-#line 889 "ext/standard/var_unserializer.c"
+#line 924 "ext/standard/var_unserializer.c"
yy46:
yych = *++YYCURSOR;
if (yych == '+') goto yy47;
@@ -906,7 +941,7 @@ yy48:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 597 "ext/standard/var_unserializer.re"
+#line 625 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
char *str;
@@ -933,7 +968,7 @@ yy48:
ZVAL_STRINGL(rval, str, len);
return 1;
}
-#line 937 "ext/standard/var_unserializer.c"
+#line 972 "ext/standard/var_unserializer.c"
yy53:
yych = *++YYCURSOR;
if (yych <= '/') {
@@ -1021,7 +1056,7 @@ yy61:
}
yy63:
++YYCURSOR;
-#line 588 "ext/standard/var_unserializer.re"
+#line 616 "ext/standard/var_unserializer.re"
{
#if SIZEOF_ZEND_LONG == 4
use_double:
@@ -1030,7 +1065,7 @@ use_double:
ZVAL_DOUBLE(rval, zend_strtod((const char *)start + 2, NULL));
return 1;
}
-#line 1034 "ext/standard/var_unserializer.c"
+#line 1069 "ext/standard/var_unserializer.c"
yy65:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1089,7 +1124,7 @@ yy73:
yych = *++YYCURSOR;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 572 "ext/standard/var_unserializer.re"
+#line 600 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
@@ -1105,7 +1140,7 @@ yy73:
return 1;
}
-#line 1109 "ext/standard/var_unserializer.c"
+#line 1144 "ext/standard/var_unserializer.c"
yy76:
yych = *++YYCURSOR;
if (yych == 'N') goto yy73;
@@ -1132,7 +1167,7 @@ yy79:
if (yych <= '9') goto yy79;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 546 "ext/standard/var_unserializer.re"
+#line 574 "ext/standard/var_unserializer.re"
{
#if SIZEOF_ZEND_LONG == 4
int digits = YYCURSOR - start - 3;
@@ -1158,7 +1193,7 @@ yy79:
ZVAL_LONG(rval, parse_iv(start + 2));
return 1;
}
-#line 1162 "ext/standard/var_unserializer.c"
+#line 1197 "ext/standard/var_unserializer.c"
yy83:
yych = *++YYCURSOR;
if (yych <= '/') goto yy18;
@@ -1166,22 +1201,22 @@ yy83:
yych = *++YYCURSOR;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 540 "ext/standard/var_unserializer.re"
+#line 568 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_BOOL(rval, parse_iv(start + 2));
return 1;
}
-#line 1176 "ext/standard/var_unserializer.c"
+#line 1211 "ext/standard/var_unserializer.c"
yy87:
++YYCURSOR;
-#line 534 "ext/standard/var_unserializer.re"
+#line 562 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_NULL(rval);
return 1;
}
-#line 1185 "ext/standard/var_unserializer.c"
+#line 1220 "ext/standard/var_unserializer.c"
yy89:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1204,7 +1239,7 @@ yy91:
if (yych <= '9') goto yy91;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 511 "ext/standard/var_unserializer.re"
+#line 539 "ext/standard/var_unserializer.re"
{
zend_long id;
@@ -1227,7 +1262,7 @@ yy91:
return 1;
}
-#line 1231 "ext/standard/var_unserializer.c"
+#line 1266 "ext/standard/var_unserializer.c"
yy95:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1250,7 +1285,7 @@ yy97:
if (yych <= '9') goto yy97;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 489 "ext/standard/var_unserializer.re"
+#line 517 "ext/standard/var_unserializer.re"
{
zend_long id;
@@ -1272,9 +1307,9 @@ yy97:
return 1;
}
-#line 1276 "ext/standard/var_unserializer.c"
+#line 1311 "ext/standard/var_unserializer.c"
}
-#line 828 "ext/standard/var_unserializer.re"
+#line 862 "ext/standard/var_unserializer.re"
return 0;
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re
index 1898c7734c..7e0dc314d6 100644
--- a/ext/standard/var_unserializer.re
+++ b/ext/standard/var_unserializer.re
@@ -224,6 +224,26 @@ static zend_string *unserialize_str(const unsigned char **p, size_t len, size_t
return str;
}
+static inline int unserialize_allowed_class(zend_string *class_name, HashTable *classes)
+{
+ zend_string *lcname;
+ int res;
+ ALLOCA_FLAG(use_heap)
+
+ if(classes == NULL) {
+ return 1;
+ }
+ if(!zend_hash_num_elements(classes)) {
+ return 0;
+ }
+
+ STR_ALLOCA_ALLOC(lcname, class_name->len, use_heap);
+ zend_str_tolower_copy(lcname->val, class_name->val, class_name->len);
+ res = zend_hash_exists(classes, lcname);
+ STR_ALLOCA_FREE(lcname, use_heap);
+ return res;
+}
+
#define YYFILL(n) do { } while (0)
#define YYCTYPE unsigned char
#define YYCURSOR cursor
@@ -297,8 +317,8 @@ static inline size_t parse_uiv(const unsigned char *p)
return result;
}
-#define UNSERIALIZE_PARAMETER zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC
-#define UNSERIALIZE_PASSTHRU rval, p, max, var_hash TSRMLS_CC
+#define UNSERIALIZE_PARAMETER zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash, HashTable *classes TSRMLS_DC
+#define UNSERIALIZE_PASSTHRU rval, p, max, var_hash, classes TSRMLS_CC
static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, zend_long elements, int objprops)
{
@@ -306,7 +326,8 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, zend
zval key, *data, d, *old_data;
ZVAL_UNDEF(&key);
- if (!php_var_unserialize(&key, p, max, NULL TSRMLS_CC)) {
+
+ if (!php_var_unserialize_ex(&key, p, max, NULL, classes TSRMLS_CC)) {
zval_dtor(&key);
return 0;
}
@@ -358,7 +379,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, zend
zval_dtor(&key);
- if (!php_var_unserialize(data, p, max, var_hash TSRMLS_CC)) {
+ if (!php_var_unserialize_ex(data, p, max, var_hash, classes TSRMLS_CC)) {
return 0;
}
@@ -466,7 +487,14 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements)
# pragma optimize("", on)
#endif
-PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
+PHPAPI int php_var_unserialize(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC)
+{
+ HashTable *classes = NULL;
+ return php_var_unserialize_ex(UNSERIALIZE_PASSTHRU);
+}
+
+
+PHPAPI int php_var_unserialize_ex(UNSERIALIZE_PARAMETER)
{
const unsigned char *cursor, *limit, *marker, *start;
zval *rval_ref;
@@ -659,7 +687,7 @@ use_double:
}
array_init_size(rval, elements);
-//??? we can't convert from packed to hash during unserialization, becaue
+//??? we can't convert from packed to hash during unserialization, because
//??? reference to some zvals might be keept in var_hash (to support references)
zend_hash_real_init(Z_ARRVAL_P(rval), 0);
@@ -727,6 +755,12 @@ object ":" uiv ":" ["] {
class_name = zend_string_init(str, len, 0);
do {
+ if(!unserialize_allowed_class(class_name, classes)) {
+ incomplete_class = 1;
+ ce = PHP_IC_ENTRY;
+ break;
+ }
+
/* Try to find class directly */
BG(serialize_lock)++;
ce = zend_lookup_class(class_name TSRMLS_CC);
diff --git a/ext/tokenizer/tests/token_get_all_variation17.phpt b/ext/tokenizer/tests/token_get_all_variation17.phpt
index f71444bc1e..d34508a8d5 100644
--- a/ext/tokenizer/tests/token_get_all_variation17.phpt
+++ b/ext/tokenizer/tests/token_get_all_variation17.phpt
@@ -22,7 +22,7 @@ $source = '<?php
function inverse($x)
{
if($x == 0) {
- throw new Exception("Divison by zero");
+ throw new Exception("Division by zero");
else
return 1/$x;
}
@@ -244,7 +244,7 @@ array(81) {
[0]=>
int(%d)
[1]=>
- string(17) ""Divison by zero""
+ string(18) ""Division by zero""
[2]=>
int(5)
}
diff --git a/ext/wddx/php_wddx_api.h b/ext/wddx/php_wddx_api.h
index 5c47109ee3..edbd013342 100644
--- a/ext/wddx/php_wddx_api.h
+++ b/ext/wddx/php_wddx_api.h
@@ -61,7 +61,7 @@ void php_wddx_packet_start(wddx_packet *packet, char *comment, size_t comment
void php_wddx_packet_end(wddx_packet *packet);
void php_wddx_serialize_var(wddx_packet *packet, zval *var, zend_string *name TSRMLS_DC);
-int php_wddx_deserialize_ex(char *, int, zval *return_value);
+int php_wddx_deserialize_ex(const char *, size_t, zval *return_value);
#define php_wddx_gather(packet) estrndup(packet->c, packet->len)
#endif /* PHP_WDDX_API_H */
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 705babd885..43deb15afd 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -1046,7 +1046,7 @@ static void php_wddx_process_data(void *user_data, const XML_Char *s, int len)
/* {{{ php_wddx_deserialize_ex
*/
-int php_wddx_deserialize_ex(char *value, int vallen, zval *return_value)
+int php_wddx_deserialize_ex(const char *value, size_t vallen, zval *return_value)
{
wddx_stack stack;
XML_Parser parser;
@@ -1060,7 +1060,8 @@ int php_wddx_deserialize_ex(char *value, int vallen, zval *return_value)
XML_SetElementHandler(parser, php_wddx_push_element, php_wddx_pop_element);
XML_SetCharacterDataHandler(parser, php_wddx_process_data);
- XML_Parse(parser, value, vallen, 1);
+ /* XXX value should be parsed in the loop to exhaust size_t */
+ XML_Parse(parser, value, (int)vallen, 1);
XML_ParserFree(parser);
diff --git a/ext/xmlrpc/libxmlrpc/xml_to_soap.c b/ext/xmlrpc/libxmlrpc/xml_to_soap.c
index ac103e0616..61f9834e9d 100644
--- a/ext/xmlrpc/libxmlrpc/xml_to_soap.c
+++ b/ext/xmlrpc/libxmlrpc/xml_to_soap.c
@@ -243,7 +243,7 @@ XMLRPC_VALUE xml_element_to_SOAP_REQUEST_worker(XMLRPC_REQUEST request,
xCurrent = XMLRPC_CreateValueEmpty();
}
- /* increment recursion depth guage */
+ /* increment recursion depth gauge */
depth ++;
/* safety first. must have a valid element */
diff --git a/ext/xmlwriter/tests/011.phpt b/ext/xmlwriter/tests/011.phpt
new file mode 100644
index 0000000000..51861673a1
--- /dev/null
+++ b/ext/xmlwriter/tests/011.phpt
@@ -0,0 +1,35 @@
+--TEST--
+XMLWriter: libxml2 XML Writer, write_attribute_ns function
+--CREDITS--
+Mauricio Vieira <mauricio [at] @mauriciovieira [dot] net>
+#testfest PHPSP on 2014-07-05
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlwriter")) die("skip");
+if (LIBXML_VERSION < 20617) die("skip: libxml2 2.6.17+ required");
+?>
+--FILE--
+<?php
+/* $Id$ */
+
+$xw = xmlwriter_open_memory();
+xmlwriter_set_indent($xw, TRUE);
+xmlwriter_set_indent_string($xw, ' ');
+xmlwriter_start_document($xw, '1.0', "UTF-8");
+xmlwriter_start_element($xw, 'root');
+xmlwriter_start_element_ns($xw, 'ns1', 'child1', 'urn:ns1');
+xmlwriter_write_attribute_ns($xw, 'ns1','att1', 'urn:ns1', '<>"\'&');
+xmlwriter_write_element($xw, 'chars', "special characters: <>\"'&");
+xmlwriter_end_element($xw);
+xmlwriter_end_document($xw);
+// Force to write and empty the buffer
+$output = xmlwriter_flush($xw, true);
+print $output;
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+ <ns1:child1 ns1:att1="&lt;&gt;&quot;'&amp;" xmlns:ns1="urn:ns1">
+ <chars>special characters: &lt;&gt;&quot;'&amp;</chars>
+ </ns1:child1>
+</root>
diff --git a/ext/xmlwriter/tests/012.phpt b/ext/xmlwriter/tests/012.phpt
new file mode 100644
index 0000000000..b6a4ad8c56
--- /dev/null
+++ b/ext/xmlwriter/tests/012.phpt
@@ -0,0 +1,38 @@
+--TEST--
+XMLWriter: libxml2 XML Writer, full_end_element function
+--CREDITS--
+Mauricio Vieira <mauricio [at] @mauriciovieira [dot] net>
+#testfest PHPSP on 2014-07-05
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlwriter")) die("skip");
+if (LIBXML_VERSION < 20617) die("skip: libxml2 2.6.17+ required");
+?>
+--FILE--
+<?php
+/* $Id$ */
+
+$xw = xmlwriter_open_memory();
+xmlwriter_set_indent($xw, TRUE);
+xmlwriter_set_indent_string($xw, ' ');
+xmlwriter_start_document($xw, '1.0', "UTF-8");
+xmlwriter_start_element($xw, 'root');
+xmlwriter_start_element_ns($xw, 'ns1', 'child1', 'urn:ns1');
+xmlwriter_write_attribute_ns($xw, 'ns1','att1', 'urn:ns1', '<>"\'&');
+xmlwriter_write_element($xw, 'chars', "special characters: <>\"'&");
+xmlwriter_end_element($xw);
+xmlwriter_start_element($xw, 'empty');
+xmlwriter_full_end_element($xw);
+xmlwriter_full_end_element($xw);
+// Force to write and empty the buffer
+$output = xmlwriter_flush($xw, true);
+print $output;
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+ <ns1:child1 ns1:att1="&lt;&gt;&quot;'&amp;" xmlns:ns1="urn:ns1">
+ <chars>special characters: &lt;&gt;&quot;'&amp;</chars>
+ </ns1:child1>
+ <empty></empty>
+</root>
diff --git a/ext/xmlwriter/tests/OO_010.phpt b/ext/xmlwriter/tests/OO_010.phpt
new file mode 100644
index 0000000000..d4444bafe8
--- /dev/null
+++ b/ext/xmlwriter/tests/OO_010.phpt
@@ -0,0 +1,36 @@
+--TEST--
+XMLWriter: libxml2 XML Writer, writeAttributeNS method
+--CREDITS--
+Mauricio Vieira <mauricio [at] @mauriciovieira [dot] net>
+#testfest PHPSP on 2014-07-05
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlwriter")) die("skip");
+if (LIBXML_VERSION < 20617) die("skip: libxml2 2.6.17+ required");
+?>
+--FILE--
+<?php
+/* $Id$ */
+
+$xw = new XMLWriter();
+$xw->openMemory();
+$xw->setIndent(TRUE);
+$xw->setIndentString(' ');
+$xw->startDocument('1.0', "UTF-8");
+$xw->startElement('root');
+$xw->startElementNS('ns1', 'child1', 'urn:ns1');
+$xw->writeAttributeNS('ns1', 'att1', 'urn:ns1', '<>"\'&');
+$xw->writeElement('chars', "special characters: <>\"'&");
+$xw->endElement();
+$xw->endDocument();
+// Force to write and empty the buffer
+$output = $xw->flush(true);
+print $output;
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+ <ns1:child1 ns1:att1="&lt;&gt;&quot;'&amp;" xmlns:ns1="urn:ns1">
+ <chars>special characters: &lt;&gt;&quot;'&amp;</chars>
+ </ns1:child1>
+</root>
diff --git a/ext/xmlwriter/tests/OO_011.phpt b/ext/xmlwriter/tests/OO_011.phpt
new file mode 100644
index 0000000000..0407e1b05f
--- /dev/null
+++ b/ext/xmlwriter/tests/OO_011.phpt
@@ -0,0 +1,39 @@
+--TEST--
+XMLWriter: libxml2 XML Writer, fullEndElement method
+--CREDITS--
+Mauricio Vieira <mauricio [at] @mauriciovieira [dot] net>
+#testfest PHPSP on 2014-07-05
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlwriter")) die("skip");
+if (LIBXML_VERSION < 20617) die("skip: libxml2 2.6.17+ required");
+?>
+--FILE--
+<?php
+/* $Id$ */
+
+$xw = new XMLWriter();
+$xw->openMemory();
+$xw->setIndent(TRUE);
+$xw->setIndentString(' ');
+$xw->startDocument('1.0', "UTF-8");
+$xw->startElement('root');
+$xw->startElementNS('ns1', 'child1', 'urn:ns1');
+$xw->writeAttributeNS('ns1', 'att1', 'urn:ns1', '<>"\'&');
+$xw->writeElement('chars', "special characters: <>\"'&");
+$xw->endElement();
+$xw->startElement('empty');
+$xw->fullEndElement();
+$xw->fullEndElement();
+// Force to write and empty the buffer
+$output = $xw->flush(true);
+print $output;
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+ <ns1:child1 ns1:att1="&lt;&gt;&quot;'&amp;" xmlns:ns1="urn:ns1">
+ <chars>special characters: &lt;&gt;&quot;'&amp;</chars>
+ </ns1:child1>
+ <empty></empty>
+</root>
diff --git a/ext/xsl/tests/xsltprocessor_hasExsltSupport.phpt b/ext/xsl/tests/xsltprocessor_hasExsltSupport.phpt
new file mode 100644
index 0000000000..2267129307
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_hasExsltSupport.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Test the basics to function XSLTProcessor::hasExsltSupport().
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$proc = new XSLTProcessor();
+var_dump($proc->hasExsltSupport());
+?>
+--EXPECTF--
+bool(true) \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_hasExsltSupport_not_available_extension.phpt b/ext/xsl/tests/xsltprocessor_hasExsltSupport_not_available_extension.phpt
new file mode 100644
index 0000000000..d8b8fa846d
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_hasExsltSupport_not_available_extension.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Test the basics to function XSLTProcessor::hasExsltSupport() when the xsl extension os not available.
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php (!extension_loaded('xsl')) or die('skip xsl extension is available'); ?>
+--FILE--
+<?php
+$proc = new XSLTProcessor();
+var_dump($proc->hasExsltSupport());
+?>
+--EXPECTF--
+Fatal error: Class 'XSLTProcessor' not found in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_hasExsltSupport_wrongparam_001.phpt b/ext/xsl/tests/xsltprocessor_hasExsltSupport_wrongparam_001.phpt
new file mode 100644
index 0000000000..107157fa28
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_hasExsltSupport_wrongparam_001.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Check XSLTProcessor::hasExsltSupport() with 1 parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$proc = new XSLTProcessor();
+var_dump($proc->hasExsltSupport('stringValue'));
+?>
+--EXPECTF--
+bool(true) \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToDoc.phpt b/ext/xsl/tests/xsltprocessor_transformToDoc.phpt
new file mode 100644
index 0000000000..ff4be47e3f
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToDoc.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test the basics to function XSLTProcessor::transformToDoc().
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>royopa</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+var_dump($proc->transformToDoc($xmldoc)->firstChild->tagName);
+?>
+--EXPECT--
+string(4) "html" \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToDoc_nullparam.phpt b/ext/xsl/tests/xsltprocessor_transformToDoc_nullparam.phpt
new file mode 100644
index 0000000000..735fd72958
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToDoc_nullparam.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Check XSLTProcessor::transformToDoc() with null parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+echo $proc->transformToDoc(null);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToDoc() expects parameter 1 to be object, null given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_001.phpt b/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_001.phpt
new file mode 100644
index 0000000000..1460de39a4
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_001.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Check XSLTProcessor::transformToDoc() with array parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = array();
+
+echo $proc->transformToDoc($wrong_parameter);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToDoc() expects parameter 1 to be object, array given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_002.phpt b/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_002.phpt
new file mode 100644
index 0000000000..2c6c99ae25
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_002.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Check XSLTProcessor::transformToDoc() with 4 parameters
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+echo $proc->transformToDoc($xmldoc, 'string', 98, true);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToDoc() expects at most 2 parameters, 4 given in %s on line %i
diff --git a/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_003.phpt b/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_003.phpt
new file mode 100644
index 0000000000..19fc3e44ef
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_003.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Check XSLTProcessor::transformToDoc() with string parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = 'stringValue';
+
+echo $proc->transformToDoc($wrong_parameter);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToDoc() expects parameter 1 to be object, string given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_004.phpt b/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_004.phpt
new file mode 100644
index 0000000000..8df84b7cbe
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToDoc_wrongparam_004.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Check XSLTProcessor::transformToDoc() with boolean parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = true;
+
+echo $proc->transformToDoc($wrong_parameter);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToDoc() expects parameter 1 to be object, boolean given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToURI.phpt b/ext/xsl/tests/xsltprocessor_transformToURI.phpt
new file mode 100644
index 0000000000..27ed4e2975
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToURI.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test the basics to function XSLTProcessor::transformToURI().
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+var_dump($proc->transformToURI($xsldoc, 'php://output'));
+?>
+--EXPECTF--
+int(56) \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToURI_nullparam.phpt b/ext/xsl/tests/xsltprocessor_transformToURI_nullparam.phpt
new file mode 100644
index 0000000000..69afeaf7be
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToURI_nullparam.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Check XSLTProcessor::transformToURI() with null parameters
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+echo $proc->transformToURI(null, null);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToUri() expects parameter 1 to be object, null given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_001.phpt b/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_001.phpt
new file mode 100644
index 0000000000..64b98ce7e5
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_001.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Check XSLTProcessor::transformToURI() with array parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = array();
+$uri = 'php://output';
+
+echo $proc->transformToURI($wrong_parameter, $uri);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToUri() expects parameter 1 to be object, array given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_002.phpt b/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_002.phpt
new file mode 100644
index 0000000000..7f497ba2b8
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_002.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Check XSLTProcessor::transformToURI() with string parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = 'stringValue';
+$uri = 'php://output';
+
+echo $proc->transformToURI($wrong_parameter, $uri);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToUri() expects parameter 1 to be object, string given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_003.phpt b/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_003.phpt
new file mode 100644
index 0000000000..c7742422fd
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_003.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Check XSLTProcessor::transformToURI() with boolean parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = false;
+$uri = 'php://output';
+
+echo $proc->transformToURI($wrong_parameter, $uri);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToUri() expects parameter 1 to be object, boolean given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_004.phpt b/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_004.phpt
new file mode 100644
index 0000000000..c1de1d93c3
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToURI_wrongparam_004.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Check XSLTProcessor::transformToURI() with 3 parameters
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$uri = 'php://output';
+
+echo $proc->transformToURI($xsldoc, $uri, 'stringValue');
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToUri() expects exactly 2 parameters, 3 given in %s on line %i \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToXML.phpt b/ext/xsl/tests/xsltprocessor_transformToXML.phpt
new file mode 100644
index 0000000000..c70200d102
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToXML.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test the basics to function XSLTProcessor::transformToXml().
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+var_dump($proc->transformToXML($xmldoc));
+?>
+--EXPECT--
+string(135) "<html xmlns:php="http://php.net/xsl"><body>
+<h2>Users</h2>
+<table>
+<tr><td>Bob</td></tr>
+<tr><td>Joe</td></tr>
+</table>
+</body></html>
+" \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToXML_nullparam.phpt b/ext/xsl/tests/xsltprocessor_transformToXML_nullparam.phpt
new file mode 100644
index 0000000000..a7689df078
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToXML_nullparam.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Check XSLTProcessor::transformToXml() with null parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+echo $proc->transformToXML(null);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToXml() expects parameter 1 to be object, null given in %s on line %i
diff --git a/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_001.phpt b/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_001.phpt
new file mode 100644
index 0000000000..32e1a8095b
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_001.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Check XSLTProcessor::transformToXML() with array parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = array();
+echo $proc->transformToXML($wrong_parameter);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToXml() expects parameter 1 to be object, array given in %s on line %d \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_002.phpt b/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_002.phpt
new file mode 100644
index 0000000000..69b9305e13
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_002.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Check XSLTProcessor::transformToXML() with 3 parameters
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+echo $proc->transformToXML($xmldoc, 'string', 98);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToXml() expects exactly 1 parameter, 3 given in %s on line %i
diff --git a/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_003.phpt b/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_003.phpt
new file mode 100644
index 0000000000..05cb7ebd9e
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_003.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Check XSLTProcessor::transformToXML() with string parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = 'stringValue';
+echo $proc->transformToXML($wrong_parameter);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToXml() expects parameter 1 to be object, string given in %s on line %d \ No newline at end of file
diff --git a/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_004.phpt b/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_004.phpt
new file mode 100644
index 0000000000..87db6e14d6
--- /dev/null
+++ b/ext/xsl/tests/xsltprocessor_transformToXML_wrongparam_004.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Check XSLTProcessor::transformToXML() with boolean parameter
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+--SKIPIF--
+<?php extension_loaded('xsl') or die('skip xsl extension is not available'); ?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+ <user>
+ <uid>joe</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('ucfirst',string(uid))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument('1.0', 'utf-8');
+$xmldoc->loadXML($xml);
+
+$xsldoc = new DOMDocument('1.0', 'utf-8');
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+
+$wrong_parameter = true;
+echo $proc->transformToXML($wrong_parameter);
+?>
+--EXPECTF--
+Warning: XSLTProcessor::transformToXml() expects parameter 1 to be object, boolean given in %s on line %d \ No newline at end of file
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 4accc22e30..b50e240656 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -556,7 +556,7 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
array_init(return_value);
for (n = 0; n < globbuf.gl_pathc; n++) {
- /* we need to do this everytime since GLOB_ONLYDIR does not guarantee that
+ /* we need to do this every time since GLOB_ONLYDIR does not guarantee that
* all directories will be filtered. GNU libc documentation states the
* following:
* If the information about the type of the file is easily available
diff --git a/ext/zlib/tests/gzfile_variation4.phpt b/ext/zlib/tests/gzfile_variation4.phpt
index 3310231566..9b3128125a 100644
--- a/ext/zlib/tests/gzfile_variation4.phpt
+++ b/ext/zlib/tests/gzfile_variation4.phpt
@@ -2,7 +2,7 @@
Test function gzfile() by substituting argument 1 with float values.
--SKIPIF--
<?php
-if (!extension_loaded(zlib)) die ('skip zlib extension not available in this build');
+if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
?>
--FILE--
<?php
diff --git a/ext/zlib/tests/readgzfile_variation4.phpt b/ext/zlib/tests/readgzfile_variation4.phpt
index 00211f7dfe..32f434cba2 100644
--- a/ext/zlib/tests/readgzfile_variation4.phpt
+++ b/ext/zlib/tests/readgzfile_variation4.phpt
@@ -2,7 +2,7 @@
Test function readgzfile() by substituting argument 1 with float values.
--SKIPIF--
<?php
-if (!extension_loaded(zlib)) die ('skip zlib extension not available in this build');
+if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
?>
--FILE--
<?php
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 000b96ad8e..c3548eae53 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -34,6 +34,18 @@
#include "ext/standard/php_string.h"
#include "php_zlib.h"
+/*
+ * zlib include files can define the following preprocessor defines which rename
+ * the corresponding PHP functions to gzopen64, gzseek64 and gztell64 and thereby
+ * breaking some software, most notably PEAR's Archive_Tar, which halts execution
+ * without error message on gzip compressed archivesa.
+ *
+ * This only seems to happen on 32bit systems with large file support.
+ */
+#undef gzopen
+#undef gzseek
+#undef gztell
+
ZEND_DECLARE_MODULE_GLOBALS(zlib);
/* {{{ Memory management wrappers */
diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c
index 45ef2a8f7d..2f0d1f7706 100644
--- a/ext/zlib/zlib_filter.c
+++ b/ext/zlib/zlib_filter.c
@@ -386,7 +386,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
if ((tmpzval = zend_hash_str_find(HASH_OF(filterparams), "level", sizeof("level") - 1))) {
ZVAL_COPY_VALUE(&tmp, tmpzval);
- /* Psuedo pass through to catch level validating code */
+ /* Pseudo pass through to catch level validating code */
goto factory_setlevel;
}
break;
diff --git a/ext/zlib/zlib_win32_howto.txt b/ext/zlib/zlib_win32_howto.txt
index 0c46a88831..59ff3c4f4c 100644
--- a/ext/zlib/zlib_win32_howto.txt
+++ b/ext/zlib/zlib_win32_howto.txt
@@ -1,7 +1,7 @@
Rules for building ZLIB
-----------------------
-The zlib project requires the folowing files:
+The zlib project requires the following files:
php_build\zlib\include\zlib.h
php_build\zlib\include\zconf.h