summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:39:08 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:39:08 -0400
commit993e1866df547532a05ab6db76c9ff5aefc9a3df (patch)
tree169d3bde0974235d3cde164786ef6f381a4749a7
parent1f589a2bd44ba835ad1b009a5d83abd453724829 (diff)
downloadphp-993e1866df547532a05ab6db76c9ff5aefc9a3df.tar.gz
Imported Upstream version 5.2.6upstream/5.2.6
-rw-r--r--EXTENSIONS2
-rw-r--r--NEWS1000
-rw-r--r--TSRM/TSRM.c2
-rw-r--r--TSRM/TSRM.h2
-rw-r--r--TSRM/tsrm_nw.c4
-rw-r--r--TSRM/tsrm_nw.h2
-rw-r--r--TSRM/tsrm_virtual_cwd.c32
-rw-r--r--TSRM/tsrm_virtual_cwd.h4
-rw-r--r--TSRM/tsrm_win32.c4
-rw-r--r--TSRM/tsrm_win32.h4
-rw-r--r--Zend/FlexLexer.h2
-rw-r--r--Zend/acconfig.h4
-rw-r--r--Zend/flex.skl2
-rwxr-xr-xZend/tests/bug29674.phpt2
-rw-r--r--Zend/tests/bug29689.phpt2
-rw-r--r--Zend/tests/bug30922.phpt2
-rw-r--r--Zend/tests/bug38469.phpt28
-rw-r--r--Zend/tests/bug41919.phpt3
-rwxr-xr-xZend/tests/bug42937.phpt40
-rwxr-xr-xZend/tests/bug43128.phpt17
-rwxr-xr-xZend/tests/bug43175.phpt24
-rwxr-xr-xZend/tests/bug43201.phpt54
-rw-r--r--Zend/tests/bug43450.phpt35
-rw-r--r--Zend/tests/bug43483.phpt24
-rw-r--r--Zend/tests/bug43703.phpt23
-rw-r--r--Zend/tests/bug44069.phpt21
-rw-r--r--Zend/tests/bug44141.phpt25
-rw-r--r--Zend/tests/bug44184.phpt21
-rw-r--r--Zend/tests/clone_uncloneable.phpt20
-rw-r--r--Zend/tests/errmsg_038.phpt2
-rw-r--r--Zend/tests/indexing_001.phpt212
-rwxr-xr-xZend/tests/multibyte/multibyte_encoding_001.phpt23
-rwxr-xr-xZend/tests/multibyte/multibyte_encoding_002.phpt21
-rwxr-xr-xZend/tests/multibyte/multibyte_encoding_003.phptbin0 -> 469 bytes
-rw-r--r--Zend/zend.c6
-rw-r--r--Zend/zend.h16
-rw-r--r--Zend/zend_API.c19
-rw-r--r--Zend/zend_API.h4
-rw-r--r--Zend/zend_alloc.c52
-rw-r--r--Zend/zend_alloc.h4
-rw-r--r--Zend/zend_arg_defs.c4
-rw-r--r--Zend/zend_builtin_functions.c22
-rw-r--r--Zend/zend_builtin_functions.h4
-rw-r--r--Zend/zend_compile.c74
-rw-r--r--Zend/zend_compile.h4
-rw-r--r--Zend/zend_config.nw.h4
-rw-r--r--Zend/zend_config.w32.h4
-rw-r--r--Zend/zend_constants.c5
-rw-r--r--Zend/zend_constants.h4
-rw-r--r--Zend/zend_default_classes.c4
-rw-r--r--Zend/zend_dynamic_array.c4
-rw-r--r--Zend/zend_dynamic_array.h4
-rw-r--r--Zend/zend_errors.h4
-rw-r--r--Zend/zend_exceptions.c4
-rw-r--r--Zend/zend_exceptions.h4
-rw-r--r--Zend/zend_execute.c52
-rw-r--r--Zend/zend_execute.h4
-rw-r--r--Zend/zend_execute_API.c44
-rw-r--r--Zend/zend_extensions.c4
-rw-r--r--Zend/zend_extensions.h4
-rw-r--r--Zend/zend_fast_cache.h4
-rw-r--r--Zend/zend_globals.h4
-rw-r--r--Zend/zend_globals_macros.h4
-rw-r--r--Zend/zend_hash.c4
-rw-r--r--Zend/zend_hash.h4
-rw-r--r--Zend/zend_highlight.c4
-rw-r--r--Zend/zend_highlight.h4
-rw-r--r--Zend/zend_indent.c4
-rw-r--r--Zend/zend_indent.h4
-rw-r--r--Zend/zend_ini.c18
-rw-r--r--Zend/zend_ini.h4
-rw-r--r--Zend/zend_ini_parser.c4
-rw-r--r--Zend/zend_ini_parser.y4
-rw-r--r--Zend/zend_ini_scanner.c2
-rw-r--r--Zend/zend_ini_scanner.h4
-rwxr-xr-xZend/zend_interfaces.c4
-rwxr-xr-xZend/zend_interfaces.h4
-rw-r--r--Zend/zend_istdiostream.h4
-rwxr-xr-xZend/zend_iterators.c4
-rwxr-xr-xZend/zend_iterators.h4
-rw-r--r--Zend/zend_language_parser.c2230
-rw-r--r--Zend/zend_language_parser.output3690
-rw-r--r--Zend/zend_language_parser.y12
-rw-r--r--Zend/zend_language_scanner.c41
-rw-r--r--Zend/zend_language_scanner.h4
-rw-r--r--Zend/zend_language_scanner.l39
-rw-r--r--Zend/zend_list.c4
-rw-r--r--Zend/zend_list.h4
-rw-r--r--Zend/zend_llist.c4
-rw-r--r--Zend/zend_llist.h4
-rw-r--r--Zend/zend_modules.h4
-rw-r--r--Zend/zend_multibyte.c4
-rw-r--r--Zend/zend_multibyte.h4
-rw-r--r--Zend/zend_multiply.h4
-rw-r--r--Zend/zend_object_handlers.c59
-rw-r--r--Zend/zend_object_handlers.h4
-rw-r--r--Zend/zend_objects.c4
-rw-r--r--Zend/zend_objects.h4
-rw-r--r--Zend/zend_objects_API.c4
-rw-r--r--Zend/zend_objects_API.h4
-rw-r--r--Zend/zend_opcode.c6
-rw-r--r--Zend/zend_operators.c4
-rw-r--r--Zend/zend_operators.h4
-rw-r--r--Zend/zend_ptr_stack.c4
-rw-r--r--Zend/zend_ptr_stack.h4
-rw-r--r--Zend/zend_qsort.c4
-rw-r--r--Zend/zend_qsort.h4
-rw-r--r--Zend/zend_sprintf.c4
-rw-r--r--Zend/zend_stack.c4
-rw-r--r--Zend/zend_stack.h4
-rw-r--r--Zend/zend_static_allocator.c4
-rw-r--r--Zend/zend_static_allocator.h4
-rw-r--r--Zend/zend_stream.c4
-rw-r--r--Zend/zend_stream.h4
-rw-r--r--Zend/zend_strtod.h4
-rw-r--r--Zend/zend_ts_hash.c4
-rw-r--r--Zend/zend_ts_hash.h4
-rw-r--r--Zend/zend_types.h4
-rw-r--r--Zend/zend_variables.c4
-rw-r--r--Zend/zend_variables.h4
-rw-r--r--Zend/zend_vm.h4
-rw-r--r--Zend/zend_vm_def.h50
-rw-r--r--Zend/zend_vm_execute.h360
-rw-r--r--Zend/zend_vm_gen.php6
-rw-r--r--Zend/zend_vm_opcodes.h2
-rw-r--r--acconfig.h4
-rwxr-xr-xconfigure2984
-rw-r--r--configure.in4
-rw-r--r--ext/bcmath/bcmath.c4
-rw-r--r--ext/bcmath/php_bcmath.h4
-rw-r--r--ext/bz2/bz2.c4
-rw-r--r--ext/bz2/bz2_filter.c15
-rw-r--r--ext/bz2/php_bz2.h4
-rw-r--r--ext/calendar/cal_unix.c2
-rw-r--r--ext/calendar/calendar.c4
-rw-r--r--ext/calendar/easter.c2
-rw-r--r--ext/com_dotnet/com_com.c4
-rw-r--r--ext/com_dotnet/com_dotnet.c4
-rw-r--r--ext/com_dotnet/com_extension.c4
-rw-r--r--ext/com_dotnet/com_handlers.c4
-rw-r--r--ext/com_dotnet/com_iterator.c4
-rw-r--r--ext/com_dotnet/com_misc.c4
-rw-r--r--ext/com_dotnet/com_olechar.c4
-rwxr-xr-xext/com_dotnet/com_persist.c4
-rw-r--r--ext/com_dotnet/com_saproxy.c4
-rw-r--r--ext/com_dotnet/com_typeinfo.c4
-rw-r--r--ext/com_dotnet/com_variant.c4
-rw-r--r--ext/com_dotnet/com_wrapper.c4
-rw-r--r--ext/com_dotnet/php_com_dotnet.h4
-rw-r--r--ext/com_dotnet/php_com_dotnet_internal.h4
-rw-r--r--ext/ctype/ctype.c2
-rw-r--r--ext/ctype/php_ctype.h2
-rw-r--r--ext/ctype/tests/ctype_alnum_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_alnum_error.phpt43
-rw-r--r--ext/ctype/tests/ctype_alnum_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_alnum_variation2.phpt92
-rw-r--r--ext/ctype/tests/ctype_alnum_variation3.phpt127
-rw-r--r--ext/ctype/tests/ctype_alnum_variation4.phpt62
-rw-r--r--ext/ctype/tests/ctype_alpha_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_alpha_error.phpt39
-rw-r--r--ext/ctype/tests/ctype_alpha_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_alpha_variation2.phpt82
-rw-r--r--ext/ctype/tests/ctype_alpha_variation3.phpt128
-rw-r--r--ext/ctype/tests/ctype_alpha_variation4.phpt62
-rw-r--r--ext/ctype/tests/ctype_cntrl_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_cntrl_error.phpt39
-rw-r--r--ext/ctype/tests/ctype_cntrl_variation1.phpt178
-rw-r--r--ext/ctype/tests/ctype_cntrl_variation2.phpt63
-rw-r--r--ext/ctype/tests/ctype_cntrl_variation3.phpt156
-rw-r--r--ext/ctype/tests/ctype_cntrl_variation4.phpt61
-rw-r--r--ext/ctype/tests/ctype_digit_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_digit_error.phpt39
-rw-r--r--ext/ctype/tests/ctype_digit_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_digit_variation2.phpt40
-rw-r--r--ext/ctype/tests/ctype_digit_variation3.phpt158
-rw-r--r--ext/ctype/tests/ctype_digit_variation4.phpt62
-rw-r--r--ext/ctype/tests/ctype_graph_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_graph_error.phpt39
-rw-r--r--ext/ctype/tests/ctype_graph_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_graph_variation2.phpt124
-rw-r--r--ext/ctype/tests/ctype_graph_variation3.phpt146
-rw-r--r--ext/ctype/tests/ctype_graph_variation4.phpt62
-rw-r--r--ext/ctype/tests/ctype_lower_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_lower_error.phpt39
-rw-r--r--ext/ctype/tests/ctype_lower_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_lower_variation2.phpt56
-rw-r--r--ext/ctype/tests/ctype_lower_variation3.phpt138
-rw-r--r--ext/ctype/tests/ctype_lower_variation4.phpt62
-rw-r--r--ext/ctype/tests/ctype_print_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_print_error.phpt39
-rw-r--r--ext/ctype/tests/ctype_print_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_print_variation2.phpt125
-rw-r--r--ext/ctype/tests/ctype_print_variation3.phpt126
-rw-r--r--ext/ctype/tests/ctype_print_variation4.phpt61
-rw-r--r--ext/ctype/tests/ctype_punct_basic.phpt28
-rw-r--r--ext/ctype/tests/ctype_punct_error.phpt44
-rw-r--r--ext/ctype/tests/ctype_punct_variation1.phpt178
-rw-r--r--ext/ctype/tests/ctype_punct_variation2.phpt63
-rw-r--r--ext/ctype/tests/ctype_punct_variation3.phpt138
-rw-r--r--ext/ctype/tests/ctype_punct_variation4.phpt63
-rw-r--r--ext/ctype/tests/ctype_space_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_space_error.phpt43
-rw-r--r--ext/ctype/tests/ctype_space_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_space_variation2.phpt35
-rw-r--r--ext/ctype/tests/ctype_space_variation3.phpt138
-rw-r--r--ext/ctype/tests/ctype_space_variation4.phpt69
-rw-r--r--ext/ctype/tests/ctype_upper_basic.phpt27
-rw-r--r--ext/ctype/tests/ctype_upper_error.phpt39
-rw-r--r--ext/ctype/tests/ctype_upper_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_upper_variation2.phpt55
-rw-r--r--ext/ctype/tests/ctype_upper_variation3.phpt137
-rw-r--r--ext/ctype/tests/ctype_upper_variation4.phpt61
-rw-r--r--ext/ctype/tests/ctype_xdigit_basic.phpt26
-rw-r--r--ext/ctype/tests/ctype_xdigit_error.phpt39
-rw-r--r--ext/ctype/tests/ctype_xdigit_variation1.phpt177
-rw-r--r--ext/ctype/tests/ctype_xdigit_variation2.phpt52
-rw-r--r--ext/ctype/tests/ctype_xdigit_variation3.phpt138
-rw-r--r--ext/ctype/tests/ctype_xdigit_variation4.phpt81
-rw-r--r--ext/curl/interface.c22
-rw-r--r--ext/curl/multi.c14
-rw-r--r--ext/curl/php_curl.h4
-rw-r--r--ext/curl/streams.c4
-rw-r--r--ext/date/lib/astro.c4
-rw-r--r--ext/date/lib/dow.c10
-rw-r--r--ext/date/lib/parse_date.c6
-rw-r--r--ext/date/lib/parse_date.c.orig6
-rw-r--r--ext/date/lib/parse_date.re4
-rw-r--r--ext/date/lib/parse_tz.c4
-rw-r--r--ext/date/lib/timelib.c4
-rw-r--r--ext/date/lib/timelib.h7
-rw-r--r--ext/date/lib/timelib_structs.h4
-rw-r--r--ext/date/lib/timezonedb.h1803
-rw-r--r--ext/date/lib/tm2unixtime.c6
-rw-r--r--ext/date/lib/unixtime2tm.c4
-rw-r--r--ext/date/php_date.c240
-rw-r--r--ext/date/php_date.h4
-rw-r--r--ext/date/tests/bug40743.phpt40
-rw-r--r--ext/date/tests/bug41523-64bit.phpt47
-rw-r--r--ext/date/tests/bug41523.phpt4
-rw-r--r--ext/date/tests/bug41599.phpt27
-rw-r--r--ext/date/tests/bug42910.phpt30
-rw-r--r--ext/date/tests/bug43003.phpt27
-rw-r--r--ext/date/tests/bug43527.phpt10
-rw-r--r--ext/date/tests/bug43808.phpt14
-rw-r--r--ext/date/tests/bug44742.phpt36
-rw-r--r--ext/date/tests/mktime-3-64bit.phpt56
-rw-r--r--ext/date/tests/mktime-3.phpt4
-rw-r--r--ext/date/tests/oo_002.phpt2
-rw-r--r--ext/date/tests/strtotime-mysql-64bit.phpt28
-rwxr-xr-xext/date/tests/strtotime-mysql.phpt4
-rw-r--r--ext/date/tests/strtotime3-64bit.phpt71
-rw-r--r--ext/date/tests/strtotime3.phpt4
-rw-r--r--ext/date/tests/timestamp-in-dst.phpt11
-rw-r--r--ext/dba/config.m411
-rw-r--r--ext/dba/dba.c4
-rw-r--r--ext/dba/dba_cdb.c4
-rwxr-xr-xext/dba/dba_db1.c4
-rw-r--r--ext/dba/dba_db2.c4
-rw-r--r--ext/dba/dba_db3.c4
-rw-r--r--ext/dba/dba_db4.c4
-rw-r--r--ext/dba/dba_dbm.c4
-rw-r--r--ext/dba/dba_flatfile.c4
-rw-r--r--ext/dba/dba_gdbm.c4
-rw-r--r--ext/dba/dba_inifile.c4
-rw-r--r--ext/dba/dba_ndbm.c4
-rwxr-xr-xext/dba/dba_qdbm.c4
-rw-r--r--ext/dba/libcdb/cdb.c6
-rw-r--r--ext/dba/libcdb/cdb.h4
-rw-r--r--ext/dba/libcdb/cdb_make.c6
-rw-r--r--ext/dba/libcdb/cdb_make.h4
-rw-r--r--ext/dba/libcdb/uint32.c4
-rw-r--r--ext/dba/libcdb/uint32.h4
-rw-r--r--ext/dba/libflatfile/flatfile.c6
-rw-r--r--ext/dba/libflatfile/flatfile.h4
-rw-r--r--ext/dba/libinifile/inifile.c6
-rw-r--r--ext/dba/libinifile/inifile.h4
-rw-r--r--ext/dba/php_dba.h4
-rw-r--r--ext/dbase/dbase.c4
-rw-r--r--ext/dbase/dbf_head.c9
-rw-r--r--ext/dbase/php_dbase.h4
-rw-r--r--ext/dom/attr.c20
-rw-r--r--ext/dom/cdatasection.c13
-rw-r--r--ext/dom/characterdata.c46
-rw-r--r--ext/dom/comment.c13
-rw-r--r--ext/dom/document.c250
-rw-r--r--ext/dom/documentfragment.c19
-rw-r--r--ext/dom/documenttype.c4
-rw-r--r--ext/dom/dom_ce.h4
-rw-r--r--ext/dom/dom_fe.h4
-rw-r--r--ext/dom/dom_iterators.c4
-rw-r--r--ext/dom/dom_properties.h4
-rw-r--r--ext/dom/domconfiguration.c29
-rw-r--r--ext/dom/domerror.c4
-rw-r--r--ext/dom/domerrorhandler.c13
-rw-r--r--ext/dom/domexception.c4
-rw-r--r--ext/dom/domimplementation.c38
-rw-r--r--ext/dom/domimplementationlist.c13
-rw-r--r--ext/dom/domimplementationsource.c20
-rw-r--r--ext/dom/domlocator.c4
-rw-r--r--ext/dom/domstringlist.c13
-rw-r--r--ext/dom/element.c153
-rw-r--r--ext/dom/entity.c4
-rw-r--r--ext/dom/entityreference.c13
-rw-r--r--ext/dom/namednodemap.c57
-rw-r--r--ext/dom/namelist.c20
-rw-r--r--ext/dom/node.c162
-rw-r--r--ext/dom/nodelist.c13
-rw-r--r--ext/dom/notation.c4
-rw-r--r--ext/dom/php_dom.c4
-rw-r--r--ext/dom/php_dom.h4
-rw-r--r--ext/dom/processinginstruction.c14
-rw-r--r--ext/dom/string_extend.c20
-rw-r--r--ext/dom/tests/bug36756.phpt2
-rw-r--r--ext/dom/tests/bug38474.phpt7
-rw-r--r--ext/dom/tests/bug43364.phpt40
-rw-r--r--ext/dom/text.c35
-rw-r--r--ext/dom/typeinfo.c4
-rw-r--r--ext/dom/userdatahandler.c4
-rw-r--r--ext/dom/xml_common.h4
-rw-r--r--ext/dom/xpath.c37
-rw-r--r--ext/exif/exif.c23
-rw-r--r--ext/exif/php_exif.h4
-rw-r--r--ext/fbsql/php_fbsql.c4
-rw-r--r--ext/fbsql/php_fbsql.h4
-rw-r--r--ext/fdf/fdf.c4
-rw-r--r--ext/fdf/php_fdf.h4
-rw-r--r--ext/filter/callback_filter.c4
-rw-r--r--ext/filter/filter.c27
-rw-r--r--ext/filter/filter_private.h4
-rw-r--r--ext/filter/logical_filters.c6
-rw-r--r--ext/filter/php_filter.h4
-rw-r--r--ext/filter/sanitizing_filters.c4
-rw-r--r--ext/filter/tests/052.phpt73
-rw-r--r--ext/filter/tests/053.phpt15
-rw-r--r--ext/filter/tests/bug44445.phpt12
-rw-r--r--ext/ftp/ftp.c4
-rw-r--r--ext/ftp/ftp.h4
-rw-r--r--ext/ftp/php_ftp.c4
-rw-r--r--ext/ftp/php_ftp.h4
-rw-r--r--ext/gd/gd.c6
-rw-r--r--ext/gd/gd_ctx.c4
-rw-r--r--ext/gd/libgd/gdft.c3
-rw-r--r--ext/gd/libgd/xbm.c4
-rw-r--r--ext/gd/php_gd.h4
-rw-r--r--ext/gd/tests/gd_info_basic.phpt29
-rw-r--r--ext/gd/tests/image_type_to_mime_type_basic.phpt64
-rw-r--r--ext/gd/tests/imagecopyresampled_basic.phpt71
-rw-r--r--ext/gd/tests/imagedashedline_basic.phpt78
-rw-r--r--ext/gd/tests/imagefilledpolygon_basic.phpt102
-rw-r--r--ext/gd/tests/imagepolygon_basic.phpt80
-rw-r--r--ext/gettext/gettext.c4
-rw-r--r--ext/gettext/php_gettext.h4
-rw-r--r--ext/gmp/gmp.c2
-rw-r--r--ext/gmp/php_gmp.h2
-rw-r--r--ext/hash/hash.c4
-rw-r--r--ext/hash/hash_adler32.c4
-rw-r--r--ext/hash/hash_crc32.c4
-rw-r--r--ext/hash/hash_gost.c4
-rw-r--r--ext/hash/hash_haval.c4
-rw-r--r--ext/hash/hash_md.c4
-rw-r--r--ext/hash/hash_ripemd.c4
-rw-r--r--ext/hash/hash_salsa.c4
-rw-r--r--ext/hash/hash_sha.c4
-rw-r--r--ext/hash/hash_snefru.c4
-rw-r--r--ext/hash/hash_tiger.c4
-rw-r--r--ext/hash/hash_whirlpool.c4
-rw-r--r--ext/hash/php_hash.h4
-rw-r--r--ext/hash/php_hash_adler32.h4
-rw-r--r--ext/hash/php_hash_crc32.h4
-rw-r--r--ext/hash/php_hash_crc32_tables.h4
-rw-r--r--ext/hash/php_hash_gost.h4
-rw-r--r--ext/hash/php_hash_haval.h4
-rw-r--r--ext/hash/php_hash_md.h4
-rw-r--r--ext/hash/php_hash_ripemd.h4
-rw-r--r--ext/hash/php_hash_salsa.h4
-rw-r--r--ext/hash/php_hash_sha.h4
-rw-r--r--ext/hash/php_hash_snefru.h4
-rw-r--r--ext/hash/php_hash_snefru_tables.h4
-rw-r--r--ext/hash/php_hash_tiger.h4
-rw-r--r--ext/hash/php_hash_tiger_tables.h4
-rw-r--r--ext/hash/php_hash_types.h4
-rw-r--r--ext/hash/php_hash_whirlpool.h4
-rw-r--r--ext/hash/php_hash_whirlpool_tables.h4
-rw-r--r--ext/iconv/iconv.c4
-rw-r--r--ext/iconv/php_iconv.h4
-rw-r--r--ext/imap/php_imap.c23
-rw-r--r--ext/imap/php_imap.h4
-rw-r--r--ext/interbase/ibase_blobs.c4
-rw-r--r--ext/interbase/ibase_events.c4
-rw-r--r--ext/interbase/ibase_query.c4
-rw-r--r--ext/interbase/ibase_service.c4
-rw-r--r--ext/interbase/interbase.c4
-rwxr-xr-xext/interbase/php_ibase_includes.h6
-rw-r--r--ext/interbase/php_ibase_udf.c4
-rw-r--r--ext/interbase/php_interbase.h4
-rw-r--r--ext/json/json.c4
-rw-r--r--ext/json/php_json.h4
-rw-r--r--ext/json/tests/005.phpt10
-rw-r--r--ext/json/tests/bug41567.phpt2
-rw-r--r--ext/ldap/ldap.c6
-rw-r--r--ext/ldap/php_ldap.h4
-rw-r--r--ext/ldap/tests/ldap_dn2ufn.phpt33
-rw-r--r--ext/ldap/tests/ldap_explode_dn.phpt94
-rw-r--r--ext/ldap/tests/skipif.inc5
-rw-r--r--ext/libxml/config.w326
-rw-r--r--ext/libxml/libxml.c27
-rw-r--r--ext/libxml/php_libxml.h4
-rw-r--r--ext/libxml/php_libxml2.def3087
-rw-r--r--ext/mbstring/libmbfl/nls/nls_hy.c2
-rw-r--r--ext/mbstring/mb_gpc.c4
-rw-r--r--ext/mbstring/mbstring.c17
-rw-r--r--ext/mbstring/mbstring.h4
-rwxr-xr-xext/mbstring/oniguruma/enc/utf16_be.c2
-rwxr-xr-xext/mbstring/oniguruma/enc/utf16_le.c2
-rwxr-xr-xext/mbstring/oniguruma/enc/utf32_be.c2
-rwxr-xr-xext/mbstring/oniguruma/enc/utf32_le.c2
-rw-r--r--ext/mbstring/oniguruma/enc/utf8.c2
-rw-r--r--ext/mbstring/oniguruma/oniguruma.h2
-rw-r--r--ext/mbstring/oniguruma/regcomp.c2
-rw-r--r--ext/mbstring/oniguruma/regenc.h2
-rw-r--r--ext/mbstring/oniguruma/regerror.c2
-rw-r--r--ext/mbstring/oniguruma/regexec.c2
-rwxr-xr-xext/mbstring/oniguruma/regext.c2
-rw-r--r--ext/mbstring/oniguruma/reggnu.c2
-rw-r--r--ext/mbstring/oniguruma/regint.h2
-rw-r--r--ext/mbstring/oniguruma/regparse.c2
-rw-r--r--ext/mbstring/oniguruma/regparse.h2
-rw-r--r--ext/mbstring/oniguruma/regposix.c2
-rw-r--r--ext/mbstring/oniguruma/regsyntax.c2
-rw-r--r--ext/mbstring/oniguruma/regversion.c4
-rw-r--r--ext/mbstring/php_mbregex.c18
-rw-r--r--ext/mbstring/php_mbregex.h4
-rw-r--r--ext/mbstring/php_unicode.c7
-rw-r--r--ext/mbstring/php_unicode.h2
-rw-r--r--ext/mbstring/tests/bug43301.phpt20
-rw-r--r--ext/mbstring/tests/mb_convert_encoding_basic.phpt95
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_basic.phpt65
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt186
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt224
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt186
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt187
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt215
-rw-r--r--ext/mbstring/tests/mb_encode_mimeheader_variation6.phpt53
-rw-r--r--ext/mbstring/tests/mb_ereg1.phpt9
-rw-r--r--ext/mbstring/tests/mb_ereg_basic.phpt117
-rw-r--r--ext/mbstring/tests/mb_ereg_error.phpt49
-rw-r--r--ext/mbstring/tests/mb_ereg_variation1.phpt165
-rw-r--r--ext/mbstring/tests/mb_ereg_variation2.phpt216
-rw-r--r--ext/mbstring/tests/mb_ereg_variation3.phpt163
-rw-r--r--ext/mbstring/tests/mb_ereg_variation4.phpt149
-rw-r--r--ext/mbstring/tests/mb_ereg_variation5.phpt82
-rw-r--r--ext/mbstring/tests/mb_ereg_variation6.phpt185
-rw-r--r--ext/mbstring/tests/mb_ereg_variation7.phpt94
-rw-r--r--ext/mbstring/tests/mb_internal_encoding_basic.phpt36
-rw-r--r--ext/mbstring/tests/mb_internal_encoding_error1.phpt36
-rw-r--r--ext/mbstring/tests/mb_internal_encoding_error2.phpt31
-rw-r--r--ext/mbstring/tests/mb_internal_encoding_variation1.phpt217
-rw-r--r--ext/mbstring/tests/mb_internal_encoding_variation2.phpt374
-rw-r--r--ext/mbstring/tests/mb_regex_encoding_basic.phpt35
-rw-r--r--ext/mbstring/tests/mb_regex_encoding_error1.phpt36
-rw-r--r--ext/mbstring/tests/mb_regex_encoding_error2.phpt31
-rw-r--r--ext/mbstring/tests/mb_regex_encoding_variation1.phpt215
-rw-r--r--ext/mbstring/tests/mb_strlen_basic.phpt43
-rw-r--r--ext/mbstring/tests/mb_strlen_error1.phpt46
-rw-r--r--ext/mbstring/tests/mb_strlen_error2.phpt34
-rw-r--r--ext/mbstring/tests/mb_strlen_variation1.phpt180
-rw-r--r--ext/mbstring/tests/mb_strlen_variation2.phpt220
-rw-r--r--ext/mbstring/tests/mb_strlen_variation3.phpt445
-rw-r--r--ext/mbstring/tests/mb_strpos_basic.phpt57
-rw-r--r--ext/mbstring/tests/mb_strpos_error1.phpt50
-rw-r--r--ext/mbstring/tests/mb_strpos_error2.phpt34
-rw-r--r--ext/mbstring/tests/mb_strpos_variation1.phpt182
-rw-r--r--ext/mbstring/tests/mb_strpos_variation2.phpt198
-rw-r--r--ext/mbstring/tests/mb_strpos_variation3.phpt202
-rw-r--r--ext/mbstring/tests/mb_strpos_variation4.phpt222
-rw-r--r--ext/mbstring/tests/mb_strrpos_basic.phpt58
-rw-r--r--ext/mbstring/tests/mb_strrpos_error1.phpt50
-rw-r--r--ext/mbstring/tests/mb_strrpos_error2.phpt35
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation1.phpt181
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation2.phpt183
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation3.phpt153
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation4.phpt222
-rw-r--r--ext/mbstring/tests/mb_strrpos_variation5.phpt61
-rw-r--r--ext/mbstring/tests/mb_strtolower_basic.phpt58
-rw-r--r--ext/mbstring/tests/mb_strtolower_error1.phpt46
-rw-r--r--ext/mbstring/tests/mb_strtolower_error2.phpt33
-rw-r--r--ext/mbstring/tests/mb_strtolower_variation1.phpt180
-rw-r--r--ext/mbstring/tests/mb_strtolower_variation2.phpt219
-rw-r--r--ext/mbstring/tests/mb_strtolower_variation3.phpt57
-rw-r--r--ext/mbstring/tests/mb_strtolower_variation4.phpt56
-rw-r--r--ext/mbstring/tests/mb_strtoupper_basic.phpt60
-rw-r--r--ext/mbstring/tests/mb_strtoupper_error1.phpt47
-rw-r--r--ext/mbstring/tests/mb_strtoupper_error2.phpt34
-rw-r--r--ext/mbstring/tests/mb_strtoupper_variation1.phpt182
-rw-r--r--ext/mbstring/tests/mb_strtoupper_variation2.phpt220
-rw-r--r--ext/mbstring/tests/mb_strtoupper_variation3.phpt58
-rw-r--r--ext/mbstring/tests/mb_strtoupper_variation4.phpt57
-rw-r--r--ext/mbstring/tests/mb_substr_basic.phpt55
-rw-r--r--ext/mbstring/tests/mb_substr_count_basic.phpt47
-rw-r--r--ext/mbstring/tests/mb_substr_count_error1.phpt49
-rw-r--r--ext/mbstring/tests/mb_substr_count_error2.phpt37
-rw-r--r--ext/mbstring/tests/mb_substr_count_variation1.phpt183
-rw-r--r--ext/mbstring/tests/mb_substr_count_variation2.phpt197
-rw-r--r--ext/mbstring/tests/mb_substr_count_variation3.phpt220
-rw-r--r--ext/mbstring/tests/mb_substr_error1.phpt49
-rw-r--r--ext/mbstring/tests/mb_substr_error2.phpt35
-rw-r--r--ext/mbstring/tests/mb_substr_variation1.phpt179
-rw-r--r--ext/mbstring/tests/mb_substr_variation2.phpt220
-rw-r--r--ext/mbstring/tests/mb_substr_variation3.phpt445
-rw-r--r--ext/mbstring/tests/mb_substr_variation4.phpt131
-rw-r--r--ext/mbstring/tests/mb_substr_variation5.phpt134
-rw-r--r--ext/mcrypt/mcrypt.c4
-rw-r--r--ext/mcrypt/php_mcrypt.h4
-rw-r--r--ext/mhash/mhash.c4
-rw-r--r--ext/mhash/php_mhash.h4
-rw-r--r--ext/mime_magic/mime_magic.c4
-rw-r--r--ext/mime_magic/php_mime_magic.h4
-rw-r--r--ext/mime_magic/phpmimemagic.h4
-rw-r--r--ext/ming/ming.c4
-rw-r--r--ext/ming/php_ming.h4
-rw-r--r--ext/msql/php_msql.c4
-rw-r--r--ext/msql/php_msql.h4
-rw-r--r--ext/mssql/php_mssql.c4
-rw-r--r--ext/mssql/php_mssql.h4
-rw-r--r--ext/mysql/php_mysql.c123
-rw-r--r--ext/mysql/php_mysql.h4
-rw-r--r--ext/mysql/php_mysql_structs.h4
-rwxr-xr-xext/mysql/tests/001.phpt2
-rw-r--r--ext/mysqli/mysqli.c14
-rw-r--r--ext/mysqli/mysqli_api.c7
-rw-r--r--ext/mysqli/mysqli_driver.c2
-rw-r--r--ext/mysqli/mysqli_embedded.c2
-rw-r--r--ext/mysqli/mysqli_exception.c2
-rw-r--r--ext/mysqli/mysqli_fe.c4
-rw-r--r--ext/mysqli/mysqli_nonapi.c4
-rw-r--r--ext/mysqli/mysqli_prop.c4
-rw-r--r--ext/mysqli/mysqli_repl.c4
-rw-r--r--ext/mysqli/mysqli_report.c4
-rw-r--r--ext/mysqli/mysqli_report.h4
-rw-r--r--ext/mysqli/mysqli_warning.c2
-rw-r--r--ext/mysqli/php_mysqli.h4
-rw-r--r--ext/mysqli/tests/047.phpt26
-rw-r--r--ext/mysqli/tests/bug42548.phpt53
-rw-r--r--ext/ncurses/ncurses.c2
-rw-r--r--ext/ncurses/ncurses_fe.c2
-rw-r--r--ext/ncurses/ncurses_functions.c2
-rw-r--r--ext/ncurses/php_ncurses.h2
-rw-r--r--ext/ncurses/php_ncurses_fe.h2
-rw-r--r--ext/oci8/config.m419
-rw-r--r--ext/oci8/oci8.c17
-rw-r--r--ext/oci8/oci8_collection.c14
-rw-r--r--ext/oci8/oci8_interface.c11
-rw-r--r--ext/oci8/oci8_lob.c34
-rw-r--r--ext/oci8/oci8_statement.c22
-rw-r--r--ext/oci8/php_oci8.h4
-rw-r--r--ext/oci8/php_oci8_int.h8
-rw-r--r--ext/oci8/tests/bug27303.phpt382
-rw-r--r--ext/oci8/tests/bug27303_2.phpt202
-rw-r--r--ext/oci8/tests/bug27303_4.phpt382
-rw-r--r--ext/oci8/tests/bug42496_1.phpt61
-rw-r--r--ext/oci8/tests/bug42496_2.phpt59
-rw-r--r--ext/oci8/tests/bug42841.phpt187
-rw-r--r--ext/oci8/tests/bug43492.phpt378
-rw-r--r--ext/oci8/tests/bug43492_2.phpt369
-rw-r--r--ext/oci8/tests/bug43497.phpt294
-rw-r--r--ext/oci8/tests/bug44008.phpt54
-rw-r--r--ext/oci8/tests/bug44113.phpt53
-rw-r--r--ext/oci8/tests/bug44206.phpt41
-rw-r--r--ext/oci8/tests/bug6109.phpt46
-rw-r--r--ext/oci8/tests/lob_014.phpt4
-rw-r--r--ext/oci8/tests/lob_021.phpt6
-rw-r--r--ext/oci8/tests/lob_039.phpt4
-rw-r--r--ext/oci8/tests/lob_041.phpt92
-rw-r--r--ext/oci8/tests/lob_042.phpt71
-rw-r--r--ext/odbc/birdstep.c4
-rw-r--r--ext/odbc/php_birdstep.h4
-rw-r--r--ext/odbc/php_odbc.c4
-rw-r--r--ext/odbc/php_odbc.h4
-rw-r--r--ext/odbc/php_odbc_includes.h4
-rw-r--r--ext/openssl/openssl.c8
-rw-r--r--ext/openssl/php_openssl.h4
-rw-r--r--ext/openssl/xp_ssl.c8
-rwxr-xr-xext/pcntl/pcntl.c6
-rw-r--r--ext/pcntl/php_pcntl.h4
-rw-r--r--ext/pcntl/php_signal.c4
-rw-r--r--ext/pcntl/php_signal.h4
-rw-r--r--ext/pcre/pcrelib/AUTHORS4
-rw-r--r--ext/pcre/pcrelib/ChangeLog260
-rw-r--r--ext/pcre/pcrelib/LICENCE4
-rw-r--r--ext/pcre/pcrelib/NEWS27
-rw-r--r--ext/pcre/pcrelib/NON-UNIX-USE177
-rw-r--r--ext/pcre/pcrelib/README56
-rw-r--r--ext/pcre/pcrelib/config.h63
-rw-r--r--ext/pcre/pcrelib/dftables.c6
-rw-r--r--ext/pcre/pcrelib/doc/pcre.txt1543
-rw-r--r--ext/pcre/pcrelib/pcre.h11
-rw-r--r--ext/pcre/pcrelib/pcre_chartables.c2
-rw-r--r--ext/pcre/pcrelib/pcre_compile.c509
-rw-r--r--ext/pcre/pcrelib/pcre_config.c12
-rw-r--r--ext/pcre/pcrelib/pcre_exec.c99
-rw-r--r--ext/pcre/pcrelib/pcre_fullinfo.c18
-rw-r--r--ext/pcre/pcrelib/pcre_get.c6
-rw-r--r--ext/pcre/pcrelib/pcre_globals.c4
-rw-r--r--ext/pcre/pcrelib/pcre_info.c8
-rw-r--r--ext/pcre/pcrelib/pcre_internal.h60
-rw-r--r--ext/pcre/pcrelib/pcre_maketables.c4
-rw-r--r--ext/pcre/pcrelib/pcre_newline.c4
-rw-r--r--ext/pcre/pcrelib/pcre_ord2utf8.c4
-rw-r--r--ext/pcre/pcrelib/pcre_printint.src4
-rw-r--r--ext/pcre/pcrelib/pcre_refcount.c4
-rw-r--r--ext/pcre/pcrelib/pcre_study.c7
-rw-r--r--ext/pcre/pcrelib/pcre_tables.c331
-rw-r--r--ext/pcre/pcrelib/pcre_try_flipped.c5
-rw-r--r--ext/pcre/pcrelib/pcre_ucp_searchfuncs.c4
-rw-r--r--ext/pcre/pcrelib/pcre_valid_utf8.c6
-rw-r--r--ext/pcre/pcrelib/pcre_version.c4
-rw-r--r--ext/pcre/pcrelib/pcre_xclass.c4
-rw-r--r--ext/pcre/pcrelib/pcredemo.c21
-rw-r--r--ext/pcre/pcrelib/pcregrep.c300
-rw-r--r--ext/pcre/pcrelib/pcreposix.c11
-rw-r--r--ext/pcre/pcrelib/pcreposix.h2
-rw-r--r--ext/pcre/pcrelib/testdata/grepoutput17
-rw-r--r--ext/pcre/pcrelib/testdata/testinput116
-rw-r--r--ext/pcre/pcrelib/testdata/testinput2161
-rw-r--r--ext/pcre/pcrelib/testdata/testinput474
-rw-r--r--ext/pcre/pcrelib/testdata/testinput552
-rw-r--r--ext/pcre/pcrelib/testdata/testinput675
-rw-r--r--ext/pcre/pcrelib/testdata/testinput765
-rw-r--r--ext/pcre/pcrelib/testdata/testinput844
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput124
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput2377
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput4133
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput5108
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput6157
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput7134
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput888
-rw-r--r--ext/pcre/pcrelib/ucptable.h50
-rw-r--r--ext/pcre/php_pcre.c12
-rw-r--r--ext/pcre/php_pcre.h4
-rw-r--r--ext/pcre/tests/bug42945.phpt88
-rw-r--r--ext/pcre/tests/bug44191.phpt16
-rw-r--r--ext/pcre/tests/preg_grep_basic.phpt62
-rw-r--r--ext/pcre/tests/preg_grep_error.phpt43
-rw-r--r--ext/pcre/tests/preg_grep_error1.phpt68
-rw-r--r--ext/pcre/tests/preg_grep_error2.phpt42
-rw-r--r--ext/pcre/tests/preg_match_all_basic.phpt82
-rw-r--r--ext/pcre/tests/preg_match_all_error.phpt45
-rw-r--r--ext/pcre/tests/preg_match_all_error1.phpt81
-rw-r--r--ext/pcre/tests/preg_match_all_error2.phpt54
-rw-r--r--ext/pcre/tests/preg_match_all_error3.phpt20
-rw-r--r--ext/pcre/tests/preg_match_basic.phpt52
-rw-r--r--ext/pcre/tests/preg_match_error.phpt44
-rw-r--r--ext/pcre/tests/preg_match_error1.phpt61
-rw-r--r--ext/pcre/tests/preg_match_error2.phpt38
-rw-r--r--ext/pcre/tests/preg_quote_basic.phpt25
-rw-r--r--ext/pcre/tests/preg_quote_error.phpt33
-rw-r--r--ext/pcre/tests/preg_quote_error1.phpt36
-rw-r--r--ext/pcre/tests/preg_replace_basic.phpt25
-rw-r--r--ext/pcre/tests/preg_replace_callback_basic.phpt33
-rw-r--r--ext/pcre/tests/preg_replace_callback_error.phpt48
-rw-r--r--ext/pcre/tests/preg_replace_error.phpt45
-rw-r--r--ext/pcre/tests/preg_replace_error1.phpt59
-rw-r--r--ext/pcre/tests/preg_replace_error2.phpt37
-rw-r--r--ext/pcre/tests/preg_replace_variation1.phpt17
-rw-r--r--ext/pcre/tests/preg_split_basic.phpt76
-rw-r--r--ext/pcre/tests/preg_split_error.phpt44
-rw-r--r--ext/pcre/tests/preg_split_error1.phpt67
-rw-r--r--ext/pcre/tests/preg_split_error2.phpt34
-rw-r--r--ext/pcre/upgrade-pcre.php6
-rwxr-xr-xext/pdo/pdo.c4
-rwxr-xr-xext/pdo/pdo_dbh.c38
-rw-r--r--ext/pdo/pdo_sql_parser.c8
-rw-r--r--ext/pdo/pdo_sql_parser.c.orig22
-rw-r--r--ext/pdo/pdo_sql_parser.re6
-rw-r--r--ext/pdo/pdo_sqlstate.c4
-rwxr-xr-xext/pdo/pdo_stmt.c31
-rwxr-xr-xext/pdo/php_pdo.h4
-rwxr-xr-xext/pdo/php_pdo_driver.h6
-rwxr-xr-xext/pdo/php_pdo_int.h4
-rw-r--r--ext/pdo/tests/bug_43130.phpt8
-rw-r--r--ext/pdo/tests/bug_43663.phpt22
-rw-r--r--ext/pdo/tests/bug_44159.phpt37
-rw-r--r--ext/pdo_dblib/dblib_driver.c4
-rw-r--r--ext/pdo_dblib/dblib_stmt.c4
-rw-r--r--ext/pdo_dblib/pdo_dblib.c4
-rw-r--r--ext/pdo_dblib/php_pdo_dblib.h4
-rw-r--r--ext/pdo_dblib/php_pdo_dblib_int.h4
-rw-r--r--ext/pdo_firebird/firebird_driver.c4
-rw-r--r--ext/pdo_firebird/firebird_statement.c4
-rw-r--r--ext/pdo_firebird/pdo_firebird.c4
-rw-r--r--ext/pdo_firebird/php_pdo_firebird.h4
-rw-r--r--ext/pdo_firebird/php_pdo_firebird_int.h4
-rwxr-xr-xext/pdo_mysql/mysql_driver.c4
-rwxr-xr-xext/pdo_mysql/mysql_statement.c4
-rwxr-xr-xext/pdo_mysql/pdo_mysql.c4
-rwxr-xr-xext/pdo_mysql/php_pdo_mysql.h4
-rwxr-xr-xext/pdo_mysql/php_pdo_mysql_int.h4
-rwxr-xr-xext/pdo_oci/oci_driver.c9
-rwxr-xr-xext/pdo_oci/oci_statement.c4
-rwxr-xr-xext/pdo_oci/pdo_oci.c4
-rwxr-xr-xext/pdo_oci/php_pdo_oci.h4
-rwxr-xr-xext/pdo_oci/php_pdo_oci_int.h4
-rwxr-xr-xext/pdo_odbc/odbc_driver.c4
-rwxr-xr-xext/pdo_odbc/odbc_stmt.c4
-rwxr-xr-xext/pdo_odbc/pdo_odbc.c4
-rw-r--r--ext/pdo_odbc/php_pdo_odbc.h4
-rwxr-xr-xext/pdo_odbc/php_pdo_odbc_int.h4
-rw-r--r--ext/pdo_pgsql/pdo_pgsql.c6
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c12
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c14
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql.h4
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql_int.h4
-rw-r--r--ext/pdo_pgsql/tests/bug36727.phpt5
-rw-r--r--ext/pdo_sqlite/pdo_sqlite.c6
-rw-r--r--ext/pdo_sqlite/php_pdo_sqlite.h4
-rw-r--r--ext/pdo_sqlite/php_pdo_sqlite_int.h4
-rw-r--r--ext/pdo_sqlite/sqlite/VERSION2
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c4
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c4
-rw-r--r--ext/pgsql/pgsql.c8
-rw-r--r--ext/pgsql/php_pgsql.h4
-rw-r--r--ext/posix/php_posix.h4
-rw-r--r--ext/posix/posix.c12
-rw-r--r--ext/posix/tests/posix_get_last_error_error.phpt31
-rw-r--r--ext/posix/tests/posix_getgid_error.phpt31
-rw-r--r--ext/posix/tests/posix_getgrgid_error.phpt53
-rw-r--r--ext/posix/tests/posix_getgrgid_variation.phpt175
-rw-r--r--ext/posix/tests/posix_getpgid_error.phpt48
-rw-r--r--ext/posix/tests/posix_getpgid_variation.phpt175
-rw-r--r--ext/posix/tests/posix_getpgrp_error.phpt31
-rw-r--r--ext/posix/tests/posix_getpid_error.phpt31
-rw-r--r--ext/posix/tests/posix_getppid_error.phpt31
-rw-r--r--ext/posix/tests/posix_getpwuid_error.phpt46
-rw-r--r--ext/posix/tests/posix_getpwuid_variation.phpt175
-rw-r--r--ext/posix/tests/posix_getuid_error.phpt31
-rw-r--r--ext/posix/tests/posix_kill_error.phpt59
-rw-r--r--ext/posix/tests/posix_kill_variation1.phpt173
-rw-r--r--ext/posix/tests/posix_kill_variation2.phpt173
-rw-r--r--ext/posix/tests/posix_strerror_error.phpt46
-rw-r--r--ext/posix/tests/posix_strerror_variation1.phpt172
-rw-r--r--ext/posix/tests/posix_times_error.phpt31
-rw-r--r--ext/posix/tests/posix_uname_error.phpt31
-rw-r--r--ext/pspell/php_pspell.h4
-rw-r--r--ext/pspell/pspell.c4
-rw-r--r--ext/readline/php_readline.h4
-rw-r--r--ext/readline/readline.c4
-rw-r--r--ext/recode/php_recode.h4
-rw-r--r--ext/recode/recode.c6
-rw-r--r--ext/reflection/php_reflection.c19
-rw-r--r--ext/reflection/php_reflection.h4
-rw-r--r--ext/reflection/tests/ReflectionMethod_basic1.phpt300
-rw-r--r--ext/reflection/tests/ReflectionMethod_basic2.phpt188
-rw-r--r--ext/reflection/tests/ReflectionMethod_basic3.phpt169
-rw-r--r--ext/reflection/tests/ReflectionMethod_basic4.phpt172
-rw-r--r--ext/reflection/tests/ReflectionMethod_constructor_basic.phpt121
-rw-r--r--ext/reflection/tests/ReflectionMethod_getDeclaringClass_basic.phpt32
-rw-r--r--ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt115
-rw-r--r--ext/reflection/tests/ReflectionMethod_getDocComment_error.phpt19
-rw-r--r--ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt244
-rw-r--r--ext/reflection/tests/ReflectionMethod_getStaticVariables_basic.phpt65
-rw-r--r--ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt75
-rw-r--r--ext/reflection/tests/ReflectionMethod_invokeArgs_error1.phpt38
-rw-r--r--ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt29
-rw-r--r--ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt119
-rw-r--r--ext/reflection/tests/ReflectionMethod_invoke_basic.phpt110
-rw-r--r--ext/reflection/tests/ReflectionMethod_invoke_error1.phpt73
-rw-r--r--ext/reflection/tests/ReflectionMethod_invoke_error2.phpt34
-rw-r--r--ext/reflection/tests/ReflectionMethod_returnsReference_basic.phpt25
-rw-r--r--ext/reflection/tests/reflectionProperty_basic1.phpt162
-rw-r--r--ext/reflection/tests/reflectionProperty_basic2.phpt105
-rw-r--r--ext/reflection/tests/reflectionProperty_constructor_error.phpt46
-rw-r--r--ext/reflection/tests/reflectionProperty_error.phpt70
-rw-r--r--ext/reflection/tests/reflectionProperty_export_basic.phpt18
-rw-r--r--ext/reflection/tests/reflectionProperty_export_error.phpt56
-rw-r--r--ext/reflection/tests/reflectionProperty_getDeclaringClass_variation1.phpt29
-rw-r--r--ext/reflection/tests/reflectionProperty_getDocComment_basic.phpt102
-rw-r--r--ext/reflection/tests/reflectionProperty_getDocComment_error.phpt31
-rw-r--r--ext/reflection/tests/reflectionProperty_getModifiers_basic.phpt48
-rw-r--r--ext/reflection/tests/reflectionProperty_getValue_error.phpt83
-rw-r--r--ext/reflection/tests/reflectionProperty_isDefault_basic.phpt65
-rw-r--r--ext/reflection/tests/reflectionProperty_setValue_error.phpt102
-rw-r--r--ext/session/mod_files.c4
-rw-r--r--ext/session/mod_files.h4
-rw-r--r--ext/session/mod_mm.c4
-rw-r--r--ext/session/mod_mm.h4
-rw-r--r--ext/session/mod_user.c4
-rw-r--r--ext/session/mod_user.h4
-rw-r--r--ext/session/php_session.h4
-rw-r--r--ext/session/session.c251
-rw-r--r--ext/session/tests/023.phpt46
-rw-r--r--ext/session/tests/024.phpt114
-rw-r--r--ext/session/tests/025.phpt159
-rw-r--r--ext/session/tests/026.phpt71
-rw-r--r--ext/session/tests/027.phpt55
-rw-r--r--ext/session/tests/028.phpt16
-rw-r--r--ext/session/tests/029.phpt17
-rw-r--r--ext/session/tests/030.phpt24
-rw-r--r--ext/session/tests/save_handler.inc63
-rw-r--r--ext/session/tests/session_cache_expire_basic.phpt39
-rw-r--r--ext/session/tests/session_cache_expire_error.phpt170
-rw-r--r--ext/session/tests/session_cache_expire_variation1.phpt41
-rw-r--r--ext/session/tests/session_cache_expire_variation2.phpt41
-rw-r--r--ext/session/tests/session_cache_expire_variation3.phpt47
-rw-r--r--ext/session/tests/session_cache_limiter_basic.phpt68
-rw-r--r--ext/session/tests/session_cache_limiter_error.phpt170
-rw-r--r--ext/session/tests/session_cache_limiter_variation1.phpt41
-rw-r--r--ext/session/tests/session_cache_limiter_variation2.phpt40
-rw-r--r--ext/session/tests/session_cache_limiter_variation3.phpt39
-rw-r--r--ext/session/tests/session_commit_basic.phpt45
-rw-r--r--ext/session/tests/session_commit_error.phpt170
-rw-r--r--ext/session/tests/session_commit_variation1.phpt41
-rw-r--r--ext/session/tests/session_commit_variation2.phpt59
-rw-r--r--ext/session/tests/session_commit_variation3.phpt39
-rw-r--r--ext/session/tests/session_commit_variation4.phpt55
-rw-r--r--ext/session/tests/session_decode_basic.phpt273
-rw-r--r--ext/session/tests/session_decode_error.phpt222
-rw-r--r--ext/session/tests/session_decode_error2.phpt615
-rw-r--r--ext/session/tests/session_decode_variation1.phpt189
-rw-r--r--ext/session/tests/session_decode_variation2.phpt78
-rw-r--r--ext/session/tests/session_decode_variation3.phpt62
-rw-r--r--ext/session/tests/session_decode_variation4.phpt56
-rw-r--r--ext/session/tests/session_destroy_error.phpt218
-rw-r--r--ext/session/tests/session_destroy_variation1.phpt45
-rw-r--r--ext/session/tests/session_destroy_variation2.phpt45
-rw-r--r--ext/session/tests/session_destroy_variation3.phpt41
-rw-r--r--ext/session/tests/session_encode_basic.phpt174
-rw-r--r--ext/session/tests/session_encode_error.phpt220
-rw-r--r--ext/session/tests/session_encode_error2.phpt251
-rw-r--r--ext/session/tests/session_encode_variation1.phpt47
-rw-r--r--ext/session/tests/session_encode_variation2.phpt35
-rw-r--r--ext/session/tests/session_encode_variation3.phpt34
-rw-r--r--ext/session/tests/session_encode_variation4.phpt36
-rw-r--r--ext/session/tests/session_encode_variation5.phpt36
-rw-r--r--ext/session/tests/session_encode_variation6.phpt52
-rw-r--r--ext/session/tests/session_encode_variation7.phpt35
-rw-r--r--ext/session/tests/session_encode_variation8.phpt39
-rw-r--r--ext/session/tests/session_get_cookie_params_basic.phpt68
-rw-r--r--ext/session/tests/session_get_cookie_params_error.phpt217
-rw-r--r--ext/session/tests/session_get_cookie_params_variation1.phpt108
-rw-r--r--ext/session/tests/session_id_basic.phpt43
-rw-r--r--ext/session/tests/session_id_error.phpt170
-rw-r--r--ext/session/tests/session_id_error2.phpt41
-rw-r--r--ext/session/tests/session_id_error3.phpt79
-rw-r--r--ext/session/tests/session_id_error4.phpt33
-rw-r--r--ext/session/tests/session_id_variation1.phpt46
-rw-r--r--ext/session/tests/session_id_variation2.phpt57
-rw-r--r--ext/session/tests/session_is_registered_basic.phpt269
-rw-r--r--ext/session/tests/session_is_registered_variation1.phpt108
-rw-r--r--ext/session/tests/session_is_registered_variation2.phpt60
-rw-r--r--ext/session/tests/session_is_registered_variation3.phpt59
-rw-r--r--ext/session/tests/session_module_name_basic.phpt35
-rw-r--r--ext/session/tests/session_module_name_error.phpt216
-rw-r--r--ext/session/tests/session_module_name_variation1.phpt35
-rw-r--r--ext/session/tests/session_module_name_variation2.phpt34
-rw-r--r--ext/session/tests/session_module_name_variation3.phpt49
-rw-r--r--ext/session/tests/session_module_name_variation4.phpt67
-rw-r--r--ext/session/tests/session_name_basic.phpt40
-rw-r--r--ext/session/tests/session_name_error.phpt172
-rw-r--r--ext/session/tests/session_name_variation1.phpt60
-rw-r--r--ext/session/tests/session_name_variation2.phpt39
-rw-r--r--ext/session/tests/session_regenerate_id_basic.phpt43
-rw-r--r--ext/session/tests/session_regenerate_id_error.phpt174
-rw-r--r--ext/session/tests/session_regenerate_id_variation1.phpt43
-rw-r--r--ext/session/tests/session_register_basic.phpt317
-rw-r--r--ext/session/tests/session_register_variation1.phpt158
-rw-r--r--ext/session/tests/session_register_variation2.phpt40
-rw-r--r--ext/session/tests/session_register_variation3.phpt45
-rw-r--r--ext/session/tests/session_register_variation4.phpt46
-rw-r--r--ext/session/tests/session_save_path_basic.phpt36
-rw-r--r--ext/session/tests/session_save_path_error.phpt176
-rw-r--r--ext/session/tests/session_save_path_variation1.phpt44
-rw-r--r--ext/session/tests/session_save_path_variation2.phpt40
-rw-r--r--ext/session/tests/session_save_path_variation3.phpt40
-rw-r--r--ext/session/tests/session_save_path_variation4.phpt63
-rw-r--r--ext/session/tests/session_save_path_variation5.phpt65
-rw-r--r--ext/session/tests/session_set_cookie_params_basic.phpt35
-rw-r--r--ext/session/tests/session_set_cookie_params_error.phpt298
-rw-r--r--ext/session/tests/session_set_cookie_params_variation1.phpt49
-rw-r--r--ext/session/tests/session_set_cookie_params_variation2.phpt49
-rw-r--r--ext/session/tests/session_set_cookie_params_variation3.phpt49
-rw-r--r--ext/session/tests/session_set_cookie_params_variation4.phpt49
-rw-r--r--ext/session/tests/session_set_cookie_params_variation5.phpt49
-rw-r--r--ext/session/tests/session_set_save_handler_basic.phpt95
-rw-r--r--ext/session/tests/session_set_save_handler_error.phpt218
-rw-r--r--ext/session/tests/session_set_save_handler_error2.phpt62
-rw-r--r--ext/session/tests/session_set_save_handler_error3.phpt43
-rw-r--r--ext/session/tests/session_set_save_handler_error4.phpt42
-rw-r--r--ext/session/tests/session_set_save_handler_variation1.phpt40
-rw-r--r--ext/session/tests/session_set_save_handler_variation2.phpt33
-rw-r--r--ext/session/tests/session_set_save_handler_variation3.phpt33
-rw-r--r--ext/session/tests/session_set_save_handler_variation4.phpt83
-rw-r--r--ext/session/tests/session_start_error.phpt195
-rw-r--r--ext/session/tests/session_start_variation1.phpt44
-rw-r--r--ext/session/tests/session_start_variation2.phpt45
-rw-r--r--ext/session/tests/session_start_variation3.phpt49
-rw-r--r--ext/session/tests/session_start_variation4.phpt37
-rw-r--r--ext/session/tests/session_start_variation5.phpt58
-rw-r--r--ext/session/tests/session_start_variation6.phpt69
-rw-r--r--ext/session/tests/session_start_variation7.phpt61
-rw-r--r--ext/session/tests/session_start_variation8.phpt35
-rw-r--r--ext/session/tests/session_start_variation9.phpt39
-rw-r--r--ext/session/tests/session_unregister_basic.phpt176
-rw-r--r--ext/session/tests/session_unregister_variation1.phpt158
-rw-r--r--ext/session/tests/session_unregister_variation2.phpt46
-rw-r--r--ext/session/tests/session_unregister_variation3.phpt47
-rw-r--r--ext/session/tests/session_unset_basic.phpt43
-rw-r--r--ext/session/tests/session_unset_error.phpt170
-rw-r--r--ext/session/tests/session_unset_variation1.phpt48
-rw-r--r--ext/session/tests/session_write_close_basic.phpt45
-rw-r--r--ext/session/tests/session_write_close_error.phpt170
-rw-r--r--ext/session/tests/session_write_close_variation1.phpt41
-rw-r--r--ext/session/tests/session_write_close_variation2.phpt59
-rw-r--r--ext/session/tests/session_write_close_variation3.phpt39
-rw-r--r--ext/session/tests/session_write_close_variation4.phpt55
-rw-r--r--ext/shmop/php_shmop.h2
-rw-r--r--ext/shmop/shmop.c4
-rw-r--r--ext/simplexml/php_simplexml.h4
-rwxr-xr-xext/simplexml/php_simplexml_exports.h4
-rw-r--r--ext/simplexml/simplexml.c31
-rw-r--r--ext/simplexml/tests/bug42369.phpt25
-rw-r--r--ext/simplexml/tests/bug43221.phpt15
-rw-r--r--ext/simplexml/tests/bug44478.phpt24
-rw-r--r--ext/snmp/php_snmp.h4
-rw-r--r--ext/snmp/snmp.c4
-rw-r--r--ext/soap/php_encoding.c4
-rw-r--r--ext/soap/php_encoding.h4
-rw-r--r--ext/soap/php_http.c6
-rw-r--r--ext/soap/php_http.h4
-rw-r--r--ext/soap/php_packet_soap.c4
-rw-r--r--ext/soap/php_packet_soap.h4
-rw-r--r--ext/soap/php_schema.c4
-rw-r--r--ext/soap/php_schema.h4
-rw-r--r--ext/soap/php_sdl.c4
-rw-r--r--ext/soap/php_sdl.h4
-rw-r--r--ext/soap/php_soap.h8
-rw-r--r--ext/soap/php_xml.c4
-rw-r--r--ext/soap/php_xml.h4
-rw-r--r--ext/soap/soap.c64
-rwxr-xr-xext/soap/tests/any.phpt1
-rw-r--r--ext/soap/tests/bugs/bug27722.phpt2
-rw-r--r--ext/soap/tests/bugs/bug27742.phpt2
-rw-r--r--ext/soap/tests/bugs/bug28985.phpt2
-rw-r--r--ext/soap/tests/bugs/bug29061.phpt2
-rw-r--r--ext/soap/tests/bugs/bug29109.phpt2
-rw-r--r--ext/soap/tests/bugs/bug29236.phpt2
-rw-r--r--ext/soap/tests/bugs/bug29795.phpt2
-rw-r--r--ext/soap/tests/bugs/bug29839.phpt2
-rw-r--r--ext/soap/tests/bugs/bug29844.phpt2
-rw-r--r--ext/soap/tests/bugs/bug30045.phpt2
-rw-r--r--ext/soap/tests/bugs/bug32776.phpt2
-rwxr-xr-xext/soap/tests/bugs/bug34453.phpt2
-rwxr-xr-xext/soap/tests/bugs/bug35273.phpt2
-rwxr-xr-xext/soap/tests/bugs/bug37083.phpt2
-rwxr-xr-xext/soap/tests/bugs/bug38004.phpt2
-rwxr-xr-xext/soap/tests/bugs/bug38005.phpt2
-rwxr-xr-xext/soap/tests/bugs/bug38055.phpt2
-rwxr-xr-xext/soap/tests/bugs/bug38067.phpt2
-rwxr-xr-xext/soap/tests/bugs/bug39815.phpt1
-rwxr-xr-xext/soap/tests/bugs/bug42692.phpt37
-rwxr-xr-xext/soap/tests/bugs/bug42692.wsdl40
-rw-r--r--ext/soap/tests/classmap001.phpt2
-rw-r--r--ext/soap/tests/classmap002.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/round2_base.inc1
-rw-r--r--ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/GroupB/round2_groupB.inc1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt1
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_003w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phptbin1072 -> 1099 bytes
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt1
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt2
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt1
-rw-r--r--ext/soap/tests/server011.phpt2
-rw-r--r--ext/soap/tests/server021.phpt2
-rwxr-xr-xext/soap/tests/server025.phpt2
-rw-r--r--ext/soap/tests/soap12/soap12-test.inc1
-rwxr-xr-xext/soap/tests/typemap001.phpt2
-rwxr-xr-xext/soap/tests/typemap002.phpt2
-rwxr-xr-xext/soap/tests/typemap003.phpt2
-rwxr-xr-xext/soap/tests/typemap004.phpt2
-rwxr-xr-xext/soap/tests/typemap005.phpt2
-rwxr-xr-xext/soap/tests/typemap006.phpt2
-rwxr-xr-xext/soap/tests/typemap007.phpt2
-rwxr-xr-xext/soap/tests/typemap008.phpt2
-rwxr-xr-xext/soap/tests/typemap009.phpt2
-rwxr-xr-xext/soap/tests/typemap010.phpt2
-rwxr-xr-xext/soap/tests/typemap011.phpt2
-rwxr-xr-xext/soap/tests/typemap012.phpt2
-rwxr-xr-xext/soap/tests/typemap013.phpt2
-rw-r--r--ext/sockets/php_sockets.h4
-rw-r--r--ext/sockets/php_sockets_win.c4
-rw-r--r--ext/sockets/php_sockets_win.h4
-rw-r--r--ext/sockets/sockets.c16
-rw-r--r--ext/sockets/unix_socket_constants.h4
-rw-r--r--ext/sockets/win32_socket_constants.h4
-rwxr-xr-xext/spl/examples/findfile.inc2
-rwxr-xr-xext/spl/examples/tree.php2
-rwxr-xr-xext/spl/internal/splobjectstorage.inc4
-rwxr-xr-xext/spl/php_spl.c4
-rwxr-xr-xext/spl/php_spl.h2
-rwxr-xr-xext/spl/spl.php334
-rwxr-xr-xext/spl/spl_array.c4
-rwxr-xr-xext/spl/spl_array.h4
-rwxr-xr-xext/spl/spl_directory.c54
-rwxr-xr-xext/spl/spl_directory.h14
-rwxr-xr-xext/spl/spl_engine.c2
-rwxr-xr-xext/spl/spl_engine.h4
-rwxr-xr-xext/spl/spl_exceptions.c4
-rwxr-xr-xext/spl/spl_exceptions.h4
-rwxr-xr-xext/spl/spl_functions.c4
-rwxr-xr-xext/spl/spl_functions.h4
-rwxr-xr-xext/spl/spl_iterators.c13
-rwxr-xr-xext/spl/spl_iterators.h8
-rwxr-xr-xext/spl/spl_observer.c4
-rwxr-xr-xext/spl/spl_observer.h4
-rwxr-xr-xext/spl/spl_sxe.c4
-rwxr-xr-xext/spl/spl_sxe.h4
-rw-r--r--ext/spl/tests/bug41828.phpt21
-rwxr-xr-xext/spl/tests/dit_002.phpt50
-rw-r--r--ext/sqlite/pdo_sqlite2.c4
-rw-r--r--ext/sqlite/php_sqlite.h4
-rw-r--r--ext/sqlite/sess_sqlite.c4
-rw-r--r--ext/sqlite/sqlite.c6
-rw-r--r--ext/standard/array.c186
-rw-r--r--ext/standard/assert.c4
-rw-r--r--ext/standard/base64.c4
-rw-r--r--ext/standard/base64.h4
-rw-r--r--ext/standard/basic_functions.c60
-rw-r--r--ext/standard/basic_functions.h4
-rw-r--r--ext/standard/browscap.c4
-rw-r--r--ext/standard/crc32.c4
-rw-r--r--ext/standard/crc32.h4
-rw-r--r--ext/standard/credits.c8
-rw-r--r--ext/standard/credits.h4
-rw-r--r--ext/standard/credits_ext.h2
-rw-r--r--ext/standard/crypt.c4
-rw-r--r--ext/standard/css.c4
-rw-r--r--ext/standard/css.h4
-rw-r--r--ext/standard/cyr_convert.c4
-rw-r--r--ext/standard/cyr_convert.h4
-rw-r--r--ext/standard/datetime.c4
-rw-r--r--ext/standard/datetime.h4
-rw-r--r--ext/standard/dir.c14
-rw-r--r--ext/standard/dl.c4
-rw-r--r--ext/standard/dl.h4
-rw-r--r--ext/standard/dns.c4
-rw-r--r--ext/standard/dns.h4
-rw-r--r--ext/standard/exec.c68
-rw-r--r--ext/standard/exec.h4
-rw-r--r--ext/standard/file.c19
-rw-r--r--ext/standard/file.h4
-rw-r--r--ext/standard/filestat.c4
-rw-r--r--ext/standard/filters.c4
-rw-r--r--ext/standard/flock_compat.c4
-rw-r--r--ext/standard/flock_compat.h4
-rw-r--r--ext/standard/formatted_print.c15
-rw-r--r--ext/standard/fsock.c4
-rw-r--r--ext/standard/fsock.h4
-rw-r--r--ext/standard/ftok.c4
-rw-r--r--ext/standard/ftp_fopen_wrapper.c14
-rw-r--r--ext/standard/head.c4
-rw-r--r--ext/standard/head.h4
-rw-r--r--ext/standard/html.c7
-rw-r--r--ext/standard/html.h4
-rw-r--r--ext/standard/http.c12
-rw-r--r--ext/standard/http_fopen_wrapper.c32
-rw-r--r--ext/standard/image.c4
-rw-r--r--ext/standard/incomplete_class.c4
-rw-r--r--ext/standard/info.c31
-rw-r--r--ext/standard/info.h4
-rw-r--r--ext/standard/iptc.c4
-rw-r--r--ext/standard/lcg.c4
-rw-r--r--ext/standard/levenshtein.c4
-rw-r--r--ext/standard/link.c4
-rw-r--r--ext/standard/mail.c4
-rw-r--r--ext/standard/math.c15
-rw-r--r--ext/standard/md5.c4
-rw-r--r--ext/standard/md5.h4
-rw-r--r--ext/standard/metaphone.c13
-rw-r--r--ext/standard/microtime.c4
-rw-r--r--ext/standard/microtime.h4
-rw-r--r--ext/standard/pack.c4
-rw-r--r--ext/standard/pack.h4
-rw-r--r--ext/standard/pageinfo.c4
-rw-r--r--ext/standard/pageinfo.h4
-rw-r--r--ext/standard/php_array.h4
-rw-r--r--ext/standard/php_assert.h4
-rw-r--r--ext/standard/php_browscap.h4
-rw-r--r--ext/standard/php_crypt.h4
-rw-r--r--ext/standard/php_dir.h4
-rw-r--r--ext/standard/php_ext_syslog.h4
-rw-r--r--ext/standard/php_filestat.h4
-rw-r--r--ext/standard/php_fopen_wrapper.c4
-rw-r--r--ext/standard/php_fopen_wrappers.h4
-rw-r--r--ext/standard/php_ftok.h4
-rw-r--r--ext/standard/php_http.h4
-rw-r--r--ext/standard/php_image.h4
-rw-r--r--ext/standard/php_incomplete_class.h4
-rw-r--r--ext/standard/php_iptc.h4
-rw-r--r--ext/standard/php_lcg.h4
-rw-r--r--ext/standard/php_link.h4
-rw-r--r--ext/standard/php_mail.h4
-rw-r--r--ext/standard/php_math.h4
-rw-r--r--ext/standard/php_metaphone.h4
-rw-r--r--ext/standard/php_rand.h8
-rw-r--r--ext/standard/php_smart_str.h4
-rw-r--r--ext/standard/php_smart_str_public.h4
-rw-r--r--ext/standard/php_standard.h4
-rw-r--r--ext/standard/php_string.h4
-rw-r--r--ext/standard/php_type.h4
-rw-r--r--ext/standard/php_uuencode.h4
-rw-r--r--ext/standard/php_var.h4
-rw-r--r--ext/standard/php_versioning.h4
-rw-r--r--ext/standard/proc_open.c6
-rw-r--r--ext/standard/proc_open.h4
-rw-r--r--ext/standard/quot_print.c4
-rw-r--r--ext/standard/quot_print.h4
-rw-r--r--ext/standard/rand.c4
-rw-r--r--ext/standard/reg.c8
-rw-r--r--ext/standard/reg.h4
-rw-r--r--ext/standard/scanf.c4
-rw-r--r--ext/standard/scanf.h4
-rw-r--r--ext/standard/sha1.c4
-rw-r--r--ext/standard/sha1.h4
-rw-r--r--ext/standard/soundex.c4
-rw-r--r--ext/standard/streamsfuncs.c9
-rw-r--r--ext/standard/streamsfuncs.h4
-rw-r--r--ext/standard/string.c183
-rw-r--r--ext/standard/syslog.c6
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation1.phpt224
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation2.phpt318
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation3.phpt197
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation4.phpt138
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation5.phpt46
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation6.phpt72
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation7.phpt91
-rw-r--r--ext/standard/tests/array/array_change_key_case_variation8.phpt128
-rw-r--r--ext/standard/tests/array/array_chunk_basic1.phpt138
-rw-r--r--ext/standard/tests/array/array_chunk_basic2.phpt222
-rw-r--r--ext/standard/tests/array/array_chunk_error.phpt46
-rw-r--r--ext/standard/tests/array/array_chunk_variation1.phpt325
-rw-r--r--ext/standard/tests/array/array_chunk_variation2.phpt427
-rw-r--r--ext/standard/tests/array/array_chunk_variation3.phpt268
-rw-r--r--ext/standard/tests/array/array_chunk_variation4.phpt120
-rw-r--r--ext/standard/tests/array/array_chunk_variation5.phpt148
-rw-r--r--ext/standard/tests/array/array_chunk_variation6.phpt135
-rw-r--r--ext/standard/tests/array/array_chunk_variation7.phpt89
-rw-r--r--ext/standard/tests/array/array_combine_basic.phpt52
-rw-r--r--ext/standard/tests/array/array_combine_error1.phpt48
-rw-r--r--ext/standard/tests/array/array_combine_error2.phpt53
-rw-r--r--ext/standard/tests/array/array_combine_variation1.phpt198
-rw-r--r--ext/standard/tests/array/array_combine_variation2.phpt198
-rw-r--r--ext/standard/tests/array/array_combine_variation3.phpt279
-rw-r--r--ext/standard/tests/array/array_combine_variation4.phpt192
-rw-r--r--ext/standard/tests/array/array_combine_variation5.phpt186
-rw-r--r--ext/standard/tests/array/array_combine_variation6.phpt53
-rw-r--r--ext/standard/tests/array/array_diff_assoc_basic.phpt90
-rw-r--r--ext/standard/tests/array/array_diff_assoc_error.phpt41
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation1.phpt234
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation10.phpt50
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation2.phpt235
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation3.phpt206
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation4.phpt177
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation5.phpt148
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation6.phpt196
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation7.phpt101
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation8.phpt49
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation9.phpt141
-rw-r--r--ext/standard/tests/array/array_diff_basic.phpt116
-rw-r--r--ext/standard/tests/array/array_diff_error.phpt40
-rw-r--r--ext/standard/tests/array/array_diff_key_basic.phpt19
-rw-r--r--ext/standard/tests/array/array_diff_key_variation1.phpt89
-rw-r--r--ext/standard/tests/array/array_diff_uassoc_basic.phpt28
-rw-r--r--ext/standard/tests/array/array_diff_ukey_basic.phpt24
-rw-r--r--ext/standard/tests/array/array_diff_variation1.phpt208
-rw-r--r--ext/standard/tests/array/array_diff_variation10.phpt44
-rw-r--r--ext/standard/tests/array/array_diff_variation2.phpt207
-rw-r--r--ext/standard/tests/array/array_diff_variation3.phpt190
-rw-r--r--ext/standard/tests/array/array_diff_variation4.phpt184
-rw-r--r--ext/standard/tests/array/array_diff_variation5.phpt119
-rw-r--r--ext/standard/tests/array/array_diff_variation6.phpt46
-rw-r--r--ext/standard/tests/array/array_diff_variation7.phpt95
-rw-r--r--ext/standard/tests/array/array_diff_variation8.phpt207
-rw-r--r--ext/standard/tests/array/array_diff_variation9.phpt100
-rw-r--r--ext/standard/tests/array/array_intersect_key_basic.phpt19
-rw-r--r--ext/standard/tests/array/array_intersect_uassoc_basic.phpt24
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_basic.phpt24
-rw-r--r--ext/standard/tests/array/array_key_exists_basic.phpt29
-rw-r--r--ext/standard/tests/array/array_key_exists_error.phpt44
-rw-r--r--ext/standard/tests/array/array_key_exists_object1.phpt80
-rw-r--r--ext/standard/tests/array/array_key_exists_object2.phpt84
-rw-r--r--ext/standard/tests/array/array_key_exists_variation1.phpt203
-rw-r--r--ext/standard/tests/array/array_key_exists_variation2.phpt225
-rw-r--r--ext/standard/tests/array/array_key_exists_variation3.phpt60
-rw-r--r--ext/standard/tests/array/array_key_exists_variation4.phpt46
-rw-r--r--ext/standard/tests/array/array_key_exists_variation5.phpt39
-rw-r--r--ext/standard/tests/array/array_key_exists_variation6.phpt96
-rw-r--r--ext/standard/tests/array/array_key_exists_variation7.phpt36
-rw-r--r--ext/standard/tests/array/array_key_exists_variation8.phpt547
-rw-r--r--ext/standard/tests/array/array_map.phpt423
-rw-r--r--ext/standard/tests/array/array_map_basic.phpt70
-rw-r--r--ext/standard/tests/array/array_map_error.phpt73
-rw-r--r--ext/standard/tests/array/array_map_object1.phpt200
-rw-r--r--ext/standard/tests/array/array_map_object2.phpt46
-rw-r--r--ext/standard/tests/array/array_map_object3.phpt91
-rw-r--r--ext/standard/tests/array/array_map_variation1.phpt56
-rw-r--r--ext/standard/tests/array/array_map_variation10.phpt120
-rw-r--r--ext/standard/tests/array/array_map_variation11.phpt52
-rw-r--r--ext/standard/tests/array/array_map_variation12.phpt60
-rw-r--r--ext/standard/tests/array/array_map_variation13.phpt107
-rw-r--r--ext/standard/tests/array/array_map_variation14.phpt125
-rw-r--r--ext/standard/tests/array/array_map_variation15.phpt30
-rw-r--r--ext/standard/tests/array/array_map_variation16.phpt73
-rw-r--r--ext/standard/tests/array/array_map_variation17.phpt158
-rw-r--r--ext/standard/tests/array/array_map_variation18.phpt205
-rw-r--r--ext/standard/tests/array/array_map_variation2.phpt276
-rw-r--r--ext/standard/tests/array/array_map_variation3.phpt227
-rw-r--r--ext/standard/tests/array/array_map_variation4.phpt179
-rw-r--r--ext/standard/tests/array/array_map_variation5.phpt181
-rw-r--r--ext/standard/tests/array/array_map_variation6.phpt72
-rw-r--r--ext/standard/tests/array/array_map_variation7.phpt122
-rw-r--r--ext/standard/tests/array/array_map_variation8.phpt81
-rw-r--r--ext/standard/tests/array/array_map_variation9.phpt88
-rw-r--r--ext/standard/tests/array/array_merge_basic.phpt58
-rw-r--r--ext/standard/tests/array/array_merge_error.phpt30
-rw-r--r--ext/standard/tests/array/array_merge_recursive_basic1.phpt97
-rw-r--r--ext/standard/tests/array/array_merge_recursive_basic2.phpt94
-rw-r--r--ext/standard/tests/array/array_merge_recursive_error.phpt25
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation1.phpt303
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation10.phpt174
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation2.phpt199
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation3.phpt761
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation4.phpt424
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation5.phpt404
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation6.phpt113
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation7.phpt82
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation8.phpt73
-rw-r--r--ext/standard/tests/array/array_merge_recursive_variation9.phpt117
-rw-r--r--ext/standard/tests/array/array_merge_variation1.phpt231
-rw-r--r--ext/standard/tests/array/array_merge_variation10.phpt70
-rw-r--r--ext/standard/tests/array/array_merge_variation2.phpt230
-rw-r--r--ext/standard/tests/array/array_merge_variation3.phpt379
-rw-r--r--ext/standard/tests/array/array_merge_variation4.phpt368
-rw-r--r--ext/standard/tests/array/array_merge_variation5.phpt61
-rw-r--r--ext/standard/tests/array/array_merge_variation6.phpt53
-rw-r--r--ext/standard/tests/array/array_merge_variation7.phpt65
-rw-r--r--ext/standard/tests/array/array_merge_variation8.phpt74
-rw-r--r--ext/standard/tests/array/array_merge_variation9.phpt114
-rw-r--r--ext/standard/tests/array/array_pad_basic.phpt92
-rw-r--r--ext/standard/tests/array/array_pad_error.phpt53
-rw-r--r--ext/standard/tests/array/array_pad_variation1.phpt270
-rw-r--r--ext/standard/tests/array/array_pad_variation2.phpt288
-rw-r--r--ext/standard/tests/array/array_pad_variation3.phpt869
-rw-r--r--ext/standard/tests/array/array_pad_variation4.phpt60
-rw-r--r--ext/standard/tests/array/array_pad_variation5.phpt140
-rw-r--r--ext/standard/tests/array/array_pad_variation6.phpt668
-rw-r--r--ext/standard/tests/array/array_pad_variation7.phpt127
-rw-r--r--ext/standard/tests/array/array_push_basic.phpt63
-rw-r--r--ext/standard/tests/array/array_push_error1.phpt30
-rw-r--r--ext/standard/tests/array/array_push_error2.phpt53
-rw-r--r--ext/standard/tests/array/array_push_variation1.phpt225
-rw-r--r--ext/standard/tests/array/array_push_variation2.phpt178
-rw-r--r--ext/standard/tests/array/array_push_variation3.phpt70
-rw-r--r--ext/standard/tests/array/array_push_variation4.phpt134
-rw-r--r--ext/standard/tests/array/array_push_variation5.phpt36
-rw-r--r--ext/standard/tests/array/array_push_variation6.phpt159
-rw-r--r--ext/standard/tests/array/array_reverse_variation5.phpt8
-rw-r--r--ext/standard/tests/array/array_shift_basic.phpt54
-rw-r--r--ext/standard/tests/array/array_shift_error.phpt40
-rw-r--r--ext/standard/tests/array/array_shift_variation1.phpt218
-rw-r--r--ext/standard/tests/array/array_shift_variation2.phpt208
-rw-r--r--ext/standard/tests/array/array_shift_variation3.phpt188
-rw-r--r--ext/standard/tests/array/array_shift_variation4.phpt109
-rw-r--r--ext/standard/tests/array/array_shift_variation5.phpt45
-rw-r--r--ext/standard/tests/array/array_shift_variation6.phpt83
-rw-r--r--ext/standard/tests/array/array_shift_variation7.phpt34
-rw-r--r--ext/standard/tests/array/array_shift_variation8.phpt50
-rw-r--r--ext/standard/tests/array/array_shuffle_basic.phpt99
-rw-r--r--ext/standard/tests/array/array_slice_basic.phpt51
-rw-r--r--ext/standard/tests/array/array_slice_error.phpt43
-rw-r--r--ext/standard/tests/array/array_slice_variation1.phpt227
-rw-r--r--ext/standard/tests/array/array_slice_variation10.phpt44
-rw-r--r--ext/standard/tests/array/array_slice_variation2.phpt309
-rw-r--r--ext/standard/tests/array/array_slice_variation3.phpt207
-rw-r--r--ext/standard/tests/array/array_slice_variation4.phpt327
-rw-r--r--ext/standard/tests/array/array_slice_variation5.phpt191
-rw-r--r--ext/standard/tests/array/array_slice_variation6.phpt150
-rw-r--r--ext/standard/tests/array/array_slice_variation7.phpt300
-rw-r--r--ext/standard/tests/array/array_slice_variation8.phpt56
-rw-r--r--ext/standard/tests/array/array_slice_variation9.phpt75
-rw-r--r--ext/standard/tests/array/array_sum_basic.phpt37
-rw-r--r--ext/standard/tests/array/array_sum_error.phpt34
-rw-r--r--ext/standard/tests/array/array_sum_variation1.phpt179
-rw-r--r--ext/standard/tests/array/array_sum_variation2.phpt49
-rw-r--r--ext/standard/tests/array/array_sum_variation3.phpt54
-rw-r--r--ext/standard/tests/array/array_sum_variation4.phpt34
-rw-r--r--ext/standard/tests/array/array_sum_variation5.phpt37
-rw-r--r--ext/standard/tests/array/array_sum_variation6.phpt33
-rw-r--r--ext/standard/tests/array/array_sum_variation7.phpt86
-rw-r--r--ext/standard/tests/array/array_udiff_assoc_basic.phpt41
-rw-r--r--ext/standard/tests/array/array_udiff_basic.phpt36
-rw-r--r--ext/standard/tests/array/array_udiff_uassoc_basic.phpt45
-rw-r--r--ext/standard/tests/array/array_uintersect_assoc_basic.phpt36
-rw-r--r--ext/standard/tests/array/array_uintersect_basic.phpt41
-rw-r--r--ext/standard/tests/array/array_uintersect_uassoc_basic.phpt40
-rw-r--r--ext/standard/tests/array/array_unique_basic.phpt48
-rw-r--r--ext/standard/tests/array/array_unique_error.phpt36
-rw-r--r--ext/standard/tests/array/array_unique_variation1.phpt194
-rw-r--r--ext/standard/tests/array/array_unique_variation2.phpt232
-rw-r--r--ext/standard/tests/array/array_unique_variation3.phpt134
-rw-r--r--ext/standard/tests/array/array_unique_variation4.phpt131
-rw-r--r--ext/standard/tests/array/array_unique_variation5.phpt33
-rw-r--r--ext/standard/tests/array/array_unique_variation6.phpt44
-rw-r--r--ext/standard/tests/array/array_unique_variation7.phpt33
-rw-r--r--ext/standard/tests/array/array_unique_variation8.phpt44
-rw-r--r--ext/standard/tests/array/array_unshift_variation5.phpt6
-rw-r--r--ext/standard/tests/array/array_values_basic.phpt40
-rw-r--r--ext/standard/tests/array/array_values_variation1.phpt224
-rw-r--r--ext/standard/tests/array/array_values_variation2.phpt215
-rw-r--r--ext/standard/tests/array/array_values_variation3.phpt200
-rw-r--r--ext/standard/tests/array/array_values_variation4.phpt118
-rw-r--r--ext/standard/tests/array/array_values_variation5.phpt46
-rw-r--r--ext/standard/tests/array/array_values_variation6.phpt70
-rw-r--r--ext/standard/tests/array/array_values_variation7.phpt55
-rw-r--r--ext/standard/tests/array/array_walk_basic1.phpt80
-rw-r--r--ext/standard/tests/array/array_walk_basic2.phpt105
-rw-r--r--ext/standard/tests/array/array_walk_error1.phpt48
-rw-r--r--ext/standard/tests/array/array_walk_error2.phpt59
-rw-r--r--ext/standard/tests/array/array_walk_object1.phptbin0 -> 1391 bytes
-rw-r--r--ext/standard/tests/array/array_walk_object2.phpt104
-rw-r--r--ext/standard/tests/array/array_walk_recursive_basic1.phpt80
-rw-r--r--ext/standard/tests/array/array_walk_recursive_basic2.phpt105
-rw-r--r--ext/standard/tests/array/array_walk_recursive_error1.phpt48
-rw-r--r--ext/standard/tests/array/array_walk_recursive_error2.phpt59
-rw-r--r--ext/standard/tests/array/array_walk_recursive_object1.phptbin0 -> 1441 bytes
-rw-r--r--ext/standard/tests/array/array_walk_recursive_object2.phpt106
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation1.phpt250
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation2.phpt271
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation3.phpt123
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation4.phpt76
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation5.phpt64
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation6.phpt147
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation7.phpt93
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation8.phpt42
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation9.phpt99
-rw-r--r--ext/standard/tests/array/array_walk_variation1.phpt250
-rw-r--r--ext/standard/tests/array/array_walk_variation2.phpt271
-rw-r--r--ext/standard/tests/array/array_walk_variation3.phpt123
-rw-r--r--ext/standard/tests/array/array_walk_variation4.phpt87
-rw-r--r--ext/standard/tests/array/array_walk_variation5.phpt64
-rw-r--r--ext/standard/tests/array/array_walk_variation6.phpt143
-rw-r--r--ext/standard/tests/array/array_walk_variation7.phpt93
-rw-r--r--ext/standard/tests/array/array_walk_variation8.phpt42
-rw-r--r--ext/standard/tests/array/array_walk_variation9.phpt99
-rw-r--r--ext/standard/tests/array/arsort_error.phpt79
-rw-r--r--ext/standard/tests/array/arsort_variation1.phpt399
-rw-r--r--ext/standard/tests/array/arsort_variation10.phpt114
-rw-r--r--ext/standard/tests/array/arsort_variation11.phptbin0 -> 3384 bytes
-rw-r--r--ext/standard/tests/array/arsort_variation2.phpt308
-rw-r--r--ext/standard/tests/array/arsort_variation3.phpt326
-rw-r--r--ext/standard/tests/array/arsort_variation4.phpt79
-rw-r--r--ext/standard/tests/array/arsort_variation5.phpt242
-rw-r--r--ext/standard/tests/array/arsort_variation6.phpt114
-rw-r--r--ext/standard/tests/array/arsort_variation7.phpt98
-rw-r--r--ext/standard/tests/array/arsort_variation8.phpt180
-rw-r--r--ext/standard/tests/array/arsort_variation9.phpt258
-rw-r--r--ext/standard/tests/array/bug26458.phptbin395 -> 406 bytes
-rw-r--r--ext/standard/tests/array/bug42177.phpt35
-rw-r--r--ext/standard/tests/array/bug42838.phpt24
-rw-r--r--ext/standard/tests/array/bug42850.phpt59
-rw-r--r--ext/standard/tests/array/bug43495.phpt21
-rw-r--r--ext/standard/tests/array/bug43505.phpt36
-rw-r--r--ext/standard/tests/array/compact_basic.phpt85
-rw-r--r--ext/standard/tests/array/compact_error.phpt31
-rw-r--r--ext/standard/tests/array/count_basic.phpt45
-rw-r--r--ext/standard/tests/array/count_error.phpt41
-rw-r--r--ext/standard/tests/array/count_variation1.phpt170
-rw-r--r--ext/standard/tests/array/count_variation2.phpt187
-rw-r--r--ext/standard/tests/array/count_variation3.phpt41
-rw-r--r--ext/standard/tests/array/current_basic.phpt32
-rw-r--r--ext/standard/tests/array/current_error.phpt40
-rw-r--r--ext/standard/tests/array/current_variation1.phpt217
-rw-r--r--ext/standard/tests/array/current_variation2.phpt155
-rw-r--r--ext/standard/tests/array/current_variation3.phpt42
-rw-r--r--ext/standard/tests/array/current_variation4.phpt72
-rw-r--r--ext/standard/tests/array/each_basic.phpt74
-rw-r--r--ext/standard/tests/array/each_error.phpt42
-rw-r--r--ext/standard/tests/array/each_variation1.phpt222
-rw-r--r--ext/standard/tests/array/each_variation2.phpt248
-rw-r--r--ext/standard/tests/array/each_variation3.phpt253
-rw-r--r--ext/standard/tests/array/each_variation4.phpt90
-rw-r--r--ext/standard/tests/array/each_variation5.phpt96
-rw-r--r--ext/standard/tests/array/each_variation6.phpt51
-rw-r--r--ext/standard/tests/array/end_basic.phpt46
-rw-r--r--ext/standard/tests/array/end_error.phpt39
-rw-r--r--ext/standard/tests/array/end_variation1.phpt220
-rw-r--r--ext/standard/tests/array/end_variation2.phpt43
-rw-r--r--ext/standard/tests/array/end_variation3.phpt41
-rw-r--r--ext/standard/tests/array/key_basic.phpt47
-rw-r--r--ext/standard/tests/array/key_error.phpt39
-rw-r--r--ext/standard/tests/array/key_variation1.phpt220
-rw-r--r--ext/standard/tests/array/key_variation2.phpt155
-rw-r--r--ext/standard/tests/array/key_variation3.phpt43
-rw-r--r--ext/standard/tests/array/key_variation4.phpt64
-rw-r--r--ext/standard/tests/array/krsort_basic.phpt132
-rw-r--r--ext/standard/tests/array/krsort_error.phpt78
-rw-r--r--ext/standard/tests/array/krsort_object.phpt242
-rw-r--r--ext/standard/tests/array/krsort_variation1.phpt397
-rw-r--r--ext/standard/tests/array/krsort_variation10.phpt98
-rw-r--r--ext/standard/tests/array/krsort_variation11.phpt81
-rw-r--r--ext/standard/tests/array/krsort_variation2.phpt307
-rw-r--r--ext/standard/tests/array/krsort_variation3.phpt262
-rw-r--r--ext/standard/tests/array/krsort_variation4.phpt114
-rw-r--r--ext/standard/tests/array/krsort_variation5.phpt230
-rw-r--r--ext/standard/tests/array/krsort_variation6.phpt114
-rw-r--r--ext/standard/tests/array/krsort_variation7.phpt177
-rw-r--r--ext/standard/tests/array/krsort_variation8.phptbin0 -> 3328 bytes
-rw-r--r--ext/standard/tests/array/krsort_variation9.phpt257
-rw-r--r--ext/standard/tests/array/ksort_basic.phpt131
-rw-r--r--ext/standard/tests/array/ksort_error.phpt78
-rw-r--r--ext/standard/tests/array/ksort_object.phpt241
-rw-r--r--ext/standard/tests/array/ksort_variation1.phpt397
-rw-r--r--ext/standard/tests/array/ksort_variation10.phpt113
-rw-r--r--ext/standard/tests/array/ksort_variation11.phpt98
-rw-r--r--ext/standard/tests/array/ksort_variation2.phpt307
-rw-r--r--ext/standard/tests/array/ksort_variation3.phpt262
-rw-r--r--ext/standard/tests/array/ksort_variation4.phpt81
-rw-r--r--ext/standard/tests/array/ksort_variation5.phpt230
-rw-r--r--ext/standard/tests/array/ksort_variation6.phpt114
-rw-r--r--ext/standard/tests/array/ksort_variation7.phpt177
-rw-r--r--ext/standard/tests/array/ksort_variation8.phptbin0 -> 3295 bytes
-rw-r--r--ext/standard/tests/array/ksort_variation9.phpt256
-rw-r--r--ext/standard/tests/array/natcasesort_basic.phpt57
-rw-r--r--ext/standard/tests/array/natcasesort_error.phpt40
-rw-r--r--ext/standard/tests/array/natcasesort_object1.phpt99
-rw-r--r--ext/standard/tests/array/natcasesort_object2.phpt99
-rw-r--r--ext/standard/tests/array/natcasesort_variation1.phpt220
-rw-r--r--ext/standard/tests/array/natcasesort_variation10.phpt52
-rw-r--r--ext/standard/tests/array/natcasesort_variation11.phpt232
-rw-r--r--ext/standard/tests/array/natcasesort_variation2.phpt227
-rw-r--r--ext/standard/tests/array/natcasesort_variation3.phpt135
-rw-r--r--ext/standard/tests/array/natcasesort_variation4.phpt86
-rw-r--r--ext/standard/tests/array/natcasesort_variation5.phpt49
-rw-r--r--ext/standard/tests/array/natcasesort_variation6.phpt56
-rw-r--r--ext/standard/tests/array/natcasesort_variation7.phpt98
-rw-r--r--ext/standard/tests/array/natcasesort_variation8.phpt46
-rw-r--r--ext/standard/tests/array/natcasesort_variation9.phpt110
-rw-r--r--ext/standard/tests/array/next_basic.phpt35
-rw-r--r--ext/standard/tests/array/next_error.phpt39
-rw-r--r--ext/standard/tests/array/next_variation1.phpt219
-rw-r--r--ext/standard/tests/array/next_variation2.phpt45
-rw-r--r--ext/standard/tests/array/reset_basic.phpt45
-rw-r--r--ext/standard/tests/array/reset_error.phpt39
-rw-r--r--ext/standard/tests/array/reset_variation1.phpt219
-rw-r--r--ext/standard/tests/array/reset_variation2.phpt34
-rw-r--r--ext/standard/tests/array/reset_variation3.phpt56
-rw-r--r--ext/standard/tests/array/rsort_basic.phpt129
-rw-r--r--ext/standard/tests/array/rsort_error.phpt51
-rw-r--r--ext/standard/tests/array/rsort_object1.phpt243
-rw-r--r--ext/standard/tests/array/rsort_object2.phpt258
-rw-r--r--ext/standard/tests/array/rsort_variation1.phpt514
-rw-r--r--ext/standard/tests/array/rsort_variation10.phpt108
-rw-r--r--ext/standard/tests/array/rsort_variation11.phptbin0 -> 2695 bytes
-rw-r--r--ext/standard/tests/array/rsort_variation2.phpt484
-rw-r--r--ext/standard/tests/array/rsort_variation3.phpt325
-rw-r--r--ext/standard/tests/array/rsort_variation4.phpt80
-rw-r--r--ext/standard/tests/array/rsort_variation5.phpt221
-rw-r--r--ext/standard/tests/array/rsort_variation6.phpt120
-rw-r--r--ext/standard/tests/array/rsort_variation7.phpt96
-rw-r--r--ext/standard/tests/array/rsort_variation8.phpt180
-rw-r--r--ext/standard/tests/array/rsort_variation9.phpt259
-rw-r--r--ext/standard/tests/array/sizeof_basic1.phpt60
-rw-r--r--ext/standard/tests/array/sizeof_basic2.phpt99
-rw-r--r--ext/standard/tests/array/sizeof_error.phpt41
-rw-r--r--ext/standard/tests/array/sizeof_object1.phpt55
-rw-r--r--ext/standard/tests/array/sizeof_object2.phpt138
-rw-r--r--ext/standard/tests/array/sizeof_variation1.phpt215
-rw-r--r--ext/standard/tests/array/sizeof_variation2.phpt163
-rw-r--r--ext/standard/tests/array/sizeof_variation3.phpt34
-rw-r--r--ext/standard/tests/array/sizeof_variation4.phpt350
-rw-r--r--ext/standard/tests/array/sizeof_variation5.phpt132
-rw-r--r--ext/standard/tests/array/uasort_basic1.phpt116
-rw-r--r--ext/standard/tests/array/uasort_basic2.phpt102
-rw-r--r--ext/standard/tests/array/uasort_error.phpt81
-rw-r--r--ext/standard/tests/array/uasort_object1.phpt150
-rw-r--r--ext/standard/tests/array/uasort_object2.phpt187
-rw-r--r--ext/standard/tests/array/uasort_variation1.phpt188
-rw-r--r--ext/standard/tests/array/uasort_variation10.phpt74
-rw-r--r--ext/standard/tests/array/uasort_variation11.phpt82
-rw-r--r--ext/standard/tests/array/uasort_variation2.phpt212
-rw-r--r--ext/standard/tests/array/uasort_variation3.phptbin0 -> 2584 bytes
-rw-r--r--ext/standard/tests/array/uasort_variation4.phpt150
-rw-r--r--ext/standard/tests/array/uasort_variation5.phpt145
-rw-r--r--ext/standard/tests/array/uasort_variation6.phpt115
-rw-r--r--ext/standard/tests/array/uasort_variation7.phpt60
-rw-r--r--ext/standard/tests/array/uasort_variation8.phpt78
-rw-r--r--ext/standard/tests/array/uasort_variation9.phpt81
-rw-r--r--ext/standard/tests/array/var_export2.phptbin204 -> 215 bytes
-rw-r--r--ext/standard/tests/class_object/class_exists_basic_001.phpt55
-rw-r--r--ext/standard/tests/class_object/class_exists_error_001.phpt42
-rw-r--r--ext/standard/tests/class_object/class_exists_variation_001.phpt182
-rw-r--r--ext/standard/tests/class_object/class_exists_variation_002.phpt193
-rw-r--r--ext/standard/tests/class_object/class_exists_variation_003.phpt18
-rw-r--r--ext/standard/tests/class_object/get_class_error_001.phpt28
-rw-r--r--ext/standard/tests/class_object/get_class_methods_basic_001.phpt63
-rw-r--r--ext/standard/tests/class_object/get_class_methods_basic_002.phpt178
-rw-r--r--ext/standard/tests/class_object/get_class_methods_basic_003.phpt76
-rw-r--r--ext/standard/tests/class_object/get_class_methods_error_001.phpt41
-rw-r--r--ext/standard/tests/class_object/get_class_methods_variation_001.phpt172
-rw-r--r--ext/standard/tests/class_object/get_class_methods_variation_002.phpt27
-rw-r--r--ext/standard/tests/class_object/get_class_variation_001.phpt160
-rw-r--r--ext/standard/tests/class_object/get_class_variation_002.phpt18
-rw-r--r--ext/standard/tests/class_object/get_declared_classes_basic_001.phpt47
-rw-r--r--ext/standard/tests/class_object/get_declared_classes_error_001.phpt27
-rw-r--r--ext/standard/tests/class_object/get_declared_interfaces_basic_001.phpt47
-rw-r--r--ext/standard/tests/class_object/get_declared_interfaces_error_001.phpt27
-rw-r--r--ext/standard/tests/class_object/get_object_vars_basic_001.phpt107
-rw-r--r--ext/standard/tests/class_object/get_object_vars_basic_002.phpt64
-rw-r--r--ext/standard/tests/class_object/get_object_vars_error_001.phpt37
-rw-r--r--ext/standard/tests/class_object/get_object_vars_variation_001.phpt20
-rw-r--r--ext/standard/tests/class_object/get_object_vars_variation_002.phpt47
-rw-r--r--ext/standard/tests/class_object/get_object_vars_variation_003.phpt158
-rw-r--r--ext/standard/tests/class_object/get_parent_class_error_001.phpt29
-rw-r--r--ext/standard/tests/class_object/get_parent_class_variation_001.phpt27
-rw-r--r--ext/standard/tests/class_object/get_parent_class_variation_002.phpt174
-rw-r--r--ext/standard/tests/class_object/is_a_error_001.phpt44
-rw-r--r--ext/standard/tests/class_object/is_a_variation_001.phpt213
-rw-r--r--ext/standard/tests/class_object/is_a_variation_002.phpt223
-rw-r--r--ext/standard/tests/class_object/is_a_variation_003.phpt25
-rw-r--r--ext/standard/tests/class_object/is_subclass_of_error_001.phpt40
-rw-r--r--ext/standard/tests/class_object/is_subclass_of_variation_001.phpt175
-rw-r--r--ext/standard/tests/class_object/is_subclass_of_variation_002.phpt172
-rw-r--r--ext/standard/tests/class_object/is_subclass_of_variation_003.phpt26
-rw-r--r--ext/standard/tests/class_object/method_exists_basic_001.phpt83
-rw-r--r--ext/standard/tests/class_object/method_exists_basic_002.phpt33
-rw-r--r--ext/standard/tests/class_object/method_exists_basic_003.phpt22
-rw-r--r--ext/standard/tests/class_object/method_exists_error_001.phpt40
-rw-r--r--ext/standard/tests/class_object/method_exists_variation_001.phpt170
-rw-r--r--ext/standard/tests/class_object/method_exists_variation_002.phpt172
-rw-r--r--ext/standard/tests/class_object/method_exists_variation_003.phpt26
-rw-r--r--ext/standard/tests/dir/chdir_basic.phpt53
-rw-r--r--ext/standard/tests/dir/chdir_error1.phpt39
-rw-r--r--ext/standard/tests/dir/chdir_error2.phpt26
-rw-r--r--ext/standard/tests/dir/chdir_variation1.phpt235
-rw-r--r--ext/standard/tests/dir/chdir_variation2.phpt104
-rw-r--r--ext/standard/tests/dir/closedir_basic.phpt56
-rw-r--r--ext/standard/tests/dir/closedir_error.phpt45
-rw-r--r--ext/standard/tests/dir/closedir_variation1.phpt212
-rw-r--r--ext/standard/tests/dir/closedir_variation2.phpt51
-rw-r--r--ext/standard/tests/dir/closedir_variation3.phpt44
-rw-r--r--ext/standard/tests/dir/dir_basic.phpt86
-rw-r--r--ext/standard/tests/dir/dir_error.phpt34
-rw-r--r--ext/standard/tests/dir/dir_variation1.phpt160
-rw-r--r--ext/standard/tests/dir/dir_variation2.phpt223
-rw-r--r--ext/standard/tests/dir/dir_variation3.phpt204
-rw-r--r--ext/standard/tests/dir/dir_variation4.phpt72
-rw-r--r--ext/standard/tests/dir/dir_variation5.phpt29
-rw-r--r--ext/standard/tests/dir/dir_variation6.phpt51
-rw-r--r--ext/standard/tests/dir/dir_variation7.phpt94
-rw-r--r--ext/standard/tests/dir/dir_variation8.phpt63
-rw-r--r--ext/standard/tests/dir/dir_variation9.phpt111
-rw-r--r--ext/standard/tests/dir/getcwd_basic.phpt34
-rw-r--r--ext/standard/tests/dir/getcwd_error.phpt29
-rw-r--r--ext/standard/tests/dir/opendir_basic.phpt62
-rw-r--r--ext/standard/tests/dir/opendir_error1.phpt47
-rw-r--r--ext/standard/tests/dir/opendir_error2.phpt37
-rw-r--r--ext/standard/tests/dir/opendir_variation1.phpt218
-rw-r--r--ext/standard/tests/dir/opendir_variation2.phpt239
-rw-r--r--ext/standard/tests/dir/opendir_variation3.phpt50
-rw-r--r--ext/standard/tests/dir/opendir_variation4.phpt107
-rw-r--r--ext/standard/tests/dir/opendir_variation5.phpt103
-rw-r--r--ext/standard/tests/dir/opendir_variation6.phpt61
-rw-r--r--ext/standard/tests/dir/opendir_variation7.phpt127
-rw-r--r--ext/standard/tests/dir/readdir_basic.phpt73
-rw-r--r--ext/standard/tests/dir/readdir_error.phpt43
-rw-r--r--ext/standard/tests/dir/readdir_variation1.phpt210
-rw-r--r--ext/standard/tests/dir/readdir_variation2.phpt39
-rw-r--r--ext/standard/tests/dir/readdir_variation3.phpt68
-rw-r--r--ext/standard/tests/dir/readdir_variation4.phpt179
-rw-r--r--ext/standard/tests/dir/readdir_variation5.phpt144
-rw-r--r--ext/standard/tests/dir/readdir_variation6.phpt80
-rw-r--r--ext/standard/tests/dir/readdir_variation7.phpt36
-rw-r--r--ext/standard/tests/dir/rewinddir_basic.phpt94
-rw-r--r--ext/standard/tests/dir/rewinddir_error.phpt42
-rw-r--r--ext/standard/tests/dir/rewinddir_variation1.phpt211
-rw-r--r--ext/standard/tests/dir/rewinddir_variation2.phpt45
-rw-r--r--ext/standard/tests/dir/rewinddir_variation3.phpt43
-rw-r--r--ext/standard/tests/dir/scandir_basic.phpt70
-rw-r--r--ext/standard/tests/dir/scandir_error1.phpt47
-rw-r--r--ext/standard/tests/dir/scandir_error2.phpt41
-rw-r--r--ext/standard/tests/dir/scandir_variation1.phpt253
-rw-r--r--ext/standard/tests/dir/scandir_variation2.phpt283
-rw-r--r--ext/standard/tests/dir/scandir_variation3.phpt238
-rw-r--r--ext/standard/tests/dir/scandir_variation4.phpt169
-rw-r--r--ext/standard/tests/dir/scandir_variation5.phpt98
-rw-r--r--ext/standard/tests/dir/scandir_variation6.phpt70
-rw-r--r--ext/standard/tests/dir/scandir_variation7.phpt169
-rw-r--r--ext/standard/tests/dir/scandir_variation8.phpt154
-rw-r--r--ext/standard/tests/dir/scandir_variation9.phpt72
-rw-r--r--ext/standard/tests/file/bug22414.phpt11
-rw-r--r--ext/standard/tests/file/bug41655_2.phpt6
-rwxr-xr-xext/standard/tests/file/bug43216.phpt8
-rwxr-xr-xext/standard/tests/file/bug43248.phpt8
-rw-r--r--ext/standard/tests/file/bug43522.phpt25
-rw-r--r--ext/standard/tests/file/fgetc_basic.phpt216
-rw-r--r--ext/standard/tests/file/fgetc_variation2.phpt15
-rw-r--r--ext/standard/tests/file/fopen_variation1.phpt14
-rw-r--r--ext/standard/tests/file/fread_socket_variation1.phpt16
-rw-r--r--ext/standard/tests/file/fseek_dir_basic.phpt96
-rw-r--r--ext/standard/tests/file/glob_variation2.phpt57
-rw-r--r--ext/standard/tests/file/is_dir_variation2.phpt2
-rw-r--r--ext/standard/tests/file/open_basedir.inc133
-rw-r--r--ext/standard/tests/file/open_basedir_chdir.phpt51
-rw-r--r--ext/standard/tests/file/open_basedir_chmod.phpt71
-rw-r--r--ext/standard/tests/file/open_basedir_copy.phpt79
-rw-r--r--ext/standard/tests/file/open_basedir_copy_variation1.phpt35
-rw-r--r--ext/standard/tests/file/open_basedir_disk_free_space.phpt52
-rw-r--r--ext/standard/tests/file/open_basedir_file.phpt88
-rw-r--r--ext/standard/tests/file/open_basedir_file_exists.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_file_get_contents.phpt75
-rw-r--r--ext/standard/tests/file/open_basedir_file_put_contents.phpt57
-rw-r--r--ext/standard/tests/file/open_basedir_fileatime.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_filectime.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_filegroup.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_fileinode.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_filemtime.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_fileowner.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_fileperms.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_filesize.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_filetype.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_fopen.phpt86
-rw-r--r--ext/standard/tests/file/open_basedir_glob-win32.phpt59
-rw-r--r--ext/standard/tests/file/open_basedir_glob.phpt58
-rw-r--r--ext/standard/tests/file/open_basedir_is_dir.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_is_executable.phpt59
-rw-r--r--ext/standard/tests/file/open_basedir_is_file.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_is_link.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_is_readable.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_is_writable.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_link.phpt78
-rw-r--r--ext/standard/tests/file/open_basedir_linkinfo.phpt64
-rw-r--r--ext/standard/tests/file/open_basedir_lstat.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_mkdir.phpt52
-rw-r--r--ext/standard/tests/file/open_basedir_parse_ini_file.phpt74
-rw-r--r--ext/standard/tests/file/open_basedir_readlink.phpt76
-rw-r--r--ext/standard/tests/file/open_basedir_realpath.phpt61
-rw-r--r--ext/standard/tests/file/open_basedir_rename.phpt47
-rw-r--r--ext/standard/tests/file/open_basedir_rmdir.phpt47
-rw-r--r--ext/standard/tests/file/open_basedir_stat.phpt55
-rw-r--r--ext/standard/tests/file/open_basedir_symlink.phpt78
-rw-r--r--ext/standard/tests/file/open_basedir_tempnam.phpt57
-rw-r--r--ext/standard/tests/file/open_basedir_touch.phpt70
-rw-r--r--ext/standard/tests/file/open_basedir_unlink.phpt47
-rw-r--r--ext/standard/tests/file/parse_ini_file_error.phpt52
-rw-r--r--ext/standard/tests/file/realpath_basic2.phpt13
-rw-r--r--ext/standard/tests/file/realpath_basic3.phpt86
-rwxr-xr-xext/standard/tests/file/rename_basic.phpt89
-rw-r--r--ext/standard/tests/file/rename_variation-win32.phpt130
-rw-r--r--ext/standard/tests/file/rename_variation1-win32.phpt81
-rw-r--r--ext/standard/tests/file/rename_variation2-win32.phpt61
-rw-r--r--ext/standard/tests/file/rename_variation3-win32.phpt69
-rw-r--r--ext/standard/tests/file/rename_variation8.phpt67
-rw-r--r--ext/standard/tests/file/rename_variation9.phpt53
-rw-r--r--ext/standard/tests/general_functions/bug42272.phpt11
-rw-r--r--ext/standard/tests/general_functions/bug43293_1.phpt25
-rw-r--r--ext/standard/tests/general_functions/bug43293_2.phpt13
-rw-r--r--ext/standard/tests/general_functions/bug43293_3.phpt37
-rw-r--r--ext/standard/tests/general_functions/bug44394.phpt18
-rw-r--r--ext/standard/tests/general_functions/bug44394_2.phpt26
-rw-r--r--ext/standard/tests/general_functions/bug44487.phpt24
-rw-r--r--ext/standard/tests/general_functions/bug44667.phpt33
-rwxr-xr-xext/standard/tests/general_functions/dl-cve-2007-4887.phpt2
-rw-r--r--ext/standard/tests/general_functions/getopt_002.phpt42
-rw-r--r--ext/standard/tests/general_functions/import_request.phpt2
-rw-r--r--ext/standard/tests/general_functions/phpinfo.phpt2
-rw-r--r--ext/standard/tests/general_functions/var_export-locale.phpt6
-rw-r--r--ext/standard/tests/general_functions/var_export.phpt6
-rw-r--r--ext/standard/tests/math/acos_error.phpt1
-rw-r--r--ext/standard/tests/math/acosh_error.phpt1
-rw-r--r--ext/standard/tests/math/asin_error.phpt1
-rw-r--r--ext/standard/tests/math/asinh_error.phpt1
-rw-r--r--ext/standard/tests/math/atan2_basic.phpt185
-rw-r--r--ext/standard/tests/math/atan2_error.phpt15
-rw-r--r--ext/standard/tests/math/atan_error.phpt1
-rw-r--r--ext/standard/tests/math/atanh_error.phpt1
-rw-r--r--ext/standard/tests/math/base_convert_basic.phpt316
-rw-r--r--ext/standard/tests/math/base_convert_error.phpt21
-rw-r--r--ext/standard/tests/math/bindec_basic.phpt53
-rw-r--r--ext/standard/tests/math/bindec_basic_64bit.phpt53
-rw-r--r--ext/standard/tests/math/bindec_error.phpt12
-rw-r--r--ext/standard/tests/math/constants_basic.phpt65
-rw-r--r--ext/standard/tests/math/cos_error.phpt1
-rw-r--r--ext/standard/tests/math/cosh_error.phpt1
-rw-r--r--ext/standard/tests/math/decbin_basic.phpt39
-rw-r--r--ext/standard/tests/math/decbin_error.phpt13
-rw-r--r--ext/standard/tests/math/dechex_basic.phpt38
-rw-r--r--ext/standard/tests/math/dechex_error.phpt13
-rw-r--r--ext/standard/tests/math/decoct_basic.phpt38
-rw-r--r--ext/standard/tests/math/decoct_error.phpt13
-rw-r--r--ext/standard/tests/math/deg2rad_basic.phpt67
-rw-r--r--ext/standard/tests/math/deg2rad_error.phpt31
-rw-r--r--ext/standard/tests/math/deg2rad_variation.phpt52
-rw-r--r--ext/standard/tests/math/exp_error.phpt14
-rw-r--r--ext/standard/tests/math/fmod_basic.phpt209
-rw-r--r--ext/standard/tests/math/fmod_error.phpt17
-rw-r--r--ext/standard/tests/math/getrandmax_basic.phpt9
-rw-r--r--ext/standard/tests/math/getrandmax_error.phpt9
-rw-r--r--ext/standard/tests/math/hexdec_basic.phpt50
-rw-r--r--ext/standard/tests/math/hexdec_error.phpt12
-rw-r--r--ext/standard/tests/math/hypot_error.phpt18
-rw-r--r--ext/standard/tests/math/is_finite_basic.phpt41
-rw-r--r--ext/standard/tests/math/is_finite_error.phpt13
-rw-r--r--ext/standard/tests/math/is_infinite_basic.phpt42
-rw-r--r--ext/standard/tests/math/is_infinite_error.phpt12
-rw-r--r--ext/standard/tests/math/is_nan_basic.phpt45
-rw-r--r--ext/standard/tests/math/is_nan_error.phpt16
-rw-r--r--ext/standard/tests/math/lcg_value_basic.phpt56
-rw-r--r--ext/standard/tests/math/log10_basic.phpt55
-rw-r--r--ext/standard/tests/math/log10_error.phpt31
-rw-r--r--ext/standard/tests/math/log10_variation.phpt52
-rw-r--r--ext/standard/tests/math/log_basic.phpt60
-rw-r--r--ext/standard/tests/math/log_error.phpt17
-rw-r--r--ext/standard/tests/math/mt_getrandmax_basic.phpt8
-rw-r--r--ext/standard/tests/math/mt_getrandmax_error.phpt9
-rw-r--r--ext/standard/tests/math/mt_rand_basic.phpt102
-rw-r--r--ext/standard/tests/math/mt_rand_error.phpt19
-rw-r--r--ext/standard/tests/math/mt_srand_basic.phpt24
-rw-r--r--ext/standard/tests/math/mt_srand_error.phpt20
-rw-r--r--ext/standard/tests/math/number_format_error.phpt16
-rw-r--r--ext/standard/tests/math/octdec_basic.phpt49
-rw-r--r--ext/standard/tests/math/octdec_error.phpt12
-rw-r--r--ext/standard/tests/math/pi_basic.phpt14
-rw-r--r--ext/standard/tests/math/pow_basic.phpt37
-rw-r--r--ext/standard/tests/math/pow_error.phpt19
-rw-r--r--ext/standard/tests/math/rad2deg_basic.phpt65
-rw-r--r--ext/standard/tests/math/rad2deg_error.phpt31
-rw-r--r--ext/standard/tests/math/rad2deg_variation.phpt52
-rw-r--r--ext/standard/tests/math/rand_basic.phpt103
-rw-r--r--ext/standard/tests/math/rand_error.phpt18
-rw-r--r--ext/standard/tests/math/sin_error.phpt1
-rw-r--r--ext/standard/tests/math/sinh_error.phpt1
-rw-r--r--ext/standard/tests/math/sqrt_basic.phpt18
-rw-r--r--ext/standard/tests/math/sqrt_error.phpt31
-rw-r--r--ext/standard/tests/math/srand_basic.phpt24
-rw-r--r--ext/standard/tests/math/srand_error.phpt17
-rw-r--r--ext/standard/tests/math/tan_error.phpt1
-rw-r--r--ext/standard/tests/math/tanh_error.phpt1
-rw-r--r--ext/standard/tests/network/gethostbyaddr_error.phpt60
-rw-r--r--ext/standard/tests/network/gethostbynamel_error.phpt44
-rw-r--r--ext/standard/tests/reg/ereg_basic_001.phpt127
-rw-r--r--ext/standard/tests/reg/ereg_basic_002.phpt56
-rw-r--r--ext/standard/tests/reg/ereg_basic_003.phpt25
-rw-r--r--ext/standard/tests/reg/ereg_basic_004.phpt33
-rw-r--r--ext/standard/tests/reg/ereg_error_001.phpt45
-rw-r--r--ext/standard/tests/reg/ereg_error_002.phpt88
-rw-r--r--ext/standard/tests/reg/ereg_replace_basic_001.phpt60
-rw-r--r--ext/standard/tests/reg/ereg_replace_basic_002.phpt30
-rw-r--r--ext/standard/tests/reg/ereg_replace_error_001.phpt42
-rw-r--r--ext/standard/tests/reg/ereg_replace_error_002.phpt76
-rw-r--r--ext/standard/tests/reg/ereg_replace_variation_001.phpt175
-rw-r--r--ext/standard/tests/reg/ereg_replace_variation_002.phpt163
-rw-r--r--ext/standard/tests/reg/ereg_replace_variation_003.phpt169
-rw-r--r--ext/standard/tests/reg/ereg_variation_001.phpt178
-rw-r--r--ext/standard/tests/reg/ereg_variation_002.phpt169
-rw-r--r--ext/standard/tests/reg/ereg_variation_003.phpt283
-rw-r--r--ext/standard/tests/reg/ereg_variation_004.phpt18
-rw-r--r--ext/standard/tests/reg/eregi_basic.phpt41
-rw-r--r--ext/standard/tests/reg/eregi_basic_001.phpt127
-rw-r--r--ext/standard/tests/reg/eregi_basic_002.phpt56
-rw-r--r--ext/standard/tests/reg/eregi_basic_003.phpt25
-rw-r--r--ext/standard/tests/reg/eregi_basic_004.phpt31
-rw-r--r--ext/standard/tests/reg/eregi_error_001.phpt45
-rw-r--r--ext/standard/tests/reg/eregi_error_002.phpt88
-rw-r--r--ext/standard/tests/reg/eregi_replace_basic.phpt36
-rw-r--r--ext/standard/tests/reg/eregi_replace_basic_001.phpt60
-rw-r--r--ext/standard/tests/reg/eregi_replace_basic_002.phpt28
-rw-r--r--ext/standard/tests/reg/eregi_replace_error_001.phpt42
-rw-r--r--ext/standard/tests/reg/eregi_replace_error_002.phpt76
-rw-r--r--ext/standard/tests/reg/eregi_replace_variation_001.phpt175
-rw-r--r--ext/standard/tests/reg/eregi_replace_variation_002.phpt163
-rw-r--r--ext/standard/tests/reg/eregi_replace_variation_003.phpt169
-rw-r--r--ext/standard/tests/reg/eregi_variation_001.phpt178
-rw-r--r--ext/standard/tests/reg/eregi_variation_002.phpt169
-rw-r--r--ext/standard/tests/reg/eregi_variation_003.phpt283
-rw-r--r--ext/standard/tests/reg/eregi_variation_004.phpt18
-rw-r--r--ext/standard/tests/reg/regular_expressions.inc24
-rw-r--r--ext/standard/tests/reg/split_basic_001.phpt129
-rw-r--r--ext/standard/tests/reg/split_basic_002.phpt227
-rw-r--r--ext/standard/tests/reg/split_basic_003.phpt48
-rw-r--r--ext/standard/tests/reg/split_error_001.phpt41
-rw-r--r--ext/standard/tests/reg/split_error_002.phpt88
-rw-r--r--ext/standard/tests/reg/split_variation_001.phpt256
-rw-r--r--ext/standard/tests/reg/split_variation_002.phpt268
-rw-r--r--ext/standard/tests/reg/split_variation_003.phpt225
-rw-r--r--ext/standard/tests/reg/split_variation_004.phpt40
-rw-r--r--ext/standard/tests/reg/spliti_basic_001.phpt129
-rw-r--r--ext/standard/tests/reg/spliti_basic_002.phpt227
-rw-r--r--ext/standard/tests/reg/spliti_basic_003.phpt43
-rw-r--r--ext/standard/tests/reg/spliti_basic_004.phpt45
-rw-r--r--ext/standard/tests/reg/spliti_error_001.phpt41
-rw-r--r--ext/standard/tests/reg/spliti_error_002.phpt88
-rw-r--r--ext/standard/tests/reg/spliti_variation_001.phpt256
-rw-r--r--ext/standard/tests/reg/spliti_variation_002.phpt270
-rw-r--r--ext/standard/tests/reg/spliti_variation_003.phpt225
-rw-r--r--ext/standard/tests/reg/spliti_variation_004.phpt40
-rw-r--r--ext/standard/tests/reg/sql_regcase_basic_001.phpt25
-rw-r--r--ext/standard/tests/reg/sql_regcase_error_001.phpt37
-rw-r--r--ext/standard/tests/reg/sql_regcase_variation_001.phpt167
-rwxr-xr-xext/standard/tests/serialize/005.phpt2
-rw-r--r--ext/standard/tests/serialize/bug43614.phpt21
-rw-r--r--ext/standard/tests/serialize/serialization_arrays_001.phpt108
-rw-r--r--ext/standard/tests/serialize/serialization_arrays_002.phpt544
-rw-r--r--ext/standard/tests/serialize/serialization_arrays_003.phpt294
-rw-r--r--ext/standard/tests/serialize/serialization_arrays_004.phpt474
-rw-r--r--ext/standard/tests/serialize/serialization_arrays_005.phpt571
-rw-r--r--ext/standard/tests/serialize/serialization_error_001.phpt42
-rw-r--r--ext/standard/tests/serialize/serialization_miscTypes_001.phptbin0 -> 7686 bytes
-rw-r--r--ext/standard/tests/serialize/serialization_objects_001.phptbin0 -> 2373 bytes
-rw-r--r--ext/standard/tests/serialize/serialization_objects_002.phptbin0 -> 7192 bytes
-rw-r--r--ext/standard/tests/serialize/serialization_objects_003.phpt67
-rw-r--r--ext/standard/tests/serialize/serialization_objects_004.phpt49
-rw-r--r--ext/standard/tests/serialize/serialization_objects_005.phpt120
-rw-r--r--ext/standard/tests/serialize/serialization_objects_006.phpt28
-rw-r--r--ext/standard/tests/serialize/serialization_objects_007.phpt42
-rw-r--r--ext/standard/tests/serialize/serialization_objects_008.phpt28
-rw-r--r--ext/standard/tests/serialize/serialization_objects_009.phpt36
-rw-r--r--ext/standard/tests/serialize/serialization_objects_010.phpt37
-rw-r--r--ext/standard/tests/serialize/serialization_objects_011.phpt196
-rw-r--r--ext/standard/tests/serialize/serialization_objects_012.phpt244
-rw-r--r--ext/standard/tests/serialize/serialization_objects_013.phpt494
-rw-r--r--ext/standard/tests/serialize/serialization_objects_014.phpt295
-rw-r--r--ext/standard/tests/serialize/serialization_objects_015.phpt532
-rw-r--r--ext/standard/tests/serialize/serialization_precision_001.phpt21
-rw-r--r--ext/standard/tests/serialize/serialization_precision_002.phpt21
-rw-r--r--ext/standard/tests/serialize/serialization_resources_001.phpt30
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt50
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt33
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_error.phpt57
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt510
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt135
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt71
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt77
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_process_basic-win32.phpt43
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt43
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt27
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt110
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt108
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt86
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt89
-rw-r--r--ext/standard/tests/streams/stream_set_timeout_error.phpt79
-rw-r--r--ext/standard/tests/strings/bug37262.phpt2
-rw-r--r--ext/standard/tests/strings/bug43927.phpt12
-rw-r--r--ext/standard/tests/strings/bug44242.phpt14
-rw-r--r--ext/standard/tests/strings/bug44703.phpt48
-rw-r--r--ext/standard/tests/strings/chunk_split_variation1.phpt334
-rw-r--r--ext/standard/tests/strings/chunk_split_variation2.phpt346
-rw-r--r--ext/standard/tests/strings/chunk_split_variation3.phpt316
-rw-r--r--ext/standard/tests/strings/crc32_variation1.phpt393
-rw-r--r--ext/standard/tests/strings/explode.phpt9
-rw-r--r--ext/standard/tests/strings/join_variation1.phpt334
-rw-r--r--ext/standard/tests/strings/setlocale_basic1.phpt4
-rw-r--r--ext/standard/tests/strings/setlocale_variation4.phpt3
-rw-r--r--ext/standard/tests/strings/setlocale_variation5.phpt3
-rw-r--r--ext/standard/tests/strings/sprintf_variation1.phpt18
-rw-r--r--ext/standard/tests/strings/sprintf_variation11.phpt10
-rw-r--r--ext/standard/tests/strings/sprintf_variation16.phpt96
-rw-r--r--ext/standard/tests/strings/sprintf_variation17.phpt10
-rw-r--r--ext/standard/tests/strings/sprintf_variation18.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_variation2.phpt16
-rw-r--r--ext/standard/tests/strings/sprintf_variation30.phpt14
-rw-r--r--ext/standard/tests/strings/sprintf_variation42.phpt14
-rw-r--r--ext/standard/tests/strings/sprintf_variation48.phpt38
-rw-r--r--ext/standard/tests/strings/sprintf_variation5.phpt17
-rw-r--r--ext/standard/tests/strings/str_replace.phpt17
-rw-r--r--ext/standard/tests/strings/strcspn_variation1.phpt549
-rw-r--r--ext/standard/tests/strings/strcspn_variation2.phpt546
-rw-r--r--ext/standard/tests/strings/strcspn_variation3.phpt16
-rw-r--r--ext/standard/tests/strings/strcspn_variation4.phpt394
-rw-r--r--ext/standard/tests/strings/stripos_variation10.phpt6
-rw-r--r--ext/standard/tests/strings/strpos.phptbin9396 -> 9368 bytes
-rw-r--r--ext/standard/tests/strings/strpos_number.phpt15
-rw-r--r--ext/standard/tests/strings/strrchr_variation10.phpt6
-rw-r--r--ext/standard/tests/strings/strrchr_variation11.phpt8
-rw-r--r--ext/standard/tests/strings/strrpos_variation10.phpt6
-rw-r--r--ext/standard/tests/strings/strspn_variation1.phpt548
-rw-r--r--ext/standard/tests/strings/strspn_variation2.phpt66
-rw-r--r--ext/standard/tests/strings/strspn_variation3.phpt16
-rw-r--r--ext/standard/tests/strings/strspn_variation4.phpt16
-rw-r--r--ext/standard/tests/strings/strstr.phptbin10387 -> 10369 bytes
-rw-r--r--ext/standard/tests/strings/strtok_variation1.phpt344
-rw-r--r--ext/standard/tests/strings/ucwords_variation1.phpt12
-rw-r--r--ext/standard/tests/strings/vsprintf_variation1.phpt8
-rw-r--r--ext/standard/tests/strings/vsprintf_variation2.phpt10
-rw-r--r--ext/standard/tests/strings/wordwrap_variation1.phpt26
-rw-r--r--ext/standard/tests/strings/wordwrap_variation3.phpt16
-rw-r--r--ext/standard/tests/url/base64_decode_basic_001.phpt24
-rw-r--r--ext/standard/tests/url/base64_decode_basic_002.phpt47
-rw-r--r--ext/standard/tests/url/base64_decode_error_001.phpt38
-rw-r--r--ext/standard/tests/url/base64_decode_variation_001.phpt167
-rw-r--r--ext/standard/tests/url/base64_decode_variation_002.phpt177
-rw-r--r--ext/standard/tests/url/base64_encode_basic_001.phpt283
-rw-r--r--ext/standard/tests/url/base64_encode_error_001.phpt37
-rw-r--r--ext/standard/tests/url/base64_encode_variation_001.phpt167
-rw-r--r--ext/standard/tests/url/parse_url_basic_001.phpt899
-rw-r--r--ext/standard/tests/url/parse_url_basic_002.phpt151
-rw-r--r--ext/standard/tests/url/parse_url_basic_003.phpt150
-rw-r--r--ext/standard/tests/url/parse_url_basic_004.phpt150
-rw-r--r--ext/standard/tests/url/parse_url_basic_005.phpt150
-rw-r--r--ext/standard/tests/url/parse_url_basic_006.phpt150
-rw-r--r--ext/standard/tests/url/parse_url_basic_007.phpt150
-rw-r--r--ext/standard/tests/url/parse_url_basic_008.phpt150
-rw-r--r--ext/standard/tests/url/parse_url_basic_009.phpt150
-rw-r--r--ext/standard/tests/url/parse_url_basic_010.phpt31
-rw-r--r--ext/standard/tests/url/parse_url_error_001.phpt38
-rw-r--r--ext/standard/tests/url/parse_url_error_002.phpt47
-rw-r--r--ext/standard/tests/url/parse_url_variation_001.phpt221
-rw-r--r--ext/standard/tests/url/parse_url_variation_002_32bit.phpt200
-rw-r--r--ext/standard/tests/url/parse_url_variation_002_64bit.phpt184
-rw-r--r--ext/standard/tests/url/rawurldecode_error_001.phpt39
-rw-r--r--ext/standard/tests/url/rawurldecode_variation_001.phpt168
-rw-r--r--ext/standard/tests/url/rawurlencode_error_001.phpt39
-rw-r--r--ext/standard/tests/url/rawurlencode_variation_001.phpt168
-rw-r--r--ext/standard/tests/url/urldecode_error_001.phpt39
-rw-r--r--ext/standard/tests/url/urldecode_variation_001.phpt168
-rw-r--r--ext/standard/tests/url/urlencode_error_001.phpt39
-rw-r--r--ext/standard/tests/url/urlencode_variation_001.phpt168
-rw-r--r--ext/standard/tests/url/urls.inc109
-rw-r--r--ext/standard/type.c4
-rw-r--r--ext/standard/uniqid.c4
-rw-r--r--ext/standard/uniqid.h4
-rw-r--r--ext/standard/url.c4
-rw-r--r--ext/standard/url.h4
-rw-r--r--ext/standard/url_scanner.c4
-rw-r--r--ext/standard/url_scanner.h4
-rw-r--r--ext/standard/url_scanner_ex.c4
-rw-r--r--ext/standard/url_scanner_ex.c.orig4
-rw-r--r--ext/standard/url_scanner_ex.h4
-rw-r--r--ext/standard/url_scanner_ex.re4
-rw-r--r--ext/standard/user_filters.c4
-rw-r--r--ext/standard/uuencode.c4
-rw-r--r--ext/standard/var.c24
-rw-r--r--ext/standard/var_unserializer.c6
-rw-r--r--ext/standard/var_unserializer.c.orig6
-rw-r--r--ext/standard/var_unserializer.re6
-rw-r--r--ext/standard/versioning.c4
-rw-r--r--ext/sybase/php_sybase_db.c4
-rw-r--r--ext/sybase/php_sybase_db.h4
-rw-r--r--ext/sybase_ct/php_sybase_ct.c4
-rw-r--r--ext/sybase_ct/php_sybase_ct.h4
-rw-r--r--ext/sysvmsg/php_sysvmsg.h4
-rw-r--r--ext/sysvmsg/sysvmsg.c6
-rw-r--r--ext/sysvsem/php_sysvsem.h4
-rw-r--r--ext/sysvsem/sysvsem.c4
-rw-r--r--ext/sysvshm/php_sysvshm.h4
-rw-r--r--ext/sysvshm/sysvshm.c4
-rw-r--r--ext/tidy/php_tidy.h4
-rw-r--r--ext/tidy/tidy.c6
-rw-r--r--ext/tokenizer/php_tokenizer.h4
-rw-r--r--ext/tokenizer/tests/token_get_all_basic.phpt97
-rw-r--r--ext/tokenizer/tests/token_get_all_error.phpt35
-rw-r--r--ext/tokenizer/tests/token_get_all_variation1.phpt285
-rw-r--r--ext/tokenizer/tests/token_get_all_variation10.phpt781
-rw-r--r--ext/tokenizer/tests/token_get_all_variation11.phpt1147
-rw-r--r--ext/tokenizer/tests/token_get_all_variation12.phpt532
-rw-r--r--ext/tokenizer/tests/token_get_all_variation13.phpt1167
-rw-r--r--ext/tokenizer/tests/token_get_all_variation14.phpt289
-rw-r--r--ext/tokenizer/tests/token_get_all_variation15.phpt778
-rw-r--r--ext/tokenizer/tests/token_get_all_variation16.phpt1001
-rw-r--r--ext/tokenizer/tests/token_get_all_variation17.phpt611
-rw-r--r--ext/tokenizer/tests/token_get_all_variation18.phpt118
-rw-r--r--ext/tokenizer/tests/token_get_all_variation19.phpt88
-rw-r--r--ext/tokenizer/tests/token_get_all_variation2.phpt429
-rw-r--r--ext/tokenizer/tests/token_get_all_variation3.phpt568
-rw-r--r--ext/tokenizer/tests/token_get_all_variation4.phpt747
-rw-r--r--ext/tokenizer/tests/token_get_all_variation5.phpt798
-rw-r--r--ext/tokenizer/tests/token_get_all_variation6.phpt392
-rw-r--r--ext/tokenizer/tests/token_get_all_variation7.phpt259
-rw-r--r--ext/tokenizer/tests/token_get_all_variation8.phpt832
-rw-r--r--ext/tokenizer/tests/token_get_all_variation9.phpt441
-rw-r--r--ext/tokenizer/tokenizer.c4
-rw-r--r--ext/tokenizer/tokenizer_data.c4
-rw-r--r--ext/wddx/php_wddx.h4
-rw-r--r--ext/wddx/php_wddx_api.h4
-rw-r--r--ext/wddx/tests/001-64bit.phpt62
-rw-r--r--ext/wddx/tests/001.phpt3
-rw-r--r--ext/wddx/wddx.c4
-rw-r--r--ext/xml/compat.c2
-rw-r--r--ext/xml/expat_compat.h4
-rw-r--r--ext/xml/php_xml.h4
-rw-r--r--ext/xml/tests/bug43957.phpt13
-rw-r--r--ext/xml/xml.c22
-rw-r--r--ext/xmlreader/php_xmlreader.c4
-rw-r--r--ext/xmlreader/php_xmlreader.h4
-rw-r--r--ext/xmlrpc/php_xmlrpc.h4
-rw-r--r--ext/xmlrpc/tests/bug42736.phpt56
-rw-r--r--ext/xmlrpc/xmlrpc-epi-php.c9
-rw-r--r--ext/xmlwriter/php_xmlwriter.c4
-rw-r--r--ext/xmlwriter/php_xmlwriter.h4
-rw-r--r--ext/xsl/php_xsl.c4
-rw-r--r--ext/xsl/php_xsl.h4
-rw-r--r--ext/xsl/xsl_fe.h4
-rw-r--r--ext/xsl/xsltprocessor.c75
-rw-r--r--ext/zip/Makefile.frag28
-rw-r--r--ext/zip/config.m410
-rw-r--r--ext/zip/config.w323
-rw-r--r--ext/zip/lib/zip.h103
-rw-r--r--ext/zip/lib/zip_add.c2
-rw-r--r--ext/zip/lib/zip_add_dir.c4
-rw-r--r--ext/zip/lib/zip_alias.h45
-rw-r--r--ext/zip/lib/zip_close.c2
-rw-r--r--ext/zip/lib/zip_delete.c2
-rw-r--r--ext/zip/lib/zip_dirent.c18
-rw-r--r--ext/zip/lib/zip_entry_free.c2
-rw-r--r--ext/zip/lib/zip_entry_new.c2
-rw-r--r--ext/zip/lib/zip_error.c14
-rw-r--r--ext/zip/lib/zip_error_clear.c4
-rw-r--r--ext/zip/lib/zip_error_get.c2
-rw-r--r--ext/zip/lib/zip_error_get_sys_type.c2
-rw-r--r--ext/zip/lib/zip_error_strerror.c2
-rw-r--r--ext/zip/lib/zip_error_to_str.c2
-rw-r--r--ext/zip/lib/zip_fclose.c2
-rw-r--r--ext/zip/lib/zip_file_error_clear.c4
-rw-r--r--ext/zip/lib/zip_file_error_get.c2
-rw-r--r--ext/zip/lib/zip_file_get_offset.c2
-rw-r--r--ext/zip/lib/zip_file_strerror.c2
-rw-r--r--ext/zip/lib/zip_fopen.c2
-rw-r--r--ext/zip/lib/zip_fopen_index.c4
-rw-r--r--ext/zip/lib/zip_fread.c2
-rw-r--r--ext/zip/lib/zip_free.c2
-rw-r--r--ext/zip/lib/zip_get_archive_comment.c2
-rw-r--r--ext/zip/lib/zip_get_file_comment.c2
-rw-r--r--ext/zip/lib/zip_get_name.c4
-rw-r--r--ext/zip/lib/zip_get_num_files.c2
-rw-r--r--ext/zip/lib/zip_memdup.c2
-rw-r--r--ext/zip/lib/zip_name_locate.c11
-rw-r--r--ext/zip/lib/zip_new.c2
-rw-r--r--ext/zip/lib/zip_open.c4
-rw-r--r--ext/zip/lib/zip_rename.c2
-rw-r--r--ext/zip/lib/zip_replace.c4
-rw-r--r--ext/zip/lib/zip_set_archive_comment.c2
-rw-r--r--ext/zip/lib/zip_set_file_comment.c2
-rw-r--r--ext/zip/lib/zip_set_name.c2
-rw-r--r--ext/zip/lib/zip_source_buffer.c4
-rw-r--r--ext/zip/lib/zip_source_file.c2
-rw-r--r--ext/zip/lib/zip_source_filep.c4
-rw-r--r--ext/zip/lib/zip_source_free.c2
-rw-r--r--ext/zip/lib/zip_source_function.c2
-rw-r--r--ext/zip/lib/zip_source_zip.c2
-rw-r--r--ext/zip/lib/zip_stat.c2
-rw-r--r--ext/zip/lib/zip_stat_index.c2
-rw-r--r--ext/zip/lib/zip_stat_init.c2
-rw-r--r--ext/zip/lib/zip_strerror.c2
-rw-r--r--ext/zip/lib/zip_unchange.c4
-rw-r--r--ext/zip/lib/zip_unchange_all.c2
-rw-r--r--ext/zip/lib/zip_unchange_archive.c2
-rw-r--r--ext/zip/lib/zip_unchange_data.c2
-rw-r--r--ext/zip/lib/zip_win32.h7
-rw-r--r--ext/zip/lib/zipint.h77
-rw-r--r--ext/zip/lib/zipint_alias.h49
-rw-r--r--ext/zip/php_zip.c122
-rw-r--r--ext/zip/php_zip.h6
-rw-r--r--ext/zip/tests/oo_properties.phpt4
-rw-r--r--ext/zlib/php_zlib.h4
-rw-r--r--ext/zlib/tests/bug.tarbin0 -> 4720640 bytes
-rw-r--r--ext/zlib/tests/bug_40189.phpt25
-rw-r--r--ext/zlib/tests/bug_40189_2.phpt14
-rw-r--r--ext/zlib/tests/zlib_filter_inflate2.phpt41
-rw-r--r--ext/zlib/zlib.c4
-rw-r--r--ext/zlib/zlib_filter.c84
-rw-r--r--ext/zlib/zlib_fopen_wrapper.c4
-rw-r--r--main/SAPI.c10
-rw-r--r--main/SAPI.h4
-rw-r--r--main/fopen_wrappers.c8
-rw-r--r--main/fopen_wrappers.h5
-rw-r--r--main/internal_functions_nw.c4
-rw-r--r--main/internal_functions_win32.c4
-rw-r--r--main/logos.h4
-rw-r--r--main/main.c17
-rw-r--r--main/network.c25
-rw-r--r--main/output.c4
-rw-r--r--main/php.h4
-rw-r--r--main/php3_compat.h4
-rw-r--r--main/php_compat.h4
-rw-r--r--main/php_config.h.in4
-rw-r--r--main/php_content_types.c4
-rw-r--r--main/php_content_types.h4
-rw-r--r--main/php_globals.h4
-rw-r--r--main/php_ini.c4
-rw-r--r--main/php_ini.h4
-rw-r--r--main/php_logos.c4
-rw-r--r--main/php_logos.h4
-rw-r--r--main/php_main.h4
-rw-r--r--main/php_memory_streams.h4
-rw-r--r--main/php_network.h4
-rw-r--r--main/php_open_temporary_file.c4
-rw-r--r--main/php_open_temporary_file.h4
-rw-r--r--main/php_output.h4
-rw-r--r--main/php_reentrancy.h4
-rw-r--r--main/php_regex.h4
-rw-r--r--main/php_scandir.c4
-rw-r--r--main/php_scandir.h4
-rw-r--r--main/php_sprintf.c4
-rwxr-xr-xmain/php_streams.h4
-rw-r--r--main/php_syslog.h4
-rw-r--r--main/php_ticks.c4
-rw-r--r--main/php_ticks.h4
-rw-r--r--main/php_variables.c4
-rw-r--r--main/php_variables.h4
-rw-r--r--main/php_version.h6
-rw-r--r--main/reentrancy.c4
-rw-r--r--main/rfc1867.c14
-rw-r--r--main/rfc1867.h4
-rw-r--r--main/safe_mode.c17
-rw-r--r--main/safe_mode.h4
-rw-r--r--main/snprintf.c4
-rw-r--r--main/snprintf.h4
-rw-r--r--main/spprintf.c4
-rw-r--r--main/spprintf.h4
-rw-r--r--main/streams/cast.c4
-rw-r--r--main/streams/filter.c4
-rw-r--r--main/streams/memory.c7
-rw-r--r--main/streams/mmap.c4
-rw-r--r--main/streams/php_stream_context.h4
-rw-r--r--main/streams/php_stream_filter_api.h6
-rw-r--r--main/streams/php_stream_mmap.h4
-rw-r--r--main/streams/php_stream_plain_wrapper.h4
-rw-r--r--main/streams/php_stream_transport.h4
-rw-r--r--main/streams/php_stream_userspace.h4
-rw-r--r--main/streams/php_streams_int.h4
-rw-r--r--main/streams/plain_wrapper.c7
-rwxr-xr-xmain/streams/streams.c35
-rw-r--r--main/streams/transports.c4
-rw-r--r--main/streams/userspace.c4
-rw-r--r--main/streams/xp_socket.c10
-rw-r--r--main/strlcat.c4
-rw-r--r--main/strlcpy.c4
-rw-r--r--main/win95nt.h4
-rw-r--r--netware/start.c2
-rw-r--r--pear/install-pear-nozlib.phar3548
-rw-r--r--php.ini-dist2
-rw-r--r--php.ini-recommended2
-rw-r--r--regex/regerror.c2
-rw-r--r--regex/regexec.c2
-rw-r--r--regex/regfree.c2
-rwxr-xr-xrun-tests.php80
-rw-r--r--sapi/aolserver/aolserver.c6
-rw-r--r--sapi/apache/libpre.c4
-rw-r--r--sapi/apache/mod_php5.c4
-rw-r--r--sapi/apache/mod_php5.h4
-rw-r--r--sapi/apache/php_apache.c4
-rw-r--r--sapi/apache/php_apache_http.h4
-rw-r--r--sapi/apache/sapi_apache.c4
-rw-r--r--sapi/apache2filter/apache_config.c4
-rw-r--r--sapi/apache2filter/php_apache.h4
-rw-r--r--sapi/apache2filter/php_functions.c4
-rw-r--r--sapi/apache2filter/sapi_apache2.c4
-rw-r--r--sapi/apache2handler/apache_config.c4
-rw-r--r--sapi/apache2handler/mod_php5.c4
-rw-r--r--sapi/apache2handler/php_apache.h4
-rw-r--r--sapi/apache2handler/php_functions.c4
-rw-r--r--sapi/apache2handler/sapi_apache2.c6
-rw-r--r--sapi/apache_hooks/mod_php5.c4
-rw-r--r--sapi/apache_hooks/mod_php5.h4
-rw-r--r--sapi/apache_hooks/php_apache.c4
-rw-r--r--sapi/apache_hooks/sapi_apache.c4
-rw-r--r--sapi/caudium/caudium.c6
-rw-r--r--sapi/cgi/cgi_main.c42
-rw-r--r--sapi/cgi/fastcgi.c9
-rw-r--r--sapi/cgi/fastcgi.h4
-rw-r--r--sapi/cgi/getopt.c4
-rw-r--r--sapi/cgi/php_getopt.h4
-rw-r--r--sapi/cli/getopt.c4
-rw-r--r--sapi/cli/php.1.in4
-rw-r--r--sapi/cli/php_cli.c16
-rw-r--r--sapi/cli/php_cli_readline.c4
-rw-r--r--sapi/cli/php_cli_readline.h4
-rw-r--r--sapi/cli/php_getopt.h4
-rw-r--r--sapi/cli/tests/bug44564.phpt22
-rw-r--r--sapi/continuity/capi.c4
-rw-r--r--sapi/embed/php_embed.c41
-rw-r--r--sapi/embed/php_embed.h4
-rw-r--r--sapi/isapi/php5isapi.c4
-rw-r--r--sapi/milter/php_milter.c4
-rw-r--r--sapi/nsapi/nsapi.c8
-rw-r--r--sapi/phttpd/php_phttpd.h2
-rw-r--r--sapi/phttpd/phttpd.c2
-rw-r--r--sapi/pi3web/pi3web_sapi.c6
-rw-r--r--sapi/roxen/roxen.c6
-rw-r--r--sapi/thttpd/php_thttpd.h2
-rw-r--r--sapi/thttpd/thttpd.c4
-rw-r--r--sapi/tux/php_tux.c2
-rw-r--r--sapi/webjames/php_webjames.h2
-rw-r--r--sapi/webjames/webjames.c2
-rwxr-xr-xserver-tests.php2
-rw-r--r--tests/basic/026.phpt3
-rw-r--r--tests/classes/__call_003.phpt33
-rw-r--r--tests/classes/__call_004.phpt41
-rw-r--r--tests/classes/__call_005.phpt36
-rwxr-xr-xtests/classes/array_access_009.phpt8
-rwxr-xr-xtests/classes/array_access_010.phpt8
-rwxr-xr-xtests/classes/array_access_011.phpt8
-rw-r--r--tests/classes/assign_op_property_001.phpt4
-rw-r--r--tests/classes/autoload_007.phpt15
-rw-r--r--tests/classes/autoload_008.phpt26
-rw-r--r--tests/classes/autoload_009.phpt20
-rw-r--r--tests/classes/autoload_010.phpt18
-rw-r--r--tests/classes/autoload_011.phpt18
-rw-r--r--tests/classes/autoload_012.phpt16
-rw-r--r--tests/classes/autoload_013.phpt22
-rw-r--r--tests/classes/autoload_014.phpt22
-rw-r--r--tests/classes/autoload_015.phpt22
-rw-r--r--tests/classes/autoload_016.phpt23
-rw-r--r--tests/classes/autoload_017.phpt23
-rw-r--r--tests/classes/autoload_018.phpt48
-rw-r--r--tests/classes/autoload_019.phpt14
-rw-r--r--tests/classes/autoload_020.phpt17
-rw-r--r--tests/classes/bug27468.phpt2
-rw-r--r--tests/classes/constants_basic_001.phpt89
-rw-r--r--tests/classes/constants_basic_002.phpt32
-rw-r--r--tests/classes/constants_basic_003.inc5
-rw-r--r--tests/classes/constants_basic_003.phpt28
-rw-r--r--tests/classes/constants_basic_004.phpt99
-rw-r--r--tests/classes/constants_basic_005.phpt16
-rw-r--r--tests/classes/constants_basic_006.phpt43
-rw-r--r--tests/classes/constants_error_001.phpt13
-rw-r--r--tests/classes/constants_error_002.phpt12
-rw-r--r--tests/classes/constants_error_003.phpt20
-rw-r--r--tests/classes/constants_error_004.phpt13
-rw-r--r--tests/classes/constants_error_005.phpt12
-rw-r--r--tests/classes/constants_error_006.phpt16
-rw-r--r--tests/classes/constants_error_007.phpt15
-rw-r--r--tests/classes/final_ctor3.phpt15
-rw-r--r--tests/classes/incdec_property_001.phpt4
-rw-r--r--tests/classes/incdec_property_002.phpt4
-rw-r--r--tests/classes/incdec_property_003.phpt4
-rw-r--r--tests/classes/incdec_property_004.phpt4
-rw-r--r--tests/classes/inheritance_005.phpt42
-rw-r--r--tests/classes/interface_constant_inheritance_001.phpt17
-rw-r--r--tests/classes/interface_constant_inheritance_002.phpt17
-rw-r--r--tests/classes/interface_constant_inheritance_003.phpt20
-rw-r--r--tests/classes/interface_constant_inheritance_004.phpt18
-rw-r--r--tests/classes/interface_optional_arg_002.phpt24
-rw-r--r--tests/classes/method_call_variation_001.phpt37
-rw-r--r--tests/classes/method_override_optional_arg_001.phpt33
-rw-r--r--tests/classes/method_override_optional_arg_002.phpt22
-rw-r--r--tests/classes/new_001.phpt46
-rw-r--r--tests/classes/property_override_privateStatic_private.phpt33
-rw-r--r--tests/classes/property_override_privateStatic_privateStatic.phpt32
-rw-r--r--tests/classes/property_override_privateStatic_protected.phpt33
-rw-r--r--tests/classes/property_override_privateStatic_protectedStatic.phpt32
-rw-r--r--tests/classes/property_override_privateStatic_public.phpt33
-rw-r--r--tests/classes/property_override_privateStatic_publicStatic.phpt32
-rw-r--r--tests/classes/property_override_private_private.phpt34
-rw-r--r--tests/classes/property_override_private_privateStatic.phpt34
-rw-r--r--tests/classes/property_override_private_protected.phpt34
-rw-r--r--tests/classes/property_override_private_protectedStatic.phpt34
-rw-r--r--tests/classes/property_override_private_public.phpt34
-rw-r--r--tests/classes/property_override_private_publicStatic.phpt34
-rw-r--r--tests/classes/property_override_protectedStatic_private.phpt33
-rw-r--r--tests/classes/property_override_protectedStatic_privateStatic.phpt32
-rw-r--r--tests/classes/property_override_protectedStatic_protected.phpt33
-rw-r--r--tests/classes/property_override_protectedStatic_protectedStatic.phpt32
-rw-r--r--tests/classes/property_override_protectedStatic_public.phpt33
-rw-r--r--tests/classes/property_override_protectedStatic_publicStatic.phpt31
-rw-r--r--tests/classes/property_override_protected_private.phpt34
-rw-r--r--tests/classes/property_override_protected_privateStatic.phpt33
-rw-r--r--tests/classes/property_override_protected_protected.phpt34
-rw-r--r--tests/classes/property_override_protected_protectedStatic.phpt33
-rw-r--r--tests/classes/property_override_protected_public.phpt34
-rw-r--r--tests/classes/property_override_protected_publicStatic.phpt33
-rw-r--r--tests/classes/property_override_publicStatic_private.phpt33
-rw-r--r--tests/classes/property_override_publicStatic_privateStatic.phpt32
-rw-r--r--tests/classes/property_override_publicStatic_protected.phpt33
-rw-r--r--tests/classes/property_override_publicStatic_protectedStatic.phpt32
-rw-r--r--tests/classes/property_override_publicStatic_public.phpt33
-rw-r--r--tests/classes/property_override_publicStatic_publicStatic.phpt32
-rw-r--r--tests/classes/property_override_public_private.phpt34
-rw-r--r--tests/classes/property_override_public_privateStatic.phpt33
-rw-r--r--tests/classes/property_override_public_protected.phpt34
-rw-r--r--tests/classes/property_override_public_protectedStatic.phpt33
-rw-r--r--tests/classes/property_override_public_public.phpt34
-rw-r--r--tests/classes/property_override_public_publicStatic.phpt33
-rw-r--r--tests/classes/tostring_004.phpt56
-rw-r--r--tests/classes/type_hinting_004.phpt109
-rw-r--r--tests/lang/bug22592.phpt6
-rwxr-xr-xtests/lang/bug27439.phpt2
-rw-r--r--tests/lang/empty_variation.phpt14
-rw-r--r--tests/lang/inc_throw.inc5
-rw-r--r--tests/lang/include_files/echo.inc3
-rw-r--r--tests/lang/include_files/eval.inc3
-rw-r--r--tests/lang/include_files/function.inc3
-rw-r--r--tests/lang/include_variation1.phpt8
-rw-r--r--tests/lang/include_variation2.phpt9
-rw-r--r--tests/lang/include_variation3.phpt8
-rw-r--r--tests/lang/throw_variation_001.phpt14
-rw-r--r--win32/build/confutils.js12
-rw-r--r--win32/build/deplister.c4
-rw-r--r--win32/crypt_win32.h2
-rwxr-xr-xwin32/globals.c4
-rw-r--r--win32/grp.h4
-rw-r--r--win32/md5crypt.c4
-rw-r--r--win32/md5crypt.h4
-rwxr-xr-xwin32/php_win32_globals.h4
-rw-r--r--win32/select.c4
-rw-r--r--win32/select.h4
-rw-r--r--win32/syslog.h4
-rw-r--r--win32/winutil.c4
-rw-r--r--win32/winutil.h2
2455 files changed, 152550 insertions, 16749 deletions
diff --git a/EXTENSIONS b/EXTENSIONS
index 5403e9b3d..cd852ffe9 100644
--- a/EXTENSIONS
+++ b/EXTENSIONS
@@ -159,7 +159,7 @@ STATUS: Working
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: oci8
-PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
+PRIMARY MAINTAINER: Christopher Jones <sixd@php.net>, Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
diff --git a/NEWS b/NEWS
index 99bee7620..17f5343af 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,148 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-08 Nov 2007 , PHP 5.2.5
+01 May 2008, PHP 5.2.6
+- Fixed two possible crashes inside posix extension (Tony)
+- Fixed incorrect heredoc handling when label is used within the block.
+ (Matt)
+- Fixed possible stack buffer overflow in FastCGI SAPI. (Andrei Nigmatulin)
+- Fixed sending of uninitialized paddings which may contain some information. (Andrei Nigmatulin)
+- Fixed a bug in formatting timestamps when DST is active in the default timezone (Derick)
+- Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia, Stefan Esser)
+- Fix integer overflow in printf(). (Stas, Maksymilian Aciemowicz)
+- Fixed security issue detailed in CVE-2008-0599. (Rasmus)
+- Fixed potential memleak in stream filter parameter for zlib filter. (Greg)
+- Added Reflection API metadata for the methods of the DOM classes. (Sebastian)
+- Fixed weird behavior in CGI parameter parsing. (Dmitry, Hannes Magnusson)
+- Fixed a safe_mode bypass in cURL identified by Maksymilian Arciemowicz.
+ (Ilia)
+- Fixed a bug with PDO::FETCH_COLUMN|PDO::FETCH_GROUP mode when a column # by
+ which to group by data is specified. (Ilia)
+- Fixed segfault in filter extension when using callbacks. (Arnar Mar Sig,
+ Felipe)
+- Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream filter). (Greg)
+- Upgraded PCRE to version 7.6 (Nuno)
+
+- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
+- Fixed bug #44720 (Prevent crash within session_register()). (Scott)
+- Fixed bug #44703 (htmlspecialchars() does not detect bad character set argument). (Andy Wharmby)
+- Fixed bug #44673 (With CGI argv/argc starts from arguments, not from script) (Dmitry)
+- Fixed bug #44667 (proc_open() does not handle pipes with the mode 'wb' correctly). (Jani)
+- Fixed bug #44663 (Crash in imap_mail_compose if "body" parameter invalid). (Ilia)
+- Fixed bug #44650 (escaepshellscmd() does not check arg count). (Ilia)
+- Fixed bug #44613 (Crash inside imap_headerinfo()). (Ilia, jmessa)
+- Fixed bug #44603 (Order issues with Content-Type/Length headers on POST). (Ilia)
+- Fixed bug #44594 (imap_open() does not validate # of retries parameter). (Ilia)
+- Fixed bug #44591 (imagegif's filename parameter). (Felipe)
+- Fixed bug #44557 (Crash in imap_setacl when supplied integer as username) (Thomas Jarosch)
+- Fixed bug #44487 (call_user_method_array issues a warning when throwing an exception). (David Soria Parra)
+- Fixed bug #44478 (Inconsistent behaviour when assigning new nodes). (Rob, Felipe)
+- Fixed bug #44445 (email validator does not handle domains starting/ending with a -). (Ilia)
+- Fixed bug #44440 (st_blocks undefined under BeOS). (Felipe)
+- Fixed bug #44394 (Last two bytes missing from output). (Felipe)
+- Fixed bug #44388 (Crash inside exif_read_data() on invalid images) (Ilia)
+- Fixed bug #44373 (PDO_OCI extension compile failed). (Felipe)
+- Fixed bug #44333 (SEGFAULT when using mysql_pconnect() with client_flags). (Felipe)
+- Fixed bug #44306 (Better detection of MIPS processors on Windows). (Ilia)
+- Fixed bug #44242 (metaphone('CMXFXM') crashes PHP). (Felipe)
+- Fixed bug #44233 (MSG_PEEK undefined under BeOS R5). (jonathonfreeman at gmail dot com, Ilia)
+- Fixed bug #44216 (strftime segfaults on large negative value). (Derick)
+- Fixed bug #44209 (strtotime() doesn't support 64 bit timestamps on 64 bit platforms). (Derick)
+- Fixed bug #44206 (OCI8 selecting ref cursors leads to ORA-1000 maximum open cursors reached). (Oracle Corp.)
+- Fixed bug #44200 (A crash in PDO when no bound targets exists and yet bound parameters are present). (Ilia)
+- Fixed bug #44197 (socket array keys lost on socket_select). (Felipe)
+- Fixed bug #44191 (preg_grep messes up array index). (Felipe)
+- Fixed bug #44189 (PDO setAttribute() does not properly validate values for native numeric options). (Ilia)
+- Fixed bug #44184 (Double free of loop-variable on exception). (Dmitry)
+- Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error). (Ilia)
+- Fixed bug #44166 (Parameter handling flaw in PDO::getAvailableDrivers()). (Ilia)
+- Fixed bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)). (Felipe)
+- Fixed bug #44152 (Possible crash with syslog logging on ZTS builds). (Ilia)
+- Fixed bug #44141 (private parent constructor callable through static function). (Dmitry)
+- Fixed bug #44113 (OCI8 new collection creation can fail with OCI-22303). (Oracle Corp.)
+- Fixed bug #44069 (Huge memory usage with concatenation using . instead of .=). (Dmitry)
+- Fixed bug #44046 (crash inside array_slice() function with an invalid by-ref offset). (Ilia)
+- Fixed bug #44028 (crash inside stream_socket_enable_crypto() when enabling encryption without crypto type). (Ilia)
+- Fixed bug #44018 (RecursiveDirectoryIterator options inconsistancy). (Marcus)
+- Fixed bug #44008 (OCI8 incorrect usage of OCI-Lob->close crashes PHP). (Oracle Corp.)
+- Fixed bug #43998 (Two error messages returned for incorrect encoding for mb_strto[upper|lower]). (Rui)
+- Fixed bug #43994 (mb_ereg 'successfully' matching incorrect). (Rui)
+- Fixed bug #43954 (Memory leak when sending the same HTTP status code multiple times). (Scott)
+- Fixed bug #43927 (koi8r is missing from html_entity_decode()). (andy at demos dot su, Tony)
+- Fixed bug #43912 (Interbase column names are truncated to 31 characters). (Ilia)
+- Fixed bug #43875 (Two error messages returned for $new and $flag argument in mysql_connect()). (Hannes)
+- Fixed bug #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251). (phprus at gmail dot com, Tony)
+- Fixed bug #43841 (mb_strrpos offset is byte count for negative values). (Rui)
+- Fixed bug #43840 (mb_strpos bounds check is byte count rather than a character count). (Rui)
+- Fixed bug #43808 (date_create never fails (even when it should)). (Derick)
+- Fixed bug #43793 (zlib filter is unable to auto-detect gzip/zlib file headers). (Greg)
+- Fixed bug #43703 (Signature compatibility check broken). (Dmitry)
+- Fixed bug #43677 (Inconsistent behaviour of include_path set with php_value). (manuel at mausz dot at)
+- Fixed bug #43663 (Extending PDO class with a __call() function doesn't work). (David Soria Parra)
+- Fixed bug #43647 (Make FindFile use PATH_SEPARATOR instead of ";"). (Ilia)
+- Fixed bug #43635 (mysql extension ingores INI settings on NULL values passed to mysql_connect()). (Ilia)
+- Fixed bug #43620 (Workaround for a bug inside libcurl 7.16.2 that can result in a crash). (Ilia)
+- Fixed bug #43614 (incorrect processing of numerical string keys of array in arbitrary serialized data). (Dmitriy Buldakov, Felipe)
+- Fixed bug #43606 (define missing depencies of the exif extension). (crrodriguez at suse dot de)
+- Fixed bug #43589 (a possible infinite loop in bz2_filter.c). (Greg)
+- Fixed bug #43580 (removed bogus declaration of a non-existent php_is_url() function). (Ilia)
+- Fixed bug #43559 (array_merge_recursive() doesn't behave as expected with duplicate NULL values). (Felipe, Tony)
+- Fixed bug #43533 (escapeshellarg('') returns null). (Ilia)
+- Fixed bug #43527 (DateTime created from a timestamp reports environment timezone). (Derick)
+- Fixed bug #43522 (stream_get_line() eats additional characters). (Felipe, Ilia, Tony)
+- Fixed bug #43507 (SOAPFault HTTP Status 500 - would like to be able to set the HTTP Status). (Dmitry)
+- Fixed bug #43505 (Assign by reference bug). (Dmitry)
+- Fixed bug #43498 (file_exists() on a proftpd server got SIZE not allowed in ASCII mode). (Ilia, crrodriguez at suse dot de)
+- Fixed bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory). (Chris)
+- Fixed bug #43495 (array_merge_recursive() crashes with recursive arrays). (Ilia)
+- Fixed bug #43493 (pdo_pgsql does not send username on connect when password is not available). (Ilia)
+- Fixed bug #43491 (Under certain conditions, file_exists() never returns). (Dmitry)
+- Fixed bug #43483 (get_class_methods() does not list all visible methods). (Dmitry)
+- Fixed bug #43482 (array_pad() does not warn on very small pad numbers). (Ilia)
+- Fixed bug #43457 (Prepared statement with incorrect parms doesn't throw exception with pdo_pgsql driver). (Ilia)
+- Fixed bug #43450 (Memory leak on some functions with implicit object __toString() call). (David C.)
+- Fixed bug #43386 (array_globals not reset to 0 properly on init). (Ilia)
+- Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone). (Ilia)
+- Fixed bug #43373 (pcntl_fork() should not raise E_ERROR on error). (Ilia)
+- Fixed bug #43364 (recursive xincludes don't remove internal xml nodes properly). (Rob, patch from ddb@bitxtender.de)
+- Fixed bug #43301 (mb_ereg*_replace() crashes when replacement string is invalid PHP expression and 'e' option is used). (Jani)
+- Fixed bug #43295 (crash because of uninitialized SG(sapi_headers).mimetype). (Dmitry)
+- Fixed bug #43293 (Multiple segfaults in getopt()). (Hannes)
+- Fixed bug #43279 (pg_send_query_params() converts all elements in 'params' to strings). (Ilia)
+- Fixed bug #43276 (Incomplete fix for bug #42739, mkdir() under safe_mode). (Ilia)
+- Fixed bug #43248 (backward compatibility break in realpath()). (Dmitry)
+- Fixed bug #43221 (SimpleXML adding default namespace in addAttribute). (Rob)
+- Fixed bug #43216 (stream_is_local() returns false on "file://"). (Dmitry)
+- Fixed bug #43201 (Crash on using uninitialized vals and __get/__set). (Dmitry)
+- Fixed bug #43182 (file_put_contents() LOCK_EX does not work properly on file truncation). (Ilia)
+- Fixed bug #43175 (__destruct() throwing an exception with __call() causes segfault). (Dmitry)
+- Fixed bug #43128 (Very long class name causes segfault). (Dmitry)
+- Fixed bug #43105 (PHP seems to fail to close open files). (Hannes)
+- Fixed bug #43092 (curl_copy_handle() crashes with > 32 chars long URL). (Jani)
+- Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed using a timestamp). (Derick)
+- Fixed bug #42978 (mismatch between number of bound params and values causes a crash in pdo_pgsql). (Ilia)
+- Fixed bug #42945 (preg_split() swallows part of the string). (Nuno)
+- Fixed bug #42937 (__call() method not invoked when methods are called on parent from child class). (Dmitry)
+- Fixed bug #42841 (REF CURSOR and oci_new_cursor() crash PHP). (Chris)
+- Fixed bug #42838 (Wrong results in array_diff_uassoc) (Felipe)
+- Fixed bug #42779 (Incorrect forcing from HTTP/1.0 request to HTTP/1.1 response). (Ilia)
+- Fixed bug #42736 (xmlrpc_server_call_method() crashes). (Tony)
+- Fixed bug #42692 (Procedure 'int1' not present with doc/lit SoapServer). (Dmitry)
+- Fixed bug #42548 (mysqli PROCEDURE calls can't return result sets). (Hartmut)
+- Fixed bug #42505 (new sendmail default breaks on Netware platform) (Guenter Knauf)
+- Fixed bug #42369 (Implicit conversion to string leaks memory). (David C., Rob).
+- Fixed bug #42272 (var_export() incorrectly escapes char(0)). (Derick)
+- Fixed bug #42261 (Incorrect lengths for date and boolean data types). (Ilia)
+- Fixed bug #42190 (Constructing DateTime with TimeZone Indicator invalidates DateTimeZone). (Derick)
+- Fixed bug #42177 (Warning "array_merge_recursive(): recursion detected" comes again...). (Felipe)
+- Fixed bug #41941 (oci8 extension not lib64 savvy). (Chris)
+- Fixed bug #41828 (Failing to call RecursiveIteratorIterator::__construct() causes a sefault). (Etienne)
+- Fixed bug #41599 (setTime() fails after modify() is used). (Derick)
+- Fixed bug #41562 (SimpleXML memory issue). (Rob)
+- Fixed bug #40013 (php_uname() does not return nodename on Netware (Guenter Knauf)
+- Fixed bug #38468 (Unexpected creation of cycle). (Dmitry)
+- Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build) (stotty at tvnet dot hu)
+
+08 Nov 2007, PHP 5.2.5
- Upgraded PCRE to version 7.3 (Nuno)
- Added optional parameter $provide_object to debug_backtrace(). (Sebastian)
- Added alpha support for imagefilter() IMG_FILTER_COLORIZE. (Pierre)
@@ -23,16 +165,16 @@ PHP NEWS
- Fixed dl() to only accept filenames - reported by Laurent Gaffie. (Stas)
- Fixed dl() to limit argument size to MAXPATHLEN (CVE-2007-4887).
(Christian Hoffmann)
-- Fixed iconv_*() functions to limit argument sizes as workaround to libc
- bug (CVE-2007-4783, CVE-2007-4840 by Laurent Gaffie).
+- Fixed iconv_*() functions to limit argument sizes as workaround to libc
+ bug (CVE-2007-4783, CVE-2007-4840 by Laurent Gaffie).
(Christian Hoffmann, Stas)
- Fixed missing brackets leading to build warning and error in the log.
Win32 code. (Andrey)
- Fixed leaks with multiple connects on one mysqli object. (Andrey)
-- Fixed endianness detection on MacOS when building universal binary.
+- Fixed endianness detection on MacOS when building universal binary.
(Uwe Schindler, Christian Speich, Tony)
- Fixed possible triggering of buffer overflows inside glibc
- implementations of the fnmatch(), setlocale() and glob() functions.
+ implementations of the fnmatch(), setlocale() and glob() functions.
Reported by Laurent Gaffie. (Ilia)
- Fixed imagerectangle regression with 1x1 rectangle (libgd #106). (Pierre)
- Fixed htmlentities/htmlspecialchars not to accept partial multibyte
@@ -48,7 +190,7 @@ PHP NEWS
(Ilia)
- Fixed bug #43020 (Warning message is missing with shuffle() and more
than one argument). (Scott)
-- Fixed bug #42976 (Crash when constructor for newInstance() or
+- Fixed bug #42976 (Crash when constructor for newInstance() or
newInstanceArgs() fails) (Ilia)
- Fixed bug #42943 (ext/mssql: Move *timeout initialization from RINIT
to connect time). (Ilia)
@@ -61,7 +203,7 @@ PHP NEWS
- Fixed bug #42818 ($foo = clone(array()); leaks memory). (Dmitry)
- Fixed bug #42817 (clone() on a non-object does not result in a fatal
error). (Ilia)
-- Fixed bug #42785 (json_encode() formats doubles according to locale rather
+- Fixed bug #42785 (json_encode() formats doubles according to locale rather
then following standard syntax). (Ilia)
- Fixed bug #42783 (pg_insert() does not accept an empty list for
insertion). (Ilia)
@@ -69,7 +211,7 @@ PHP NEWS
- Fixed bug #42772 (Storing $this in a static var fails while handling a cast
to string). (Dmitry)
- Fixed bug #42767 (highlight_string() truncates trailing comment). (Ilia)
-- Fixed bug #42739 (mkdir() doesn't like a trailing slash when safe_mode is
+- Fixed bug #42739 (mkdir() doesn't like a trailing slash when safe_mode is
enabled). (Ilia)
- Fixed bug #42703 (Exception raised in an iterator::current() causes segfault
in FilterIterator) (Marcus)
@@ -83,7 +225,7 @@ PHP NEWS
- Fixed bug #42627 (bz2 extension fails to build with -fno-common).
(dolecek at netbsd dot org)
- Fixed Bug #42596 (session.save_path MODE option does not work). (Ilia)
-- Fixed bug #42590 (Make the engine recognize \v and \f escape sequences).
+- Fixed bug #42590 (Make the engine recognize \v and \f escape sequences).
(Ilia)
- Fixed bug #42587 (behavior change regarding symlinked .php files). (Dmitry)
- Fixed bug #42579 (apache_reset_timeout() does not exist). (Jani)
@@ -93,13 +235,15 @@ PHP NEWS
64-bit PHP). (Derick)
- Fixed bug #42506 (php_pgsql_convert() timezone parse bug) (nonunnet at
gmail dot com, Ilia)
-- Fixed bug #42462 (Segmentation when trying to set an attribute in a
+- Fixed bug #42496 (OCI8 cursor is not closed when using 2 clobs in a select
+ query). (Oracle Corp.)
+- Fixed bug #42462 (Segmentation when trying to set an attribute in a
DOMElement). (Rob)
- Fixed bug #42453 (CGI SAPI does not shut down cleanly with -i/-m/-v cmdline
options). (Dmitry)
- Fixed bug #42452 (PDO classes do not expose Reflection API information).
(Hannes)
-- Fixed bug #42468 (Write lock on file_get_contents fails when using a
+- Fixed bug #42468 (Write lock on file_get_contents fails when using a
compression stream). (Ilia)
- Fixed bug #42488 (SoapServer reports an encoding error and the error itself
breaks). (Dmitry)
@@ -112,7 +256,7 @@ PHP NEWS
- Fixed bug #42139 (XMLReader option constants are broken using XML()). (Rob)
- Fixed bug #42086 (SoapServer return Procedure '' not present for WSIBasic
compliant wsdl). (Dmitry)
-- Fixed bug #41822 (Relative includes broken when getcwd() fails). (Ab5602,
+- Fixed bug #41822 (Relative includes broken when getcwd() fails). (Ab5602,
Jani)
- Fixed bug #41561 (Values set with php_admin_* in httpd.conf can be overwritten
with ini_set()). (Stas, Jani)
@@ -126,11 +270,11 @@ PHP NEWS
- Improved openssl_x509_parse() to return extensions in readable form. (Dmitry)
-- Enabled changing the size of statement cache for non-persistent OCI8
+- Enabled changing the size of statement cache for non-persistent OCI8
connections. (Chris Jones, Tony)
-- Changed "display_errors" php.ini option to accept "stderr" as value which
- makes the error messages to be outputted to STDERR instead of STDOUT with
+- Changed "display_errors" php.ini option to accept "stderr" as value which
+ makes the error messages to be outputted to STDERR instead of STDOUT with
CGI and CLI SAPIs (FR #22839). (Jani)
- Changed error handler to send HTTP 500 instead of blank page on PHP errors.
(Dmitry, Andrei Nigmatulin)
@@ -152,7 +296,7 @@ PHP NEWS
(Andrey A. Belashkov, Tony)
- Added missing MSG_EOR and MSG_EOF constants to sockets extension. (Jani)
- Added PCRE_VERSION constant. (Tony)
-- Added ReflectionExtension::info() function to print the phpinfo()
+- Added ReflectionExtension::info() function to print the phpinfo()
block for an extension. (Johannes)
- Implemented FR #41884 (ReflectionClass::getDefaultProperties() does not
@@ -167,7 +311,7 @@ PHP NEWS
- Fixed integer overflow in str[c]spn(). (Stas)
- Fixed money_format() not to accept multiple %i or %n tokens.
(Stas, Ilia)
-- Fixed zend_alter_ini_entry() memory_limit interruption
+- Fixed zend_alter_ini_entry() memory_limit interruption
vulnerability. (Ilia)
- Fixed INFILE LOCAL option handling with MySQL extensions not to be
allowed when open_basedir or safe_mode is active. (Stas)
@@ -226,7 +370,7 @@ PHP NEWS
- Fixed bug #42151 (__destruct functions not called after catching a SoapFault
exception). (Dmitry)
- Fixed bug #42142 (substr_replace() returns FALSE when length > string length).
- (Ilia)
+ (Ilia)
- Fixed bug #42135 (Second call of session_start() causes creation of SID).
(Ilia)
- Fixed bug #42134 (oci_error() returns false after oci_new_collection() fails).
@@ -268,7 +412,7 @@ PHP NEWS
- Fixed bug #41909 (var_export() is locale sensitive when exporting float
values). (Derick)
- Fixed bug #41908 (CFLAGS="-Os" ./configure --enable-debug fails).
- (christian at hoffie dot info, Tony)
+ (christian at hoffie dot info, Tony)
- Fixed bug #41904 (proc_open(): empty env array should cause empty environment
to be passed to process). (Jani)
- Fixed bug #41867 (SimpleXML: getName is broken). (Rob)
@@ -388,11 +532,11 @@ PHP NEWS
- Optimized digest generation in md5() and sha1() functions. (Ilia)
- Upgraded bundled SQLite 3 to version 3.3.17. (Ilia)
-- Added "max_input_nesting_level" php.ini option to limit nesting level of
+- Added "max_input_nesting_level" php.ini option to limit nesting level of
input variables. Fix for MOPB-03-2007. (Stas)
-- Added a 4th parameter flag to htmlspecialchars() and htmlentities() that
+- Added a 4th parameter flag to htmlspecialchars() and htmlentities() that
makes the function not encode existing html entities. (Ilia)
-- Added PDO::FETCH_KEY_PAIR mode that will fetch a 2 column result set into
+- Added PDO::FETCH_KEY_PAIR mode that will fetch a 2 column result set into
an associated array. (Ilia)
- Added CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS cURL constants. (Sara)
- Added --ini switch to CLI that prints out configuration file names. (Marcus)
@@ -402,10 +546,10 @@ PHP NEWS
- Implemented FR #41416 (getColumnMeta() should also return table name). (Tony)
- Fixed an integer overflow inside chunk_split(). Identified by Gerhard Wagner.
- (Ilia)
+ (Ilia)
- Fixed SOAP extension's handler() to work even when
"always_populate_raw_post_data" is off. (Ilia)
-- Fixed possible infinite loop in imagecreatefrompng. (libgd #86)
+- Fixed possible infinite loop in imagecreatefrompng. (libgd #86)
(by Xavier Roche, CVE-2007-2756). (Pierre)
- Fixed ext/filter Email Validation Vulnerability (MOPB-45 by Stefan Esser).
(Ilia)
@@ -420,22 +564,22 @@ PHP NEWS
string keys). (Ilia)
- Fixed bug #41492 (open_basedir/safe_mode bypass inside realpath()). (Ilia)
- Fixed bug #41477 (no arginfo about SoapClient::__soapCall()). (Ilia)
-- Fixed bug #41455 (ext/dba/config.m4 pollutes global $LIBS and $LDFLAGS).
+- Fixed bug #41455 (ext/dba/config.m4 pollutes global $LIBS and $LDFLAGS).
(mmarek at suse dot cz, Tony)
- Fixed bug #41442 (imagegd2() under output control). (Tony)
-- Fixed bug #41430 (Fatal error with negative values of maxlen parameter of
+- Fixed bug #41430 (Fatal error with negative values of maxlen parameter of
file_get_contents()). (Tony)
-- Fixed bug #41423 (PHP assumes wrongly that certain ciphers are enabled in
+- Fixed bug #41423 (PHP assumes wrongly that certain ciphers are enabled in
OpenSSL). (Pierre)
-- Fixed bug #41421 (Uncaught exception from a stream wrapper segfaults).
+- Fixed bug #41421 (Uncaught exception from a stream wrapper segfaults).
(Tony, Dmitry)
-- Fixed bug #41403 (json_decode cannot decode floats if localeconv
+- Fixed bug #41403 (json_decode cannot decode floats if localeconv
decimal_point is not '.'). (Tony)
- Fixed bug #41401 (wrong unary operator precedence). (Stas)
- Fixed bug #41394 (dbase_create creates file with corrupted header). (Tony)
- Fixed bug #41390 (Clarify error message with invalid protocol scheme).
(Scott)
-- Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in
+- Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in
"Status:" header). (anight at eyelinkmedia dot com, Dmitry)
- Fixed bug #41374 (whole text concats values of wrong nodes). (Rob)
- Fixed bug #41358 (configure cannot determine SSL lib with libcurl >= 7.16.2).
@@ -451,10 +595,10 @@ PHP NEWS
- Fixed bug #41304 (compress.zlib temp files left). (Dmitry)
- Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
default post handler). (Ilia)
-- Fixed bug #41291 (FastCGI does not set SO_REUSEADDR).
+- Fixed bug #41291 (FastCGI does not set SO_REUSEADDR).
(fmajid at kefta dot com, Dmitry)
- Fixed gd build when used with freetype 1.x (Pierre, Tony)
-- Fixed bug #41287 (Namespace functions don't allow xmlns definition to be
+- Fixed bug #41287 (Namespace functions don't allow xmlns definition to be
optional). (Rob)
- Fixed bug #41285 (Improved fix for CVE-2007-1887 to work with non-bundled
sqlite2 lib). (Ilia)
@@ -463,7 +607,7 @@ PHP NEWS
- Fixed bug #41257 (lookupNamespaceURI does not work as expected). (Rob)
- Fixed bug #41236 (Regression in timeout handling of non-blocking SSL
connections during reads and writes). (Ilia)
-- Fixed bug #41134 (zend_ts_hash_clean not thread-safe).
+- Fixed bug #41134 (zend_ts_hash_clean not thread-safe).
(marco dot cova at gmail dot com, Tony)
- Fixed bug #41097 (ext/soap returning associative array as indexed without
using WSDL). (Dmitry)
@@ -474,9 +618,9 @@ PHP NEWS
03 May 2007, PHP 5.2.2
- Improved bundled GD
. Sync to 2.0.35
- . Added imagegrabwindow and imagegrabscreen, capture a screen or a
+ . Added imagegrabwindow and imagegrabscreen, capture a screen or a
window using its handle (Pierre)
- . colors allocated henceforth from the resulting image overwrite the palette
+ . colors allocated henceforth from the resulting image overwrite the palette
colors (Rob Leslie)
. Improved thread safety of the gif support (Roman Nemecek, Nuno, Pierre)
. Use the dimension of the GIF frame to create the destination image (Pierre)
@@ -501,7 +645,7 @@ PHP NEWS
- Added GMP_VERSION constant. (Tony)
- Added --ri switch to CLI which allows to check extension information. (Marcus)
- Added tidyNode::getParent() method (John, Nuno)
-- Added openbasedir and safemode checks in zip:// stream wrapper and
+- Added openbasedir and safemode checks in zip:// stream wrapper and
ZipArchive::open (Pierre)
- Added php_pdo_sqlite_external.dll, a version of the PDO SQLite driver that
links against an external sqlite3.dll. This provides Windows users to upgrade
@@ -521,14 +665,14 @@ PHP NEWS
- Fixed commandline handling for CLI and CGI. (Marcus, Johannes)
- Fixed iterator_apply() with a callback using __call(). (Johannes)
- Fixed possible multi bytes issues in openssl csr parser (Pierre)
-- Fixed shmop_open() with IPC_CREAT|IPC_EXCL flags on Windows.
+- Fixed shmop_open() with IPC_CREAT|IPC_EXCL flags on Windows.
(Vladimir Kamaev, Tony).
- Fixed possible leak in ZipArchive::extractTo when safemode checks fails (Ilia)
- Fixed possible relative path issues in zip_open and TS mode (old API) (Pierre)
- Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
- Fixed a thread safety issue in gd gif read code (Nuno, Roman Nemecek)
- Fixed CVE-2007-1001, GD wbmp used with invalid image size (Pierre)
-- Fixed unallocated memory access/double free in in array_user_key_compare()
+- Fixed unallocated memory access/double free in in array_user_key_compare()
(MOPB-24 by Stefan Esser) (Stas)
- Fixed wrong length calculation in unserialize S type
(MOPB-29 by Stefan Esser) (Stas)
@@ -547,14 +691,14 @@ PHP NEWS
- Fixed bug #40130 (TTF usage doesn't work properly under Netware). (Scott,
gk at gknw dot de)
- Fixed bug #41093 (magic_quotes_gpc ignores first arrays keys). (Arpad, Ilia)
-- Fixed bug #41075 (memleak when creating default object caused exception).
+- Fixed bug #41075 (memleak when creating default object caused exception).
(Dmitry)
- Fixed bug #41067 (json_encode() problem with UTF-16 input). (jp at df5ea
dot net. Ilia)
- Fixed bug #41063 (chdir doesn't like root paths). (Dmitry)
- Fixed bug #41061 ("visibility error" in ReflectionFunction::export()).
(Johannes)
-- Fixed bug #41043 (pdo_oci crash when freeing error text with persistent
+- Fixed bug #41043 (pdo_oci crash when freeing error text with persistent
connection). (Tony)
- Fixed bug #41037 (unregister_tick_function() inside the tick function crash PHP).
(Tony)
@@ -564,11 +708,11 @@ PHP NEWS
(Tony)
- Fixed bug #40999 (mcrypt_create_iv() not using random seed). (Ilia)
- Fixed bug #40998 (long session array keys are truncated). (Tony)
-- Implement feature request #40947, allow a single filter as argument
+- Implement feature request #40947, allow a single filter as argument
for filter_var_array (Pierre)
- Fixed bug #40935 (pdo_mysql does not raise an exception on empty
fetchAll()). (Ilia)
-- Fixed bug #40931 (open_basedir bypass via symlink and move_uploaded_file()).
+- Fixed bug #40931 (open_basedir bypass via symlink and move_uploaded_file()).
(Tony)
- Fixed bug #40921 (php_default_post_reader crashes when post_max_size is
exceeded). (trickie at gmail dot com, Ilia)
@@ -576,33 +720,33 @@ PHP NEWS
- Fixed bug #40899 (memory leak when nesting list()). (Dmitry)
- Fixed bug #40897 (error_log file not locked). (Ilia)
- Fixed bug #40883 (mysql_query() is allocating memory incorrectly). (Tony)
-- Fixed bug #40872 (inconsistency in offsetSet, offsetExists treatment of
+- Fixed bug #40872 (inconsistency in offsetSet, offsetExists treatment of
string enclosed integers). (Marcus)
- Fixed bug #40861 (strtotime() doesn't handle double negative relative time
units correctly). (Derick, Ilia)
-- Fixed bug #40854 (imap_mail_compose() creates an invalid terminator for
+- Fixed bug #40854 (imap_mail_compose() creates an invalid terminator for
multipart e-mails). (Ilia)
- Fixed bug #40848 (sorting issue on 64-bit Solaris). (Wez)
- Fixed bug #40836 (Segfault in ext/dom). (Rob)
- Fixed bug #40833 (Crash when using unset() on an ArrayAccess object retrieved
via __get()). (Dmitry)
- Fixed bug #40822 (pdo_mysql does not return rowCount() on select). (Ilia)
-- Fixed bug #40815 (using strings like "class::func" and static methods in
+- Fixed bug #40815 (using strings like "class::func" and static methods in
set_exception_handler() might result in crash). (Tony)
- Fixed bug #40809 (Poor performance of ".="). (Dmitry)
- Fixed bug #40805 (Failure executing function ibase_execute()). (Tony)
- Fixed bug #40800 (cannot disable memory_limit with -1). (Dmitry, Tony)
-- Fixed bug #40794 (ReflectionObject::getValues() may crash when used with
+- Fixed bug #40794 (ReflectionObject::getValues() may crash when used with
dynamic properties). (Tony)
- Fixed bug #40784 (Case sensitivity in constructor's fallback). (Tony)
- Fixed bug #40770 (Apache child exits when PHP memory limit reached). (Dmitry)
-- Fixed bug #40764 (line thickness not respected for horizontal and vertical
+- Fixed bug #40764 (line thickness not respected for horizontal and vertical
lines). (Pierre)
- Fixed bug #40758 (Test fcgi_is_fastcgi() is wrong on windows). (Dmitry)
- Fixed bug #40754 (added substr() & substr_replace() overflow checks). (Ilia)
-- Fixed bug #40752 (parse_ini_file() segfaults when a scalar setting is
+- Fixed bug #40752 (parse_ini_file() segfaults when a scalar setting is
redeclared as an array). (Tony)
-- Fixed bug #40750 (openssl stream wrapper ignores default_stream_timeout).
+- Fixed bug #40750 (openssl stream wrapper ignores default_stream_timeout).
(Tony)
- Fixed bug #40727 (segfault in PDO when failed to bind parameters). (Tony)
- Fixed bug #40709 (array_reduce() behaves strange with one item stored arrays).
@@ -614,12 +758,12 @@ PHP NEWS
- Fixed bug #40621 (Crash when constructor called inappropriately). (Tony)
- Fixed bug #40609 (Segfaults when using more than one SoapVar in a request).
(Rob, Dmitry)
-- Fixed bug #40606 (umask is not being restored when request is finished).
+- Fixed bug #40606 (umask is not being restored when request is finished).
(Tony)
- Fixed bug #40598 (libxml segfault). (Rob)
- Fixed bug #40591 (list()="string"; gives invalid opcode). (Dmitry)
- Fixed bug #40578 (imagettftext() multithreading issue). (Tony, Pierre)
-- Fixed bug #40576 (double values are truncated to 6 decimal digits when
+- Fixed bug #40576 (double values are truncated to 6 decimal digits when
encoding). (Tony)
- Fixed bug #40560 (DIR functions do not work on root UNC path). (Dmitry)
- Fixed bug #40548 (SplFileInfo::getOwner/getGroup give a warning on broken
@@ -627,20 +771,20 @@ PHP NEWS
- Fixed bug #40546 (SplFileInfo::getPathInfo() throws an exception if directory
is in root dir). (Marcus)
- Fixed bug #40545 (multithreading issue in zend_strtod()). (Tony)
-- Fixed bug #40503 (json_encode() value corruption on 32bit systems with
+- Fixed bug #40503 (json_encode() value corruption on 32bit systems with
overflown values). (Ilia)
- Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice
- include minOccurs=0). (Dmitry)
+ include minOccurs=0). (Dmitry)
- Fixed bug #40465 (Ensure that all PHP elements are printed by var_dump).
(wharmby at uk dot ibm dot com, Ilia)
- Fixed bug #40464 (session.save_path wont use default-value when safe_mode
or open_basedir is enabled). (Ilia)
-- Fixed bug #40455 (proc_open() uses wrong command line when safe_mode_exec_dir
+- Fixed bug #40455 (proc_open() uses wrong command line when safe_mode_exec_dir
is set). (Tony)
- Fixed bug #40432 (strip_tags() fails with greater than in attribute). (Ilia)
-- Fixed bug #40431 (dynamic properties may cause crash in ReflectionProperty
+- Fixed bug #40431 (dynamic properties may cause crash in ReflectionProperty
methods). (Tony)
-- Fixed bug #40451 (addAttribute() may crash when used with non-existent child
+- Fixed bug #40451 (addAttribute() may crash when used with non-existent child
node). (Tony)
- Fixed bug #40442 (ArrayObject::offsetExists broke in 5.2.1, works in 5.2.0).
(olivier at elma dot fr, Marcus)
@@ -650,7 +794,7 @@ PHP NEWS
- Fixed bug #40414 (possible endless fork() loop when running fastcgi).
(Dmitry)
- Fixed bug #40410 (ext/posix does not compile on MacOS 10.3.9). (Tony)
-- Fixed bug #40392 (memory leaks in PHP milter SAPI).
+- Fixed bug #40392 (memory leaks in PHP milter SAPI).
(tuxracer69 at gmail dot com, Tony)
- Fixed bug #40371 (pg_client_encoding() not working on Windows). (Edin)
- Fixed bug #40352 (FCGI_WEB_SERVER_ADDRS function get lost). (Dmitry)
@@ -676,30 +820,30 @@ PHP NEWS
- Fixed bug #36496 (SSL support in imap_open() not working on Windows). (Edin)
- Fixed bug #36226 (Inconsistent handling when passing nillable arrays).
(Dmitry)
-- Fixed bug #35872 (Avoid crash caused by object store being referenced during
- RSHUTDOWN). (Andy)
+- Fixed bug #35872 (Avoid crash caused by object store being referenced during
+ RSHUTDOWN). (Andy)
- Fixed bug #34794 (proc_close() hangs when used with two processes).
(jdolecek at netbsd dot org, Nuno)
-- Fixed PECL bug #10194 (crash in Oracle client when memory limit reached in
+- Fixed PECL bug #10194 (crash in Oracle client when memory limit reached in
the callback). (Tony)
- Fixed substr_compare and substr_count information leak (MOPB-14) (Stas, Ilia)
- Fixed crash on op-assign where argument is string offset (Brian, Stas)
-- Fixed bug #38710 (data leakage because of nonexisting boundary checking in
+- Fixed bug #38710 (data leakage because of nonexisting boundary checking in
statements in mysqli) (Stas)
- Fixed bug #37386 (autocreating element doesn't assign value to first node).
(Rob)
- Fixed bug #37013 (server hangs when returning circular object references).
(Dmitry)
-- Fixed bug #33664 Console window appears when using exec()
+- Fixed bug #33664 Console window appears when using exec()
(Richard Quadling, Stas)
08 Feb 2007, PHP 5.2.1
-- Added read-timeout context option "timeout" for HTTP streams. (Hannes, Ilia).
+- Added read-timeout context option "timeout" for HTTP streams. (Hannes, Ilia).
- Added CURLOPT_TCP_NODELAY constant to Curl extension. (Sara)
- Added support for hex numbers of any size. (Matt)
-- Added function stream_socket_shutdown(). It is a wrapper for system
- shutdown() function, that shut downs part of a full-duplex connection.
+- Added function stream_socket_shutdown(). It is a wrapper for system
+ shutdown() function, that shut downs part of a full-duplex connection.
(Dmitry)
- Added internal heap protection (Dmitry)
. memory-limit is always enabled (--enable-memory-limit removed)
@@ -713,7 +857,7 @@ PHP NEWS
. xmlwriter_start_dtd_entity()
. xmlwriter_end_dtd_entity()
. xmlwriter_write_dtd_entity()
-- Added a meta tag to phpinfo() output to prevent search engines from indexing
+- Added a meta tag to phpinfo() output to prevent search engines from indexing
the page. (Ilia)
- Added new function, sys_get_temp_dir(). (Hartmut)
- Added missing object support to file_put_contents(). (Ilia)
@@ -722,7 +866,7 @@ PHP NEWS
- Added optimization for imageline with horizontal and vertical lines (Pierre)
- Removed dependency from SHELL32.DLL. (Dmitry)
-- Removed double "wrong parameter count" warnings in various functions.
+- Removed double "wrong parameter count" warnings in various functions.
(Hannes)
- Moved extensions to PECL:
. ext/informix (Derick, Tony)
@@ -730,14 +874,14 @@ PHP NEWS
- Changed double-to-string utilities to use BSD implementation. (Dmitry, Tony)
- Updated bundled libcURL to version 7.16.0 in the Windows distro. (Edin)
- Updated timezone database to version 2006.16. (Derick)
-- cgi.* and fastcgi.* directives are moved to INI subsystem. The new directive
- cgi.check_shebang_line can be used to omitting check for "#! /usr/bin/php"
+- cgi.* and fastcgi.* directives are moved to INI subsystem. The new directive
+ cgi.check_shebang_line can be used to omitting check for "#! /usr/bin/php"
line. (Dmitry).
-- Improved proc_open(). Now on Windows it can run external commands not
+- Improved proc_open(). Now on Windows it can run external commands not
through CMD.EXE. (Dmitry)
- VCWD_REALPATH() is improved to use realpath cache without VIRTUAL_DIR.
(Dmitry)
-- ext/bcmath initialization code is moved from request startup to module
+- ext/bcmath initialization code is moved from request startup to module
startup. (Dmitry)
- Zend Memory Manager Improvements (Dmitry)
. use HeapAlloc() instead of VirtualAlloc()
@@ -750,9 +894,9 @@ PHP NEWS
. Fixed a bug when callback function returns a non-modified value.
. Added filter support for $_SERVER in cgi/apache2 sapis.
. Make sure PHP_SELF is filtered in Apache 1 sapi.
- . Fixed bug #39358 (INSTALL_HEADERS contains incorrect reference to
+ . Fixed bug #39358 (INSTALL_HEADERS contains incorrect reference to
php_filter.h).
- . Added "default" option that allows a default value to be set for an
+ . Added "default" option that allows a default value to be set for an
invalid or missing value.
. Invalid filters fails instead of returning unsafe value
. Fixed possible double encoding problem with sanitizing filters
@@ -769,50 +913,50 @@ PHP NEWS
- Windows related optimizations (Dmitry, Stas)
. COM initialization/deinitialization are done only if necessary
. removed unnecessary checks for ISREG file and corresponding stat() calls
- . opendir() is reimplementation using GetFistFile/GetNextFile those are
+ . opendir() is reimplementation using GetFistFile/GetNextFile those are
faster then _findfirst/_findnext
- . implemented registry cache that prevent registry lookup on each request.
- In case of modification of corresponding registry-tree PHP will reload it
+ . implemented registry cache that prevent registry lookup on each request.
+ In case of modification of corresponding registry-tree PHP will reload it
automatic
. start timeout thread only if necessary
- . stat() is reimplementation using GetFileAttributesEx(). The new
+ . stat() is reimplementation using GetFileAttributesEx(). The new
implementation is faster then implementation in MS VC CRT, but it doesn't
support Windows 95.
- Streams optimization (Dmitry)
. removed unnecessary ftell() calls (one call for each included PHP file)
. disabled calls to read() after EOF
-- Fixed incorrect function names on FreeBSD where inet_pton() was named
+- Fixed incorrect function names on FreeBSD where inet_pton() was named
__inet_pton() and inet_ntop() was named __inet_ntop(). (Hannes)
- Fixed FastCGI impersonation for persistent connections on Windows. (Dmitry)
- Fixed wrong signature initialization in imagepng (Takeshi Abe)
- Fixed ftruncate() with negative size on FreeBSD. (Hannes)
- Fixed segfault in RegexIterator when given invalid regex. (Hannes)
- Fixed segfault in SplFileObject->openFile()->getPathname(). (Hannes)
-- Fixed segfault in ZTS mode when OCI8 statements containing sub-statements
+- Fixed segfault in ZTS mode when OCI8 statements containing sub-statements
are destroyed in wrong order. (Tony)
- Fixed the validate email filter so that the letter "v" can also be used in
the user part of the email address. (Derick)
-- Fixed bug #40297 (compile failure in ZTS mode when collections support is
+- Fixed bug #40297 (compile failure in ZTS mode when collections support is
missing). (Tony)
- Fixed bug #40285 (The PDO prepare parser goes into an infinite loop in
some instances). (Ilia)
- Fixed bug #40274 (Sessions fail with numeric root keys). (Ilia)
- Fixed bug #40259 (ob_start call many times - memory error). (Dmitry)
- Fixed bug #40231 (file_exists incorrectly reports false). (Dmitry)
-- Fixed bug #40228 (ZipArchive::extractTo does create empty directories
+- Fixed bug #40228 (ZipArchive::extractTo does create empty directories
recursively). (Pierre)
-- Fixed bug #40200 (The FastCgi version has different realpath results than
+- Fixed bug #40200 (The FastCgi version has different realpath results than
thread safe version). (Dmitry)
-- Fixed bug #40191 (use of array_unique() with objects triggers segfault).
+- Fixed bug #40191 (use of array_unique() with objects triggers segfault).
(Tony)
- Fixed bug #40189 (possible endless loop in zlib.inflate stream filter).
(Greg, Tony)
-- Fixed bug #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2).
+- Fixed bug #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2).
(Tony)
-- Fixed bug #40129 (iconv extension doesn't compile with CodeWarrior on
+- Fixed bug #40129 (iconv extension doesn't compile with CodeWarrior on
Netware). (gk at gknw dot de, Tony)
-- Fixed bug #40127 (apache2handler doesn't compile on Netware).
+- Fixed bug #40127 (apache2handler doesn't compile on Netware).
(gk at gknw dot de)
- Fixed bug #40121 (PDO_DBLIB driver wont free statements). (Ilia)
- Fixed bug #40098 (php_fopen_primary_script() not thread safe). (Ilia)
@@ -824,10 +968,10 @@ PHP NEWS
(Ilia, wharmby at uk dot ibm dot com)
- Fixed bug #40078 (ORA-01405 when fetching NULL values using
oci_bind_array_by_name()). (Tony)
-- Fixed bug #40076 (zend_alloc.c: Value of enumeration constant must be in
+- Fixed bug #40076 (zend_alloc.c: Value of enumeration constant must be in
range of signed integer). (Dmitry)
- Fixed bug #40073 (exif_read_data dies on certain images). (Tony, Marcus)
-- Fixed bug #40036 (empty() does not work correctly with ArrayObject when
+- Fixed bug #40036 (empty() does not work correctly with ArrayObject when
using ARRAY_AS_PROPS). (Ilia)
- Fixed bug #40012 (php_date.c doesn't compile on Netware).
(gk at gknw dot de, Derick)
@@ -837,25 +981,25 @@ PHP NEWS
- Fixed bug #39990 (Cannot "foreach" over overloaded properties). (Dmitry)
- Fixed bug #39988 (type argument of oci_define_by_name() is ignored).
(Chris Jones, Tony)
-- Fixed bug #39984 (redirect response code in header() could be ignored
+- Fixed bug #39984 (redirect response code in header() could be ignored
in CGI sapi). (Ilia)
-- Fixed bug #39979 (PGSQL_CONNECT_FORCE_NEW will causes next connect to
+- Fixed bug #39979 (PGSQL_CONNECT_FORCE_NEW will causes next connect to
establish a new connection). (Ilia)
-- Fixed bug #39971 (pg_insert/pg_update do not allow now() to be used
+- Fixed bug #39971 (pg_insert/pg_update do not allow now() to be used
for timestamp fields). (Ilia)
-- Fixed bug #39969 (ini setting short_open_tag has no effect when using
+- Fixed bug #39969 (ini setting short_open_tag has no effect when using
--enable-maintainer-zts). (Dmitry)
- Fixed bug #39952 (zip ignoring --with-libdir on zlib checks)
(judas dot iscariote at gmail dot com)
- Fixed bug #39944 (References broken). (Dmitry)
-- Fixed bug #39935 (Extensions tidy,mcrypt,mhash,pdo_sqlite ignores
+- Fixed bug #39935 (Extensions tidy,mcrypt,mhash,pdo_sqlite ignores
--with-libdir). (judas dot iscariote at gmail dot com, Derick)
- Fixed bug #39903 (Notice message when executing __halt_compiler() more than
once). (Tony)
- Fixed bug #39898 (FILTER_VALIDATE_URL validates \r\n\t etc). (Ilia)
- Fixed bug #39890 (using autoconf 2.6x and --with-layout=GNU breaks PEAR
install path). (Tony)
-- Fixed bug #39884 (ReflectionParameter::getClass() throws exception for
+- Fixed bug #39884 (ReflectionParameter::getClass() throws exception for
type hint self). (thekid at php dot net)
- Fixed bug #39878 (CURL doesn't compile on Sun Studio Pro). (Ilia)
- Fixed bug #39873 (number_format() breaks with locale & decimal points).
@@ -867,30 +1011,30 @@ PHP NEWS
- Fixed bug #39846 (Invalid IPv4 treated as valid). (Ilia)
- Fixed bug #39845 (Persistent connections generate a warning in pdo_pgsql).
(Ilia)
-- Fixed bug #39832 (SOAP Server: parameter not matching the WSDL specified
+- Fixed bug #39832 (SOAP Server: parameter not matching the WSDL specified
type are set to 0). (Dmitry)
- Fixed bug #39825 (foreach produces memory error). (Dmitry)
-- Fixed bug #39816 (apxs2filter ignores httpd.conf & .htaccess php config
+- Fixed bug #39816 (apxs2filter ignores httpd.conf & .htaccess php config
settings). (Ilia)
- Fixed bug #39815 (SOAP double encoding is not locale-independent). (Dmitry)
-- Fixed bug #39797 (virtual() does not reset changed INI settings). (Ilia)
-- Fixed bug #39795 (build fails on AIX because crypt_r() uses different
+- Fixed bug #39797 (virtual() does not reset changed INI settings). (Ilia)
+- Fixed bug #39795 (build fails on AIX because crypt_r() uses different
data struct). (Tony)
-- Fixed bug #39791 (Crash in strtotime() on overly long relative date
+- Fixed bug #39791 (Crash in strtotime() on overly long relative date
multipliers). (Ilia)
- Fixed bug #39787 (PHP doesn't work with Apache 2.3).
(mv at binarysec dot com).
-- Fixed bug #39782 (setTime() on a DateTime constructed with a Weekday
+- Fixed bug #39782 (setTime() on a DateTime constructed with a Weekday
yields incorrect results). (Ilia)
- Fixed bug #39780 (PNG image with CRC/data error raises fatal error) (Pierre)
- Fixed bug #39779 (Enable AUTH PLAIN mechanism in underlying libc-client).
(michael dot heimpold at s2000 dot tu-chemnitz dot de, Ilia)
- Fixed bug #39775 ("Indirect modification ..." message is not shown).
(Dmitry)
-- Fixed bug #39763 (magic quotes are applied twice by ext/filter in
- parse_str()). (Ilia)
+- Fixed bug #39763 (magic quotes are applied twice by ext/filter in
+ parse_str()). (Ilia)
- Fixed bug #39760 (cloning fails on nested SimpleXML-Object). (Rob)
-- Fixed bug #39759 (Can't use stored procedures fetching multiple result
+- Fixed bug #39759 (Can't use stored procedures fetching multiple result
sets in pdo_mysql). (Ilia)
- Fixed bug #39754 (Some POSIX extension functions not thread safe).
(Ilia, wharmby at uk dot ibm dot com)
@@ -904,17 +1048,17 @@ PHP NEWS
- Fixed bug #39685 (iconv() - undefined function). (Hannes)
- Fixed bug #39673 (file_get_contents causes bus error on certain offsets).
(Tony)
-- Fixed bug #39663 (Memory leak in pg_get_notify() and a possible memory
+- Fixed bug #39663 (Memory leak in pg_get_notify() and a possible memory
corruption on Windows in pgsql and pdo_pgsql extensions).
(Ilia, matteo at beccati dot com)
-- Fixed bug #39662 (Segfault when calling asXML() of a cloned
+- Fixed bug #39662 (Segfault when calling asXML() of a cloned
SimpleXMLElement). (Rob, Tony)
- Fixed bug #39656 (crash when calling fetch() on a PDO statment object after
closeCursor()). (Ilia, Tony)
- Fixed bug #39653 (ext/dba doesn't check for db-4.5 and db-4.4 when db4
support is enabled). (Tony)
- Fixed bug #39652 (Wrong negative results from memory_get_usage()). (Dmitry)
-- Fixed bug #39648 (Implementation of PHP functions chown() and chgrp() are
+- Fixed bug #39648 (Implementation of PHP functions chown() and chgrp() are
not thread safe). (Ilia, wharmby at uk dot ibm dot com)
- Fixed bug #39640 (Segfault with "Allowed memory size exhausted"). (Dmitry)
- Fixed bug #39625 (Apache crashes on importStylesheet call). (Rob)
@@ -929,23 +1073,23 @@ PHP NEWS
- Fixed bug #39596 (Creating Variant of type VT_ARRAY). (Rob)
- Fixed bug #39583 (ftp_put() does not change transfer mode to ASCII). (Tony)
- Fixed bug #39576 (array_walk() doesn't separate user data zval). (Tony)
-- Fixed bug #39575 (move_uploaded_file() no longer working (safe mode
+- Fixed bug #39575 (move_uploaded_file() no longer working (safe mode
related)). (Tony)
- Fixed bug #39571 (timeout ssl:// connections). (Ilia)
-- Fixed bug #39564 (PDO::errorInfo() returns inconsistent information when
+- Fixed bug #39564 (PDO::errorInfo() returns inconsistent information when
sqlite3_step() fails). (Tony)
- Fixed bug #39548 (ZMSG_LOG_SCRIPT_NAME not routed to OutputDebugString()
on Windows). (Dmitry)
- Fixed bug #39538 (fgetcsv can't handle starting newlines and trailing odd
number of backslashes). (David Soria Parra, Pierre)
-- Fixed bug #39534 (Error in maths to calculate of
+- Fixed bug #39534 (Error in maths to calculate of
ZEND_MM_ALIGNED_MIN_HEADER_SIZE). (wharmby at uk dot ibm dot com, Dmitry)
- Fixed bug #39527 (Failure to retrieve results when multiple unbuffered,
prepared statements are used in pdo_mysql). (Ilia)
- Fixed bug #39508 (imagefill crashes with small images 3 pixels or less).
(Pierre)
- Fixed bug #39506 (Archive corrupt with ZipArchive::addFile method). (Pierre)
-- Fixed bug #39504 (xmlwriter_write_dtd_entity() creates Attlist tag, not
+- Fixed bug #39504 (xmlwriter_write_dtd_entity() creates Attlist tag, not
entity). (Hannes)
- Fixed bug #39483 (Problem with handling of \ char in prepared statements).
(Ilia, suhachov at gmail dot com)
@@ -973,7 +1117,7 @@ PHP NEWS
number of connection retries). (Ilia)
- Fixed bugs #39361 & #39400 (mbstring function overloading problem). (Seiji)
- Fixed bug #39354 (Allow building of curl extension against libcurl
- 7.16.0). (Ilia)
+ 7.16.0). (Ilia)
- Fixed bug #39350 (crash with implode("\n", array(false))). (Ilia)
- Fixed bug #39344 (Unnecessary calls to OnModify callback routine for
an extension INI directive). (wharmby at uk dot ibm dot com, Dmitry)
@@ -1010,7 +1154,7 @@ PHP NEWS
- Fixed bug #38542 (proc_get_status() returns wrong PID on windows). (Nuno)
- Fixed bug #38536 (SOAP returns an array of values instead of an object).
(Dmitry)
-- Fixed bug #38456 (Apache2 segfaults when virtual() is called in .php
+- Fixed bug #38456 (Apache2 segfaults when virtual() is called in .php
ErrorDocument). (Ilia)
- Fixed bug #38325 (spl_autoload_register() gives wrong line for "class not
found"). (Ilia)
@@ -1051,9 +1195,9 @@ PHP NEWS
- Fixed bug #33386 (ScriptControl only sees last function of class). (Rob)
- Fixed bug #33282 (Re-assignment by reference does not clear the is_ref
flag) (Ilia, Dmitry, Matt Wilmas)
-- Fixed bug #30074 (apparent symbol table error with
+- Fixed bug #30074 (apparent symbol table error with
extract($blah, EXTR_REFS)) (Brian)
-- Fixed bug #29840 (is_executable() does not honor safe_mode_exec_dir
+- Fixed bug #29840 (is_executable() does not honor safe_mode_exec_dir
setting). (Ilia)
- Fixed PECL bug #7295 (ORA-01405: fetched column value is NULL on LOB
fields). (Tony)
@@ -1063,14 +1207,14 @@ PHP NEWS
- Updated Postgresql client libraries to 8.1.4 in the Windows distro. (Edin)
- Updated PCRE to version 6.7. (Ilia)
- Updated libsqlite in ext/pdo_sqlite to 3.3.7. (Ilia)
-- Updated bundled MySQL client library to version 5.0.22 in the Windows
+- Updated bundled MySQL client library to version 5.0.22 in the Windows
distribution. (Edin)
- Updated timezonedb to version 2006.7. (Derick)
- Added ability to make SOAP call userspace PHP<->XML converters. (Dmitry)
-- Added support for character sets in pg_escape_string() for PostgreSQL 8.1.4
+- Added support for character sets in pg_escape_string() for PostgreSQL 8.1.4
and higher. (Ilia)
-- Added support for character sets in PDO quote() method for PostgreSQL 8.1.4
+- Added support for character sets in PDO quote() method for PostgreSQL 8.1.4
and higher. (Ilia)
- Added DSA key generation support to openssl_pkey_new(), FR #38731 (marci
at balabit dot hu, Tony)
@@ -1078,27 +1222,27 @@ PHP NEWS
SoapServer::setClass() method). (Dmitry)
- Added support for hexadecimal entity in imagettftext() for the bundled GD.
(Pierre)
-- Added support for httpOnly flag for session extension and cookie setting
+- Added support for httpOnly flag for session extension and cookie setting
functions. (Scott MacVicar, Ilia)
-- Added version specific registry keys to allow different configurations for
+- Added version specific registry keys to allow different configurations for
different php version. (Richard, Dmitry)
- Added "PHPINIDir" Apache directive to apache and apache_hooks SAPIs.
(Dmitry)
-- Added an optional boolean parameter to memory_get_usage() and
- memory_get_peak_usage() to get memory size allocated by emalloc() or real
+- Added an optional boolean parameter to memory_get_usage() and
+ memory_get_peak_usage() to get memory size allocated by emalloc() or real
size of memory allocated from system. (Dmitry)
- Added Zip Archive extension. (Pierre)
- Added RFC1867 fileupload processing hook. (Stefan E.)
- Added JSON and Filter extensions. (Derick, Rasmus)
- Added error messages to disk_free_space() and disk_total_space() functions.
FR #37971 (Tony)
-- Added PATHINFO_FILENAME option to pathinfo() to get the filename.
+- Added PATHINFO_FILENAME option to pathinfo() to get the filename.
(Toby S. and Christian S.)
- Added array_fill_keys() function. (Marcus, Matt Wilmas)
- Added posix_initgroups() function. (Ilia)
-- Added an optional parameter to parse_url() to allow retrieval of distinct
+- Added an optional parameter to parse_url() to allow retrieval of distinct
URL components. (Ilia)
-- Added optional parameter to http_build_query() to allow specification of
+- Added optional parameter to http_build_query() to allow specification of
string separator. (Ilia)
- Added image_type_to_extension() function. (Hannes, Ilia)
- Added allow_url_include ini directive to complement allow_url_fopen. (Rasmus)
@@ -1106,48 +1250,48 @@ PHP NEWS
- Added RFC2397 (data: stream) support. (Marcus)
- Added new error mode E_RECOVERABLE_ERROR. (Derick, Marcus, Tony)
- Added support for getenv() input filtering. (Rasmus)
-- Added support for constructors in interfaces to force constructor signature
+- Added support for constructors in interfaces to force constructor signature
checks in implementations. (Marcus)
-- Added memory_get_peak_usage() function for retrieving peak memory usage of
+- Added memory_get_peak_usage() function for retrieving peak memory usage of
a PHP script. (Ilia)
- Added pg_field_table() function. (Edin)
-- Added SimpleXMLElement::saveXML() as an alias for SimpleXMLElement::asXML().
+- Added SimpleXMLElement::saveXML() as an alias for SimpleXMLElement::asXML().
(Hannes)
- Added DOMNode::getNodePath() for getting an XPath for a node. (Christian)
- Added gmp_nextprime() function. (ants dot aasma at gmail dot com, Tony)
- Added error_get_last() function. (Mike)
-- Removed current working directory from the php.ini search path for CLI and
+- Removed current working directory from the php.ini search path for CLI and
re-added it for other SAPIs (restore to pre 5.1.x behavior). (Edin)
- Moved extensions to PECL:
. ext/filepro (Derick, Tony)
. ext/hwapi (Derick, Tony)
-- Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or
+- Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or
safe_mode are enabled. (Stefan E., Ilia)
-- Increased default memory limit to 16 megabytes to accommodate for a more
+- Increased default memory limit to 16 megabytes to accommodate for a more
accurate memory utilization measurement.
-- In addition to path to php.ini, PHPRC now may specify full file name.
+- In addition to path to php.ini, PHPRC now may specify full file name.
(Dmitry)
- Optimized array/HashTable copying. (Matt Wilmas, Dmitry)
- Optimized zend_try/zend_catch macros by eliminating memcpy(3). (Dmitry)
-- Optimized require_once() and include_once() by eliminating fopen(3) on
+- Optimized require_once() and include_once() by eliminating fopen(3) on
second usage. (Dmitry)
-- Optimized request shutdown sequence. Restoring ini directives now iterates
+- Optimized request shutdown sequence. Restoring ini directives now iterates
only over modified directives instead of all. (Dmitry)
-- Changed priority of PHPRC environment variable on win32 to be higher then
+- Changed priority of PHPRC environment variable on win32 to be higher then
value from registry. (Dmitry)
- Changed __toString() to be called wherever applicable. (Marcus)
- Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR. (Marcus)
-- Changed realpath cache to be disabled when "open_basedir" or "safe_mode"
+- Changed realpath cache to be disabled when "open_basedir" or "safe_mode"
are enabled on per-request basis. (Ilia)
- Improved SNMP extension: (Jani)
- . Renamed snmp_set_oid_numeric_print() to snmp_set_oid_output_format().
+ . Renamed snmp_set_oid_numeric_print() to snmp_set_oid_output_format().
. Added 2 new constants: SNMP_OID_OUTPUT_FULL and SNMP_OID_OUTPUT_NUMERIC
- . Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
+ . Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
compatibility issue). (Patch: scott dot moynes+php at gmail dot com)
- Improved OpenSSL extension: (Pierre)
. Added support for all supported algorithms in openssl_verify
@@ -1158,35 +1302,35 @@ PHP NEWS
OPENSSL_KEYTYPE_EC
- Improved the Zend memory manager: (Dmitry)
. Removed unnecessary "--disable-zend-memory-manager" configure option.
- . Added "--enable-malloc-mm" configure option which is enabled by default in
+ . Added "--enable-malloc-mm" configure option which is enabled by default in
debug builds to allow using internal and external memory debuggers.
. Allow tweaking the memory manager with ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE
environment variables.
. For more information: Zend/README.ZEND_MM
- Improved safe_mode check for the error_log() function. (Ilia)
- Improved the error reporting in SOAP extension on request failure. (Ilia)
-- Improved crypt() on win32 to be about 10 times faster and to have friendlier
+- Improved crypt() on win32 to be about 10 times faster and to have friendlier
license. (Frank, Dmitry)
- Improved performance of the implode() function on associated arrays. (Ilia)
-- Improved performance of str_replace() when doing 1 char to 1 char or 1 char
+- Improved performance of str_replace() when doing 1 char to 1 char or 1 char
to many chars replacement. (Ilia)
- Improved apache2filter SAPI:
. Allowed PHP to be an arbitrary filter in the chain and read the script from
the Apache stream. (John)
- . Added support for apache2filter in the Windows build including binary
- support for both Apache 2.0.x (php5apache2_filter.dll) and Apache 2.2.x
+ . Added support for apache2filter in the Windows build including binary
+ support for both Apache 2.0.x (php5apache2_filter.dll) and Apache 2.2.x
(php5apache2_2_filter.dll). (Edin)
- Improved apache2handler SAPI:
. Changed ap_set_content_type() to be called only once. (Mike)
. Added support for Apache 2.2 handler in the Windows distribution. (Edin)
- Improved FastCGI SAPI: (Dmitry)
. Removed source compatibility with libfcgi.
- . Optimized access to FastCGI environment variables by using HashTable
+ . Optimized access to FastCGI environment variables by using HashTable
instead of linear search.
. Allowed PHP_FCGI_MAX_REQUESTS=0 that assumes no limit.
- . Allowed PHP_FCGI_CHILDREN=0 that assumes no worker children. (FastCGI
+ . Allowed PHP_FCGI_CHILDREN=0 that assumes no worker children. (FastCGI
requests are handled by main process itself)
-- Improved CURL:
+- Improved CURL:
. Added control character checks for "open_basedir" and "safe_mode" checks.
(Ilia)
. Added implementation of curl_multi_info_read(). (Brian)
@@ -1209,10 +1353,10 @@ PHP NEWS
. Added readInnerXML(), readOuterXML(), readString(), setSchema(). (2.6.20+)
. Changed to passing libxml options when loading reader.
-- Fixed invalid read in imagecreatefrompng when an empty file is given
+- Fixed invalid read in imagecreatefrompng when an empty file is given
(Pierre, Tony)
- Fixed infinite loop when a wrong color index is given to imagefill (Pierre)
-- Fixed mess with CGI/CLI -d option (now it works with cgi; constants are
+- Fixed mess with CGI/CLI -d option (now it works with cgi; constants are
working exactly like in php.ini; with FastCGI -d affects all requests).
(Dmitry)
- Fixed missing open_basedir check inside chdir() function. (Ilia)
@@ -1221,7 +1365,7 @@ PHP NEWS
(Christian)
- Fixed leaks in openssl_csr_sign and openssl_csr_new (Pierre)
- Fixed phpinfo() cutoff of variables at \0. (Ilia)
-- Fixed a bug in the filter extension that prevented magic_quotes_gpc from
+- Fixed a bug in the filter extension that prevented magic_quotes_gpc from
being applied when RAW filter is used. (Ilia)
- Fixed memory leaks in openssl streams context options. (Pierre)
- Fixed handling of extremely long paths inside tempnam() function. (Ilia)
@@ -1259,9 +1403,9 @@ PHP NEWS
(Tony)
- Fixed bug #38949 (Cannot get xmlns value attribute). (Rob)
- Fixed bug #38942 (Double old-style-ctor inheritance). (Dmitry)
-- Fixed bug #38941 (imap extension does not compile against new version of the
+- Fixed bug #38941 (imap extension does not compile against new version of the
imap library). (Ilia)
-- Fixed bug #38934 (move_uploaded_file() cannot read uploaded file outside of
+- Fixed bug #38934 (move_uploaded_file() cannot read uploaded file outside of
open_basedir). (Ilia)
- Fixed bug #38904 (apache2filter changes cwd to /). (Ilia, Hannes)
- Fixed bug #38891 (get_headers() do not work with curl-wrappers). (Ilia)
@@ -1296,9 +1440,9 @@ PHP NEWS
- Fixed bug #38579 (include_once() may include the same file twice). (Dmitry)
- Fixed bug #38574 (missing curl constants and improper constant detection).
(Ilia)
-- Fixed bug #38543 (shutdown_executor() may segfault when memory_limit is too
+- Fixed bug #38543 (shutdown_executor() may segfault when memory_limit is too
low). (Dmitry)
-- Fixed bug #38535 (memory corruption in pdo_pgsql driver on error retrieval
+- Fixed bug #38535 (memory corruption in pdo_pgsql driver on error retrieval
inside a failed query executed via query() method). (Ilia)
- Fixed bug #38534 (segfault when calling setlocale() in userspace session
handler). (Tony)
@@ -1312,13 +1456,13 @@ PHP NEWS
- Fixed bug #38474 (getAttribute select attribute by order, even when
prefixed). (Rob)
- Fixed bug #38467 (--enable-versioning causes make fail on OS X). (Tony)
-- Fixed bug #38465 (ReflectionParameter fails if default value is an access
+- Fixed bug #38465 (ReflectionParameter fails if default value is an access
to self::). (Johannes)
- Fixed bug #38464 (array_count_values() mishandles numeric strings).
(Matt Wilmas, Ilia)
- Fixed bug #38461 (setting private attribute with __set() produces
segfault). (Tony)
-- Fixed bug #38458, PECL bug #8944, PECL bug #7775 (error retrieving columns
+- Fixed bug #38458, PECL bug #8944, PECL bug #7775 (error retrieving columns
after long/text columns with PDO_ODBC). (Wez)
- Fixed bug #38454 (warning upon disabling handler via
xml_set_element_handler). (dtorop933 at gmail dot com, Rob)
@@ -1332,7 +1476,7 @@ PHP NEWS
- Fixed bug #38400 (Use of com.typelib_file may cause a crash). (Ilia)
- Fixed bug #38394 (PDO fails to recover from failed prepared statement
execution). (Ilia)
-- Fixed bug #38377 (session_destroy() gives warning after
+- Fixed bug #38377 (session_destroy() gives warning after
session_regenerate_id()). (Ilia)
- Implemented #38357 (dbase_open can't open DBase 3 dbf file).
(rodrigo at fabricadeideias dot com, Mike)
@@ -1374,37 +1518,37 @@ PHP NEWS
characters). (Ilia)
- Fixed bug #38212 (Segfault on invalid imagecreatefromgd2part() parameters).
(Pierre)
-- Fixed bug #38211 (variable name and cookie name match breaks script
+- Fixed bug #38211 (variable name and cookie name match breaks script
execution). (Dmitry)
- Fixed bug #38199 (fclose() unable to close STDOUT and STDERR). (Tony)
- Fixed bug #38198 (possible crash when COM reports an exception). (Ilia)
-- Fixed bug #38194 (ReflectionClass::isSubclassOf() returns TRUE for the
+- Fixed bug #38194 (ReflectionClass::isSubclassOf() returns TRUE for the
class itself). (Ilia)
-- Fixed bug #38183 (disable_classes=Foobar causes disabled class to be
+- Fixed bug #38183 (disable_classes=Foobar causes disabled class to be
called Foo). (Jani)
-- Fixed bug #38179 (imagecopy from a palette to a truecolor image loose alpha
+- Fixed bug #38179 (imagecopy from a palette to a truecolor image loose alpha
channel) (Pierre)
- Fixed bug #38173 (Freeing nested cursors causes OCI8 to segfault). (Tony)
- Fixed bug #38168 (Crash in pdo_pgsql on missing bound parameters). (Ilia)
- Fixed bug #38161 (oci_bind_by_name() returns garbage when Oracle didn't set
the variable). (Tony)
-- Fixed bug #38146 (Cannot use array returned from foo::__get('bar') in write
+- Fixed bug #38146 (Cannot use array returned from foo::__get('bar') in write
context). (Dmitry)
-- Fixed bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key
+- Fixed bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key
names). (Ilia)
- Fixed bug #38125 (undefined reference to spl_dual_it_free_storage). (Marcus)
- Fixed bug #38112 (corrupted gif segfaults) (Pierre)
-- Fixed bug #38096 (large timeout values ignored on 32bit machines in
+- Fixed bug #38096 (large timeout values ignored on 32bit machines in
stream_socket_accept() and stream_socket_client()). (Ilia)
- Fixed bug #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger
than the actual length). (Tony)
- Fixed bug #38072 (boolean arg for mysqli_autocommit() is always true on
Solaris). (Tony)
-- Fixed bug #38067 (Parameters are not decoded from utf-8 when using encoding
+- Fixed bug #38067 (Parameters are not decoded from utf-8 when using encoding
option). (Dmitry)
- Fixed bug #38064 (ignored constructor visibility). (Marcus)
- Fixed bug #38055 (Wrong interpretation of boolean parameters). (Dmitry)
-- Fixed bug #38047 ("file" and "line" sometimes not set in backtrace from
+- Fixed bug #38047 ("file" and "line" sometimes not set in backtrace from
inside error handler). (Dmitry)
- Fixed bug #38019 (segfault extending mysqli class). (Dmitry)
- Fixed bug #38005 (SoapFault faultstring doesn't follow encoding rules).
@@ -1414,7 +1558,7 @@ PHP NEWS
private constructors from invalid context). (Tony)
- Fixed bug #37987 (invalid return of file_exists() in safe mode). (Ilia)
- Fixed bug #37947 (zend_ptr_stack reallocation problem). (Dmitry)
-- Fixed bug #37945 (pathinfo() cannot handle argument with special characters
+- Fixed bug #37945 (pathinfo() cannot handle argument with special characters
like German "Umlaut"). (Mike)
- Fixed bug #37931 (possible crash in OCI8 after database restart
when using persistent connections). (Tony)
@@ -1445,27 +1589,27 @@ PHP NEWS
- Fixed bug #37667 (Object is not added into array returned by __get). (Marcus)
- Fixed bug #37635 (parameter of pcntl signal handler is trashed). (Mike)
- Fixed bug #37632 (Protected method access problem). (Marcus)
-- Fixed bug #37630 (MySQL extensions should link against thread safe client
+- Fixed bug #37630 (MySQL extensions should link against thread safe client
libs if built with ZTS). (Mike)
- Fixed bug #37620 (mysqli_ssl_set validation is inappropriate). (Georg)
- Fixed bug #37616 (DATE_RFC822 does not product RFC 822 dates).
(Hannes Magnusson, Derick)
- Fixed bug #37614 (Class name lowercased in error message). (Johannes)
- Fixed bug #37587 (var without attribute causes segfault). (Marcus)
-- Fixed bug #37586 (Bumped minimum PCRE version to 6.6, needed for recursion
+- Fixed bug #37586 (Bumped minimum PCRE version to 6.6, needed for recursion
limit support). (Ilia)
- Fixed bug #37581 (oci_bind_array_by_name clobbers input array when using
SQLT_AFC, AVC). (Tony)
- Fixed bug #37569 (WDDX incorrectly encodes high-ascii characters). (Ilia)
- Fixed bug #37565 (Using reflection::export with simplexml causing a crash).
(Marcus)
-- Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
+- Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
compatibility issue). (Jani, patch by scott dot moynes+php at gmail dot com)
- Fixed bug #37563 (array_key_exists performance is poor for &$array). (Ilia)
-- Fixed bug #37558 (timeout functionality doesn't work after a second PHP
+- Fixed bug #37558 (timeout functionality doesn't work after a second PHP
start-up on the same thread). (p dot desarnaud at wanadoo dot fr)
- Fixed bug #37531 (oci8 persistent connection corruption). (Tony)
-- Fixed bug #37523 (namespaces added too late, leads to missing xsi:type
+- Fixed bug #37523 (namespaces added too late, leads to missing xsi:type
attributes. Incompatibility with libxml2-2.6.24). (Dmitry)
- Fixed bug #37514 (strtotime doesn't assume year correctly). (Derick)
- Fixed bug #37510 (session_regenerate_id changes session_id() even on
@@ -1474,14 +1618,14 @@ PHP NEWS
- Fixed bug #37499 (CLI segmentation faults during cleanup with sybase-ct
extension enabled). (Tony)
- Fixed bug #37496 (FastCGI output buffer overrun). (Piotr, Dmitry)
-- Fixed bug #37487 (oci_fetch_array() array-type should always default to
+- Fixed bug #37487 (oci_fetch_array() array-type should always default to
OCI_BOTH). (Tony)
- Fixed bug #37457 (Crash when an exception is thrown in accept() method of
FilterIterator). (Marcus)
- Fixed bug #37456 (DOMElement->setAttribute() loops forever). (Rob)
- Fixed bug #37445 (Fixed crash in pdo_mysql resulting from premature object
destruction). (Ilia)
-- Fixed bug #37428 (PHP crashes on windows if there are start-up errors and
+- Fixed bug #37428 (PHP crashes on windows if there are start-up errors and
event log is used for logging them). (Edin)
- Fixed bug #37418 (tidy module crashes on shutdown). (Tony)
- Fixed bug #37416 (iterator_to_array() hides exceptions thrown in rewind()
@@ -1495,16 +1639,16 @@ PHP NEWS
request). (Tony)
- Fixed bug #37376 (fastcgi.c compile fail with gcc 2.95.4). (Ilia)
- Fixed bug #37368 (Incorrect timestamp returned for strtotime()). (Derick)
-- Fixed bug #37363 (PDO_MYSQL does not build if no other mysql extension is
+- Fixed bug #37363 (PDO_MYSQL does not build if no other mysql extension is
enabled). (Mike)
- Fixed bug #37348 (make PEAR install ignore open_basedir). (Ilia)
-- Fixed bug #37341 ($_SERVER in included file is shortened to two entries,
+- Fixed bug #37341 ($_SERVER in included file is shortened to two entries,
if $_ENV gets used). (Dmitry)
- Fixed bug #37313 (sigemptyset() used without including <signal.h>).
(jdolecek)
- Fixed bug #37306 (max_execution_time = max_input_time). (Dmitry)
- Fixed bug #37278 (SOAP not respecting uri in __soapCall). (Dmitry)
-- Fixed bug #37265 (Added missing safe_mode & open_basedir checks to
+- Fixed bug #37265 (Added missing safe_mode & open_basedir checks to
imap_body()). (Ilia)
- Fixed bug #37262 (var_export() does not escape \0 character). (Ilia)
- Fixed bug #37256 (php-fastcgi doesn't handle connection abort). (Dmitry)
@@ -1513,7 +1657,7 @@ PHP NEWS
- Fixed bug #37144 (PHP crashes trying to assign into property of dead object).
(Dmitry)
- Fixed bug #36949 (invalid internal mysqli objects dtor). (Mike)
-- Implement #36732 (req/x509 extensions support for openssl_csr_new and
+- Implement #36732 (req/x509 extensions support for openssl_csr_new and
openssl_csr_sign) (ben at psc dot edu, Pierre)
- Fixed bug #36759 (Objects destructors are invoked in wrong order when script
is finished). (Dmitry)
@@ -1523,7 +1667,7 @@ PHP NEWS
- Fixed bug #36515 (Unlinking buckets from non-existent brigades). (Sara)
- Fixed bug #35973 (Error ORA-24806 occurs when trying to fetch a NCLOB
field). (Tony)
-- Fixed bug #35886 (file_get_contents() fails with some combinations of
+- Fixed bug #35886 (file_get_contents() fails with some combinations of
offset & maxlen). (Nuno)
- Fixed bug #35512 (Lack of read permission on main script results in
E_WARNING rather then E_ERROR). (Ilia)
@@ -1531,7 +1675,7 @@ PHP NEWS
stream context options). (Mike)
- Fixed bug #34066 (recursive array_walk causes segfault). (Tony)
- Fixed bug #34065 (throw in foreach causes memory leaks). (Dmitry)
-- Fixed bug #34005 (oci_password_change() fails).
+- Fixed bug #34005 (oci_password_change() fails).
(pholdaway at technocom-wireless dot com, Tony)
- Fixed bug #33895 (Missing math constants). (Hannes)
- Fixed bug #33770 (https:// or ftps:// do not work when --with-curlwrappers
@@ -1582,13 +1726,13 @@ PHP NEWS
. Added ReflectionParameter::getDeclaringClass().
. Changed reflection constants to be prefixed with IS_. (Johannes)
- Improved cURL extension: (Ilia)
- . Added curl_setopt_array() function that allows setting of multiple
+ . Added curl_setopt_array() function that allows setting of multiple
options via an associated array.
. Added the ability to retrieve the request message sent to the server.
- Improved GD extension: (Pierre)
. Added a weak/tolerant mode to the JPEG loader.
. Added filtering mode option to imagepng() to allow reducing file size.
- . Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
+ . Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
on error.
- Changed get_headers() to retrieve headers also from non-200 responses.
(Ilia)
@@ -1598,18 +1742,18 @@ PHP NEWS
- Added support for exif date format in strtotime(). (Derick)
- Added a check for special characters in the session name. (Ilia)
- Added "consumed" stream filter. (Marcus)
-- Added new mysqli constants for BIT and NEW_DECIMAL field types:
+- Added new mysqli constants for BIT and NEW_DECIMAL field types:
MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)
-- Added imap_savebody() that allows message body to be written to a
+- Added imap_savebody() that allows message body to be written to a
file. (Mike)
- Added overflow checks to wordwrap() function. (Ilia)
-- Added support for BINARY_DOUBLE and BINARY_FLOAT to PDO_OCI and OCI8
+- Added support for BINARY_DOUBLE and BINARY_FLOAT to PDO_OCI and OCI8
(also fixes bug #36764). (Tony)
-- Eliminated run-time constant fetching for TRUE, FALSE and NULL. (Dmitry)
+- Eliminated run-time constant fetching for TRUE, FALSE and NULL. (Dmitry)
- Removed the E_STRICT deprecation notice from "var". (Ilia)
- Fixed reading stream filters never notified about EOF. (Mike)
- Fixed tempnam() 2nd parameter to be checked against path components. (Ilia)
-- Fixed a bug that would not fill in the fifth argument to preg_replace()
+- Fixed a bug that would not fill in the fifth argument to preg_replace()
properly, if the variable was not declared previously. (Andrei)
- Fixed safe_mode check for source argument of the copy() function. (Ilia)
- Fixed mysqli bigint conversion under Windows (Georg)
@@ -1619,73 +1763,73 @@ PHP NEWS
- Fixed offset/length parameter validation in substr_compare() function. (Ilia)
- Fixed debug_zval_dump() to support private and protected members. (Dmitry)
- Fixed SoapFault::getMessage(). (Dmitry)
-- Fixed issue with iconv_mime_decode where the "encoding" would only allow
+- Fixed issue with iconv_mime_decode where the "encoding" would only allow
upper case specifiers. (Derick)
- Fixed tiger hash algorithm generating wrong results on big endian platforms.
(Mike)
- Fixed crash with DOMImplementation::createDocumentType("name:"). (Mike)
-- Fixed bug #37205 (Serving binary content/images fails with "comm with server
+- Fixed bug #37205 (Serving binary content/images fails with "comm with server
aborted" FastCGI err). (Dmitry)
-- Fixed bug #37192 (cc may complain about non-constant initializers in
+- Fixed bug #37192 (cc may complain about non-constant initializers in
hash_adler.c). (Mike)
- Fixed bug #37191 (chmod takes off sticky bit when safe_mode is On). (Tony)
-- Fixed bug #37167 (PDO segfaults when throwing exception from the
+- Fixed bug #37167 (PDO segfaults when throwing exception from the
fetch handler). (Tony)
- Fixed bug #37162 (wddx does not build as a shared extension).
(jdolecek at NetBSD dot org, Ilia)
-- Fixed bug #37158 (fread behavior changes after calling
+- Fixed bug #37158 (fread behavior changes after calling
stream_wrapper_register). (Wez)
-- Fixed bug #37138 (__autoload tries to load callback'ed self and parent).
+- Fixed bug #37138 (__autoload tries to load callback'ed self and parent).
(Dmitry)
-- Fixed bug #37103 (libmbfl headers not installed). (Jani)
+- Fixed bug #37103 (libmbfl headers not installed). (Jani)
- Fixed bug #37062 (compile failure on ARM architecture). (Tony)
- Fixed bug #37061 (curl_exec() doesn't zero-terminate binary strings). (Tony)
-- Fixed bug #37060 (Type of retval of Countable::count() is not checked).
+- Fixed bug #37060 (Type of retval of Countable::count() is not checked).
(Johannes)
-- Fixed bug #37059 (oci_bind_by_name() doesn't support RAW and LONG RAW
+- Fixed bug #37059 (oci_bind_by_name() doesn't support RAW and LONG RAW
fields). (Tony)
-- Fixed bug #37057 (xmlrpc_decode() may produce arrays with numeric strings,
+- Fixed bug #37057 (xmlrpc_decode() may produce arrays with numeric strings,
which are unaccessible). (Tony)
-- Fixed bug #37055 (incorrect reference counting for persistent OCI8
+- Fixed bug #37055 (incorrect reference counting for persistent OCI8
connections). (Tony)
- Fixed bug #37054 (SoapClient Error Fetching http headers). (Dmitry)
- Fixed bug #37053 (html_errors with internal classes produces wrong links).
(Tony)
- Fixed bug #37046 (foreach breaks static scope). (Dmitry)
- Fixed bug #37045 (Fixed check for special chars for http redirects). (Ilia)
-- Fixed bug #37017 (strtotime fails before 13:00:00 with some time zones
+- Fixed bug #37017 (strtotime fails before 13:00:00 with some time zones
identifiers). (Derick)
-- Fixed bug #37002 (Have to quote literals in INI when concatenating with
+- Fixed bug #37002 (Have to quote literals in INI when concatenating with
vars). (Dmitry)z
- Fixed bug #36988 (mktime freezes on long numbers). (Derick)
- Fixed bug #36981 (SplFileObject->fgets() ignores max_length). (Tony)
- Fixed bug #36957 (serialize() does not handle recursion). (Ilia)
-- Fixed bug #36944 (strncmp & strncasecmp do not return false on negative
+- Fixed bug #36944 (strncmp & strncasecmp do not return false on negative
string length). (Tony)
- Fixed bug #36941 (ArrayIterator does not clone itself). (Marcus)
-- Fixed bug #36934 (OCILob->read() doesn't move internal pointer when
+- Fixed bug #36934 (OCILob->read() doesn't move internal pointer when
reading 0's). (Tony)
-- Fixed bug #36908 (wsdl default value overrides value in soap request).
+- Fixed bug #36908 (wsdl default value overrides value in soap request).
(Dmitry)
- Fixed bug #36898 (__set() leaks in classes extending internal ones).
(Tony, Dmitry)
- Fixed bug #36886 (User filters can leak buckets in some situations). (Ilia)
-- Fixed bug #36878 (error messages are printed even though an exception has
+- Fixed bug #36878 (error messages are printed even though an exception has
been thrown). (Tony)
- Fixed bug #36875 (is_*() functions do not account for open_basedir). (Ilia)
-- Fixed bug #36872 (session_destroy() fails after call to
+- Fixed bug #36872 (session_destroy() fails after call to
session_regenerate_id(true)). (Ilia)
-- Fixed bug #36869 (memory leak in output buffering when using chunked
+- Fixed bug #36869 (memory leak in output buffering when using chunked
output). (Tony)
-- Fixed bug #36859 (DOMElement crashes when calling __construct when
+- Fixed bug #36859 (DOMElement crashes when calling __construct when
cloning). (Tony)
-- Fixed bug #36857 (Added support for partial content fetching to the
+- Fixed bug #36857 (Added support for partial content fetching to the
HTTP streams wrapper). (Ilia)
-- Fixed bug #36851 (Documentation and code discrepancies for NULL
+- Fixed bug #36851 (Documentation and code discrepancies for NULL
data in oci_fetch_*() functions). (Tony)
-- Fixed bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause
+- Fixed bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause
segfault). (Tony)
-- Fixed bug #36820 (Privileged connection with an Oracle password file
+- Fixed bug #36820 (Privileged connection with an Oracle password file
fails). (Tony)
- Fixed bug #36809 (__FILE__ behavior changed). (Dmitry)
- Fixed bug #36808 (syslog ident becomes garbage between requests). (Tony)
@@ -1696,30 +1840,30 @@ PHP NEWS
(Dmitry)
- Fixed bug #36745 (No error message when load data local file isn't found).
(Georg)
-- Fixed bug #36743 (In a class extending XMLReader array properties are not
+- Fixed bug #36743 (In a class extending XMLReader array properties are not
writable). (Tony)
-- Fixed bug #36727 (segfault in pdo_pgsql bindValue() when no parameters are
+- Fixed bug #36727 (segfault in pdo_pgsql bindValue() when no parameters are
defined). (Tony)
-- Fixed bug #36721 (The SoapServer is not able to send a header that it didn't
+- Fixed bug #36721 (The SoapServer is not able to send a header that it didn't
receive). (Dmitry)
- Fixed bug #36697 (Transparency is lost when using imagecreatetruecolor).
(Pierre)
- Fixed bug #36689 (Removed arbitrary limit on the length of syslog messages).
(Ilia)
-- Fixed bug #36656 (http_build_query generates invalid URIs due to use of
+- Fixed bug #36656 (http_build_query generates invalid URIs due to use of
square brackets). (Mike)
- Fixed bug #36638 (strtotime() returns false when 2nd argument < 1). (Derick)
- Fixed bug #36629 (SoapServer::handle() exits on SOAP faults). (Dmitry)
- Fixed bug #36625 (pg_trace() does not work). (iakio at mono-space dot net)
- Fixed bug #36614 (Segfault when using Soap). (Dmitry)
-- Fixed bug #36611 (assignment to SimpleXML object attribute changes argument
+- Fixed bug #36611 (assignment to SimpleXML object attribute changes argument
type to string). (Tony)
- Fixed bug #36606 (pg_query_params() changes arguments type to string). (Tony)
- Fixed bug #36599 (DATE_W3C format constant incorrect). (Derick)
-- Fixed bug #36575 (SOAP: Incorrect complex type instantiation with
+- Fixed bug #36575 (SOAP: Incorrect complex type instantiation with
hierarchies). (Dmitry)
-- Fixed bug #36572 (Added PDO::MYSQL_ATTR_DIRECT_QUERY constant that should
- be set when executing internal queries like "show master status" via MySQL).
+- Fixed bug #36572 (Added PDO::MYSQL_ATTR_DIRECT_QUERY constant that should
+ be set when executing internal queries like "show master status" via MySQL).
(Ilia)
- Fixed bug #36568 (memory_limit setting on win32 has no effect). (Dmitry)
- Fixed bug #36513 (comment will be outputted in last line). (Dmitry)
@@ -1729,27 +1873,27 @@ PHP NEWS
(Ilia)
- Fixed bug #36458 (sleep() accepts negative values). (Ilia)
- Fixed bug #36436 (DBA problem with Berkeley DB4). (Marcus)
-- Fixed bug #36434 (Improper resolution of declaring class name of an
+- Fixed bug #36434 (Improper resolution of declaring class name of an
inherited property). (Ilia)
-- Fixed bug #36420 (segfault when access result->num_rows after calling
+- Fixed bug #36420 (segfault when access result->num_rows after calling
result->close()). (Ilia,Tony)
- Fixed bug #36403 (oci_execute() no longer supports OCI_DESCRIBE_ONLY). (Tony)
- Fixed bug #36400 (Custom 5xx error does not return correct HTTP response error
code). (Tony)
- Fixed bug #36396 (strtotime() fails to parse dates in dd-mm-yyyy format).
(Derick)
-- Fixed bug #36388 (ext/soap crashes when throwing exception and session
+- Fixed bug #36388 (ext/soap crashes when throwing exception and session
persistence). (David)
- Fixed bug #36382 (PDO/PgSQL's getColumnMeta() crashes). (Derick)
-- Fixed bug #36359 (splFileObject::fwrite() doesn't write when no data
+- Fixed bug #36359 (splFileObject::fwrite() doesn't write when no data
length specified). (Tony)
- Fixed bug #36351 (parse_url() does not parse numeric paths properly). (Ilia)
- Fixed bug #36345 (PDO/MySQL problem loading BLOB over 1MB). (Ilia)
-- Fixed bug #36337 (ReflectionProperty fails to return correct visibility).
+- Fixed bug #36337 (ReflectionProperty fails to return correct visibility).
(Ilia)
-- Fixed bug #36334 (Added missing documentation about realpath cache INI
+- Fixed bug #36334 (Added missing documentation about realpath cache INI
settings). (Ilia)
-- Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect
+- Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect
extended class commentary). (Ilia)
- Fixed bug #36306 (crc32() differ on 32-bit and 64-bit platforms)
(anight@eyelinkmedia dot com, Pierre)
@@ -1764,7 +1908,7 @@ PHP NEWS
- Fixed bug #36242 (Possible memory corruption in stream_select()). (Tony)
- Fixed bug #36235 (ocicolumnname returns false before a successful fetch).
(Tony)
-- Fixed bug #36226 (Inconsistent handling when passing potential arrays).
+- Fixed bug #36226 (Inconsistent handling when passing potential arrays).
(Dmitry)
- Fixed bug #36224 (date(DATE_ATOM) gives wrong results).
(Derick, Hannes Magnusson)
@@ -1772,14 +1916,14 @@ PHP NEWS
- Fixed bug #36208 (symbol namespace conflicts using bundled gd). (Jakub Moc)
- Fixed bug #36205 (Memory leaks on duplicate cookies). (Dmitry)
- Fixed bug #36185 (str_rot13() crash on non-string parameter). (Pierre)
-- Fixed bug #36176 (PDO_PGSQL - PDO::exec() does not return number of rows
+- Fixed bug #36176 (PDO_PGSQL - PDO::exec() does not return number of rows
affected by the operation). (Ilia)
-- Fixed bug #36158 (SIGTERM is not handled correctly when running as a
+- Fixed bug #36158 (SIGTERM is not handled correctly when running as a
FastCGI server). (Dmitry)
- Fixed bug #36152 (problems with curl+ssl and pgsql+ssl in same PHP). (Mike)
-- Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to
+- Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to
the end of the string). (Ilia)
-- Fixed bug #36134 (DirectoryIterator constructor failed to detect empty
+- Fixed bug #36134 (DirectoryIterator constructor failed to detect empty
directory names). (Ilia)
- Fixed bug #36113 (Reading records of unsupported type causes segfault).
(Tony)
@@ -1796,12 +1940,12 @@ PHP NEWS
- Fixed bug #36016 (realpath cache memleaks). (Dmitry, Nuno)
- Fixed bug #36011 (Strict errormsg wrong for call_user_func() and the likes).
(Marcus)
-- Fixed bug #36010 (Segfault when re-creating and re-executing statements with
+- Fixed bug #36010 (Segfault when re-creating and re-executing statements with
bound parameters). (Tony)
- Fixed bug #36006 (Problem with $this in __destruct()). (Dmitry)
-- Fixed bug #35999 (recursive mkdir() does not work with relative path
+- Fixed bug #35999 (recursive mkdir() does not work with relative path
like "foo/bar"). (Tony)
-- Fixed bug #35998 (SplFileInfo::getPathname() returns unix style filenames
+- Fixed bug #35998 (SplFileInfo::getPathname() returns unix style filenames
in win32). (Marcus)
- Fixed bug #35988 (Unknown persistent list entry type in module shutdown).
(Dmitry)
@@ -1811,7 +1955,7 @@ PHP NEWS
- Fixed bug #35785 (SimpleXML causes memory read error zend engine). (Marcus)
- Fixed bug #34272 (empty array onto COM object blows up). (Rob)
- Fixed bug #33292 (apache_get_modules() crashes on Windows). (Edin)
-- Fixed bug #29476 (sqlite_fetch_column_types() locks the database forever).
+- Fixed bug #29476 (sqlite_fetch_column_types() locks the database forever).
(Ilia)
12 Jan 2006, PHP 5.1.2
@@ -1828,7 +1972,7 @@ PHP NEWS
- Added missing support for 'B' format identifier to date() function. (Ilia)
- Changed reflection to be an extension. (Marcus)
- Improved SPL extension: (Marcus)
- . Added class SplFileInfo as root class for DirectoryIterator and
+ . Added class SplFileInfo as root class for DirectoryIterator and
SplFileObject
. Added SplTempFileObject
- Improved SimpleXML extension: (Marcus)
@@ -1868,7 +2012,7 @@ PHP NEWS
the callback). (Tony)
- Fixed bug #35817 (unpack() does not decode odd number of hexadecimal values).
(Ilia)
-- Fixed bug #35797 (segfault on PDOStatement::execute() with
+- Fixed bug #35797 (segfault on PDOStatement::execute() with
zend.ze1_compatibility_mode = On). (Tony, Ilia)
- Fixed bug #35781 (stream_filter_append() can cause segfault). (Tony)
- Fixed bug #35760 (sybase_ct doesn't compile on Solaris using old gcc). (Tony)
@@ -1880,17 +2024,17 @@ PHP NEWS
and allow setting it). (Frank)
- Fixed bug #35723 (xmlrpc_introspection.c fails compile per C99 std). (Jani)
- Fixed bug #35720 (A final constructor can be overwritten). (Marcus)
-- Fixed bug #35713 (getopt() returns array with numeric strings when passed
+- Fixed bug #35713 (getopt() returns array with numeric strings when passed
options like '-1'). (Tony)
- Fixed bug #35705 (strtotime() fails to parse soap date format without TZ).
(Ilia)
- Fixed bug #35699 (date() can't handle leap years before 1970). (Derick)
- Fixed bug #35694 (Improved error message for invalid fetch mode). (Ilia)
-- Fixed bug #35692 (iconv_mime_decode() segmentation fault; with libiconv
+- Fixed bug #35692 (iconv_mime_decode() segmentation fault; with libiconv
only). (Tony)
-- Fixed bug #35690 (pack() tries to allocate huge memory block when packing
+- Fixed bug #35690 (pack() tries to allocate huge memory block when packing
float values to strings). (Tony)
-- Fixed bug #35669 (imap_mail_compose() crashes with
+- Fixed bug #35669 (imap_mail_compose() crashes with
multipart-multiboundary-email). (Ilia)
- Fixed bug #35660 (AIX TZ variable format not understood, yields UTC
timezone). (Derick)
@@ -1902,7 +2046,7 @@ PHP NEWS
- Fixed bug #35612 (iis6 Access Violation crash). (Dmitry, alacn.uhahaa)
- Fixed bug #35594 (Multiple calls to getopt() may result in a crash).
(rabbitt at gmail dot com, Ilia)
-- Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php
+- Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php
script is loaded via SSI include). (Ilia)
- Fixed bug #35570 (segfault when re-using soap client object). (Dmitry)
- Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly). (Ilia)
@@ -1914,9 +2058,9 @@ PHP NEWS
- Fixed bug #35509 (string constant as array key has different behavior inside
object). (Dmitry)
- Fixed bug #35508 (PDO fails when unknown fetch mode specified). (Tony)
-- Fixed bug #35499 (strtotime() does not handle whitespace around the date
+- Fixed bug #35499 (strtotime() does not handle whitespace around the date
string). (Ilia)
-- Fixed bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without
+- Fixed bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without
proper init). (Ilia)
- Fixed bug #35490 (socket_sendto() unable to handle IPv6 addresses). (Tony)
- Fixed bug #35461 (Ming extension fails to compile with ming 0.3beta1). (Jani)
@@ -1932,7 +2076,7 @@ PHP NEWS
- Fixed bug #35422 (strtotime() does not parse times with UTC as timezone).
(Ilia)
- Fixed bug #35414 (strtotime() no longer works with ordinal suffix). (Ilia)
-- Fixed bug #35410 (wddx_deserialize() doesn't handle large ints as keys
+- Fixed bug #35410 (wddx_deserialize() doesn't handle large ints as keys
properly). (Ilia)
- Fixed bug #35409 (undefined reference to 'rl_completion_matches'). (Jani)
- Fixed bug #35399 (Since fix of bug #35273 SOAP decoding of
@@ -1948,7 +2092,7 @@ PHP NEWS
- Fixed bug #35062 (socket_read() produces warnings on non blocking sockets).
(Nuno, Ilia)
- Fixed bug #35028 (SimpleXML object fails FALSE test). (Marcus)
-- Fixed bug #34729 (Crash in ZTS mode under Apache). (Dmitry, Zeev)
+- Fixed bug #34729 (Crash in ZTS mode under Apache). (Dmitry, Zeev)
- Fixed bug #34429 (Output buffering cannot be turned off with FastCGI).
(Dmitry, Ilya)
- Fixed bug #34359 (Possible crash inside fopen http wrapper). (Ilia,Sara,Nuno)
@@ -1957,11 +2101,11 @@ PHP NEWS
passes an offset). (Derick)
- Fixed bug #32820 (date_sunrise and date_sunset don't handle GMT offset
well). (Derick)
-- Fixed bug #31347 (is_dir and is_file (incorrectly) return true for any string
+- Fixed bug #31347 (is_dir and is_file (incorrectly) return true for any string
greater then 255 characters). (Nuno,Ilia)
- Fixed bug #30937 (date_sunrise() & date_sunset() don't handle endless
day/night at high latitudes). (Derick)
-- Fixed bug #30760 (Remove MessageBox on win32 for E_CORE errors if
+- Fixed bug #30760 (Remove MessageBox on win32 for E_CORE errors if
display_startup_error is off). (Ilia)
- Fixed bug #29955 (mb_strtoupper() / lower() broken with Turkish encoding).
(Rui)
@@ -1975,13 +2119,13 @@ PHP NEWS
- Added an additional field $frame['object'] to the result array of
debug_backtrace() that contains a reference to the respective object when the
frame was called from an object. (Sebastian)
-- Fixed bug #35423 (RecursiveDirectoryIterator doesnt appear to recurse with
+- Fixed bug #35423 (RecursiveDirectoryIterator doesnt appear to recurse with
RecursiveFilterIterator). (Marcus)
- Fixed bug #35413 (Removed -dev flag from Zend Engine version). (Ilia)
- Fixed bug #35411 (Regression with \{$ handling). (Ilia)
-- Fixed bug #35406 (eval hangs when evall'ed code ends with comment w/o
+- Fixed bug #35406 (eval hangs when evall'ed code ends with comment w/o
newline). (Marcus)
-- Fixed bug #35391 (pdo_mysql::exec does not return number of affected rows).
+- Fixed bug #35391 (pdo_mysql::exec does not return number of affected rows).
(Tony)
- Fixed bug #35382 (Comment in end of file produces fatal error). (Ilia)
- Fixed bug #35360 (exceptions in interactive mode (php -a) may cause crash).
@@ -1992,15 +2136,15 @@ PHP NEWS
- Fixed bug #35170 (PHP_AUTH_DIGEST differs under Apache 1.x and 2.x). (Ilia)
24 Nov 2005, PHP 5.1
-- Added support for class constants and static members for internal classes.
+- Added support for class constants and static members for internal classes.
(Dmitry, Michael Wallner)
- Added "new_link" parameter to mssql_connect() (Bug #34369). (Frank)
- Added missing safe_mode checks for image* functions and cURL. (Ilia)
- Added missing safe_mode/open_basedir checks for file uploads. (Ilia)
- Added PDO_MYSQL_ATTR_USE_BUFFERED_QUERY parameter for pdo_mysql. (Ilia)
-- Added date_timezone_set() function to set the timezone that the date
+- Added date_timezone_set() function to set the timezone that the date
functions will use. (Derick)
-- Added pg_fetch_all_columns() function to fetch all values of a column from a
+- Added pg_fetch_all_columns() function to fetch all values of a column from a
result cursor. (Ilia)
- Added support for LOCK_EX flag for file_put_contents(). (Ilia)
- Added bindto socket context option. (Ilia)
@@ -2013,17 +2157,17 @@ PHP NEWS
- Added an optional remove old session parameter to session_regenerate_id().
(Ilia)
- Added array type hinting. (Dmitry)
-- Added the tidy_get_opt_doc() function to return documentation for
+- Added the tidy_get_opt_doc() function to return documentation for
configuration options in tidy. (Patch by: nlopess@php.net)
- Added support for .cc files in extensions. (Brian)
-- Added imageconvolution() function which can be used to apply a custom 3x3
+- Added imageconvolution() function which can be used to apply a custom 3x3
matrix convolution to an image. (Pierre)
-- Added optional first parameter to XsltProcessor::registerPHPFunctions to
+- Added optional first parameter to XsltProcessor::registerPHPFunctions to
only allow certain functions to be called from XSLT. (Christian)
-- Added the ability to override the autotools executables used by the
- buildconf script via the PHP_AUTOCONF and PHP_AUTOHEADER environmental
+- Added the ability to override the autotools executables used by the
+ buildconf script via the PHP_AUTOCONF and PHP_AUTOHEADER environmental
variables. (Jon)
-- Added several new functions to support the PostgreSQL v3 protocol introduced
+- Added several new functions to support the PostgreSQL v3 protocol introduced
in PostgreSQL 7.4. (Christopher)
. pg_transaction_status() - in-transaction status of a database connection.
. pg_query_params() - execution of parameterized queries.
@@ -2032,17 +2176,17 @@ PHP NEWS
. pg_send_query_params() - async equivalent of pg_query_params().
. pg_send_prepare() - async equivalent of pg_prepare().
. pg_send_execute() - async equivalent of pg_execute().
- . pg_result_error_field() - highly detailed error information, most
- importantly
+ . pg_result_error_field() - highly detailed error information, most
+ importantly
the SQLSTATE error code.
. pg_set_error_verbosity() - set verbosity of errors.
-- Added optional fifth parameter "count" to preg_replace_callback() and
+- Added optional fifth parameter "count" to preg_replace_callback() and
preg_replace() to count the number of replacements made. FR #32275. (Andrey)
-- Added optional third parameter "charlist" to str_word_count() which contains
+- Added optional third parameter "charlist" to str_word_count() which contains
characters to be considered as word part. FR #31560. (Andrey, Ilia)
- Added interface Serializable. (Stanislav, Marcus)
- Added pg_field_type_oid() PostgreSQL function. (mauroi at digbang dot com)
-- Added zend_declare_property_...() and zend_update_property_...() API
+- Added zend_declare_property_...() and zend_update_property_...() API
functions for bool, double and binary safe strings. (Hartmut)
- Added possibility to access INI variables from within .ini file. (Andrei)
- Added variable $_SERVER['REQUEST_TIME'] containing request start time.
@@ -2050,11 +2194,11 @@ PHP NEWS
- Added optional float parameter to gettimeofday(). (Ilia)
- Added apache_reset_timeout() Apache1 function. (Rasmus)
- Added sqlite_fetch_column_types() 3rd argument for arrays. (Ilia)
-- Added optional offset parameter to stream_get_contents() and
+- Added optional offset parameter to stream_get_contents() and
file_get_contents(). (Ilia)
- Added optional maxlen parameter to file_get_contents(). (Ilia)
- Added SAPI hook to get the current request time. (Rasmus)
-- Added new functions:
+- Added new functions:
. array_diff_key() (Andrey)
. array_diff_ukey() (Andrey)
. array_intersect_key() (Christiano Duarte)
@@ -2075,20 +2219,20 @@ PHP NEWS
. stream_wrapper_restore() (Sara)
. stream_filter_remove() (Sara)
. time_sleep_until() (Ilia)
-- Added DomDocument::$recover property for parsing not well-formed XML
- Documents. (Christian)
+- Added DomDocument::$recover property for parsing not well-formed XML
+ Documents. (Christian)
- Added Cursor support for MySQL 5.0.x in mysqli (Georg)
- Added proxy support to ftp wrapper via http. (Sara)
- Added MDTM support to ftp_url_stat. (Sara)
- Added zlib stream filter support. (Sara)
- Added bz2 stream filter support. (Sara)
-- Added max_redirects context option that specifies how many HTTP
+- Added max_redirects context option that specifies how many HTTP
redirects to follow. (Ilia)
-- Added support of parameter=>value arrays to
+- Added support of parameter=>value arrays to
xsl_xsltprocessor_set_parameter(). (Tony)
-- PHP extension loading mechanism with support for module
- dependencies and conflicts. (Jani, Dmitry)
+- PHP extension loading mechanism with support for module
+ dependencies and conflicts. (Jani, Dmitry)
- Improved interactive mode of PHP CLI (php -a). (Johannes, Marcus)
- Improved performance of:
. general execution/compilation. (Andi, Thies, Sterling, Dmitry, Marcus)
@@ -2104,14 +2248,14 @@ PHP NEWS
. added new function mysqli_set_charset()
. added new class mysqli_driver
. added new class mysqli_warning
- . added new class mysqli_exception
+ . added new class mysqli_exception
. added new class mysqli_sql_exception
- Improved SPL extension. (Marcus)
. Moved RecursiveArrayIterator from examples into extension
. Moved RecursiveFilterIterator from examples into extension
. Added SplObjectStorage
. Made all SPL constants class constants
- . Renamed CachingRecursiveIterator to RecursiveCachingIterator to follow
+ . Renamed CachingRecursiveIterator to RecursiveCachingIterator to follow
Recursive<*>Iterator naming scheme.
. added standard hierarchy of Exception classes
. added interface Countable
@@ -2122,17 +2266,17 @@ PHP NEWS
. added possibility to use a string with class_parents() and
class_implements(). (Andrey)
-- Changed type hints to allow "null" as default value for class and array.
+- Changed type hints to allow "null" as default value for class and array.
(Marcus, Derick, Dmitry)
- Changed SQLite extension to be a shared module in Windows distribution.
(Edin)
-- Changed "instanceof" and "catch" operators, is_a() and is_subclass_of()
+- Changed "instanceof" and "catch" operators, is_a() and is_subclass_of()
functions to not call __autoload(). (Dmitry)
- Changed sha1_file() and md5_file() functions to use streams instead of low
level IO. (Uwe)
- Changed abstract private methods to be not allowed anymore. (Stas)
- Changed stream_filter_(ap|pre)pend() to return resource. (Sara)
-- Changed mysqli_exception and sqlite_exception to use RuntimeException as
+- Changed mysqli_exception and sqlite_exception to use RuntimeException as
base if SPL extension is present. (Georg, Marcus)
- Upgraded bundled libraries:
@@ -2148,8 +2292,8 @@ PHP NEWS
- Implemented feature request #33452 (Year belonging to ISO week). (Derick)
- Allowed return by reference from internal functions. (Marcus, Andi, Dmitry)
-- Rewrote strtotime() with support for timezones and many new formats.
- Implements feature requests #21399, #26694, #28088, #29150, #29585 and
+- Rewrote strtotime() with support for timezones and many new formats.
+ Implements feature requests #21399, #26694, #28088, #29150, #29585 and
#29595. (Derick)
- Moved extensions to PECL:
@@ -2168,25 +2312,25 @@ PHP NEWS
. ext/ircg (Jani, Derick)
- Removed php_check_syntax() function which never worked properly. (Ilia)
-- Removed garbage manager in Zend Engine which results in more aggressive
+- Removed garbage manager in Zend Engine which results in more aggressive
freeing of data. (Dmitry, Andi)
- Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
- Fixed Apache 2 regression with sub-request handling on non-linux systems.
(Ilia, Tony)
-- Fixed PDO shutdown problem (possible infinite loop running rollback on
+- Fixed PDO shutdown problem (possible infinite loop running rollback on
shutdown). (Wez)
-- Fixed PECL bug #3714 (PDO: beginTransaction doesn't work if you're in
+- Fixed PECL bug #3714 (PDO: beginTransaction doesn't work if you're in
auto-commit mode). (Wez)
- Fixed ZTS destruction. (Marcus)
- Fixed __get/__set to allow recursive calls for different properties. (Dmitry)
-- Fixed a bug where stream_get_meta_data() did not return the "uri" element
+- Fixed a bug where stream_get_meta_data() did not return the "uri" element
for files opened with tmpname(). (Derick)
- Fixed a problem with SPL iterators aggregating the inner iterator. (Marcus)
-- Fixed an error in mysqli_fetch_fields (returned NULL instead of an array
+- Fixed an error in mysqli_fetch_fields (returned NULL instead of an array
when row number > field_count). (Georg)
- Fixed bug in mysql::client_version(). (Georg)
-- Fixed bug in mysqli extension with unsigned int(11) being represented as
+- Fixed bug in mysqli extension with unsigned int(11) being represented as
signed integer in PHP instead of string in 32bit systems. (Andrey)
- Fixed bug with $HTTP_RAW_POST_DATA not getting set. (Brian)
- Fixed crash inside stream_get_line() when length parameter equals 0. (Ilia)
@@ -2197,7 +2341,7 @@ PHP NEWS
- Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
(Andrey)
- Fixed fgetcsv() and fputcsv() inconsistency. (Dmitry)
-- Fixed inheritance check to control return by reference and pass by
+- Fixed inheritance check to control return by reference and pass by
reference correctly (ArrayAccess can no longer support references correctly).
(Marcus, Andi, Dmitry)
- Fixed initializing and argument checking for posix_mknod(). (Derick)
@@ -2209,7 +2353,7 @@ PHP NEWS
(Ilia, Stefan)
- Fixed possible INI setting leak via virtual() in Apache 2 sapi. (Ilia)
- Fixed possible register_globals toggle via parse_str(). (Ilia, Stefan)
-- Fixed potential GLOBALS overwrite via import_request_variables() and
+- Fixed potential GLOBALS overwrite via import_request_variables() and
possible crash and/or memory corruption. (Ilia)
- Fixed segfaults when CURL callback functions throw exception. (Tony)
- Fixed support for shared extensions on AIX. (Dmitry)
@@ -2222,16 +2366,16 @@ PHP NEWS
- Fixed bug #35273 (Error in mapping soap - java types). (Dmitry)
- Fixed bug #35249 (compile failure when ext/readline is compiled as shared).
(Jani)
-- Fixed bug #35248 (sqlite_query() doesn't set error_msg when return value is
- being used). (Ilia)
-- Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety on
+- Fixed bug #35248 (sqlite_query() doesn't set error_msg when return value is
+ being used). (Ilia)
+- Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety on
Linux). (Patch: shulmanb at il dot ibm dot com, Jani)
- Fixed bug #35239 (Objects can lose references). (Dmitry)
-- Fixed bug #35229 (call_user_func() crashes when argument_stack is nearly
+- Fixed bug #35229 (call_user_func() crashes when argument_stack is nearly
full). (Dmitry)
- Fixed bug #35197 (Destructor is not called). (Tony)
- Fixed bug #35179 (tokenizer extension needs T_HALT_COMPILER). (Greg)
-- Fixed bug #35176 (include()/require()/*_once() produce wrong error messages
+- Fixed bug #35176 (include()/require()/*_once() produce wrong error messages
about main()). (Dmitry)
- Fixed bug #35147 (__HALT_COMPILER() breaks with --enable-zend-multibyte).
(Dmitry, Moriyoshi)
@@ -2243,12 +2387,12 @@ PHP NEWS
(askalski at gmail dot com, Tony)
- Fixed bug #35078 (configure does not find ldap_start_tls_s). (Jani)
- Fixed bug #35046 (phpinfo() uses improper css enclosure). (Ilia)
-- Fixed bugs #35022, #35019 (Regression in the behavior of key() and
+- Fixed bugs #35022, #35019 (Regression in the behavior of key() and
current() functions). (Ilia)
-- Fixed bug #35017 (Exception thrown in error handler may cause unexpected
+- Fixed bug #35017 (Exception thrown in error handler may cause unexpected
behavior). (Dmitry)
- Fixed bug #35014 (array_product() always returns 0). (Ilia)
-- Fixed bug #35009 (ZTS: Persistent resource destruct crashes when extension
+- Fixed bug #35009 (ZTS: Persistent resource destruct crashes when extension
is compiled as shared). (Dmitry)
- Fixed bug #34996 (ImageTrueColorToPalette() crashes when ncolors is zero).
(Tony)
@@ -2260,77 +2404,77 @@ PHP NEWS
- Fixed bug #34965 (tidy is not binary safe). (Mike)
- Fixed bug #34957 (PHP doesn't respect ACLs for access checks). (Wez)
- Fixed bug #34950 (Unable to get WSDL through proxy). (Dmitry)
-- Fixed bug #34938 (dns_get_record() doesn't resolve long hostnames and
+- Fixed bug #34938 (dns_get_record() doesn't resolve long hostnames and
leaks). (Tony)
- Fixed bug #34905 (Digest authentication does not work with Apache 1). (Ilia)
- Fixed bug #34902 (mysqli::character_set_name() - undefined method). (Tony)
- Fixed bug #34899 (Fixed sqlite extension compile failure). (Ilia)
- Fixed bug #34893 (PHP5.1 overloading, Cannot access private property).
(Dmitry)
-- Fixed bug #34884 (Possible crash in ext/sqlite when sqlite.assoc_case is
+- Fixed bug #34884 (Possible crash in ext/sqlite when sqlite.assoc_case is
being used). (Tony, Ilia)
-- Fixed bug #34879 (str_replace, array_map corrupt negative array indexes on
+- Fixed bug #34879 (str_replace, array_map corrupt negative array indexes on
64-bit platforms). (Dmitry)
- Fixed bug #34873 (Segmentation Fault on foreach in object). (Dmitry)
- Fixed bug #34856 (configure fails to detect libiconv's type). (Tony)
-- Fixed bug #34855 (ibase_service_attach() segfault on AMD64).
+- Fixed bug #34855 (ibase_service_attach() segfault on AMD64).
(irie at gmx dot de, Tony)
-- Fixed bug #34851 (SO_RECVTIMEO and SO_SNDTIMEO socket options expect
+- Fixed bug #34851 (SO_RECVTIMEO and SO_SNDTIMEO socket options expect
integer parameter on Windows). (Mike)
-- Fixed bug #34850 (--program-suffix and --program-prefix not included in
+- Fixed bug #34850 (--program-suffix and --program-prefix not included in
man page names). (Jani)
-- Fixed bug #34821 (zlib encoders fail on widely varying binary data on
+- Fixed bug #34821 (zlib encoders fail on widely varying binary data on
windows). (Mike, Ilia)
-- Fixed bug #34818 (several functions crash when invalid mysqli_link object
+- Fixed bug #34818 (several functions crash when invalid mysqli_link object
is passed). (Tony)
-- Fixed bug #34810 (mysqli::init() and others use wrong $this pointer without
+- Fixed bug #34810 (mysqli::init() and others use wrong $this pointer without
checks). (Tony)
- Fixed bug #34809 (FETCH_INTO in PDO crashes without a destination object).
(Ilia)
- Fixed bug #34802 (Fixed crash on object instantiation failure). (Ilia)
- Fixed bug #34796 (missing SSL linking in ext/ftp when configured as shared).
(Jani)
-- Fixed bug #34790 (preg_match_all(), named capturing groups, variable
+- Fixed bug #34790 (preg_match_all(), named capturing groups, variable
assignment/return => crash). (Dmitry)
-- Fixed bug #34788 (SOAP Client not applying correct namespace to generated
+- Fixed bug #34788 (SOAP Client not applying correct namespace to generated
values). (Dmitry)
- Fixed bug #34787 (SOAP Client not handling boolean types correctly). (Dmitry)
-- Fixed bug #34786 (2 @ results in change to error_reporting() to random
+- Fixed bug #34786 (2 @ results in change to error_reporting() to random
value) (Dmitry, Tony)
- Fixed bug #34785 (subclassing of mysqli_stmt does not work). (Georg)
- Fixed bug #34782 (token_get_all() gives wrong result). (Dmitry)
- Fixed bug #34777 (Crash in dblib when fetching non-existent error info).
(Ilia)
- Fixed bug #34771 (strtotime() fails with 1-12am/pm). (Derick)
-- Fixed bug #34767 (Zend Engine 1 Compatibility not copying objects
+- Fixed bug #34767 (Zend Engine 1 Compatibility not copying objects
correctly). (Dmitry)
- Fixed bug #34758 (PDO_DBLIB did not implement rowCount()). (Ilia)
- Fixed bug #34757 (iconv_substr() gives "Unknown error" when offset > string
length). (Tony)
-- Fixed bug #34742 (ftp wrapper failures caused from segmented command
+- Fixed bug #34742 (ftp wrapper failures caused from segmented command
transfer). (Ilia)
- Fixed bug #34725 (CLI segmentation faults during cleanup). (Dmitry)
- Fixed bug #34723 (array_count_values() strips leading zeroes). (Tony)
- Fixed bug #34712 (zend.ze1_compatibility_mode = on segfault). (Dmitry)
- Fixed bug #34704 (Infinite recursion due to corrupt JPEG). (Marcus)
- Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry)
-- Fixed bug #34676 (missing support for strtotime("midnight") and
+- Fixed bug #34676 (missing support for strtotime("midnight") and
strtotime("noon")). (Derick)
- Fixed bug #34645 (ctype corrupts memory when validating large numbers).
(Ilia)
- Fixed bug #34643 (wsdl default value has no effect). (Dmitry)
- Fixed bug #34623 (Crash in pdo_mysql on longtext fields). (Ilia)
-- Fixed bug #34617 (zend_deactivate: objects_store used after
+- Fixed bug #34617 (zend_deactivate: objects_store used after
zend_objects_store_destroy is called). (Dmitry)
-- Fixed bug #34590 (User defined PDOStatement class can't implement
+- Fixed bug #34590 (User defined PDOStatement class can't implement
methods). (Marcus)
- Fixed bug #34584 (Segfault with SPL autoload handler). (Marcus)
- Fixed bug #34581 (crash with mod_rewrite). (Tony, Ilia)
-- Fixed bug #34565 (mb_send_mail does not fetch
+- Fixed bug #34565 (mb_send_mail does not fetch
mail.force_extra_parameters). (Marco, Ilia)
- Fixed bug #34557 (php -m exits with "error" 1). (Johannes)
- Fixed bug #34518 (Unset doesn't separate container in CV). (Dmitry)
-- Fixed bug #34505 (Possible memory corruption when unmangling properties
+- Fixed bug #34505 (Possible memory corruption when unmangling properties
with empty names). (Tony)
- Fixed bug #34478 (Incorrect parsing of url's fragment (#...)). (Dmitry)
- Fixed bug #34467 (foreach + __get + __set inconsistency). (Dmitry)
@@ -2344,17 +2488,17 @@ PHP NEWS
- Fixed bug #34321 (Possible crash in filter code). (Ilia)
- Fixed bug #34311 (unserialize() crashes with chars above 191 dec). (Nuno)
- Fixed bug #34310 (foreach($arr as $c->d => $x) crashes). (Dmitry)
-- Fixed bug #34307 (on_modify handler not called to set the default value if
- setting from php.ini was invalid). (Andrei)
+- Fixed bug #34307 (on_modify handler not called to set the default value if
+ setting from php.ini was invalid). (Andrei)
- Fixed bug #34306 (wddx_serialize_value() crashes with long array keys).
(Jani)
- Fixed bug #34304 (date() doesn't have a modifier for ISO Week Day). (Derick)
-- Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9).
+- Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9).
(Derick)
- Fixed bug #34299 (ReflectionClass::isInstantiable() returns true for abstract
classes). (Marcus)
- Fixed bug #34284 (CLI phpinfo showing html on _SERVER["argv"]). (Jani)
-- Fixed bug #34277 (array_filter() crashes with references and objects).
+- Fixed bug #34277 (array_filter() crashes with references and objects).
(Dmitry)
- Fixed bug #34276 (setAttributeNS doesn't work with default namespace).
(Rob)
@@ -2366,17 +2510,17 @@ PHP NEWS
- Fixed bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler).
(Dmitry, Alex)
- Fixed bug #34191 (ob_gzhandler does not enforce trailing \0). (Ilia)
-- Fixed bug #34156 (memory usage remains elevated after memory limit is
+- Fixed bug #34156 (memory usage remains elevated after memory limit is
reached). (Ilia)
- Fixed bug #34148 (+,- and . not supported as parts of scheme). (Ilia)
- Fixed bug #34137 (assigning array element by reference causes binary mess).
- (Dmitry)
+ (Dmitry)
- Fixed bug #34103 (line numbering not maintained in dom document). (Rob)
-- Fixed bug #34078 (Reflection API problems in methods with boolean or
+- Fixed bug #34078 (Reflection API problems in methods with boolean or
null default values). (Tony)
-- Fixed bug #34068 (Numeric string as array key not cast to integer in
+- Fixed bug #34068 (Numeric string as array key not cast to integer in
wddx_deserialize()). (Ilia)
-- Fixed bug #34064 (arr[] as param to function in class gives invalid
+- Fixed bug #34064 (arr[] as param to function in class gives invalid
opcode). (Dmitry)
- Fixed bug #34062 (Crash in catch block when many arguments are used).
(Dmitry)
@@ -2384,12 +2528,12 @@ PHP NEWS
- Fixed bug #34045 (Buffer overflow with serialized object). (Dmitry)
- Fixed bug #34001 (pdo_mysql truncates numeric fields at 4 chars). (Ilia)
- Fixed bug #33999 (object remains object when cast to int). (Dmitry)
-- Fixed bug #33996 (No information given for fatal error on passing invalid
+- Fixed bug #33996 (No information given for fatal error on passing invalid
value to typed argument). (Dmitry)
- Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP). (Dmitry)
-- Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2).
+- Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2).
(Ilia)
-- Fixed bug #33967 (misuse of Exception constructor doesn't display
+- Fixed bug #33967 (misuse of Exception constructor doesn't display
errorfile). (Jani)
- Fixed bug #33966 (Wrong use of reflectionproperty causes a segfault). (Tony)
- Fixed bug #33963 (mssql_bind() fails on input parameters). (Frank)
@@ -2397,30 +2541,30 @@ PHP NEWS
(Ilia)
- Fixed bug #33957 (gmdate('W')/date('W') sometimes returns wrong week number).
(Derick)
-- Fixed bug #33940 (array_map() fails to pass by reference when called
+- Fixed bug #33940 (array_map() fails to pass by reference when called
recursively). (Dmitry)
- Fixed bug #33917 (number_format() output with > 1 char separators). (Jani)
- Fixed bug #33904 (input array keys being escaped when magic quotes is off).
(Ilia)
- Fixed bug #33903 (spl_autoload_register class method). (Marcus)
-- Fixed bug #33899 (CLI: setting extension_dir=some/path extension=foobar.so
+- Fixed bug #33899 (CLI: setting extension_dir=some/path extension=foobar.so
does not work). (Jani)
- Fixed bug #33882 (CLI was looking for php.ini in wrong path). (Hartmut)
-- Fixed bug #33869 (strtotime() problem with "+1days" format). (Ilia)
-- Fixed bug #33841 (pdo sqlite driver forgets to update affected column
+- Fixed bug #33869 (strtotime() problem with "+1days" format). (Ilia)
+- Fixed bug #33841 (pdo sqlite driver forgets to update affected column
count on execution of prepared statments). (Ilia)
- Fixed bug #33837 (Informix ESQL version numbering schema changed). (Jani)
-- Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip
+- Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip
files). (Derick)
- Fixed bug #33802 (throw Exception in error handler causes crash). (Dmitry)
-- Fixed bug #33771 (error_reporting falls to 0 when @ was used inside
+- Fixed bug #33771 (error_reporting falls to 0 when @ was used inside
try/catch block). (Tony)
-- Fixed bug #33760 (cURL needs to implement CRYPTO_callback functions to
+- Fixed bug #33760 (cURL needs to implement CRYPTO_callback functions to
prevent locking). (Mike, Ilia)
-- Fixed bug #33732 (Wrong behavior of constants in class and interface
+- Fixed bug #33732 (Wrong behavior of constants in class and interface
extending). (Dmitry)
- Fixed bug #33723 (php_value overrides php_admin_value). (Dmitry)
-- Fixed bug #33720 (mb_encode_mimeheader does not work for multibyte
+- Fixed bug #33720 (mb_encode_mimeheader does not work for multibyte
chars). (Rui)
- Fixed bug #33710 (ArrayAccess objects does not initialize $this). (Dmitry)
- Fixed bug #33690 (Crash setting some ini directives in httpd.conf). (Rasmus)
@@ -2433,7 +2577,7 @@ PHP NEWS
- Fixed bug #33578 (strtotime() problem with "Oct17" format). (Derick)
- Fixed bug #33578 (strtotime() doesn't understand "11 Oct" format). (Derick)
- Fixed bug #33562 (date("") crashes). (Derick)
-- Fixed bug #33558 (warning with nested calls to functions returning by
+- Fixed bug #33558 (warning with nested calls to functions returning by
reference). (Dmitry)
- Fixed bug #33536 (strtotime() defaults to now even on non time string).
(Derick)
@@ -2441,7 +2585,7 @@ PHP NEWS
- Fixed bug #33523 (Memory leak in xmlrpc_encode_request()). (Ilia)
- Fixed bug #33520 (crash if safe_mode is on and session.save_path is changed).
(Dmitry)
-- Fixed bug #33512 (Add missing support for isset()/unset() overloading to
+- Fixed bug #33512 (Add missing support for isset()/unset() overloading to
complement the property get/set methods). (Dmitry)
- Fixed bug #33491 (crash after extending MySQLi internal class). (Tony)
- Fixed bug #33475 (cURL handle is not closed on curl_close(). (Ilia)
@@ -2449,18 +2593,18 @@ PHP NEWS
- Fixed bug #33433 (strtoll not available on Tru64). (Jani, Derick)
- Fixed bug #33427 (ext/odbc: check if unixODBC header file exists). (Jani)
- Fixed bug #33415 (strtotime() related bugs). (Derick)
-- Fixed bug #33414 (Comprehensive list of incorrect days returned after
+- Fixed bug #33414 (Comprehensive list of incorrect days returned after
strtotime() / date() tests). (Derick)
- Fixed bug #33389 (double free() when exporting a ReflectionClass). (Marcus)
- Fixed bug #33383 (crash when retrieving empty LOBs). (Tony)
-- Fixed bug #33382 (array_reverse() fails after *sort()), introduced by
+- Fixed bug #33382 (array_reverse() fails after *sort()), introduced by
zend_hash_sort() optimizations in HEAD. (Tony)
- Fixed bug #33340 (CLI Crash when calling php:function from XSLT). (Rob)
- Fixed bug #33326 (Cannot build extensions with phpize on Macosx). (Jani)
- Fixed bug #33318 (throw 1; results in Invalid opcode 108/1/8). (Dmitry)
- Fixed bug #33312 (ReflectionParameter methods do not work correctly).
(Dmitry)
-- Fixed bug #33299 (php:function no longer handles returned dom objects).
+- Fixed bug #33299 (php:function no longer handles returned dom objects).
(Rob, Joe Orton)
- Fixed bug #33286 (nested array_walk() calls and user array compare functions
broken; FCI cache). (Andrei, patch from m.bretz@metropolis-ag.de)
@@ -2472,16 +2616,16 @@ PHP NEWS
- Fixed bug #33243 (ze1_compatibility_mode does not work as expected). (Dmitry)
- Fixed bug #33242 (Mangled error message when stream fails). (Derick)
- Fixed bug #33222 (segfault when CURL handle is closed in a callback). (Tony)
-- Fixed bug #33214 (odbc_next_result does not signal SQL errors with
+- Fixed bug #33214 (odbc_next_result does not signal SQL errors with
2-statement SQL batches). (rich at kastle dot com, Tony)
-- Fixed bug #33212 ([GCC 4]: 'zend_error_noreturn' aliased to external symbol
+- Fixed bug #33212 ([GCC 4]: 'zend_error_noreturn' aliased to external symbol
'zend_error'). (Dmitry)
- Fixed bug #33210 (relax jpeg recursive loop protection). (Ilia)
- Fixed bug #33201 (Crash when fetching some data types). (Frank)
-- Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier
+- Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier
misbehave). (Jani)
- Fixed bug #33185 (--enable-session=shared does not build). (Jani)
-- Fixed bug #33171 (foreach enumerates private fields declared in base
+- Fixed bug #33171 (foreach enumerates private fields declared in base
classes). (Dmitry)
- Fixed bug #33167 (Possible crash inside pg_fetch_array()). (Ilia)
- Fixed bug #33164 (Soap extension incorrectly detects HTTP/1.1). (Ilia)
@@ -2491,33 +2635,33 @@ PHP NEWS
- Fixed bug #33150 (shtool: insecure temporary file creation). (Jani)
- Fixed bug #33136 (method offsetSet in class extended from ArrayObject crash
PHP). (Marcus)
-- Fixed bug #33125 (imagecopymergegray() produces mosaic rainbow effect).
+- Fixed bug #33125 (imagecopymergegray() produces mosaic rainbow effect).
(Pierre)
-- Fixed bug #33116 (crash when assigning class name to global variable in
+- Fixed bug #33116 (crash when assigning class name to global variable in
__autoload). (Dmitry)
- Fixed bug #33090 (mysqli_prepare() doesn't return an error). (Georg)
- Fixed bug #33076 (str_ireplace() incorrectly counts result string length
and may cause segfault). (Tony)
-- Fixed bug #33072 (Add a safemode/open_basedir check for runtime
+- Fixed bug #33072 (Add a safemode/open_basedir check for runtime
"session.save_path" change using session_save_path() function). (Rasmus)
-- Fixed bug #33070 (Improved performance of bzdecompress() by several orders
+- Fixed bug #33070 (Improved performance of bzdecompress() by several orders
of magnitude). (Ilia)
- Fixed bug #33059 (crash when moving xml attribute set in dtd). (Ilia)
-- Fixed bug #33057 (Don't send extraneous entity-headers on a 304 as per
+- Fixed bug #33057 (Don't send extraneous entity-headers on a 304 as per
RFC 2616 section 10.3.5) (Rasmus, Choitel)
- Fixed bug #33019 (socket errors cause memory leaks in php_strerror()).
(jwozniak23 at poczta dot onet dot pl, Tony).
- Fixed bug #33017 ("make distclean" gives an error with VPATH build). (Jani)
-- Fixed bug #33013 ("next month" was handled wrong while parsing dates).
+- Fixed bug #33013 ("next month" was handled wrong while parsing dates).
(Derick)
-- Fixed bug #32993 (implemented Iterator function current() don't throw
+- Fixed bug #32993 (implemented Iterator function current() don't throw
exception). (Dmitry)
- Fixed bug #32981 (ReflectionMethod::getStaticVariables() causes apache2.0.54
seg fault). (Dmitry)
-- Fixed bug #32956 (mysql_bind_result() doesn't support MYSQL_TYPE_NULL).
+- Fixed bug #32956 (mysql_bind_result() doesn't support MYSQL_TYPE_NULL).
(Georg)
- Fixed bug #32947 (Incorrect option for mysqli default password). (Georg)
-- Fixed bug #32944 (Disabling session.use_cookies doesn't prevent reading
+- Fixed bug #32944 (Disabling session.use_cookies doesn't prevent reading
session cookies). (Jani, Tony)
- Fixed bug #32941 (Sending structured SOAP fault kills a php). (Dmitry)
- Fixed bug #32937 (open_basedir looses trailing / in the limiter).
@@ -2527,10 +2671,10 @@ PHP NEWS
- Fixed bug #32933 (Cannot extend class "SQLiteDatabase"). (Marcus)
- Fixed bug #32932 (Oracle LDAP: ldap_get_entries(), invalid pointer). (Jani)
- Fixed bug #32930 (class extending DOMDocument doesn't clone properly). (Rob)
-- Fixed bug #32924 (file included with "auto_prepend_file" can be included
+- Fixed bug #32924 (file included with "auto_prepend_file" can be included
with require_once() or include_once()). (Stas)
- Fixed bug #32904 (pg_get_notify() ignores result_type parameter). (Tony)
-- Fixed bug #32852 (Crash with singleton and __destruct when
+- Fixed bug #32852 (Crash with singleton and __destruct when
zend.ze1_compatibility_mode = On). (Dmitry)
- Fixed bug #32833 (Invalid opcode). (Dmitry)
- Fixed bug #32813 (parse_url() does not handle scheme-only urls properly).
@@ -2539,13 +2683,13 @@ PHP NEWS
- Fixed bug #32809 (Missing T1LIB support on Windows). (Edin)
- Fixed bug #32802 (General cookie overrides more specific cookie). (Ilia)
- Fixed bugs #32800, #32830 (ext/odbc: Problems with 64bit systems). (Jani)
-- Fixed bug #32799 (crash: calling the corresponding global var during the
+- Fixed bug #32799 (crash: calling the corresponding global var during the
destruct). (Dmitry)
- Fixed bug #32776 (SOAP doesn't support one-way operations). (Dmitry)
- Fixed bug #32773 (GMP functions break when second parameter is 0). (Stas)
- Fixed bug #32759 (incorrect determination of default value (COM)). (Wez)
- Fixed bug #32758 (Cannot access safearray properties in VB6 objects). (Wez)
-- Fixed bug #32755 (Segfault in replaceChild() when DocumentFragment has no
+- Fixed bug #32755 (Segfault in replaceChild() when DocumentFragment has no
children). (Rob)
- Fixed bug #32753 (Undefined constant SQLITE_NOTADB). (Ilia)
- Fixed bug #32742 (segmentation fault when the stream with a wrapper
@@ -2554,18 +2698,18 @@ PHP NEWS
(Derick)
- Fixed bug #32686 (Require/include file in destructor causes segfault).
(Marcus)
-- Fixed bug #32682 (ext/mssql: Error on module shutdown when called from
+- Fixed bug #32682 (ext/mssql: Error on module shutdown when called from
activescript). (Frank)
- Fixed bug #32674 (exception in iterator causes crash). (Dmitry)
-- Fixed bug #32660 (Assignment by reference causes crash when field access is
+- Fixed bug #32660 (Assignment by reference causes crash when field access is
overloaded (__get)). (Dmitry)
-- Fixed bug #32647 (Using register_shutdown_function() with invalid callback
+- Fixed bug #32647 (Using register_shutdown_function() with invalid callback
can crash PHP). (Jani)
-- Fixed bug #32615 (Segfault in replaceChild() using fragment when
+- Fixed bug #32615 (Segfault in replaceChild() using fragment when
previousSibling is NULL). (Rob)
-- Fixed bug #32613 (ext/snmp: use of snmp_shutdown() causes snmpapp.conf
+- Fixed bug #32613 (ext/snmp: use of snmp_shutdown() causes snmpapp.conf
access errors). (Jani, ric at arizona dot edu)
-- Fixed bug #32608 (html_entity_decode() converts single quotes even if
+- Fixed bug #32608 (html_entity_decode() converts single quotes even if
ENT_NOQUOTES is given). (Ilia)
- Fixed bug #32596 (Segfault/Memory Leak by getClass (etc) in __destruct).
(Dmitry)
@@ -2574,7 +2718,7 @@ PHP NEWS
(Ilia)
- Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).
(Ilia)
-- Fixed bug #32587 (Apache2: errors sent to error_log do not include
+- Fixed bug #32587 (Apache2: errors sent to error_log do not include
timestamps). (Jani)
- Fixed bug #32560 (configure looks for incorrect db2 library). (Tony)
- Fixed bug #32553 (mmap loads only the 1st 2000000 bytes on Win32). (Ilia)
@@ -2585,7 +2729,7 @@ PHP NEWS
- Fixed bug #32491 (File upload error - unable to create a temporary file).
(Uwe Schindler)
- Fixed bug #32455 (wrong setting property to unset value). (Dmitry)
-- Fixed bug #32429 (method_exists() always return TRUE if __call method
+- Fixed bug #32429 (method_exists() always return TRUE if __call method
exists). (Dmitry)
- Fixed bug #32428 (The @ warning error suppression operator is broken).
(Dmitry)
@@ -2593,19 +2737,19 @@ PHP NEWS
(Dmitry)
- Fixed bug #32405 (mysqli::fetch() returns bad data - 64bit problem).
(Andrey)
-- Fixed bug #32296 (get_class_methods() output has changed between 5.0.2 and
+- Fixed bug #32296 (get_class_methods() output has changed between 5.0.2 and
5.0.3). (Dmitry)
- Fixed bug #32282 (Segfault in mysqli_fetch_array on 64-bit). (Georg)
-- Fixed bug #32245 (xml_parser_free() in a function assigned to the xml
+- Fixed bug #32245 (xml_parser_free() in a function assigned to the xml
parser gives a segfault). (Rob)
- Fixed bug #32179 (xmlrpc_encode() segfaults with recursive references).
(Tony)
- Fixed bug #32171 (Userspace stream wrapper crashes PHP). (Tony, Dmitry)
- Fixed bug #32160 (copying a file into itself leads to data loss). (Ilia)
- Fixed bug #32139 (SOAP client does not auto-handle base64 encoding). (Ilia)
-- Fixed bug #32109 ($_POST is not populated in multi-threaded environment).
+- Fixed bug #32109 ($_POST is not populated in multi-threaded environment).
(Moriyoshi)
-- Fixed bug #32080 (segfault when assigning object to itself with
+- Fixed bug #32080 (segfault when assigning object to itself with
zend.ze1_compatibility_mode=On). (Dmitry)
- Fixed bug #32021 (Crash caused by range('', 'z')). (Derick)
- Fixed bug #32013 (ext/mysqli bind_result causes fatal error: memory limit).
@@ -2614,31 +2758,31 @@ PHP NEWS
- Fixed bug #32009 (crash when mssql_bind() is called more than once). (Frank)
- Fixed bug #31971 (ftp_login fails on some SSL servers).
(frantisek at augusztin dot com)
-- Fixed bug #31887 (ISAPI: Custom 5xx error does not return correct HTTP
+- Fixed bug #31887 (ISAPI: Custom 5xx error does not return correct HTTP
response message). (Jani)
- Fixed bug #31828 (Crash with zend.ze1_compatibility_mode=On). (Dmitry)
-- Fixed bug #31668 (multi_query works exactly every other time - multi query
+- Fixed bug #31668 (multi_query works exactly every other time - multi query
d/e flag global and not per connection). (Andrey)
- Fixed bug #31636 (another crash when echoing a COM object). (Wez)
- Fixed bug #31583 (php_std_date() uses short day names in non-y2k_compliance
mode). (mike at php dot net)
- Fixed bug #31525 (object reference being dropped. $this getting lost).
(Stas, Dmitry)
-- Fixed bug #31502 (Wrong deserialization from session when using WDDX
- serializer). (Dmitry)
+- Fixed bug #31502 (Wrong deserialization from session when using WDDX
+ serializer). (Dmitry)
- Fixed bug #31478 (segfault with empty() / isset()). (Moriyoshi)
- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
- Fixed bug #31363 (broken non-blocking flock()). (ian at snork dot net)
- Fixed bug #31358 (Older GCC versions do not provide portable va_copy()).
(Jani)
- Fixed bug #31341 (escape on curly inconsistent). (Dmitry)
-- Fixed bug #31256 (PHP_EVAL_LIBLINE configure macro does not handle
+- Fixed bug #31256 (PHP_EVAL_LIBLINE configure macro does not handle
-pthread). (Jani)
- Fixed bug #31213 (Side effects caused by fix of bug #29493). (Dmitry)
-- Fixed bug #31177 (memory leaks and corruption because of incorrect
+- Fixed bug #31177 (memory leaks and corruption because of incorrect
refcounting). (Dmitry)
- Fixed bug #31158 (array_splice on $GLOBALS crashes). (Dmitry)
-- Fixed bug #31054 (safe_mode & open_basedir checks only check first
+- Fixed bug #31054 (safe_mode & open_basedir checks only check first
include_path value). (Ilia)
- Fixed bug #31033 (php:function(string, nodeset) with xsl:key crashes PHP).
(Rob)
@@ -2646,26 +2790,26 @@ PHP NEWS
(Dmitry)
- Fixed bug #30889 (Conflict between __get/__set and ++ operator). (Dmitry)
- Fixed bug #30833 (array_count_values() modifying input array). (Tony)
-- Fixed bug #30828 (debug_backtrace() reports incorrect class in overridden
+- Fixed bug #30828 (debug_backtrace() reports incorrect class in overridden
methods). (Dmitry)
-- Fixed bug #30820 (static member conflict with $this->member silently
+- Fixed bug #30820 (static member conflict with $this->member silently
ignored). (Dmitry)
- Fixed bug #30819 (Better support for LDAP SASL bind). (Jani)
-- Fixed bug #30791 (magic methods (__sleep/__wakeup/__toString) call
+- Fixed bug #30791 (magic methods (__sleep/__wakeup/__toString) call
__call if object is overloaded). (Dmitry)
-- Fixed bug #30707 (Segmentation fault on exception in method).
+- Fixed bug #30707 (Segmentation fault on exception in method).
(Stas, Dmitry)
-- Fixed bug #30702 (cannot initialize class variable from class constant).
+- Fixed bug #30702 (cannot initialize class variable from class constant).
(Dmitry)
-- Fixed bug #30578 (Output buffers flushed before calling __destruct()
+- Fixed bug #30578 (Output buffers flushed before calling __destruct()
functions). (Jani)
- Fixed bug #30519 (Interface not existing says Class not found). (Dmitry)
- Fixed bug #30407 (Strange behavior of default arguments). (Dmitry)
- Fixed bug #30394 (Assignment operators yield wrong result with __get/__set).
(Dmitry)
-- Fixed bug #30332 (zend.ze1_compatibility_mode isn't fully compatible with
+- Fixed bug #30332 (zend.ze1_compatibility_mode isn't fully compatible with
array_push()). (Dmitry)
-- Fixed bug #30162 (Catching exception in constructor causes lose of
+- Fixed bug #30162 (Catching exception in constructor causes lose of
$this). (Dmitry)
- Fixed bug #30140 (Problem with array in static properties). (Dmitry)
- Fixed bug #30126 (Enhancement for error message for abstract classes).
@@ -2692,11 +2836,11 @@ PHP NEWS
- Fixed bug #29311 (calling parent constructor in mysqli). (Georg)
- Fixed bug #29268 (__autoload() not called with Reflection->getClass()).
(Dmitry)
-- Fixed bug #29256 (SOAP HTTP Error when envelop size is more than 24345
+- Fixed bug #29256 (SOAP HTTP Error when envelop size is more than 24345
bytes). (Dmitry, Wez)
- Fixed bug #29253 (array_diff with $GLOBALS argument fails). (Dmitry)
- Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry)
-- Fixed bug #29210 (Function: is_callable - no support for private and
+- Fixed bug #29210 (Function: is_callable - no support for private and
protected classes). (Dmitry)
- Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry)
- Fixed bug #29104 (Function declaration in method doesn't work). (Dmitry)
@@ -2712,7 +2856,7 @@ PHP NEWS
(Moriyoshi)
- Fixed bug #28377 (debug_backtrace is intermittently passing args). (Dmitry)
- Fixed bug #28355 (glob wont error if dir is not readable). (Hartmut)
-- Fixed bug #28072 (static array with some constant keys will be incorrectly
+- Fixed bug #28072 (static array with some constant keys will be incorrectly
ordered). (Dmitry)
- Fixed bug #27908 (xml default_handlers not being called). (Rob)
- Fixed bug #27598 (list() array key assignment causes HUGE memory leak).
@@ -2720,14 +2864,14 @@ PHP NEWS
- Fixed bug #27268 (Bad references accentuated by clone). (Dmitry)
- Fixed bug #26456 (Wrong results from Reflection-API getDocComment() when
called via STDIN). (Dmitry)
-- Fixed bug #25922 (In error handler, modifying 5th arg (errcontext) may
+- Fixed bug #25922 (In error handler, modifying 5th arg (errcontext) may
result in seg fault). (Dmitry)
-- Fixed bug #25359 (array_multisort() doesn't work in a function if array is
+- Fixed bug #25359 (array_multisort() doesn't work in a function if array is
global or reference). (Dmitry)
- Fixed bug #22836 (returning reference to uninitialized variable). (Dmitry)
-- Fixed bug #21306 (ext/sesssion: catch bailouts of write handler during
+- Fixed bug #21306 (ext/sesssion: catch bailouts of write handler during
RSHUTDOWN). (Jani, Xuefer at 21cn dot com)
-- Fixed bug #15854 (boolean ini options may be incorrectly displayed as Off
+- Fixed bug #15854 (boolean ini options may be incorrectly displayed as Off
when they are On). (Tony)
- Fixed bugs #14561, #20382, #26090, #26320, #28024, #30532, #32086, #32270,
#32555, #32588, #33056 (strtotime() related bugs). (Derick)
@@ -2750,7 +2894,7 @@ PHP NEWS
. Bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes)
. bug #30573 (compiler warnings in libmbfl due to invalid type cast)
. Bug #30549 (incorrect character translations for some ISO8859 charsets).
-- Fixed bug preventing from building oci8 as shared.
+- Fixed bug preventing from building oci8 as shared.
(stanislav dot voroniy at portavita dot nl, Tony)
- Fixed a bug in mysql_affected_rows and mysql_stmt_affected_rows when the
api function returns -1 (Georg)
@@ -2759,30 +2903,30 @@ PHP NEWS
- Fixed build system to always use bundled libtool files. (Jani)
- Fixed a bug in mysqli_stmt_execute() (type conversion with NULL values).
(Georg)
-- Fixed segfault in mysqli_fetch_field_direct() when invalid field offset
+- Fixed segfault in mysqli_fetch_field_direct() when invalid field offset
is passed. (Tony)
-- Fixed posix_getsid() & posix_getpgid() to return sid & pgid instead
- of true. (Tony)
+- Fixed posix_getsid() & posix_getpgid() to return sid & pgid instead
+ of true. (Tony)
- Fixed bug #32394 (offsetUnset() segfaults in a foreach). (Marcus)
-- Fixed bug #32373 (segfault in bzopen() if supplied path to non-existent
+- Fixed bug #32373 (segfault in bzopen() if supplied path to non-existent
file). (Tony)
-- Fixed bug #32326 (Check values of Connection/Transfer-Encoding
+- Fixed bug #32326 (Check values of Connection/Transfer-Encoding
case-incentively in SOAP extension). (Ilia)
-- Fixed bug #32290 (call_user_func_array() calls wrong class method within
+- Fixed bug #32290 (call_user_func_array() calls wrong class method within
child class). (Marcus)
- Fixed bug #32238 (spl_array.c: void function cannot return value). (Johannes)
- Fixed bug #32210 (proc_get_status() sets "running" always to true). (Ilia)
- Fixed bug #32200 (Prevent using both --with-apxs2 and --with-apxs2filter).
(Jani)
- Fixed bug #32134 (Overloading offsetGet/offsetSet). (Marcus)
-- Fixed bug #32130 (ArrayIterator::seek() does not throw an Exception on
+- Fixed bug #32130 (ArrayIterator::seek() does not throw an Exception on
invalid index). (Marcus)
- Fixed bug #32115 (dateTime SOAP encoding of timezone incorrect). (Dmitry)
- Fixed bug #32081 (in mysqli default socket value is not being used). (Ilia)
- Fixed bug #32021 (Crash caused by range('', 'z')). (Derick)
- Fixed bug #32011 (Fragments which replaced Nodes are not globaly useable).
(Rob)
-- Fixed bug #32001 (xml_parse_into_struct() function exceeds maximum
+- Fixed bug #32001 (xml_parse_into_struct() function exceeds maximum
execution time). (Rob, Moriyoshi)
- Fixed bug #31980 (Unicode exif data not available on Windows). (Edin)
- Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns
@@ -2800,9 +2944,9 @@ PHP NEWS
- Fixed bug #31755 (Cannot create SOAP header in no namespace). (Dmitry)
- Fixed bug #31754 (dbase_open() fails for mode = 1). (Mehdi, Derick)
- Fixed bug #31751 (pg_parameter_status() missing on Windows). (Edin)
-- Fixed bug #31747 (SOAP Digest Authentication doesn't work with
+- Fixed bug #31747 (SOAP Digest Authentication doesn't work with
"HTTP/1.1 100 Continue" response). (Dmitry)
-- Fixed bug #31732 (mb_get_info() causes segfault when no parameters
+- Fixed bug #31732 (mb_get_info() causes segfault when no parameters
specified). (Tony)
- Fixed bug #31710 (Wrong return values for mysqli_autocommit/commit/rollback).
(Georg)
@@ -2810,7 +2954,7 @@ PHP NEWS
- Fixed bug #31695 (Cannot redefine endpoint when using WSDL). (Dmitry)
- Fixed bug #31684 (dio_tcsetattr(): misconfigured termios settings).
(elod at itfais dot com)
-- Fixed bug #31683 (changes to $name in __get($name) override future
+- Fixed bug #31683 (changes to $name in __get($name) override future
parameters). (Dmitry)
- Fixed bug #31699 (unserialize() float problem on non-English locales). (Ilia)
- Fixed bug #31562 (__autoload() problem with static variables). (Marcus)
@@ -2825,7 +2969,7 @@ PHP NEWS
translation). (Ilia)
- Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). (Ilia)
- Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). (Ilia)
-- Fixed bug #31454 (session_set_save_handler crashes PHP when supplied
+- Fixed bug #31454 (session_set_save_handler crashes PHP when supplied
non-existent object ref). (Tony)
- Fixed bug #31444 (Memory leak in zend_language_scanner.c).
(hexer at studentcenter dot org)
@@ -2839,13 +2983,13 @@ PHP NEWS
- Fixed bug #31361 (simplexml/domxml segfault when adding node twice). (Rob)
- Fixed bug #31348 (CachingIterator::rewind() leaks). (Marcus)
- Fixed bug #31346 (ArrayIterator::next segfaults). (Marcus)
-- Fixed bug #31190 (Unexpected warning then exception is thrown from
+- Fixed bug #31190 (Unexpected warning then exception is thrown from
call_user_func_array()). (phpbugs at domain51 dot net, Dmitry)
- Fixed bug #31142 (imap_mail_compose() fails to generate correct output). (Ilia)
- Fixed bug #31139 (XML Parser Functions seem to drop &amp; when parsing). (Rob)
- Fixed bug #31398 (When magic_guotes_gpc are enabled filenames with ' get cutoff).
(Ilia)
-- Fixed bug #31288 (Possible crash in mysql_fetch_field(), if mysql_list_fields()
+- Fixed bug #31288 (Possible crash in mysql_fetch_field(), if mysql_list_fields()
was not called previously). (Ilia)
- Fixed bug #31107, #31110, #31111, #31249 (Compile failure of zend_strtod.c).
(Jani)
@@ -2859,7 +3003,7 @@ PHP NEWS
- Fixed bug #31072 (var_export() does not output an array element with an empty
string key). (Derick)
- Fixed bug #31060 (imageftbbox() does not use linespacing parameter). (Jani)
-- Fixed bug #31056 (php_std_date() returns invalid formatted date if
+- Fixed bug #31056 (php_std_date() returns invalid formatted date if
y2k_compliance is On). (Ilia)
- Fixed bug #31055 (apache2filter: per request leak proportional to the full
path of the request URI). (kameshj at fastmail dot fm)
@@ -2869,11 +3013,11 @@ PHP NEWS
failure). (Moriyoshi)
- Fixed bug #30862 (Static array with boolean indexes). (Marcus)
- Fixed bug #30726 (-.1 like numbers are not being handled correctly). (Ilia)
-- Fixed bug #30725 (PHP segfaults when an exception is thrown in getIterator()
+- Fixed bug #30725 (PHP segfaults when an exception is thrown in getIterator()
within foreach). (Marcus)
- Fixed bug #30609 (cURL functions bypass open_basedir). (Jani)
- Fixed bug #30446 (apache2handler: virtual() includes files out of sequence)
-- Fixed bug #30430 (odbc_next_result() doesn't bind values and that results
+- Fixed bug #30430 (odbc_next_result() doesn't bind values and that results
in segfault). (pdan-php at esync dot org, Tony)
- Fixed bug #30266 (Invalid opcode 137/1/8). (Marcus)
- Fixed bug #30120 (imagettftext() and imagettfbbox() accept too many
@@ -2881,7 +3025,7 @@ PHP NEWS
- Fixed bug #30106 (SOAP cannot not parse 'ref' element. Causes Uncaught
SoapFault exception). (Dmitry)
- Fixed bug #29989 (type re_registers redefined in oniguruma.h). (Moriyoshi)
-- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX
+- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX
because of fflush() called on already closed filedescriptor). (Tony)
- Fixed bug #29767 (Weird behaviour of __set($name, $value)). (Dmitry)
- Fixed bug #29733 (printf() handles repeated placeholders wrong).
@@ -2901,9 +3045,9 @@ PHP NEWS
entries). (Andrei)
- Fixed bug #28444 (Cannot access undefined property for object with overloaded
property access). (Dmitry)
-- Fixed bug #28442 (Changing a static variables in a class changes it across
+- Fixed bug #28442 (Changing a static variables in a class changes it across
sub/super classes.) (Marcus)
-- Fixed bug #28324 (HTTP_SESSION_VARS appear when register_long_arrays is
+- Fixed bug #28324 (HTTP_SESSION_VARS appear when register_long_arrays is
Off). (Tony)
- Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream).
(chris at ex-parrot dot com)
@@ -2919,9 +3063,9 @@ PHP NEWS
of a float with the . as decimal seperator. (Derick)
- Fixed error handling in mysqli_multi_query. (Georg)
- Extended the functionality of is_subclass_of() to accept either a class name
- or an object as first parameter. (Andrey)
+ or an object as first parameter. (Andrey)
- Fixed potential problems with unserializing invalid serialize data. (Marcus)
-- Fixed bug #32076 (ReflectionMethod::isDestructor() always return true).
+- Fixed bug #32076 (ReflectionMethod::isDestructor() always return true).
(Derick, Tony)
- Fixed bug #31034 (Problem with non-existing iconv header file). (Derick)
- Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
@@ -2942,16 +3086,16 @@ PHP NEWS
(Dmitry)
- Fixed bug #30783 (Apache crash when using ReflectionFunction::
getStaticVariables()). (Marcus)
-- Fixed bug #30750 (Meaningful error message when upload directory is not
+- Fixed bug #30750 (Meaningful error message when upload directory is not
accessible). (Ilia)
- Fixed bug #30685 (Malformed SOAPClient http header reequest). (Dmitry)
-- Fixed bug #30672 (Problem handling exif data in jpeg images at unusual
+- Fixed bug #30672 (Problem handling exif data in jpeg images at unusual
places). (Marcus)
- Fixed bug #30658 (Ensure that temporary files created by GD are removed).
(Ilia)
- Fixed bug #30645 (def. multi result set support for mysql_connect). (Georg)
- Fixed bug #30637 (compile with pear error). (Antony)
-- Fixed bug #30587 (array_multisort doesn't separate zvals before
+- Fixed bug #30587 (array_multisort doesn't separate zvals before
changing them). (Tony)
- Fixed bug #30572 (crash when comparing SimpleXML attribute to a boolean).
(Andi)
@@ -2960,7 +3104,7 @@ PHP NEWS
- Fixed bug #30490 (PEAR installation fails). (Antony)
- Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia)
- Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony)
-- Fixed bug #30388 (rename across filesystems loses ownership and
+- Fixed bug #30388 (rename across filesystems loses ownership and
permission info). (Tony)
- Fixed bug #30387 (stream_socket_client async connect was broken).
(vnegrier at esds dot com, Wez).
@@ -2975,7 +3119,7 @@ PHP NEWS
(Marcus)
- Fixed bug #30329 (Error Fetching http body, No Content-Length, connection
closed or chunked data). (Dmitry)
-- Fixed bug #30282 (segfault when using unknown/unsupported
+- Fixed bug #30282 (segfault when using unknown/unsupported
session.save_handler and/or session.serialize_handler). (Tony)
- Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
(Ilia)
@@ -3007,11 +3151,11 @@ PHP NEWS
- Fixed bug #28228 (NULL decimal separator is not being handled correctly).
(Ilia)
- Fixed bug #28209 (strtotime("now")). (Derick)
-- Fixed bug #27798 (private / protected variables not exposed by
+- Fixed bug #27798 (private / protected variables not exposed by
get_object_vars() inside class). (Marcus)
- Fixed bug #27728 (Can't return within a zend_try {} block or the previous
bailout state isn't restored. (Andi)
-- Fixed bug #27183 (Userland stream wrapper segfaults on stream_write).
+- Fixed bug #27183 (Userland stream wrapper segfaults on stream_write).
(Christian)
23 Sep 2004, PHP 5.0.2
@@ -3028,12 +3172,12 @@ PHP NEWS
- Renamed SoapClient->__call() to SoapClinet->__soapCall(). (Dmitry)
- Fixed bug with raw_post_data not getting set (Brian)
- Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
-- Fixed bug #30209 (ReflectionClass::getMethod() lowercases attribute).
+- Fixed bug #30209 (ReflectionClass::getMethod() lowercases attribute).
(Marcus)
- Fixed bug #30182 (SOAP module processing WSDL file dumps core). (Dmitry)
- Fixed bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests).
(Dmitry)
-- Fixed bug #29985 (unserialize()/ __PHP_Incomplete_class does not report
+- Fixed bug #29985 (unserialize()/ __PHP_Incomplete_class does not report
correctly class name). (Marcus, Tony)
- Fixed bug #29945 (simplexml_load_file URL limitation 255 char). (Rob)
- Fixed bug #29873 (No defines around pcntl_*priority definitions). (Derick)
@@ -3054,7 +3198,7 @@ PHP NEWS
- Fixed bug #29711 (Changed ext/xml to default to UTF-8 output). (Rob)
- Fixed bug #29678 (opendir() with ftp:// wrapper segfaults if path does not
have trailing slash). (Ilia)
-- Fixed bug #29657 (xml_* functions throw non descriptive error).
+- Fixed bug #29657 (xml_* functions throw non descriptive error).
(Christian, Rob)
- Fixed bug #29656 (segfault on result and statement properties). (Georg)
- Fixed bug #29566 (foreach/string handling strangeness (crash)). (Dmitry)
@@ -3074,7 +3218,7 @@ PHP NEWS
- Changed destructor mechanism so that destructors are called prior to request
shutdown. (Marcus)
- Rewritten UNIX and Windows install help files. (Documentation Team)
-- Updated several libraries bundled with the windows release which now
+- Updated several libraries bundled with the windows release which now
includes libxml2-2.6.11, libxslt-1.1.7 and iconv-1.9.1. (Rob, Edin)
- Improved and moved ActiveScript SAPI to PECL. (Wez)
- Fixed bug #29606 (php_strip_whitespace() prints to stdout rather then
@@ -3092,12 +3236,12 @@ PHP NEWS
- Fixed bug #29431 (crash when parsing invalid address; invalid address
returned by stream_socket_recvfrom(), stream_socket_getname()). (Wez)
- Fixed bug #29409 (Segfault in PHP functions called from XSLT). (Rob)
-- Fixed unloading of dynamically loaded extensions.
+- Fixed unloading of dynamically loaded extensions.
(Marcus, kameshj at fastmail dot fm)
- Fixed bug #29395 (sqlite_escape_string() returns bogus data on empty
strings). (Ilia, Tony)
- Fixed bug #29392 (com_dotnet crashes when echo'ing an object). (Wez)
-- Fixed bug #29368 (The destructor is called when an exception is thrown from
+- Fixed bug #29368 (The destructor is called when an exception is thrown from
the constructor). (Marcus)
- Fixed bug #29354 (Exception constructor marked as both public and protected).
(Marcus)
@@ -3138,10 +3282,10 @@ PHP NEWS
- Fixed bug #28999 (fixed behaviour of exec() to work as it did in 4.X). (Ilia)
- Fixed bug #28868 (Internal filter registry not thread safe). (Sara)
- Fixed bug #28851 (call_user_func_array has typo in error message). (Marcus)
-- Fixed bug #28831 (ArrayObject::offsetGet() does the work of offsetUnset()).
+- Fixed bug #28831 (ArrayObject::offsetGet() does the work of offsetUnset()).
(Marcus)
- Fixed bug #28822 (ArrayObject::offsetExists() works inverted). (Marcus)
-- Fixed bug #28789 (ReflectionProperty getValue() fails on public static
+- Fixed bug #28789 (ReflectionProperty getValue() fails on public static
members). (Marcus)
- Fixed bug #28771 (Segfault when using xslt and clone). (Rob)
- Fixed bug #28751 (SoapServer does not call _autoload()). (Dmitry)
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index fd6f56481..f1182e6f4 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
- | Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski |
+ | Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index 558f3d07f..4a73c3487 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
- | Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski |
+ | Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
diff --git a/TSRM/tsrm_nw.c b/TSRM/tsrm_nw.c
index d12044c7f..435d7293d 100644
--- a/TSRM/tsrm_nw.c
+++ b/TSRM/tsrm_nw.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_nw.c,v 1.8.2.1.2.1 2007/01/01 09:35:45 sebastian Exp $ */
+/* $Id: tsrm_nw.c,v 1.8.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#include <stdlib.h>
#include <stdio.h>
diff --git a/TSRM/tsrm_nw.h b/TSRM/tsrm_nw.h
index 71acb408a..968d8a34a 100644
--- a/TSRM/tsrm_nw.h
+++ b/TSRM/tsrm_nw.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index 71c830fc9..a69d445cf 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.36 2007/10/23 05:57:35 dmitry Exp $ */
+/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.38 2007/12/31 07:20:02 sebastian Exp $ */
#include <sys/types.h>
#include <sys/stat.h>
@@ -712,22 +712,24 @@ no_realpath:
}
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
+ free(free_path);
+
+ if (use_realpath == CWD_REALPATH) {
+ if (ret) {
+ CWD_STATE_FREE(state);
+ *state = old_state;
+ return 1;
+ }
+ } else {
#if defined(TSRM_WIN32) || defined(NETWARE)
- if (path[path_length-1] == '\\' || path[path_length-1] == '/') {
+ if (path[path_length-1] == '\\' || path[path_length-1] == '/') {
#else
- if (path[path_length-1] == '/') {
+ if (path[path_length-1] == '/') {
#endif
- state->cwd = (char*)realloc(state->cwd, state->cwd_length + 2);
- state->cwd[state->cwd_length++] = DEFAULT_SLASH;
- state->cwd[state->cwd_length] = 0;
- }
-
- free(free_path);
-
- if ((use_realpath == CWD_REALPATH) && ret) {
- CWD_STATE_FREE(state);
- *state = old_state;
- return 1;
+ state->cwd = (char*)realloc(state->cwd, state->cwd_length + 2);
+ state->cwd[state->cwd_length++] = DEFAULT_SLASH;
+ state->cwd[state->cwd_length] = 0;
+ }
}
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h
index 4ee77b7c1..aae37fae0 100644
--- a/TSRM/tsrm_virtual_cwd.h
+++ b/TSRM/tsrm_virtual_cwd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.8 2007/01/22 09:31:46 dmitry Exp $ */
+/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.9 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index eb5ae877a..804c809cc 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_win32.c,v 1.27.2.1.2.7 2007/04/16 08:09:54 dmitry Exp $ */
+/* $Id: tsrm_win32.c,v 1.27.2.1.2.8 2007/12/31 07:20:02 sebastian Exp $ */
#include <stdio.h>
#include <fcntl.h>
diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h
index 1695b117e..757b97cb6 100644
--- a/TSRM/tsrm_win32.h
+++ b/TSRM/tsrm_win32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_win32.h,v 1.19.2.1.2.1 2007/01/01 09:35:45 sebastian Exp $ */
+/* $Id: tsrm_win32.h,v 1.19.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef TSRM_WIN32_H
#define TSRM_WIN32_H
diff --git a/Zend/FlexLexer.h b/Zend/FlexLexer.h
index ecaa70e71..614fdeda0 100644
--- a/Zend/FlexLexer.h
+++ b/Zend/FlexLexer.h
@@ -1,4 +1,4 @@
-// $Header: /repository/ZendEngine2/FlexLexer.h,v 1.4 2000/07/03 00:55:36 sascha Exp $
+// $Header: /repository/ZendEngine2/Attic/FlexLexer.h,v 1.4 2000/07/03 00:55:36 sascha Exp $
// FlexLexer.h -- define interfaces for lexical analyzer classes generated
// by flex
diff --git a/Zend/acconfig.h b/Zend/acconfig.h
index b423f1025..c136e59b0 100644
--- a/Zend/acconfig.h
+++ b/Zend/acconfig.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: acconfig.h,v 1.40.2.1.2.1 2007/01/01 09:35:45 sebastian Exp $ */
+/* $Id: acconfig.h,v 1.40.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#define ZEND_API
#define ZEND_DLEXPORT
diff --git a/Zend/flex.skl b/Zend/flex.skl
index d3039ce38..9c9bbda3c 100644
--- a/Zend/flex.skl
+++ b/Zend/flex.skl
@@ -1,7 +1,7 @@
/* A Lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /repository/ZendEngine2/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto Exp $
+ * $Header: /repository/ZendEngine2/Attic/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto Exp $
* vim:ft=lex:
*/
diff --git a/Zend/tests/bug29674.phpt b/Zend/tests/bug29674.phpt
index aef91f406..30c23faa0 100755
--- a/Zend/tests/bug29674.phpt
+++ b/Zend/tests/bug29674.phpt
@@ -33,7 +33,7 @@ $obj->printVars();
===BASE===
string(4) "Base"
-Notice: Undefined property: BaseClass::$private_child in %sbug29674.php on line %d
+Notice: Undefined property: BaseClass::$private_child in %sbug29674.php on line %d
NULL
===CHILD===
string(4) "Base"
diff --git a/Zend/tests/bug29689.phpt b/Zend/tests/bug29689.phpt
index 74dabc159..12b343008 100644
--- a/Zend/tests/bug29689.phpt
+++ b/Zend/tests/bug29689.phpt
@@ -52,7 +52,7 @@ $baz->printFoo();
--EXPECTF--
foo: foo foo2
bar: bar
-Notice: Undefined property: bar::$foo2 in %s on line %d
+Notice: Undefined property: bar::$foo2 in %s on line %d
---baz--
foo: foo foo2
diff --git a/Zend/tests/bug30922.phpt b/Zend/tests/bug30922.phpt
index c78dd3a37..f4e437e49 100644
--- a/Zend/tests/bug30922.phpt
+++ b/Zend/tests/bug30922.phpt
@@ -10,4 +10,4 @@ var_dump($a instanceOf A);
echo "ok\n";
?>
--EXPECTF--
-Fatal error: Interface RecurisiveFooFar cannot not implement itself in %sbug30922.php on line %d
+Fatal error: Interface RecurisiveFooFar cannot implement itself in %sbug30922.php on line %d
diff --git a/Zend/tests/bug38469.phpt b/Zend/tests/bug38469.phpt
new file mode 100644
index 000000000..8c3031ae0
--- /dev/null
+++ b/Zend/tests/bug38469.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #38469 Unexpected creation of cycle
+--FILE--
+<?php
+$a = array();
+$a[0] = $a;
+var_dump($a);
+$b = array(array());
+$b[0][0] = $b;
+var_dump($b);
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ array(0) {
+ }
+}
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ array(0) {
+ }
+ }
+ }
+}
diff --git a/Zend/tests/bug41919.phpt b/Zend/tests/bug41919.phpt
index 127eb97bc..3ba9ae0ec 100644
--- a/Zend/tests/bug41919.phpt
+++ b/Zend/tests/bug41919.phpt
@@ -8,5 +8,4 @@ $foo[3]->bar[1] = "bang";
echo "ok\n";
?>
--EXPECTF--
-Warning: Cannot use string offset as an array in %s/bug41919.php on line %d
-ok
+Fatal error: Cannot use string offset as an object in %s/bug41919.php on line %d
diff --git a/Zend/tests/bug42937.phpt b/Zend/tests/bug42937.phpt
new file mode 100755
index 000000000..875f0d922
--- /dev/null
+++ b/Zend/tests/bug42937.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Bug #42937 (__call() method not invoked when methods are called on parent from child class)
+--FILE--
+<?php
+class A {
+ function __call($strMethod, $arrArgs) {
+ echo "$strMethod\n";
+ }
+}
+
+class C {
+ function __call($strMethod, $arrArgs) {
+ echo "$strMethod\n";
+ }
+}
+
+class B extends A {
+ function test() {
+ self::test1();
+ parent::test2();
+ A::test3();
+ B::test4();
+ C::test5();
+ }
+}
+
+$a = new A();
+$a->test();
+
+$b = new B();
+$b->test();
+?>
+--EXPECTF--
+test
+test1
+test2
+test3
+test4
+
+Fatal error: Call to undefined method C::test5() in %sbug42937.php on line 20
diff --git a/Zend/tests/bug43128.phpt b/Zend/tests/bug43128.phpt
new file mode 100755
index 000000000..4ee676a0a
--- /dev/null
+++ b/Zend/tests/bug43128.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #43128 Very long class name causes segfault
+--FILE--
+<?php
+
+$a = str_repeat("a", 10 * 1024 * 1024);
+
+eval("class $a {}");
+
+# call_user_func($a); // Warning
+# $a->$a(); // Fatal error
+
+if ($a instanceof $a); // Segmentation fault
+new $a; // Segmentation fault
+echo "ok\n";
+--EXPECT--
+ok
diff --git a/Zend/tests/bug43175.phpt b/Zend/tests/bug43175.phpt
new file mode 100755
index 000000000..3bf6befc1
--- /dev/null
+++ b/Zend/tests/bug43175.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #43175 (__destruct() throwing an exception with __call() causes segfault)
+--FILE--
+<?php
+
+class foobar {
+ public function __destruct() {
+ throw new Exception();
+ }
+ public function __call($m, $a) {
+ return $this;
+ }
+}
+function foobar() {
+ return new foobar();
+}
+try {
+ foobar()->unknown();
+} catch (Exception $e) {
+ echo "__call via traditional factory should be caught\n";
+}
+?>
+--EXPECT--
+__call via traditional factory should be caught
diff --git a/Zend/tests/bug43201.phpt b/Zend/tests/bug43201.phpt
new file mode 100755
index 000000000..89e1b6672
--- /dev/null
+++ b/Zend/tests/bug43201.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Bug #43201 (Crash on using unitialized vals and __get/__set)
+--FILE--
+<?php
+class Foo {
+ function __get($k) {
+ return null;
+ }
+ function __set($k, $v) {
+ $this->$k = $v;
+ }
+}
+
+$c = new Foo();
+
+$c->arr[0]["k"] = 1;
+$c->arr[0]["k2"] = $ref;
+for($cnt=0;$cnt<6;$cnt++) {
+ $ref = chop($undef);
+ $c->arr[$cnt]["k2"] = $ref;
+}
+echo "ok\n";
+?>
+--EXPECTF--
+Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 13
+
+Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 14
+
+Notice: Undefined variable: ref in %sbug43201.php on line 14
+
+Notice: Undefined variable: undef in %sbug43201.php on line 16
+
+Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
+
+Notice: Undefined variable: undef in %sbug43201.php on line 16
+
+Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
+
+Notice: Undefined variable: undef in %sbug43201.php on line 16
+
+Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
+
+Notice: Undefined variable: undef in %sbug43201.php on line 16
+
+Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
+
+Notice: Undefined variable: undef in %sbug43201.php on line 16
+
+Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
+
+Notice: Undefined variable: undef in %sbug43201.php on line 16
+
+Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
+ok
diff --git a/Zend/tests/bug43450.phpt b/Zend/tests/bug43450.phpt
new file mode 100644
index 000000000..c55b4f722
--- /dev/null
+++ b/Zend/tests/bug43450.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Bug #43450 (Memory leak on some functions with implicit object __toString() call)
+--SKIPIF--
+<?php if (!function_exists('memory_get_usage')) die('memory_get_usage() not installed'); ?>
+--FILE--
+<?php
+error_reporting(E_ALL|E_STRICT);
+
+class Foo
+{
+ public function __toString()
+ {
+ return __CLASS__;
+ }
+}
+
+$num_repeats = 100000;
+
+$start = (memory_get_usage() / 1024) + 16;
+for ($i=1;$i<$num_repeats;$i++)
+{
+ $foo = new Foo();
+ md5($foo);
+}
+$end = memory_get_peak_usage() / 1024;
+
+if ($start < $end) {
+ echo 'FAIL';
+} else {
+ echo 'PASS';
+}
+
+?>
+--EXPECT--
+PASS
diff --git a/Zend/tests/bug43483.phpt b/Zend/tests/bug43483.phpt
new file mode 100644
index 000000000..0cfbfe878
--- /dev/null
+++ b/Zend/tests/bug43483.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #43483 (get_class_methods() does not list all visible methods)
+--FILE--
+<?php
+class C {
+ public static function test() {
+ D::prot();
+ print_r(get_class_methods("D"));
+ }
+}
+class D extends C {
+ protected static function prot() {
+ echo "Successfully called D::prot().\n";
+ }
+}
+D::test();
+?>
+--EXPECT--
+Successfully called D::prot().
+Array
+(
+ [0] => prot
+ [1] => test
+)
diff --git a/Zend/tests/bug43703.phpt b/Zend/tests/bug43703.phpt
new file mode 100644
index 000000000..de4f8a89f
--- /dev/null
+++ b/Zend/tests/bug43703.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #43703 (Signature compatibility check broken)
+--FILE--
+<?php
+class JoinPoint
+{
+}
+
+abstract class Pointcut
+{
+ abstract public function evaluate(JoinPoint $joinPoint);
+}
+
+class Read extends Pointcut
+{
+ public function evaluate(Joinpoint $joinPoint)
+ {
+ }
+}
+?>
+DONE
+--EXPECT--
+DONE
diff --git a/Zend/tests/bug44069.phpt b/Zend/tests/bug44069.phpt
new file mode 100644
index 000000000..75beaafed
--- /dev/null
+++ b/Zend/tests/bug44069.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #44069 (Huge memory usage with concatenation using . instead of .=)
+--FILE--
+<?php
+$array = array();
+$newstring = "";
+$string = str_repeat('This is a teststring.', 50);
+for($i = 1; $i <= 2000; $i++)
+{
+// $newstring .= $string; //This uses an expected amount of mem.
+ $newstring = $newstring . $string; //This uses very much mem.
+
+ for($j = 1; $j <= 10; $j++)
+ {
+ $array[] = 'test';
+ }
+}
+echo "ok\n";
+?>
+--EXPECT--
+ok
diff --git a/Zend/tests/bug44141.phpt b/Zend/tests/bug44141.phpt
new file mode 100644
index 000000000..1a9ee892b
--- /dev/null
+++ b/Zend/tests/bug44141.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #44141 (private parent constructor callable through static function)
+--FILE--
+<?php
+class X
+{
+ public $x;
+ private function __construct($x)
+ {
+ $this->x = $x;
+ }
+}
+
+class Y extends X
+{
+ static public function cheat($x)
+ {
+ return new Y($x);
+ }
+}
+
+$y = Y::cheat(5);
+echo $y->x, PHP_EOL;
+--EXPECTF--
+Fatal error: Call to private X::__construct() from context 'Y' in %sbug44141.php on line 15
diff --git a/Zend/tests/bug44184.phpt b/Zend/tests/bug44184.phpt
new file mode 100644
index 000000000..7f277acc7
--- /dev/null
+++ b/Zend/tests/bug44184.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #44184 (Double free of loop-variable on exception)
+--FILE--
+<?php
+function foo() {
+ $x = array(1,2,3);
+ foreach ($x as $a) {
+ while (1) {
+ throw new Exception();
+ }
+ return;
+ }
+}
+try {
+ foo();
+} catch (Exception $ex) {
+ echo "ok\n";
+}
+?>
+--EXPECT--
+ok
diff --git a/Zend/tests/clone_uncloneable.phpt b/Zend/tests/clone_uncloneable.phpt
new file mode 100644
index 000000000..c991d1060
--- /dev/null
+++ b/Zend/tests/clone_uncloneable.phpt
@@ -0,0 +1,20 @@
+--TEST--
+cloning uncloneable object
+--SKIPIF--
+<?php if (!extension_loaded("xsl")) die("skip xsl extension is missing");?>
+--INI--
+zend.ze1_compatibility_mode=1
+--FILE--
+<?php
+
+$new = &new XSLTProcessor();
+var_dump($new);
+
+echo "Done\n";
+?>
+--EXPECTF--
+Strict Standards: Assigning the return value of new by reference is deprecated in %s on line %d
+
+Strict Standards: Implicit cloning object of class 'XSLTProcessor' because of 'zend.ze1_compatibility_mode' in %s on line %d
+
+Fatal error: Trying to clone uncloneable object of class XSLTProcessor in Unknown on line 0
diff --git a/Zend/tests/errmsg_038.phpt b/Zend/tests/errmsg_038.phpt
index fdab803ba..2927e945f 100644
--- a/Zend/tests/errmsg_038.phpt
+++ b/Zend/tests/errmsg_038.phpt
@@ -10,4 +10,4 @@ class test {
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Cannot declare property test::$var final, the final modifier is allowed only for methods in %s on line %d
+Fatal error: Cannot declare property test::$var final, the final modifier is allowed only for methods and classes in %s on line %d
diff --git a/Zend/tests/indexing_001.phpt b/Zend/tests/indexing_001.phpt
new file mode 100644
index 000000000..83c2c8d52
--- /dev/null
+++ b/Zend/tests/indexing_001.phpt
@@ -0,0 +1,212 @@
+--TEST--
+Indexing - various special cases.
+--FILE--
+<?php
+echo "*** Indexing - Testing value assignment with key ***\n";
+$array=array(1);
+$testvalues=array(null, 0, 1, true, false,'',' ',0.1,array());
+
+foreach ($testvalues as $testvalue) {
+ $testvalue['foo']=$array;
+ var_dump ($testvalue);
+}
+echo "\n*** Indexing - Testing reference assignment with key ***\n";
+
+$testvalues=array(null, 0, 1, true, false,'',0.1,array());
+
+foreach ($testvalues as $testvalue) {
+ $testvalue['foo']=&$array;
+ var_dump ($testvalue);
+}
+echo "*** Indexing - Testing value assignment no key ***\n";
+$array=array(1);
+$testvalues=array(null, 0, 1, true, false,'',0.1,array());
+
+foreach ($testvalues as $testvalue) {
+ $testvalue[]=$array;
+ var_dump ($testvalue);
+}
+echo "\n*** Indexing - Testing reference assignment no key ***\n";
+
+$testvalues=array(null, 0, 1, true, false,'',0.1,array());
+
+foreach ($testvalues as $testvalue) {
+ $testvalue[]=&$array;
+ var_dump ($testvalue);
+}
+
+
+echo "\nDone";
+?>
+--EXPECTF--
+*** Indexing - Testing value assignment with key ***
+array(1) {
+ ["foo"]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+int(0)
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+int(1)
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+bool(true)
+array(1) {
+ ["foo"]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+array(1) {
+ ["foo"]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Notice: Array to string conversion in %s on line %d
+string(1) "A"
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+float(0.1)
+array(1) {
+ ["foo"]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+*** Indexing - Testing reference assignment with key ***
+array(1) {
+ ["foo"]=>
+ &array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+int(0)
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+int(1)
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+bool(true)
+array(1) {
+ ["foo"]=>
+ &array(1) {
+ [0]=>
+ int(1)
+ }
+}
+array(1) {
+ ["foo"]=>
+ &array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+float(0.1)
+array(1) {
+ ["foo"]=>
+ &array(1) {
+ [0]=>
+ int(1)
+ }
+}
+*** Indexing - Testing value assignment no key ***
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+int(0)
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+int(1)
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+bool(true)
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+float(0.1)
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+*** Indexing - Testing reference assignment no key ***
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+int(0)
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+int(1)
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+bool(true)
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ int(1)
+ }
+}
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Warning: Cannot use a scalar value as an array in %s on line %d
+float(0.1)
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+Done \ No newline at end of file
diff --git a/Zend/tests/multibyte/multibyte_encoding_001.phpt b/Zend/tests/multibyte/multibyte_encoding_001.phpt
new file mode 100755
index 000000000..19b6064cf
--- /dev/null
+++ b/Zend/tests/multibyte/multibyte_encoding_001.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Zend Multibyte and ShiftJIS
+--SKIPIF--
+<?php
+if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
+ die("skip Requires configure --enable-zend-multibyte option");
+}
+if (!extension_loaded("mbstring")) {
+ die("skip Requires mbstring extension");
+}
+?>
+--INI--
+mbstring.internal_encoding=SJIS
+--FILE--
+<?php
+declare(encoding='Shift_JIS');
+$s = "•\"; // 0x95+0x5c in script, not somewhere else "
+printf("%x:%x\n", ord($s[0]), ord($s[1]));
+?>
+===DONE===
+--EXPECT--
+95:5c
+===DONE===
diff --git a/Zend/tests/multibyte/multibyte_encoding_002.phpt b/Zend/tests/multibyte/multibyte_encoding_002.phpt
new file mode 100755
index 000000000..813222d82
--- /dev/null
+++ b/Zend/tests/multibyte/multibyte_encoding_002.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Zend Multibyte and UTF-8 BOM
+--SKIPIF--
+<?php
+if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
+ die("skip Requires configure --enable-zend-multibyte option");
+}
+if (!extension_loaded("mbstring")) {
+ die("skip Requires mbstring extension");
+}
+?>
+--INI--
+mbstring.internal_encoding=iso-8859-1
+--FILE--
+<?php
+print "Hello World\n";
+?>
+===DONE===
+--EXPECT--
+Hello World
+===DONE===
diff --git a/Zend/tests/multibyte/multibyte_encoding_003.phpt b/Zend/tests/multibyte/multibyte_encoding_003.phpt
new file mode 100755
index 000000000..19b29f209
--- /dev/null
+++ b/Zend/tests/multibyte/multibyte_encoding_003.phpt
Binary files differ
diff --git a/Zend/zend.c b/Zend/zend.c
index 96e717d8b..7546dcc21 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.c,v 1.308.2.12.2.35 2007/07/21 00:35:14 jani Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.36 2007/12/31 07:20:02 sebastian Exp $ */
#include "zend.h"
#include "zend_extensions.h"
@@ -101,7 +101,7 @@ ZEND_API zval zval_used_for_init; /* True global variable */
/* version information */
static char *zend_version_info;
static uint zend_version_info_length;
-#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2007 Zend Technologies\n"
+#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2008 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
diff --git a/Zend/zend.h b/Zend/zend.h
index a8c2f56c1..d498a56bd 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.293.2.11.2.9 2007/07/23 16:17:10 jani Exp $ */
+/* $Id: zend.h,v 1.293.2.11.2.11 2008/02/15 07:44:45 dmitry Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -181,9 +181,21 @@ char *alloca ();
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
# define do_alloca(p) alloca(p)
# define free_alloca(p)
+# define ZEND_ALLOCA_MAX_SIZE (32 * 1024)
+# define ALLOCA_FLAG(name) \
+ zend_bool name;
+# define do_alloca_with_limit_ex(size, limit, use_heap) \
+ ((use_heap = ((size) > (limit))) ? emalloc(size) : alloca(size))
+# define do_alloca_with_limit(size, use_heap) \
+ do_alloca_with_limit_ex(size, ZEND_ALLOCA_MAX_SIZE, use_heap)
+# define free_alloca_with_limit(p, use_heap) \
+ do { if (use_heap) efree(p); } while (0)
#else
# define do_alloca(p) emalloc(p)
# define free_alloca(p) efree(p)
+# define ALLOCA_FLAG(name)
+# define do_alloca_with_limit(p, use_heap) emalloc(p)
+# define free_alloca_with_limit(p, use_heap) efree(p)
#endif
#if ZEND_DEBUG
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 1634b63e4..1f1e8c839 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.296.2.27.2.34 2007/08/31 12:36:13 tony2001 Exp $ */
+/* $Id: zend_API.c,v 1.296.2.27.2.38 2008/03/06 17:28:47 tony2001 Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -168,9 +168,15 @@ ZEND_API int _zend_get_parameters_array_ex(int param_count, zval ***argument_arr
*value_ptr = **value;
INIT_PZVAL(value_ptr);
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", class_name);
+
+ if (Z_OBJ_HANDLER_PP(value, clone_obj) == NULL) {
+ zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %s", class_name);
+ }
+
if(!dup) {
efree(class_name);
}
+
value_ptr->value.obj = Z_OBJ_HANDLER_PP(value, clone_obj)(*value TSRMLS_CC);
zval_ptr_dtor(value);
*value = value_ptr;
@@ -1700,7 +1706,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
if (!(scope->ce_flags & ZEND_ACC_INTERFACE)) {
/* Since the class is not an interface it needs to be declared as a abstract class. */
/* Since here we are handling internal functions only we can add the keyword flag. */
- /* This time we set the flag for the keyword 'abstratc'. */
+ /* This time we set the flag for the keyword 'abstract'. */
scope->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
}
}
@@ -1723,11 +1729,10 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
}
}
fname_len = strlen(ptr->fname);
- lowercase_name = do_alloca(fname_len+1);
- zend_str_tolower_copy(lowercase_name, ptr->fname, fname_len);
+ lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len);
if (zend_hash_add(target_function_table, lowercase_name, fname_len+1, &function, sizeof(zend_function), (void**)&reg_function) == FAILURE) {
unload=1;
- free_alloca(lowercase_name);
+ efree(lowercase_name);
break;
}
if (scope) {
@@ -1767,7 +1772,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
}
ptr++;
count++;
- free_alloca(lowercase_name);
+ efree(lowercase_name);
}
if (unload) { /* before unloading, display all remaining bad function in the module */
if (scope) {
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 713889ead..e214ff48e 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.h,v 1.207.2.8.2.8 2007/04/16 08:09:54 dmitry Exp $ */
+/* $Id: zend_API.h,v 1.207.2.8.2.9 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_API_H
#define ZEND_API_H
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index d0dc0035d..2b5a0716d 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.c,v 1.144.2.3.2.44 2007/10/25 07:30:29 dmitry Exp $ */
+/* $Id: zend_alloc.c,v 1.144.2.3.2.47 2008/02/14 14:46:48 dmitry Exp $ */
#include "zend.h"
#include "zend_alloc.h"
@@ -649,10 +649,15 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
static inline unsigned int zend_mm_high_bit(size_t _size)
{
#if defined(__GNUC__) && defined(i386)
- unsigned int n;
+ unsigned int n;
__asm__("bsrl %1,%0\n\t" : "=r" (n) : "rm" (_size));
return n;
+#elif defined(__GNUC__) && defined(__x86_64__)
+ unsigned long n;
+
+ __asm__("bsrq %1,%0\n\t" : "=r" (n) : "rm" (_size));
+ return (unsigned int)n;
#elif defined(_MSC_VER) && defined(_M_IX86)
__asm {
bsr eax, _size
@@ -670,10 +675,15 @@ static inline unsigned int zend_mm_high_bit(size_t _size)
static inline unsigned int zend_mm_low_bit(size_t _size)
{
#if defined(__GNUC__) && defined(i386)
- unsigned int n;
+ unsigned int n;
__asm__("bsfl %1,%0\n\t" : "=r" (n) : "rm" (_size));
return n;
+#elif defined(__GNUC__) && defined(__x86_64__)
+ unsigned long n;
+
+ __asm__("bsfq %1,%0\n\t" : "=r" (n) : "rm" (_size));
+ return (unsigned int)n;
#elif defined(_MSC_VER) && defined(_M_IX86)
__asm {
bsf eax, _size
@@ -1737,6 +1747,7 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
size_t remaining_size;
size_t segment_size;
zend_mm_segment *segment;
+ int keep_rest = 0;
if (EXPECTED(ZEND_MM_SMALL_SIZE(true_size))) {
size_t index = ZEND_MM_BUCKET_INDEX(true_size);
@@ -1805,6 +1816,7 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
segment must have header "size" and trailer "guard" block */
segment_size = true_size + ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE;
segment_size = (segment_size + (heap->block_size-1)) & ~(heap->block_size-1);
+ keep_rest = 1;
} else {
segment_size = heap->block_size;
}
@@ -1884,7 +1896,11 @@ zend_mm_finished_searching_for_block:
ZEND_MM_BLOCK(new_free_block, ZEND_MM_FREE_BLOCK, remaining_size);
/* add the new free block to the free list */
- zend_mm_add_to_free_list(heap, new_free_block);
+ if (EXPECTED(!keep_rest)) {
+ zend_mm_add_to_free_list(heap, new_free_block);
+ } else {
+ zend_mm_add_to_rest_list(heap, new_free_block);
+ }
}
ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 1);
@@ -2300,10 +2316,10 @@ ZEND_API size_t _zend_mem_block_size(void *ptr TSRMLS_DC ZEND_FILE_LINE_DC ZEND_
static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
{
size_t res = nmemb;
- unsigned long overflow ;
+ unsigned long overflow = 0;
- __asm__ ("mull %3\n\taddl %4,%0\n\tadcl $0,%1"
- : "=a"(res), "=d" (overflow)
+ __asm__ ("mull %3\n\taddl %4,%0\n\tadcl %1,%1"
+ : "=&a"(res), "=&d" (overflow)
: "%0"(res),
"rm"(size),
"rm"(offset));
@@ -2315,6 +2331,26 @@ static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
return res;
}
+#elif defined(__GNUC__) && defined(__x86_64__)
+
+static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
+{
+ size_t res = nmemb;
+ unsigned long overflow = 0;
+
+ __asm__ ("mulq %3\n\taddq %4,%0\n\tadcq %1,%1"
+ : "=&a"(res), "=&d" (overflow)
+ : "%0"(res),
+ "rm"(size),
+ "rm"(offset));
+
+ if (UNEXPECTED(overflow)) {
+ zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset);
+ return 0;
+ }
+ return res;
+}
+
#else
static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index 6225f7f6c..a13eba959 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.h,v 1.63.2.2.2.12 2007/03/20 06:46:48 dmitry Exp $ */
+/* $Id: zend_alloc.h,v 1.63.2.2.2.13 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_ALLOC_H
#define ZEND_ALLOC_H
diff --git a/Zend/zend_arg_defs.c b/Zend/zend_arg_defs.c
index 090490f9b..0993348da 100644
--- a/Zend/zend_arg_defs.c
+++ b/Zend/zend_arg_defs.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_arg_defs.c,v 1.2.2.2.2.2 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_arg_defs.c,v 1.2.2.2.2.3 2007/12/31 07:20:02 sebastian Exp $ */
ZEND_BEGIN_ARG_INFO(first_arg_force_ref, 0)
ZEND_ARG_PASS_INFO(1)
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index b05ec7eff..17c7efb1d 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25 2007/08/30 07:43:21 sebastian Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.29 2008/02/21 15:14:12 dmitry Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -867,7 +867,7 @@ ZEND_FUNCTION(get_class_methods)
if ((mptr->common.fn_flags & ZEND_ACC_PUBLIC)
|| (EG(scope) &&
(((mptr->common.fn_flags & ZEND_ACC_PROTECTED) &&
- instanceof_function(EG(scope), mptr->common.scope TSRMLS_CC))
+ zend_check_protected(mptr->common.scope, EG(scope)))
|| ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) &&
EG(scope) == mptr->common.scope)))) {
char *key;
@@ -1013,19 +1013,20 @@ ZEND_FUNCTION(class_exists)
char *class_name, *lc_name;
zend_class_entry **ce;
int class_name_len;
- zend_bool autoload = 1;
int found;
+ zend_bool autoload = 1;
+ ALLOCA_FLAG(use_heap)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &class_name, &class_name_len, &autoload) == FAILURE) {
return;
}
if (!autoload) {
- lc_name = do_alloca(class_name_len + 1);
+ lc_name = do_alloca_with_limit(class_name_len + 1, use_heap);
zend_str_tolower_copy(lc_name, class_name, class_name_len);
found = zend_hash_find(EG(class_table), lc_name, class_name_len+1, (void **) &ce);
- free_alloca(lc_name);
+ free_alloca_with_limit(lc_name, use_heap);
RETURN_BOOL(found == SUCCESS && !((*ce)->ce_flags & ZEND_ACC_INTERFACE));
}
@@ -1044,19 +1045,20 @@ ZEND_FUNCTION(interface_exists)
char *iface_name, *lc_name;
zend_class_entry **ce;
int iface_name_len;
- zend_bool autoload = 1;
int found;
+ zend_bool autoload = 1;
+ ALLOCA_FLAG(use_heap)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &iface_name, &iface_name_len, &autoload) == FAILURE) {
return;
}
if (!autoload) {
- lc_name = do_alloca(iface_name_len + 1);
+ lc_name = do_alloca_with_limit(iface_name_len + 1, use_heap);
zend_str_tolower_copy(lc_name, iface_name, iface_name_len);
found = zend_hash_find(EG(class_table), lc_name, iface_name_len+1, (void **) &ce);
- free_alloca(lc_name);
+ free_alloca_with_limit(lc_name, use_heap);
RETURN_BOOL(found == SUCCESS && (*ce)->ce_flags & ZEND_ACC_INTERFACE);
}
@@ -1216,6 +1218,7 @@ ZEND_FUNCTION(set_error_handler)
had_orig_error_handler = 1;
*return_value = *EG(user_error_handler);
zval_copy_ctor(return_value);
+ INIT_PZVAL(return_value);
zend_stack_push(&EG(user_error_handlers_error_reporting), &EG(user_error_handler_error_reporting), sizeof(EG(user_error_handler_error_reporting)));
zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler));
}
@@ -1230,6 +1233,7 @@ ZEND_FUNCTION(set_error_handler)
EG(user_error_handler_error_reporting) = (int)error_type;
*EG(user_error_handler) = *error_handler;
zval_copy_ctor(EG(user_error_handler));
+ INIT_PZVAL(EG(user_error_handler));
if (!had_orig_error_handler) {
RETURN_NULL();
diff --git a/Zend/zend_builtin_functions.h b/Zend/zend_builtin_functions.h
index 0a2222ab8..6e1d836ea 100644
--- a/Zend/zend_builtin_functions.h
+++ b/Zend/zend_builtin_functions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.h,v 1.17.2.2.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_builtin_functions.h,v 1.17.2.2.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_BUILTIN_FUNCTIONS_H
#define ZEND_BUILTIN_FUNCTIONS_H
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index befd6d1ff..137d79a76 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.27.2.41 2007/09/20 14:11:31 jani Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.48 2008/02/20 12:04:49 dmitry Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -541,8 +541,39 @@ static zend_bool opline_is_fetch_this(zend_op *opline TSRMLS_DC)
void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC)
{
- int last_op_number = get_next_op_number(CG(active_op_array));
- zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ int last_op_number;
+ zend_op *opline;
+
+ if (value->op_type == IS_CV) {
+ zend_llist *fetch_list_ptr;
+
+ zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
+ if (fetch_list_ptr && fetch_list_ptr->head) {
+ opline = (zend_op *)fetch_list_ptr->head->data;
+
+ if (opline->opcode == ZEND_FETCH_DIM_W &&
+ opline->op1.op_type == IS_CV &&
+ opline->op1.u.var == value->u.var) {
+
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ opline->opcode = ZEND_FETCH_R;
+ opline->result.op_type = IS_VAR;
+ opline->result.u.EA.type = 0;
+ opline->result.u.var = get_temporary_variable(CG(active_op_array));
+ opline->op1.op_type = IS_CONST;
+ ZVAL_STRINGL(&opline->op1.u.constant,
+ CG(active_op_array)->vars[value->u.var].name,
+ CG(active_op_array)->vars[value->u.var].name_len, 1);
+ SET_UNUSED(opline->op2);
+ value = &opline->result;
+ }
+ }
+ }
+
+ zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
+
+ last_op_number = get_next_op_number(CG(active_op_array));
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
if (variable->op_type == IS_VAR) {
int n = 0;
@@ -654,8 +685,14 @@ static inline void do_begin_loop(TSRMLS_D)
}
-static inline void do_end_loop(int cont_addr TSRMLS_DC)
+static inline void do_end_loop(int cont_addr, int has_loop_var TSRMLS_DC)
{
+ if (!has_loop_var) {
+ /* The start fileld is used to free temporary variables in case of exceptions.
+ * We won't try to free something of we don't have loop variable.
+ */
+ CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].start = -1;
+ }
CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].cont = cont_addr;
CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].brk = get_next_op_number(CG(active_op_array));
CG(active_op_array)->current_brk_cont = CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].parent;
@@ -690,7 +727,7 @@ void zend_do_while_end(znode *while_token, znode *close_bracket_token TSRMLS_DC)
/* update while's conditional jmp */
CG(active_op_array)->opcodes[close_bracket_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
- do_end_loop(while_token->u.opline_num TSRMLS_CC);
+ do_end_loop(while_token->u.opline_num, 0 TSRMLS_CC);
DEC_BPC(CG(active_op_array));
}
@@ -734,7 +771,7 @@ void zend_do_for_end(znode *second_semicolon_token TSRMLS_DC)
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
- do_end_loop(second_semicolon_token->u.opline_num+1 TSRMLS_CC);
+ do_end_loop(second_semicolon_token->u.opline_num+1, 0 TSRMLS_CC);
DEC_BPC(CG(active_op_array));
}
@@ -1069,6 +1106,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
zend_uint fn_flags;
char *lcname;
zend_bool orig_interactive;
+ ALLOCA_FLAG(use_heap)
if (is_method) {
if (CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE) {
@@ -1129,7 +1167,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
}
if (!(CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE)) {
- short_class_name = do_alloca(short_class_name_length + 1);
+ short_class_name = do_alloca_with_limit(short_class_name_length + 1, use_heap);
zend_str_tolower_copy(short_class_name, CG(active_class_entry)->name, short_class_name_length);
/* Improve after RC: cache the lowercase class name */
@@ -1163,7 +1201,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
} else if (!(fn_flags & ZEND_ACC_STATIC)) {
CG(active_op_array)->fn_flags |= ZEND_ACC_ALLOW_STATIC;
}
- free_alloca(short_class_name);
+ free_alloca_with_limit(short_class_name, use_heap);
}
efree(lcname);
@@ -1990,7 +2028,7 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_fu
return 0;
}
if (fe->common.arg_info[i].class_name
- && strcmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
+ && strcasecmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
return 0;
}
if (fe->common.arg_info[i].array_type_hint != proto->common.arg_info[i].array_type_hint) {
@@ -2191,7 +2229,7 @@ static inline void do_implement_interface(zend_class_entry *ce, zend_class_entry
zend_error(E_CORE_ERROR, "Class %s could not implement interface %s", ce->name, iface->name);
}
if (ce == iface) {
- zend_error(E_ERROR, "Interface %s cannot not implement itself", ce->name);
+ zend_error(E_ERROR, "Interface %s cannot implement itself", ce->name);
}
}
@@ -2614,7 +2652,7 @@ void zend_do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr
opline->op2.u.opline_num = do_token->u.opline_num;
SET_UNUSED(opline->op2);
- do_end_loop(expr_open_bracket->u.opline_num TSRMLS_CC);
+ do_end_loop(expr_open_bracket->u.opline_num, 0 TSRMLS_CC);
DEC_BPC(CG(active_op_array));
}
@@ -3005,7 +3043,7 @@ void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_ty
}
if (access_type & ZEND_ACC_FINAL) {
- zend_error(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, the final modifier is allowed only for methods",
+ zend_error(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, the final modifier is allowed only for methods and classes",
CG(active_class_entry)->name, var_name->u.constant.value.str.val);
}
@@ -3420,8 +3458,6 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC)
zend_llist_element *dimension;
zend_op *opline;
znode last_container;
- int last_op_number;
- zend_op *last_op;
le = CG(list_llist).head;
while (le) {
@@ -3461,9 +3497,6 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC)
}
((list_llist_element *) le->data)->value = last_container;
zend_llist_destroy(&((list_llist_element *) le->data)->dimensions);
- zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
- last_op_number = get_next_op_number(CG(active_op_array))-1;
- last_op = &CG(active_op_array)->opcodes[last_op_number];
zend_do_assign(result, &((list_llist_element *) le->data)->var, &((list_llist_element *) le->data)->value TSRMLS_CC);
zend_do_free(result TSRMLS_CC);
le = le->next;
@@ -3824,9 +3857,9 @@ void zend_do_foreach_cont(znode *foreach_token, znode *open_brackets_token, znod
value_node = opline->result;
- zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
if (assign_by_ref) {
/* Mark FE_FETCH as IS_VAR as it holds the data directly as a value */
+ zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
zend_do_assign_ref(NULL, value, &value_node TSRMLS_CC);
} else {
zend_do_assign(&dummy, value, &value_node TSRMLS_CC);
@@ -3836,7 +3869,6 @@ void zend_do_foreach_cont(znode *foreach_token, znode *open_brackets_token, znod
if (key->op_type != IS_UNUSED) {
znode key_node;
- zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
opline = &CG(active_op_array)->opcodes[as_token->u.opline_num+1];
opline->result.op_type = IS_TMP_VAR;
opline->result.u.EA.type = 0;
@@ -3865,7 +3897,7 @@ void zend_do_foreach_end(znode *foreach_token, znode *as_token TSRMLS_DC)
CG(active_op_array)->opcodes[foreach_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array)); /* FE_RESET */
CG(active_op_array)->opcodes[as_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array)); /* FE_FETCH */
- do_end_loop(as_token->u.opline_num TSRMLS_CC);
+ do_end_loop(as_token->u.opline_num, 1 TSRMLS_CC);
zend_stack_top(&CG(foreach_copy_stack), (void **) &container_ptr);
generate_free_foreach_copy(container_ptr TSRMLS_CC);
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 9966e7500..2d567f8ae 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.h,v 1.316.2.8.2.12 2007/05/18 13:12:04 dmitry Exp $ */
+/* $Id: zend_compile.h,v 1.316.2.8.2.13 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H
diff --git a/Zend/zend_config.nw.h b/Zend/zend_config.nw.h
index 2f6cab90f..7ef9dea79 100644
--- a/Zend/zend_config.nw.h
+++ b/Zend/zend_config.nw.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_config.nw.h,v 1.8.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_config.nw.h,v 1.8.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_CONFIG_NW_H
#define ZEND_CONFIG_NW_H
diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h
index 13edf5a45..ffc016c83 100644
--- a/Zend/zend_config.w32.h
+++ b/Zend/zend_config.w32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_config.w32.h,v 1.39.2.2.2.2 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_config.w32.h,v 1.39.2.2.2.3 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_CONFIG_W32_H
#define ZEND_CONFIG_W32_H
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index e0e118424..b0114f8cb 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_constants.c,v 1.71.2.5.2.7 2007/07/27 16:29:11 dmitry Exp $ */
+/* $Id: zend_constants.c,v 1.71.2.5.2.9 2008/02/19 12:00:36 dmitry Exp $ */
#include "zend.h"
#include "zend_constants.h"
@@ -274,6 +274,7 @@ ZEND_API int zend_get_constant_ex(char *name, uint name_len, zval *result, zend_
zval_update_constant_ex(ret_constant, (void*)1, *ce TSRMLS_CC);
*result = **ret_constant;
zval_copy_ctor(result);
+ INIT_PZVAL(result);
}
return retval;
diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h
index 04beefcf7..c55fe0b38 100644
--- a/Zend/zend_constants.h
+++ b/Zend/zend_constants.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_constants.h,v 1.31.2.2.2.3 2007/08/02 23:54:19 stas Exp $ */
+/* $Id: zend_constants.h,v 1.31.2.2.2.4 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_CONSTANTS_H
#define ZEND_CONSTANTS_H
diff --git a/Zend/zend_default_classes.c b/Zend/zend_default_classes.c
index 3139e035d..e3d258adf 100644
--- a/Zend/zend_default_classes.c
+++ b/Zend/zend_default_classes.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_default_classes.c,v 1.59.2.2.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_default_classes.c,v 1.59.2.2.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#include "zend.h"
#include "zend_API.h"
diff --git a/Zend/zend_dynamic_array.c b/Zend/zend_dynamic_array.c
index 402e0724f..f335054d2 100644
--- a/Zend/zend_dynamic_array.c
+++ b/Zend/zend_dynamic_array.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_dynamic_array.c,v 1.13.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_dynamic_array.c,v 1.13.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#include "zend.h"
diff --git a/Zend/zend_dynamic_array.h b/Zend/zend_dynamic_array.h
index 17ecfe3f2..e7b0bcc26 100644
--- a/Zend/zend_dynamic_array.h
+++ b/Zend/zend_dynamic_array.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_dynamic_array.h,v 1.14.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_dynamic_array.h,v 1.14.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_DYNAMIC_ARRAY_H
#define ZEND_DYNAMIC_ARRAY_H
diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h
index 224b0a29d..5f547aef2 100644
--- a/Zend/zend_errors.h
+++ b/Zend/zend_errors.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_errors.h,v 1.18.2.1.2.5 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_errors.h,v 1.18.2.1.2.6 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_ERRORS_H
#define ZEND_ERRORS_H
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index aed98e04c..612bd3b77 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_exceptions.c,v 1.79.2.6.2.9 2007/05/30 16:32:02 tony2001 Exp $ */
+/* $Id: zend_exceptions.c,v 1.79.2.6.2.10 2007/12/31 07:20:02 sebastian Exp $ */
#include "zend.h"
#include "zend_API.h"
diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h
index 683bd502a..b2bfa47b2 100644
--- a/Zend/zend_exceptions.h
+++ b/Zend/zend_exceptions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_exceptions.h,v 1.21.2.1.2.2 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_exceptions.h,v 1.21.2.1.2.3 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_EXCEPTIONS_H
#define ZEND_EXCEPTIONS_H
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index eb4616fba..4b97cd41f 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.716.2.12.2.24 2007/07/19 15:29:30 jani Exp $ */
+/* $Id: zend_execute.c,v 1.716.2.12.2.28 2008/03/04 11:48:53 dmitry Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -645,7 +645,13 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
if (((int)T->str_offset.offset < 0)) {
zend_error(E_WARNING, "Illegal string offset: %d", T->str_offset.offset);
- break;
+ if (!RETURN_VALUE_UNUSED(result)) {
+ T(result->u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr);
+ PZVAL_LOCK(*T(result->u.var).var.ptr_ptr);
+ AI_USE_PTR(T(result->u.var).var);
+ }
+ FREE_OP_VAR_PTR(free_op1);
+ return;
}
if (T->str_offset.offset >= Z_STRLEN_P(T->str_offset.str)) {
zend_uint i;
@@ -665,7 +671,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
if (Z_TYPE_P(value)!=IS_STRING) {
tmp = *value;
- if (op2->op_type & (IS_VAR|IS_CV)) {
+ if (op2->op_type != IS_TMP_VAR) {
zval_copy_ctor(&tmp);
}
convert_to_string(&tmp);
@@ -674,16 +680,13 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
Z_STRVAL_P(T->str_offset.str)[T->str_offset.offset] = Z_STRVAL_P(final_value)[0];
- if (op2->op_type == IS_TMP_VAR) {
- if (final_value == &T(op2->u.var).tmp_var) {
- /* we can safely free final_value here
- * because separation is done only
- * in case op2->op_type == IS_VAR */
- STR_FREE(Z_STRVAL_P(final_value));
- }
- }
if (final_value == &tmp) {
zval_dtor(final_value);
+ } else if (op2->op_type == IS_TMP_VAR) {
+ /* we can safely free final_value here
+ * because separation is done only
+ * in case op2->op_type == IS_VAR */
+ STR_FREE(Z_STRVAL_P(final_value));
}
/*
* the value of an assignment to a string offset is undefined
@@ -692,11 +695,11 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
} while (0);
/* zval_ptr_dtor(&T->str_offset.str); Nuke this line if it doesn't cause a leak */
-/* T(result->u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr); */
if (!RETURN_VALUE_UNUSED(result)) {
- T(result->u.var).var.ptr_ptr = &value;
- PZVAL_LOCK(*T(result->u.var).var.ptr_ptr);
- AI_USE_PTR(T(result->u.var).var);
+ T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr;
+ ALLOC_ZVAL(T(result->u.var).var.ptr);
+ INIT_PZVAL(T(result->u.var).var.ptr);
+ ZVAL_STRINGL(T(result->u.var).var.ptr, Z_STRVAL_P(T->str_offset.str)+T->str_offset.offset, 1, 1);
}
FREE_OP_VAR_PTR(free_op1);
return;
@@ -736,18 +739,12 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
zend_uint refcount = variable_ptr->refcount;
zval garbage;
- if (type != IS_TMP_VAR) {
- value->refcount++;
- }
garbage = *variable_ptr;
*variable_ptr = *value;
variable_ptr->refcount = refcount;
variable_ptr->is_ref = 1;
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", class_name);
variable_ptr->value.obj = Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC);
- if (type != IS_TMP_VAR) {
- value->refcount--;
- }
zendi_zval_dtor(garbage);
}
} else {
@@ -775,16 +772,12 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
zend_uint refcount = variable_ptr->refcount;
zval garbage;
- if (type!=IS_TMP_VAR) {
- value->refcount++;
- }
garbage = *variable_ptr;
*variable_ptr = *value;
variable_ptr->refcount = refcount;
variable_ptr->is_ref = 1;
if (type!=IS_TMP_VAR) {
zendi_zval_copy_ctor(*variable_ptr);
- value->refcount--;
}
zendi_zval_dtor(garbage);
}
@@ -1234,12 +1227,7 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
zval *container;
if (!container_ptr) {
- zend_error(E_WARNING, "Cannot use string offset as an array");
- if (result) {
- result->var.ptr_ptr = &EG(error_zval_ptr);
- PZVAL_LOCK(*result->var.ptr_ptr);
- }
- return;
+ zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
container = *container_ptr;
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 67058e26d..9b0b83655 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.h,v 1.84.2.4.2.8 2007/07/21 00:35:14 jani Exp $ */
+/* $Id: zend_execute.h,v 1.84.2.4.2.9 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_EXECUTE_H
#define ZEND_EXECUTE_H
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 35c630f01..5470218b4 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c,v 1.331.2.20.2.24 2007/07/21 00:35:14 jani Exp $ */
+/* $Id: zend_execute_API.c,v 1.331.2.20.2.27 2008/03/04 11:46:09 dmitry Exp $ */
#include <stdio.h>
#include <signal.h>
@@ -452,6 +452,19 @@ ZEND_API int zend_is_true(zval *op)
#define IS_CONSTANT_VISITED(p) (Z_TYPE_P(p) & IS_VISITED_CONSTANT)
#define MARK_CONSTANT_VISITED(p) Z_TYPE_P(p) |= IS_VISITED_CONSTANT
+static void zval_deep_copy(zval **p)
+{
+ zval *value;
+
+ ALLOC_ZVAL(value);
+ *value = **p;
+ Z_TYPE_P(value) &= ~IS_CONSTANT_INDEX;
+ zval_copy_ctor(value);
+ Z_TYPE_P(value) = Z_TYPE_PP(p);
+ INIT_PZVAL(value);
+ *p = value;
+}
+
ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC)
{
zval *p = *pp;
@@ -503,6 +516,16 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
p = *pp;
Z_TYPE_P(p) = IS_ARRAY;
+ if (!inline_change) {
+ zval *tmp;
+ HashTable *tmp_ht = NULL;
+
+ ALLOC_HASHTABLE(tmp_ht);
+ zend_hash_init(tmp_ht, zend_hash_num_elements(Z_ARRVAL_P(p)), NULL, ZVAL_PTR_DTOR, 0);
+ zend_hash_copy(tmp_ht, Z_ARRVAL_P(p), (copy_ctor_func_t) zval_deep_copy, (void *) &tmp, sizeof(zval *));
+ Z_ARRVAL_P(p) = tmp_ht;
+ }
+
/* First go over the array and see if there are any constant indices */
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p));
while (zend_hash_get_current_data(Z_ARRVAL_P(p), (void **) &element)==SUCCESS) {
@@ -1034,19 +1057,20 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
int retval;
char *lc_name;
zval *exception;
- char dummy = 1;
zend_fcall_info fcall_info;
zend_fcall_info_cache fcall_cache;
+ char dummy = 1;
+ ALLOCA_FLAG(use_heap)
if (name == NULL || !name_length) {
return FAILURE;
}
- lc_name = do_alloca(name_length + 1);
+ lc_name = do_alloca_with_limit(name_length + 1, use_heap);
zend_str_tolower_copy(lc_name, name, name_length);
if (zend_hash_find(EG(class_table), lc_name, name_length+1, (void **) ce) == SUCCESS) {
- free_alloca(lc_name);
+ free_alloca_with_limit(lc_name, use_heap);
return SUCCESS;
}
@@ -1054,7 +1078,7 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
* (doesn't impact fuctionality of __autoload()
*/
if (!use_autoload || zend_is_compiling(TSRMLS_C)) {
- free_alloca(lc_name);
+ free_alloca_with_limit(lc_name, use_heap);
return FAILURE;
}
@@ -1064,7 +1088,7 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
}
if (zend_hash_add(EG(in_autoload), lc_name, name_length+1, (void**)&dummy, sizeof(char), NULL) == FAILURE) {
- free_alloca(lc_name);
+ free_alloca_with_limit(lc_name, use_heap);
return FAILURE;
}
@@ -1102,12 +1126,12 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
if (retval == FAILURE) {
EG(exception) = exception;
- free_alloca(lc_name);
+ free_alloca_with_limit(lc_name, use_heap);
return FAILURE;
}
if (EG(exception) && exception) {
- free_alloca(lc_name);
+ free_alloca_with_limit(lc_name, use_heap);
zend_error(E_ERROR, "Function %s(%s) threw an exception of type '%s'", ZEND_AUTOLOAD_FUNC_NAME, name, Z_OBJCE_P(EG(exception))->name);
return FAILURE;
}
@@ -1119,7 +1143,7 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
}
retval = zend_hash_find(EG(class_table), lc_name, name_length + 1, (void **) ce);
- free_alloca(lc_name);
+ free_alloca_with_limit(lc_name, use_heap);
return retval;
}
diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c
index 0dc99afbf..2add51c21 100644
--- a/Zend/zend_extensions.c
+++ b/Zend/zend_extensions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_extensions.c,v 1.48.2.1.2.3 2007/09/18 09:24:04 jani Exp $ */
+/* $Id: zend_extensions.c,v 1.48.2.1.2.4 2007/12/31 07:20:02 sebastian Exp $ */
#include "zend_extensions.h"
diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h
index 84a8c0ef7..24923f220 100644
--- a/Zend/zend_extensions.h
+++ b/Zend/zend_extensions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_extensions.h,v 1.67.2.3.2.3 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_extensions.h,v 1.67.2.3.2.4 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_EXTENSIONS_H
#define ZEND_EXTENSIONS_H
diff --git a/Zend/zend_fast_cache.h b/Zend/zend_fast_cache.h
index 885d17432..6da941d00 100644
--- a/Zend/zend_fast_cache.h
+++ b/Zend/zend_fast_cache.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_fast_cache.h,v 1.21.2.1.2.2 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_fast_cache.h,v 1.21.2.1.2.3 2007/12/31 07:20:02 sebastian Exp $ */
#if 0
#ifndef ZEND_FAST_CACHE_H
#define ZEND_FAST_CACHE_H
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h
index 1371ac763..d5e5cd59e 100644
--- a/Zend/zend_globals.h
+++ b/Zend/zend_globals.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_globals.h,v 1.141.2.3.2.7 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_globals.h,v 1.141.2.3.2.8 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_GLOBALS_H
#define ZEND_GLOBALS_H
diff --git a/Zend/zend_globals_macros.h b/Zend/zend_globals_macros.h
index 129400863..b0892afef 100644
--- a/Zend/zend_globals_macros.h
+++ b/Zend/zend_globals_macros.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_globals_macros.h,v 1.22.2.1.2.4 2007/02/16 08:54:17 dmitry Exp $ */
+/* $Id: zend_globals_macros.h,v 1.22.2.1.2.5 2007/12/31 07:20:02 sebastian Exp $ */
#ifndef ZEND_GLOBALS_MACROS_H
#define ZEND_GLOBALS_MACROS_H
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index 61bf56ad0..f3297ca5d 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_hash.c,v 1.121.2.4.2.8 2007/07/24 18:28:39 dmitry Exp $ */
+/* $Id: zend_hash.c,v 1.121.2.4.2.9 2007/12/31 07:20:02 sebastian Exp $ */
#include "zend.h"
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index f110663bd..2e1cf9d20 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_hash.h,v 1.78.2.2.2.2 2007/01/10 15:58:07 dmitry Exp $ */
+/* $Id: zend_hash.h,v 1.78.2.2.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_HASH_H
#define ZEND_HASH_H
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c
index 2e5613bef..4371cdb5c 100644
--- a/Zend/zend_highlight.c
+++ b/Zend/zend_highlight.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_highlight.c,v 1.49.2.3.2.2 2007/09/26 15:43:58 iliaa Exp $ */
+/* $Id: zend_highlight.c,v 1.49.2.3.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include <zend_language_parser.h>
diff --git a/Zend/zend_highlight.h b/Zend/zend_highlight.h
index 805220b6a..a9c83484a 100644
--- a/Zend/zend_highlight.h
+++ b/Zend/zend_highlight.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_highlight.h,v 1.25.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_highlight.h,v 1.25.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_HIGHLIGHT_H
#define ZEND_HIGHLIGHT_H
diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c
index 5b2340fd5..ad551602b 100644
--- a/Zend/zend_indent.c
+++ b/Zend/zend_indent.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_indent.c,v 1.24.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_indent.c,v 1.24.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
/* This indenter doesn't really work, it's here for no particular reason. */
diff --git a/Zend/zend_indent.h b/Zend/zend_indent.h
index 9c720e4c9..21b5d89d8 100644
--- a/Zend/zend_indent.h
+++ b/Zend/zend_indent.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_indent.h,v 1.17.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_indent.h,v 1.17.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_INDENT_H
#define ZEND_INDENT_H
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index 80db6f96d..13b8e38e3 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini.c,v 1.39.2.2.2.25 2007/10/01 15:00:15 iliaa Exp $ */
+/* $Id: zend_ini.c,v 1.39.2.2.2.27 2008/03/13 15:56:21 iliaa Exp $ */
#include "zend.h"
#include "zend_qsort.h"
@@ -63,6 +63,9 @@ static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS
ini_entry->modified = 0;
ini_entry->orig_value = NULL;
ini_entry->orig_value_length = 0;
+ if (ini_entry->modifiable >= (1 << 3)) {
+ ini_entry->modifiable >>= 3;
+ }
}
return 0;
}
@@ -244,6 +247,7 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_val
{
zend_ini_entry *ini_entry;
char *duplicate;
+ zend_bool modifiable;
zend_bool modified;
TSRMLS_FETCH();
@@ -251,8 +255,12 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_val
return FAILURE;
}
+ modifiable = ini_entry->modifiable;
+ modified = ini_entry->modified;
+
if (stage == ZEND_INI_STAGE_ACTIVATE && modify_type == ZEND_INI_SYSTEM) {
- ini_entry->modifiable = ZEND_INI_SYSTEM;
+ /* only touch lower bits */
+ ini_entry->modifiable = (ini_entry->modifiable & (ZEND_INI_ALL << 3)) | ZEND_INI_SYSTEM;
}
if (!force_change) {
@@ -261,8 +269,6 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_val
}
}
- modified = ini_entry->modified;
-
if (!EG(modified_ini_directives)) {
ALLOC_HASHTABLE(EG(modified_ini_directives));
zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
@@ -270,6 +276,8 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_val
if (!modified) {
ini_entry->orig_value = ini_entry->value;
ini_entry->orig_value_length = ini_entry->value_length;
+ /* store orginial value in the upper bits */
+ ini_entry->modifiable = (modifiable << 3) | ini_entry->modifiable;
ini_entry->modified = 1;
zend_hash_add(EG(modified_ini_directives), name, name_length, &ini_entry, sizeof(zend_ini_entry*), NULL);
}
diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h
index a39aca45e..ca7acaccf 100644
--- a/Zend/zend_ini.h
+++ b/Zend/zend_ini.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini.h,v 1.34.2.1.2.6 2007/09/07 09:55:37 jani Exp $ */
+/* $Id: zend_ini.h,v 1.34.2.1.2.7 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_INI_H
#define ZEND_INI_H
diff --git a/Zend/zend_ini_parser.c b/Zend/zend_ini_parser.c
index c759a37aa..a156b2480 100644
--- a/Zend/zend_ini_parser.c
+++ b/Zend/zend_ini_parser.c
@@ -102,7 +102,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -116,7 +116,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini_parser.y,v 1.41.2.2.2.2 2007/07/23 16:17:10 jani Exp $ */
+/* $Id: zend_ini_parser.y,v 1.41.2.2.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#define DEBUG_CFG_PARSER 0
#include "zend.h"
diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y
index a11d9114b..e20e5b07d 100644
--- a/Zend/zend_ini_parser.y
+++ b/Zend/zend_ini_parser.y
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini_parser.y,v 1.41.2.2.2.2 2007/07/23 16:17:10 jani Exp $ */
+/* $Id: zend_ini_parser.y,v 1.41.2.2.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#define DEBUG_CFG_PARSER 0
#include "zend.h"
diff --git a/Zend/zend_ini_scanner.c b/Zend/zend_ini_scanner.c
index b0baf4b6a..57f018cee 100644
--- a/Zend/zend_ini_scanner.c
+++ b/Zend/zend_ini_scanner.c
@@ -18,7 +18,7 @@
/* A Lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /repository/ZendEngine2/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto Exp $
+ * $Header: /repository/ZendEngine2/Attic/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto Exp $
* vim:ft=lex:
*/
diff --git a/Zend/zend_ini_scanner.h b/Zend/zend_ini_scanner.h
index ed849c70b..35650f0bd 100644
--- a/Zend/zend_ini_scanner.h
+++ b/Zend/zend_ini_scanner.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini_scanner.h,v 1.14.2.1.2.2 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_ini_scanner.h,v 1.14.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef _ZEND_INI_SCANNER_H
#define _ZEND_INI_SCANNER_H
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index 1c8259b24..eb8cb64a1 100755
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_interfaces.c,v 1.33.2.4.2.6 2007/05/30 16:32:02 tony2001 Exp $ */
+/* $Id: zend_interfaces.c,v 1.33.2.4.2.7 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_API.h"
diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h
index 94464c50f..bb7e00c2a 100755
--- a/Zend/zend_interfaces.h
+++ b/Zend/zend_interfaces.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_interfaces.h,v 1.11.2.1.2.2 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_interfaces.h,v 1.11.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_INTERFACES_H
#define ZEND_INTERFACES_H
diff --git a/Zend/zend_istdiostream.h b/Zend/zend_istdiostream.h
index a06fa97be..0a7c08ffd 100644
--- a/Zend/zend_istdiostream.h
+++ b/Zend/zend_istdiostream.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_istdiostream.h,v 1.6.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_istdiostream.h,v 1.6.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef _ZEND_STDIOSTREAM
#define _ZEND_STDIOSTREAM
diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c
index 8ea7ca8ca..d3f25f47e 100755
--- a/Zend/zend_iterators.c
+++ b/Zend/zend_iterators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_iterators.c,v 1.12.2.1.2.2 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_iterators.c,v 1.12.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_API.h"
diff --git a/Zend/zend_iterators.h b/Zend/zend_iterators.h
index adb3fcc19..46b812255 100755
--- a/Zend/zend_iterators.h
+++ b/Zend/zend_iterators.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_iterators.h,v 1.10.2.1.2.2 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_iterators.h,v 1.10.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
/* These iterators were designed to operate within the foreach()
* structures provided by the engine, but could be extended for use
diff --git a/Zend/zend_language_parser.c b/Zend/zend_language_parser.c
index 414b511ff..a9f46ff2a 100644
--- a/Zend/zend_language_parser.c
+++ b/Zend/zend_language_parser.c
@@ -339,7 +339,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_parser.y,v 1.160.2.4.2.8 2007/08/13 21:16:57 stas Exp $ */
+/* $Id: zend_language_parser.y,v 1.160.2.4.2.10 2008/03/10 14:54:47 felipe Exp $ */
/*
* LALR shift/reduce conflicts and how they are resolved:
@@ -613,16 +613,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 4099
+#define YYLAST 3964
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 149
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 168
+#define YYNNTS 166
/* YYNRULES -- Number of rules. */
-#define YYNRULES 412
+#define YYNRULES 410
/* YYNRULES -- Number of states. */
-#define YYNSTATES 773
+#define YYNSTATES 771
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -712,15 +712,15 @@ static const yytype_uint16 yyprhs[] =
997, 1001, 1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017,
1019, 1021, 1024, 1027, 1032, 1034, 1038, 1040, 1042, 1044,
1046, 1050, 1054, 1055, 1058, 1059, 1061, 1067, 1071, 1075,
- 1077, 1079, 1081, 1083, 1084, 1087, 1088, 1091, 1092, 1093,
- 1101, 1103, 1106, 1107, 1108, 1113, 1114, 1119, 1120, 1122,
- 1125, 1129, 1131, 1133, 1135, 1138, 1140, 1145, 1150, 1152,
- 1154, 1159, 1160, 1162, 1164, 1165, 1168, 1173, 1178, 1180,
- 1182, 1186, 1188, 1191, 1195, 1197, 1199, 1200, 1206, 1207,
- 1208, 1211, 1217, 1221, 1225, 1227, 1234, 1239, 1244, 1247,
- 1250, 1253, 1254, 1256, 1257, 1263, 1267, 1271, 1278, 1282,
- 1284, 1286, 1288, 1293, 1298, 1301, 1304, 1309, 1312, 1315,
- 1317, 1318, 1323
+ 1077, 1079, 1081, 1083, 1085, 1087, 1088, 1089, 1097, 1099,
+ 1102, 1103, 1104, 1109, 1110, 1115, 1116, 1118, 1121, 1125,
+ 1127, 1129, 1131, 1134, 1136, 1141, 1146, 1148, 1150, 1155,
+ 1156, 1158, 1160, 1161, 1164, 1169, 1174, 1176, 1178, 1182,
+ 1184, 1187, 1191, 1193, 1195, 1196, 1202, 1203, 1204, 1207,
+ 1213, 1217, 1221, 1223, 1230, 1235, 1240, 1243, 1246, 1249,
+ 1250, 1252, 1253, 1259, 1263, 1267, 1274, 1278, 1280, 1282,
+ 1284, 1289, 1294, 1297, 1300, 1305, 1308, 1311, 1313, 1314,
+ 1319
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -740,19 +740,19 @@ static const yytype_int16 yyrhs[] =
-1, 91, 140, 278, 141, 170, 210, -1, 95, 142,
-1, 95, 278, 142, -1, 96, 142, -1, 96, 278,
142, -1, 99, 142, -1, 99, 246, 142, -1, 99,
- 284, 142, -1, 104, 227, 142, -1, 110, 229, 142,
+ 282, 142, -1, 104, 227, 142, -1, 110, 229, 142,
-1, 80, 242, 142, -1, 75, -1, 278, 142, -1,
103, 188, 142, -1, 112, 140, 186, 141, 142, -1,
- -1, -1, 86, 140, 284, 90, 171, 205, 204, 141,
+ -1, -1, 86, 140, 282, 90, 171, 205, 204, 141,
172, 207, -1, -1, -1, 86, 140, 246, 90, 173,
- 284, 204, 141, 174, 207, -1, -1, 88, 175, 140,
+ 282, 204, 141, 174, 207, -1, -1, 88, 175, 140,
209, 141, 208, -1, 142, -1, -1, -1, -1, -1,
-1, 100, 176, 143, 154, 144, 101, 140, 177, 262,
178, 73, 141, 179, 143, 154, 144, 180, 181, -1,
102, 278, 142, -1, 182, -1, -1, 183, -1, 182,
183, -1, -1, -1, 101, 140, 262, 184, 73, 141,
185, 143, 154, 144, -1, 187, -1, 186, 8, 187,
- -1, 284, -1, 79, -1, 140, 79, 141, -1, 192,
+ -1, 282, -1, 79, -1, 140, 79, 141, -1, 192,
-1, 195, -1, -1, 31, -1, -1, -1, 97, 193,
191, 71, 194, 140, 222, 141, 143, 154, 144, -1,
-1, 198, 71, 199, 196, 202, 143, 230, 144, -1,
@@ -760,7 +760,7 @@ static const yytype_int16 yyrhs[] =
-1, 109, 116, -1, 108, 116, -1, -1, 118, 262,
-1, 117, -1, -1, 118, 203, -1, -1, 119, 203,
-1, 262, -1, 203, 8, 262, -1, -1, 121, 205,
- -1, 284, -1, 31, 284, -1, 157, -1, 26, 154,
+ -1, 282, -1, 31, 282, -1, 157, -1, 26, 154,
85, 142, -1, 157, -1, 26, 154, 87, 142, -1,
157, -1, 26, 154, 89, 142, -1, 71, 13, 272,
-1, 209, 8, 71, 13, 272, -1, 143, 211, 144,
@@ -777,8 +777,8 @@ static const yytype_int16 yyrhs[] =
223, 8, 224, 31, 73, -1, 223, 8, 224, 31,
73, 13, 272, -1, 223, 8, 224, 73, 13, 272,
-1, -1, 71, -1, 123, -1, 226, -1, -1, 246,
- -1, 284, -1, 31, 280, -1, 226, 8, 246, -1,
- 226, 8, 284, -1, 226, 8, 31, 280, -1, 227,
+ -1, 282, -1, 31, 280, -1, 226, 8, 246, -1,
+ 226, 8, 282, -1, 226, 8, 31, 280, -1, 227,
8, 228, -1, 228, -1, 73, -1, 145, 279, -1,
145, 143, 278, 144, -1, 229, 8, 73, -1, 229,
8, 73, 13, 272, -1, 73, -1, 73, 13, 272,
@@ -792,16 +792,16 @@ static const yytype_int16 yyrhs[] =
13, 272, -1, 241, 8, 71, 13, 272, -1, 98,
71, 13, 272, -1, 242, 8, 278, -1, 278, -1,
-1, 244, -1, -1, 244, 8, 245, 278, -1, 278,
- -1, -1, 122, 140, 247, 304, 141, 13, 278, -1,
- 284, 13, 278, -1, 284, 13, 31, 284, -1, -1,
- 284, 13, 31, 63, 263, 248, 270, -1, -1, 63,
- 263, 249, 270, -1, 62, 278, -1, 284, 24, 278,
- -1, 284, 23, 278, -1, 284, 22, 278, -1, 284,
- 21, 278, -1, 284, 20, 278, -1, 284, 19, 278,
- -1, 284, 18, 278, -1, 284, 17, 278, -1, 284,
- 16, 278, -1, 284, 15, 278, -1, 284, 14, 278,
- -1, 282, 60, -1, 60, 282, -1, 282, 59, -1,
- 59, 282, -1, -1, 278, 27, 250, 278, -1, -1,
+ -1, -1, 122, 140, 247, 302, 141, 13, 278, -1,
+ 282, 13, 278, -1, 282, 13, 31, 282, -1, -1,
+ 282, 13, 31, 63, 263, 248, 270, -1, -1, 63,
+ 263, 249, 270, -1, 62, 278, -1, 282, 24, 278,
+ -1, 282, 23, 278, -1, 282, 22, 278, -1, 282,
+ 21, 278, -1, 282, 20, 278, -1, 282, 19, 278,
+ -1, 282, 18, 278, -1, 282, 17, 278, -1, 282,
+ 16, 278, -1, 282, 15, 278, -1, 282, 14, 278,
+ -1, 281, 60, -1, 60, 281, -1, 281, 59, -1,
+ 59, 281, -1, -1, 278, 27, 250, 278, -1, -1,
278, 28, 251, 278, -1, -1, 278, 9, 252, 278,
-1, -1, 278, 11, 253, 278, -1, 278, 10, 278,
-1, 278, 29, 278, -1, 278, 31, 278, -1, 278,
@@ -814,51 +814,51 @@ static const yytype_int16 yyrhs[] =
34, 278, -1, 278, 36, 278, -1, 278, 39, 278,
-1, 278, 37, 278, -1, 278, 38, 278, -1, 278,
49, 263, -1, 140, 278, 141, -1, -1, -1, 278,
- 25, 254, 278, 26, 255, 278, -1, 313, -1, 58,
+ 25, 254, 278, 26, 255, 278, -1, 311, -1, 58,
278, -1, 57, 278, -1, 56, 278, -1, 55, 278,
-1, 54, 278, -1, 53, 278, -1, 52, 278, -1,
64, 269, -1, -1, 51, 256, 278, -1, 274, -1,
- 123, 140, 307, 141, -1, 146, 309, 146, -1, 12,
+ 123, 140, 305, 141, -1, 146, 307, 146, -1, 12,
278, -1, -1, 71, 140, 258, 225, 141, -1, -1,
262, 139, 71, 140, 259, 225, 141, -1, -1, 262,
- 139, 292, 140, 260, 225, 141, -1, -1, 292, 140,
+ 139, 290, 140, 260, 225, 141, -1, -1, 290, 140,
261, 225, 141, -1, 71, -1, 71, -1, 264, -1,
- -1, -1, 295, 120, 265, 299, 266, 267, -1, 295,
- -1, 267, 268, -1, -1, 120, 299, -1, -1, 140,
+ -1, -1, 293, 120, 265, 297, 266, 267, -1, 293,
+ -1, 267, 268, -1, -1, 120, 297, -1, -1, 140,
141, -1, 140, 278, 141, -1, -1, 140, 225, 141,
-1, 69, -1, 70, -1, 79, -1, 127, -1, 128,
-1, 124, -1, 125, -1, 126, -1, 271, -1, 71,
-1, 42, 272, -1, 43, 272, -1, 123, 140, 275,
141, -1, 273, -1, 71, 139, 71, -1, 71, -1,
- 72, -1, 316, -1, 271, -1, 147, 309, 147, -1,
- 135, 309, 136, -1, -1, 277, 276, -1, -1, 8,
+ 72, -1, 314, -1, 271, -1, 147, 307, 147, -1,
+ 135, 307, 136, -1, -1, 277, 276, -1, -1, 8,
-1, 277, 8, 272, 121, 272, -1, 277, 8, 272,
-1, 272, 121, 272, -1, 272, -1, 279, -1, 246,
- -1, 284, -1, -1, 284, 281, -1, -1, 284, 283,
- -1, -1, -1, 294, 120, 285, 299, 286, 290, 287,
- -1, 294, -1, 287, 288, -1, -1, -1, 120, 299,
- 289, 290, -1, -1, 140, 291, 225, 141, -1, -1,
- 296, -1, 303, 296, -1, 262, 139, 292, -1, 295,
- -1, 257, -1, 296, -1, 303, 296, -1, 293, -1,
- 296, 61, 298, 148, -1, 296, 143, 278, 144, -1,
- 297, -1, 73, -1, 145, 143, 278, 144, -1, -1,
- 278, -1, 301, -1, -1, 292, 300, -1, 301, 61,
- 298, 148, -1, 301, 143, 278, 144, -1, 302, -1,
- 71, -1, 143, 278, 144, -1, 145, -1, 303, 145,
- -1, 304, 8, 305, -1, 305, -1, 284, -1, -1,
- 122, 140, 306, 304, 141, -1, -1, -1, 308, 276,
- -1, 308, 8, 278, 121, 278, -1, 308, 8, 278,
- -1, 278, 121, 278, -1, 278, -1, 308, 8, 278,
- 121, 31, 280, -1, 308, 8, 31, 280, -1, 278,
- 121, 31, 280, -1, 31, 280, -1, 309, 310, -1,
- 309, 78, -1, -1, 73, -1, -1, 73, 61, 311,
- 312, 148, -1, 73, 120, 71, -1, 137, 278, 144,
- -1, 137, 72, 61, 278, 148, 144, -1, 138, 284,
- 144, -1, 71, -1, 74, -1, 73, -1, 113, 140,
- 314, 141, -1, 114, 140, 284, 141, -1, 7, 278,
- -1, 6, 278, -1, 5, 140, 278, 141, -1, 4,
- 278, -1, 3, 278, -1, 284, -1, -1, 314, 8,
- 315, 284, -1, 262, 139, 71, -1
+ -1, 282, -1, 282, -1, 282, -1, -1, -1, 292,
+ 120, 283, 297, 284, 288, 285, -1, 292, -1, 285,
+ 286, -1, -1, -1, 120, 297, 287, 288, -1, -1,
+ 140, 289, 225, 141, -1, -1, 294, -1, 301, 294,
+ -1, 262, 139, 290, -1, 293, -1, 257, -1, 294,
+ -1, 301, 294, -1, 291, -1, 294, 61, 296, 148,
+ -1, 294, 143, 278, 144, -1, 295, -1, 73, -1,
+ 145, 143, 278, 144, -1, -1, 278, -1, 299, -1,
+ -1, 290, 298, -1, 299, 61, 296, 148, -1, 299,
+ 143, 278, 144, -1, 300, -1, 71, -1, 143, 278,
+ 144, -1, 145, -1, 301, 145, -1, 302, 8, 303,
+ -1, 303, -1, 282, -1, -1, 122, 140, 304, 302,
+ 141, -1, -1, -1, 306, 276, -1, 306, 8, 278,
+ 121, 278, -1, 306, 8, 278, -1, 278, 121, 278,
+ -1, 278, -1, 306, 8, 278, 121, 31, 280, -1,
+ 306, 8, 31, 280, -1, 278, 121, 31, 280, -1,
+ 31, 280, -1, 307, 308, -1, 307, 78, -1, -1,
+ 73, -1, -1, 73, 61, 309, 310, 148, -1, 73,
+ 120, 71, -1, 137, 278, 144, -1, 137, 72, 61,
+ 278, 148, 144, -1, 138, 282, 144, -1, 71, -1,
+ 74, -1, 73, -1, 113, 140, 312, 141, -1, 114,
+ 140, 282, 141, -1, 7, 278, -1, 6, 278, -1,
+ 5, 140, 278, 141, -1, 4, 278, -1, 3, 278,
+ -1, 282, -1, -1, 312, 8, 313, 282, -1, 262,
+ 139, 71, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -897,15 +897,15 @@ static const yytype_uint16 yyrline[] =
675, 680, 681, 682, 683, 684, 685, 686, 687, 692,
693, 694, 695, 696, 697, 701, 705, 706, 707, 708,
709, 710, 715, 716, 719, 721, 725, 726, 727, 728,
- 732, 733, 738, 743, 743, 748, 748, 753, 754, 753,
- 756, 760, 761, 766, 766, 770, 770, 774, 778, 779,
- 783, 788, 789, 794, 795, 796, 800, 801, 802, 807,
- 808, 812, 813, 818, 819, 819, 823, 824, 825, 829,
- 830, 834, 835, 839, 840, 845, 846, 846, 847, 852,
- 853, 857, 858, 859, 860, 861, 862, 863, 864, 868,
- 869, 870, 877, 878, 878, 879, 880, 881, 882, 887,
- 888, 889, 894, 895, 896, 897, 898, 899, 900, 904,
- 905, 905, 909
+ 732, 733, 738, 743, 748, 753, 754, 753, 756, 760,
+ 761, 766, 766, 770, 770, 774, 778, 779, 783, 788,
+ 789, 794, 795, 796, 800, 801, 802, 807, 808, 812,
+ 813, 818, 819, 819, 823, 824, 825, 829, 830, 834,
+ 835, 839, 840, 845, 846, 846, 847, 852, 853, 857,
+ 858, 859, 860, 861, 862, 863, 864, 868, 869, 870,
+ 877, 878, 878, 879, 880, 881, 882, 887, 888, 889,
+ 894, 895, 896, 897, 898, 899, 900, 904, 905, 905,
+ 909
};
#endif
@@ -976,17 +976,17 @@ static const char *const yytname[] =
"common_scalar", "static_scalar", "static_class_constant", "scalar",
"static_array_pair_list", "possible_comma",
"non_empty_static_array_pair_list", "expr", "r_variable", "w_variable",
- "@55", "rw_variable", "@56", "variable", "@57", "@58",
- "variable_properties", "variable_property", "@59", "method_or_not",
- "@60", "variable_without_objects", "static_member",
+ "rw_variable", "variable", "@55", "@56", "variable_properties",
+ "variable_property", "@57", "method_or_not", "@58",
+ "variable_without_objects", "static_member",
"base_variable_with_function_calls", "base_variable",
"reference_variable", "compound_variable", "dim_offset",
- "object_property", "@61", "object_dim_list", "variable_name",
+ "object_property", "@59", "object_dim_list", "variable_name",
"simple_indirect_reference", "assignment_list",
- "assignment_list_element", "@62", "array_pair_list",
- "non_empty_array_pair_list", "encaps_list", "encaps_var", "@63",
+ "assignment_list_element", "@60", "array_pair_list",
+ "non_empty_array_pair_list", "encaps_list", "encaps_var", "@61",
"encaps_var_offset", "internal_functions_in_yacc", "isset_variables",
- "@64", "class_constant", 0
+ "@62", "class_constant", 0
};
#endif
@@ -1049,15 +1049,15 @@ static const yytype_uint16 yyr1[] =
270, 271, 271, 271, 271, 271, 271, 271, 271, 272,
272, 272, 272, 272, 272, 273, 274, 274, 274, 274,
274, 274, 275, 275, 276, 276, 277, 277, 277, 277,
- 278, 278, 279, 281, 280, 283, 282, 285, 286, 284,
- 284, 287, 287, 289, 288, 291, 290, 290, 292, 292,
- 293, 294, 294, 295, 295, 295, 296, 296, 296, 297,
- 297, 298, 298, 299, 300, 299, 301, 301, 301, 302,
- 302, 303, 303, 304, 304, 305, 306, 305, 305, 307,
- 307, 308, 308, 308, 308, 308, 308, 308, 308, 309,
- 309, 309, 310, 311, 310, 310, 310, 310, 310, 312,
- 312, 312, 313, 313, 313, 313, 313, 313, 313, 314,
- 315, 314, 316
+ 278, 278, 279, 280, 281, 283, 284, 282, 282, 285,
+ 285, 287, 286, 289, 288, 288, 290, 290, 291, 292,
+ 292, 293, 293, 293, 294, 294, 294, 295, 295, 296,
+ 296, 297, 298, 297, 299, 299, 299, 300, 300, 301,
+ 301, 302, 302, 303, 304, 303, 303, 305, 305, 306,
+ 306, 306, 306, 306, 306, 306, 306, 307, 307, 307,
+ 308, 309, 308, 308, 308, 308, 308, 310, 310, 310,
+ 311, 311, 311, 311, 311, 311, 311, 312, 313, 312,
+ 314
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -1096,15 +1096,15 @@ static const yytype_uint8 yyr2[] =
3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 2, 4, 1, 3, 1, 1, 1, 1,
3, 3, 0, 2, 0, 1, 5, 3, 3, 1,
- 1, 1, 1, 0, 2, 0, 2, 0, 0, 7,
- 1, 2, 0, 0, 4, 0, 4, 0, 1, 2,
- 3, 1, 1, 1, 2, 1, 4, 4, 1, 1,
- 4, 0, 1, 1, 0, 2, 4, 4, 1, 1,
- 3, 1, 2, 3, 1, 1, 0, 5, 0, 0,
- 2, 5, 3, 3, 1, 6, 4, 4, 2, 2,
- 2, 0, 1, 0, 5, 3, 3, 6, 3, 1,
- 1, 1, 4, 4, 2, 2, 4, 2, 2, 1,
- 0, 4, 3
+ 1, 1, 1, 1, 1, 0, 0, 7, 1, 2,
+ 0, 0, 4, 0, 4, 0, 1, 2, 3, 1,
+ 1, 1, 2, 1, 4, 4, 1, 1, 4, 0,
+ 1, 1, 0, 2, 4, 4, 1, 1, 3, 1,
+ 2, 3, 1, 1, 0, 5, 0, 0, 2, 5,
+ 3, 3, 1, 6, 4, 4, 2, 2, 2, 0,
+ 1, 0, 5, 3, 3, 6, 3, 1, 1, 1,
+ 4, 4, 2, 2, 4, 2, 2, 1, 0, 4,
+ 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -1115,990 +1115,984 @@ static const yytype_uint16 yydefact[] =
5, 0, 3, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 272, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 296, 0, 301,
- 302, 316, 317, 359, 47, 303, 0, 28, 0, 0,
+ 302, 316, 317, 357, 47, 303, 0, 28, 0, 0,
0, 57, 0, 0, 0, 83, 0, 60, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 90, 95,
- 0, 0, 306, 307, 308, 304, 305, 391, 0, 59,
- 12, 371, 391, 391, 4, 6, 17, 7, 8, 79,
- 80, 0, 0, 331, 352, 0, 319, 274, 0, 330,
- 0, 332, 0, 355, 340, 351, 353, 358, 0, 263,
- 318, 408, 407, 0, 405, 404, 277, 246, 247, 248,
+ 0, 0, 306, 307, 308, 304, 305, 389, 0, 59,
+ 12, 369, 389, 389, 4, 6, 17, 7, 8, 79,
+ 80, 0, 0, 331, 350, 0, 319, 274, 0, 330,
+ 0, 332, 0, 353, 338, 349, 351, 356, 0, 263,
+ 318, 406, 405, 0, 403, 402, 277, 246, 247, 248,
249, 0, 270, 269, 268, 267, 266, 265, 264, 286,
- 0, 225, 335, 223, 210, 287, 0, 208, 288, 292,
- 353, 0, 0, 271, 0, 278, 0, 196, 0, 25,
+ 0, 225, 334, 223, 210, 287, 0, 208, 288, 292,
+ 351, 0, 0, 271, 0, 278, 0, 196, 0, 25,
197, 0, 0, 0, 37, 0, 39, 0, 81, 41,
331, 0, 332, 0, 0, 77, 0, 0, 160, 0,
0, 159, 92, 91, 165, 0, 0, 0, 0, 0,
- 202, 379, 0, 0, 10, 0, 0, 0, 93, 88,
+ 202, 377, 0, 0, 10, 0, 0, 0, 93, 88,
0, 230, 0, 232, 260, 226, 228, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 48, 224, 222,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 336, 284, 337, 361, 0, 372, 354, 0,
- 273, 0, 0, 299, 289, 354, 297, 0, 0, 151,
- 0, 46, 0, 0, 0, 198, 201, 331, 332, 0,
- 0, 38, 40, 82, 0, 42, 43, 12, 66, 0,
- 49, 0, 161, 332, 0, 44, 0, 0, 45, 0,
- 74, 76, 409, 0, 0, 0, 378, 0, 384, 0,
- 324, 392, 390, 321, 0, 0, 389, 259, 18, 0,
- 0, 276, 320, 0, 86, 96, 412, 350, 348, 0,
- 0, 234, 0, 0, 0, 0, 235, 237, 236, 251,
- 250, 253, 252, 254, 256, 257, 255, 245, 244, 239,
- 240, 238, 241, 242, 243, 258, 0, 204, 221, 220,
- 219, 218, 217, 216, 215, 214, 213, 212, 211, 151,
- 0, 362, 0, 0, 406, 0, 350, 151, 209, 0,
- 298, 19, 0, 0, 150, 331, 332, 195, 0, 0,
- 31, 199, 54, 51, 0, 0, 35, 84, 10, 78,
- 0, 158, 0, 0, 310, 0, 309, 166, 314, 163,
- 0, 0, 410, 402, 403, 9, 0, 375, 0, 374,
- 388, 333, 0, 275, 325, 380, 393, 0, 317, 0,
- 0, 0, 11, 13, 14, 15, 360, 286, 94, 98,
- 0, 0, 280, 282, 349, 231, 233, 0, 227, 229,
- 0, 205, 0, 369, 0, 364, 338, 363, 368, 356,
- 357, 0, 290, 22, 0, 154, 279, 0, 29, 26,
- 197, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 162, 311, 312, 0, 322, 0, 75, 50, 0, 376,
- 378, 0, 334, 0, 383, 0, 382, 0, 395, 0,
- 396, 398, 0, 0, 0, 97, 100, 168, 151, 151,
- 261, 206, 285, 0, 365, 347, 361, 0, 300, 294,
- 12, 20, 0, 331, 332, 0, 0, 0, 200, 102,
- 0, 102, 104, 112, 0, 12, 110, 58, 118, 118,
- 36, 147, 0, 315, 329, 0, 324, 164, 411, 378,
- 373, 0, 387, 386, 0, 399, 401, 400, 0, 0,
- 0, 99, 168, 0, 179, 0, 0, 0, 299, 370,
- 345, 342, 0, 0, 291, 10, 127, 157, 0, 12,
- 125, 27, 32, 0, 0, 105, 0, 0, 10, 118,
- 0, 118, 0, 148, 149, 0, 137, 0, 61, 0,
- 313, 325, 323, 0, 203, 0, 381, 394, 0, 16,
- 179, 101, 0, 183, 184, 185, 188, 187, 186, 178,
- 89, 167, 169, 0, 177, 181, 0, 281, 283, 262,
- 207, 151, 339, 366, 367, 0, 293, 130, 133, 0,
- 10, 197, 103, 55, 52, 113, 0, 0, 0, 0,
- 0, 0, 114, 0, 147, 0, 139, 0, 328, 327,
- 377, 385, 397, 87, 0, 0, 172, 182, 0, 171,
- 0, 0, 341, 295, 135, 0, 0, 21, 30, 0,
- 0, 0, 0, 111, 0, 116, 0, 123, 124, 121,
- 115, 12, 0, 140, 0, 62, 0, 0, 191, 0,
- 81, 0, 346, 343, 0, 0, 0, 0, 134, 126,
- 33, 12, 108, 56, 53, 117, 119, 12, 10, 0,
- 143, 0, 142, 0, 326, 194, 0, 0, 170, 0,
- 0, 347, 0, 12, 0, 0, 0, 10, 12, 10,
- 85, 144, 0, 141, 0, 192, 189, 173, 193, 344,
- 0, 10, 24, 128, 12, 106, 34, 0, 10, 0,
- 146, 63, 0, 0, 0, 0, 10, 109, 145, 0,
- 190, 147, 131, 129, 0, 12, 0, 12, 107, 10,
- 0, 10, 64, 175, 12, 174, 68, 10, 0, 65,
- 67, 69, 176, 0, 70, 71, 0, 0, 72, 0,
- 12, 10, 73
+ 0, 0, 284, 335, 359, 0, 370, 352, 0, 273,
+ 0, 0, 299, 289, 352, 297, 0, 0, 151, 0,
+ 46, 0, 0, 0, 198, 201, 331, 332, 0, 0,
+ 38, 40, 82, 0, 42, 43, 12, 66, 0, 49,
+ 0, 161, 332, 0, 44, 0, 0, 45, 0, 74,
+ 76, 407, 0, 0, 0, 376, 0, 382, 0, 324,
+ 390, 388, 321, 0, 0, 387, 259, 18, 0, 0,
+ 276, 320, 0, 86, 96, 410, 348, 346, 0, 0,
+ 234, 0, 0, 0, 0, 235, 237, 236, 251, 250,
+ 253, 252, 254, 256, 257, 255, 245, 244, 239, 240,
+ 238, 241, 242, 243, 258, 0, 204, 221, 220, 219,
+ 218, 217, 216, 215, 214, 213, 212, 211, 151, 0,
+ 360, 0, 0, 404, 0, 348, 151, 209, 0, 298,
+ 19, 0, 0, 150, 331, 332, 195, 0, 0, 31,
+ 199, 54, 51, 0, 0, 35, 84, 10, 78, 0,
+ 158, 0, 0, 310, 0, 309, 166, 314, 163, 0,
+ 0, 408, 400, 401, 9, 0, 373, 0, 372, 386,
+ 333, 0, 275, 325, 378, 391, 0, 317, 0, 0,
+ 0, 11, 13, 14, 15, 358, 286, 94, 98, 0,
+ 0, 280, 282, 347, 231, 233, 0, 227, 229, 0,
+ 205, 0, 367, 0, 362, 336, 361, 366, 354, 355,
+ 0, 290, 22, 0, 154, 279, 0, 29, 26, 197,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 162,
+ 311, 312, 0, 322, 0, 75, 50, 0, 374, 376,
+ 0, 0, 381, 0, 380, 0, 393, 0, 394, 396,
+ 0, 0, 0, 97, 100, 168, 151, 151, 261, 206,
+ 285, 0, 363, 345, 359, 0, 300, 294, 12, 20,
+ 0, 331, 332, 0, 0, 0, 200, 102, 0, 102,
+ 104, 112, 0, 12, 110, 58, 118, 118, 36, 147,
+ 0, 315, 329, 0, 324, 164, 409, 376, 371, 0,
+ 385, 384, 0, 397, 399, 398, 0, 0, 0, 99,
+ 168, 0, 179, 0, 0, 0, 299, 368, 343, 340,
+ 0, 0, 291, 10, 127, 157, 0, 12, 125, 27,
+ 32, 0, 0, 105, 0, 0, 10, 118, 0, 118,
+ 0, 148, 149, 0, 137, 0, 61, 0, 313, 325,
+ 323, 0, 203, 0, 379, 392, 0, 16, 179, 101,
+ 0, 183, 184, 185, 188, 187, 186, 178, 89, 167,
+ 169, 0, 177, 181, 0, 281, 283, 262, 207, 151,
+ 337, 364, 365, 0, 293, 130, 133, 0, 10, 197,
+ 103, 55, 52, 113, 0, 0, 0, 0, 0, 0,
+ 114, 0, 147, 0, 139, 0, 328, 327, 375, 383,
+ 395, 87, 0, 0, 172, 182, 0, 171, 0, 0,
+ 339, 295, 135, 0, 0, 21, 30, 0, 0, 0,
+ 0, 111, 0, 116, 0, 123, 124, 121, 115, 12,
+ 0, 140, 0, 62, 0, 0, 191, 0, 81, 0,
+ 344, 341, 0, 0, 0, 0, 134, 126, 33, 12,
+ 108, 56, 53, 117, 119, 12, 10, 0, 143, 0,
+ 142, 0, 326, 194, 0, 0, 170, 0, 0, 345,
+ 0, 12, 0, 0, 0, 10, 12, 10, 85, 144,
+ 0, 141, 0, 192, 189, 173, 193, 342, 0, 10,
+ 24, 128, 12, 106, 34, 0, 10, 0, 146, 63,
+ 0, 0, 0, 0, 10, 109, 145, 0, 190, 147,
+ 131, 129, 0, 12, 0, 12, 107, 10, 0, 10,
+ 64, 175, 12, 174, 68, 10, 0, 65, 67, 69,
+ 176, 0, 70, 71, 0, 0, 72, 0, 12, 10,
+ 73
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 2, 4, 74, 174, 289, 402, 682, 76,
- 434, 546, 490, 607, 243, 496, 138, 495, 440, 611,
- 706, 447, 443, 652, 442, 651, 142, 153, 627, 693,
- 739, 756, 759, 760, 761, 766, 769, 269, 270, 157,
- 77, 78, 254, 79, 148, 448, 80, 409, 295, 81,
- 294, 82, 411, 474, 475, 554, 501, 726, 683, 507,
- 365, 510, 560, 708, 687, 659, 551, 608, 735, 644,
- 747, 647, 676, 565, 566, 567, 353, 354, 160, 161,
- 165, 534, 591, 635, 670, 733, 755, 592, 593, 594,
- 595, 669, 596, 136, 244, 245, 441, 83, 276, 538,
- 233, 304, 305, 300, 302, 303, 537, 111, 84, 239,
- 478, 479, 339, 85, 127, 128, 349, 489, 544, 606,
- 133, 348, 86, 377, 378, 87, 515, 395, 516, 88,
- 89, 390, 462, 90, 222, 91, 340, 485, 602, 642,
- 701, 541, 601, 92, 93, 94, 95, 96, 97, 342,
- 426, 484, 427, 428, 98, 388, 389, 519, 279, 280,
- 172, 286, 467, 528, 99, 273, 458, 100
+ -1, 1, 2, 4, 74, 174, 288, 401, 680, 76,
+ 433, 544, 488, 605, 242, 494, 138, 493, 439, 609,
+ 704, 446, 442, 650, 441, 649, 142, 153, 625, 691,
+ 737, 754, 757, 758, 759, 764, 767, 268, 269, 157,
+ 77, 78, 253, 79, 148, 447, 80, 408, 294, 81,
+ 293, 82, 410, 472, 473, 552, 499, 724, 681, 505,
+ 364, 508, 558, 706, 685, 657, 549, 606, 733, 642,
+ 745, 645, 674, 563, 564, 565, 352, 353, 160, 161,
+ 165, 532, 589, 633, 668, 731, 753, 590, 591, 592,
+ 593, 667, 594, 136, 243, 244, 440, 83, 275, 536,
+ 232, 303, 304, 299, 301, 302, 535, 111, 84, 238,
+ 476, 477, 338, 85, 127, 128, 348, 487, 542, 604,
+ 133, 347, 86, 376, 377, 87, 513, 394, 514, 88,
+ 89, 389, 90, 91, 339, 483, 600, 640, 699, 539,
+ 599, 92, 93, 94, 95, 96, 97, 341, 425, 482,
+ 426, 427, 98, 387, 388, 517, 278, 279, 172, 285,
+ 465, 526, 99, 272, 457, 100
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -456
+#define YYPACT_NINF -433
static const yytype_int16 yypact[] =
{
- -456, 63, 66, -456, 842, 2902, 2902, -68, 2902, 2902,
- 2902, 2902, 2902, 2902, 2902, -456, 2902, 2902, 2902, 2902,
- 2902, 2902, 2902, 25, 25, 2902, 28, -54, -52, -456,
- -456, 45, -456, -456, -456, -456, 2902, -456, -50, 31,
- 51, -456, 57, 1724, 1850, -456, 1976, -456, 2902, 12,
- 49, 129, 139, 208, 119, 149, 161, 164, -456, -456,
- 166, 174, -456, -456, -456, -456, -456, -456, 2902, -456,
- -456, 179, -456, -456, -456, -456, -456, -456, -456, -456,
- -456, 257, 266, -456, -456, 207, -456, -456, 3302, -456,
- 189, 985, 210, -456, 232, -456, -33, -456, 99, -456,
- -456, 3973, 3973, 2902, 3973, 3973, 2155, -456, -456, 302,
- -456, 2902, -456, -456, -456, -456, -456, -456, -456, 213,
- 216, -456, -456, -456, -456, 219, 220, -456, -456, 242,
- -46, 99, 2102, -456, 2902, -456, -3, 3973, 1598, -456,
- 2902, 2902, 221, 2902, -456, 3343, -456, 3384, 332, -456,
- 222, 3973, 504, 223, 3425, -456, 286, 225, -456, -22,
- 0, -456, -456, -456, 356, 4, 25, 25, 25, 233,
- -456, 2202, -20, 3466, 229, 2902, 120, 52, 270, -456,
- 29, -456, 2902, -456, -456, -456, -456, 2902, 2902, 2902,
- 2902, 2902, 2902, 2902, 2902, 2902, 2902, 2902, 2902, 2902,
- 2902, 2902, 2902, 2902, 2902, 2902, 28, -456, -456, -456,
- 2302, 2902, 2902, 2902, 2902, 2902, 2902, 2902, 2902, 2902,
- 2902, 2902, -456, -456, -456, 2902, 2902, 179, -5, 3507,
- -456, 42, 122, 249, -456, -46, -456, 3548, 3589, 2402,
- 2902, -456, 309, 2902, 248, 384, 3973, 303, 739, 323,
- 3630, -456, -456, -456, 324, -456, -456, -456, -456, 258,
- -456, 2902, -456, -456, 49, -456, 546, 325, -456, 10,
- -456, -456, -456, 13, 260, 261, 41, 25, 3835, 263,
- 394, 80, -456, -456, 3002, 25, -456, -456, -456, 968,
- 1906, -456, -456, 335, -456, 289, 268, 269, -46, 99,
- 2902, 4050, 2902, 2902, 2902, 2902, 1590, 1715, 1840, 1966,
- 1966, 1966, 1966, 1085, 1085, 1085, 1085, 241, 241, 247,
- 247, 247, 302, 302, 302, -456, -11, 2155, 2155, 2155,
- 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2402,
- 22, 3973, 262, 2032, -456, 268, -456, 2402, -456, 22,
- -456, 385, 25, 271, 406, 15, 60, 3973, 283, 3671,
- -456, -456, -456, -456, 418, 17, -456, -456, 288, -456,
- 3058, -456, 546, 546, 294, 298, -456, -456, -456, 421,
- 25, 297, -456, -456, -456, -456, 301, -456, 36, -456,
- -456, -456, 2502, -456, 2602, -456, -456, 380, 391, 3125,
- 311, 317, -456, -456, -456, -456, -456, -456, -456, 337,
- 335, 321, -456, -456, -46, 4013, 2155, 3932, 2354, 833,
- 28, -456, 318, -456, 2902, -456, -456, -6, -456, -456,
- -456, 327, -456, -456, 1598, -456, -456, 2702, -456, -456,
- 2902, 2902, 25, 14, 546, 389, 1094, -15, 326, 364,
- -456, -456, -456, 399, 546, 546, -456, -456, 25, -456,
- 41, 458, -456, 25, 3973, 25, 3876, 95, -456, 2902,
- -456, -456, 331, 335, 330, 470, -456, -456, 2402, 2402,
- -456, -456, -456, 3176, -456, 339, 2902, 2902, -456, -456,
- -456, -456, 25, 39, 362, 2902, 1220, 340, 3973, 360,
- 25, 360, -456, -456, 472, -456, -456, -456, 344, 345,
- -456, -12, 348, -456, 368, 350, 484, -456, -456, 41,
- -456, 2902, -456, -456, 2802, -456, -456, -456, 346, 1780,
- 351, 470, -456, 335, 319, 354, 361, 2902, 249, -456,
- -456, -456, 349, 3217, 381, 206, -456, -456, 3712, -456,
- -456, -456, -456, 14, 363, -456, 365, 546, 416, -456,
- 224, -456, 112, -456, -456, 370, 505, 19, -456, 546,
- -456, 546, -456, 40, 2155, 25, 3973, -456, 371, -456,
- 501, -456, 438, -456, -456, -456, -456, -456, -456, -456,
- -456, -456, -456, 417, 203, -456, 5, -456, -456, 2255,
- -456, 2402, 409, -456, -456, 22, -456, -456, 202, 392,
- 448, 2902, -456, -456, -456, -456, 393, 250, 395, 2902,
- -16, 158, -456, 390, 34, 463, 526, 335, -456, 419,
- -456, -456, -456, -456, 528, 471, -456, -456, 475, -456,
- 402, 22, -456, -456, 231, 408, 1598, -456, -456, 407,
- 410, 1346, 1346, -456, 411, -456, 3261, -456, -456, -456,
- -456, -456, 30, 537, 546, -456, 546, 546, 544, 8,
- 332, 547, -456, -456, 422, 535, 499, 2902, -456, -456,
- -456, -456, -456, -456, -456, -456, -456, -456, 427, 500,
- 559, 546, -456, 503, -456, -456, 546, 506, -456, 507,
- 546, 339, 2902, -456, 432, 3753, 1472, 490, -456, 183,
- -456, 567, 546, -456, 440, -456, 569, -456, -456, -456,
- 3794, 515, -456, -456, -456, -456, -456, 444, 186, 546,
- -456, -456, 546, 447, 564, 1598, 509, -456, -456, 449,
- -456, -12, -456, -456, 453, -456, 450, -456, -456, 456,
- 177, 267, -456, -456, -456, -456, 496, 469, 462, -456,
- 496, -456, -456, 335, -456, -456, 541, 477, -456, 476,
- -456, 479, -456
+ -433, 70, 83, -433, 789, 2849, 2849, -74, 2849, 2849,
+ 2849, 2849, 2849, 2849, 2849, -433, 2849, 2849, 2849, 2849,
+ 2849, 2849, 2849, 29, 29, 2849, 41, -55, -29, -433,
+ -433, -31, -433, -433, -433, -433, 2849, -433, -25, -20,
+ 45, -433, 49, 1671, 1797, -433, 1923, -433, 2849, -30,
+ 15, -27, 54, 107, 62, 102, 104, 106, -433, -433,
+ 111, 119, -433, -433, -433, -433, -433, -433, 2849, -433,
+ -433, 53, -433, -433, -433, -433, -433, -433, -433, -433,
+ -433, 200, 203, -433, -433, 138, -433, -433, 3166, -433,
+ 46, 1058, 152, -433, 178, -433, 25, -433, 22, -433,
+ -433, 3838, 3838, 2849, 3838, 3838, 2102, -433, -433, 254,
+ -433, 2849, -433, -433, -433, -433, -433, -433, -433, 165,
+ 177, -433, -433, -433, -433, 188, 201, -433, -433, 211,
+ -50, 22, 2049, -433, 2849, -433, 5, 3838, 1545, -433,
+ 2849, 2849, 202, 2849, -433, 3208, -433, 3249, 324, -433,
+ 215, 3838, 58, 217, 3290, -433, 279, 219, -433, -6,
+ 7, -433, -433, -433, 346, 9, 29, 29, 29, 222,
+ -433, 2149, 172, 3331, 223, 2849, 197, -34, 247, -433,
+ 117, -433, 2849, -433, -433, -433, -433, 2849, 2849, 2849,
+ 2849, 2849, 2849, 2849, 2849, 2849, 2849, 2849, 2849, 2849,
+ 2849, 2849, 2849, 2849, 2849, 2849, 41, -433, -433, -433,
+ 2249, 2849, 2849, 2849, 2849, 2849, 2849, 2849, 2849, 2849,
+ 2849, 2849, -433, -433, 2849, 2849, 53, 26, 3372, -433,
+ 121, 56, 226, -433, -50, -433, 3413, 3454, 2349, 2849,
+ -433, 286, 2849, 240, 375, 3838, 294, 932, 314, 3495,
+ -433, -433, -433, 316, -433, -433, -433, -433, 250, -433,
+ 2849, -433, -433, 15, -433, 628, 315, -433, 0, -433,
+ -433, -433, 34, 251, 261, -15, 29, 3700, 253, 381,
+ -51, -433, -433, 2949, 29, -433, -433, -433, 915, 779,
+ -433, -433, 322, -433, 287, 266, 268, -50, 22, 2849,
+ 3915, 2849, 2849, 2849, 2849, 1537, 1662, 1787, 1913, 1913,
+ 1913, 1913, 1158, 1158, 1158, 1158, 355, 355, 248, 248,
+ 248, 254, 254, 254, -433, -10, 2102, 2102, 2102, 2102,
+ 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2349, 50,
+ 3838, 262, 1727, -433, 266, -433, 2349, -433, 50, -433,
+ 385, 29, 272, 406, 35, 356, 3838, 277, 3536, -433,
+ -433, -433, -433, 407, 37, -433, -433, 278, -433, 1853,
+ -433, 628, 628, 284, 285, -433, -433, -433, 413, 29,
+ 291, -433, -433, -433, -433, 289, -433, 38, -433, -433,
+ -433, 2449, -433, 2549, -433, -433, 357, 369, 1979, 297,
+ 305, -433, -433, -433, -433, -433, -433, -433, 327, 322,
+ 310, -433, -433, -50, 3878, 2102, 3797, 2301, 2400, 41,
+ -433, 313, -433, 2849, -433, -433, -21, -433, -433, -433,
+ 317, -433, -433, 1545, -433, -433, 2649, -433, -433, 2849,
+ 2849, 29, 19, 628, 386, 1041, -12, 319, 361, -433,
+ -433, -433, 393, 628, 628, -433, -433, 29, -433, -15,
+ 452, 29, 3838, 29, 3741, 194, -433, 2849, -433, -433,
+ 325, 322, 326, 460, -433, -433, 2349, 2349, -433, -433,
+ -433, 3005, -433, 330, 2849, 2849, -433, -433, -433, -433,
+ 29, 40, 636, 2849, 1167, 329, 3838, 351, 29, 351,
+ -433, -433, 461, -433, -433, -433, 331, 334, -433, 30,
+ 339, -433, 360, 341, 476, -433, -433, -15, -433, 2849,
+ -433, -433, 2749, -433, -433, -433, 337, 545, 345, 460,
+ -433, 322, 604, 347, 348, 2849, 226, -433, -433, -433,
+ 342, 3072, 371, 31, -433, -433, 3577, -433, -433, -433,
+ -433, 19, 354, -433, 358, 628, 409, -433, 252, -433,
+ 170, -433, -433, 362, 496, 65, -433, 628, -433, 628,
+ -433, 43, 2102, 29, 3838, -433, 366, -433, 832, -433,
+ 434, -433, -433, -433, -433, -433, -433, -433, -433, -433,
+ -433, 414, 216, -433, 10, -433, -433, 2202, -433, 2349,
+ 392, -433, -433, 50, -433, -433, 190, 364, 430, 2849,
+ -433, -433, -433, -433, 372, 259, 374, 2849, -17, 192,
+ -433, 376, 23, 444, 505, 322, -433, 399, -433, -433,
+ -433, -433, 509, 451, -433, -433, 456, -433, 388, 50,
+ -433, -433, 221, 390, 1545, -433, -433, 389, 391, 1293,
+ 1293, -433, 394, -433, 3125, -433, -433, -433, -433, -433,
+ 85, 521, 628, -433, 628, 628, 524, 12, 324, 526,
+ -433, -433, 400, 515, 474, 2849, -433, -433, -433, -433,
+ -433, -433, -433, -433, -433, -433, 404, 470, 536, 628,
+ -433, 479, -433, -433, 628, 484, -433, 489, 628, 330,
+ 2849, -433, 419, 3618, 1419, 475, -433, 186, -433, 550,
+ 628, -433, 423, -433, 552, -433, -433, -433, 3659, 498,
+ -433, -433, -433, -433, -433, 426, 189, 628, -433, -433,
+ 628, 431, 567, 1545, 510, -433, -433, 454, -433, 30,
+ -433, -433, 457, -433, 462, -433, -433, 463, 158, 66,
+ -433, -433, -433, -433, 497, 465, 464, -433, 497, -433,
+ -433, 322, -433, -433, 528, 469, -433, 468, -433, 472,
+ -433
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -456, -456, -456, -456, -456, -149, -456, -456, 2, -456,
- -456, -456, -456, -456, -456, -456, -456, -456, -456, -456,
- -456, -456, -456, -456, -456, -456, -456, -456, -456, -456,
- -456, -456, -456, -456, -140, -456, -456, -456, 244, -456,
- 338, 341, -44, -456, -456, -456, -456, -456, -456, -456,
- -456, -456, -456, -456, 155, 128, 78, -456, -19, -456,
- -456, -456, -455, -456, -456, -21, -456, -456, -456, -456,
- -456, -456, -456, -105, -456, 18, -330, -456, -456, 374,
- -456, 109, -456, -456, -456, -456, -456, -456, -456, -456,
- 50, -456, -456, -456, -436, -456, -456, -32, -456, -456,
- -456, -456, -456, -456, -456, -456, -456, -456, -456, -456,
- -456, -456, -456, -23, -170, -456, -456, -456, -456, -456,
- -456, 105, -1, 111, -456, -456, -456, 133, -456, 21,
- 491, -332, -456, 316, -456, 308, -456, -456, -456, -456,
- -456, -49, -456, -161, -456, -456, -24, -4, -456, 165,
- -342, -456, -456, -456, -2, 134, 194, -456, -456, -456,
- 276, -456, -456, -456, -456, -456, -456, -456
+ -433, -433, -433, -433, -433, -199, -433, -433, 2, -433,
+ -433, -433, -433, -433, -433, -433, -433, -433, -433, -433,
+ -433, -433, -433, -433, -433, -433, -433, -433, -433, -433,
+ -433, -433, -433, -433, -153, -433, -433, -433, 227, -433,
+ 332, 335, -56, -433, -433, -433, -433, -433, -433, -433,
+ -433, -433, -433, -433, 142, 115, 67, -433, -33, -433,
+ -433, -433, -310, -433, -433, -35, -433, -433, -433, -433,
+ -433, -433, -433, -117, -433, 4, -315, -433, -433, 365,
+ -433, 94, -433, -433, -433, -433, -433, -433, -433, -433,
+ 39, -433, -433, -433, -432, -433, -433, 1, -433, -433,
+ -433, -433, -433, -433, -433, -433, -433, -433, -433, -433,
+ -433, -433, -433, -23, -194, -433, -433, -433, -433, -433,
+ -433, 99, -22, 72, -433, -433, -433, 116, -433, 16,
+ 477, -335, 288, 283, -433, -433, -433, -433, -433, -62,
+ -433, -176, -433, -433, -24, -7, -433, 154, -343, -433,
+ -433, -433, 42, 130, 204, -433, -433, -433, 265, -433,
+ -433, -433, -433, -433, -433, -433
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -350
+#define YYTABLE_NINF -348
static const yytype_int16 yytable[] =
{
- 120, 120, 129, 126, 497, 240, 75, 432, 264, 422,
- 657, 508, 267, 638, 150, 225, 697, 431, 380, 297,
- 435, 382, 130, -152, 131, 445, 101, 102, 225, 104,
- 105, 106, 107, 108, 109, 110, 325, 112, 113, 114,
- 115, 116, 117, 118, 460, 500, 124, -155, 460, 119,
- 625, 33, 420, 281, 562, 486, 225, 137, 282, 563,
- 119, 689, 33, 3, 145, 147, -2, 151, -153, 154,
- 297, 346, 103, 210, 211, 212, 213, 214, 215, 216,
- 217, 218, 219, 220, 221, 119, 132, 33, 134, 173,
- 139, 155, 626, 423, 228, 33, 119, 226, 33, 125,
- 296, 33, 33, 690, 617, 563, 621, -348, 368, 247,
- 226, 564, 119, 345, 33, 33, 283, 284, 285, -335,
- -335, 261, 158, 71, 229, 281, 658, 235, 509, -138,
- 282, 522, 230, 523, 71, -349, 120, 487, 226, 241,
- 242, 396, 265, 120, 120, 120, 268, 639, 535, 536,
- 698, 381, 156, 237, 383, 238, -152, 564, 446, 71,
- 547, 246, 151, 386, 250, 424, 525, 71, 526, 527,
- 71, 140, 33, 71, 71, 650, 298, 461, 299, 425,
- -155, 630, 129, 126, -286, 135, 71, 71, 425, 284,
- 285, 141, 278, 281, 159, 33, 290, 143, 282, 292,
- 397, -153, 130, 301, 131, 619, 620, 355, 306, 307,
- 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
- 318, 319, 320, 321, 322, 323, 324, 298, 298, 299,
- 299, 327, 328, 329, 330, 331, 332, 333, 334, 335,
- 336, 337, 338, 631, 227, 162, 341, 343, 208, 209,
- 481, 619, 620, 120, 120, 163, 622, 284, 285, 166,
- 151, 357, 120, 643, 359, 376, 291, 71, 645, 646,
- 408, 640, -23, -23, -23, -122, -122, -122, -120, -120,
- -120, 164, 370, 200, 201, 202, 203, 204, 205, 167,
- 206, 403, 203, 204, 205, 414, 206, 674, 675, 673,
- -180, 168, 660, 120, 169, 399, 170, 355, 583, 584,
- 585, 586, 587, 588, 171, 355, 618, 619, 620, 753,
- 754, 415, 175, 416, 417, 418, 419, -122, 178, 120,
- -120, 122, 122, -132, -132, -132, 298, 179, 299, 121,
- 123, 545, 654, 619, 620, 298, 180, 299, 176, 177,
- 223, 206, 224, 135, 152, 231, 558, 120, -286, 232,
- 151, 249, 234, 253, 255, 259, 257, 260, 151, 266,
- -156, 376, 376, 288, 275, 210, 211, 212, 213, 214,
- 215, 216, 217, 218, 219, 220, 221, 476, 293, 347,
- 360, 358, 361, 362, 364, 367, 129, 126, 379, 369,
- 610, 384, 394, 385, 393, 493, 407, 410, 412, 413,
- 429, 433, 436, 464, 437, 466, 130, 582, 131, 120,
- 120, -335, -335, 438, 583, 584, 585, 586, 587, 588,
- 589, 444, 449, 453, 455, 120, 491, 120, 454, 457,
- 120, 459, 120, 376, 425, 483, 355, 355, 506, 248,
- 476, 468, 469, 376, 376, 471, 473, 472, 151, 482,
- 504, 246, 498, 590, 477, 512, 511, 263, 488, 120,
- 513, 521, 530, 532, 271, 272, 274, 120, 533, 540,
- 425, 553, 552, 451, 452, 557, 559, 561, 568, 569,
- 529, 570, 571, 579, 577, 597, 120, 603, 550, 151,
- 151, 605, 598, -156, 613, 616, 614, 341, 543, 634,
- 581, 623, 688, 624, 636, 632, 548, 210, 211, 212,
- 213, 214, 215, 216, 217, 218, 219, 220, 221, 641,
- 120, 649, 707, 661, 648, 653, 663, 655, 709, 664,
- 666, 667, 574, 672, 668, 576, 671, 356, 677, 679,
- 691, 680, 120, 685, 721, 503, 376, 696, 599, 728,
- 700, 703, 702, -335, -335, 514, 517, 704, 376, 355,
- 376, 710, 712, 711, 722, 736, 714, 727, 717, 716,
- 729, 731, 732, -136, 387, 391, 737, 741, 372, 373,
- 742, 750, 745, 400, 744, 748, 749, 758, 751, 582,
- 752, 298, 763, 299, 665, 757, 583, 584, 585, 586,
- 587, 588, 589, 762, 767, 29, 30, 374, 768, 770,
- 764, 771, 151, 772, 456, 35, 699, 404, 531, 556,
- 405, 612, 246, 684, 421, 686, 746, 298, 371, 299,
- 656, 580, 662, 600, 637, 633, 256, 356, 678, 572,
- 262, 542, 719, 573, 520, 356, 0, 0, 0, 0,
- 391, 0, 0, 376, 0, 376, 376, 0, 615, 375,
- 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
- 628, 0, 629, 0, 0, 0, 0, 0, 271, 0,
- 376, 0, 0, 0, 0, 376, 0, 0, 705, 376,
- 0, 0, 0, 0, 0, 0, 0, 0, 725, 0,
- 0, 376, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 720, 0, 0, 0, 0, 376, 0,
- 0, 376, 0, 0, 0, 0, 0, 743, 0, 0,
- 765, 0, 0, 0, 0, 494, 0, 0, 0, 0,
- 499, 502, 210, 211, 212, 213, 214, 215, 216, 217,
- 218, 219, 220, 221, 0, 0, 518, 0, 387, 0,
- 0, 391, 0, 391, 0, 692, 0, 694, 695, 0,
- 0, 0, 0, 0, 0, 0, 356, 356, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, -335, -335,
- 391, 0, 713, 0, 0, 0, 0, 715, 555, 0,
- 0, 718, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 730, 0, 0, 0, 387, 0, 363,
+ 120, 120, 129, 126, 296, 431, 75, 495, 379, 655,
+ 395, 224, 324, 239, 506, 263, 434, 266, 636, 130,
+ 695, 101, 102, 421, 104, 105, 106, 107, 108, 109,
+ 110, 430, 112, 113, 114, 115, 116, 117, 118, 280,
+ 484, 124, 381, -152, 281, 444, 459, 150, -155, 155,
+ 498, 459, 137, 419, 296, 345, 119, 367, 33, 145,
+ 147, 119, 151, 33, 154, 119, 103, 33, 131, 396,
+ 3, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ 219, 220, 221, -2, 173, 132, 224, 224, 158, 162,
+ 119, 227, 33, 225, 561, 33, 623, -23, -23, -23,
+ 119, 561, 33, 283, 284, 208, 209, 385, -286, 135,
+ 156, 134, 125, 291, 33, 139, 687, -334, -334, 228,
+ 140, 422, 485, 33, 234, 656, 520, 229, 521, 33,
+ 71, 507, -132, -132, -132, 71, 120, 260, 624, 71,
+ 241, 380, 246, 120, 120, 120, 562, 240, 236, 264,
+ 237, 267, 637, 562, 696, 545, 245, 151, 688, 249,
+ 159, 533, 534, 424, 71, -346, -347, 226, 225, 225,
+ 163, -138, 424, 297, 71, 382, -152, 648, 445, 460,
+ 164, -155, 129, 126, 628, 141, 71, 277, 295, 143,
+ 33, 289, 344, 423, 33, 71, 175, 560, 300, 130,
+ 255, 71, 166, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 298, 297, 297, 479, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 629, 354,
+ 340, 342, 167, 375, 168, 280, 169, 615, 131, 619,
+ 281, 170, 120, 120, 151, 356, 643, 644, 358, 171,
+ 641, 120, 71, 617, 618, 523, 71, 524, 525, 407,
+ 280, 178, 298, 298, 179, 281, 369, 180, -122, -122,
+ -122, -120, -120, -120, 638, 617, 618, 672, 673, 543,
+ 402, 413, 222, 203, 204, 205, 671, 206, 223, 398,
+ 751, 752, 120, 206, 556, 135, 122, 122, 282, 283,
+ 284, 121, 123, -180, 620, 414, 230, 415, 416, 417,
+ 418, 581, 582, 583, 584, 585, 586, -286, 120, 152,
+ -122, 233, 297, -120, 283, 284, 658, 176, 177, 354,
+ 231, 297, 248, 290, 616, 617, 618, 354, 608, 375,
+ 375, 652, 617, 618, 151, 252, 120, 254, 258, 265,
+ 256, 259, 151, 274, -153, 292, 346, 287, 357, 210,
+ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
+ 221, 298, 359, 360, 361, 363, 474, 366, 378, 393,
+ 298, 368, 383, 406, 392, 129, 126, 200, 201, 202,
+ 203, 204, 205, 384, 206, 409, 411, 462, 412, 464,
+ 428, 432, 130, 435, 436, -334, -334, 437, 120, 120,
+ 443, 375, 448, 452, 247, 453, 454, 424, 466, 458,
+ 467, 375, 375, 456, 120, 489, 120, 491, 120, 481,
+ 120, 469, 262, 450, 451, 470, 471, 504, 474, 270,
+ 271, 273, 151, 475, 480, 245, 496, 502, 486, 509,
+ 686, 131, 510, 424, 511, 519, 528, 120, 531, 530,
+ 538, 550, 551, 557, 555, 120, 559, 354, 354, 566,
+ 705, 567, 568, 527, 569, 575, 707, 577, 595, 596,
+ 601, 603, 151, 151, 120, 611, 548, -153, 614, 612,
+ 340, 541, 719, 621, 622, 632, 646, 726, 579, 546,
+ 630, 634, 639, 647, 651, 501, 653, 661, 662, 659,
+ 664, 355, 665, 734, 666, 512, 515, 669, 120, 670,
+ 675, 677, 678, 375, 689, 572, 683, 694, 574, 698,
+ 700, 701, 702, 709, 747, 375, 749, 375, 708, 710,
+ 120, 597, 712, 755, 181, 182, 183, 714, 386, 390,
+ 715, 720, 725, 727, 729, 730, -136, 399, 735, 769,
+ 184, 739, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 740, 206, 742, 297, 743, 756, 746,
+ 354, 765, 663, 748, 761, 762, 455, 750, 420, 760,
+ 766, 768, 697, 529, 554, 151, 770, 682, 610, 684,
+ 403, 355, 744, 404, 578, 245, 660, 613, 370, 355,
+ 570, 635, 297, 654, 390, 598, 261, 717, 540, 626,
+ 375, 627, 375, 375, -156, 298, 676, 571, 0, 210,
+ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
+ 221, 0, 270, 518, 0, 0, 0, 375, 0, 0,
+ 371, 372, 375, 0, 0, 0, 375, 0, 0, 0,
+ 0, 298, 0, 0, 0, 0, 0, 0, 375, 0,
+ 0, 703, 0, 576, 0, -334, -334, 29, 30, 373,
+ 0, 0, 580, 0, 0, 375, 723, 35, 375, 581,
+ 582, 583, 584, 585, 586, 587, 718, 0, 0, 492,
+ 0, 0, 0, 0, 497, 500, 0, 0, 0, 0,
+ 0, 0, 0, 0, 690, 741, 692, 693, 763, 0,
+ 516, 0, 386, 0, 390, 0, 390, 0, 588, 0,
+ 0, 374, 62, 63, 64, 65, 66, 0, 0, 355,
+ 355, 711, 0, 0, 0, 0, 713, 0, 0, 0,
+ 716, 0, 0, 390, 0, 0, 0, -156, 0, 0,
+ 0, 553, 728, 0, 0, 0, 0, 0, 181, 182,
+ 183, 0, 5, 6, 7, 8, 9, 0, 0, 736,
+ 386, 10, 738, 0, 184, 0, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 0, 206, 0,
+ 0, 11, 12, 0, 500, 0, 0, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 28, 0, 390, 0, 29, 30,
+ 31, 32, 33, 0, 34, 0, 0, 0, 35, 36,
+ 37, 38, 0, 39, 0, 40, 0, 41, 0, 0,
+ 42, 0, 355, 0, 43, 44, 45, 0, 46, 47,
+ 0, 48, 49, 50, 0, 0, 0, 51, 52, 53,
+ 0, 54, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 5, 6,
+ 7, 8, 9, 405, 67, 0, 0, 10, 0, 68,
+ 580, 69, 70, 0, 71, 72, 73, 581, 582, 583,
+ 584, 585, 586, 587, 0, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 11, 12, 0,
+ 0, 0, 0, 13, 0, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 631, 25, 26, 27,
+ 28, 0, 0, 0, 29, 30, 31, 32, 33, 0,
+ 34, -334, -334, 0, 35, 36, 37, 38, 0, 39,
+ 0, 40, 0, 41, 0, 0, 42, 0, 0, 0,
+ 43, 44, 45, 0, 46, 47, 0, 48, 49, 50,
+ 0, 0, 362, 51, 52, 53, 0, 54, 55, 56,
+ 400, 58, 59, 0, 0, 0, 0, 60, 61, 62,
+ 63, 64, 65, 66, 5, 6, 7, 8, 9, 0,
+ 67, 0, 0, 10, 0, 68, 0, 69, 70, 0,
+ 71, 72, 73, 0, 0, 0, 0, 503, 0, 0,
+ 0, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ 219, 220, 221, 11, 12, 0, 0, 0, 0, 13,
+ 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 0, 25, 26, 27, 28, 0, 0, 0,
+ 29, 30, 31, 32, 33, 0, 34, -334, -334, 0,
+ 35, 36, 37, 38, 0, 39, 0, 40, 0, 41,
+ 0, 0, 42, 0, 0, 0, 43, 44, 0, 0,
+ 46, 47, 0, 48, 49, 50, 0, 0, 0, 0,
+ 0, 53, 0, 54, 55, 56, 0, 0, 0, 0,
+ 0, 0, 0, 60, 61, 62, 63, 64, 65, 66,
+ 5, 6, 7, 8, 9, 0, 67, 0, 0, 10,
+ 0, 68, 0, 69, 70, 0, 71, 72, 73, 0,
+ 0, 0, 0, 547, -348, -348, -348, -348, 198, 199,
+ 200, 201, 202, 203, 204, 205, 0, 206, 0, 11,
+ 12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 0, 25,
+ 26, 27, 28, 0, 0, 0, 29, 30, 31, 32,
+ 33, 0, 34, 0, 0, 0, 35, 36, 37, 38,
+ 0, 39, 0, 40, 0, 41, 0, 0, 42, 0,
+ 0, 0, 43, 44, 0, 0, 46, 47, 0, 48,
+ 49, 50, 0, 0, 0, 0, 0, 53, 0, 54,
+ 55, 56, 0, 0, 0, 0, 0, 0, 0, 60,
+ 61, 62, 63, 64, 65, 66, 5, 6, 7, 8,
+ 9, 0, 67, 0, 0, 10, 0, 68, 0, 69,
+ 70, 0, 71, 72, 73, 0, 0, 0, 0, 679,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 738, 0, 0, 740, 0, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
- 0, 502, 187, 188, 189, 190, 191, 192, 193, 194,
- 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
- 205, 0, 206, 391, 11, 12, 0, 0, 0, 0,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 28, 0, 356,
- 0, 29, 30, 31, 32, 33, 0, 34, 0, 0,
- 0, 35, 36, 37, 38, 0, 39, 0, 40, 0,
- 41, 0, 0, 42, 0, 0, 0, 43, 44, 45,
- 0, 46, 47, 0, 48, 49, 50, 0, 0, 0,
- 51, 52, 53, 0, 54, 55, 56, 57, 58, 59,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 5, 6, 7, 8, 9, 0, 67, 0, 0,
- 10, 0, 68, 0, 69, 70, 0, 71, 72, 73,
- 0, 0, 0, 0, 0, 0, 0, 0, 210, 211,
- 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
- 11, 12, 0, 0, 0, 0, 13, 0, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 0,
- 25, 26, 27, 28, 0, 0, 0, 29, 30, 31,
- 32, 33, 0, 34, -335, -335, 0, 35, 36, 37,
- 38, 0, 39, 0, 40, 0, 41, 0, 0, 42,
- 0, 0, 0, 43, 44, 45, 0, 46, 47, 0,
- 48, 49, 50, 0, 0, 0, 51, 52, 53, 0,
- 54, 55, 56, 401, 58, 59, 0, 0, 0, 0,
- 60, 61, 62, 63, 64, 65, 66, 5, 6, 7,
- 8, 9, 0, 67, 0, 0, 10, 0, 68, 0,
- 69, 70, 0, 71, 72, 73, 0, 0, 0, 0,
- 505, -350, -350, -350, -350, 198, 199, 200, 201, 202,
- 203, 204, 205, 0, 206, 0, 11, 12, 0, 0,
- 0, 0, 13, 0, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 0, 25, 26, 27, 28,
- 0, 0, 0, 29, 30, 31, 32, 33, 0, 34,
- 0, 0, 0, 35, 36, 37, 38, 0, 39, 0,
- 40, 0, 41, 0, 0, 42, 0, 0, 0, 43,
- 44, 0, 0, 46, 47, 0, 48, 49, 50, 0,
- 0, 0, 0, 0, 53, 0, 54, 55, 56, 0,
- 0, 0, 0, 0, 0, 0, 60, 61, 62, 63,
- 64, 65, 66, 5, 6, 7, 8, 9, 0, 67,
- 0, 0, 10, 0, 68, 0, 69, 70, 0, 71,
- 72, 73, 0, 0, 0, 0, 549, 0, 0, 0,
+ 0, 0, 0, 0, 0, 11, 12, 0, 0, 0,
+ 0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 0, 25, 26, 27, 28, 0,
+ 0, 0, 29, 30, 31, 32, 33, 0, 34, 0,
+ 0, 0, 35, 36, 37, 38, 0, 39, 0, 40,
+ 0, 41, 0, 0, 42, 0, 0, 0, 43, 44,
+ 0, 0, 46, 47, 0, 48, 49, 50, 0, 0,
+ 0, 0, 0, 53, 0, 54, 55, 56, 0, 0,
+ 0, 0, 0, 0, 0, 60, 61, 62, 63, 64,
+ 65, 66, 5, 6, 7, 8, 9, 0, 67, 0,
+ 0, 10, 0, 68, 0, 69, 70, 0, 71, 72,
+ 73, 0, 0, 0, 0, 722, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 11, 12, 0, 0, 0, 0, 13, 0,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 0, 25, 26, 27, 28, 0, 0, 0, 29,
- 30, 31, 32, 33, 0, 34, 0, 0, 0, 35,
- 36, 37, 38, 0, 39, 0, 40, 0, 41, 0,
- 0, 42, 0, 0, 0, 43, 44, 0, 0, 46,
- 47, 0, 48, 49, 50, 0, 0, 0, 0, 0,
- 53, 0, 54, 55, 56, 0, 0, 0, 0, 0,
- 0, 0, 60, 61, 62, 63, 64, 65, 66, 5,
- 6, 7, 8, 9, 0, 67, 0, 0, 10, 0,
- 68, 0, 69, 70, 0, 71, 72, 73, 0, 0,
- 0, 0, 681, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
- 0, 0, 0, 0, 13, 0, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 0, 25, 26,
- 27, 28, 0, 0, 0, 29, 30, 31, 32, 33,
- 0, 34, 0, 0, 0, 35, 36, 37, 38, 0,
- 39, 0, 40, 0, 41, 0, 0, 42, 0, 0,
- 0, 43, 44, 0, 0, 46, 47, 0, 48, 49,
- 50, 0, 0, 0, 0, 0, 53, 0, 54, 55,
- 56, 0, 0, 0, 0, 0, 0, 0, 60, 61,
- 62, 63, 64, 65, 66, 5, 6, 7, 8, 9,
- 0, 67, 0, 0, 10, 0, 68, 0, 69, 70,
- 0, 71, 72, 73, 0, 0, 0, 0, 724, 0,
+ 0, 11, 12, 0, 0, 0, 0, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 28, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 34, 0, 0, 0, 35, 36,
+ 37, 38, 0, 39, 0, 40, 0, 41, 0, 0,
+ 42, 0, 0, 0, 43, 44, 0, 0, 46, 47,
+ 0, 48, 49, 50, 0, 0, 0, 0, 0, 53,
+ 0, 54, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 5, 6,
+ 7, 8, 9, 0, 67, 0, 0, 10, 0, 68,
+ 0, 69, 70, 0, 71, 72, 73, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 0, 206, 11, 12, 0,
+ 0, 0, 0, 13, 0, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 0, 25, 26, 27,
+ 28, 0, 0, 0, 29, 30, 31, 32, 33, 0,
+ 34, 0, 0, 0, 35, 36, 37, 38, 0, 39,
+ 0, 40, 0, 41, 0, 0, 42, 0, 0, 0,
+ 43, 44, 0, 0, 46, 47, 0, 48, 49, 50,
+ 0, 0, 0, 0, 0, 53, 0, 54, 55, 56,
+ 0, 0, 0, 0, 0, 0, 0, 60, 61, 62,
+ 63, 64, 65, 66, 5, 6, 7, 8, 9, 0,
+ 67, 0, 0, 10, 0, 68, 0, 69, 70, 0,
+ 71, 72, 73, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 0, 206, 0, 11, 12, 0, 0, 0, 0, 13,
+ 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 0, 25, 26, 27, 181, 182, 183, 0,
+ 29, 30, 31, 32, 33, 0, 0, 0, 0, 0,
+ 35, 0, 184, 0, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 0, 206, 0, 0, 0,
+ 0, 0, 0, 0, 55, 56, 0, 0, 0, 0,
+ 0, 0, 0, 60, 61, 62, 63, 64, 65, 66,
+ 5, 6, 7, 8, 9, 0, 67, 0, 0, 10,
+ 0, 68, 0, 144, 0, 0, 71, 72, 73, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 0, 206, 0, 0, 11,
+ 12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 0, 25,
+ 26, 27, 181, 182, 183, 0, 29, 30, 31, 32,
+ 33, 429, 0, 0, 0, 0, 35, 0, 184, 0,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 0, 206, 0, 0, 0, 0, 0, 0, 0,
+ 55, 56, 0, 0, 0, 0, 0, 0, 0, 60,
+ 61, 62, 63, 64, 65, 66, 5, 6, 7, 8,
+ 9, 0, 67, 0, 0, 10, 0, 68, 0, 146,
+ 0, 0, 71, 72, 73, -348, -348, -348, -348, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 0, 206, 0, 0, 11, 12, 0, 0, 0,
+ 0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 0, 25, 26, 27, 181, 182,
+ 183, 0, 29, 30, 31, 32, 33, 449, 0, 0,
+ 0, 0, 35, 0, 184, 0, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 0, 206, 0,
+ 0, 0, 0, 0, 0, 0, 55, 56, 0, 0,
+ 0, 0, 0, 0, 0, 60, 61, 62, 63, 64,
+ 65, 66, 5, 6, 7, 8, 9, 0, 67, 0,
+ 0, 10, 0, 68, 0, 149, 0, 0, 71, 72,
+ 73, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 12, 0, 0, 0, 0,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 28, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 34, 0, 0,
- 0, 35, 36, 37, 38, 0, 39, 0, 40, 0,
- 41, 0, 0, 42, 0, 0, 0, 43, 44, 0,
- 0, 46, 47, 0, 48, 49, 50, 0, 0, 0,
- 0, 0, 53, 0, 54, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 5, 6, 7, 8, 9, 0, 67, 0, 0,
- 10, 0, 68, 0, 69, 70, 0, 71, 72, 73,
- 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
- 198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
- 11, 12, 0, 0, 0, 0, 13, 0, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 0,
- 25, 26, 27, 28, 0, 0, 0, 29, 30, 31,
- 32, 33, 0, 34, 0, 0, 0, 35, 36, 37,
- 38, 0, 39, 0, 40, 0, 41, 0, 0, 42,
- 0, 0, 0, 43, 44, 0, 0, 46, 47, 0,
- 48, 49, 50, 0, 0, 0, 0, 0, 53, 0,
- 54, 55, 56, 0, 0, 0, 0, 0, 0, 0,
- 60, 61, 62, 63, 64, 65, 66, 5, 6, 7,
- 8, 9, 0, 67, 0, 0, 10, 0, 68, 0,
- 69, 70, 0, 71, 72, 73, 189, 190, 191, 192,
- 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
- 203, 204, 205, 0, 206, 0, 11, 12, 0, 0,
- 0, 0, 13, 0, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 0, 25, 26, 27, 181,
- 182, 183, 0, 29, 30, 31, 32, 33, 0, 0,
- 0, 0, 0, 35, 0, 184, 0, 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
- 198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
- 0, 0, 0, 0, 0, 0, 0, 55, 56, 0,
- 0, 0, 0, 0, 0, 0, 60, 61, 62, 63,
- 64, 65, 66, 5, 6, 7, 8, 9, 0, 67,
- 0, 0, 10, 0, 68, 0, 144, 0, 0, 71,
- 72, 73, 190, 191, 192, 193, 194, 195, 196, 197,
- 198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
- 0, 0, 11, 12, 0, 0, 0, 0, 13, 0,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 0, 25, 26, 27, 181, 182, 183, 0, 29,
- 30, 31, 32, 33, 0, 0, 0, 0, 578, 35,
- 0, 184, 0, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
- 202, 203, 204, 205, 0, 206, 0, 0, 0, 0,
- 0, 0, 0, 55, 56, 0, 0, 0, 0, 0,
- 0, 0, 60, 61, 62, 63, 64, 65, 66, 5,
- 6, 7, 8, 9, 0, 67, 0, 0, 10, 0,
- 68, 0, 146, 0, 0, 71, 72, 73, -350, -350,
- -350, -350, 194, 195, 196, 197, 198, 199, 200, 201,
- 202, 203, 204, 205, 0, 206, 0, 0, 11, 12,
- 0, 0, 0, 0, 13, 0, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 0, 25, 26,
- 27, 181, 182, 183, 0, 29, 30, 31, 32, 33,
- 406, 0, 0, 0, 0, 35, 0, 184, 0, 185,
+ 0, 11, 12, 0, 0, 0, 0, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 468, 0, 0, 0, 184, 35, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 0, 206, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 276, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 235, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 0, 0, 35, 185,
186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
- 0, 206, 0, 0, 0, 0, 0, 0, 0, 55,
- 56, 0, 0, 0, 0, 0, 0, 0, 60, 61,
- 62, 63, 64, 65, 66, 5, 6, 7, 8, 9,
- 0, 67, 0, 0, 10, 0, 68, 0, 149, 0,
- 0, 71, 72, 73, 0, 0, 0, 0, 0, 0,
+ 0, 206, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 325, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 0, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 0, 0, 35, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 0,
+ 206, 0, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 351, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 0, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 0, 0, 35, 187,
+ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
+ 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 461, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 0, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 0, 0, 35, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 12, 0, 0, 0, 0,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 430, 0, 0, 0,
- 184, 35, 185, 186, 187, 188, 189, 190, 191, 192,
- 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
- 203, 204, 205, 0, 206, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 277, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 236, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 0, 0, 0,
- 0, 35, 185, 186, 187, 188, 189, 190, 191, 192,
- 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
- 203, 204, 205, 0, 206, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 326, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 0, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 0, 0, 0,
- 0, 35, 186, 187, 188, 189, 190, 191, 192, 193,
- 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
- 204, 205, 0, 206, 0, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 352, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 0, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 463, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 0, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 463, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 0, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 0, 0, 35, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 465, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 0, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 492, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 0, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 490, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 0, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 0, 0, 35, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 575, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 0, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 0, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 0, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 573, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 0, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 0, 0, 35, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 10, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 0, 0, 0, 0, 67, 0, 0,
- 0, 0, 68, 0, 11, 12, 0, 71, 72, 73,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 181, 182, 183,
- 0, 29, 30, 31, 398, 33, 0, 0, 0, 0,
- 0, 35, 0, 184, 0, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
- 200, 201, 202, 203, 204, 205, 0, 206, 0, 0,
- 0, 0, 0, 0, 0, 55, 56, 0, 0, 0,
- 0, 0, 0, 0, 60, 61, 62, 63, 64, 65,
- 66, 0, 0, 0, 181, 182, 183, 67, 0, 0,
- 0, 0, 68, 0, 0, 0, 0, 71, 72, 73,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 0, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 0, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
+ 31, 32, 33, 0, 0, 0, 0, 0, 35, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
+ 0, 10, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 0, 0, 0, 0, 67, 0, 0, 0, 0, 68,
+ 0, 11, 12, 0, 71, 72, 73, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 25, 26, 27, 181, 182, 183, 0, 29, 30,
+ 31, 397, 33, 0, 0, 0, 0, 0, 35, 0,
184, 0, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
203, 204, 205, 0, 206, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 181, 182, 183, 0, 0,
+ 0, 0, 55, 56, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 0, 181, 182, 183, 67, 0, 0, 0, 0, 68,
+ 0, 0, 0, 0, 71, 72, 73, 184, 0, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 0, 206, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 181, 182, 183, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 537,
+ 184, 655, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 0, 206, 181, 182, 183, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 184, 450, 185, 186, 187, 188, 189, 190, 191,
+ 0, 184, 0, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
- 202, 203, 204, 205, 0, 206, 181, 182, 183, 0,
+ 202, 203, 204, 205, 0, 206, 602, 181, 182, 183,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 184, 0, 185, 186, 187, 188, 189, 190,
- 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
- 201, 202, 203, 204, 205, 0, 206, 0, 0, 470,
+ 0, 0, 0, 184, 0, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 0, 206, 181, 182,
+ 183, 0, 0, 0, 0, 0, 0, 656, 0, 0,
+ 0, 0, 0, 0, 184, 0, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 0, 206, 181,
+ 182, 183, 0, 0, 0, 0, 0, 0, 207, 0,
+ 0, 0, 0, 0, 0, 184, 0, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
181, 182, 183, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 184, 657, 185, 186,
+ 250, 0, 0, 0, 0, 0, 184, 0, 185, 186,
187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
197, 198, 199, 200, 201, 202, 203, 204, 205, 0,
206, 181, 182, 183, 0, 0, 0, 0, 0, 0,
- 539, 0, 0, 0, 0, 0, 0, 184, 0, 185,
+ 0, 251, 0, 0, 0, 0, 0, 184, 0, 185,
186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
0, 206, 181, 182, 183, 0, 0, 0, 0, 0,
- 0, 604, 0, 0, 0, 0, 0, 0, 184, 0,
+ 0, 0, 257, 0, 0, 0, 0, 0, 184, 0,
185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
205, 0, 206, 181, 182, 183, 0, 0, 0, 0,
- 0, 0, 0, 658, 0, 0, 0, 0, 0, 184,
+ 0, 0, 286, 0, 0, 0, 0, 0, 0, 184,
0, 185, 186, 187, 188, 189, 190, 191, 192, 193,
194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
204, 205, 0, 206, 181, 182, 183, 0, 0, 0,
- 0, 0, 0, 0, 207, 0, 0, 0, 0, 0,
+ 0, 0, 0, 343, 0, 0, 0, 0, 0, 0,
184, 0, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
203, 204, 205, 0, 206, 181, 182, 183, 0, 0,
- 0, 0, 0, 0, 0, 251, 0, 0, 0, 0,
+ 0, 0, 0, 0, 349, 0, 0, 0, 0, 0,
0, 184, 0, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
202, 203, 204, 205, 0, 206, 181, 182, 183, 0,
- 0, 0, 0, 0, 0, 0, 252, 0, 0, 0,
+ 0, 0, 0, 0, 0, 350, 0, 0, 0, 0,
0, 0, 184, 0, 185, 186, 187, 188, 189, 190,
191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
201, 202, 203, 204, 205, 0, 206, 181, 182, 183,
- 0, 0, 0, 0, 0, 0, 0, 258, 0, 0,
+ 0, 0, 0, 0, 0, 0, 365, 0, 0, 0,
0, 0, 0, 184, 0, 185, 186, 187, 188, 189,
190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
200, 201, 202, 203, 204, 205, 0, 206, 181, 182,
- 183, 0, 0, 0, 0, 0, 0, 287, 0, 0,
+ 183, 0, 0, 0, 0, 0, 0, 438, 0, 0,
0, 0, 0, 0, 184, 0, 185, 186, 187, 188,
189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
199, 200, 201, 202, 203, 204, 205, 0, 206, 181,
- 182, 183, 0, 0, 0, 0, 0, 0, 344, 0,
+ 182, 183, 0, 0, 0, 0, 0, 0, 607, 0,
0, 0, 0, 0, 0, 184, 0, 185, 186, 187,
188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
- 181, 182, 183, 0, 0, 0, 0, 0, 0, 350,
+ 181, 182, 183, 0, 0, 0, 0, 0, 0, 721,
0, 0, 0, 0, 0, 0, 184, 0, 185, 186,
187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
197, 198, 199, 200, 201, 202, 203, 204, 205, 0,
- 206, 181, 182, 183, 0, 0, 0, 0, 0, 0,
- 351, 0, 0, 0, 0, 0, 0, 184, 0, 185,
- 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
- 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
- 0, 206, 181, 182, 183, 0, 0, 0, 0, 0,
- 0, 366, 0, 0, 0, 0, 0, 0, 184, 0,
- 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
- 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
- 205, 0, 206, 181, 182, 183, 0, 0, 0, 0,
- 0, 0, 439, 0, 0, 0, 0, 0, 0, 184,
- 0, 185, 186, 187, 188, 189, 190, 191, 192, 193,
- 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
- 204, 205, 0, 206, 181, 182, 183, 0, 0, 0,
- 0, 0, 0, 609, 0, 0, 0, 0, 0, 0,
+ 206, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 732, 0, 0, 0, 0, 0, 181, 182, 183, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 391, 184, 478, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 0, 206, 181, 182, 183,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 522, 184, 0, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 0, 206, 182, 183,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 184, 0, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 183, 206, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
184, 0, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
- 203, 204, 205, 0, 206, 181, 182, 183, 0, 0,
- 0, 0, 0, 0, 723, 0, 0, 0, 0, 0,
- 0, 184, 0, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
- 202, 203, 204, 205, 0, 206, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 734, 0, 0, 0, 0,
- 0, 181, 182, 183, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 392, 184, 480, 185,
- 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
- 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
- 0, 206, 181, 182, 183, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 524, 184, 0,
- 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
- 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
- 205, 0, 206, 182, 183, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 184, 0,
- 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
- 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
- 205, 183, 206, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 184, 0, 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
- 198, 199, 200, 201, 202, 203, 204, 205, 0, 206
+ 203, 204, 205, 0, 206
};
static const yytype_int16 yycheck[] =
{
- 23, 24, 26, 26, 440, 8, 4, 349, 8, 339,
- 26, 26, 8, 8, 46, 61, 8, 347, 8, 180,
- 352, 8, 26, 8, 26, 8, 5, 6, 61, 8,
- 9, 10, 11, 12, 13, 14, 206, 16, 17, 18,
- 19, 20, 21, 22, 8, 31, 25, 8, 8, 71,
- 31, 73, 63, 73, 509, 61, 61, 36, 78, 71,
- 71, 31, 73, 0, 43, 44, 0, 46, 8, 48,
- 231, 232, 140, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 71, 140, 73, 140, 68,
- 140, 79, 73, 71, 98, 73, 71, 143, 73, 71,
- 71, 73, 73, 73, 559, 71, 561, 140, 257, 141,
- 143, 123, 71, 71, 73, 73, 136, 137, 138, 59,
- 60, 143, 73, 145, 103, 73, 142, 131, 143, 141,
- 78, 463, 111, 465, 145, 140, 159, 143, 143, 142,
- 138, 61, 142, 166, 167, 168, 142, 142, 478, 479,
- 142, 141, 140, 132, 141, 134, 141, 123, 141, 145,
- 492, 140, 141, 122, 143, 143, 71, 145, 73, 74,
- 145, 140, 73, 145, 145, 611, 180, 141, 180, 340,
- 141, 141, 206, 206, 139, 140, 145, 145, 349, 137,
- 138, 140, 171, 73, 145, 73, 175, 140, 78, 147,
- 120, 141, 206, 182, 206, 93, 94, 239, 187, 188,
- 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
- 199, 200, 201, 202, 203, 204, 205, 231, 232, 231,
- 232, 210, 211, 212, 213, 214, 215, 216, 217, 218,
- 219, 220, 221, 575, 145, 116, 225, 226, 59, 60,
- 420, 93, 94, 276, 277, 116, 144, 137, 138, 140,
- 239, 240, 285, 605, 243, 266, 146, 145, 66, 67,
- 293, 601, 66, 67, 68, 92, 93, 94, 92, 93,
- 94, 73, 261, 42, 43, 44, 45, 46, 47, 140,
- 49, 289, 45, 46, 47, 299, 49, 66, 67, 641,
- 97, 140, 144, 326, 140, 284, 140, 339, 105, 106,
- 107, 108, 109, 110, 140, 347, 92, 93, 94, 142,
- 143, 300, 143, 302, 303, 304, 305, 144, 71, 352,
- 144, 23, 24, 66, 67, 68, 340, 71, 340, 23,
- 24, 490, 92, 93, 94, 349, 139, 349, 72, 73,
- 140, 49, 120, 140, 46, 139, 505, 380, 139, 139,
- 339, 140, 120, 31, 142, 79, 143, 142, 347, 13,
- 8, 372, 373, 144, 141, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 410, 118, 140,
- 142, 82, 8, 90, 71, 71, 420, 420, 73, 141,
- 549, 141, 8, 142, 141, 437, 71, 118, 140, 140,
- 148, 26, 141, 392, 8, 394, 420, 98, 420, 442,
- 443, 59, 60, 140, 105, 106, 107, 108, 109, 110,
- 111, 13, 144, 139, 13, 458, 434, 460, 140, 142,
- 463, 140, 465, 444, 605, 424, 478, 479, 446, 141,
- 473, 71, 61, 454, 455, 144, 119, 140, 437, 141,
- 71, 440, 441, 144, 143, 101, 140, 159, 141, 492,
- 71, 13, 141, 143, 166, 167, 168, 500, 8, 140,
- 641, 121, 142, 372, 373, 13, 142, 142, 140, 121,
- 469, 141, 8, 142, 148, 141, 519, 148, 496, 478,
- 479, 120, 141, 141, 141, 89, 141, 486, 487, 71,
- 533, 141, 661, 8, 97, 144, 495, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 120,
- 553, 83, 681, 143, 142, 142, 73, 142, 687, 13,
- 121, 13, 521, 141, 73, 524, 71, 239, 140, 142,
- 13, 141, 575, 142, 703, 444, 557, 13, 537, 708,
- 13, 26, 140, 59, 60, 454, 455, 68, 569, 601,
- 571, 144, 13, 73, 142, 724, 73, 87, 71, 73,
- 13, 141, 13, 68, 276, 277, 142, 140, 42, 43,
- 26, 141, 143, 285, 85, 142, 745, 101, 747, 98,
- 144, 605, 140, 605, 627, 754, 105, 106, 107, 108,
- 109, 110, 111, 144, 73, 69, 70, 71, 141, 143,
- 760, 770, 601, 144, 380, 79, 670, 289, 473, 501,
- 289, 553, 611, 652, 326, 656, 741, 641, 264, 641,
- 619, 532, 624, 538, 594, 144, 142, 339, 646, 516,
- 159, 486, 701, 519, 460, 347, -1, -1, -1, -1,
- 352, -1, -1, 664, -1, 666, 667, -1, 557, 123,
- 124, 125, 126, 127, 128, -1, -1, -1, -1, -1,
- 569, -1, 571, -1, -1, -1, -1, -1, 380, -1,
- 691, -1, -1, -1, -1, 696, -1, -1, 677, 700,
- -1, -1, -1, -1, -1, -1, -1, -1, 706, -1,
- -1, 712, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 702, -1, -1, -1, -1, 729, -1,
- -1, 732, -1, -1, -1, -1, -1, 735, -1, -1,
- 763, -1, -1, -1, -1, 437, -1, -1, -1, -1,
- 442, 443, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, -1, -1, 458, -1, 460, -1,
- -1, 463, -1, 465, -1, 664, -1, 666, 667, -1,
- -1, -1, -1, -1, -1, -1, 478, 479, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 59, 60,
- 492, -1, 691, -1, -1, -1, -1, 696, 500, -1,
- -1, 700, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 712, -1, -1, -1, 519, -1, 90,
+ 23, 24, 26, 26, 180, 348, 4, 439, 8, 26,
+ 61, 61, 206, 8, 26, 8, 351, 8, 8, 26,
+ 8, 5, 6, 338, 8, 9, 10, 11, 12, 13,
+ 14, 346, 16, 17, 18, 19, 20, 21, 22, 73,
+ 61, 25, 8, 8, 78, 8, 8, 46, 8, 79,
+ 31, 8, 36, 63, 230, 231, 71, 256, 73, 43,
+ 44, 71, 46, 73, 48, 71, 140, 73, 26, 120,
+ 0, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 0, 68, 140, 61, 61, 73, 116,
+ 71, 98, 73, 143, 71, 73, 31, 66, 67, 68,
+ 71, 71, 73, 137, 138, 59, 60, 122, 139, 140,
+ 140, 140, 71, 147, 73, 140, 31, 59, 60, 103,
+ 140, 71, 143, 73, 131, 142, 461, 111, 463, 73,
+ 145, 143, 66, 67, 68, 145, 159, 143, 73, 145,
+ 138, 141, 141, 166, 167, 168, 123, 142, 132, 142,
+ 134, 142, 142, 123, 142, 490, 140, 141, 73, 143,
+ 145, 476, 477, 339, 145, 140, 140, 145, 143, 143,
+ 116, 141, 348, 180, 145, 141, 141, 609, 141, 141,
+ 73, 141, 206, 206, 141, 140, 145, 171, 71, 140,
+ 73, 175, 71, 143, 73, 145, 143, 507, 182, 206,
+ 142, 145, 140, 187, 188, 189, 190, 191, 192, 193,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 180, 230, 231, 419, 210, 211, 212, 213,
+ 214, 215, 216, 217, 218, 219, 220, 221, 573, 238,
+ 224, 225, 140, 265, 140, 73, 140, 557, 206, 559,
+ 78, 140, 275, 276, 238, 239, 66, 67, 242, 140,
+ 603, 284, 145, 93, 94, 71, 145, 73, 74, 292,
+ 73, 71, 230, 231, 71, 78, 260, 139, 92, 93,
+ 94, 92, 93, 94, 599, 93, 94, 66, 67, 488,
+ 288, 298, 140, 45, 46, 47, 639, 49, 120, 283,
+ 142, 143, 325, 49, 503, 140, 23, 24, 136, 137,
+ 138, 23, 24, 97, 144, 299, 139, 301, 302, 303,
+ 304, 105, 106, 107, 108, 109, 110, 139, 351, 46,
+ 144, 120, 339, 144, 137, 138, 144, 72, 73, 338,
+ 139, 348, 140, 146, 92, 93, 94, 346, 547, 371,
+ 372, 92, 93, 94, 338, 31, 379, 142, 79, 13,
+ 143, 142, 346, 141, 8, 118, 140, 144, 82, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 339, 142, 8, 90, 71, 409, 71, 73, 8,
+ 348, 141, 141, 71, 141, 419, 419, 42, 43, 44,
+ 45, 46, 47, 142, 49, 118, 140, 391, 140, 393,
+ 148, 26, 419, 141, 8, 59, 60, 140, 441, 442,
+ 13, 443, 144, 139, 141, 140, 13, 603, 71, 140,
+ 61, 453, 454, 142, 457, 433, 459, 436, 461, 423,
+ 463, 144, 159, 371, 372, 140, 119, 445, 471, 166,
+ 167, 168, 436, 143, 141, 439, 440, 71, 141, 140,
+ 659, 419, 101, 639, 71, 13, 141, 490, 8, 143,
+ 140, 142, 121, 142, 13, 498, 142, 476, 477, 140,
+ 679, 121, 141, 467, 8, 148, 685, 142, 141, 141,
+ 148, 120, 476, 477, 517, 141, 494, 141, 89, 141,
+ 484, 485, 701, 141, 8, 71, 142, 706, 531, 493,
+ 144, 97, 120, 83, 142, 443, 142, 73, 13, 143,
+ 121, 238, 13, 722, 73, 453, 454, 71, 551, 141,
+ 140, 142, 141, 555, 13, 519, 142, 13, 522, 13,
+ 140, 26, 68, 73, 743, 567, 745, 569, 144, 13,
+ 573, 535, 73, 752, 9, 10, 11, 73, 275, 276,
+ 71, 142, 87, 13, 141, 13, 68, 284, 142, 768,
+ 25, 140, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 26, 49, 85, 603, 143, 101, 142,
+ 599, 73, 625, 141, 140, 758, 379, 144, 325, 144,
+ 141, 143, 668, 471, 499, 599, 144, 650, 551, 654,
+ 288, 338, 739, 288, 530, 609, 622, 555, 263, 346,
+ 514, 592, 639, 617, 351, 536, 159, 699, 484, 567,
+ 662, 569, 664, 665, 8, 603, 644, 517, -1, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, -1, 379, 459, -1, -1, -1, 689, -1, -1,
+ 42, 43, 694, -1, -1, -1, 698, -1, -1, -1,
+ -1, 639, -1, -1, -1, -1, -1, -1, 710, -1,
+ -1, 675, -1, 148, -1, 59, 60, 69, 70, 71,
+ -1, -1, 98, -1, -1, 727, 704, 79, 730, 105,
+ 106, 107, 108, 109, 110, 111, 700, -1, -1, 436,
+ -1, -1, -1, -1, 441, 442, -1, -1, -1, -1,
+ -1, -1, -1, -1, 662, 733, 664, 665, 761, -1,
+ 457, -1, 459, -1, 461, -1, 463, -1, 144, -1,
+ -1, 123, 124, 125, 126, 127, 128, -1, -1, 476,
+ 477, 689, -1, -1, -1, -1, 694, -1, -1, -1,
+ 698, -1, -1, 490, -1, -1, -1, 141, -1, -1,
+ -1, 498, 710, -1, -1, -1, -1, -1, 9, 10,
+ 11, -1, 3, 4, 5, 6, 7, -1, -1, 727,
+ 517, 12, 730, -1, 25, -1, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, -1, 49, -1,
+ -1, 42, 43, -1, 551, -1, -1, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, 65, -1, 573, -1, 69, 70,
+ 71, 72, 73, -1, 75, -1, -1, -1, 79, 80,
+ 81, 82, -1, 84, -1, 86, -1, 88, -1, -1,
+ 91, -1, 599, -1, 95, 96, 97, -1, 99, 100,
+ -1, 102, 103, 104, -1, -1, -1, 108, 109, 110,
+ -1, 112, 113, 114, 115, 116, 117, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, 3, 4,
+ 5, 6, 7, 144, 135, -1, -1, 12, -1, 140,
+ 98, 142, 143, -1, 145, 146, 147, 105, 106, 107,
+ 108, 109, 110, 111, -1, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 42, 43, -1,
+ -1, -1, -1, 48, -1, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 144, 62, 63, 64,
+ 65, -1, -1, -1, 69, 70, 71, 72, 73, -1,
+ 75, 59, 60, -1, 79, 80, 81, 82, -1, 84,
+ -1, 86, -1, 88, -1, -1, 91, -1, -1, -1,
+ 95, 96, 97, -1, 99, 100, -1, 102, 103, 104,
+ -1, -1, 90, 108, 109, 110, -1, 112, 113, 114,
+ 115, 116, 117, -1, -1, -1, -1, 122, 123, 124,
+ 125, 126, 127, 128, 3, 4, 5, 6, 7, -1,
+ 135, -1, -1, 12, -1, 140, -1, 142, 143, -1,
+ 145, 146, 147, -1, -1, -1, -1, 26, -1, -1,
+ -1, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 42, 43, -1, -1, -1, -1, 48,
+ -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, -1, 62, 63, 64, 65, -1, -1, -1,
+ 69, 70, 71, 72, 73, -1, 75, 59, 60, -1,
+ 79, 80, 81, 82, -1, 84, -1, 86, -1, 88,
+ -1, -1, 91, -1, -1, -1, 95, 96, -1, -1,
+ 99, 100, -1, 102, 103, 104, -1, -1, -1, -1,
+ -1, 110, -1, 112, 113, 114, -1, -1, -1, -1,
+ -1, -1, -1, 122, 123, 124, 125, 126, 127, 128,
+ 3, 4, 5, 6, 7, -1, 135, -1, -1, 12,
+ -1, 140, -1, 142, 143, -1, 145, 146, 147, -1,
+ -1, -1, -1, 26, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, -1, 49, -1, 42,
+ 43, -1, -1, -1, -1, 48, -1, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
+ 63, 64, 65, -1, -1, -1, 69, 70, 71, 72,
+ 73, -1, 75, -1, -1, -1, 79, 80, 81, 82,
+ -1, 84, -1, 86, -1, 88, -1, -1, 91, -1,
+ -1, -1, 95, 96, -1, -1, 99, 100, -1, 102,
+ 103, 104, -1, -1, -1, -1, -1, 110, -1, 112,
+ 113, 114, -1, -1, -1, -1, -1, -1, -1, 122,
+ 123, 124, 125, 126, 127, 128, 3, 4, 5, 6,
+ 7, -1, 135, -1, -1, 12, -1, 140, -1, 142,
+ 143, -1, 145, 146, 147, -1, -1, -1, -1, 26,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 729, -1, -1, 732, -1, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, -1, -1, -1, -1, -1,
- -1, 553, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 575, 42, 43, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, 65, -1, 601,
- -1, 69, 70, 71, 72, 73, -1, 75, -1, -1,
- -1, 79, 80, 81, 82, -1, 84, -1, 86, -1,
- 88, -1, -1, 91, -1, -1, -1, 95, 96, 97,
- -1, 99, 100, -1, 102, 103, 104, -1, -1, -1,
- 108, 109, 110, -1, 112, 113, 114, 115, 116, 117,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, 3, 4, 5, 6, 7, -1, 135, -1, -1,
- 12, -1, 140, -1, 142, 143, -1, 145, 146, 147,
- -1, -1, -1, -1, -1, -1, -1, -1, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 42, 43, -1, -1, -1, -1, 48, -1, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
- 62, 63, 64, 65, -1, -1, -1, 69, 70, 71,
- 72, 73, -1, 75, 59, 60, -1, 79, 80, 81,
- 82, -1, 84, -1, 86, -1, 88, -1, -1, 91,
- -1, -1, -1, 95, 96, 97, -1, 99, 100, -1,
- 102, 103, 104, -1, -1, -1, 108, 109, 110, -1,
- 112, 113, 114, 115, 116, 117, -1, -1, -1, -1,
- 122, 123, 124, 125, 126, 127, 128, 3, 4, 5,
- 6, 7, -1, 135, -1, -1, 12, -1, 140, -1,
- 142, 143, -1, 145, 146, 147, -1, -1, -1, -1,
- 26, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, -1, 42, 43, -1, -1,
- -1, -1, 48, -1, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, -1, 62, 63, 64, 65,
- -1, -1, -1, 69, 70, 71, 72, 73, -1, 75,
- -1, -1, -1, 79, 80, 81, 82, -1, 84, -1,
- 86, -1, 88, -1, -1, 91, -1, -1, -1, 95,
- 96, -1, -1, 99, 100, -1, 102, 103, 104, -1,
- -1, -1, -1, -1, 110, -1, 112, 113, 114, -1,
- -1, -1, -1, -1, -1, -1, 122, 123, 124, 125,
- 126, 127, 128, 3, 4, 5, 6, 7, -1, 135,
- -1, -1, 12, -1, 140, -1, 142, 143, -1, 145,
- 146, 147, -1, -1, -1, -1, 26, -1, -1, -1,
+ -1, -1, -1, -1, -1, 42, 43, -1, -1, -1,
+ -1, 48, -1, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, -1, 62, 63, 64, 65, -1,
+ -1, -1, 69, 70, 71, 72, 73, -1, 75, -1,
+ -1, -1, 79, 80, 81, 82, -1, 84, -1, 86,
+ -1, 88, -1, -1, 91, -1, -1, -1, 95, 96,
+ -1, -1, 99, 100, -1, 102, 103, 104, -1, -1,
+ -1, -1, -1, 110, -1, 112, 113, 114, -1, -1,
+ -1, -1, -1, -1, -1, 122, 123, 124, 125, 126,
+ 127, 128, 3, 4, 5, 6, 7, -1, 135, -1,
+ -1, 12, -1, 140, -1, 142, 143, -1, 145, 146,
+ 147, -1, -1, -1, -1, 26, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, -1, 62, 63, 64, 65, -1, -1, -1, 69,
- 70, 71, 72, 73, -1, 75, -1, -1, -1, 79,
- 80, 81, 82, -1, 84, -1, 86, -1, 88, -1,
- -1, 91, -1, -1, -1, 95, 96, -1, -1, 99,
- 100, -1, 102, 103, 104, -1, -1, -1, -1, -1,
- 110, -1, 112, 113, 114, -1, -1, -1, -1, -1,
- -1, -1, 122, 123, 124, 125, 126, 127, 128, 3,
- 4, 5, 6, 7, -1, 135, -1, -1, 12, -1,
- 140, -1, 142, 143, -1, 145, 146, 147, -1, -1,
- -1, -1, 26, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 42, 43,
- -1, -1, -1, -1, 48, -1, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, -1, 62, 63,
- 64, 65, -1, -1, -1, 69, 70, 71, 72, 73,
- -1, 75, -1, -1, -1, 79, 80, 81, 82, -1,
- 84, -1, 86, -1, 88, -1, -1, 91, -1, -1,
- -1, 95, 96, -1, -1, 99, 100, -1, 102, 103,
- 104, -1, -1, -1, -1, -1, 110, -1, 112, 113,
- 114, -1, -1, -1, -1, -1, -1, -1, 122, 123,
- 124, 125, 126, 127, 128, 3, 4, 5, 6, 7,
- -1, 135, -1, -1, 12, -1, 140, -1, 142, 143,
- -1, 145, 146, 147, -1, -1, -1, -1, 26, -1,
+ -1, 42, 43, -1, -1, -1, -1, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, 65, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, 75, -1, -1, -1, 79, 80,
+ 81, 82, -1, 84, -1, 86, -1, 88, -1, -1,
+ 91, -1, -1, -1, 95, 96, -1, -1, 99, 100,
+ -1, 102, 103, 104, -1, -1, -1, -1, -1, 110,
+ -1, 112, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, 3, 4,
+ 5, 6, 7, -1, 135, -1, -1, 12, -1, 140,
+ -1, 142, 143, -1, 145, 146, 147, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, 42, 43, -1,
+ -1, -1, -1, 48, -1, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
+ 65, -1, -1, -1, 69, 70, 71, 72, 73, -1,
+ 75, -1, -1, -1, 79, 80, 81, 82, -1, 84,
+ -1, 86, -1, 88, -1, -1, 91, -1, -1, -1,
+ 95, 96, -1, -1, 99, 100, -1, 102, 103, 104,
+ -1, -1, -1, -1, -1, 110, -1, 112, 113, 114,
+ -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
+ 125, 126, 127, 128, 3, 4, 5, 6, 7, -1,
+ 135, -1, -1, 12, -1, 140, -1, 142, 143, -1,
+ 145, 146, 147, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ -1, 49, -1, 42, 43, -1, -1, -1, -1, 48,
+ -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, -1, 62, 63, 64, 9, 10, 11, -1,
+ 69, 70, 71, 72, 73, -1, -1, -1, -1, -1,
+ 79, -1, 25, -1, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, -1, -1, -1,
+ -1, -1, -1, -1, 113, 114, -1, -1, -1, -1,
+ -1, -1, -1, 122, 123, 124, 125, 126, 127, 128,
+ 3, 4, 5, 6, 7, -1, 135, -1, -1, 12,
+ -1, 140, -1, 142, -1, -1, 145, 146, 147, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, -1, -1, 42,
+ 43, -1, -1, -1, -1, 48, -1, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
+ 63, 64, 9, 10, 11, -1, 69, 70, 71, 72,
+ 73, 144, -1, -1, -1, -1, 79, -1, 25, -1,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, -1, 49, -1, -1, -1, -1, -1, -1, -1,
+ 113, 114, -1, -1, -1, -1, -1, -1, -1, 122,
+ 123, 124, 125, 126, 127, 128, 3, 4, 5, 6,
+ 7, -1, 135, -1, -1, 12, -1, 140, -1, 142,
+ -1, -1, 145, 146, 147, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, -1, 49, -1, -1, 42, 43, -1, -1, -1,
+ -1, 48, -1, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, -1, 62, 63, 64, 9, 10,
+ 11, -1, 69, 70, 71, 72, 73, 144, -1, -1,
+ -1, -1, 79, -1, 25, -1, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, -1, 49, -1,
+ -1, -1, -1, -1, -1, -1, 113, 114, -1, -1,
+ -1, -1, -1, -1, -1, 122, 123, 124, 125, 126,
+ 127, 128, 3, 4, 5, 6, 7, -1, 135, -1,
+ -1, 12, -1, 140, -1, 142, -1, -1, 145, 146,
+ 147, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, 65, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, 75, -1, -1,
- -1, 79, 80, 81, 82, -1, 84, -1, 86, -1,
- 88, -1, -1, 91, -1, -1, -1, 95, 96, -1,
- -1, 99, 100, -1, 102, 103, 104, -1, -1, -1,
- -1, -1, 110, -1, 112, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, 3, 4, 5, 6, 7, -1, 135, -1, -1,
- 12, -1, 140, -1, 142, 143, -1, 145, 146, 147,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- 42, 43, -1, -1, -1, -1, 48, -1, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
- 62, 63, 64, 65, -1, -1, -1, 69, 70, 71,
- 72, 73, -1, 75, -1, -1, -1, 79, 80, 81,
- 82, -1, 84, -1, 86, -1, 88, -1, -1, 91,
- -1, -1, -1, 95, 96, -1, -1, 99, 100, -1,
- 102, 103, 104, -1, -1, -1, -1, -1, 110, -1,
- 112, 113, 114, -1, -1, -1, -1, -1, -1, -1,
- 122, 123, 124, 125, 126, 127, 128, 3, 4, 5,
- 6, 7, -1, 135, -1, -1, 12, -1, 140, -1,
- 142, 143, -1, 145, 146, 147, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, -1, 42, 43, -1, -1,
- -1, -1, 48, -1, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, -1, 62, 63, 64, 9,
- 10, 11, -1, 69, 70, 71, 72, 73, -1, -1,
- -1, -1, -1, 79, -1, 25, -1, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- -1, -1, -1, -1, -1, -1, -1, 113, 114, -1,
- -1, -1, -1, -1, -1, -1, 122, 123, 124, 125,
- 126, 127, 128, 3, 4, 5, 6, 7, -1, 135,
- -1, -1, 12, -1, 140, -1, 142, -1, -1, 145,
- 146, 147, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, -1, 62, 63, 64, 9, 10, 11, -1, 69,
- 70, 71, 72, 73, -1, -1, -1, -1, 148, 79,
- -1, 25, -1, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, -1, -1, -1, -1,
- -1, -1, -1, 113, 114, -1, -1, -1, -1, -1,
- -1, -1, 122, 123, 124, 125, 126, 127, 128, 3,
- 4, 5, 6, 7, -1, 135, -1, -1, 12, -1,
- 140, -1, 142, -1, -1, 145, 146, 147, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, -1, -1, 42, 43,
- -1, -1, -1, -1, 48, -1, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, -1, 62, 63,
- 64, 9, 10, 11, -1, 69, 70, 71, 72, 73,
- 144, -1, -1, -1, -1, 79, -1, 25, -1, 27,
+ -1, 42, 43, -1, -1, -1, -1, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, 144, -1, -1, -1, 25, 79, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ -1, 49, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ 31, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ 141, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- -1, 49, -1, -1, -1, -1, -1, -1, -1, 113,
- 114, -1, -1, -1, -1, -1, -1, -1, 122, 123,
- 124, 125, 126, 127, 128, 3, 4, 5, 6, 7,
- -1, 135, -1, -1, 12, -1, 140, -1, 142, -1,
- -1, 145, 146, 147, -1, -1, -1, -1, -1, -1,
+ -1, 49, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ 31, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ -1, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
+ 49, -1, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ 31, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ -1, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
+ -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ 31, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ -1, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, 144, -1, -1, -1,
- 25, 79, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, 31, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, 141, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, 31, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, -1, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, -1, 49, -1, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, 31, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, -1, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, 31, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, -1, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ 31, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ -1, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, 31, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, -1, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, 31, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, -1, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ 31, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ -1, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, 31, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, -1, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, -1, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ 31, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ -1, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
- -1, -1, -1, -1, 12, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- -1, -1, 140, -1, 42, 43, -1, 145, 146, 147,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, 9, 10, 11,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, 25, -1, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, -1, -1,
- -1, -1, -1, -1, -1, 113, 114, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- 128, -1, -1, -1, 9, 10, 11, 135, -1, -1,
- -1, -1, 140, -1, -1, -1, -1, 145, 146, 147,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ -1, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
+ -1, 12, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, 140,
+ -1, 42, 43, -1, 145, 146, 147, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ -1, 62, 63, 64, 9, 10, 11, -1, 69, 70,
+ 71, 72, 73, -1, -1, -1, -1, -1, 79, -1,
25, -1, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, -1, 49, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 9, 10, 11, -1, -1,
+ -1, -1, 113, 114, -1, -1, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, 128, -1, -1,
+ -1, 9, 10, 11, 135, -1, -1, -1, -1, 140,
+ -1, -1, -1, -1, 145, 146, 147, 25, -1, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ -1, 49, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 9, 10, 11, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, -1, 49, 9, 10, 11, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 25, 144, 27, 28, 29, 30, 31, 32, 33,
+ -1, 25, -1, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, 9, 10, 11, -1,
+ 44, 45, 46, 47, -1, 49, 144, 9, 10, 11,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 25, -1, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, -1, -1, 144,
+ -1, -1, -1, 25, -1, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, -1, 49, 9, 10,
+ 11, -1, -1, -1, -1, -1, -1, 142, -1, -1,
+ -1, -1, -1, -1, 25, -1, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, -1, 49, 9,
+ 10, 11, -1, -1, -1, -1, -1, -1, 142, -1,
+ -1, -1, -1, -1, -1, 25, -1, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
9, 10, 11, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
+ 142, -1, -1, -1, -1, -1, 25, -1, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
49, 9, 10, 11, -1, -1, -1, -1, -1, -1,
- 144, -1, -1, -1, -1, -1, -1, 25, -1, 27,
+ -1, 142, -1, -1, -1, -1, -1, 25, -1, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
-1, 49, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, 144, -1, -1, -1, -1, -1, -1, 25, -1,
+ -1, -1, 142, -1, -1, -1, -1, -1, 25, -1,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, -1, 49, 9, 10, 11, -1, -1, -1, -1,
- -1, -1, -1, 142, -1, -1, -1, -1, -1, 25,
+ -1, -1, 141, -1, -1, -1, -1, -1, -1, 25,
-1, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, -1, 49, 9, 10, 11, -1, -1, -1,
- -1, -1, -1, -1, 142, -1, -1, -1, -1, -1,
+ -1, -1, -1, 141, -1, -1, -1, -1, -1, -1,
25, -1, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, -1, 49, 9, 10, 11, -1, -1,
- -1, -1, -1, -1, -1, 142, -1, -1, -1, -1,
+ -1, -1, -1, -1, 141, -1, -1, -1, -1, -1,
-1, 25, -1, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, -1, 49, 9, 10, 11, -1,
- -1, -1, -1, -1, -1, -1, 142, -1, -1, -1,
+ -1, -1, -1, -1, -1, 141, -1, -1, -1, -1,
-1, -1, 25, -1, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, -1, 49, 9, 10, 11,
- -1, -1, -1, -1, -1, -1, -1, 142, -1, -1,
+ -1, -1, -1, -1, -1, -1, 141, -1, -1, -1,
-1, -1, -1, 25, -1, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, -1, 49, 9, 10,
@@ -2114,44 +2108,24 @@ static const yytype_int16 yycheck[] =
-1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 9, 10, 11, -1, -1, -1, -1, -1, -1,
- 141, -1, -1, -1, -1, -1, -1, 25, -1, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- -1, 49, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, 141, -1, -1, -1, -1, -1, -1, 25, -1,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 9, 10, 11, -1, -1, -1, -1,
- -1, -1, 141, -1, -1, -1, -1, -1, -1, 25,
- -1, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, -1, 49, 9, 10, 11, -1, -1, -1,
- -1, -1, -1, 141, -1, -1, -1, -1, -1, -1,
+ 49, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 141, -1, -1, -1, -1, -1, 9, 10, 11, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 121, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, 9, 10, 11,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 121, 25, -1, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, -1, 49, 10, 11,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 25, -1, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 11, 49, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
25, -1, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 9, 10, 11, -1, -1,
- -1, -1, -1, -1, 141, -1, -1, -1, -1, -1,
- -1, 25, -1, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 141, -1, -1, -1, -1,
- -1, 9, 10, 11, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 121, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- -1, 49, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 121, 25, -1,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 25, -1,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 11, 49, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 25, -1, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49
+ 45, 46, 47, -1, 49
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -2167,75 +2141,75 @@ static const yytype_uint16 yystos[] =
122, 123, 124, 125, 126, 127, 128, 135, 140, 142,
143, 145, 146, 147, 153, 157, 158, 189, 190, 192,
195, 198, 200, 246, 257, 262, 271, 274, 278, 279,
- 282, 284, 292, 293, 294, 295, 296, 297, 303, 313,
- 316, 278, 278, 140, 278, 278, 278, 278, 278, 278,
+ 281, 282, 290, 291, 292, 293, 294, 295, 301, 311,
+ 314, 278, 278, 140, 278, 278, 278, 278, 278, 278,
278, 256, 278, 278, 278, 278, 278, 278, 278, 71,
- 262, 282, 284, 282, 278, 71, 262, 263, 264, 295,
- 296, 303, 140, 269, 140, 140, 242, 278, 165, 140,
+ 262, 281, 282, 281, 278, 71, 262, 263, 264, 293,
+ 294, 301, 140, 269, 140, 140, 242, 278, 165, 140,
140, 140, 175, 140, 142, 278, 142, 278, 193, 142,
- 246, 278, 284, 176, 278, 79, 140, 188, 73, 145,
+ 246, 278, 282, 176, 278, 79, 140, 188, 73, 145,
227, 228, 116, 116, 73, 229, 140, 140, 140, 140,
- 140, 140, 309, 278, 154, 143, 309, 309, 71, 71,
+ 140, 140, 307, 278, 154, 143, 307, 307, 71, 71,
139, 9, 10, 11, 25, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 49, 142, 59, 60,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 283, 140, 120, 61, 143, 145, 296, 278,
- 278, 139, 139, 249, 120, 296, 141, 278, 278, 258,
- 8, 142, 157, 163, 243, 244, 278, 246, 284, 140,
- 278, 142, 142, 31, 191, 142, 142, 143, 142, 79,
- 142, 143, 279, 284, 8, 142, 13, 8, 142, 186,
- 187, 284, 284, 314, 284, 141, 247, 31, 278, 307,
- 308, 73, 78, 136, 137, 138, 310, 141, 144, 155,
- 278, 146, 147, 118, 199, 197, 71, 292, 296, 303,
- 252, 278, 253, 254, 250, 251, 278, 278, 278, 278,
+ 23, 24, 140, 120, 61, 143, 145, 294, 278, 278,
+ 139, 139, 249, 120, 294, 141, 278, 278, 258, 8,
+ 142, 157, 163, 243, 244, 278, 246, 282, 140, 278,
+ 142, 142, 31, 191, 142, 142, 143, 142, 79, 142,
+ 143, 279, 282, 8, 142, 13, 8, 142, 186, 187,
+ 282, 282, 312, 282, 141, 247, 31, 278, 305, 306,
+ 73, 78, 136, 137, 138, 308, 141, 144, 155, 278,
+ 146, 147, 118, 199, 197, 71, 290, 294, 301, 252,
+ 278, 253, 254, 250, 251, 278, 278, 278, 278, 278,
278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
- 278, 278, 278, 278, 278, 263, 31, 278, 278, 278,
- 278, 278, 278, 278, 278, 278, 278, 278, 278, 261,
- 285, 278, 298, 278, 141, 71, 292, 140, 270, 265,
- 141, 141, 31, 225, 226, 246, 284, 278, 82, 278,
- 142, 8, 90, 90, 71, 209, 141, 71, 154, 141,
- 278, 228, 42, 43, 71, 123, 271, 272, 273, 73,
- 8, 141, 8, 141, 141, 142, 122, 284, 304, 305,
- 280, 284, 121, 141, 8, 276, 61, 120, 72, 278,
- 284, 115, 156, 157, 189, 190, 144, 71, 262, 196,
- 118, 201, 140, 140, 296, 278, 278, 278, 278, 278,
- 63, 284, 225, 71, 143, 292, 299, 301, 302, 148,
- 144, 225, 299, 26, 159, 280, 141, 8, 140, 141,
- 167, 245, 173, 171, 13, 8, 141, 170, 194, 144,
- 144, 272, 272, 139, 140, 13, 187, 142, 315, 140,
- 8, 141, 281, 31, 278, 31, 278, 311, 71, 61,
- 144, 144, 140, 119, 202, 203, 262, 143, 259, 260,
- 26, 263, 141, 278, 300, 286, 61, 143, 141, 266,
- 161, 157, 31, 246, 284, 166, 164, 243, 278, 284,
- 31, 205, 284, 272, 71, 26, 157, 208, 26, 143,
- 210, 140, 101, 71, 272, 275, 277, 272, 284, 306,
- 305, 13, 280, 280, 121, 71, 73, 74, 312, 278,
- 141, 203, 143, 8, 230, 225, 225, 255, 248, 144,
- 140, 290, 298, 278, 267, 154, 160, 280, 278, 26,
- 157, 215, 142, 121, 204, 284, 204, 13, 154, 142,
- 211, 142, 211, 71, 123, 222, 223, 224, 140, 121,
- 141, 8, 276, 304, 278, 31, 278, 148, 148, 142,
- 230, 262, 98, 105, 106, 107, 108, 109, 110, 111,
- 144, 231, 236, 237, 238, 239, 241, 141, 141, 278,
- 270, 291, 287, 148, 144, 120, 268, 162, 216, 141,
- 154, 168, 205, 141, 141, 272, 89, 211, 92, 93,
- 94, 211, 144, 141, 8, 31, 73, 177, 272, 272,
- 141, 280, 144, 144, 71, 232, 97, 239, 8, 142,
- 225, 120, 288, 299, 218, 66, 67, 220, 142, 83,
- 243, 174, 172, 142, 92, 142, 278, 26, 142, 214,
- 144, 143, 224, 73, 13, 262, 121, 13, 73, 240,
- 233, 71, 141, 299, 66, 67, 221, 140, 157, 142,
- 141, 26, 157, 207, 207, 142, 214, 213, 154, 31,
- 73, 13, 272, 178, 272, 272, 13, 8, 142, 191,
- 13, 289, 140, 26, 68, 278, 169, 154, 212, 154,
- 144, 73, 13, 272, 73, 272, 73, 71, 272, 290,
- 278, 154, 142, 141, 26, 157, 206, 87, 154, 13,
- 272, 141, 13, 234, 141, 217, 154, 142, 272, 179,
- 272, 140, 26, 157, 85, 143, 222, 219, 142, 154,
- 141, 154, 144, 142, 143, 235, 180, 154, 101, 181,
- 182, 183, 144, 140, 183, 262, 184, 73, 141, 185,
- 143, 154, 144
+ 278, 278, 278, 278, 263, 31, 278, 278, 278, 278,
+ 278, 278, 278, 278, 278, 278, 278, 278, 261, 283,
+ 278, 296, 278, 141, 71, 290, 140, 270, 265, 141,
+ 141, 31, 225, 226, 246, 282, 278, 82, 278, 142,
+ 8, 90, 90, 71, 209, 141, 71, 154, 141, 278,
+ 228, 42, 43, 71, 123, 271, 272, 273, 73, 8,
+ 141, 8, 141, 141, 142, 122, 282, 302, 303, 280,
+ 282, 121, 141, 8, 276, 61, 120, 72, 278, 282,
+ 115, 156, 157, 189, 190, 144, 71, 262, 196, 118,
+ 201, 140, 140, 294, 278, 278, 278, 278, 278, 63,
+ 282, 225, 71, 143, 290, 297, 299, 300, 148, 144,
+ 225, 297, 26, 159, 280, 141, 8, 140, 141, 167,
+ 245, 173, 171, 13, 8, 141, 170, 194, 144, 144,
+ 272, 272, 139, 140, 13, 187, 142, 313, 140, 8,
+ 141, 31, 278, 31, 278, 309, 71, 61, 144, 144,
+ 140, 119, 202, 203, 262, 143, 259, 260, 26, 263,
+ 141, 278, 298, 284, 61, 143, 141, 266, 161, 157,
+ 31, 246, 282, 166, 164, 243, 278, 282, 31, 205,
+ 282, 272, 71, 26, 157, 208, 26, 143, 210, 140,
+ 101, 71, 272, 275, 277, 272, 282, 304, 303, 13,
+ 280, 280, 121, 71, 73, 74, 310, 278, 141, 203,
+ 143, 8, 230, 225, 225, 255, 248, 144, 140, 288,
+ 296, 278, 267, 154, 160, 280, 278, 26, 157, 215,
+ 142, 121, 204, 282, 204, 13, 154, 142, 211, 142,
+ 211, 71, 123, 222, 223, 224, 140, 121, 141, 8,
+ 276, 302, 278, 31, 278, 148, 148, 142, 230, 262,
+ 98, 105, 106, 107, 108, 109, 110, 111, 144, 231,
+ 236, 237, 238, 239, 241, 141, 141, 278, 270, 289,
+ 285, 148, 144, 120, 268, 162, 216, 141, 154, 168,
+ 205, 141, 141, 272, 89, 211, 92, 93, 94, 211,
+ 144, 141, 8, 31, 73, 177, 272, 272, 141, 280,
+ 144, 144, 71, 232, 97, 239, 8, 142, 225, 120,
+ 286, 297, 218, 66, 67, 220, 142, 83, 243, 174,
+ 172, 142, 92, 142, 278, 26, 142, 214, 144, 143,
+ 224, 73, 13, 262, 121, 13, 73, 240, 233, 71,
+ 141, 297, 66, 67, 221, 140, 157, 142, 141, 26,
+ 157, 207, 207, 142, 214, 213, 154, 31, 73, 13,
+ 272, 178, 272, 272, 13, 8, 142, 191, 13, 287,
+ 140, 26, 68, 278, 169, 154, 212, 154, 144, 73,
+ 13, 272, 73, 272, 73, 71, 272, 288, 278, 154,
+ 142, 141, 26, 157, 206, 87, 154, 13, 272, 141,
+ 13, 234, 141, 217, 154, 142, 272, 179, 272, 140,
+ 26, 157, 85, 143, 222, 219, 142, 154, 141, 154,
+ 144, 142, 143, 235, 180, 154, 101, 181, 182, 183,
+ 144, 140, 183, 262, 184, 73, 141, 185, 143, 154,
+ 144
};
#define yyerrok (yyerrstatus = 0)
@@ -3856,7 +3830,7 @@ yyreduce:
case 204:
- { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
+ { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_assign(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
case 205:
@@ -4481,391 +4455,383 @@ yyreduce:
case 333:
- { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); }
+ { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]);
+ zend_check_writable_variable(&(yyvsp[(1) - (1)])); }
break;
case 334:
- { zend_check_writable_variable(&(yyvsp[(1) - (2)])); }
+ { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]);
+ zend_check_writable_variable(&(yyvsp[(1) - (1)])); }
break;
case 335:
- { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 336:
-
- { zend_check_writable_variable(&(yyvsp[(1) - (2)])); }
- break;
-
- case 337:
-
{ zend_do_push_object(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 338:
+ case 336:
{ zend_do_push_object(&(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 339:
+ case 337:
{ zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).u.EA.type = (yyvsp[(1) - (7)]).u.EA.type | ((yyvsp[(7) - (7)]).u.EA.type ? (yyvsp[(7) - (7)]).u.EA.type : (yyvsp[(6) - (7)]).u.EA.type); }
break;
- case 340:
+ case 338:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 341:
+ case 339:
{ (yyval).u.EA.type = (yyvsp[(2) - (2)]).u.EA.type; }
break;
- case 342:
+ case 340:
{ (yyval).u.EA.type = 0; }
break;
- case 343:
+ case 341:
{ zend_do_push_object(&(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 344:
+ case 342:
{ (yyval).u.EA.type = (yyvsp[(4) - (4)]).u.EA.type; }
break;
- case 345:
+ case 343:
{ zend_do_pop_object(&(yyvsp[(1) - (1)]) TSRMLS_CC); zend_do_begin_method_call(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 346:
+ case 344:
{ zend_do_end_function_call(&(yyvsp[(1) - (4)]), &(yyval), &(yyvsp[(3) - (4)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);
zend_do_push_object(&(yyval) TSRMLS_CC); (yyval).u.EA.type = ZEND_PARSED_METHOD_CALL; }
break;
- case 347:
+ case 345:
{ zend_do_declare_implicit_property(TSRMLS_C); (yyval).u.EA.type = ZEND_PARSED_MEMBER; }
break;
- case 348:
+ case 346:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 349:
+ case 347:
{ zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 350:
+ case 348:
{ (yyval) = (yyvsp[(3) - (3)]); zend_do_fetch_static_member(&(yyval), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 351:
+ case 349:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 352:
+ case 350:
{ zend_do_begin_variable_parse(TSRMLS_C); (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_FUNCTION_CALL; }
break;
- case 353:
+ case 351:
{ (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_VARIABLE; }
break;
- case 354:
+ case 352:
{ zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); (yyval).u.EA.type = ZEND_PARSED_VARIABLE; }
break;
- case 355:
+ case 353:
{ (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_STATIC_MEMBER; }
break;
- case 356:
+ case 354:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 357:
+ case 355:
{ fetch_string_offset(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 358:
+ case 356:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 359:
+ case 357:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 360:
+ case 358:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 361:
+ case 359:
{ (yyval).op_type = IS_UNUSED; }
break;
- case 362:
+ case 360:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 363:
+ case 361:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 364:
+ case 362:
{ zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); }
break;
- case 365:
+ case 363:
{ znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&(yyval), &tmp_znode, &(yyvsp[(1) - (2)]) TSRMLS_CC);}
break;
- case 366:
+ case 364:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 367:
+ case 365:
{ fetch_string_offset(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 368:
+ case 366:
{ znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&(yyval), &tmp_znode, &(yyvsp[(1) - (1)]) TSRMLS_CC);}
break;
- case 369:
+ case 367:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 370:
+ case 368:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 371:
+ case 369:
{ Z_LVAL((yyval).u.constant) = 1; }
break;
- case 372:
+ case 370:
{ Z_LVAL((yyval).u.constant)++; }
break;
- case 375:
+ case 373:
{ zend_do_add_list_element(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 376:
+ case 374:
{ zend_do_new_list_begin(TSRMLS_C); }
break;
- case 377:
+ case 375:
{ zend_do_new_list_end(TSRMLS_C); }
break;
- case 378:
+ case 376:
{ zend_do_add_list_element(NULL TSRMLS_CC); }
break;
- case 379:
+ case 377:
{ zend_do_init_array(&(yyval), NULL, NULL, 0 TSRMLS_CC); }
break;
- case 380:
+ case 378:
{ (yyval) = (yyvsp[(1) - (2)]); }
break;
- case 381:
+ case 379:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(3) - (5)]), 0 TSRMLS_CC); }
break;
- case 382:
+ case 380:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(3) - (3)]), NULL, 0 TSRMLS_CC); }
break;
- case 383:
+ case 381:
{ zend_do_init_array(&(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]), 0 TSRMLS_CC); }
break;
- case 384:
+ case 382:
{ zend_do_init_array(&(yyval), &(yyvsp[(1) - (1)]), NULL, 0 TSRMLS_CC); }
break;
- case 385:
+ case 383:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(6) - (6)]), &(yyvsp[(3) - (6)]), 1 TSRMLS_CC); }
break;
- case 386:
+ case 384:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(4) - (4)]), NULL, 1 TSRMLS_CC); }
break;
- case 387:
+ case 385:
{ zend_do_init_array(&(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(1) - (4)]), 1 TSRMLS_CC); }
break;
- case 388:
+ case 386:
{ zend_do_init_array(&(yyval), &(yyvsp[(2) - (2)]), NULL, 1 TSRMLS_CC); }
break;
- case 389:
+ case 387:
{ zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 390:
+ case 388:
{ zend_do_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 391:
+ case 389:
{ zend_do_init_string(&(yyval) TSRMLS_CC); }
break;
- case 392:
+ case 390:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 393:
+ case 391:
{ zend_do_begin_variable_parse(TSRMLS_C); }
break;
- case 394:
+ case 392:
{ fetch_array_begin(&(yyval), &(yyvsp[(1) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); }
break;
- case 395:
+ case 393:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyvsp[(2) - (3)]), &(yyvsp[(1) - (3)]), 1 TSRMLS_CC); zend_do_fetch_property(&(yyval), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 396:
+ case 394:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(2) - (3)]), 1 TSRMLS_CC); }
break;
- case 397:
+ case 395:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_array_begin(&(yyval), &(yyvsp[(2) - (6)]), &(yyvsp[(4) - (6)]) TSRMLS_CC); }
break;
- case 398:
+ case 396:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 399:
+ case 397:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 400:
+ case 398:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 401:
+ case 399:
{ fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 402:
+ case 400:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 403:
+ case 401:
{ zend_do_isset_or_isempty(ZEND_ISEMPTY, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 404:
+ case 402:
{ zend_do_include_or_eval(ZEND_INCLUDE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 405:
+ case 403:
{ zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 406:
+ case 404:
{ zend_do_include_or_eval(ZEND_EVAL, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 407:
+ case 405:
{ zend_do_include_or_eval(ZEND_REQUIRE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 408:
+ case 406:
{ zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 409:
+ case 407:
{ zend_do_isset_or_isempty(ZEND_ISSET, &(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 410:
+ case 408:
{ zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 411:
+ case 409:
{ znode tmp; zend_do_isset_or_isempty(ZEND_ISSET, &tmp, &(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &tmp, &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 412:
+ case 410:
{ zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_RT TSRMLS_CC); }
break;
diff --git a/Zend/zend_language_parser.output b/Zend/zend_language_parser.output
index 976ef398e..4478aca0f 100644
--- a/Zend/zend_language_parser.output
+++ b/Zend/zend_language_parser.output
@@ -10,7 +10,7 @@ Terminals which are not used
T_WHITESPACE
-State 608 conflicts: 2 shift/reduce
+State 606 conflicts: 2 shift/reduce
Grammar
@@ -505,126 +505,122 @@ Grammar
331 r_variable: variable
- 332 @55: /* empty */
+ 332 w_variable: variable
- 333 w_variable: variable @55
+ 333 rw_variable: variable
- 334 @56: /* empty */
+ 334 @55: /* empty */
- 335 rw_variable: variable @56
+ 335 @56: /* empty */
- 336 @57: /* empty */
+ 336 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @55 object_property @56 method_or_not variable_properties
+ 337 | base_variable_with_function_calls
- 337 @58: /* empty */
+ 338 variable_properties: variable_properties variable_property
+ 339 | /* empty */
- 338 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @57 object_property @58 method_or_not variable_properties
- 339 | base_variable_with_function_calls
+ 340 @57: /* empty */
- 340 variable_properties: variable_properties variable_property
- 341 | /* empty */
+ 341 variable_property: T_OBJECT_OPERATOR object_property @57 method_or_not
- 342 @59: /* empty */
+ 342 @58: /* empty */
- 343 variable_property: T_OBJECT_OPERATOR object_property @59 method_or_not
+ 343 method_or_not: '(' @58 function_call_parameter_list ')'
+ 344 | /* empty */
- 344 @60: /* empty */
+ 345 variable_without_objects: reference_variable
+ 346 | simple_indirect_reference reference_variable
- 345 method_or_not: '(' @60 function_call_parameter_list ')'
- 346 | /* empty */
+ 347 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
- 347 variable_without_objects: reference_variable
- 348 | simple_indirect_reference reference_variable
+ 348 base_variable_with_function_calls: base_variable
+ 349 | function_call
- 349 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
+ 350 base_variable: reference_variable
+ 351 | simple_indirect_reference reference_variable
+ 352 | static_member
- 350 base_variable_with_function_calls: base_variable
- 351 | function_call
+ 353 reference_variable: reference_variable '[' dim_offset ']'
+ 354 | reference_variable '{' expr '}'
+ 355 | compound_variable
- 352 base_variable: reference_variable
- 353 | simple_indirect_reference reference_variable
- 354 | static_member
+ 356 compound_variable: T_VARIABLE
+ 357 | '$' '{' expr '}'
- 355 reference_variable: reference_variable '[' dim_offset ']'
- 356 | reference_variable '{' expr '}'
- 357 | compound_variable
+ 358 dim_offset: /* empty */
+ 359 | expr
- 358 compound_variable: T_VARIABLE
- 359 | '$' '{' expr '}'
+ 360 object_property: object_dim_list
- 360 dim_offset: /* empty */
- 361 | expr
+ 361 @59: /* empty */
- 362 object_property: object_dim_list
+ 362 object_property: variable_without_objects @59
- 363 @61: /* empty */
+ 363 object_dim_list: object_dim_list '[' dim_offset ']'
+ 364 | object_dim_list '{' expr '}'
+ 365 | variable_name
- 364 object_property: variable_without_objects @61
+ 366 variable_name: T_STRING
+ 367 | '{' expr '}'
- 365 object_dim_list: object_dim_list '[' dim_offset ']'
- 366 | object_dim_list '{' expr '}'
- 367 | variable_name
+ 368 simple_indirect_reference: '$'
+ 369 | simple_indirect_reference '$'
- 368 variable_name: T_STRING
- 369 | '{' expr '}'
+ 370 assignment_list: assignment_list ',' assignment_list_element
+ 371 | assignment_list_element
- 370 simple_indirect_reference: '$'
- 371 | simple_indirect_reference '$'
+ 372 assignment_list_element: variable
- 372 assignment_list: assignment_list ',' assignment_list_element
- 373 | assignment_list_element
+ 373 @60: /* empty */
- 374 assignment_list_element: variable
+ 374 assignment_list_element: T_LIST '(' @60 assignment_list ')'
+ 375 | /* empty */
- 375 @62: /* empty */
+ 376 array_pair_list: /* empty */
+ 377 | non_empty_array_pair_list possible_comma
- 376 assignment_list_element: T_LIST '(' @62 assignment_list ')'
- 377 | /* empty */
+ 378 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr
+ 379 | non_empty_array_pair_list ',' expr
+ 380 | expr T_DOUBLE_ARROW expr
+ 381 | expr
+ 382 | non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable
+ 383 | non_empty_array_pair_list ',' '&' w_variable
+ 384 | expr T_DOUBLE_ARROW '&' w_variable
+ 385 | '&' w_variable
- 378 array_pair_list: /* empty */
- 379 | non_empty_array_pair_list possible_comma
+ 386 encaps_list: encaps_list encaps_var
+ 387 | encaps_list T_ENCAPSED_AND_WHITESPACE
+ 388 | /* empty */
- 380 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr
- 381 | non_empty_array_pair_list ',' expr
- 382 | expr T_DOUBLE_ARROW expr
- 383 | expr
- 384 | non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable
- 385 | non_empty_array_pair_list ',' '&' w_variable
- 386 | expr T_DOUBLE_ARROW '&' w_variable
- 387 | '&' w_variable
+ 389 encaps_var: T_VARIABLE
- 388 encaps_list: encaps_list encaps_var
- 389 | encaps_list T_ENCAPSED_AND_WHITESPACE
- 390 | /* empty */
+ 390 @61: /* empty */
- 391 encaps_var: T_VARIABLE
+ 391 encaps_var: T_VARIABLE '[' @61 encaps_var_offset ']'
+ 392 | T_VARIABLE T_OBJECT_OPERATOR T_STRING
+ 393 | T_DOLLAR_OPEN_CURLY_BRACES expr '}'
+ 394 | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}'
+ 395 | T_CURLY_OPEN variable '}'
- 392 @63: /* empty */
+ 396 encaps_var_offset: T_STRING
+ 397 | T_NUM_STRING
+ 398 | T_VARIABLE
- 393 encaps_var: T_VARIABLE '[' @63 encaps_var_offset ']'
- 394 | T_VARIABLE T_OBJECT_OPERATOR T_STRING
- 395 | T_DOLLAR_OPEN_CURLY_BRACES expr '}'
- 396 | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}'
- 397 | T_CURLY_OPEN variable '}'
+ 399 internal_functions_in_yacc: T_ISSET '(' isset_variables ')'
+ 400 | T_EMPTY '(' variable ')'
+ 401 | T_INCLUDE expr
+ 402 | T_INCLUDE_ONCE expr
+ 403 | T_EVAL '(' expr ')'
+ 404 | T_REQUIRE expr
+ 405 | T_REQUIRE_ONCE expr
- 398 encaps_var_offset: T_STRING
- 399 | T_NUM_STRING
- 400 | T_VARIABLE
+ 406 isset_variables: variable
- 401 internal_functions_in_yacc: T_ISSET '(' isset_variables ')'
- 402 | T_EMPTY '(' variable ')'
- 403 | T_INCLUDE expr
- 404 | T_INCLUDE_ONCE expr
- 405 | T_EVAL '(' expr ')'
- 406 | T_REQUIRE expr
- 407 | T_REQUIRE_ONCE expr
+ 407 @62: /* empty */
- 408 isset_variables: variable
+ 408 isset_variables: isset_variables ',' @62 variable
- 409 @64: /* empty */
-
- 410 isset_variables: isset_variables ',' @64 variable
-
- 411 class_constant: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
+ 409 class_constant: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
Terminals, with rules where they appear
@@ -632,17 +628,17 @@ Terminals, with rules where they appear
$end (0) 0
'!' (33) 247
'"' (34) 319
-'$' (36) 160 161 359 370 371
+'$' (36) 160 161 357 368 369
'%' (37) 242
-'&' (38) 81 104 139 140 143 144 153 156 204 206 235 384 385 386 387
+'&' (38) 81 104 139 140 143 144 153 156 204 206 235 382 383 384 385
'(' (40) 8 15 20 23 26 29 33 35 49 52 55 57 64 72 77 84 128 131 173
- 202 258 274 278 280 282 284 296 297 299 312 345 376 401 402 405
+ 202 258 274 278 280 282 284 296 297 299 312 343 374 399 400 403
')' (41) 8 15 20 23 26 29 33 35 49 52 55 57 64 72 77 84 128 131 173
- 202 258 274 278 280 282 284 296 297 299 312 345 376 401 402 405
+ 202 258 274 278 280 282 284 296 297 299 312 343 374 399 400 403
'*' (42) 240
'+' (43) 238 245 310
',' (44) 74 100 112 142 143 144 145 154 155 156 157 162 163 188 189
- 192 194 199 324 325 326 372 380 381 384 385 410
+ 192 194 199 324 325 326 370 378 379 382 383 408
'-' (45) 239 246 311
'.' (46) 237
'/' (47) 241
@@ -655,21 +651,21 @@ $end (0) 0
'>' (62) 255
'?' (63) 261
'@' (64) 272
-'[' (91) 355 365 393 396
-']' (93) 355 365 393 396
+'[' (91) 353 363 391 394
+']' (93) 353 363 391 394
'^' (94) 236
'`' (96) 275
-'{' (123) 17 64 72 84 86 88 113 114 161 175 356 359 366 369
+'{' (123) 17 64 72 84 86 88 113 114 161 175 354 357 364 367
'|' (124) 234
-'}' (125) 17 64 72 84 86 88 113 114 161 175 356 359 366 369 395 396
- 397
+'}' (125) 17 64 72 84 86 88 113 114 161 175 354 357 364 367 393 394
+ 395
'~' (126) 248
error (256)
-T_REQUIRE_ONCE (258) 407
-T_REQUIRE (259) 406
-T_EVAL (260) 405
-T_INCLUDE_ONCE (261) 404
-T_INCLUDE (262) 403
+T_REQUIRE_ONCE (258) 405
+T_REQUIRE (259) 404
+T_EVAL (260) 403
+T_INCLUDE_ONCE (261) 402
+T_INCLUDE (262) 401
T_LOGICAL_OR (263) 230
T_LOGICAL_XOR (264) 233
T_LOGICAL_AND (265) 232
@@ -715,15 +711,15 @@ T_ENDIF (304) 23
T_LNUMBER (305) 300
T_DNUMBER (306) 301
T_STRING (307) 84 86 88 111 112 147 173 192 193 278 280 285 286 309
- 314 315 368 394 398 411
-T_STRING_VARNAME (308) 316 396
+ 314 315 366 392 396 409
+T_STRING_VARNAME (308) 316 394
T_VARIABLE (309) 64 72 138 139 140 141 142 143 144 145 159 162 163
- 164 165 188 189 190 191 358 391 393 394 400
-T_NUM_STRING (310) 399
+ 164 165 188 189 190 191 356 389 391 392 398
+T_NUM_STRING (310) 397
T_INLINE_HTML (311) 46
T_CHARACTER (312)
T_BAD_CHARACTER (313)
-T_ENCAPSED_AND_WHITESPACE (314) 389
+T_ENCAPSED_AND_WHITESPACE (314) 387
T_CONSTANT_ENCAPSED_STRING (315) 76 77 302
T_ECHO (316) 45
T_DO (317) 29
@@ -758,16 +754,16 @@ T_ABSTRACT (345) 90 186
T_STATIC (346) 44 185
T_VAR (347) 177
T_UNSET (348) 49
-T_ISSET (349) 401
-T_EMPTY (350) 402
+T_ISSET (349) 399
+T_EMPTY (350) 400
T_HALT_COMPILER (351) 8 15
T_CLASS (352) 89 90 91
T_INTERFACE (353) 94
T_EXTENDS (354) 93 96
T_IMPLEMENTS (355) 98
-T_OBJECT_OPERATOR (356) 290 294 338 343 394
-T_DOUBLE_ARROW (357) 102 325 327 380 382 384 386
-T_LIST (358) 202 376
+T_OBJECT_OPERATOR (356) 290 294 336 341 392
+T_DOUBLE_ARROW (357) 102 325 327 378 380 382 384
+T_LIST (358) 202 374
T_ARRAY (359) 148 274 312
T_CLASS_C (360) 305
T_METHOD_C (361) 306
@@ -782,9 +778,9 @@ T_CLOSE_TAG (369)
T_WHITESPACE (370)
T_START_HEREDOC (371) 320
T_END_HEREDOC (372) 320
-T_DOLLAR_OPEN_CURLY_BRACES (373) 395 396
-T_CURLY_OPEN (374) 397
-T_PAAMAYIM_NEKUDOTAYIM (375) 280 282 314 349 411
+T_DOLLAR_OPEN_CURLY_BRACES (373) 393 394
+T_CURLY_OPEN (374) 395
+T_PAAMAYIM_NEKUDOTAYIM (375) 280 282 314 347 409
Nonterminals, with rules where they appear
@@ -945,7 +941,7 @@ non_empty_parameter_list (223)
optional_class_type (224)
on left: 146 147 148, on right: 138 139 140 141 142 143 144 145
function_call_parameter_list (225)
- on left: 149 150, on right: 278 280 282 284 299 345
+ on left: 149 150, on right: 278 280 282 284 299 343
non_empty_function_call_parameter_list (226)
on left: 151 152 153 154 155 156, on right: 149 154 155 156
global_var_list (227)
@@ -1013,7 +1009,7 @@ expr_without_variable (246)
@48 (256)
on left: 271, on right: 272
function_call (257)
- on left: 278 280 282 284, on right: 351
+ on left: 278 280 282 284, on right: 349
@49 (258)
on left: 277, on right: 278
@50 (259)
@@ -1023,7 +1019,7 @@ function_call (257)
@52 (261)
on left: 283, on right: 284
fully_qualified_class_name (262)
- on left: 285, on right: 64 72 93 99 100 280 282 349 411
+ on left: 285, on right: 64 72 93 99 100 280 282 347 409
class_name_reference (263)
on left: 286 287, on right: 206 208 257
dynamic_class_name_reference (264)
@@ -1052,7 +1048,7 @@ scalar (274)
static_array_pair_list (275)
on left: 321 322, on right: 312
possible_comma (276)
- on left: 323 324, on right: 322 379
+ on left: 323 324, on right: 322 377
non_empty_static_array_pair_list (277)
on left: 325 326 327 328, on right: 322 325 326
expr (278)
@@ -1060,87 +1056,83 @@ expr (278)
131 161 194 195 199 200 202 203 209 210 211 212 213 214 215 216
217 218 219 220 226 228 230 232 233 234 235 236 237 238 239 240
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
- 257 258 261 263 264 265 266 267 268 269 272 276 297 356 359 361
- 366 369 380 381 382 383 384 386 395 396 403 404 405 406 407
+ 257 258 261 263 264 265 266 267 268 269 272 276 297 354 357 359
+ 364 367 378 379 380 381 382 384 393 394 401 402 403 404 405
r_variable (279)
on left: 331, on right: 160 329
w_variable (280)
- on left: 333, on right: 153 156 384 385 386 387
-@55 (281)
- on left: 332, on right: 333
-rw_variable (282)
- on left: 335, on right: 221 222 223 224
-@56 (283)
- on left: 334, on right: 335
-variable (284)
- on left: 338 339, on right: 42 52 55 75 103 104 152 155 203 204
- 206 210 211 212 213 214 215 216 217 218 219 220 331 333 335 374
- 397 402 408 410
-@57 (285)
- on left: 336, on right: 338
-@58 (286)
- on left: 337, on right: 338
-variable_properties (287)
- on left: 340 341, on right: 338 340
-variable_property (288)
- on left: 343, on right: 340
-@59 (289)
+ on left: 332, on right: 153 156 382 383 384 385
+rw_variable (281)
+ on left: 333, on right: 221 222 223 224
+variable (282)
+ on left: 336 337, on right: 42 52 55 75 103 104 152 155 203 204
+ 206 210 211 212 213 214 215 216 217 218 219 220 331 332 333 372
+ 395 400 406 408
+@55 (283)
+ on left: 334, on right: 336
+@56 (284)
+ on left: 335, on right: 336
+variable_properties (285)
+ on left: 338 339, on right: 336 338
+variable_property (286)
+ on left: 341, on right: 338
+@57 (287)
+ on left: 340, on right: 341
+method_or_not (288)
+ on left: 343 344, on right: 336 341
+@58 (289)
on left: 342, on right: 343
-method_or_not (290)
- on left: 345 346, on right: 338 343
-@60 (291)
- on left: 344, on right: 345
-variable_without_objects (292)
- on left: 347 348, on right: 282 284 349 364
-static_member (293)
- on left: 349, on right: 354
-base_variable_with_function_calls (294)
- on left: 350 351, on right: 338 339
-base_variable (295)
- on left: 352 353 354, on right: 290 291 350
-reference_variable (296)
- on left: 355 356 357, on right: 347 348 352 353 355 356
-compound_variable (297)
- on left: 358 359, on right: 357
-dim_offset (298)
- on left: 360 361, on right: 355 365
-object_property (299)
- on left: 362 364, on right: 290 294 338 343
-@61 (300)
- on left: 363, on right: 364
-object_dim_list (301)
- on left: 365 366 367, on right: 362 365 366
-variable_name (302)
- on left: 368 369, on right: 367
-simple_indirect_reference (303)
- on left: 370 371, on right: 348 353 371
-assignment_list (304)
- on left: 372 373, on right: 202 372 376
-assignment_list_element (305)
- on left: 374 376 377, on right: 372 373
-@62 (306)
- on left: 375, on right: 376
-array_pair_list (307)
- on left: 378 379, on right: 274
-non_empty_array_pair_list (308)
- on left: 380 381 382 383 384 385 386 387, on right: 379 380 381
- 384 385
-encaps_list (309)
- on left: 388 389 390, on right: 275 319 320 388 389
-encaps_var (310)
- on left: 391 393 394 395 396 397, on right: 388
-@63 (311)
- on left: 392, on right: 393
-encaps_var_offset (312)
- on left: 398 399 400, on right: 393
-internal_functions_in_yacc (313)
- on left: 401 402 403 404 405 406 407, on right: 262
-isset_variables (314)
- on left: 408 410, on right: 401 410
-@64 (315)
- on left: 409, on right: 410
-class_constant (316)
- on left: 411, on right: 317
+variable_without_objects (290)
+ on left: 345 346, on right: 282 284 347 362
+static_member (291)
+ on left: 347, on right: 352
+base_variable_with_function_calls (292)
+ on left: 348 349, on right: 336 337
+base_variable (293)
+ on left: 350 351 352, on right: 290 291 348
+reference_variable (294)
+ on left: 353 354 355, on right: 345 346 350 351 353 354
+compound_variable (295)
+ on left: 356 357, on right: 355
+dim_offset (296)
+ on left: 358 359, on right: 353 363
+object_property (297)
+ on left: 360 362, on right: 290 294 336 341
+@59 (298)
+ on left: 361, on right: 362
+object_dim_list (299)
+ on left: 363 364 365, on right: 360 363 364
+variable_name (300)
+ on left: 366 367, on right: 365
+simple_indirect_reference (301)
+ on left: 368 369, on right: 346 351 369
+assignment_list (302)
+ on left: 370 371, on right: 202 370 374
+assignment_list_element (303)
+ on left: 372 374 375, on right: 370 371
+@60 (304)
+ on left: 373, on right: 374
+array_pair_list (305)
+ on left: 376 377, on right: 274
+non_empty_array_pair_list (306)
+ on left: 378 379 380 381 382 383 384 385, on right: 377 378 379
+ 382 383
+encaps_list (307)
+ on left: 386 387 388, on right: 275 319 320 386 387
+encaps_var (308)
+ on left: 389 391 392 393 394 395, on right: 386
+@61 (309)
+ on left: 390, on right: 391
+encaps_var_offset (310)
+ on left: 396 397 398, on right: 391
+internal_functions_in_yacc (311)
+ on left: 399 400 401 402 403 404 405, on right: 262
+isset_variables (312)
+ on left: 406 408, on right: 399 408
+@62 (313)
+ on left: 407, on right: 408
+class_constant (314)
+ on left: 409, on right: 317
state 0
@@ -1283,7 +1275,7 @@ state 4
state 5
- 407 internal_functions_in_yacc: T_REQUIRE_ONCE . expr
+ 405 internal_functions_in_yacc: T_REQUIRE_ONCE . expr
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -1351,7 +1343,7 @@ state 5
state 6
- 406 internal_functions_in_yacc: T_REQUIRE . expr
+ 404 internal_functions_in_yacc: T_REQUIRE . expr
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -1419,14 +1411,14 @@ state 6
state 7
- 405 internal_functions_in_yacc: T_EVAL . '(' expr ')'
+ 403 internal_functions_in_yacc: T_EVAL . '(' expr ')'
'(' shift, and go to state 103
state 8
- 404 internal_functions_in_yacc: T_INCLUDE_ONCE . expr
+ 402 internal_functions_in_yacc: T_INCLUDE_ONCE . expr
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -1494,7 +1486,7 @@ state 8
state 9
- 403 internal_functions_in_yacc: T_INCLUDE . expr
+ 401 internal_functions_in_yacc: T_INCLUDE . expr
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -2567,9 +2559,9 @@ state 32
state 33
- 358 compound_variable: T_VARIABLE .
+ 356 compound_variable: T_VARIABLE .
- $default reduce using rule 358 (compound_variable)
+ $default reduce using rule 356 (compound_variable)
state 34
@@ -3052,14 +3044,14 @@ state 54
state 55
- 401 internal_functions_in_yacc: T_ISSET . '(' isset_variables ')'
+ 399 internal_functions_in_yacc: T_ISSET . '(' isset_variables ')'
'(' shift, and go to state 167
state 56
- 402 internal_functions_in_yacc: T_EMPTY . '(' variable ')'
+ 400 internal_functions_in_yacc: T_EMPTY . '(' variable ')'
'(' shift, and go to state 168
@@ -3138,7 +3130,7 @@ state 67
320 scalar: T_START_HEREDOC . encaps_list T_END_HEREDOC
- $default reduce using rule 390 (encaps_list)
+ $default reduce using rule 388 (encaps_list)
encaps_list go to state 172
@@ -3229,19 +3221,19 @@ state 70
state 71
- 359 compound_variable: '$' . '{' expr '}'
- 370 simple_indirect_reference: '$' .
+ 357 compound_variable: '$' . '{' expr '}'
+ 368 simple_indirect_reference: '$' .
'{' shift, and go to state 175
- $default reduce using rule 370 (simple_indirect_reference)
+ $default reduce using rule 368 (simple_indirect_reference)
state 72
275 expr_without_variable: '`' . encaps_list '`'
- $default reduce using rule 390 (encaps_list)
+ $default reduce using rule 388 (encaps_list)
encaps_list go to state 176
@@ -3250,7 +3242,7 @@ state 73
319 scalar: '"' . encaps_list '"'
- $default reduce using rule 390 (encaps_list)
+ $default reduce using rule 388 (encaps_list)
encaps_list go to state 177
@@ -3327,17 +3319,17 @@ state 83
state 84
- 351 base_variable_with_function_calls: function_call .
+ 349 base_variable_with_function_calls: function_call .
- $default reduce using rule 351 (base_variable_with_function_calls)
+ $default reduce using rule 349 (base_variable_with_function_calls)
state 85
280 function_call: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' @50 function_call_parameter_list ')'
282 | fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' @51 function_call_parameter_list ')'
- 349 static_member: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
- 411 class_constant: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING
+ 347 static_member: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
+ 409 class_constant: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING
T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 180
@@ -3448,7 +3440,7 @@ state 91
219 | variable . T_SL_EQUAL expr
220 | variable . T_SR_EQUAL expr
331 r_variable: variable .
- 335 rw_variable: variable . @56
+ 333 rw_variable: variable .
'=' shift, and go to state 210
T_SR_EQUAL shift, and go to state 211
@@ -3463,75 +3455,73 @@ state 91
T_MINUS_EQUAL shift, and go to state 220
T_PLUS_EQUAL shift, and go to state 221
- T_DEC reduce using rule 334 (@56)
- T_INC reduce using rule 334 (@56)
+ T_DEC reduce using rule 333 (rw_variable)
+ T_INC reduce using rule 333 (rw_variable)
$default reduce using rule 331 (r_variable)
- @56 go to state 222
-
state 92
284 function_call: variable_without_objects . '(' @52 function_call_parameter_list ')'
- '(' shift, and go to state 223
+ '(' shift, and go to state 222
state 93
- 354 base_variable: static_member .
+ 352 base_variable: static_member .
- $default reduce using rule 354 (base_variable)
+ $default reduce using rule 352 (base_variable)
state 94
- 338 variable: base_variable_with_function_calls . T_OBJECT_OPERATOR @57 object_property @58 method_or_not variable_properties
- 339 | base_variable_with_function_calls .
+ 336 variable: base_variable_with_function_calls . T_OBJECT_OPERATOR @55 object_property @56 method_or_not variable_properties
+ 337 | base_variable_with_function_calls .
- T_OBJECT_OPERATOR shift, and go to state 224
+ T_OBJECT_OPERATOR shift, and go to state 223
- $default reduce using rule 339 (variable)
+ $default reduce using rule 337 (variable)
state 95
- 350 base_variable_with_function_calls: base_variable .
+ 348 base_variable_with_function_calls: base_variable .
- $default reduce using rule 350 (base_variable_with_function_calls)
+ $default reduce using rule 348 (base_variable_with_function_calls)
state 96
- 347 variable_without_objects: reference_variable .
- 352 base_variable: reference_variable .
- 355 reference_variable: reference_variable . '[' dim_offset ']'
- 356 | reference_variable . '{' expr '}'
+ 345 variable_without_objects: reference_variable .
+ 350 base_variable: reference_variable .
+ 353 reference_variable: reference_variable . '[' dim_offset ']'
+ 354 | reference_variable . '{' expr '}'
- '[' shift, and go to state 225
- '{' shift, and go to state 226
+ '[' shift, and go to state 224
+ '{' shift, and go to state 225
- '(' reduce using rule 347 (variable_without_objects)
- $default reduce using rule 352 (base_variable)
+ '(' reduce using rule 345 (variable_without_objects)
+ $default reduce using rule 350 (base_variable)
state 97
- 357 reference_variable: compound_variable .
+ 355 reference_variable: compound_variable .
- $default reduce using rule 357 (reference_variable)
+ $default reduce using rule 355 (reference_variable)
state 98
- 348 variable_without_objects: simple_indirect_reference . reference_variable
- 353 base_variable: simple_indirect_reference . reference_variable
- 371 simple_indirect_reference: simple_indirect_reference . '$'
+ 346 variable_without_objects: simple_indirect_reference . reference_variable
+ 351 base_variable: simple_indirect_reference . reference_variable
+ 369 simple_indirect_reference: simple_indirect_reference . '$'
T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 227
+ '$' shift, and go to state 226
- reference_variable go to state 228
+ reference_variable go to state 227
compound_variable go to state 97
@@ -3577,7 +3567,7 @@ state 101
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 407 internal_functions_in_yacc: T_REQUIRE_ONCE expr .
+ 405 internal_functions_in_yacc: T_REQUIRE_ONCE expr .
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -3606,7 +3596,7 @@ state 101
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- $default reduce using rule 407 (internal_functions_in_yacc)
+ $default reduce using rule 405 (internal_functions_in_yacc)
state 102
@@ -3637,7 +3627,7 @@ state 102
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 406 internal_functions_in_yacc: T_REQUIRE expr .
+ 404 internal_functions_in_yacc: T_REQUIRE expr .
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -3666,12 +3656,12 @@ state 102
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- $default reduce using rule 406 (internal_functions_in_yacc)
+ $default reduce using rule 404 (internal_functions_in_yacc)
state 103
- 405 internal_functions_in_yacc: T_EVAL '(' . expr ')'
+ 403 internal_functions_in_yacc: T_EVAL '(' . expr ')'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -3722,7 +3712,7 @@ state 103
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 229
+ expr go to state 228
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -3765,7 +3755,7 @@ state 104
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 404 internal_functions_in_yacc: T_INCLUDE_ONCE expr .
+ 402 internal_functions_in_yacc: T_INCLUDE_ONCE expr .
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -3794,7 +3784,7 @@ state 104
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- $default reduce using rule 404 (internal_functions_in_yacc)
+ $default reduce using rule 402 (internal_functions_in_yacc)
state 105
@@ -3825,7 +3815,7 @@ state 105
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 403 internal_functions_in_yacc: T_INCLUDE expr .
+ 401 internal_functions_in_yacc: T_INCLUDE expr .
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -3854,7 +3844,7 @@ state 105
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- $default reduce using rule 403 (internal_functions_in_yacc)
+ $default reduce using rule 401 (internal_functions_in_yacc)
state 106
@@ -4101,7 +4091,7 @@ state 111
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 230
+ expr go to state 229
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -4361,9 +4351,9 @@ state 120
280 function_call: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' @50 function_call_parameter_list ')'
282 | fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' @51 function_call_parameter_list ')'
- 349 static_member: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
+ 347 static_member: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 231
+ T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 230
state 121
@@ -4375,11 +4365,9 @@ state 121
state 122
- 335 rw_variable: variable . @56
+ 333 rw_variable: variable .
- $default reduce using rule 334 (@56)
-
- @56 go to state 222
+ $default reduce using rule 333 (rw_variable)
state 123
@@ -4433,9 +4421,9 @@ state 125
state 126
- 349 static_member: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
+ 347 static_member: fully_qualified_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 232
+ T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 231
state 127
@@ -4444,7 +4432,7 @@ state 127
$default reduce using rule 207 (@41)
- @41 go to state 233
+ @41 go to state 232
state 128
@@ -4459,32 +4447,32 @@ state 129
290 dynamic_class_name_reference: base_variable . T_OBJECT_OPERATOR @53 object_property @54 dynamic_class_name_variable_properties
291 | base_variable .
- T_OBJECT_OPERATOR shift, and go to state 234
+ T_OBJECT_OPERATOR shift, and go to state 233
$default reduce using rule 291 (dynamic_class_name_reference)
state 130
- 352 base_variable: reference_variable .
- 355 reference_variable: reference_variable . '[' dim_offset ']'
- 356 | reference_variable . '{' expr '}'
+ 350 base_variable: reference_variable .
+ 353 reference_variable: reference_variable . '[' dim_offset ']'
+ 354 | reference_variable . '{' expr '}'
- '[' shift, and go to state 225
- '{' shift, and go to state 226
+ '[' shift, and go to state 224
+ '{' shift, and go to state 225
- $default reduce using rule 352 (base_variable)
+ $default reduce using rule 350 (base_variable)
state 131
- 353 base_variable: simple_indirect_reference . reference_variable
- 371 simple_indirect_reference: simple_indirect_reference . '$'
+ 351 base_variable: simple_indirect_reference . reference_variable
+ 369 simple_indirect_reference: simple_indirect_reference . '$'
T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 227
+ '$' shift, and go to state 226
- reference_variable go to state 235
+ reference_variable go to state 234
compound_variable go to state 97
@@ -4533,7 +4521,7 @@ state 132
T_FILE shift, and go to state 66
T_START_HEREDOC shift, and go to state 67
'(' shift, and go to state 68
- ')' shift, and go to state 236
+ ')' shift, and go to state 235
'$' shift, and go to state 71
'`' shift, and go to state 72
'"' shift, and go to state 73
@@ -4543,7 +4531,7 @@ state 132
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 237
+ expr go to state 236
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -4619,7 +4607,7 @@ state 134
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 238
+ expr go to state 237
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -4640,7 +4628,7 @@ state 135
$default reduce using rule 277 (@49)
- @49 go to state 239
+ @49 go to state 238
state 136
@@ -4648,8 +4636,8 @@ state 136
45 unticked_statement: T_ECHO echo_expr_list . ';'
194 echo_expr_list: echo_expr_list . ',' expr
- ',' shift, and go to state 240
- ';' shift, and go to state 241
+ ',' shift, and go to state 239
+ ';' shift, and go to state 240
state 137
@@ -4780,7 +4768,7 @@ state 138
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 242
+ statement go to state 241
unticked_statement go to state 76
expr_without_variable go to state 83
function_call go to state 84
@@ -4808,7 +4796,7 @@ state 139
$default reduce using rule 24 (@7)
- @7 go to state 243
+ @7 go to state 242
state 140
@@ -4861,14 +4849,14 @@ state 140
$default reduce using rule 196 (for_expr)
- for_expr go to state 244
- non_empty_for_expr go to state 245
+ for_expr go to state 243
+ non_empty_for_expr go to state 244
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 246
+ expr go to state 245
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -4932,7 +4920,7 @@ state 141
'`' shift, and go to state 72
'"' shift, and go to state 73
- expr_without_variable go to state 247
+ expr_without_variable go to state 246
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
@@ -4940,7 +4928,7 @@ state 141
expr go to state 151
r_variable go to state 89
rw_variable go to state 90
- variable go to state 248
+ variable go to state 247
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -4956,7 +4944,7 @@ state 142
57 unticked_statement: T_DECLARE @19 . '(' declare_list ')' declare_statement
- '(' shift, and go to state 249
+ '(' shift, and go to state 248
state 143
@@ -5012,7 +5000,7 @@ state 143
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 250
+ expr go to state 249
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -5090,7 +5078,7 @@ state 145
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ';' shift, and go to state 251
+ ';' shift, and go to state 250
state 146
@@ -5156,18 +5144,18 @@ state 147
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ';' shift, and go to state 252
+ ';' shift, and go to state 251
state 148
84 unticked_function_declaration_statement: T_FUNCTION @27 . is_reference T_STRING @28 '(' parameter_list ')' '{' inner_statement_list '}'
- '&' shift, and go to state 253
+ '&' shift, and go to state 252
$default reduce using rule 80 (is_reference)
- is_reference go to state 254
+ is_reference go to state 253
state 149
@@ -5182,7 +5170,7 @@ state 150
41 unticked_statement: T_RETURN expr_without_variable . ';'
330 expr: expr_without_variable .
- ';' shift, and go to state 255
+ ';' shift, and go to state 254
$default reduce using rule 330 (expr)
@@ -5262,7 +5250,7 @@ state 152
219 | variable . T_SL_EQUAL expr
220 | variable . T_SR_EQUAL expr
331 r_variable: variable .
- 335 rw_variable: variable . @56
+ 333 rw_variable: variable .
'=' shift, and go to state 210
T_SR_EQUAL shift, and go to state 211
@@ -5276,20 +5264,18 @@ state 152
T_MUL_EQUAL shift, and go to state 219
T_MINUS_EQUAL shift, and go to state 220
T_PLUS_EQUAL shift, and go to state 221
- ';' shift, and go to state 256
+ ';' shift, and go to state 255
- T_DEC reduce using rule 334 (@56)
- T_INC reduce using rule 334 (@56)
+ T_DEC reduce using rule 333 (rw_variable)
+ T_INC reduce using rule 333 (rw_variable)
$default reduce using rule 331 (r_variable)
- @56 go to state 222
-
state 153
64 unticked_statement: T_TRY @20 . '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
- '{' shift, and go to state 257
+ '{' shift, and go to state 256
state 154
@@ -5348,7 +5334,7 @@ state 154
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ';' shift, and go to state 258
+ ';' shift, and go to state 257
state 155
@@ -5362,14 +5348,14 @@ state 156
77 use_filename: '(' . T_CONSTANT_ENCAPSED_STRING ')'
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 259
+ T_CONSTANT_ENCAPSED_STRING shift, and go to state 258
state 157
48 unticked_statement: T_USE use_filename . ';'
- ';' shift, and go to state 260
+ ';' shift, and go to state 259
state 158
@@ -5386,13 +5372,13 @@ state 159
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 261
+ '{' shift, and go to state 260
'$' shift, and go to state 71
function_call go to state 84
fully_qualified_class_name go to state 120
- r_variable go to state 262
- variable go to state 263
+ r_variable go to state 261
+ variable go to state 262
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -5407,8 +5393,8 @@ state 160
43 unticked_statement: T_GLOBAL global_var_list . ';'
157 global_var_list: global_var_list . ',' global_var
- ',' shift, and go to state 264
- ';' shift, and go to state 265
+ ',' shift, and go to state 263
+ ';' shift, and go to state 264
state 161
@@ -5437,7 +5423,7 @@ state 164
164 static_var_list: T_VARIABLE .
165 | T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 266
+ '=' shift, and go to state 265
$default reduce using rule 164 (static_var_list)
@@ -5448,8 +5434,8 @@ state 165
162 static_var_list: static_var_list . ',' T_VARIABLE
163 | static_var_list . ',' T_VARIABLE '=' static_scalar
- ',' shift, and go to state 267
- ';' shift, and go to state 268
+ ',' shift, and go to state 266
+ ';' shift, and go to state 267
state 166
@@ -5460,11 +5446,11 @@ state 166
T_VARIABLE shift, and go to state 33
'$' shift, and go to state 71
- unset_variables go to state 269
- unset_variable go to state 270
+ unset_variables go to state 268
+ unset_variable go to state 269
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 271
+ variable go to state 270
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -5476,7 +5462,7 @@ state 166
state 167
- 401 internal_functions_in_yacc: T_ISSET '(' . isset_variables ')'
+ 399 internal_functions_in_yacc: T_ISSET '(' . isset_variables ')'
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
@@ -5484,7 +5470,7 @@ state 167
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 272
+ variable go to state 271
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -5492,12 +5478,12 @@ state 167
reference_variable go to state 96
compound_variable go to state 97
simple_indirect_reference go to state 98
- isset_variables go to state 273
+ isset_variables go to state 272
state 168
- 402 internal_functions_in_yacc: T_EMPTY '(' . variable ')'
+ 400 internal_functions_in_yacc: T_EMPTY '(' . variable ')'
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
@@ -5505,7 +5491,7 @@ state 168
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 274
+ variable go to state 273
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -5519,7 +5505,7 @@ state 169
8 top_statement: T_HALT_COMPILER '(' . ')' ';'
- ')' shift, and go to state 275
+ ')' shift, and go to state 274
state 170
@@ -5528,7 +5514,7 @@ state 170
$default reduce using rule 201 (@39)
- @39 go to state 276
+ @39 go to state 275
state 171
@@ -5541,7 +5527,7 @@ state 171
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 277
+ '&' shift, and go to state 276
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -5580,14 +5566,14 @@ state 171
'`' shift, and go to state 72
'"' shift, and go to state 73
- $default reduce using rule 378 (array_pair_list)
+ $default reduce using rule 376 (array_pair_list)
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 278
+ expr go to state 277
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -5598,8 +5584,8 @@ state 171
reference_variable go to state 96
compound_variable go to state 97
simple_indirect_reference go to state 98
- array_pair_list go to state 279
- non_empty_array_pair_list go to state 280
+ array_pair_list go to state 278
+ non_empty_array_pair_list go to state 279
internal_functions_in_yacc go to state 99
class_constant go to state 100
@@ -5607,16 +5593,16 @@ state 171
state 172
320 scalar: T_START_HEREDOC encaps_list . T_END_HEREDOC
- 388 encaps_list: encaps_list . encaps_var
- 389 | encaps_list . T_ENCAPSED_AND_WHITESPACE
+ 386 encaps_list: encaps_list . encaps_var
+ 387 | encaps_list . T_ENCAPSED_AND_WHITESPACE
- T_VARIABLE shift, and go to state 281
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 282
- T_END_HEREDOC shift, and go to state 283
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 284
- T_CURLY_OPEN shift, and go to state 285
+ T_VARIABLE shift, and go to state 280
+ T_ENCAPSED_AND_WHITESPACE shift, and go to state 281
+ T_END_HEREDOC shift, and go to state 282
+ T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 283
+ T_CURLY_OPEN shift, and go to state 284
- encaps_var go to state 286
+ encaps_var go to state 285
state 173
@@ -5675,7 +5661,7 @@ state 173
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 287
+ ')' shift, and go to state 286
state 174
@@ -5683,16 +5669,16 @@ state 174
10 inner_statement_list: inner_statement_list . @2 inner_statement
17 unticked_statement: '{' inner_statement_list . '}'
- '}' shift, and go to state 288
+ '}' shift, and go to state 287
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
state 175
- 359 compound_variable: '$' '{' . expr '}'
+ 357 compound_variable: '$' '{' . expr '}'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -5743,7 +5729,7 @@ state 175
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 290
+ expr go to state 289
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -5761,42 +5747,42 @@ state 175
state 176
275 expr_without_variable: '`' encaps_list . '`'
- 388 encaps_list: encaps_list . encaps_var
- 389 | encaps_list . T_ENCAPSED_AND_WHITESPACE
+ 386 encaps_list: encaps_list . encaps_var
+ 387 | encaps_list . T_ENCAPSED_AND_WHITESPACE
- T_VARIABLE shift, and go to state 281
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 282
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 284
- T_CURLY_OPEN shift, and go to state 285
- '`' shift, and go to state 291
+ T_VARIABLE shift, and go to state 280
+ T_ENCAPSED_AND_WHITESPACE shift, and go to state 281
+ T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 283
+ T_CURLY_OPEN shift, and go to state 284
+ '`' shift, and go to state 290
- encaps_var go to state 286
+ encaps_var go to state 285
state 177
319 scalar: '"' encaps_list . '"'
- 388 encaps_list: encaps_list . encaps_var
- 389 | encaps_list . T_ENCAPSED_AND_WHITESPACE
+ 386 encaps_list: encaps_list . encaps_var
+ 387 | encaps_list . T_ENCAPSED_AND_WHITESPACE
- T_VARIABLE shift, and go to state 281
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 282
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 284
- T_CURLY_OPEN shift, and go to state 285
- '"' shift, and go to state 292
+ T_VARIABLE shift, and go to state 280
+ T_ENCAPSED_AND_WHITESPACE shift, and go to state 281
+ T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 283
+ T_CURLY_OPEN shift, and go to state 284
+ '"' shift, and go to state 291
- encaps_var go to state 286
+ encaps_var go to state 285
state 178
86 unticked_class_declaration_statement: class_entry_type T_STRING . extends_from @29 implements_list '{' class_statement_list '}'
- T_EXTENDS shift, and go to state 293
+ T_EXTENDS shift, and go to state 292
$default reduce using rule 92 (extends_from)
- extends_from go to state 294
+ extends_from go to state 293
state 179
@@ -5805,24 +5791,24 @@ state 179
$default reduce using rule 87 (@30)
- @30 go to state 295
+ @30 go to state 294
state 180
280 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING '(' @50 function_call_parameter_list ')'
282 | fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects '(' @51 function_call_parameter_list ')'
- 349 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
- 411 class_constant: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING
+ 347 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
+ 409 class_constant: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING
- T_STRING shift, and go to state 296
+ T_STRING shift, and go to state 295
T_VARIABLE shift, and go to state 33
'$' shift, and go to state 71
- variable_without_objects go to state 297
- reference_variable go to state 298
+ variable_without_objects go to state 296
+ reference_variable go to state 297
compound_variable go to state 97
- simple_indirect_reference go to state 299
+ simple_indirect_reference go to state 298
state 181
@@ -5831,7 +5817,7 @@ state 181
$default reduce using rule 229 (@44)
- @44 go to state 300
+ @44 go to state 299
state 182
@@ -5887,7 +5873,7 @@ state 182
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 301
+ expr go to state 300
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -5908,7 +5894,7 @@ state 183
$default reduce using rule 231 (@45)
- @45 go to state 302
+ @45 go to state 301
state 184
@@ -5917,7 +5903,7 @@ state 184
$default reduce using rule 259 (@46)
- @46 go to state 303
+ @46 go to state 302
state 185
@@ -5926,7 +5912,7 @@ state 185
$default reduce using rule 225 (@42)
- @42 go to state 304
+ @42 go to state 303
state 186
@@ -5935,7 +5921,7 @@ state 186
$default reduce using rule 227 (@43)
- @43 go to state 305
+ @43 go to state 304
state 187
@@ -5991,7 +5977,7 @@ state 187
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 306
+ expr go to state 305
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6059,7 +6045,7 @@ state 188
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 307
+ expr go to state 306
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6127,7 +6113,7 @@ state 189
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 308
+ expr go to state 307
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6195,7 +6181,7 @@ state 190
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 309
+ expr go to state 308
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6263,7 +6249,7 @@ state 191
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 310
+ expr go to state 309
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6331,7 +6317,7 @@ state 192
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 311
+ expr go to state 310
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6399,7 +6385,7 @@ state 193
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 312
+ expr go to state 311
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6467,7 +6453,7 @@ state 194
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 313
+ expr go to state 312
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6535,7 +6521,7 @@ state 195
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 314
+ expr go to state 313
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6603,7 +6589,7 @@ state 196
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 315
+ expr go to state 314
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6671,7 +6657,7 @@ state 197
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 316
+ expr go to state 315
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6739,7 +6725,7 @@ state 198
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 317
+ expr go to state 316
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6807,7 +6793,7 @@ state 199
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 318
+ expr go to state 317
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6875,7 +6861,7 @@ state 200
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 319
+ expr go to state 318
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -6943,7 +6929,7 @@ state 201
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 320
+ expr go to state 319
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7011,7 +6997,7 @@ state 202
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 321
+ expr go to state 320
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7079,7 +7065,7 @@ state 203
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 322
+ expr go to state 321
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7147,7 +7133,7 @@ state 204
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 323
+ expr go to state 322
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7215,7 +7201,7 @@ state 205
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 324
+ expr go to state 323
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7239,7 +7225,7 @@ state 206
'$' shift, and go to state 71
fully_qualified_class_name go to state 126
- class_name_reference go to state 325
+ class_name_reference go to state 324
dynamic_class_name_reference go to state 128
static_member go to state 93
base_variable go to state 129
@@ -7281,7 +7267,7 @@ state 210
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 326
+ '&' shift, and go to state 325
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -7325,7 +7311,7 @@ state 210
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 327
+ expr go to state 326
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7393,7 +7379,7 @@ state 211
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 328
+ expr go to state 327
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7461,7 +7447,7 @@ state 212
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 329
+ expr go to state 328
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7529,7 +7515,7 @@ state 213
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 330
+ expr go to state 329
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7597,7 +7583,7 @@ state 214
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 331
+ expr go to state 330
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7665,7 +7651,7 @@ state 215
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 332
+ expr go to state 331
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7733,7 +7719,7 @@ state 216
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 333
+ expr go to state 332
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7801,7 +7787,7 @@ state 217
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 334
+ expr go to state 333
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7869,7 +7855,7 @@ state 218
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 335
+ expr go to state 334
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -7937,7 +7923,7 @@ state 219
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 336
+ expr go to state 335
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -8005,7 +7991,7 @@ state 220
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 337
+ expr go to state 336
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -8073,7 +8059,7 @@ state 221
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 338
+ expr go to state 337
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -8090,32 +8076,25 @@ state 221
state 222
- 335 rw_variable: variable @56 .
-
- $default reduce using rule 335 (rw_variable)
-
-
-state 223
-
284 function_call: variable_without_objects '(' . @52 function_call_parameter_list ')'
$default reduce using rule 283 (@52)
- @52 go to state 339
+ @52 go to state 338
-state 224
+state 223
- 338 variable: base_variable_with_function_calls T_OBJECT_OPERATOR . @57 object_property @58 method_or_not variable_properties
+ 336 variable: base_variable_with_function_calls T_OBJECT_OPERATOR . @55 object_property @56 method_or_not variable_properties
- $default reduce using rule 336 (@57)
+ $default reduce using rule 334 (@55)
- @57 go to state 340
+ @55 go to state 339
-state 225
+state 224
- 355 reference_variable: reference_variable '[' . dim_offset ']'
+ 353 reference_variable: reference_variable '[' . dim_offset ']'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -8161,14 +8140,14 @@ state 225
'`' shift, and go to state 72
'"' shift, and go to state 73
- $default reduce using rule 360 (dim_offset)
+ $default reduce using rule 358 (dim_offset)
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 341
+ expr go to state 340
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -8178,15 +8157,15 @@ state 225
base_variable go to state 95
reference_variable go to state 96
compound_variable go to state 97
- dim_offset go to state 342
+ dim_offset go to state 341
simple_indirect_reference go to state 98
internal_functions_in_yacc go to state 99
class_constant go to state 100
-state 226
+state 225
- 356 reference_variable: reference_variable '{' . expr '}'
+ 354 reference_variable: reference_variable '{' . expr '}'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -8237,7 +8216,7 @@ state 226
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 343
+ expr go to state 342
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -8252,31 +8231,31 @@ state 226
class_constant go to state 100
-state 227
+state 226
- 359 compound_variable: '$' . '{' expr '}'
- 371 simple_indirect_reference: simple_indirect_reference '$' .
+ 357 compound_variable: '$' . '{' expr '}'
+ 369 simple_indirect_reference: simple_indirect_reference '$' .
'{' shift, and go to state 175
- $default reduce using rule 371 (simple_indirect_reference)
+ $default reduce using rule 369 (simple_indirect_reference)
-state 228
+state 227
- 348 variable_without_objects: simple_indirect_reference reference_variable .
- 353 base_variable: simple_indirect_reference reference_variable .
- 355 reference_variable: reference_variable . '[' dim_offset ']'
- 356 | reference_variable . '{' expr '}'
+ 346 variable_without_objects: simple_indirect_reference reference_variable .
+ 351 base_variable: simple_indirect_reference reference_variable .
+ 353 reference_variable: reference_variable . '[' dim_offset ']'
+ 354 | reference_variable . '{' expr '}'
- '[' shift, and go to state 225
- '{' shift, and go to state 226
+ '[' shift, and go to state 224
+ '{' shift, and go to state 225
- '(' reduce using rule 348 (variable_without_objects)
- $default reduce using rule 353 (base_variable)
+ '(' reduce using rule 346 (variable_without_objects)
+ $default reduce using rule 351 (base_variable)
-state 229
+state 228
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -8304,7 +8283,7 @@ state 229
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 405 internal_functions_in_yacc: T_EVAL '(' expr . ')'
+ 403 internal_functions_in_yacc: T_EVAL '(' expr . ')'
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -8332,10 +8311,10 @@ state 229
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 344
+ ')' shift, and go to state 343
-state 230
+state 229
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -8368,75 +8347,75 @@ state 230
$default reduce using rule 272 (expr_without_variable)
-state 231
+state 230
280 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING '(' @50 function_call_parameter_list ')'
282 | fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects '(' @51 function_call_parameter_list ')'
- 349 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
+ 347 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
- T_STRING shift, and go to state 345
+ T_STRING shift, and go to state 344
T_VARIABLE shift, and go to state 33
'$' shift, and go to state 71
- variable_without_objects go to state 297
- reference_variable go to state 298
+ variable_without_objects go to state 296
+ reference_variable go to state 297
compound_variable go to state 97
- simple_indirect_reference go to state 299
+ simple_indirect_reference go to state 298
-state 232
+state 231
- 349 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
+ 347 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
T_VARIABLE shift, and go to state 33
'$' shift, and go to state 71
- variable_without_objects go to state 346
- reference_variable go to state 298
+ variable_without_objects go to state 345
+ reference_variable go to state 297
compound_variable go to state 97
- simple_indirect_reference go to state 299
+ simple_indirect_reference go to state 298
-state 233
+state 232
208 expr_without_variable: T_NEW class_name_reference @41 . ctor_arguments
- '(' shift, and go to state 347
+ '(' shift, and go to state 346
$default reduce using rule 298 (ctor_arguments)
- ctor_arguments go to state 348
+ ctor_arguments go to state 347
-state 234
+state 233
290 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR . @53 object_property @54 dynamic_class_name_variable_properties
$default reduce using rule 288 (@53)
- @53 go to state 349
+ @53 go to state 348
-state 235
+state 234
- 353 base_variable: simple_indirect_reference reference_variable .
- 355 reference_variable: reference_variable . '[' dim_offset ']'
- 356 | reference_variable . '{' expr '}'
+ 351 base_variable: simple_indirect_reference reference_variable .
+ 353 reference_variable: reference_variable . '[' dim_offset ']'
+ 354 | reference_variable . '{' expr '}'
- '[' shift, and go to state 225
- '{' shift, and go to state 226
+ '[' shift, and go to state 224
+ '{' shift, and go to state 225
- $default reduce using rule 353 (base_variable)
+ $default reduce using rule 351 (base_variable)
-state 236
+state 235
296 exit_expr: '(' ')' .
$default reduce using rule 296 (exit_expr)
-state 237
+state 236
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -8492,10 +8471,10 @@ state 237
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 350
+ ')' shift, and go to state 349
-state 238
+state 237
20 unticked_statement: T_IF '(' expr . ')' @3 statement @4 elseif_list else_single
23 | T_IF '(' expr . ')' ':' @5 inner_statement_list @6 new_elseif_list new_else_single T_ENDIF ';'
@@ -8552,10 +8531,10 @@ state 238
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 351
+ ')' shift, and go to state 350
-state 239
+state 238
278 function_call: T_STRING '(' @49 . function_call_parameter_list ')'
@@ -8565,7 +8544,7 @@ state 239
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 352
+ '&' shift, and go to state 351
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -8606,9 +8585,9 @@ state 239
$default reduce using rule 150 (function_call_parameter_list)
- function_call_parameter_list go to state 353
- non_empty_function_call_parameter_list go to state 354
- expr_without_variable go to state 355
+ function_call_parameter_list go to state 352
+ non_empty_function_call_parameter_list go to state 353
+ expr_without_variable go to state 354
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
@@ -8616,7 +8595,7 @@ state 239
expr go to state 151
r_variable go to state 89
rw_variable go to state 90
- variable go to state 356
+ variable go to state 355
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -8628,7 +8607,7 @@ state 239
class_constant go to state 100
-state 240
+state 239
194 echo_expr_list: echo_expr_list ',' . expr
@@ -8681,7 +8660,7 @@ state 240
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 357
+ expr go to state 356
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -8696,21 +8675,21 @@ state 240
class_constant go to state 100
-state 241
+state 240
45 unticked_statement: T_ECHO echo_expr_list ';' .
$default reduce using rule 45 (unticked_statement)
-state 242
+state 241
29 unticked_statement: T_DO @9 statement . T_WHILE '(' @10 expr ')' ';'
- T_WHILE shift, and go to state 358
+ T_WHILE shift, and go to state 357
-state 243
+state 242
26 unticked_statement: T_WHILE '(' @7 . expr ')' @8 while_statement
@@ -8763,7 +8742,7 @@ state 243
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 359
+ expr go to state 358
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -8778,24 +8757,24 @@ state 243
class_constant go to state 100
-state 244
+state 243
33 unticked_statement: T_FOR '(' for_expr . ';' @11 for_expr ';' @12 for_expr ')' @13 for_statement
- ';' shift, and go to state 360
+ ';' shift, and go to state 359
-state 245
+state 244
197 for_expr: non_empty_for_expr .
199 non_empty_for_expr: non_empty_for_expr . ',' @38 expr
- ',' shift, and go to state 361
+ ',' shift, and go to state 360
$default reduce using rule 197 (for_expr)
-state 246
+state 245
200 non_empty_for_expr: expr .
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -8855,17 +8834,17 @@ state 246
$default reduce using rule 200 (non_empty_for_expr)
-state 247
+state 246
55 unticked_statement: T_FOREACH '(' expr_without_variable . T_AS @17 variable foreach_optional_arg ')' @18 foreach_statement
330 expr: expr_without_variable .
- T_AS shift, and go to state 362
+ T_AS shift, and go to state 361
$default reduce using rule 330 (expr)
-state 248
+state 247
52 unticked_statement: T_FOREACH '(' variable . T_AS @15 foreach_variable foreach_optional_arg ')' @16 foreach_statement
203 expr_without_variable: variable . '=' expr
@@ -8883,7 +8862,7 @@ state 248
219 | variable . T_SL_EQUAL expr
220 | variable . T_SR_EQUAL expr
331 r_variable: variable .
- 335 rw_variable: variable . @56
+ 333 rw_variable: variable .
'=' shift, and go to state 210
T_SR_EQUAL shift, and go to state 211
@@ -8897,25 +8876,23 @@ state 248
T_MUL_EQUAL shift, and go to state 219
T_MINUS_EQUAL shift, and go to state 220
T_PLUS_EQUAL shift, and go to state 221
- T_AS shift, and go to state 363
+ T_AS shift, and go to state 362
- T_DEC reduce using rule 334 (@56)
- T_INC reduce using rule 334 (@56)
+ T_DEC reduce using rule 333 (rw_variable)
+ T_INC reduce using rule 333 (rw_variable)
$default reduce using rule 331 (r_variable)
- @56 go to state 222
-
-state 249
+state 248
57 unticked_statement: T_DECLARE @19 '(' . declare_list ')' declare_statement
- T_STRING shift, and go to state 364
+ T_STRING shift, and go to state 363
- declare_list go to state 365
+ declare_list go to state 364
-state 250
+state 249
35 unticked_statement: T_SWITCH '(' expr . ')' @14 switch_case_list
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -8971,82 +8948,82 @@ state 250
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 366
+ ')' shift, and go to state 365
-state 251
+state 250
37 unticked_statement: T_BREAK expr ';' .
$default reduce using rule 37 (unticked_statement)
-state 252
+state 251
39 unticked_statement: T_CONTINUE expr ';' .
$default reduce using rule 39 (unticked_statement)
-state 253
+state 252
81 is_reference: '&' .
$default reduce using rule 81 (is_reference)
-state 254
+state 253
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference . T_STRING @28 '(' parameter_list ')' '{' inner_statement_list '}'
- T_STRING shift, and go to state 367
+ T_STRING shift, and go to state 366
-state 255
+state 254
41 unticked_statement: T_RETURN expr_without_variable ';' .
$default reduce using rule 41 (unticked_statement)
-state 256
+state 255
42 unticked_statement: T_RETURN variable ';' .
$default reduce using rule 42 (unticked_statement)
-state 257
+state 256
64 unticked_statement: T_TRY @20 '{' . inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 368
+ inner_statement_list go to state 367
-state 258
+state 257
65 unticked_statement: T_THROW expr ';' .
$default reduce using rule 65 (unticked_statement)
-state 259
+state 258
77 use_filename: '(' T_CONSTANT_ENCAPSED_STRING . ')'
- ')' shift, and go to state 369
+ ')' shift, and go to state 368
-state 260
+state 259
48 unticked_statement: T_USE use_filename ';' .
$default reduce using rule 48 (unticked_statement)
-state 261
+state 260
161 global_var: '$' '{' . expr '}'
@@ -9099,7 +9076,7 @@ state 261
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 370
+ expr go to state 369
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -9114,141 +9091,141 @@ state 261
class_constant go to state 100
-state 262
+state 261
160 global_var: '$' r_variable .
$default reduce using rule 160 (global_var)
-state 263
+state 262
331 r_variable: variable .
$default reduce using rule 331 (r_variable)
-state 264
+state 263
157 global_var_list: global_var_list ',' . global_var
T_VARIABLE shift, and go to state 158
'$' shift, and go to state 159
- global_var go to state 371
+ global_var go to state 370
-state 265
+state 264
43 unticked_statement: T_GLOBAL global_var_list ';' .
$default reduce using rule 43 (unticked_statement)
-state 266
+state 265
165 static_var_list: T_VARIABLE '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 377
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 376
+ static_class_constant go to state 377
-state 267
+state 266
162 static_var_list: static_var_list ',' . T_VARIABLE
163 | static_var_list ',' . T_VARIABLE '=' static_scalar
- T_VARIABLE shift, and go to state 379
+ T_VARIABLE shift, and go to state 378
-state 268
+state 267
44 unticked_statement: T_STATIC static_var_list ';' .
$default reduce using rule 44 (unticked_statement)
-state 269
+state 268
49 unticked_statement: T_UNSET '(' unset_variables . ')' ';'
74 unset_variables: unset_variables . ',' unset_variable
- ',' shift, and go to state 380
- ')' shift, and go to state 381
+ ',' shift, and go to state 379
+ ')' shift, and go to state 380
-state 270
+state 269
73 unset_variables: unset_variable .
$default reduce using rule 73 (unset_variables)
-state 271
+state 270
75 unset_variable: variable .
$default reduce using rule 75 (unset_variable)
-state 272
+state 271
- 408 isset_variables: variable .
+ 406 isset_variables: variable .
- $default reduce using rule 408 (isset_variables)
+ $default reduce using rule 406 (isset_variables)
-state 273
+state 272
- 401 internal_functions_in_yacc: T_ISSET '(' isset_variables . ')'
- 410 isset_variables: isset_variables . ',' @64 variable
+ 399 internal_functions_in_yacc: T_ISSET '(' isset_variables . ')'
+ 408 isset_variables: isset_variables . ',' @62 variable
- ',' shift, and go to state 382
- ')' shift, and go to state 383
+ ',' shift, and go to state 381
+ ')' shift, and go to state 382
-state 274
+state 273
- 402 internal_functions_in_yacc: T_EMPTY '(' variable . ')'
+ 400 internal_functions_in_yacc: T_EMPTY '(' variable . ')'
- ')' shift, and go to state 384
+ ')' shift, and go to state 383
-state 275
+state 274
8 top_statement: T_HALT_COMPILER '(' ')' . ';'
- ';' shift, and go to state 385
+ ';' shift, and go to state 384
-state 276
+state 275
202 expr_without_variable: T_LIST '(' @39 . assignment_list ')' '=' expr
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
- T_LIST shift, and go to state 386
+ T_LIST shift, and go to state 385
'$' shift, and go to state 71
- $default reduce using rule 377 (assignment_list_element)
+ $default reduce using rule 375 (assignment_list_element)
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 387
+ variable go to state 386
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -9256,13 +9233,13 @@ state 276
reference_variable go to state 96
compound_variable go to state 97
simple_indirect_reference go to state 98
- assignment_list go to state 388
- assignment_list_element go to state 389
+ assignment_list go to state 387
+ assignment_list_element go to state 388
-state 277
+state 276
- 387 non_empty_array_pair_list: '&' . w_variable
+ 385 non_empty_array_pair_list: '&' . w_variable
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
@@ -9270,8 +9247,8 @@ state 277
function_call go to state 84
fully_qualified_class_name go to state 120
- w_variable go to state 390
- variable go to state 391
+ w_variable go to state 389
+ variable go to state 390
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -9281,7 +9258,7 @@ state 277
simple_indirect_reference go to state 98
-state 278
+state 277
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -9309,9 +9286,9 @@ state 278
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 382 non_empty_array_pair_list: expr . T_DOUBLE_ARROW expr
- 383 | expr .
- 386 | expr . T_DOUBLE_ARROW '&' w_variable
+ 380 non_empty_array_pair_list: expr . T_DOUBLE_ARROW expr
+ 381 | expr .
+ 384 | expr . T_DOUBLE_ARROW '&' w_variable
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -9339,63 +9316,63 @@ state 278
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- T_DOUBLE_ARROW shift, and go to state 392
+ T_DOUBLE_ARROW shift, and go to state 391
- $default reduce using rule 383 (non_empty_array_pair_list)
+ $default reduce using rule 381 (non_empty_array_pair_list)
-state 279
+state 278
274 expr_without_variable: T_ARRAY '(' array_pair_list . ')'
- ')' shift, and go to state 393
+ ')' shift, and go to state 392
-state 280
+state 279
- 379 array_pair_list: non_empty_array_pair_list . possible_comma
- 380 non_empty_array_pair_list: non_empty_array_pair_list . ',' expr T_DOUBLE_ARROW expr
- 381 | non_empty_array_pair_list . ',' expr
- 384 | non_empty_array_pair_list . ',' expr T_DOUBLE_ARROW '&' w_variable
- 385 | non_empty_array_pair_list . ',' '&' w_variable
+ 377 array_pair_list: non_empty_array_pair_list . possible_comma
+ 378 non_empty_array_pair_list: non_empty_array_pair_list . ',' expr T_DOUBLE_ARROW expr
+ 379 | non_empty_array_pair_list . ',' expr
+ 382 | non_empty_array_pair_list . ',' expr T_DOUBLE_ARROW '&' w_variable
+ 383 | non_empty_array_pair_list . ',' '&' w_variable
- ',' shift, and go to state 394
+ ',' shift, and go to state 393
$default reduce using rule 323 (possible_comma)
- possible_comma go to state 395
+ possible_comma go to state 394
-state 281
+state 280
- 391 encaps_var: T_VARIABLE .
- 393 | T_VARIABLE . '[' @63 encaps_var_offset ']'
- 394 | T_VARIABLE . T_OBJECT_OPERATOR T_STRING
+ 389 encaps_var: T_VARIABLE .
+ 391 | T_VARIABLE . '[' @61 encaps_var_offset ']'
+ 392 | T_VARIABLE . T_OBJECT_OPERATOR T_STRING
- '[' shift, and go to state 396
- T_OBJECT_OPERATOR shift, and go to state 397
+ '[' shift, and go to state 395
+ T_OBJECT_OPERATOR shift, and go to state 396
- $default reduce using rule 391 (encaps_var)
+ $default reduce using rule 389 (encaps_var)
-state 282
+state 281
- 389 encaps_list: encaps_list T_ENCAPSED_AND_WHITESPACE .
+ 387 encaps_list: encaps_list T_ENCAPSED_AND_WHITESPACE .
- $default reduce using rule 389 (encaps_list)
+ $default reduce using rule 387 (encaps_list)
-state 283
+state 282
320 scalar: T_START_HEREDOC encaps_list T_END_HEREDOC .
$default reduce using rule 320 (scalar)
-state 284
+state 283
- 395 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES . expr '}'
- 396 | T_DOLLAR_OPEN_CURLY_BRACES . T_STRING_VARNAME '[' expr ']' '}'
+ 393 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES . expr '}'
+ 394 | T_DOLLAR_OPEN_CURLY_BRACES . T_STRING_VARNAME '[' expr ']' '}'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -9423,7 +9400,7 @@ state 284
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 398
+ T_STRING_VARNAME shift, and go to state 397
T_VARIABLE shift, and go to state 33
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
T_ISSET shift, and go to state 55
@@ -9446,7 +9423,7 @@ state 284
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 399
+ expr go to state 398
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -9461,9 +9438,9 @@ state 284
class_constant go to state 100
-state 285
+state 284
- 397 encaps_var: T_CURLY_OPEN . variable '}'
+ 395 encaps_var: T_CURLY_OPEN . variable '}'
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
@@ -9471,7 +9448,7 @@ state 285
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 400
+ variable go to state 399
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -9481,28 +9458,28 @@ state 285
simple_indirect_reference go to state 98
-state 286
+state 285
- 388 encaps_list: encaps_list encaps_var .
+ 386 encaps_list: encaps_list encaps_var .
- $default reduce using rule 388 (encaps_list)
+ $default reduce using rule 386 (encaps_list)
-state 287
+state 286
258 expr_without_variable: '(' expr ')' .
$default reduce using rule 258 (expr_without_variable)
-state 288
+state 287
17 unticked_statement: '{' inner_statement_list '}' .
$default reduce using rule 17 (unticked_statement)
-state 289
+state 288
10 inner_statement_list: inner_statement_list @2 . inner_statement
@@ -9558,7 +9535,7 @@ state 289
T_UNSET shift, and go to state 54
T_ISSET shift, and go to state 55
T_EMPTY shift, and go to state 56
- T_HALT_COMPILER shift, and go to state 401
+ T_HALT_COMPILER shift, and go to state 400
T_CLASS shift, and go to state 58
T_INTERFACE shift, and go to state 59
T_LIST shift, and go to state 60
@@ -9576,11 +9553,11 @@ state 289
'`' shift, and go to state 72
'"' shift, and go to state 73
- inner_statement go to state 402
- statement go to state 403
+ inner_statement go to state 401
+ statement go to state 402
unticked_statement go to state 76
- function_declaration_statement go to state 404
- class_declaration_statement go to state 405
+ function_declaration_statement go to state 403
+ class_declaration_statement go to state 404
unticked_function_declaration_statement go to state 79
unticked_class_declaration_statement go to state 80
class_entry_type go to state 81
@@ -9605,7 +9582,7 @@ state 289
class_constant go to state 100
-state 290
+state 289
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -9633,7 +9610,7 @@ state 290
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 359 compound_variable: '$' '{' expr . '}'
+ 357 compound_variable: '$' '{' expr . '}'
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -9661,97 +9638,97 @@ state 290
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- '}' shift, and go to state 406
+ '}' shift, and go to state 405
-state 291
+state 290
275 expr_without_variable: '`' encaps_list '`' .
$default reduce using rule 275 (expr_without_variable)
-state 292
+state 291
319 scalar: '"' encaps_list '"' .
$default reduce using rule 319 (scalar)
-state 293
+state 292
93 extends_from: T_EXTENDS . fully_qualified_class_name
- T_STRING shift, and go to state 407
+ T_STRING shift, and go to state 406
- fully_qualified_class_name go to state 408
+ fully_qualified_class_name go to state 407
-state 294
+state 293
86 unticked_class_declaration_statement: class_entry_type T_STRING extends_from . @29 implements_list '{' class_statement_list '}'
$default reduce using rule 85 (@29)
- @29 go to state 409
+ @29 go to state 408
-state 295
+state 294
88 unticked_class_declaration_statement: interface_entry T_STRING @30 . interface_extends_list '{' class_statement_list '}'
- T_EXTENDS shift, and go to state 410
+ T_EXTENDS shift, and go to state 409
$default reduce using rule 95 (interface_extends_list)
- interface_extends_list go to state 411
+ interface_extends_list go to state 410
-state 296
+state 295
280 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING . '(' @50 function_call_parameter_list ')'
- 411 class_constant: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING .
+ 409 class_constant: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING .
- '(' shift, and go to state 412
+ '(' shift, and go to state 411
- $default reduce using rule 411 (class_constant)
+ $default reduce using rule 409 (class_constant)
-state 297
+state 296
282 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects . '(' @51 function_call_parameter_list ')'
- 349 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects .
+ 347 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects .
- '(' shift, and go to state 413
+ '(' shift, and go to state 412
- $default reduce using rule 349 (static_member)
+ $default reduce using rule 347 (static_member)
-state 298
+state 297
- 347 variable_without_objects: reference_variable .
- 355 reference_variable: reference_variable . '[' dim_offset ']'
- 356 | reference_variable . '{' expr '}'
+ 345 variable_without_objects: reference_variable .
+ 353 reference_variable: reference_variable . '[' dim_offset ']'
+ 354 | reference_variable . '{' expr '}'
- '[' shift, and go to state 225
- '{' shift, and go to state 226
+ '[' shift, and go to state 224
+ '{' shift, and go to state 225
- $default reduce using rule 347 (variable_without_objects)
+ $default reduce using rule 345 (variable_without_objects)
-state 299
+state 298
- 348 variable_without_objects: simple_indirect_reference . reference_variable
- 371 simple_indirect_reference: simple_indirect_reference . '$'
+ 346 variable_without_objects: simple_indirect_reference . reference_variable
+ 369 simple_indirect_reference: simple_indirect_reference . '$'
T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 227
+ '$' shift, and go to state 226
- reference_variable go to state 414
+ reference_variable go to state 413
compound_variable go to state 97
-state 300
+state 299
230 expr_without_variable: expr T_LOGICAL_OR @44 . expr
@@ -9804,7 +9781,7 @@ state 300
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 415
+ expr go to state 414
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -9819,7 +9796,7 @@ state 300
class_constant go to state 100
-state 301
+state 300
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -9877,7 +9854,7 @@ state 301
$default reduce using rule 233 (expr_without_variable)
-state 302
+state 301
232 expr_without_variable: expr T_LOGICAL_AND @45 . expr
@@ -9930,7 +9907,7 @@ state 302
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 416
+ expr go to state 415
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -9945,7 +9922,7 @@ state 302
class_constant go to state 100
-state 303
+state 302
261 expr_without_variable: expr '?' @46 . expr ':' @47 expr
@@ -9998,7 +9975,7 @@ state 303
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 417
+ expr go to state 416
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -10013,7 +9990,7 @@ state 303
class_constant go to state 100
-state 304
+state 303
226 expr_without_variable: expr T_BOOLEAN_OR @42 . expr
@@ -10066,7 +10043,7 @@ state 304
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 418
+ expr go to state 417
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -10081,7 +10058,7 @@ state 304
class_constant go to state 100
-state 305
+state 304
228 expr_without_variable: expr T_BOOLEAN_AND @43 . expr
@@ -10134,7 +10111,7 @@ state 305
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 419
+ expr go to state 418
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -10149,7 +10126,7 @@ state 305
class_constant go to state 100
-state 306
+state 305
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10202,7 +10179,7 @@ state 306
$default reduce using rule 234 (expr_without_variable)
-state 307
+state 306
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10254,7 +10231,7 @@ state 307
$default reduce using rule 236 (expr_without_variable)
-state 308
+state 307
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10305,7 +10282,7 @@ state 308
$default reduce using rule 235 (expr_without_variable)
-state 309
+state 308
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10357,7 +10334,7 @@ state 309
$default reduce using rule 250 (expr_without_variable)
-state 310
+state 309
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10409,7 +10386,7 @@ state 310
$default reduce using rule 249 (expr_without_variable)
-state 311
+state 310
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10461,7 +10438,7 @@ state 311
$default reduce using rule 252 (expr_without_variable)
-state 312
+state 311
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10513,7 +10490,7 @@ state 312
$default reduce using rule 251 (expr_without_variable)
-state 313
+state 312
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10561,7 +10538,7 @@ state 313
$default reduce using rule 253 (expr_without_variable)
-state 314
+state 313
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10609,7 +10586,7 @@ state 314
$default reduce using rule 255 (expr_without_variable)
-state 315
+state 314
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10657,7 +10634,7 @@ state 315
$default reduce using rule 256 (expr_without_variable)
-state 316
+state 315
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10705,7 +10682,7 @@ state 316
$default reduce using rule 254 (expr_without_variable)
-state 317
+state 316
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10746,7 +10723,7 @@ state 317
$default reduce using rule 244 (expr_without_variable)
-state 318
+state 317
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10787,7 +10764,7 @@ state 318
$default reduce using rule 243 (expr_without_variable)
-state 319
+state 318
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10825,7 +10802,7 @@ state 319
$default reduce using rule 238 (expr_without_variable)
-state 320
+state 319
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10863,7 +10840,7 @@ state 320
$default reduce using rule 239 (expr_without_variable)
-state 321
+state 320
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10901,7 +10878,7 @@ state 321
$default reduce using rule 237 (expr_without_variable)
-state 322
+state 321
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10936,7 +10913,7 @@ state 322
$default reduce using rule 240 (expr_without_variable)
-state 323
+state 322
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -10971,7 +10948,7 @@ state 323
$default reduce using rule 241 (expr_without_variable)
-state 324
+state 323
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -11006,26 +10983,26 @@ state 324
$default reduce using rule 242 (expr_without_variable)
-state 325
+state 324
257 expr_without_variable: expr T_INSTANCEOF class_name_reference .
$default reduce using rule 257 (expr_without_variable)
-state 326
+state 325
204 expr_without_variable: variable '=' '&' . variable
206 | variable '=' '&' . T_NEW class_name_reference @40 ctor_arguments
- T_NEW shift, and go to state 420
+ T_NEW shift, and go to state 419
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
'$' shift, and go to state 71
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 421
+ variable go to state 420
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -11035,7 +11012,7 @@ state 326
simple_indirect_reference go to state 98
-state 327
+state 326
203 expr_without_variable: variable '=' expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11092,7 +11069,7 @@ state 327
$default reduce using rule 203 (expr_without_variable)
-state 328
+state 327
220 expr_without_variable: variable T_SR_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11149,7 +11126,7 @@ state 328
$default reduce using rule 220 (expr_without_variable)
-state 329
+state 328
219 expr_without_variable: variable T_SL_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11206,7 +11183,7 @@ state 329
$default reduce using rule 219 (expr_without_variable)
-state 330
+state 329
218 expr_without_variable: variable T_XOR_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11263,7 +11240,7 @@ state 330
$default reduce using rule 218 (expr_without_variable)
-state 331
+state 330
217 expr_without_variable: variable T_OR_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11320,7 +11297,7 @@ state 331
$default reduce using rule 217 (expr_without_variable)
-state 332
+state 331
216 expr_without_variable: variable T_AND_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11377,7 +11354,7 @@ state 332
$default reduce using rule 216 (expr_without_variable)
-state 333
+state 332
215 expr_without_variable: variable T_MOD_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11434,7 +11411,7 @@ state 333
$default reduce using rule 215 (expr_without_variable)
-state 334
+state 333
214 expr_without_variable: variable T_CONCAT_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11491,7 +11468,7 @@ state 334
$default reduce using rule 214 (expr_without_variable)
-state 335
+state 334
213 expr_without_variable: variable T_DIV_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11548,7 +11525,7 @@ state 335
$default reduce using rule 213 (expr_without_variable)
-state 336
+state 335
212 expr_without_variable: variable T_MUL_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11605,7 +11582,7 @@ state 336
$default reduce using rule 212 (expr_without_variable)
-state 337
+state 336
211 expr_without_variable: variable T_MINUS_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11662,7 +11639,7 @@ state 337
$default reduce using rule 211 (expr_without_variable)
-state 338
+state 337
210 expr_without_variable: variable T_PLUS_EQUAL expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -11719,7 +11696,7 @@ state 338
$default reduce using rule 210 (expr_without_variable)
-state 339
+state 338
284 function_call: variable_without_objects '(' @52 . function_call_parameter_list ')'
@@ -11729,7 +11706,7 @@ state 339
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 352
+ '&' shift, and go to state 351
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -11770,9 +11747,9 @@ state 339
$default reduce using rule 150 (function_call_parameter_list)
- function_call_parameter_list go to state 422
- non_empty_function_call_parameter_list go to state 354
- expr_without_variable go to state 355
+ function_call_parameter_list go to state 421
+ non_empty_function_call_parameter_list go to state 353
+ expr_without_variable go to state 354
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
@@ -11780,7 +11757,7 @@ state 339
expr go to state 151
r_variable go to state 89
rw_variable go to state 90
- variable go to state 356
+ variable go to state 355
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -11792,25 +11769,25 @@ state 339
class_constant go to state 100
-state 340
+state 339
- 338 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @57 . object_property @58 method_or_not variable_properties
+ 336 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @55 . object_property @56 method_or_not variable_properties
- T_STRING shift, and go to state 423
+ T_STRING shift, and go to state 422
T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 424
+ '{' shift, and go to state 423
'$' shift, and go to state 71
- variable_without_objects go to state 425
- reference_variable go to state 298
+ variable_without_objects go to state 424
+ reference_variable go to state 297
compound_variable go to state 97
- object_property go to state 426
- object_dim_list go to state 427
- variable_name go to state 428
- simple_indirect_reference go to state 299
+ object_property go to state 425
+ object_dim_list go to state 426
+ variable_name go to state 427
+ simple_indirect_reference go to state 298
-state 341
+state 340
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -11838,7 +11815,7 @@ state 341
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 361 dim_offset: expr .
+ 359 dim_offset: expr .
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -11867,17 +11844,17 @@ state 341
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- $default reduce using rule 361 (dim_offset)
+ $default reduce using rule 359 (dim_offset)
-state 342
+state 341
- 355 reference_variable: reference_variable '[' dim_offset . ']'
+ 353 reference_variable: reference_variable '[' dim_offset . ']'
- ']' shift, and go to state 429
+ ']' shift, and go to state 428
-state 343
+state 342
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -11905,7 +11882,7 @@ state 343
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 356 reference_variable: reference_variable '{' expr . '}'
+ 354 reference_variable: reference_variable '{' expr . '}'
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -11933,31 +11910,31 @@ state 343
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- '}' shift, and go to state 430
+ '}' shift, and go to state 429
-state 344
+state 343
- 405 internal_functions_in_yacc: T_EVAL '(' expr ')' .
+ 403 internal_functions_in_yacc: T_EVAL '(' expr ')' .
- $default reduce using rule 405 (internal_functions_in_yacc)
+ $default reduce using rule 403 (internal_functions_in_yacc)
-state 345
+state 344
280 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING . '(' @50 function_call_parameter_list ')'
- '(' shift, and go to state 412
+ '(' shift, and go to state 411
-state 346
+state 345
- 349 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects .
+ 347 static_member: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects .
- $default reduce using rule 349 (static_member)
+ $default reduce using rule 347 (static_member)
-state 347
+state 346
299 ctor_arguments: '(' . function_call_parameter_list ')'
@@ -11967,7 +11944,7 @@ state 347
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 352
+ '&' shift, and go to state 351
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -12008,9 +11985,9 @@ state 347
$default reduce using rule 150 (function_call_parameter_list)
- function_call_parameter_list go to state 431
- non_empty_function_call_parameter_list go to state 354
- expr_without_variable go to state 355
+ function_call_parameter_list go to state 430
+ non_empty_function_call_parameter_list go to state 353
+ expr_without_variable go to state 354
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
@@ -12018,7 +11995,7 @@ state 347
expr go to state 151
r_variable go to state 89
rw_variable go to state 90
- variable go to state 356
+ variable go to state 355
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -12030,51 +12007,51 @@ state 347
class_constant go to state 100
-state 348
+state 347
208 expr_without_variable: T_NEW class_name_reference @41 ctor_arguments .
$default reduce using rule 208 (expr_without_variable)
-state 349
+state 348
290 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR @53 . object_property @54 dynamic_class_name_variable_properties
- T_STRING shift, and go to state 423
+ T_STRING shift, and go to state 422
T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 424
+ '{' shift, and go to state 423
'$' shift, and go to state 71
- variable_without_objects go to state 425
- reference_variable go to state 298
+ variable_without_objects go to state 424
+ reference_variable go to state 297
compound_variable go to state 97
- object_property go to state 432
- object_dim_list go to state 427
- variable_name go to state 428
- simple_indirect_reference go to state 299
+ object_property go to state 431
+ object_dim_list go to state 426
+ variable_name go to state 427
+ simple_indirect_reference go to state 298
-state 350
+state 349
297 exit_expr: '(' expr ')' .
$default reduce using rule 297 (exit_expr)
-state 351
+state 350
20 unticked_statement: T_IF '(' expr ')' . @3 statement @4 elseif_list else_single
23 | T_IF '(' expr ')' . ':' @5 inner_statement_list @6 new_elseif_list new_else_single T_ENDIF ';'
- ':' shift, and go to state 433
+ ':' shift, and go to state 432
$default reduce using rule 18 (@3)
- @3 go to state 434
+ @3 go to state 433
-state 352
+state 351
153 non_empty_function_call_parameter_list: '&' . w_variable
@@ -12084,8 +12061,8 @@ state 352
function_call go to state 84
fully_qualified_class_name go to state 120
- w_variable go to state 435
- variable go to state 391
+ w_variable go to state 434
+ variable go to state 390
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -12095,26 +12072,26 @@ state 352
simple_indirect_reference go to state 98
-state 353
+state 352
278 function_call: T_STRING '(' @49 function_call_parameter_list . ')'
- ')' shift, and go to state 436
+ ')' shift, and go to state 435
-state 354
+state 353
149 function_call_parameter_list: non_empty_function_call_parameter_list .
154 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list . ',' expr_without_variable
155 | non_empty_function_call_parameter_list . ',' variable
156 | non_empty_function_call_parameter_list . ',' '&' w_variable
- ',' shift, and go to state 437
+ ',' shift, and go to state 436
$default reduce using rule 149 (function_call_parameter_list)
-state 355
+state 354
151 non_empty_function_call_parameter_list: expr_without_variable .
330 expr: expr_without_variable .
@@ -12124,7 +12101,7 @@ state 355
$default reduce using rule 330 (expr)
-state 356
+state 355
152 non_empty_function_call_parameter_list: variable .
203 expr_without_variable: variable . '=' expr
@@ -12142,7 +12119,7 @@ state 356
219 | variable . T_SL_EQUAL expr
220 | variable . T_SR_EQUAL expr
331 r_variable: variable .
- 335 rw_variable: variable . @56
+ 333 rw_variable: variable .
'=' shift, and go to state 210
T_SR_EQUAL shift, and go to state 211
@@ -12158,15 +12135,13 @@ state 356
T_PLUS_EQUAL shift, and go to state 221
',' reduce using rule 152 (non_empty_function_call_parameter_list)
- T_DEC reduce using rule 334 (@56)
- T_INC reduce using rule 334 (@56)
+ T_DEC reduce using rule 333 (rw_variable)
+ T_INC reduce using rule 333 (rw_variable)
')' reduce using rule 152 (non_empty_function_call_parameter_list)
$default reduce using rule 331 (r_variable)
- @56 go to state 222
-
-state 357
+state 356
194 echo_expr_list: echo_expr_list ',' expr .
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -12226,14 +12201,14 @@ state 357
$default reduce using rule 194 (echo_expr_list)
-state 358
+state 357
29 unticked_statement: T_DO @9 statement T_WHILE . '(' @10 expr ')' ';'
- '(' shift, and go to state 438
+ '(' shift, and go to state 437
-state 359
+state 358
26 unticked_statement: T_WHILE '(' @7 expr . ')' @8 while_statement
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -12289,99 +12264,99 @@ state 359
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 439
+ ')' shift, and go to state 438
-state 360
+state 359
33 unticked_statement: T_FOR '(' for_expr ';' . @11 for_expr ';' @12 for_expr ')' @13 for_statement
$default reduce using rule 30 (@11)
- @11 go to state 440
+ @11 go to state 439
-state 361
+state 360
199 non_empty_for_expr: non_empty_for_expr ',' . @38 expr
$default reduce using rule 198 (@38)
- @38 go to state 441
+ @38 go to state 440
-state 362
+state 361
55 unticked_statement: T_FOREACH '(' expr_without_variable T_AS . @17 variable foreach_optional_arg ')' @18 foreach_statement
$default reduce using rule 53 (@17)
- @17 go to state 442
+ @17 go to state 441
-state 363
+state 362
52 unticked_statement: T_FOREACH '(' variable T_AS . @15 foreach_variable foreach_optional_arg ')' @16 foreach_statement
$default reduce using rule 50 (@15)
- @15 go to state 443
+ @15 go to state 442
-state 364
+state 363
111 declare_list: T_STRING . '=' static_scalar
- '=' shift, and go to state 444
+ '=' shift, and go to state 443
-state 365
+state 364
57 unticked_statement: T_DECLARE @19 '(' declare_list . ')' declare_statement
112 declare_list: declare_list . ',' T_STRING '=' static_scalar
- ',' shift, and go to state 445
- ')' shift, and go to state 446
+ ',' shift, and go to state 444
+ ')' shift, and go to state 445
-state 366
+state 365
35 unticked_statement: T_SWITCH '(' expr ')' . @14 switch_case_list
$default reduce using rule 34 (@14)
- @14 go to state 447
+ @14 go to state 446
-state 367
+state 366
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference T_STRING . @28 '(' parameter_list ')' '{' inner_statement_list '}'
$default reduce using rule 83 (@28)
- @28 go to state 448
+ @28 go to state 447
-state 368
+state 367
10 inner_statement_list: inner_statement_list . @2 inner_statement
64 unticked_statement: T_TRY @20 '{' inner_statement_list . '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
- '}' shift, and go to state 449
+ '}' shift, and go to state 448
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 369
+state 368
77 use_filename: '(' T_CONSTANT_ENCAPSED_STRING ')' .
$default reduce using rule 77 (use_filename)
-state 370
+state 369
161 global_var: '$' '{' expr . '}'
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -12437,109 +12412,109 @@ state 370
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- '}' shift, and go to state 450
+ '}' shift, and go to state 449
-state 371
+state 370
157 global_var_list: global_var_list ',' global_var .
$default reduce using rule 157 (global_var_list)
-state 372
+state 371
310 static_scalar: '+' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 451
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 450
+ static_class_constant go to state 377
-state 373
+state 372
311 static_scalar: '-' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 452
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 451
+ static_class_constant go to state 377
-state 374
+state 373
309 static_scalar: T_STRING .
314 static_class_constant: T_STRING . T_PAAMAYIM_NEKUDOTAYIM T_STRING
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 453
+ T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 452
$default reduce using rule 309 (static_scalar)
-state 375
+state 374
312 static_scalar: T_ARRAY . '(' static_array_pair_list ')'
- '(' shift, and go to state 454
+ '(' shift, and go to state 453
-state 376
+state 375
308 static_scalar: common_scalar .
$default reduce using rule 308 (static_scalar)
-state 377
+state 376
165 static_var_list: T_VARIABLE '=' static_scalar .
$default reduce using rule 165 (static_var_list)
-state 378
+state 377
313 static_scalar: static_class_constant .
$default reduce using rule 313 (static_scalar)
-state 379
+state 378
162 static_var_list: static_var_list ',' T_VARIABLE .
163 | static_var_list ',' T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 455
+ '=' shift, and go to state 454
$default reduce using rule 162 (static_var_list)
-state 380
+state 379
74 unset_variables: unset_variables ',' . unset_variable
@@ -12547,10 +12522,10 @@ state 380
T_VARIABLE shift, and go to state 33
'$' shift, and go to state 71
- unset_variable go to state 456
+ unset_variable go to state 455
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 271
+ variable go to state 270
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -12560,93 +12535,91 @@ state 380
simple_indirect_reference go to state 98
-state 381
+state 380
49 unticked_statement: T_UNSET '(' unset_variables ')' . ';'
- ';' shift, and go to state 457
+ ';' shift, and go to state 456
-state 382
+state 381
- 410 isset_variables: isset_variables ',' . @64 variable
+ 408 isset_variables: isset_variables ',' . @62 variable
- $default reduce using rule 409 (@64)
+ $default reduce using rule 407 (@62)
- @64 go to state 458
+ @62 go to state 457
+
+
+state 382
+
+ 399 internal_functions_in_yacc: T_ISSET '(' isset_variables ')' .
+
+ $default reduce using rule 399 (internal_functions_in_yacc)
state 383
- 401 internal_functions_in_yacc: T_ISSET '(' isset_variables ')' .
+ 400 internal_functions_in_yacc: T_EMPTY '(' variable ')' .
- $default reduce using rule 401 (internal_functions_in_yacc)
+ $default reduce using rule 400 (internal_functions_in_yacc)
state 384
- 402 internal_functions_in_yacc: T_EMPTY '(' variable ')' .
+ 8 top_statement: T_HALT_COMPILER '(' ')' ';' .
- $default reduce using rule 402 (internal_functions_in_yacc)
+ $default reduce using rule 8 (top_statement)
state 385
- 8 top_statement: T_HALT_COMPILER '(' ')' ';' .
+ 374 assignment_list_element: T_LIST . '(' @60 assignment_list ')'
- $default reduce using rule 8 (top_statement)
+ '(' shift, and go to state 458
state 386
- 376 assignment_list_element: T_LIST . '(' @62 assignment_list ')'
+ 372 assignment_list_element: variable .
- '(' shift, and go to state 459
+ $default reduce using rule 372 (assignment_list_element)
state 387
- 374 assignment_list_element: variable .
+ 202 expr_without_variable: T_LIST '(' @39 assignment_list . ')' '=' expr
+ 370 assignment_list: assignment_list . ',' assignment_list_element
- $default reduce using rule 374 (assignment_list_element)
+ ',' shift, and go to state 459
+ ')' shift, and go to state 460
state 388
- 202 expr_without_variable: T_LIST '(' @39 assignment_list . ')' '=' expr
- 372 assignment_list: assignment_list . ',' assignment_list_element
+ 371 assignment_list: assignment_list_element .
- ',' shift, and go to state 460
- ')' shift, and go to state 461
+ $default reduce using rule 371 (assignment_list)
state 389
- 373 assignment_list: assignment_list_element .
+ 385 non_empty_array_pair_list: '&' w_variable .
- $default reduce using rule 373 (assignment_list)
+ $default reduce using rule 385 (non_empty_array_pair_list)
state 390
- 387 non_empty_array_pair_list: '&' w_variable .
+ 332 w_variable: variable .
- $default reduce using rule 387 (non_empty_array_pair_list)
+ $default reduce using rule 332 (w_variable)
state 391
- 333 w_variable: variable . @55
-
- $default reduce using rule 332 (@55)
-
- @55 go to state 462
-
-
-state 392
-
- 382 non_empty_array_pair_list: expr T_DOUBLE_ARROW . expr
- 386 | expr T_DOUBLE_ARROW . '&' w_variable
+ 380 non_empty_array_pair_list: expr T_DOUBLE_ARROW . expr
+ 384 | expr T_DOUBLE_ARROW . '&' w_variable
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -12654,7 +12627,7 @@ state 392
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 463
+ '&' shift, and go to state 461
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -12698,7 +12671,7 @@ state 392
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 464
+ expr go to state 462
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -12713,20 +12686,20 @@ state 392
class_constant go to state 100
-state 393
+state 392
274 expr_without_variable: T_ARRAY '(' array_pair_list ')' .
$default reduce using rule 274 (expr_without_variable)
-state 394
+state 393
324 possible_comma: ',' .
- 380 non_empty_array_pair_list: non_empty_array_pair_list ',' . expr T_DOUBLE_ARROW expr
- 381 | non_empty_array_pair_list ',' . expr
- 384 | non_empty_array_pair_list ',' . expr T_DOUBLE_ARROW '&' w_variable
- 385 | non_empty_array_pair_list ',' . '&' w_variable
+ 378 non_empty_array_pair_list: non_empty_array_pair_list ',' . expr T_DOUBLE_ARROW expr
+ 379 | non_empty_array_pair_list ',' . expr
+ 382 | non_empty_array_pair_list ',' . expr T_DOUBLE_ARROW '&' w_variable
+ 383 | non_empty_array_pair_list ',' . '&' w_variable
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -12734,7 +12707,7 @@ state 394
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 465
+ '&' shift, and go to state 463
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -12780,7 +12753,7 @@ state 394
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 466
+ expr go to state 464
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -12795,40 +12768,40 @@ state 394
class_constant go to state 100
-state 395
+state 394
- 379 array_pair_list: non_empty_array_pair_list possible_comma .
+ 377 array_pair_list: non_empty_array_pair_list possible_comma .
- $default reduce using rule 379 (array_pair_list)
+ $default reduce using rule 377 (array_pair_list)
-state 396
+state 395
- 393 encaps_var: T_VARIABLE '[' . @63 encaps_var_offset ']'
+ 391 encaps_var: T_VARIABLE '[' . @61 encaps_var_offset ']'
- $default reduce using rule 392 (@63)
+ $default reduce using rule 390 (@61)
- @63 go to state 467
+ @61 go to state 465
-state 397
+state 396
- 394 encaps_var: T_VARIABLE T_OBJECT_OPERATOR . T_STRING
+ 392 encaps_var: T_VARIABLE T_OBJECT_OPERATOR . T_STRING
- T_STRING shift, and go to state 468
+ T_STRING shift, and go to state 466
-state 398
+state 397
316 scalar: T_STRING_VARNAME .
- 396 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME . '[' expr ']' '}'
+ 394 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME . '[' expr ']' '}'
- '[' shift, and go to state 469
+ '[' shift, and go to state 467
$default reduce using rule 316 (scalar)
-state 399
+state 398
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -12856,7 +12829,7 @@ state 399
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 395 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES expr . '}'
+ 393 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES expr . '}'
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -12884,131 +12857,131 @@ state 399
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- '}' shift, and go to state 470
+ '}' shift, and go to state 468
-state 400
+state 399
- 397 encaps_var: T_CURLY_OPEN variable . '}'
+ 395 encaps_var: T_CURLY_OPEN variable . '}'
- '}' shift, and go to state 471
+ '}' shift, and go to state 469
-state 401
+state 400
15 inner_statement: T_HALT_COMPILER . '(' ')' ';'
- '(' shift, and go to state 472
+ '(' shift, and go to state 470
-state 402
+state 401
10 inner_statement_list: inner_statement_list @2 inner_statement .
$default reduce using rule 10 (inner_statement_list)
-state 403
+state 402
12 inner_statement: statement .
$default reduce using rule 12 (inner_statement)
-state 404
+state 403
13 inner_statement: function_declaration_statement .
$default reduce using rule 13 (inner_statement)
-state 405
+state 404
14 inner_statement: class_declaration_statement .
$default reduce using rule 14 (inner_statement)
-state 406
+state 405
- 359 compound_variable: '$' '{' expr '}' .
+ 357 compound_variable: '$' '{' expr '}' .
- $default reduce using rule 359 (compound_variable)
+ $default reduce using rule 357 (compound_variable)
-state 407
+state 406
285 fully_qualified_class_name: T_STRING .
$default reduce using rule 285 (fully_qualified_class_name)
-state 408
+state 407
93 extends_from: T_EXTENDS fully_qualified_class_name .
$default reduce using rule 93 (extends_from)
-state 409
+state 408
86 unticked_class_declaration_statement: class_entry_type T_STRING extends_from @29 . implements_list '{' class_statement_list '}'
- T_IMPLEMENTS shift, and go to state 473
+ T_IMPLEMENTS shift, and go to state 471
$default reduce using rule 97 (implements_list)
- implements_list go to state 474
+ implements_list go to state 472
-state 410
+state 409
96 interface_extends_list: T_EXTENDS . interface_list
- T_STRING shift, and go to state 407
+ T_STRING shift, and go to state 406
- interface_list go to state 475
- fully_qualified_class_name go to state 476
+ interface_list go to state 473
+ fully_qualified_class_name go to state 474
-state 411
+state 410
88 unticked_class_declaration_statement: interface_entry T_STRING @30 interface_extends_list . '{' class_statement_list '}'
- '{' shift, and go to state 477
+ '{' shift, and go to state 475
-state 412
+state 411
280 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' . @50 function_call_parameter_list ')'
$default reduce using rule 279 (@50)
- @50 go to state 478
+ @50 go to state 476
-state 413
+state 412
282 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' . @51 function_call_parameter_list ')'
$default reduce using rule 281 (@51)
- @51 go to state 479
+ @51 go to state 477
-state 414
+state 413
- 348 variable_without_objects: simple_indirect_reference reference_variable .
- 355 reference_variable: reference_variable . '[' dim_offset ']'
- 356 | reference_variable . '{' expr '}'
+ 346 variable_without_objects: simple_indirect_reference reference_variable .
+ 353 reference_variable: reference_variable . '[' dim_offset ']'
+ 354 | reference_variable . '{' expr '}'
- '[' shift, and go to state 225
- '{' shift, and go to state 226
+ '[' shift, and go to state 224
+ '{' shift, and go to state 225
- $default reduce using rule 348 (variable_without_objects)
+ $default reduce using rule 346 (variable_without_objects)
-state 415
+state 414
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -13067,7 +13040,7 @@ state 415
$default reduce using rule 230 (expr_without_variable)
-state 416
+state 415
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -13124,7 +13097,7 @@ state 416
$default reduce using rule 232 (expr_without_variable)
-state 417
+state 416
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -13158,7 +13131,7 @@ state 417
T_LOGICAL_XOR shift, and go to state 182
T_LOGICAL_AND shift, and go to state 183
'?' shift, and go to state 184
- ':' shift, and go to state 480
+ ':' shift, and go to state 478
T_BOOLEAN_OR shift, and go to state 185
T_BOOLEAN_AND shift, and go to state 186
'|' shift, and go to state 187
@@ -13183,7 +13156,7 @@ state 417
T_INSTANCEOF shift, and go to state 206
-state 418
+state 417
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
226 | expr T_BOOLEAN_OR @42 expr .
@@ -13238,7 +13211,7 @@ state 418
$default reduce using rule 226 (expr_without_variable)
-state 419
+state 418
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -13292,7 +13265,7 @@ state 419
$default reduce using rule 228 (expr_without_variable)
-state 420
+state 419
206 expr_without_variable: variable '=' '&' T_NEW . class_name_reference @40 ctor_arguments
@@ -13301,7 +13274,7 @@ state 420
'$' shift, and go to state 71
fully_qualified_class_name go to state 126
- class_name_reference go to state 481
+ class_name_reference go to state 479
dynamic_class_name_reference go to state 128
static_member go to state 93
base_variable go to state 129
@@ -13310,30 +13283,30 @@ state 420
simple_indirect_reference go to state 131
-state 421
+state 420
204 expr_without_variable: variable '=' '&' variable .
$default reduce using rule 204 (expr_without_variable)
-state 422
+state 421
284 function_call: variable_without_objects '(' @52 function_call_parameter_list . ')'
- ')' shift, and go to state 482
+ ')' shift, and go to state 480
-state 423
+state 422
- 368 variable_name: T_STRING .
+ 366 variable_name: T_STRING .
- $default reduce using rule 368 (variable_name)
+ $default reduce using rule 366 (variable_name)
-state 424
+state 423
- 369 variable_name: '{' . expr '}'
+ 367 variable_name: '{' . expr '}'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -13384,7 +13357,7 @@ state 424
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 483
+ expr go to state 481
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -13399,83 +13372,83 @@ state 424
class_constant go to state 100
+state 424
+
+ 362 object_property: variable_without_objects . @59
+
+ $default reduce using rule 361 (@59)
+
+ @59 go to state 482
+
+
state 425
- 364 object_property: variable_without_objects . @61
+ 336 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @55 object_property . @56 method_or_not variable_properties
- $default reduce using rule 363 (@61)
+ $default reduce using rule 335 (@56)
- @61 go to state 484
+ @56 go to state 483
state 426
- 338 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @57 object_property . @58 method_or_not variable_properties
+ 360 object_property: object_dim_list .
+ 363 object_dim_list: object_dim_list . '[' dim_offset ']'
+ 364 | object_dim_list . '{' expr '}'
- $default reduce using rule 337 (@58)
+ '[' shift, and go to state 484
+ '{' shift, and go to state 485
- @58 go to state 485
+ $default reduce using rule 360 (object_property)
state 427
- 362 object_property: object_dim_list .
- 365 object_dim_list: object_dim_list . '[' dim_offset ']'
- 366 | object_dim_list . '{' expr '}'
+ 365 object_dim_list: variable_name .
- '[' shift, and go to state 486
- '{' shift, and go to state 487
-
- $default reduce using rule 362 (object_property)
+ $default reduce using rule 365 (object_dim_list)
state 428
- 367 object_dim_list: variable_name .
+ 353 reference_variable: reference_variable '[' dim_offset ']' .
- $default reduce using rule 367 (object_dim_list)
+ $default reduce using rule 353 (reference_variable)
state 429
- 355 reference_variable: reference_variable '[' dim_offset ']' .
+ 354 reference_variable: reference_variable '{' expr '}' .
- $default reduce using rule 355 (reference_variable)
+ $default reduce using rule 354 (reference_variable)
state 430
- 356 reference_variable: reference_variable '{' expr '}' .
-
- $default reduce using rule 356 (reference_variable)
-
-
-state 431
-
299 ctor_arguments: '(' function_call_parameter_list . ')'
- ')' shift, and go to state 488
+ ')' shift, and go to state 486
-state 432
+state 431
290 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR @53 object_property . @54 dynamic_class_name_variable_properties
$default reduce using rule 289 (@54)
- @54 go to state 489
+ @54 go to state 487
-state 433
+state 432
23 unticked_statement: T_IF '(' expr ')' ':' . @5 inner_statement_list @6 new_elseif_list new_else_single T_ENDIF ';'
$default reduce using rule 21 (@5)
- @5 go to state 490
+ @5 go to state 488
-state 434
+state 433
20 unticked_statement: T_IF '(' expr ')' @3 . statement @4 elseif_list else_single
@@ -13543,7 +13516,7 @@ state 434
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 491
+ statement go to state 489
unticked_statement go to state 76
expr_without_variable go to state 83
function_call go to state 84
@@ -13565,21 +13538,21 @@ state 434
class_constant go to state 100
-state 435
+state 434
153 non_empty_function_call_parameter_list: '&' w_variable .
$default reduce using rule 153 (non_empty_function_call_parameter_list)
-state 436
+state 435
278 function_call: T_STRING '(' @49 function_call_parameter_list ')' .
$default reduce using rule 278 (function_call)
-state 437
+state 436
154 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' . expr_without_variable
155 | non_empty_function_call_parameter_list ',' . variable
@@ -13591,7 +13564,7 @@ state 437
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 492
+ '&' shift, and go to state 490
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -13630,7 +13603,7 @@ state 437
'`' shift, and go to state 72
'"' shift, and go to state 73
- expr_without_variable go to state 493
+ expr_without_variable go to state 491
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
@@ -13638,7 +13611,7 @@ state 437
expr go to state 151
r_variable go to state 89
rw_variable go to state 90
- variable go to state 494
+ variable go to state 492
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -13650,25 +13623,25 @@ state 437
class_constant go to state 100
-state 438
+state 437
29 unticked_statement: T_DO @9 statement T_WHILE '(' . @10 expr ')' ';'
$default reduce using rule 28 (@10)
- @10 go to state 495
+ @10 go to state 493
-state 439
+state 438
26 unticked_statement: T_WHILE '(' @7 expr ')' . @8 while_statement
$default reduce using rule 25 (@8)
- @8 go to state 496
+ @8 go to state 494
-state 440
+state 439
33 unticked_statement: T_FOR '(' for_expr ';' @11 . for_expr ';' @12 for_expr ')' @13 for_statement
@@ -13718,14 +13691,14 @@ state 440
$default reduce using rule 196 (for_expr)
- for_expr go to state 497
- non_empty_for_expr go to state 245
+ for_expr go to state 495
+ non_empty_for_expr go to state 244
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 246
+ expr go to state 245
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -13740,7 +13713,7 @@ state 440
class_constant go to state 100
-state 441
+state 440
199 non_empty_for_expr: non_empty_for_expr ',' @38 . expr
@@ -13793,7 +13766,7 @@ state 441
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 498
+ expr go to state 496
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -13808,7 +13781,7 @@ state 441
class_constant go to state 100
-state 442
+state 441
55 unticked_statement: T_FOREACH '(' expr_without_variable T_AS @17 . variable foreach_optional_arg ')' @18 foreach_statement
@@ -13818,7 +13791,7 @@ state 442
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 499
+ variable go to state 497
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -13828,19 +13801,19 @@ state 442
simple_indirect_reference go to state 98
-state 443
+state 442
52 unticked_statement: T_FOREACH '(' variable T_AS @15 . foreach_variable foreach_optional_arg ')' @16 foreach_statement
- '&' shift, and go to state 500
+ '&' shift, and go to state 498
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
'$' shift, and go to state 71
- foreach_variable go to state 501
+ foreach_variable go to state 499
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 502
+ variable go to state 500
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -13850,36 +13823,36 @@ state 443
simple_indirect_reference go to state 98
-state 444
+state 443
111 declare_list: T_STRING '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 503
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 501
+ static_class_constant go to state 377
-state 445
+state 444
112 declare_list: declare_list ',' . T_STRING '=' static_scalar
- T_STRING shift, and go to state 504
+ T_STRING shift, and go to state 502
-state 446
+state 445
57 unticked_statement: T_DECLARE @19 '(' declare_list ')' . declare_statement
@@ -13889,7 +13862,7 @@ state 446
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- ':' shift, and go to state 505
+ ':' shift, and go to state 503
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -13948,9 +13921,9 @@ state 446
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 506
+ statement go to state 504
unticked_statement go to state 76
- declare_statement go to state 507
+ declare_statement go to state 505
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
@@ -13971,69 +13944,69 @@ state 446
class_constant go to state 100
-state 447
+state 446
35 unticked_statement: T_SWITCH '(' expr ')' @14 . switch_case_list
- ':' shift, and go to state 508
- '{' shift, and go to state 509
+ ':' shift, and go to state 506
+ '{' shift, and go to state 507
- switch_case_list go to state 510
+ switch_case_list go to state 508
-state 448
+state 447
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference T_STRING @28 . '(' parameter_list ')' '{' inner_statement_list '}'
- '(' shift, and go to state 511
+ '(' shift, and go to state 509
-state 449
+state 448
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' . T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
- T_CATCH shift, and go to state 512
+ T_CATCH shift, and go to state 510
-state 450
+state 449
161 global_var: '$' '{' expr '}' .
$default reduce using rule 161 (global_var)
-state 451
+state 450
310 static_scalar: '+' static_scalar .
$default reduce using rule 310 (static_scalar)
-state 452
+state 451
311 static_scalar: '-' static_scalar .
$default reduce using rule 311 (static_scalar)
-state 453
+state 452
314 static_class_constant: T_STRING T_PAAMAYIM_NEKUDOTAYIM . T_STRING
- T_STRING shift, and go to state 513
+ T_STRING shift, and go to state 511
-state 454
+state 453
312 static_scalar: T_ARRAY '(' . static_array_pair_list ')'
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
@@ -14042,52 +14015,52 @@ state 454
$default reduce using rule 321 (static_array_pair_list)
- common_scalar go to state 376
- static_scalar go to state 514
- static_class_constant go to state 378
- static_array_pair_list go to state 515
- non_empty_static_array_pair_list go to state 516
+ common_scalar go to state 375
+ static_scalar go to state 512
+ static_class_constant go to state 377
+ static_array_pair_list go to state 513
+ non_empty_static_array_pair_list go to state 514
-state 455
+state 454
163 static_var_list: static_var_list ',' T_VARIABLE '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 517
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 515
+ static_class_constant go to state 377
-state 456
+state 455
74 unset_variables: unset_variables ',' unset_variable .
$default reduce using rule 74 (unset_variables)
-state 457
+state 456
49 unticked_statement: T_UNSET '(' unset_variables ')' ';' .
$default reduce using rule 49 (unticked_statement)
-state 458
+state 457
- 410 isset_variables: isset_variables ',' @64 . variable
+ 408 isset_variables: isset_variables ',' @62 . variable
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
@@ -14095,7 +14068,7 @@ state 458
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 518
+ variable go to state 516
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -14105,29 +14078,29 @@ state 458
simple_indirect_reference go to state 98
-state 459
+state 458
- 376 assignment_list_element: T_LIST '(' . @62 assignment_list ')'
+ 374 assignment_list_element: T_LIST '(' . @60 assignment_list ')'
- $default reduce using rule 375 (@62)
+ $default reduce using rule 373 (@60)
- @62 go to state 519
+ @60 go to state 517
-state 460
+state 459
- 372 assignment_list: assignment_list ',' . assignment_list_element
+ 370 assignment_list: assignment_list ',' . assignment_list_element
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
- T_LIST shift, and go to state 386
+ T_LIST shift, and go to state 385
'$' shift, and go to state 71
- $default reduce using rule 377 (assignment_list_element)
+ $default reduce using rule 375 (assignment_list_element)
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 387
+ variable go to state 386
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -14135,26 +14108,19 @@ state 460
reference_variable go to state 96
compound_variable go to state 97
simple_indirect_reference go to state 98
- assignment_list_element go to state 520
+ assignment_list_element go to state 518
-state 461
+state 460
202 expr_without_variable: T_LIST '(' @39 assignment_list ')' . '=' expr
- '=' shift, and go to state 521
-
-
-state 462
-
- 333 w_variable: variable @55 .
-
- $default reduce using rule 333 (w_variable)
+ '=' shift, and go to state 519
-state 463
+state 461
- 386 non_empty_array_pair_list: expr T_DOUBLE_ARROW '&' . w_variable
+ 384 non_empty_array_pair_list: expr T_DOUBLE_ARROW '&' . w_variable
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
@@ -14162,8 +14128,8 @@ state 463
function_call go to state 84
fully_qualified_class_name go to state 120
- w_variable go to state 522
- variable go to state 391
+ w_variable go to state 520
+ variable go to state 390
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -14173,7 +14139,7 @@ state 463
simple_indirect_reference go to state 98
-state 464
+state 462
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -14201,7 +14167,7 @@ state 464
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 382 non_empty_array_pair_list: expr T_DOUBLE_ARROW expr .
+ 380 non_empty_array_pair_list: expr T_DOUBLE_ARROW expr .
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -14230,12 +14196,12 @@ state 464
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- $default reduce using rule 382 (non_empty_array_pair_list)
+ $default reduce using rule 380 (non_empty_array_pair_list)
-state 465
+state 463
- 385 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' . w_variable
+ 383 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' . w_variable
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
@@ -14243,8 +14209,8 @@ state 465
function_call go to state 84
fully_qualified_class_name go to state 120
- w_variable go to state 523
- variable go to state 391
+ w_variable go to state 521
+ variable go to state 390
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -14254,7 +14220,7 @@ state 465
simple_indirect_reference go to state 98
-state 466
+state 464
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -14282,9 +14248,9 @@ state 466
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 380 non_empty_array_pair_list: non_empty_array_pair_list ',' expr . T_DOUBLE_ARROW expr
- 381 | non_empty_array_pair_list ',' expr .
- 384 | non_empty_array_pair_list ',' expr . T_DOUBLE_ARROW '&' w_variable
+ 378 non_empty_array_pair_list: non_empty_array_pair_list ',' expr . T_DOUBLE_ARROW expr
+ 379 | non_empty_array_pair_list ',' expr .
+ 382 | non_empty_array_pair_list ',' expr . T_DOUBLE_ARROW '&' w_variable
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -14312,32 +14278,32 @@ state 466
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- T_DOUBLE_ARROW shift, and go to state 524
+ T_DOUBLE_ARROW shift, and go to state 522
- $default reduce using rule 381 (non_empty_array_pair_list)
+ $default reduce using rule 379 (non_empty_array_pair_list)
-state 467
+state 465
- 393 encaps_var: T_VARIABLE '[' @63 . encaps_var_offset ']'
+ 391 encaps_var: T_VARIABLE '[' @61 . encaps_var_offset ']'
- T_STRING shift, and go to state 525
- T_VARIABLE shift, and go to state 526
- T_NUM_STRING shift, and go to state 527
+ T_STRING shift, and go to state 523
+ T_VARIABLE shift, and go to state 524
+ T_NUM_STRING shift, and go to state 525
- encaps_var_offset go to state 528
+ encaps_var_offset go to state 526
-state 468
+state 466
- 394 encaps_var: T_VARIABLE T_OBJECT_OPERATOR T_STRING .
+ 392 encaps_var: T_VARIABLE T_OBJECT_OPERATOR T_STRING .
- $default reduce using rule 394 (encaps_var)
+ $default reduce using rule 392 (encaps_var)
-state 469
+state 467
- 396 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' . expr ']' '}'
+ 394 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' . expr ']' '}'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -14388,7 +14354,7 @@ state 469
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 529
+ expr go to state 527
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -14403,71 +14369,71 @@ state 469
class_constant go to state 100
-state 470
+state 468
- 395 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES expr '}' .
+ 393 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES expr '}' .
- $default reduce using rule 395 (encaps_var)
+ $default reduce using rule 393 (encaps_var)
-state 471
+state 469
- 397 encaps_var: T_CURLY_OPEN variable '}' .
+ 395 encaps_var: T_CURLY_OPEN variable '}' .
- $default reduce using rule 397 (encaps_var)
+ $default reduce using rule 395 (encaps_var)
-state 472
+state 470
15 inner_statement: T_HALT_COMPILER '(' . ')' ';'
- ')' shift, and go to state 530
+ ')' shift, and go to state 528
-state 473
+state 471
98 implements_list: T_IMPLEMENTS . interface_list
- T_STRING shift, and go to state 407
+ T_STRING shift, and go to state 406
- interface_list go to state 531
- fully_qualified_class_name go to state 476
+ interface_list go to state 529
+ fully_qualified_class_name go to state 474
-state 474
+state 472
86 unticked_class_declaration_statement: class_entry_type T_STRING extends_from @29 implements_list . '{' class_statement_list '}'
- '{' shift, and go to state 532
+ '{' shift, and go to state 530
-state 475
+state 473
96 interface_extends_list: T_EXTENDS interface_list .
100 interface_list: interface_list . ',' fully_qualified_class_name
- ',' shift, and go to state 533
+ ',' shift, and go to state 531
$default reduce using rule 96 (interface_extends_list)
-state 476
+state 474
99 interface_list: fully_qualified_class_name .
$default reduce using rule 99 (interface_list)
-state 477
+state 475
88 unticked_class_declaration_statement: interface_entry T_STRING @30 interface_extends_list '{' . class_statement_list '}'
$default reduce using rule 167 (class_statement_list)
- class_statement_list go to state 534
+ class_statement_list go to state 532
-state 478
+state 476
280 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' @50 . function_call_parameter_list ')'
@@ -14477,7 +14443,7 @@ state 478
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 352
+ '&' shift, and go to state 351
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -14518,9 +14484,9 @@ state 478
$default reduce using rule 150 (function_call_parameter_list)
- function_call_parameter_list go to state 535
- non_empty_function_call_parameter_list go to state 354
- expr_without_variable go to state 355
+ function_call_parameter_list go to state 533
+ non_empty_function_call_parameter_list go to state 353
+ expr_without_variable go to state 354
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
@@ -14528,7 +14494,7 @@ state 478
expr go to state 151
r_variable go to state 89
rw_variable go to state 90
- variable go to state 356
+ variable go to state 355
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -14540,7 +14506,7 @@ state 478
class_constant go to state 100
-state 479
+state 477
282 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' @51 . function_call_parameter_list ')'
@@ -14550,7 +14516,7 @@ state 479
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 352
+ '&' shift, and go to state 351
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -14591,9 +14557,9 @@ state 479
$default reduce using rule 150 (function_call_parameter_list)
- function_call_parameter_list go to state 536
- non_empty_function_call_parameter_list go to state 354
- expr_without_variable go to state 355
+ function_call_parameter_list go to state 534
+ non_empty_function_call_parameter_list go to state 353
+ expr_without_variable go to state 354
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
@@ -14601,7 +14567,7 @@ state 479
expr go to state 151
r_variable go to state 89
rw_variable go to state 90
- variable go to state 356
+ variable go to state 355
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -14613,32 +14579,32 @@ state 479
class_constant go to state 100
-state 480
+state 478
261 expr_without_variable: expr '?' @46 expr ':' . @47 expr
$default reduce using rule 260 (@47)
- @47 go to state 537
+ @47 go to state 535
-state 481
+state 479
206 expr_without_variable: variable '=' '&' T_NEW class_name_reference . @40 ctor_arguments
$default reduce using rule 205 (@40)
- @40 go to state 538
+ @40 go to state 536
-state 482
+state 480
284 function_call: variable_without_objects '(' @52 function_call_parameter_list ')' .
$default reduce using rule 284 (function_call)
-state 483
+state 481
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -14666,7 +14632,7 @@ state 483
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 369 variable_name: '{' expr . '}'
+ 367 variable_name: '{' expr . '}'
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -14694,30 +14660,30 @@ state 483
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- '}' shift, and go to state 539
+ '}' shift, and go to state 537
-state 484
+state 482
- 364 object_property: variable_without_objects @61 .
+ 362 object_property: variable_without_objects @59 .
- $default reduce using rule 364 (object_property)
+ $default reduce using rule 362 (object_property)
-state 485
+state 483
- 338 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @57 object_property @58 . method_or_not variable_properties
+ 336 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @55 object_property @56 . method_or_not variable_properties
- '(' shift, and go to state 540
+ '(' shift, and go to state 538
- $default reduce using rule 346 (method_or_not)
+ $default reduce using rule 344 (method_or_not)
- method_or_not go to state 541
+ method_or_not go to state 539
-state 486
+state 484
- 365 object_dim_list: object_dim_list '[' . dim_offset ']'
+ 363 object_dim_list: object_dim_list '[' . dim_offset ']'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -14763,14 +14729,14 @@ state 486
'`' shift, and go to state 72
'"' shift, and go to state 73
- $default reduce using rule 360 (dim_offset)
+ $default reduce using rule 358 (dim_offset)
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 341
+ expr go to state 340
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -14780,15 +14746,15 @@ state 486
base_variable go to state 95
reference_variable go to state 96
compound_variable go to state 97
- dim_offset go to state 542
+ dim_offset go to state 540
simple_indirect_reference go to state 98
internal_functions_in_yacc go to state 99
class_constant go to state 100
-state 487
+state 485
- 366 object_dim_list: object_dim_list '{' . expr '}'
+ 364 object_dim_list: object_dim_list '{' . expr '}'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -14839,7 +14805,7 @@ state 487
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 543
+ expr go to state 541
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -14854,41 +14820,41 @@ state 487
class_constant go to state 100
-state 488
+state 486
299 ctor_arguments: '(' function_call_parameter_list ')' .
$default reduce using rule 299 (ctor_arguments)
-state 489
+state 487
290 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR @53 object_property @54 . dynamic_class_name_variable_properties
$default reduce using rule 293 (dynamic_class_name_variable_properties)
- dynamic_class_name_variable_properties go to state 544
+ dynamic_class_name_variable_properties go to state 542
-state 490
+state 488
23 unticked_statement: T_IF '(' expr ')' ':' @5 . inner_statement_list @6 new_elseif_list new_else_single T_ENDIF ';'
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 545
+ inner_statement_list go to state 543
-state 491
+state 489
20 unticked_statement: T_IF '(' expr ')' @3 statement . @4 elseif_list else_single
$default reduce using rule 19 (@4)
- @4 go to state 546
+ @4 go to state 544
-state 492
+state 490
156 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' . w_variable
@@ -14898,8 +14864,8 @@ state 492
function_call go to state 84
fully_qualified_class_name go to state 120
- w_variable go to state 547
- variable go to state 391
+ w_variable go to state 545
+ variable go to state 390
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -14909,7 +14875,7 @@ state 492
simple_indirect_reference go to state 98
-state 493
+state 491
154 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' expr_without_variable .
330 expr: expr_without_variable .
@@ -14919,7 +14885,7 @@ state 493
$default reduce using rule 330 (expr)
-state 494
+state 492
155 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' variable .
203 expr_without_variable: variable . '=' expr
@@ -14937,7 +14903,7 @@ state 494
219 | variable . T_SL_EQUAL expr
220 | variable . T_SR_EQUAL expr
331 r_variable: variable .
- 335 rw_variable: variable . @56
+ 333 rw_variable: variable .
'=' shift, and go to state 210
T_SR_EQUAL shift, and go to state 211
@@ -14953,15 +14919,13 @@ state 494
T_PLUS_EQUAL shift, and go to state 221
',' reduce using rule 155 (non_empty_function_call_parameter_list)
- T_DEC reduce using rule 334 (@56)
- T_INC reduce using rule 334 (@56)
+ T_DEC reduce using rule 333 (rw_variable)
+ T_INC reduce using rule 333 (rw_variable)
')' reduce using rule 155 (non_empty_function_call_parameter_list)
$default reduce using rule 331 (r_variable)
- @56 go to state 222
-
-state 495
+state 493
29 unticked_statement: T_DO @9 statement T_WHILE '(' @10 . expr ')' ';'
@@ -15014,7 +14978,7 @@ state 495
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 548
+ expr go to state 546
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -15029,7 +14993,7 @@ state 495
class_constant go to state 100
-state 496
+state 494
26 unticked_statement: T_WHILE '(' @7 expr ')' @8 . while_statement
@@ -15039,7 +15003,7 @@ state 496
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- ':' shift, and go to state 549
+ ':' shift, and go to state 547
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -15098,9 +15062,9 @@ state 496
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 550
+ statement go to state 548
unticked_statement go to state 76
- while_statement go to state 551
+ while_statement go to state 549
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
@@ -15121,14 +15085,14 @@ state 496
class_constant go to state 100
-state 497
+state 495
33 unticked_statement: T_FOR '(' for_expr ';' @11 for_expr . ';' @12 for_expr ')' @13 for_statement
- ';' shift, and go to state 552
+ ';' shift, and go to state 550
-state 498
+state 496
199 non_empty_for_expr: non_empty_for_expr ',' @38 expr .
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -15188,18 +15152,18 @@ state 498
$default reduce using rule 199 (non_empty_for_expr)
-state 499
+state 497
55 unticked_statement: T_FOREACH '(' expr_without_variable T_AS @17 variable . foreach_optional_arg ')' @18 foreach_statement
- T_DOUBLE_ARROW shift, and go to state 553
+ T_DOUBLE_ARROW shift, and go to state 551
$default reduce using rule 101 (foreach_optional_arg)
- foreach_optional_arg go to state 554
+ foreach_optional_arg go to state 552
-state 500
+state 498
104 foreach_variable: '&' . variable
@@ -15209,7 +15173,7 @@ state 500
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 555
+ variable go to state 553
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -15219,179 +15183,179 @@ state 500
simple_indirect_reference go to state 98
-state 501
+state 499
52 unticked_statement: T_FOREACH '(' variable T_AS @15 foreach_variable . foreach_optional_arg ')' @16 foreach_statement
- T_DOUBLE_ARROW shift, and go to state 553
+ T_DOUBLE_ARROW shift, and go to state 551
$default reduce using rule 101 (foreach_optional_arg)
- foreach_optional_arg go to state 556
+ foreach_optional_arg go to state 554
-state 502
+state 500
103 foreach_variable: variable .
$default reduce using rule 103 (foreach_variable)
-state 503
+state 501
111 declare_list: T_STRING '=' static_scalar .
$default reduce using rule 111 (declare_list)
-state 504
+state 502
112 declare_list: declare_list ',' T_STRING . '=' static_scalar
- '=' shift, and go to state 557
+ '=' shift, and go to state 555
-state 505
+state 503
110 declare_statement: ':' . inner_statement_list T_ENDDECLARE ';'
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 558
+ inner_statement_list go to state 556
-state 506
+state 504
109 declare_statement: statement .
$default reduce using rule 109 (declare_statement)
-state 507
+state 505
57 unticked_statement: T_DECLARE @19 '(' declare_list ')' declare_statement .
$default reduce using rule 57 (unticked_statement)
-state 508
+state 506
115 switch_case_list: ':' . case_list T_ENDSWITCH ';'
116 | ':' . ';' case_list T_ENDSWITCH ';'
- ';' shift, and go to state 559
+ ';' shift, and go to state 557
$default reduce using rule 117 (case_list)
- case_list go to state 560
+ case_list go to state 558
-state 509
+state 507
113 switch_case_list: '{' . case_list '}'
114 | '{' . ';' case_list '}'
- ';' shift, and go to state 561
+ ';' shift, and go to state 559
$default reduce using rule 117 (case_list)
- case_list go to state 562
+ case_list go to state 560
-state 510
+state 508
35 unticked_statement: T_SWITCH '(' expr ')' @14 switch_case_list .
$default reduce using rule 35 (unticked_statement)
-state 511
+state 509
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference T_STRING @28 '(' . parameter_list ')' '{' inner_statement_list '}'
- T_STRING shift, and go to state 563
- T_ARRAY shift, and go to state 564
+ T_STRING shift, and go to state 561
+ T_ARRAY shift, and go to state 562
')' reduce using rule 137 (parameter_list)
$default reduce using rule 146 (optional_class_type)
- parameter_list go to state 565
- non_empty_parameter_list go to state 566
- optional_class_type go to state 567
+ parameter_list go to state 563
+ non_empty_parameter_list go to state 564
+ optional_class_type go to state 565
-state 512
+state 510
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH . '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
- '(' shift, and go to state 568
+ '(' shift, and go to state 566
-state 513
+state 511
314 static_class_constant: T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING .
$default reduce using rule 314 (static_class_constant)
-state 514
+state 512
327 non_empty_static_array_pair_list: static_scalar . T_DOUBLE_ARROW static_scalar
328 | static_scalar .
- T_DOUBLE_ARROW shift, and go to state 569
+ T_DOUBLE_ARROW shift, and go to state 567
$default reduce using rule 328 (non_empty_static_array_pair_list)
-state 515
+state 513
312 static_scalar: T_ARRAY '(' static_array_pair_list . ')'
- ')' shift, and go to state 570
+ ')' shift, and go to state 568
-state 516
+state 514
322 static_array_pair_list: non_empty_static_array_pair_list . possible_comma
325 non_empty_static_array_pair_list: non_empty_static_array_pair_list . ',' static_scalar T_DOUBLE_ARROW static_scalar
326 | non_empty_static_array_pair_list . ',' static_scalar
- ',' shift, and go to state 571
+ ',' shift, and go to state 569
$default reduce using rule 323 (possible_comma)
- possible_comma go to state 572
+ possible_comma go to state 570
-state 517
+state 515
163 static_var_list: static_var_list ',' T_VARIABLE '=' static_scalar .
$default reduce using rule 163 (static_var_list)
-state 518
+state 516
- 410 isset_variables: isset_variables ',' @64 variable .
+ 408 isset_variables: isset_variables ',' @62 variable .
- $default reduce using rule 410 (isset_variables)
+ $default reduce using rule 408 (isset_variables)
-state 519
+state 517
- 376 assignment_list_element: T_LIST '(' @62 . assignment_list ')'
+ 374 assignment_list_element: T_LIST '(' @60 . assignment_list ')'
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
- T_LIST shift, and go to state 386
+ T_LIST shift, and go to state 385
'$' shift, and go to state 71
- $default reduce using rule 377 (assignment_list_element)
+ $default reduce using rule 375 (assignment_list_element)
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 387
+ variable go to state 386
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -15399,18 +15363,18 @@ state 519
reference_variable go to state 96
compound_variable go to state 97
simple_indirect_reference go to state 98
- assignment_list go to state 573
- assignment_list_element go to state 389
+ assignment_list go to state 571
+ assignment_list_element go to state 388
-state 520
+state 518
- 372 assignment_list: assignment_list ',' assignment_list_element .
+ 370 assignment_list: assignment_list ',' assignment_list_element .
- $default reduce using rule 372 (assignment_list)
+ $default reduce using rule 370 (assignment_list)
-state 521
+state 519
202 expr_without_variable: T_LIST '(' @39 assignment_list ')' '=' . expr
@@ -15463,7 +15427,7 @@ state 521
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 574
+ expr go to state 572
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -15478,24 +15442,24 @@ state 521
class_constant go to state 100
-state 522
+state 520
- 386 non_empty_array_pair_list: expr T_DOUBLE_ARROW '&' w_variable .
+ 384 non_empty_array_pair_list: expr T_DOUBLE_ARROW '&' w_variable .
- $default reduce using rule 386 (non_empty_array_pair_list)
+ $default reduce using rule 384 (non_empty_array_pair_list)
-state 523
+state 521
- 385 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' w_variable .
+ 383 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' w_variable .
- $default reduce using rule 385 (non_empty_array_pair_list)
+ $default reduce using rule 383 (non_empty_array_pair_list)
-state 524
+state 522
- 380 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW . expr
- 384 | non_empty_array_pair_list ',' expr T_DOUBLE_ARROW . '&' w_variable
+ 378 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW . expr
+ 382 | non_empty_array_pair_list ',' expr T_DOUBLE_ARROW . '&' w_variable
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -15503,7 +15467,7 @@ state 524
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 575
+ '&' shift, and go to state 573
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -15547,7 +15511,7 @@ state 524
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 576
+ expr go to state 574
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -15562,35 +15526,35 @@ state 524
class_constant go to state 100
-state 525
+state 523
- 398 encaps_var_offset: T_STRING .
+ 396 encaps_var_offset: T_STRING .
- $default reduce using rule 398 (encaps_var_offset)
+ $default reduce using rule 396 (encaps_var_offset)
-state 526
+state 524
- 400 encaps_var_offset: T_VARIABLE .
+ 398 encaps_var_offset: T_VARIABLE .
- $default reduce using rule 400 (encaps_var_offset)
+ $default reduce using rule 398 (encaps_var_offset)
-state 527
+state 525
- 399 encaps_var_offset: T_NUM_STRING .
+ 397 encaps_var_offset: T_NUM_STRING .
- $default reduce using rule 399 (encaps_var_offset)
+ $default reduce using rule 397 (encaps_var_offset)
-state 528
+state 526
- 393 encaps_var: T_VARIABLE '[' @63 encaps_var_offset . ']'
+ 391 encaps_var: T_VARIABLE '[' @61 encaps_var_offset . ']'
- ']' shift, and go to state 577
+ ']' shift, and go to state 575
-state 529
+state 527
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -15618,7 +15582,7 @@ state 529
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 396 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr . ']' '}'
+ 394 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr . ']' '}'
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -15646,84 +15610,84 @@ state 529
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ']' shift, and go to state 578
+ ']' shift, and go to state 576
-state 530
+state 528
15 inner_statement: T_HALT_COMPILER '(' ')' . ';'
- ';' shift, and go to state 579
+ ';' shift, and go to state 577
-state 531
+state 529
98 implements_list: T_IMPLEMENTS interface_list .
100 interface_list: interface_list . ',' fully_qualified_class_name
- ',' shift, and go to state 533
+ ',' shift, and go to state 531
$default reduce using rule 98 (implements_list)
-state 532
+state 530
86 unticked_class_declaration_statement: class_entry_type T_STRING extends_from @29 implements_list '{' . class_statement_list '}'
$default reduce using rule 167 (class_statement_list)
- class_statement_list go to state 580
+ class_statement_list go to state 578
-state 533
+state 531
100 interface_list: interface_list ',' . fully_qualified_class_name
- T_STRING shift, and go to state 407
+ T_STRING shift, and go to state 406
- fully_qualified_class_name go to state 581
+ fully_qualified_class_name go to state 579
-state 534
+state 532
88 unticked_class_declaration_statement: interface_entry T_STRING @30 interface_extends_list '{' class_statement_list . '}'
166 class_statement_list: class_statement_list . class_statement
- T_CONST shift, and go to state 582
- T_PUBLIC shift, and go to state 583
- T_PROTECTED shift, and go to state 584
- T_PRIVATE shift, and go to state 585
- T_FINAL shift, and go to state 586
- T_ABSTRACT shift, and go to state 587
- T_STATIC shift, and go to state 588
- T_VAR shift, and go to state 589
- '}' shift, and go to state 590
+ T_CONST shift, and go to state 580
+ T_PUBLIC shift, and go to state 581
+ T_PROTECTED shift, and go to state 582
+ T_PRIVATE shift, and go to state 583
+ T_FINAL shift, and go to state 584
+ T_ABSTRACT shift, and go to state 585
+ T_STATIC shift, and go to state 586
+ T_VAR shift, and go to state 587
+ '}' shift, and go to state 588
$default reduce using rule 178 (method_modifiers)
- class_statement go to state 591
- variable_modifiers go to state 592
- method_modifiers go to state 593
- non_empty_member_modifiers go to state 594
- member_modifier go to state 595
- class_constant_declaration go to state 596
+ class_statement go to state 589
+ variable_modifiers go to state 590
+ method_modifiers go to state 591
+ non_empty_member_modifiers go to state 592
+ member_modifier go to state 593
+ class_constant_declaration go to state 594
-state 535
+state 533
280 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' @50 function_call_parameter_list . ')'
- ')' shift, and go to state 597
+ ')' shift, and go to state 595
-state 536
+state 534
282 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' @51 function_call_parameter_list . ')'
- ')' shift, and go to state 598
+ ')' shift, and go to state 596
-state 537
+state 535
261 expr_without_variable: expr '?' @46 expr ':' @47 . expr
@@ -15776,7 +15740,7 @@ state 537
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 599
+ expr go to state 597
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -15791,50 +15755,50 @@ state 537
class_constant go to state 100
-state 538
+state 536
206 expr_without_variable: variable '=' '&' T_NEW class_name_reference @40 . ctor_arguments
- '(' shift, and go to state 347
+ '(' shift, and go to state 346
$default reduce using rule 298 (ctor_arguments)
- ctor_arguments go to state 600
+ ctor_arguments go to state 598
-state 539
+state 537
- 369 variable_name: '{' expr '}' .
+ 367 variable_name: '{' expr '}' .
- $default reduce using rule 369 (variable_name)
+ $default reduce using rule 367 (variable_name)
-state 540
+state 538
- 345 method_or_not: '(' . @60 function_call_parameter_list ')'
+ 343 method_or_not: '(' . @58 function_call_parameter_list ')'
- $default reduce using rule 344 (@60)
+ $default reduce using rule 342 (@58)
- @60 go to state 601
+ @58 go to state 599
-state 541
+state 539
- 338 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @57 object_property @58 method_or_not . variable_properties
+ 336 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @55 object_property @56 method_or_not . variable_properties
- $default reduce using rule 341 (variable_properties)
+ $default reduce using rule 339 (variable_properties)
- variable_properties go to state 602
+ variable_properties go to state 600
-state 542
+state 540
- 365 object_dim_list: object_dim_list '[' dim_offset . ']'
+ 363 object_dim_list: object_dim_list '[' dim_offset . ']'
- ']' shift, and go to state 603
+ ']' shift, and go to state 601
-state 543
+state 541
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -15862,7 +15826,7 @@ state 543
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 366 object_dim_list: object_dim_list '{' expr . '}'
+ 364 object_dim_list: object_dim_list '{' expr . '}'
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -15890,22 +15854,22 @@ state 543
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- '}' shift, and go to state 604
+ '}' shift, and go to state 602
-state 544
+state 542
290 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR @53 object_property @54 dynamic_class_name_variable_properties .
292 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties . dynamic_class_name_variable_property
- T_OBJECT_OPERATOR shift, and go to state 605
+ T_OBJECT_OPERATOR shift, and go to state 603
$default reduce using rule 290 (dynamic_class_name_reference)
- dynamic_class_name_variable_property go to state 606
+ dynamic_class_name_variable_property go to state 604
-state 545
+state 543
10 inner_statement_list: inner_statement_list . @2 inner_statement
23 unticked_statement: T_IF '(' expr ')' ':' @5 inner_statement_list . @6 new_elseif_list new_else_single T_ENDIF ';'
@@ -15915,27 +15879,27 @@ state 545
T_ENDIF reduce using rule 22 (@6)
$default reduce using rule 9 (@2)
- @2 go to state 289
- @6 go to state 607
+ @2 go to state 288
+ @6 go to state 605
-state 546
+state 544
20 unticked_statement: T_IF '(' expr ')' @3 statement @4 . elseif_list else_single
$default reduce using rule 126 (elseif_list)
- elseif_list go to state 608
+ elseif_list go to state 606
-state 547
+state 545
156 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' w_variable .
$default reduce using rule 156 (non_empty_function_call_parameter_list)
-state 548
+state 546
29 unticked_statement: T_DO @9 statement T_WHILE '(' @10 expr . ')' ';'
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -15991,54 +15955,54 @@ state 548
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 609
+ ')' shift, and go to state 607
-state 549
+state 547
125 while_statement: ':' . inner_statement_list T_ENDWHILE ';'
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 610
+ inner_statement_list go to state 608
-state 550
+state 548
124 while_statement: statement .
$default reduce using rule 124 (while_statement)
-state 551
+state 549
26 unticked_statement: T_WHILE '(' @7 expr ')' @8 while_statement .
$default reduce using rule 26 (unticked_statement)
-state 552
+state 550
33 unticked_statement: T_FOR '(' for_expr ';' @11 for_expr ';' . @12 for_expr ')' @13 for_statement
$default reduce using rule 31 (@12)
- @12 go to state 611
+ @12 go to state 609
-state 553
+state 551
102 foreach_optional_arg: T_DOUBLE_ARROW . foreach_variable
- '&' shift, and go to state 500
+ '&' shift, and go to state 498
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
'$' shift, and go to state 71
- foreach_variable go to state 612
+ foreach_variable go to state 610
function_call go to state 84
fully_qualified_class_name go to state 120
- variable go to state 502
+ variable go to state 500
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -16048,123 +16012,123 @@ state 553
simple_indirect_reference go to state 98
-state 554
+state 552
55 unticked_statement: T_FOREACH '(' expr_without_variable T_AS @17 variable foreach_optional_arg . ')' @18 foreach_statement
- ')' shift, and go to state 613
+ ')' shift, and go to state 611
-state 555
+state 553
104 foreach_variable: '&' variable .
$default reduce using rule 104 (foreach_variable)
-state 556
+state 554
52 unticked_statement: T_FOREACH '(' variable T_AS @15 foreach_variable foreach_optional_arg . ')' @16 foreach_statement
- ')' shift, and go to state 614
+ ')' shift, and go to state 612
-state 557
+state 555
112 declare_list: declare_list ',' T_STRING '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 615
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 613
+ static_class_constant go to state 377
-state 558
+state 556
10 inner_statement_list: inner_statement_list . @2 inner_statement
110 declare_statement: ':' inner_statement_list . T_ENDDECLARE ';'
- T_ENDDECLARE shift, and go to state 616
+ T_ENDDECLARE shift, and go to state 614
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 559
+state 557
116 switch_case_list: ':' ';' . case_list T_ENDSWITCH ';'
$default reduce using rule 117 (case_list)
- case_list go to state 617
+ case_list go to state 615
-state 560
+state 558
115 switch_case_list: ':' case_list . T_ENDSWITCH ';'
119 case_list: case_list . T_CASE expr case_separator @31 inner_statement_list
121 | case_list . T_DEFAULT case_separator @32 inner_statement_list
- T_ENDSWITCH shift, and go to state 618
- T_CASE shift, and go to state 619
- T_DEFAULT shift, and go to state 620
+ T_ENDSWITCH shift, and go to state 616
+ T_CASE shift, and go to state 617
+ T_DEFAULT shift, and go to state 618
-state 561
+state 559
114 switch_case_list: '{' ';' . case_list '}'
$default reduce using rule 117 (case_list)
- case_list go to state 621
+ case_list go to state 619
-state 562
+state 560
113 switch_case_list: '{' case_list . '}'
119 case_list: case_list . T_CASE expr case_separator @31 inner_statement_list
121 | case_list . T_DEFAULT case_separator @32 inner_statement_list
- T_CASE shift, and go to state 619
- T_DEFAULT shift, and go to state 620
- '}' shift, and go to state 622
+ T_CASE shift, and go to state 617
+ T_DEFAULT shift, and go to state 618
+ '}' shift, and go to state 620
-state 563
+state 561
147 optional_class_type: T_STRING .
$default reduce using rule 147 (optional_class_type)
-state 564
+state 562
148 optional_class_type: T_ARRAY .
$default reduce using rule 148 (optional_class_type)
-state 565
+state 563
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference T_STRING @28 '(' parameter_list . ')' '{' inner_statement_list '}'
- ')' shift, and go to state 623
+ ')' shift, and go to state 621
-state 566
+state 564
136 parameter_list: non_empty_parameter_list .
142 non_empty_parameter_list: non_empty_parameter_list . ',' optional_class_type T_VARIABLE
@@ -16172,73 +16136,73 @@ state 566
144 | non_empty_parameter_list . ',' optional_class_type '&' T_VARIABLE '=' static_scalar
145 | non_empty_parameter_list . ',' optional_class_type T_VARIABLE '=' static_scalar
- ',' shift, and go to state 624
+ ',' shift, and go to state 622
$default reduce using rule 136 (parameter_list)
-state 567
+state 565
138 non_empty_parameter_list: optional_class_type . T_VARIABLE
139 | optional_class_type . '&' T_VARIABLE
140 | optional_class_type . '&' T_VARIABLE '=' static_scalar
141 | optional_class_type . T_VARIABLE '=' static_scalar
- '&' shift, and go to state 625
- T_VARIABLE shift, and go to state 626
+ '&' shift, and go to state 623
+ T_VARIABLE shift, and go to state 624
-state 568
+state 566
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' . @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
$default reduce using rule 60 (@21)
- @21 go to state 627
+ @21 go to state 625
-state 569
+state 567
327 non_empty_static_array_pair_list: static_scalar T_DOUBLE_ARROW . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 628
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 626
+ static_class_constant go to state 377
-state 570
+state 568
312 static_scalar: T_ARRAY '(' static_array_pair_list ')' .
$default reduce using rule 312 (static_scalar)
-state 571
+state 569
324 possible_comma: ',' .
325 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' . static_scalar T_DOUBLE_ARROW static_scalar
326 | non_empty_static_array_pair_list ',' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
@@ -16247,28 +16211,28 @@ state 571
$default reduce using rule 324 (possible_comma)
- common_scalar go to state 376
- static_scalar go to state 629
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 627
+ static_class_constant go to state 377
-state 572
+state 570
322 static_array_pair_list: non_empty_static_array_pair_list possible_comma .
$default reduce using rule 322 (static_array_pair_list)
-state 573
+state 571
- 372 assignment_list: assignment_list . ',' assignment_list_element
- 376 assignment_list_element: T_LIST '(' @62 assignment_list . ')'
+ 370 assignment_list: assignment_list . ',' assignment_list_element
+ 374 assignment_list_element: T_LIST '(' @60 assignment_list . ')'
- ',' shift, and go to state 460
- ')' shift, and go to state 630
+ ',' shift, and go to state 459
+ ')' shift, and go to state 628
-state 574
+state 572
202 expr_without_variable: T_LIST '(' @39 assignment_list ')' '=' expr .
226 | expr . T_BOOLEAN_OR @42 expr
@@ -16325,9 +16289,9 @@ state 574
$default reduce using rule 202 (expr_without_variable)
-state 575
+state 573
- 384 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' . w_variable
+ 382 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' . w_variable
T_STRING shift, and go to state 119
T_VARIABLE shift, and go to state 33
@@ -16335,8 +16299,8 @@ state 575
function_call go to state 84
fully_qualified_class_name go to state 120
- w_variable go to state 631
- variable go to state 391
+ w_variable go to state 629
+ variable go to state 390
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -16346,7 +16310,7 @@ state 575
simple_indirect_reference go to state 98
-state 576
+state 574
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -16374,7 +16338,7 @@ state 576
256 | expr . T_IS_GREATER_OR_EQUAL expr
257 | expr . T_INSTANCEOF class_name_reference
261 | expr . '?' @46 expr ':' @47 expr
- 380 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr .
+ 378 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr .
T_LOGICAL_OR shift, and go to state 181
T_LOGICAL_XOR shift, and go to state 182
@@ -16403,198 +16367,198 @@ state 576
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- $default reduce using rule 380 (non_empty_array_pair_list)
+ $default reduce using rule 378 (non_empty_array_pair_list)
-state 577
+state 575
- 393 encaps_var: T_VARIABLE '[' @63 encaps_var_offset ']' .
+ 391 encaps_var: T_VARIABLE '[' @61 encaps_var_offset ']' .
- $default reduce using rule 393 (encaps_var)
+ $default reduce using rule 391 (encaps_var)
-state 578
+state 576
- 396 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' . '}'
+ 394 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' . '}'
- '}' shift, and go to state 632
+ '}' shift, and go to state 630
-state 579
+state 577
15 inner_statement: T_HALT_COMPILER '(' ')' ';' .
$default reduce using rule 15 (inner_statement)
-state 580
+state 578
86 unticked_class_declaration_statement: class_entry_type T_STRING extends_from @29 implements_list '{' class_statement_list . '}'
166 class_statement_list: class_statement_list . class_statement
- T_CONST shift, and go to state 582
- T_PUBLIC shift, and go to state 583
- T_PROTECTED shift, and go to state 584
- T_PRIVATE shift, and go to state 585
- T_FINAL shift, and go to state 586
- T_ABSTRACT shift, and go to state 587
- T_STATIC shift, and go to state 588
- T_VAR shift, and go to state 589
- '}' shift, and go to state 633
+ T_CONST shift, and go to state 580
+ T_PUBLIC shift, and go to state 581
+ T_PROTECTED shift, and go to state 582
+ T_PRIVATE shift, and go to state 583
+ T_FINAL shift, and go to state 584
+ T_ABSTRACT shift, and go to state 585
+ T_STATIC shift, and go to state 586
+ T_VAR shift, and go to state 587
+ '}' shift, and go to state 631
$default reduce using rule 178 (method_modifiers)
- class_statement go to state 591
- variable_modifiers go to state 592
- method_modifiers go to state 593
- non_empty_member_modifiers go to state 594
- member_modifier go to state 595
- class_constant_declaration go to state 596
+ class_statement go to state 589
+ variable_modifiers go to state 590
+ method_modifiers go to state 591
+ non_empty_member_modifiers go to state 592
+ member_modifier go to state 593
+ class_constant_declaration go to state 594
-state 581
+state 579
100 interface_list: interface_list ',' fully_qualified_class_name .
$default reduce using rule 100 (interface_list)
-state 582
+state 580
193 class_constant_declaration: T_CONST . T_STRING '=' static_scalar
- T_STRING shift, and go to state 634
+ T_STRING shift, and go to state 632
-state 583
+state 581
182 member_modifier: T_PUBLIC .
$default reduce using rule 182 (member_modifier)
-state 584
+state 582
183 member_modifier: T_PROTECTED .
$default reduce using rule 183 (member_modifier)
-state 585
+state 583
184 member_modifier: T_PRIVATE .
$default reduce using rule 184 (member_modifier)
-state 586
+state 584
187 member_modifier: T_FINAL .
$default reduce using rule 187 (member_modifier)
-state 587
+state 585
186 member_modifier: T_ABSTRACT .
$default reduce using rule 186 (member_modifier)
-state 588
+state 586
185 member_modifier: T_STATIC .
$default reduce using rule 185 (member_modifier)
-state 589
+state 587
177 variable_modifiers: T_VAR .
$default reduce using rule 177 (variable_modifiers)
-state 590
+state 588
88 unticked_class_declaration_statement: interface_entry T_STRING @30 interface_extends_list '{' class_statement_list '}' .
$default reduce using rule 88 (unticked_class_declaration_statement)
-state 591
+state 589
166 class_statement_list: class_statement_list class_statement .
$default reduce using rule 166 (class_statement_list)
-state 592
+state 590
169 class_statement: variable_modifiers . @35 class_variable_declaration ';'
$default reduce using rule 168 (@35)
- @35 go to state 635
+ @35 go to state 633
-state 593
+state 591
173 class_statement: method_modifiers . T_FUNCTION @36 is_reference T_STRING @37 '(' parameter_list ')' method_body
- T_FUNCTION shift, and go to state 636
+ T_FUNCTION shift, and go to state 634
-state 594
+state 592
176 variable_modifiers: non_empty_member_modifiers .
179 method_modifiers: non_empty_member_modifiers .
181 non_empty_member_modifiers: non_empty_member_modifiers . member_modifier
- T_PUBLIC shift, and go to state 583
- T_PROTECTED shift, and go to state 584
- T_PRIVATE shift, and go to state 585
- T_FINAL shift, and go to state 586
- T_ABSTRACT shift, and go to state 587
- T_STATIC shift, and go to state 588
+ T_PUBLIC shift, and go to state 581
+ T_PROTECTED shift, and go to state 582
+ T_PRIVATE shift, and go to state 583
+ T_FINAL shift, and go to state 584
+ T_ABSTRACT shift, and go to state 585
+ T_STATIC shift, and go to state 586
T_FUNCTION reduce using rule 179 (method_modifiers)
$default reduce using rule 176 (variable_modifiers)
- member_modifier go to state 637
+ member_modifier go to state 635
-state 595
+state 593
180 non_empty_member_modifiers: member_modifier .
$default reduce using rule 180 (non_empty_member_modifiers)
-state 596
+state 594
170 class_statement: class_constant_declaration . ';'
192 class_constant_declaration: class_constant_declaration . ',' T_STRING '=' static_scalar
- ',' shift, and go to state 638
- ';' shift, and go to state 639
+ ',' shift, and go to state 636
+ ';' shift, and go to state 637
-state 597
+state 595
280 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' @50 function_call_parameter_list ')' .
$default reduce using rule 280 (function_call)
-state 598
+state 596
282 function_call: fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' @51 function_call_parameter_list ')' .
$default reduce using rule 282 (function_call)
-state 599
+state 597
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
228 | expr . T_BOOLEAN_AND @43 expr
@@ -16650,16 +16614,16 @@ state 599
$default reduce using rule 261 (expr_without_variable)
-state 600
+state 598
206 expr_without_variable: variable '=' '&' T_NEW class_name_reference @40 ctor_arguments .
$default reduce using rule 206 (expr_without_variable)
-state 601
+state 599
- 345 method_or_not: '(' @60 . function_call_parameter_list ')'
+ 343 method_or_not: '(' @58 . function_call_parameter_list ')'
T_REQUIRE_ONCE shift, and go to state 5
T_REQUIRE shift, and go to state 6
@@ -16667,7 +16631,7 @@ state 601
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- '&' shift, and go to state 352
+ '&' shift, and go to state 351
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -16708,9 +16672,9 @@ state 601
$default reduce using rule 150 (function_call_parameter_list)
- function_call_parameter_list go to state 640
- non_empty_function_call_parameter_list go to state 354
- expr_without_variable go to state 355
+ function_call_parameter_list go to state 638
+ non_empty_function_call_parameter_list go to state 353
+ expr_without_variable go to state 354
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
@@ -16718,7 +16682,7 @@ state 601
expr go to state 151
r_variable go to state 89
rw_variable go to state 90
- variable go to state 356
+ variable go to state 355
variable_without_objects go to state 92
static_member go to state 93
base_variable_with_function_calls go to state 94
@@ -16730,101 +16694,101 @@ state 601
class_constant go to state 100
-state 602
+state 600
- 338 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @57 object_property @58 method_or_not variable_properties .
- 340 variable_properties: variable_properties . variable_property
+ 336 variable: base_variable_with_function_calls T_OBJECT_OPERATOR @55 object_property @56 method_or_not variable_properties .
+ 338 variable_properties: variable_properties . variable_property
- T_OBJECT_OPERATOR shift, and go to state 641
+ T_OBJECT_OPERATOR shift, and go to state 639
- $default reduce using rule 338 (variable)
+ $default reduce using rule 336 (variable)
- variable_property go to state 642
+ variable_property go to state 640
-state 603
+state 601
- 365 object_dim_list: object_dim_list '[' dim_offset ']' .
+ 363 object_dim_list: object_dim_list '[' dim_offset ']' .
- $default reduce using rule 365 (object_dim_list)
+ $default reduce using rule 363 (object_dim_list)
-state 604
+state 602
- 366 object_dim_list: object_dim_list '{' expr '}' .
+ 364 object_dim_list: object_dim_list '{' expr '}' .
- $default reduce using rule 366 (object_dim_list)
+ $default reduce using rule 364 (object_dim_list)
-state 605
+state 603
294 dynamic_class_name_variable_property: T_OBJECT_OPERATOR . object_property
- T_STRING shift, and go to state 423
+ T_STRING shift, and go to state 422
T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 424
+ '{' shift, and go to state 423
'$' shift, and go to state 71
- variable_without_objects go to state 425
- reference_variable go to state 298
+ variable_without_objects go to state 424
+ reference_variable go to state 297
compound_variable go to state 97
- object_property go to state 643
- object_dim_list go to state 427
- variable_name go to state 428
- simple_indirect_reference go to state 299
+ object_property go to state 641
+ object_dim_list go to state 426
+ variable_name go to state 427
+ simple_indirect_reference go to state 298
-state 606
+state 604
292 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property .
$default reduce using rule 292 (dynamic_class_name_variable_properties)
-state 607
+state 605
23 unticked_statement: T_IF '(' expr ')' ':' @5 inner_statement_list @6 . new_elseif_list new_else_single T_ENDIF ';'
$default reduce using rule 129 (new_elseif_list)
- new_elseif_list go to state 644
+ new_elseif_list go to state 642
-state 608
+state 606
20 unticked_statement: T_IF '(' expr ')' @3 statement @4 elseif_list . else_single
128 elseif_list: elseif_list . T_ELSEIF '(' expr ')' @33 statement
- T_ELSEIF shift, and go to state 645
- T_ELSE shift, and go to state 646
+ T_ELSEIF shift, and go to state 643
+ T_ELSE shift, and go to state 644
T_ELSEIF [reduce using rule 132 (else_single)]
T_ELSE [reduce using rule 132 (else_single)]
$default reduce using rule 132 (else_single)
- else_single go to state 647
+ else_single go to state 645
-state 609
+state 607
29 unticked_statement: T_DO @9 statement T_WHILE '(' @10 expr ')' . ';'
- ';' shift, and go to state 648
+ ';' shift, and go to state 646
-state 610
+state 608
10 inner_statement_list: inner_statement_list . @2 inner_statement
125 while_statement: ':' inner_statement_list . T_ENDWHILE ';'
- T_ENDWHILE shift, and go to state 649
+ T_ENDWHILE shift, and go to state 647
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 611
+state 609
33 unticked_statement: T_FOR '(' for_expr ';' @11 for_expr ';' @12 . for_expr ')' @13 for_statement
@@ -16874,14 +16838,14 @@ state 611
$default reduce using rule 196 (for_expr)
- for_expr go to state 650
- non_empty_for_expr go to state 245
+ for_expr go to state 648
+ non_empty_for_expr go to state 244
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 246
+ expr go to state 245
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -16896,64 +16860,64 @@ state 611
class_constant go to state 100
-state 612
+state 610
102 foreach_optional_arg: T_DOUBLE_ARROW foreach_variable .
$default reduce using rule 102 (foreach_optional_arg)
-state 613
+state 611
55 unticked_statement: T_FOREACH '(' expr_without_variable T_AS @17 variable foreach_optional_arg ')' . @18 foreach_statement
$default reduce using rule 54 (@18)
- @18 go to state 651
+ @18 go to state 649
-state 614
+state 612
52 unticked_statement: T_FOREACH '(' variable T_AS @15 foreach_variable foreach_optional_arg ')' . @16 foreach_statement
$default reduce using rule 51 (@16)
- @16 go to state 652
+ @16 go to state 650
-state 615
+state 613
112 declare_list: declare_list ',' T_STRING '=' static_scalar .
$default reduce using rule 112 (declare_list)
-state 616
+state 614
110 declare_statement: ':' inner_statement_list T_ENDDECLARE . ';'
- ';' shift, and go to state 653
+ ';' shift, and go to state 651
-state 617
+state 615
116 switch_case_list: ':' ';' case_list . T_ENDSWITCH ';'
119 case_list: case_list . T_CASE expr case_separator @31 inner_statement_list
121 | case_list . T_DEFAULT case_separator @32 inner_statement_list
- T_ENDSWITCH shift, and go to state 654
- T_CASE shift, and go to state 619
- T_DEFAULT shift, and go to state 620
+ T_ENDSWITCH shift, and go to state 652
+ T_CASE shift, and go to state 617
+ T_DEFAULT shift, and go to state 618
-state 618
+state 616
115 switch_case_list: ':' case_list T_ENDSWITCH . ';'
- ';' shift, and go to state 655
+ ';' shift, and go to state 653
-state 619
+state 617
119 case_list: case_list T_CASE . expr case_separator @31 inner_statement_list
@@ -17006,7 +16970,7 @@ state 619
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 656
+ expr go to state 654
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -17021,234 +16985,234 @@ state 619
class_constant go to state 100
-state 620
+state 618
121 case_list: case_list T_DEFAULT . case_separator @32 inner_statement_list
- ':' shift, and go to state 657
- ';' shift, and go to state 658
+ ':' shift, and go to state 655
+ ';' shift, and go to state 656
- case_separator go to state 659
+ case_separator go to state 657
-state 621
+state 619
114 switch_case_list: '{' ';' case_list . '}'
119 case_list: case_list . T_CASE expr case_separator @31 inner_statement_list
121 | case_list . T_DEFAULT case_separator @32 inner_statement_list
- T_CASE shift, and go to state 619
- T_DEFAULT shift, and go to state 620
- '}' shift, and go to state 660
+ T_CASE shift, and go to state 617
+ T_DEFAULT shift, and go to state 618
+ '}' shift, and go to state 658
-state 622
+state 620
113 switch_case_list: '{' case_list '}' .
$default reduce using rule 113 (switch_case_list)
-state 623
+state 621
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference T_STRING @28 '(' parameter_list ')' . '{' inner_statement_list '}'
- '{' shift, and go to state 661
+ '{' shift, and go to state 659
-state 624
+state 622
142 non_empty_parameter_list: non_empty_parameter_list ',' . optional_class_type T_VARIABLE
143 | non_empty_parameter_list ',' . optional_class_type '&' T_VARIABLE
144 | non_empty_parameter_list ',' . optional_class_type '&' T_VARIABLE '=' static_scalar
145 | non_empty_parameter_list ',' . optional_class_type T_VARIABLE '=' static_scalar
- T_STRING shift, and go to state 563
- T_ARRAY shift, and go to state 564
+ T_STRING shift, and go to state 561
+ T_ARRAY shift, and go to state 562
$default reduce using rule 146 (optional_class_type)
- optional_class_type go to state 662
+ optional_class_type go to state 660
-state 625
+state 623
139 non_empty_parameter_list: optional_class_type '&' . T_VARIABLE
140 | optional_class_type '&' . T_VARIABLE '=' static_scalar
- T_VARIABLE shift, and go to state 663
+ T_VARIABLE shift, and go to state 661
-state 626
+state 624
138 non_empty_parameter_list: optional_class_type T_VARIABLE .
141 | optional_class_type T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 664
+ '=' shift, and go to state 662
$default reduce using rule 138 (non_empty_parameter_list)
-state 627
+state 625
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 . fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
- T_STRING shift, and go to state 407
+ T_STRING shift, and go to state 406
- fully_qualified_class_name go to state 665
+ fully_qualified_class_name go to state 663
-state 628
+state 626
327 non_empty_static_array_pair_list: static_scalar T_DOUBLE_ARROW static_scalar .
$default reduce using rule 327 (non_empty_static_array_pair_list)
-state 629
+state 627
325 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar . T_DOUBLE_ARROW static_scalar
326 | non_empty_static_array_pair_list ',' static_scalar .
- T_DOUBLE_ARROW shift, and go to state 666
+ T_DOUBLE_ARROW shift, and go to state 664
$default reduce using rule 326 (non_empty_static_array_pair_list)
-state 630
+state 628
- 376 assignment_list_element: T_LIST '(' @62 assignment_list ')' .
+ 374 assignment_list_element: T_LIST '(' @60 assignment_list ')' .
- $default reduce using rule 376 (assignment_list_element)
+ $default reduce using rule 374 (assignment_list_element)
-state 631
+state 629
- 384 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable .
+ 382 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable .
- $default reduce using rule 384 (non_empty_array_pair_list)
+ $default reduce using rule 382 (non_empty_array_pair_list)
-state 632
+state 630
- 396 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' .
+ 394 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' .
- $default reduce using rule 396 (encaps_var)
+ $default reduce using rule 394 (encaps_var)
-state 633
+state 631
86 unticked_class_declaration_statement: class_entry_type T_STRING extends_from @29 implements_list '{' class_statement_list '}' .
$default reduce using rule 86 (unticked_class_declaration_statement)
-state 634
+state 632
193 class_constant_declaration: T_CONST T_STRING . '=' static_scalar
- '=' shift, and go to state 667
+ '=' shift, and go to state 665
-state 635
+state 633
169 class_statement: variable_modifiers @35 . class_variable_declaration ';'
- T_VARIABLE shift, and go to state 668
+ T_VARIABLE shift, and go to state 666
- class_variable_declaration go to state 669
+ class_variable_declaration go to state 667
-state 636
+state 634
173 class_statement: method_modifiers T_FUNCTION . @36 is_reference T_STRING @37 '(' parameter_list ')' method_body
$default reduce using rule 171 (@36)
- @36 go to state 670
+ @36 go to state 668
-state 637
+state 635
181 non_empty_member_modifiers: non_empty_member_modifiers member_modifier .
$default reduce using rule 181 (non_empty_member_modifiers)
-state 638
+state 636
192 class_constant_declaration: class_constant_declaration ',' . T_STRING '=' static_scalar
- T_STRING shift, and go to state 671
+ T_STRING shift, and go to state 669
-state 639
+state 637
170 class_statement: class_constant_declaration ';' .
$default reduce using rule 170 (class_statement)
-state 640
+state 638
- 345 method_or_not: '(' @60 function_call_parameter_list . ')'
+ 343 method_or_not: '(' @58 function_call_parameter_list . ')'
- ')' shift, and go to state 672
+ ')' shift, and go to state 670
-state 641
+state 639
- 343 variable_property: T_OBJECT_OPERATOR . object_property @59 method_or_not
+ 341 variable_property: T_OBJECT_OPERATOR . object_property @57 method_or_not
- T_STRING shift, and go to state 423
+ T_STRING shift, and go to state 422
T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 424
+ '{' shift, and go to state 423
'$' shift, and go to state 71
- variable_without_objects go to state 425
- reference_variable go to state 298
+ variable_without_objects go to state 424
+ reference_variable go to state 297
compound_variable go to state 97
- object_property go to state 673
- object_dim_list go to state 427
- variable_name go to state 428
- simple_indirect_reference go to state 299
+ object_property go to state 671
+ object_dim_list go to state 426
+ variable_name go to state 427
+ simple_indirect_reference go to state 298
-state 642
+state 640
- 340 variable_properties: variable_properties variable_property .
+ 338 variable_properties: variable_properties variable_property .
- $default reduce using rule 340 (variable_properties)
+ $default reduce using rule 338 (variable_properties)
-state 643
+state 641
294 dynamic_class_name_variable_property: T_OBJECT_OPERATOR object_property .
$default reduce using rule 294 (dynamic_class_name_variable_property)
-state 644
+state 642
23 unticked_statement: T_IF '(' expr ')' ':' @5 inner_statement_list @6 new_elseif_list . new_else_single T_ENDIF ';'
131 new_elseif_list: new_elseif_list . T_ELSEIF '(' expr ')' ':' @34 inner_statement_list
- T_ELSEIF shift, and go to state 674
- T_ELSE shift, and go to state 675
+ T_ELSEIF shift, and go to state 672
+ T_ELSE shift, and go to state 673
$default reduce using rule 134 (new_else_single)
- new_else_single go to state 676
+ new_else_single go to state 674
-state 645
+state 643
128 elseif_list: elseif_list T_ELSEIF . '(' expr ')' @33 statement
- '(' shift, and go to state 677
+ '(' shift, and go to state 675
-state 646
+state 644
133 else_single: T_ELSE . statement
@@ -17316,7 +17280,7 @@ state 646
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 678
+ statement go to state 676
unticked_statement go to state 76
expr_without_variable go to state 83
function_call go to state 84
@@ -17338,35 +17302,35 @@ state 646
class_constant go to state 100
-state 647
+state 645
20 unticked_statement: T_IF '(' expr ')' @3 statement @4 elseif_list else_single .
$default reduce using rule 20 (unticked_statement)
-state 648
+state 646
29 unticked_statement: T_DO @9 statement T_WHILE '(' @10 expr ')' ';' .
$default reduce using rule 29 (unticked_statement)
-state 649
+state 647
125 while_statement: ':' inner_statement_list T_ENDWHILE . ';'
- ';' shift, and go to state 679
+ ';' shift, and go to state 677
-state 650
+state 648
33 unticked_statement: T_FOR '(' for_expr ';' @11 for_expr ';' @12 for_expr . ')' @13 for_statement
- ')' shift, and go to state 680
+ ')' shift, and go to state 678
-state 651
+state 649
55 unticked_statement: T_FOREACH '(' expr_without_variable T_AS @17 variable foreach_optional_arg ')' @18 . foreach_statement
@@ -17376,7 +17340,7 @@ state 651
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- ':' shift, and go to state 681
+ ':' shift, and go to state 679
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -17435,9 +17399,9 @@ state 651
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 682
+ statement go to state 680
unticked_statement go to state 76
- foreach_statement go to state 683
+ foreach_statement go to state 681
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
@@ -17458,7 +17422,7 @@ state 651
class_constant go to state 100
-state 652
+state 650
52 unticked_statement: T_FOREACH '(' variable T_AS @15 foreach_variable foreach_optional_arg ')' @16 . foreach_statement
@@ -17468,7 +17432,7 @@ state 652
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- ':' shift, and go to state 681
+ ':' shift, and go to state 679
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -17527,9 +17491,9 @@ state 652
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 682
+ statement go to state 680
unticked_statement go to state 76
- foreach_statement go to state 684
+ foreach_statement go to state 682
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
@@ -17550,28 +17514,28 @@ state 652
class_constant go to state 100
-state 653
+state 651
110 declare_statement: ':' inner_statement_list T_ENDDECLARE ';' .
$default reduce using rule 110 (declare_statement)
-state 654
+state 652
116 switch_case_list: ':' ';' case_list T_ENDSWITCH . ';'
- ';' shift, and go to state 685
+ ';' shift, and go to state 683
-state 655
+state 653
115 switch_case_list: ':' case_list T_ENDSWITCH ';' .
$default reduce using rule 115 (switch_case_list)
-state 656
+state 654
119 case_list: case_list T_CASE expr . case_separator @31 inner_statement_list
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -17605,7 +17569,7 @@ state 656
T_LOGICAL_XOR shift, and go to state 182
T_LOGICAL_AND shift, and go to state 183
'?' shift, and go to state 184
- ':' shift, and go to state 657
+ ':' shift, and go to state 655
T_BOOLEAN_OR shift, and go to state 185
T_BOOLEAN_AND shift, and go to state 186
'|' shift, and go to state 187
@@ -17628,222 +17592,222 @@ state 656
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ';' shift, and go to state 658
+ ';' shift, and go to state 656
- case_separator go to state 686
+ case_separator go to state 684
-state 657
+state 655
122 case_separator: ':' .
$default reduce using rule 122 (case_separator)
-state 658
+state 656
123 case_separator: ';' .
$default reduce using rule 123 (case_separator)
-state 659
+state 657
121 case_list: case_list T_DEFAULT case_separator . @32 inner_statement_list
$default reduce using rule 120 (@32)
- @32 go to state 687
+ @32 go to state 685
-state 660
+state 658
114 switch_case_list: '{' ';' case_list '}' .
$default reduce using rule 114 (switch_case_list)
-state 661
+state 659
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference T_STRING @28 '(' parameter_list ')' '{' . inner_statement_list '}'
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 688
+ inner_statement_list go to state 686
-state 662
+state 660
142 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type . T_VARIABLE
143 | non_empty_parameter_list ',' optional_class_type . '&' T_VARIABLE
144 | non_empty_parameter_list ',' optional_class_type . '&' T_VARIABLE '=' static_scalar
145 | non_empty_parameter_list ',' optional_class_type . T_VARIABLE '=' static_scalar
- '&' shift, and go to state 689
- T_VARIABLE shift, and go to state 690
+ '&' shift, and go to state 687
+ T_VARIABLE shift, and go to state 688
-state 663
+state 661
139 non_empty_parameter_list: optional_class_type '&' T_VARIABLE .
140 | optional_class_type '&' T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 691
+ '=' shift, and go to state 689
$default reduce using rule 139 (non_empty_parameter_list)
-state 664
+state 662
141 non_empty_parameter_list: optional_class_type T_VARIABLE '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 692
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 690
+ static_class_constant go to state 377
-state 665
+state 663
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name . @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
$default reduce using rule 61 (@22)
- @22 go to state 693
+ @22 go to state 691
-state 666
+state 664
325 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 694
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 692
+ static_class_constant go to state 377
-state 667
+state 665
193 class_constant_declaration: T_CONST T_STRING '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 695
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 693
+ static_class_constant go to state 377
-state 668
+state 666
190 class_variable_declaration: T_VARIABLE .
191 | T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 696
+ '=' shift, and go to state 694
$default reduce using rule 190 (class_variable_declaration)
-state 669
+state 667
169 class_statement: variable_modifiers @35 class_variable_declaration . ';'
188 class_variable_declaration: class_variable_declaration . ',' T_VARIABLE
189 | class_variable_declaration . ',' T_VARIABLE '=' static_scalar
- ',' shift, and go to state 697
- ';' shift, and go to state 698
+ ',' shift, and go to state 695
+ ';' shift, and go to state 696
-state 670
+state 668
173 class_statement: method_modifiers T_FUNCTION @36 . is_reference T_STRING @37 '(' parameter_list ')' method_body
- '&' shift, and go to state 253
+ '&' shift, and go to state 252
$default reduce using rule 80 (is_reference)
- is_reference go to state 699
+ is_reference go to state 697
-state 671
+state 669
192 class_constant_declaration: class_constant_declaration ',' T_STRING . '=' static_scalar
- '=' shift, and go to state 700
+ '=' shift, and go to state 698
-state 672
+state 670
- 345 method_or_not: '(' @60 function_call_parameter_list ')' .
+ 343 method_or_not: '(' @58 function_call_parameter_list ')' .
- $default reduce using rule 345 (method_or_not)
+ $default reduce using rule 343 (method_or_not)
-state 673
+state 671
- 343 variable_property: T_OBJECT_OPERATOR object_property . @59 method_or_not
+ 341 variable_property: T_OBJECT_OPERATOR object_property . @57 method_or_not
- $default reduce using rule 342 (@59)
+ $default reduce using rule 340 (@57)
- @59 go to state 701
+ @57 go to state 699
-state 674
+state 672
131 new_elseif_list: new_elseif_list T_ELSEIF . '(' expr ')' ':' @34 inner_statement_list
- '(' shift, and go to state 702
+ '(' shift, and go to state 700
-state 675
+state 673
135 new_else_single: T_ELSE . ':' inner_statement_list
- ':' shift, and go to state 703
+ ':' shift, and go to state 701
-state 676
+state 674
23 unticked_statement: T_IF '(' expr ')' ':' @5 inner_statement_list @6 new_elseif_list new_else_single . T_ENDIF ';'
- T_ENDIF shift, and go to state 704
+ T_ENDIF shift, and go to state 702
-state 677
+state 675
128 elseif_list: elseif_list T_ELSEIF '(' . expr ')' @33 statement
@@ -17896,7 +17860,7 @@ state 677
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 705
+ expr go to state 703
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -17911,242 +17875,242 @@ state 677
class_constant go to state 100
-state 678
+state 676
133 else_single: T_ELSE statement .
$default reduce using rule 133 (else_single)
-state 679
+state 677
125 while_statement: ':' inner_statement_list T_ENDWHILE ';' .
$default reduce using rule 125 (while_statement)
-state 680
+state 678
33 unticked_statement: T_FOR '(' for_expr ';' @11 for_expr ';' @12 for_expr ')' . @13 for_statement
$default reduce using rule 32 (@13)
- @13 go to state 706
+ @13 go to state 704
-state 681
+state 679
108 foreach_statement: ':' . inner_statement_list T_ENDFOREACH ';'
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 707
+ inner_statement_list go to state 705
-state 682
+state 680
107 foreach_statement: statement .
$default reduce using rule 107 (foreach_statement)
-state 683
+state 681
55 unticked_statement: T_FOREACH '(' expr_without_variable T_AS @17 variable foreach_optional_arg ')' @18 foreach_statement .
$default reduce using rule 55 (unticked_statement)
-state 684
+state 682
52 unticked_statement: T_FOREACH '(' variable T_AS @15 foreach_variable foreach_optional_arg ')' @16 foreach_statement .
$default reduce using rule 52 (unticked_statement)
-state 685
+state 683
116 switch_case_list: ':' ';' case_list T_ENDSWITCH ';' .
$default reduce using rule 116 (switch_case_list)
-state 686
+state 684
119 case_list: case_list T_CASE expr case_separator . @31 inner_statement_list
$default reduce using rule 118 (@31)
- @31 go to state 708
+ @31 go to state 706
-state 687
+state 685
121 case_list: case_list T_DEFAULT case_separator @32 . inner_statement_list
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 709
+ inner_statement_list go to state 707
-state 688
+state 686
10 inner_statement_list: inner_statement_list . @2 inner_statement
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference T_STRING @28 '(' parameter_list ')' '{' inner_statement_list . '}'
- '}' shift, and go to state 710
+ '}' shift, and go to state 708
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 689
+state 687
143 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' . T_VARIABLE
144 | non_empty_parameter_list ',' optional_class_type '&' . T_VARIABLE '=' static_scalar
- T_VARIABLE shift, and go to state 711
+ T_VARIABLE shift, and go to state 709
-state 690
+state 688
142 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type T_VARIABLE .
145 | non_empty_parameter_list ',' optional_class_type T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 712
+ '=' shift, and go to state 710
$default reduce using rule 142 (non_empty_parameter_list)
-state 691
+state 689
140 non_empty_parameter_list: optional_class_type '&' T_VARIABLE '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 713
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 711
+ static_class_constant go to state 377
-state 692
+state 690
141 non_empty_parameter_list: optional_class_type T_VARIABLE '=' static_scalar .
$default reduce using rule 141 (non_empty_parameter_list)
-state 693
+state 691
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 . T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches
- T_VARIABLE shift, and go to state 714
+ T_VARIABLE shift, and go to state 712
-state 694
+state 692
325 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar .
$default reduce using rule 325 (non_empty_static_array_pair_list)
-state 695
+state 693
193 class_constant_declaration: T_CONST T_STRING '=' static_scalar .
$default reduce using rule 193 (class_constant_declaration)
-state 696
+state 694
191 class_variable_declaration: T_VARIABLE '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 715
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 713
+ static_class_constant go to state 377
-state 697
+state 695
188 class_variable_declaration: class_variable_declaration ',' . T_VARIABLE
189 | class_variable_declaration ',' . T_VARIABLE '=' static_scalar
- T_VARIABLE shift, and go to state 716
+ T_VARIABLE shift, and go to state 714
-state 698
+state 696
169 class_statement: variable_modifiers @35 class_variable_declaration ';' .
$default reduce using rule 169 (class_statement)
-state 699
+state 697
173 class_statement: method_modifiers T_FUNCTION @36 is_reference . T_STRING @37 '(' parameter_list ')' method_body
- T_STRING shift, and go to state 717
+ T_STRING shift, and go to state 715
-state 700
+state 698
192 class_constant_declaration: class_constant_declaration ',' T_STRING '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 718
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 716
+ static_class_constant go to state 377
-state 701
+state 699
- 343 variable_property: T_OBJECT_OPERATOR object_property @59 . method_or_not
+ 341 variable_property: T_OBJECT_OPERATOR object_property @57 . method_or_not
- '(' shift, and go to state 540
+ '(' shift, and go to state 538
- $default reduce using rule 346 (method_or_not)
+ $default reduce using rule 344 (method_or_not)
- method_or_not go to state 719
+ method_or_not go to state 717
-state 702
+state 700
131 new_elseif_list: new_elseif_list T_ELSEIF '(' . expr ')' ':' @34 inner_statement_list
@@ -18199,7 +18163,7 @@ state 702
fully_qualified_class_name go to state 85
common_scalar go to state 86
scalar go to state 87
- expr go to state 720
+ expr go to state 718
r_variable go to state 89
rw_variable go to state 90
variable go to state 91
@@ -18214,23 +18178,23 @@ state 702
class_constant go to state 100
-state 703
+state 701
135 new_else_single: T_ELSE ':' . inner_statement_list
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 721
+ inner_statement_list go to state 719
-state 704
+state 702
23 unticked_statement: T_IF '(' expr ')' ':' @5 inner_statement_list @6 new_elseif_list new_else_single T_ENDIF . ';'
- ';' shift, and go to state 722
+ ';' shift, and go to state 720
-state 705
+state 703
128 elseif_list: elseif_list T_ELSEIF '(' expr . ')' @33 statement
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -18286,10 +18250,10 @@ state 705
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 723
+ ')' shift, and go to state 721
-state 706
+state 704
33 unticked_statement: T_FOR '(' for_expr ';' @11 for_expr ';' @12 for_expr ')' @13 . for_statement
@@ -18299,7 +18263,7 @@ state 706
T_INCLUDE_ONCE shift, and go to state 8
T_INCLUDE shift, and go to state 9
T_PRINT shift, and go to state 10
- ':' shift, and go to state 724
+ ':' shift, and go to state 722
'+' shift, and go to state 11
'-' shift, and go to state 12
'!' shift, and go to state 13
@@ -18358,9 +18322,9 @@ state 706
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 725
+ statement go to state 723
unticked_statement go to state 76
- for_statement go to state 726
+ for_statement go to state 724
expr_without_variable go to state 83
function_call go to state 84
fully_qualified_class_name go to state 85
@@ -18381,28 +18345,28 @@ state 706
class_constant go to state 100
-state 707
+state 705
10 inner_statement_list: inner_statement_list . @2 inner_statement
108 foreach_statement: ':' inner_statement_list . T_ENDFOREACH ';'
- T_ENDFOREACH shift, and go to state 727
+ T_ENDFOREACH shift, and go to state 725
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 708
+state 706
119 case_list: case_list T_CASE expr case_separator @31 . inner_statement_list
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 728
+ inner_statement_list go to state 726
-state 709
+state 707
10 inner_statement_list: inner_statement_list . @2 inner_statement
121 case_list: case_list T_DEFAULT case_separator @32 inner_statement_list .
@@ -18413,103 +18377,103 @@ state 709
'}' reduce using rule 121 (case_list)
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 710
+state 708
84 unticked_function_declaration_statement: T_FUNCTION @27 is_reference T_STRING @28 '(' parameter_list ')' '{' inner_statement_list '}' .
$default reduce using rule 84 (unticked_function_declaration_statement)
-state 711
+state 709
143 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE .
144 | non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 729
+ '=' shift, and go to state 727
$default reduce using rule 143 (non_empty_parameter_list)
-state 712
+state 710
145 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type T_VARIABLE '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 730
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 728
+ static_class_constant go to state 377
-state 713
+state 711
140 non_empty_parameter_list: optional_class_type '&' T_VARIABLE '=' static_scalar .
$default reduce using rule 140 (non_empty_parameter_list)
-state 714
+state 712
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE . ')' @23 '{' inner_statement_list '}' @24 additional_catches
- ')' shift, and go to state 731
+ ')' shift, and go to state 729
-state 715
+state 713
191 class_variable_declaration: T_VARIABLE '=' static_scalar .
$default reduce using rule 191 (class_variable_declaration)
-state 716
+state 714
188 class_variable_declaration: class_variable_declaration ',' T_VARIABLE .
189 | class_variable_declaration ',' T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 732
+ '=' shift, and go to state 730
$default reduce using rule 188 (class_variable_declaration)
-state 717
+state 715
173 class_statement: method_modifiers T_FUNCTION @36 is_reference T_STRING . @37 '(' parameter_list ')' method_body
$default reduce using rule 172 (@37)
- @37 go to state 733
+ @37 go to state 731
-state 718
+state 716
192 class_constant_declaration: class_constant_declaration ',' T_STRING '=' static_scalar .
$default reduce using rule 192 (class_constant_declaration)
-state 719
+state 717
- 343 variable_property: T_OBJECT_OPERATOR object_property @59 method_or_not .
+ 341 variable_property: T_OBJECT_OPERATOR object_property @57 method_or_not .
- $default reduce using rule 343 (variable_property)
+ $default reduce using rule 341 (variable_property)
-state 720
+state 718
131 new_elseif_list: new_elseif_list T_ELSEIF '(' expr . ')' ':' @34 inner_statement_list
226 expr_without_variable: expr . T_BOOLEAN_OR @42 expr
@@ -18565,10 +18529,10 @@ state 720
'/' shift, and go to state 204
'%' shift, and go to state 205
T_INSTANCEOF shift, and go to state 206
- ')' shift, and go to state 734
+ ')' shift, and go to state 732
-state 721
+state 719
10 inner_statement_list: inner_statement_list . @2 inner_statement
135 new_else_single: T_ELSE ':' inner_statement_list .
@@ -18576,56 +18540,56 @@ state 721
T_ENDIF reduce using rule 135 (new_else_single)
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 722
+state 720
23 unticked_statement: T_IF '(' expr ')' ':' @5 inner_statement_list @6 new_elseif_list new_else_single T_ENDIF ';' .
$default reduce using rule 23 (unticked_statement)
-state 723
+state 721
128 elseif_list: elseif_list T_ELSEIF '(' expr ')' . @33 statement
$default reduce using rule 127 (@33)
- @33 go to state 735
+ @33 go to state 733
-state 724
+state 722
106 for_statement: ':' . inner_statement_list T_ENDFOR ';'
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 736
+ inner_statement_list go to state 734
-state 725
+state 723
105 for_statement: statement .
$default reduce using rule 105 (for_statement)
-state 726
+state 724
33 unticked_statement: T_FOR '(' for_expr ';' @11 for_expr ';' @12 for_expr ')' @13 for_statement .
$default reduce using rule 33 (unticked_statement)
-state 727
+state 725
108 foreach_statement: ':' inner_statement_list T_ENDFOREACH . ';'
- ';' shift, and go to state 737
+ ';' shift, and go to state 735
-state 728
+state 726
10 inner_statement_list: inner_statement_list . @2 inner_statement
119 case_list: case_list T_CASE expr case_separator @31 inner_statement_list .
@@ -18636,84 +18600,84 @@ state 728
'}' reduce using rule 119 (case_list)
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 729
+state 727
144 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 738
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 736
+ static_class_constant go to state 377
-state 730
+state 728
145 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type T_VARIABLE '=' static_scalar .
$default reduce using rule 145 (non_empty_parameter_list)
-state 731
+state 729
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' . @23 '{' inner_statement_list '}' @24 additional_catches
$default reduce using rule 62 (@23)
- @23 go to state 739
+ @23 go to state 737
-state 732
+state 730
189 class_variable_declaration: class_variable_declaration ',' T_VARIABLE '=' . static_scalar
- '+' shift, and go to state 372
- '-' shift, and go to state 373
+ '+' shift, and go to state 371
+ '-' shift, and go to state 372
T_LNUMBER shift, and go to state 29
T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 374
+ T_STRING shift, and go to state 373
T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ARRAY shift, and go to state 375
+ T_ARRAY shift, and go to state 374
T_CLASS_C shift, and go to state 62
T_METHOD_C shift, and go to state 63
T_FUNC_C shift, and go to state 64
T_LINE shift, and go to state 65
T_FILE shift, and go to state 66
- common_scalar go to state 376
- static_scalar go to state 740
- static_class_constant go to state 378
+ common_scalar go to state 375
+ static_scalar go to state 738
+ static_class_constant go to state 377
-state 733
+state 731
173 class_statement: method_modifiers T_FUNCTION @36 is_reference T_STRING @37 . '(' parameter_list ')' method_body
- '(' shift, and go to state 741
+ '(' shift, and go to state 739
-state 734
+state 732
131 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' . ':' @34 inner_statement_list
- ':' shift, and go to state 742
+ ':' shift, and go to state 740
-state 735
+state 733
128 elseif_list: elseif_list T_ELSEIF '(' expr ')' @33 . statement
@@ -18781,7 +18745,7 @@ state 735
'`' shift, and go to state 72
'"' shift, and go to state 73
- statement go to state 743
+ statement go to state 741
unticked_statement go to state 76
expr_without_variable go to state 83
function_call go to state 84
@@ -18803,139 +18767,139 @@ state 735
class_constant go to state 100
-state 736
+state 734
10 inner_statement_list: inner_statement_list . @2 inner_statement
106 for_statement: ':' inner_statement_list . T_ENDFOR ';'
- T_ENDFOR shift, and go to state 744
+ T_ENDFOR shift, and go to state 742
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 737
+state 735
108 foreach_statement: ':' inner_statement_list T_ENDFOREACH ';' .
$default reduce using rule 108 (foreach_statement)
-state 738
+state 736
144 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE '=' static_scalar .
$default reduce using rule 144 (non_empty_parameter_list)
-state 739
+state 737
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 . '{' inner_statement_list '}' @24 additional_catches
- '{' shift, and go to state 745
+ '{' shift, and go to state 743
-state 740
+state 738
189 class_variable_declaration: class_variable_declaration ',' T_VARIABLE '=' static_scalar .
$default reduce using rule 189 (class_variable_declaration)
-state 741
+state 739
173 class_statement: method_modifiers T_FUNCTION @36 is_reference T_STRING @37 '(' . parameter_list ')' method_body
- T_STRING shift, and go to state 563
- T_ARRAY shift, and go to state 564
+ T_STRING shift, and go to state 561
+ T_ARRAY shift, and go to state 562
')' reduce using rule 137 (parameter_list)
$default reduce using rule 146 (optional_class_type)
- parameter_list go to state 746
- non_empty_parameter_list go to state 566
- optional_class_type go to state 567
+ parameter_list go to state 744
+ non_empty_parameter_list go to state 564
+ optional_class_type go to state 565
-state 742
+state 740
131 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' ':' . @34 inner_statement_list
$default reduce using rule 130 (@34)
- @34 go to state 747
+ @34 go to state 745
-state 743
+state 741
128 elseif_list: elseif_list T_ELSEIF '(' expr ')' @33 statement .
$default reduce using rule 128 (elseif_list)
-state 744
+state 742
106 for_statement: ':' inner_statement_list T_ENDFOR . ';'
- ';' shift, and go to state 748
+ ';' shift, and go to state 746
-state 745
+state 743
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' . inner_statement_list '}' @24 additional_catches
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 749
+ inner_statement_list go to state 747
-state 746
+state 744
173 class_statement: method_modifiers T_FUNCTION @36 is_reference T_STRING @37 '(' parameter_list . ')' method_body
- ')' shift, and go to state 750
+ ')' shift, and go to state 748
-state 747
+state 745
131 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' ':' @34 . inner_statement_list
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 751
+ inner_statement_list go to state 749
-state 748
+state 746
106 for_statement: ':' inner_statement_list T_ENDFOR ';' .
$default reduce using rule 106 (for_statement)
-state 749
+state 747
10 inner_statement_list: inner_statement_list . @2 inner_statement
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list . '}' @24 additional_catches
- '}' shift, and go to state 752
+ '}' shift, and go to state 750
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 750
+state 748
173 class_statement: method_modifiers T_FUNCTION @36 is_reference T_STRING @37 '(' parameter_list ')' . method_body
- ';' shift, and go to state 753
- '{' shift, and go to state 754
+ ';' shift, and go to state 751
+ '{' shift, and go to state 752
- method_body go to state 755
+ method_body go to state 753
-state 751
+state 749
10 inner_statement_list: inner_statement_list . @2 inner_statement
131 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' ':' @34 inner_statement_list .
@@ -18945,183 +18909,183 @@ state 751
T_ENDIF reduce using rule 131 (new_elseif_list)
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 752
+state 750
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' . @24 additional_catches
$default reduce using rule 63 (@24)
- @24 go to state 756
+ @24 go to state 754
-state 753
+state 751
174 method_body: ';' .
$default reduce using rule 174 (method_body)
-state 754
+state 752
175 method_body: '{' . inner_statement_list '}'
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 757
+ inner_statement_list go to state 755
-state 755
+state 753
173 class_statement: method_modifiers T_FUNCTION @36 is_reference T_STRING @37 '(' parameter_list ')' method_body .
$default reduce using rule 173 (class_statement)
-state 756
+state 754
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 . additional_catches
- T_CATCH shift, and go to state 758
+ T_CATCH shift, and go to state 756
$default reduce using rule 67 (additional_catches)
- additional_catches go to state 759
- non_empty_additional_catches go to state 760
- additional_catch go to state 761
+ additional_catches go to state 757
+ non_empty_additional_catches go to state 758
+ additional_catch go to state 759
-state 757
+state 755
10 inner_statement_list: inner_statement_list . @2 inner_statement
175 method_body: '{' inner_statement_list . '}'
- '}' shift, and go to state 762
+ '}' shift, and go to state 760
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 758
+state 756
72 additional_catch: T_CATCH . '(' fully_qualified_class_name @25 T_VARIABLE ')' @26 '{' inner_statement_list '}'
- '(' shift, and go to state 763
+ '(' shift, and go to state 761
-state 759
+state 757
64 unticked_statement: T_TRY @20 '{' inner_statement_list '}' T_CATCH '(' @21 fully_qualified_class_name @22 T_VARIABLE ')' @23 '{' inner_statement_list '}' @24 additional_catches .
$default reduce using rule 64 (unticked_statement)
-state 760
+state 758
66 additional_catches: non_empty_additional_catches .
69 non_empty_additional_catches: non_empty_additional_catches . additional_catch
- T_CATCH shift, and go to state 758
+ T_CATCH shift, and go to state 756
$default reduce using rule 66 (additional_catches)
- additional_catch go to state 764
+ additional_catch go to state 762
-state 761
+state 759
68 non_empty_additional_catches: additional_catch .
$default reduce using rule 68 (non_empty_additional_catches)
-state 762
+state 760
175 method_body: '{' inner_statement_list '}' .
$default reduce using rule 175 (method_body)
-state 763
+state 761
72 additional_catch: T_CATCH '(' . fully_qualified_class_name @25 T_VARIABLE ')' @26 '{' inner_statement_list '}'
- T_STRING shift, and go to state 407
+ T_STRING shift, and go to state 406
- fully_qualified_class_name go to state 765
+ fully_qualified_class_name go to state 763
-state 764
+state 762
69 non_empty_additional_catches: non_empty_additional_catches additional_catch .
$default reduce using rule 69 (non_empty_additional_catches)
-state 765
+state 763
72 additional_catch: T_CATCH '(' fully_qualified_class_name . @25 T_VARIABLE ')' @26 '{' inner_statement_list '}'
$default reduce using rule 70 (@25)
- @25 go to state 766
+ @25 go to state 764
-state 766
+state 764
72 additional_catch: T_CATCH '(' fully_qualified_class_name @25 . T_VARIABLE ')' @26 '{' inner_statement_list '}'
- T_VARIABLE shift, and go to state 767
+ T_VARIABLE shift, and go to state 765
-state 767
+state 765
72 additional_catch: T_CATCH '(' fully_qualified_class_name @25 T_VARIABLE . ')' @26 '{' inner_statement_list '}'
- ')' shift, and go to state 768
+ ')' shift, and go to state 766
-state 768
+state 766
72 additional_catch: T_CATCH '(' fully_qualified_class_name @25 T_VARIABLE ')' . @26 '{' inner_statement_list '}'
$default reduce using rule 71 (@26)
- @26 go to state 769
+ @26 go to state 767
-state 769
+state 767
72 additional_catch: T_CATCH '(' fully_qualified_class_name @25 T_VARIABLE ')' @26 . '{' inner_statement_list '}'
- '{' shift, and go to state 770
+ '{' shift, and go to state 768
-state 770
+state 768
72 additional_catch: T_CATCH '(' fully_qualified_class_name @25 T_VARIABLE ')' @26 '{' . inner_statement_list '}'
$default reduce using rule 11 (inner_statement_list)
- inner_statement_list go to state 771
+ inner_statement_list go to state 769
-state 771
+state 769
10 inner_statement_list: inner_statement_list . @2 inner_statement
72 additional_catch: T_CATCH '(' fully_qualified_class_name @25 T_VARIABLE ')' @26 '{' inner_statement_list . '}'
- '}' shift, and go to state 772
+ '}' shift, and go to state 770
$default reduce using rule 9 (@2)
- @2 go to state 289
+ @2 go to state 288
-state 772
+state 770
72 additional_catch: T_CATCH '(' fully_qualified_class_name @25 T_VARIABLE ')' @26 '{' inner_statement_list '}' .
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index c15cda994..aa01fdaf4 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_parser.y,v 1.160.2.4.2.8 2007/08/13 21:16:57 stas Exp $ */
+/* $Id: zend_language_parser.y,v 1.160.2.4.2.10 2008/03/10 14:54:47 felipe Exp $ */
/*
* LALR shift/reduce conflicts and how they are resolved:
@@ -551,7 +551,7 @@ non_empty_for_expr:
expr_without_variable:
T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
- | variable '=' expr { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
+ | variable '=' expr { zend_check_writable_variable(&$1); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
| variable '=' '&' variable { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
| variable '=' '&' T_NEW class_name_reference { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
| T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
@@ -740,13 +740,13 @@ r_variable:
w_variable:
- variable { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); $$ = $1; }
- { zend_check_writable_variable(&$1); }
+ variable { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); $$ = $1;
+ zend_check_writable_variable(&$1); }
;
rw_variable:
- variable { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); $$ = $1; }
- { zend_check_writable_variable(&$1); }
+ variable { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); $$ = $1;
+ zend_check_writable_variable(&$1); }
;
variable:
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 99a873a8f..e2627d800 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -18,7 +18,7 @@
/* A Lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /repository/ZendEngine2/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto Exp $
+ * $Header: /repository/ZendEngine2/Attic/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto Exp $
* vim:ft=lex:
*/
@@ -3031,7 +3031,7 @@ char *yytext;
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.l,v 1.131.2.11.2.13 2007/09/09 16:33:34 iliaa Exp $ */
+/* $Id: zend_language_scanner.l,v 1.131.2.11.2.15 2008/04/09 21:40:13 scottmac Exp $ */
#define yyleng SCNG(yy_leng)
#define yytext SCNG(yy_text)
@@ -3743,7 +3743,7 @@ ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, si
/* TODO: support widechars */
- for (n = 0; n < sizeof(buf) && (c = zend_stream_getc(yyin TSRMLS_CC)) != EOF && c != '\n'; ++n) {
+ for (n = 0; n < len && (c = zend_stream_getc(yyin TSRMLS_CC)) != EOF && c != '\n'; ++n) {
buf[n] = (char)c;
}
if (c == '\n') {
@@ -3751,8 +3751,8 @@ ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, si
}
SCNG(script_org_size) = n;
- SCNG(script_org) = (char*)emalloc(SCNG(script_org_size)+1);
- memcpy(SCNG(script_org)+SCNG(script_org_size)-n, buf, n);
+ SCNG(script_org) = (char*)emalloc(SCNG(script_org_size) + 1);
+ memcpy(SCNG(script_org), buf, n);
return n;
}
@@ -3769,29 +3769,18 @@ ZEND_API int zend_multibyte_read_script(TSRMLS_D)
SCNG(script_org) = NULL;
SCNG(script_org_size) = 0;
- for (;;) {
- n = zend_stream_read(yyin, buf, sizeof(buf) TSRMLS_CC);
- if (n <= 0) {
- break;
- }
-
+ for (; (n = zend_stream_read(yyin, buf, sizeof(buf) TSRMLS_CC)) > 0; ) {
SCNG(script_org_size) += n;
- if (SCNG(script_org)) {
- SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size)+1);
- } else {
- SCNG(script_org) = (char*)emalloc(SCNG(script_org_size)+1);
- }
- memcpy(SCNG(script_org)+SCNG(script_org_size)-n, buf, n);
+ SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size));
+ memcpy(SCNG(script_org) + SCNG(script_org_size) - n, buf, n);
}
if (n < 0) {
return -1;
}
- if (!SCNG(script_org)) {
- SCNG(script_org) = emalloc(SCNG(script_org_size)+1);
- }
- *(SCNG(script_org)+SCNG(script_org_size)) = (char)NULL;
+ SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size) + 1);
+ *(SCNG(script_org)+SCNG(script_org_size)) = '\0';
return 0;
}
@@ -5469,8 +5458,13 @@ YY_RULE_SETUP
if (yyleng > CG(heredoc_len) && !memcmp(end - CG(heredoc_len), CG(heredoc), CG(heredoc_len))) {
int len = yyleng - CG(heredoc_len) - 2; /* 2 for newline before and after label */
- if (len > 0 && yytext[len - 1] == '\r' && yytext[len] == '\n') {
- len--;
+ /* May have matched fooLABEL; make sure there's a newline before it */
+ if (yytext[len] != '\n') {
+ if (yytext[len] != '\r') {
+ goto wrong_label;
+ }
+ } else if (len > 0 && yytext[len - 1] == '\r') {
+ len--; /* Windows newline */
}
/* Go back before last label char, to match in ST_END_HEREDOC state */
@@ -5487,6 +5481,7 @@ YY_RULE_SETUP
} else {
/* Go back to end of label, so the next match works correctly in case of
* a variable or another label at the beginning of the next line */
+wrong_label:
yyless(yyleng - 1);
yymore();
}
diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h
index e8ce560fc..024bc279d 100644
--- a/Zend/zend_language_scanner.h
+++ b/Zend/zend_language_scanner.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.h,v 1.19.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_language_scanner.h,v 1.19.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_SCANNER_H
#define ZEND_SCANNER_H
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 047ac6ef3..55ff5af08 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.l,v 1.131.2.11.2.13 2007/09/09 16:33:34 iliaa Exp $ */
+/* $Id: zend_language_scanner.l,v 1.131.2.11.2.15 2008/04/09 21:40:13 scottmac Exp $ */
#define yyleng SCNG(yy_leng)
#define yytext SCNG(yy_text)
@@ -723,7 +723,7 @@ ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, si
/* TODO: support widechars */
- for (n = 0; n < sizeof(buf) && (c = zend_stream_getc(yyin TSRMLS_CC)) != EOF && c != '\n'; ++n) {
+ for (n = 0; n < len && (c = zend_stream_getc(yyin TSRMLS_CC)) != EOF && c != '\n'; ++n) {
buf[n] = (char)c;
}
if (c == '\n') {
@@ -731,8 +731,8 @@ ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, si
}
SCNG(script_org_size) = n;
- SCNG(script_org) = (char*)emalloc(SCNG(script_org_size)+1);
- memcpy(SCNG(script_org)+SCNG(script_org_size)-n, buf, n);
+ SCNG(script_org) = (char*)emalloc(SCNG(script_org_size) + 1);
+ memcpy(SCNG(script_org), buf, n);
return n;
}
@@ -749,29 +749,18 @@ ZEND_API int zend_multibyte_read_script(TSRMLS_D)
SCNG(script_org) = NULL;
SCNG(script_org_size) = 0;
- for (;;) {
- n = zend_stream_read(yyin, buf, sizeof(buf) TSRMLS_CC);
- if (n <= 0) {
- break;
- }
-
+ for (; (n = zend_stream_read(yyin, buf, sizeof(buf) TSRMLS_CC)) > 0; ) {
SCNG(script_org_size) += n;
- if (SCNG(script_org)) {
- SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size)+1);
- } else {
- SCNG(script_org) = (char*)emalloc(SCNG(script_org_size)+1);
- }
- memcpy(SCNG(script_org)+SCNG(script_org_size)-n, buf, n);
+ SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size));
+ memcpy(SCNG(script_org) + SCNG(script_org_size) - n, buf, n);
}
if (n < 0) {
return -1;
}
- if (!SCNG(script_org)) {
- SCNG(script_org) = emalloc(SCNG(script_org_size)+1);
- }
- *(SCNG(script_org)+SCNG(script_org_size)) = (char)NULL;
+ SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size) + 1);
+ *(SCNG(script_org)+SCNG(script_org_size)) = '\0';
return 0;
}
@@ -1930,8 +1919,13 @@ HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({
if (yyleng > CG(heredoc_len) && !memcmp(end - CG(heredoc_len), CG(heredoc), CG(heredoc_len))) {
int len = yyleng - CG(heredoc_len) - 2; /* 2 for newline before and after label */
- if (len > 0 && yytext[len - 1] == '\r' && yytext[len] == '\n') {
- len--;
+ /* May have matched fooLABEL; make sure there's a newline before it */
+ if (yytext[len] != '\n') {
+ if (yytext[len] != '\r') {
+ goto wrong_label;
+ }
+ } else if (len > 0 && yytext[len - 1] == '\r') {
+ len--; /* Windows newline */
}
/* Go back before last label char, to match in ST_END_HEREDOC state */
@@ -1948,6 +1942,7 @@ HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({
} else {
/* Go back to end of label, so the next match works correctly in case of
* a variable or another label at the beginning of the next line */
+wrong_label:
yyless(yyleng - 1);
yymore();
}
diff --git a/Zend/zend_list.c b/Zend/zend_list.c
index 805b14ea3..4a3fa5189 100644
--- a/Zend/zend_list.c
+++ b/Zend/zend_list.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_list.c,v 1.66.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_list.c,v 1.66.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
/* resource lists */
diff --git a/Zend/zend_list.h b/Zend/zend_list.h
index 176c7dcdb..9446ee595 100644
--- a/Zend/zend_list.h
+++ b/Zend/zend_list.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_list.h,v 1.48.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_list.h,v 1.48.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_LIST_H
#define ZEND_LIST_H
diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c
index 8e4f5a8d0..6a2e29179 100644
--- a/Zend/zend_llist.c
+++ b/Zend/zend_llist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_llist.c,v 1.35.2.1.2.2 2007/02/16 08:33:28 dmitry Exp $ */
+/* $Id: zend_llist.c,v 1.35.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_llist.h"
diff --git a/Zend/zend_llist.h b/Zend/zend_llist.h
index 7854297e8..126a7896c 100644
--- a/Zend/zend_llist.h
+++ b/Zend/zend_llist.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_llist.h,v 1.33.2.1.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_llist.h,v 1.33.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_LLIST_H
#define ZEND_LLIST_H
diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h
index 8531c9676..3c6d1f1d2 100644
--- a/Zend/zend_modules.h
+++ b/Zend/zend_modules.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_modules.h,v 1.67.2.3.2.4 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_modules.h,v 1.67.2.3.2.5 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef MODULES_H
#define MODULES_H
diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c
index e5114797e..eae80315a 100644
--- a/Zend/zend_multibyte.c
+++ b/Zend/zend_multibyte.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_multibyte.c,v 1.4.2.4.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_multibyte.c,v 1.4.2.4.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_compile.h"
diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h
index 57cbbe7cd..7b364743c 100644
--- a/Zend/zend_multibyte.h
+++ b/Zend/zend_multibyte.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_multibyte.h,v 1.3.2.3.2.1 2007/01/01 09:35:46 sebastian Exp $ */
+/* $Id: zend_multibyte.h,v 1.3.2.3.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_MULTIBYTE_H
#define ZEND_MULTIBYTE_H
diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h
index 1a4d1553b..790eca2cc 100644
--- a/Zend/zend_multiply.h
+++ b/Zend/zend_multiply.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_multiply.h,v 1.10.2.1.2.2 2007/04/10 10:57:35 sniper Exp $ */
+/* $Id: zend_multiply.h,v 1.10.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#if defined(__i386__) && defined(__GNUC__)
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 18e1b5569..221dbbe37 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_object_handlers.c,v 1.135.2.6.2.22 2007/07/24 11:39:55 dmitry Exp $ */
+/* $Id: zend_object_handlers.c,v 1.135.2.6.2.28 2008/02/21 13:55:22 dmitry Exp $ */
#include "zend.h"
#include "zend_globals.h"
@@ -354,7 +354,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC)
}
} else {
if (!silent) {
- zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
+ zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
}
retval = &EG(uninitialized_zval_ptr);
}
@@ -758,14 +758,15 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
zend_function *fbc;
char *lc_method_name;
zval *object = *object_ptr;
+ ALLOCA_FLAG(use_heap)
- lc_method_name = do_alloca(method_len+1);
+ lc_method_name = do_alloca_with_limit(method_len+1, use_heap);
/* Create a zend_copy_str_tolower(dest, src, src_length); */
zend_str_tolower_copy(lc_method_name, method_name, method_len);
zobj = Z_OBJ_P(object);
if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&fbc) == FAILURE) {
- free_alloca(lc_method_name);
+ free_alloca_with_limit(lc_method_name, use_heap);
if (zobj->ce->__call) {
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
call_user_call->type = ZEND_INTERNAL_FUNCTION;
@@ -820,7 +821,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
}
}
- free_alloca(lc_method_name);
+ free_alloca_with_limit(lc_method_name, use_heap);
return fbc;
}
@@ -831,12 +832,32 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
zend_function *fbc;
if (zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen+1, (void **) &fbc)==FAILURE) {
- char *class_name = ce->name;
+ if (ce->__call &&
+ EG(This) &&
+ Z_OBJ_HT_P(EG(This))->get_class_entry &&
+ instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
+ zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
+
+ call_user_call->type = ZEND_INTERNAL_FUNCTION;
+ call_user_call->module = ce->module;
+ call_user_call->handler = zend_std_call_user_call;
+ call_user_call->arg_info = NULL;
+ call_user_call->num_args = 0;
+ call_user_call->scope = ce;
+ call_user_call->fn_flags = 0;
+ call_user_call->function_name = estrndup(function_name_strval, function_name_strlen);
+ call_user_call->pass_rest_by_reference = 0;
+ call_user_call->return_reference = ZEND_RETURN_VALUE;
- if (!class_name) {
- class_name = "";
+ return (union _zend_function *)call_user_call;
+ } else {
+ char *class_name = ce->name;
+
+ if (!class_name) {
+ class_name = "";
+ }
+ zend_error(E_ERROR, "Call to undefined method %s::%s()", class_name, function_name_strval);
}
- zend_error(E_ERROR, "Call to undefined method %s::%s()", class_name, function_name_strval);
}
if (fbc->op_array.fn_flags & ZEND_ACC_PUBLIC) {
/* No further checks necessary, most common case */
@@ -897,7 +918,7 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, char *propert
if (silent) {
return NULL;
} else {
- zend_error(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_name);
+ zend_error(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_name);
}
}
@@ -923,7 +944,7 @@ ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC)
} else if (constructor->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (Z_OBJ_HANDLER_P(object, get_class_entry)(object TSRMLS_CC) != EG(scope)) {
+ if (constructor->common.scope != EG(scope)) {
if (EG(scope)) {
zend_error(E_ERROR, "Call to private %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope)->name);
} else {
@@ -1085,6 +1106,9 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
}
if (Z_TYPE_P(retval) == IS_STRING) {
INIT_PZVAL(writeobj);
+ if (readobj == writeobj) {
+ zval_dtor(readobj);
+ }
ZVAL_ZVAL(writeobj, retval, 1, 1);
if (Z_TYPE_P(writeobj) != type) {
convert_to_explicit_type(writeobj, type);
@@ -1093,6 +1117,9 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
} else {
zval_ptr_dtor(&retval);
INIT_PZVAL(writeobj);
+ if (readobj == writeobj) {
+ zval_dtor(readobj);
+ }
ZVAL_EMPTY_STRING(writeobj);
zend_error(E_RECOVERABLE_ERROR, "Method %s::__toString() must return a string value", ce->name);
return SUCCESS;
@@ -1107,15 +1134,23 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
ce = Z_OBJCE_P(readobj);
zend_error(E_NOTICE, "Object of class %s could not be converted to int", ce->name);
INIT_PZVAL(writeobj);
+ if (readobj == writeobj) {
+ zval_dtor(readobj);
+ }
ZVAL_LONG(writeobj, 1);
return SUCCESS;
case IS_DOUBLE:
ce = Z_OBJCE_P(readobj);
zend_error(E_NOTICE, "Object of class %s could not be converted to double", ce->name);
INIT_PZVAL(writeobj);
+ if (readobj == writeobj) {
+ zval_dtor(readobj);
+ }
ZVAL_DOUBLE(writeobj, 1);
return SUCCESS;
default:
+ INIT_PZVAL(writeobj);
+ Z_TYPE_P(writeobj) = IS_NULL;
break;
}
return FAILURE;
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index bb17045fd..5fd5a4f1f 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_object_handlers.h,v 1.47.2.2.2.5 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_object_handlers.h,v 1.47.2.2.2.6 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_OBJECT_HANDLERS_H
#define ZEND_OBJECT_HANDLERS_H
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index fdccf4a7d..5bee77363 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_objects.c,v 1.56.2.3.2.6 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_objects.c,v 1.56.2.3.2.7 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_globals.h"
diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h
index 91f646418..a598ef4e5 100644
--- a/Zend/zend_objects.h
+++ b/Zend/zend_objects.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_objects.h,v 1.25.2.2.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_objects.h,v 1.25.2.2.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_OBJECTS_H
#define ZEND_OBJECTS_H
diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c
index 22998c559..c0d8444af 100644
--- a/Zend/zend_objects_API.c
+++ b/Zend/zend_objects_API.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_objects_API.c,v 1.47.2.6.2.6 2007/07/21 00:35:14 jani Exp $ */
+/* $Id: zend_objects_API.c,v 1.47.2.6.2.7 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_globals.h"
diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h
index 90c02d599..bbb26a269 100644
--- a/Zend/zend_objects_API.h
+++ b/Zend/zend_objects_API.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_objects_API.h,v 1.20.2.1.2.4 2007/07/21 00:35:14 jani Exp $ */
+/* $Id: zend_objects_API.h,v 1.20.2.1.2.5 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_OBJECTS_API_H
#define ZEND_OBJECTS_API_H
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index ff9a3fb3d..21ab11614 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_opcode.c,v 1.110.2.6.2.3 2007/04/16 08:09:55 dmitry Exp $ */
+/* $Id: zend_opcode.c,v 1.110.2.6.2.5 2007/12/31 07:20:03 sebastian Exp $ */
#include <stdio.h>
@@ -101,6 +101,8 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz
op_array->fn_flags = CG(interactive)?ZEND_ACC_INTERACTIVE:0;
+ memset(op_array->reserved, 0, ZEND_MAX_RESERVED_RESOURCES * sizeof(void*));
+
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_ctor_handler, op_array TSRMLS_CC);
}
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 4491eca41..d0c6e4f41 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_operators.c,v 1.208.2.4.2.23 2007/07/21 00:35:14 jani Exp $ */
+/* $Id: zend_operators.c,v 1.208.2.4.2.24 2007/12/31 07:20:03 sebastian Exp $ */
#include <ctype.h>
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index 95908e803..a1783c901 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_operators.h,v 1.94.2.4.2.10 2007/07/21 00:35:14 jani Exp $ */
+/* $Id: zend_operators.h,v 1.94.2.4.2.11 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_OPERATORS_H
#define ZEND_OPERATORS_H
diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c
index b0d2ed7f0..62e43fc34 100644
--- a/Zend/zend_ptr_stack.c
+++ b/Zend/zend_ptr_stack.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ptr_stack.c,v 1.23.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_ptr_stack.c,v 1.23.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_ptr_stack.h"
diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h
index 178278b14..a24e817bb 100644
--- a/Zend/zend_ptr_stack.h
+++ b/Zend/zend_ptr_stack.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ptr_stack.h,v 1.22.2.2.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_ptr_stack.h,v 1.22.2.2.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_PTR_STACK_H
#define ZEND_PTR_STACK_H
diff --git a/Zend/zend_qsort.c b/Zend/zend_qsort.c
index e186837da..da42b8ae3 100644
--- a/Zend/zend_qsort.c
+++ b/Zend/zend_qsort.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_qsort.c,v 1.8.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_qsort.c,v 1.8.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
diff --git a/Zend/zend_qsort.h b/Zend/zend_qsort.h
index b0ae89791..89bf7e1ef 100644
--- a/Zend/zend_qsort.h
+++ b/Zend/zend_qsort.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_qsort.h,v 1.8.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_qsort.h,v 1.8.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_QSORT_H
#define ZEND_QSORT_H
diff --git a/Zend/zend_sprintf.c b/Zend/zend_sprintf.c
index e15ac02b2..1545e51f3 100644
--- a/Zend/zend_sprintf.c
+++ b/Zend/zend_sprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_sprintf.c,v 1.16.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_sprintf.c,v 1.16.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#include <stdio.h>
diff --git a/Zend/zend_stack.c b/Zend/zend_stack.c
index f2892042a..53767e5aa 100644
--- a/Zend/zend_stack.c
+++ b/Zend/zend_stack.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_stack.c,v 1.16.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_stack.c,v 1.16.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_stack.h"
diff --git a/Zend/zend_stack.h b/Zend/zend_stack.h
index 61e4226aa..5040f277c 100644
--- a/Zend/zend_stack.h
+++ b/Zend/zend_stack.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_stack.h,v 1.19.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_stack.h,v 1.19.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_STACK_H
#define ZEND_STACK_H
diff --git a/Zend/zend_static_allocator.c b/Zend/zend_static_allocator.c
index 6eaec24f5..ac91ab059 100644
--- a/Zend/zend_static_allocator.c
+++ b/Zend/zend_static_allocator.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_static_allocator.c,v 1.13.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_static_allocator.c,v 1.13.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend_static_allocator.h"
diff --git a/Zend/zend_static_allocator.h b/Zend/zend_static_allocator.h
index a053ca887..f01d9bcee 100644
--- a/Zend/zend_static_allocator.h
+++ b/Zend/zend_static_allocator.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_static_allocator.h,v 1.13.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_static_allocator.h,v 1.13.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_STATIC_ALLOCATOR_H
#define ZEND_STATIC_ALLOCATOR_H
diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c
index 0fbb91554..3b1113a17 100644
--- a/Zend/zend_stream.c
+++ b/Zend/zend_stream.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_stream.c,v 1.13.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_stream.c,v 1.13.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h
index 42367b2bd..df5774489 100644
--- a/Zend/zend_stream.h
+++ b/Zend/zend_stream.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_stream.h,v 1.8.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_stream.h,v 1.8.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_STREAM_H
#define ZEND_STREAM_H
diff --git a/Zend/zend_strtod.h b/Zend/zend_strtod.h
index 249b63a39..1569c916f 100644
--- a/Zend/zend_strtod.h
+++ b/Zend/zend_strtod.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_strtod.h,v 1.3.2.1.2.4 2007/04/22 21:33:10 tony2001 Exp $ */
+/* $Id: zend_strtod.h,v 1.3.2.1.2.5 2007/12/31 07:20:03 sebastian Exp $ */
/* This is a header file for the strtod implementation by David M. Gay which
* can be found in zend_strtod.c */
diff --git a/Zend/zend_ts_hash.c b/Zend/zend_ts_hash.c
index 3f54629ef..c4daeb99e 100644
--- a/Zend/zend_ts_hash.c
+++ b/Zend/zend_ts_hash.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ts_hash.c,v 1.14.2.1.2.2 2007/05/11 12:21:26 tony2001 Exp $ */
+/* $Id: zend_ts_hash.c,v 1.14.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#include "zend.h"
#include "zend_ts_hash.h"
diff --git a/Zend/zend_ts_hash.h b/Zend/zend_ts_hash.h
index d63400796..8c5a01154 100644
--- a/Zend/zend_ts_hash.h
+++ b/Zend/zend_ts_hash.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ts_hash.h,v 1.13.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_ts_hash.h,v 1.13.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_TS_HASH_H
#define ZEND_TS_HASH_H
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index c7c0b9717..9b1cc606b 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_types.h,v 1.6.2.2.2.3 2007/04/17 06:26:31 dmitry Exp $ */
+/* $Id: zend_types.h,v 1.6.2.2.2.4 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_TYPES_H
#define ZEND_TYPES_H
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 9a2c374ec..499e46bb6 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_variables.c,v 1.62.2.1.2.2 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_variables.c,v 1.62.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#include <stdio.h>
#include "zend.h"
diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h
index ccebc3b96..6a8fc90a1 100644
--- a/Zend/zend_variables.h
+++ b/Zend/zend_variables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_variables.h,v 1.34.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_variables.h,v 1.34.2.1.2.2 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_VARIABLES_H
#define ZEND_VARIABLES_H
diff --git a/Zend/zend_vm.h b/Zend/zend_vm.h
index 4d6bdc08f..ac6ef6233 100644
--- a/Zend/zend_vm.h
+++ b/Zend/zend_vm.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm.h,v 1.7.2.1.2.2 2007/07/21 00:35:14 jani Exp $ */
+/* $Id: zend_vm.h,v 1.7.2.1.2.3 2007/12/31 07:20:03 sebastian Exp $ */
#ifndef ZEND_VM_H
#define ZEND_VM_H
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index dcff366a7..f29970a49 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.59.2.29.2.51 2007/10/04 23:23:41 iliaa Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.29.2.56 2008/03/04 11:46:09 dmitry Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -1064,6 +1064,10 @@ ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
FREE_OP1_VAR_PTR();
ZEND_VM_NEXT_OPCODE();
@@ -1081,6 +1085,10 @@ ZEND_VM_HANDLER(87, ZEND_FETCH_DIM_RW, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
FREE_OP1_VAR_PTR();
ZEND_VM_NEXT_OPCODE();
@@ -1115,6 +1123,10 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
FREE_OP1_VAR_PTR();
ZEND_VM_NEXT_OPCODE();
@@ -1143,6 +1155,10 @@ ZEND_VM_HANDLER(96, ZEND_FETCH_DIM_UNSET, VAR|CV, CONST|TMP|VAR|CV)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
FREE_OP1_VAR_PTR();
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -1249,6 +1265,10 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
FREE_OP1_VAR_PTR();
ZEND_VM_NEXT_OPCODE();
@@ -1273,6 +1293,10 @@ ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
FREE_OP1_VAR_PTR();
ZEND_VM_NEXT_OPCODE();
@@ -1305,6 +1329,10 @@ ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
FREE_OP1_VAR_PTR();
ZEND_VM_NEXT_OPCODE();
@@ -1338,6 +1366,10 @@ ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
FREE_OP1_VAR_PTR();
@@ -1995,6 +2027,8 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
}
}
+ EX(function_state).function = (zend_function *) EX(op_array);
+ EG(function_state_ptr) = &EX(function_state);
ctor_opline = (zend_op*)zend_ptr_stack_pop(&EG(arg_types_stack));
if (EG(This)) {
@@ -2017,8 +2051,6 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
}
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
- EX(function_state).function = (zend_function *) EX(op_array);
- EG(function_state_ptr) = &EX(function_state);
zend_ptr_stack_clear_multiple(TSRMLS_C);
if (EG(exception)) {
@@ -2371,9 +2403,6 @@ ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
ALLOC_ZVAL(default_value);
*default_value = opline->op2.u.constant;
- if (Z_TYPE(opline->op2.u.constant)==IS_CONSTANT_ARRAY) {
- zval_copy_ctor(default_value);
- }
default_value->refcount=1;
zval_update_constant(&default_value, 0 TSRMLS_CC);
default_value->refcount=0;
@@ -3794,11 +3823,12 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
}
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
- if (EX(op_array)->brk_cont_array[i].start > op_num) {
+ if (EX(op_array)->brk_cont_array[i].start < 0) {
+ continue;
+ } else if (EX(op_array)->brk_cont_array[i].start > op_num) {
/* further blocks will not be relevant... */
break;
- }
- if (op_num < EX(op_array)->brk_cont_array[i].brk) {
+ } else if (op_num < EX(op_array)->brk_cont_array[i].brk) {
if (!catched ||
catch_op_num >= EX(op_array)->brk_cont_array[i].brk) {
zend_op *brk_opline = &EX(op_array)->opcodes[EX(op_array)->brk_cont_array[i].brk];
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 8ce7ef972..79e1a1067 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -280,6 +280,8 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
}
}
+ EX(function_state).function = (zend_function *) EX(op_array);
+ EG(function_state_ptr) = &EX(function_state);
ctor_opline = (zend_op*)zend_ptr_stack_pop(&EG(arg_types_stack));
if (EG(This)) {
@@ -302,8 +304,6 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
}
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
- EX(function_state).function = (zend_function *) EX(op_array);
- EG(function_state_ptr) = &EX(function_state);
zend_ptr_stack_clear_multiple(TSRMLS_C);
if (EG(exception)) {
@@ -566,11 +566,12 @@ static int ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
- if (EX(op_array)->brk_cont_array[i].start > op_num) {
+ if (EX(op_array)->brk_cont_array[i].start < 0) {
+ continue;
+ } else if (EX(op_array)->brk_cont_array[i].start > op_num) {
/* further blocks will not be relevant... */
break;
- }
- if (op_num < EX(op_array)->brk_cont_array[i].brk) {
+ } else if (op_num < EX(op_array)->brk_cont_array[i].brk) {
if (!catched ||
catch_op_num >= EX(op_array)->brk_cont_array[i].brk) {
zend_op *brk_opline = &EX(op_array)->opcodes[EX(op_array)->brk_cont_array[i].brk];
@@ -776,9 +777,6 @@ static int ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ALLOC_ZVAL(default_value);
*default_value = opline->op2.u.constant;
- if (Z_TYPE(opline->op2.u.constant)==IS_CONSTANT_ARRAY) {
- zval_copy_ctor(default_value);
- }
default_value->refcount=1;
zval_update_constant(&default_value, 0 TSRMLS_CC);
default_value->refcount=0;
@@ -8955,6 +8953,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -8972,6 +8974,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -9006,6 +9012,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -9034,6 +9044,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -9140,6 +9154,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -9164,6 +9182,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -9196,6 +9218,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -9229,6 +9255,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -10440,6 +10470,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -10457,6 +10491,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -10491,6 +10529,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -10519,6 +10561,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -10625,6 +10671,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -10649,6 +10699,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -10681,6 +10735,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -10714,6 +10772,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -11928,6 +11990,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -11945,6 +12011,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -11979,6 +12049,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -12007,6 +12081,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -12113,6 +12191,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -12137,6 +12219,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -12169,6 +12255,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -12202,6 +12292,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -13019,6 +13113,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -13036,6 +13134,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -13058,6 +13160,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_A
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -13888,6 +13994,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -13905,6 +14015,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -13939,6 +14053,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -13967,6 +14085,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -14073,6 +14195,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -14097,6 +14223,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -14129,6 +14259,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
@@ -14162,6 +14296,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
@@ -15313,6 +15451,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -15337,6 +15479,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -15369,6 +15515,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -15402,6 +15552,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
@@ -16321,6 +16475,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -16345,6 +16503,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -16377,6 +16539,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_A
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -16410,6 +16576,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
@@ -17285,6 +17455,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -17309,6 +17483,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -17341,6 +17519,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_A
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -17374,6 +17556,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
@@ -18514,6 +18700,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -18538,6 +18728,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -18570,6 +18764,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_AR
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -18603,6 +18801,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
@@ -20878,6 +21080,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -20895,6 +21101,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -20929,6 +21139,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -20957,6 +21171,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -21062,6 +21280,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -21086,6 +21308,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -21118,6 +21344,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -21151,6 +21381,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
@@ -22355,6 +22589,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -22372,6 +22610,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -22406,6 +22648,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -22434,6 +22680,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -22539,6 +22789,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -22563,6 +22817,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -22595,6 +22853,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -22628,6 +22890,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
@@ -23835,6 +24101,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -23852,6 +24122,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -23886,6 +24160,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -23914,6 +24192,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -24019,6 +24301,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -24043,6 +24329,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -24075,6 +24365,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -24108,6 +24402,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
@@ -24917,6 +25215,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -24934,6 +25236,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -24956,6 +25262,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_AR
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -25785,6 +26095,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -25802,6 +26116,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -25836,6 +26154,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -25864,6 +26186,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
@@ -25969,6 +26295,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -25993,6 +26323,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -26025,6 +26359,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
@@ -26058,6 +26396,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
READY_TO_DESTROY(free_op1.var) &&
!RETURN_VALUE_UNUSED(&opline->result)) {
AI_USE_PTR(EX_T(opline->result.u.var).var);
+ if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
+ ZVAL_REFCOUNT(*EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
+ SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
+ }
}
PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index 062ac3915..57244bfc3 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
| Authors: Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
- $Id: zend_vm_gen.php,v 1.12.2.5.2.4 2007/01/09 11:53:08 dmitry Exp $
+ $Id: zend_vm_gen.php,v 1.12.2.5.2.5 2007/12/31 07:25:08 sebastian Exp $
*/
$header_text = <<< DATA
@@ -24,7 +24,7 @@ $header_text = <<< DATA
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_vm_opcodes.h b/Zend/zend_vm_opcodes.h
index 230e11097..e8fbd535a 100644
--- a/Zend/zend_vm_opcodes.h
+++ b/Zend/zend_vm_opcodes.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/acconfig.h b/acconfig.h
index 06bb968de..1f75c3b3f 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: acconfig.h,v 1.40.2.1.2.1 2007/01/01 09:35:45 sebastian Exp $ */
+/* $Id: acconfig.h,v 1.40.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#define ZEND_API
#define ZEND_DLEXPORT
diff --git a/configure b/configure
index b1bf0394b..6937f512f 100755
--- a/configure
+++ b/configure
@@ -2429,7 +2429,7 @@ echo "$ac_t""$target" 1>&6
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=2
-PHP_RELEASE_VERSION=5
+PHP_RELEASE_VERSION=6
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr $PHP_MAJOR_VERSION \* 10000 + $PHP_MINOR_VERSION \* 100 + $PHP_RELEASE_VERSION`
@@ -28399,11 +28399,16 @@ if test "$PHP_DB4" != "no"; then
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
- for i in $PHP_DB4 /usr/local/BerkeleyDB.4.2 /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
+ dbdp="/usr/local/BerkeleyDB.4."
+ for i in $PHP_DB4 ${dbdp}6 ${dbdp}5 ${dbdp}4 ${dbdp}3 ${dbdp}2 ${dbdp}1 ${dbdp}0 /usr/local /usr; do
if test -f "$i/db4/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/db4/db.h
break
+ elif test -f "$i/include/db4.6/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db4.6/db.h
+ break
elif test -f "$i/include/db4.5/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/include/db4.5/db.h
@@ -28430,7 +28435,7 @@ if test "$PHP_DB4" != "no"; then
if test -z "$THIS_INCLUDE"; then
{ echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; }
fi
- for LIB in db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do
+ for LIB in db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do
if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
lib_found="";
@@ -28440,7 +28445,7 @@ if test "$PHP_DB4" != "no"; then
LIBS="-l$LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 28444 "configure"
+#line 28449 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -28451,11 +28456,11 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:28455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:28460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 28459 "configure"
+#line 28464 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -28492,14 +28497,14 @@ rm -f conftest*
done
if test -z "$THIS_LIBS"; then
echo $ac_n "checking for db4 major version""... $ac_c" 1>&6
-echo "configure:28496: checking for db4 major version" >&5
+echo "configure:28501: checking for db4 major version" >&5
{ echo "configure: error: Header contains different version" 1>&2; exit 1; }
fi
if test "4" = "4"; then
echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6
-echo "configure:28501: checking for db4 minor version and patch level" >&5
+echo "configure:28506: checking for db4 minor version and patch level" >&5
cat > conftest.$ac_ext <<EOF
-#line 28503 "configure"
+#line 28508 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -28525,9 +28530,9 @@ rm -f conftest*
fi
if test "$ext_shared" = "yes"; then
echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
-echo "configure:28529: checking if dba can be used as shared extension" >&5
+echo "configure:28534: checking if dba can be used as shared extension" >&5
cat > conftest.$ac_ext <<EOF
-#line 28531 "configure"
+#line 28536 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -28684,7 +28689,7 @@ fi
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:28688: checking for $THIS_FULL_NAME support" >&5
+echo "configure:28693: checking for $THIS_FULL_NAME support" >&5
if test -n ""; then
{ echo "configure: error: " 1>&2; exit 1; }
fi
@@ -28712,7 +28717,7 @@ if test "$PHP_DB3" != "no"; then
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:28716: checking for $THIS_FULL_NAME support" >&5
+echo "configure:28721: checking for $THIS_FULL_NAME support" >&5
if test -n "You cannot combine --with-db3 with --with-db4"; then
{ echo "configure: error: You cannot combine --with-db3 with --with-db4" 1>&2; exit 1; }
fi
@@ -28763,7 +28768,7 @@ echo "configure:28716: checking for $THIS_FULL_NAME support" >&5
LIBS="-l$LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 28767 "configure"
+#line 28772 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -28774,11 +28779,11 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:28778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:28783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 28782 "configure"
+#line 28787 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -28815,14 +28820,14 @@ rm -f conftest*
done
if test -z "$THIS_LIBS"; then
echo $ac_n "checking for db3 major version""... $ac_c" 1>&6
-echo "configure:28819: checking for db3 major version" >&5
+echo "configure:28824: checking for db3 major version" >&5
{ echo "configure: error: Header contains different version" 1>&2; exit 1; }
fi
if test "3" = "4"; then
echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6
-echo "configure:28824: checking for db4 minor version and patch level" >&5
+echo "configure:28829: checking for db4 minor version and patch level" >&5
cat > conftest.$ac_ext <<EOF
-#line 28826 "configure"
+#line 28831 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -28848,9 +28853,9 @@ rm -f conftest*
fi
if test "$ext_shared" = "yes"; then
echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
-echo "configure:28852: checking if dba can be used as shared extension" >&5
+echo "configure:28857: checking if dba can be used as shared extension" >&5
cat > conftest.$ac_ext <<EOF
-#line 28854 "configure"
+#line 28859 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -29007,7 +29012,7 @@ fi
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:29011: checking for $THIS_FULL_NAME support" >&5
+echo "configure:29016: checking for $THIS_FULL_NAME support" >&5
if test -n ""; then
{ echo "configure: error: " 1>&2; exit 1; }
fi
@@ -29035,7 +29040,7 @@ if test "$PHP_DB2" != "no"; then
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:29039: checking for $THIS_FULL_NAME support" >&5
+echo "configure:29044: checking for $THIS_FULL_NAME support" >&5
if test -n "You cannot combine --with-db2 with --with-db3 or --with-db4"; then
{ echo "configure: error: You cannot combine --with-db2 with --with-db3 or --with-db4" 1>&2; exit 1; }
fi
@@ -29086,7 +29091,7 @@ echo "configure:29039: checking for $THIS_FULL_NAME support" >&5
LIBS="-l$LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 29090 "configure"
+#line 29095 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -29097,11 +29102,11 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:29101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:29106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 29105 "configure"
+#line 29110 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -29138,14 +29143,14 @@ rm -f conftest*
done
if test -z "$THIS_LIBS"; then
echo $ac_n "checking for db2 major version""... $ac_c" 1>&6
-echo "configure:29142: checking for db2 major version" >&5
+echo "configure:29147: checking for db2 major version" >&5
{ echo "configure: error: Header contains different version" 1>&2; exit 1; }
fi
if test "2" = "4"; then
echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6
-echo "configure:29147: checking for db4 minor version and patch level" >&5
+echo "configure:29152: checking for db4 minor version and patch level" >&5
cat > conftest.$ac_ext <<EOF
-#line 29149 "configure"
+#line 29154 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -29171,9 +29176,9 @@ rm -f conftest*
fi
if test "$ext_shared" = "yes"; then
echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
-echo "configure:29175: checking if dba can be used as shared extension" >&5
+echo "configure:29180: checking if dba can be used as shared extension" >&5
cat > conftest.$ac_ext <<EOF
-#line 29177 "configure"
+#line 29182 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -29330,7 +29335,7 @@ fi
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:29334: checking for $THIS_FULL_NAME support" >&5
+echo "configure:29339: checking for $THIS_FULL_NAME support" >&5
if test -n ""; then
{ echo "configure: error: " 1>&2; exit 1; }
fi
@@ -29350,7 +29355,7 @@ if test "$PHP_DB1" != "no"; then
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
echo $ac_n "checking for DB1 in library""... $ac_c" 1>&6
-echo "configure:29354: checking for DB1 in library" >&5
+echo "configure:29359: checking for DB1 in library" >&5
if test "$HAVE_DB4" = "1"; then
THIS_VERSION=4
THIS_LIBS=$DB4_LIBS
@@ -29398,7 +29403,7 @@ EOF
fi
echo "$ac_t""$THIS_LIBS" 1>&6
echo $ac_n "checking for DB1 in header""... $ac_c" 1>&6
-echo "configure:29402: checking for DB1 in header" >&5
+echo "configure:29407: checking for DB1 in header" >&5
echo "$ac_t""$THIS_INCLUDE" 1>&6
if test -n "$THIS_INCLUDE"; then
@@ -29408,7 +29413,7 @@ echo "configure:29402: checking for DB1 in header" >&5
LIBS="-l$THIS_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 29412 "configure"
+#line 29417 "configure"
#include "confdefs.h"
#include "$THIS_INCLUDE"
@@ -29419,7 +29424,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:29423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:29428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<EOF
@@ -29569,7 +29574,7 @@ fi
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:29573: checking for $THIS_FULL_NAME support" >&5
+echo "configure:29578: checking for $THIS_FULL_NAME support" >&5
if test -n ""; then
{ echo "configure: error: " 1>&2; exit 1; }
fi
@@ -29597,7 +29602,7 @@ if test "$PHP_DBM" != "no"; then
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:29601: checking for $THIS_FULL_NAME support" >&5
+echo "configure:29606: checking for $THIS_FULL_NAME support" >&5
if test -n "You cannot combine --with-dbm with --with-qdbm"; then
{ echo "configure: error: You cannot combine --with-dbm with --with-qdbm" 1>&2; exit 1; }
fi
@@ -29721,7 +29726,7 @@ echo "configure:29601: checking for $THIS_FULL_NAME support" >&5
done
echo $ac_n "checking for dbminit in -l$LIB""... $ac_c" 1>&6
-echo "configure:29725: checking for dbminit in -l$LIB" >&5
+echo "configure:29730: checking for dbminit in -l$LIB" >&5
ac_lib_var=`echo $LIB'_'dbminit | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -29729,7 +29734,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 29733 "configure"
+#line 29738 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -29740,7 +29745,7 @@ int main() {
dbminit()
; return 0; }
EOF
-if { (eval echo configure:29744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:29749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -29760,7 +29765,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
ext_shared=$save_ext_shared
echo $ac_n "checking for DBM using GDBM""... $ac_c" 1>&6
-echo "configure:29764: checking for DBM using GDBM" >&5
+echo "configure:29769: checking for DBM using GDBM" >&5
cat >> confdefs.h <<EOF
#define DBM_INCLUDE_FILE "$THIS_INCLUDE"
EOF
@@ -29924,7 +29929,7 @@ fi
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:29928: checking for $THIS_FULL_NAME support" >&5
+echo "configure:29933: checking for $THIS_FULL_NAME support" >&5
if test -n ""; then
{ echo "configure: error: " 1>&2; exit 1; }
fi
@@ -30145,7 +30150,7 @@ elif test "$PHP_CDB" != "no"; then
done
echo $ac_n "checking for cdb_read in -l$LIB""... $ac_c" 1>&6
-echo "configure:30149: checking for cdb_read in -l$LIB" >&5
+echo "configure:30154: checking for cdb_read in -l$LIB" >&5
ac_lib_var=`echo $LIB'_'cdb_read | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -30153,7 +30158,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 30157 "configure"
+#line 30162 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -30164,7 +30169,7 @@ int main() {
cdb_read()
; return 0; }
EOF
-if { (eval echo configure:30168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:30173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -30333,7 +30338,7 @@ fi
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:30337: checking for $THIS_FULL_NAME support" >&5
+echo "configure:30342: checking for $THIS_FULL_NAME support" >&5
if test -n ""; then
{ echo "configure: error: " 1>&2; exit 1; }
fi
@@ -30364,7 +30369,7 @@ fi
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:30368: checking for $THIS_FULL_NAME support" >&5
+echo "configure:30373: checking for $THIS_FULL_NAME support" >&5
if test -n ""; then
{ echo "configure: error: " 1>&2; exit 1; }
fi
@@ -30395,7 +30400,7 @@ fi
THIS_FULL_NAME="$THIS_NAME"
fi
echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
-echo "configure:30399: checking for $THIS_FULL_NAME support" >&5
+echo "configure:30404: checking for $THIS_FULL_NAME support" >&5
if test -n ""; then
{ echo "configure: error: " 1>&2; exit 1; }
fi
@@ -30410,7 +30415,7 @@ echo "configure:30399: checking for $THIS_FULL_NAME support" >&5
echo $ac_n "checking whether to enable DBA interface""... $ac_c" 1>&6
-echo "configure:30414: checking whether to enable DBA interface" >&5
+echo "configure:30419: checking whether to enable DBA interface" >&5
if test "$HAVE_DBA" = "1"; then
if test "$ext_shared" = "yes"; then
echo "$ac_t""yes, shared" 1>&6
@@ -30729,7 +30734,7 @@ fi
php_enable_dbase=no
echo $ac_n "checking whether to enable dbase support""... $ac_c" 1>&6
-echo "configure:30733: checking whether to enable dbase support" >&5
+echo "configure:30738: checking whether to enable dbase support" >&5
# Check whether --enable-dbase or --disable-dbase was given.
if test "${enable_dbase+set}" = set; then
enableval="$enable_dbase"
@@ -31065,7 +31070,7 @@ fi
php_enable_dom=yes
echo $ac_n "checking whether to enable DOM support""... $ac_c" 1>&6
-echo "configure:31069: checking whether to enable DOM support" >&5
+echo "configure:31074: checking whether to enable DOM support" >&5
# Check whether --enable-dom or --disable-dom was given.
if test "${enable_dom+set}" = set; then
enableval="$enable_dom"
@@ -31113,7 +31118,7 @@ if test -z "$PHP_LIBXML_DIR"; then
php_with_libxml_dir=no
echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:31117: checking libxml2 install dir" >&5
+echo "configure:31122: checking libxml2 install dir" >&5
# Check whether --with-libxml-dir or --without-libxml-dir was given.
if test "${with_libxml_dir+set}" = set; then
withval="$with_libxml_dir"
@@ -31144,7 +31149,7 @@ if test "$PHP_DOM" != "no"; then
echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:31148: checking for xml2-config path" >&5
+echo "configure:31153: checking for xml2-config path" >&5
if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -31302,7 +31307,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:31306: checking whether libxml build works" >&5
+echo "configure:31311: checking whether libxml build works" >&5
if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -31318,7 +31323,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 31322 "configure"
+#line 31327 "configure"
#include "confdefs.h"
@@ -31329,7 +31334,7 @@ else
}
EOF
-if { (eval echo configure:31333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:31338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -31741,7 +31746,7 @@ fi
php_enable_exif=no
echo $ac_n "checking whether to enable EXIF (metadata from images) support""... $ac_c" 1>&6
-echo "configure:31745: checking whether to enable EXIF (metadata from images) support" >&5
+echo "configure:31750: checking whether to enable EXIF (metadata from images) support" >&5
# Check whether --enable-exif or --disable-exif was given.
if test "${enable_exif+set}" = set; then
enableval="$enable_exif"
@@ -32077,7 +32082,7 @@ fi
php_with_fbsql=no
echo $ac_n "checking for FrontBase SQL92 (fbsql) support""... $ac_c" 1>&6
-echo "configure:32081: checking for FrontBase SQL92 (fbsql) support" >&5
+echo "configure:32086: checking for FrontBase SQL92 (fbsql) support" >&5
# Check whether --with-fbsql or --without-fbsql was given.
if test "${with_fbsql+set}" = set; then
withval="$with_fbsql"
@@ -32573,7 +32578,7 @@ fi
php_with_fdftk=no
echo $ac_n "checking for FDF support""... $ac_c" 1>&6
-echo "configure:32577: checking for FDF support" >&5
+echo "configure:32582: checking for FDF support" >&5
# Check whether --with-fdftk or --without-fdftk was given.
if test "${with_fdftk+set}" = set; then
withval="$with_fdftk"
@@ -32791,7 +32796,7 @@ EOF
done
echo $ac_n "checking for FDFOpen in -l$file""... $ac_c" 1>&6
-echo "configure:32795: checking for FDFOpen in -l$file" >&5
+echo "configure:32800: checking for FDFOpen in -l$file" >&5
ac_lib_var=`echo $file'_'FDFOpen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -32799,7 +32804,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$file $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 32803 "configure"
+#line 32808 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -32810,7 +32815,7 @@ int main() {
FDFOpen()
; return 0; }
EOF
-if { (eval echo configure:32814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:32819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -32937,7 +32942,7 @@ fi
done
echo $ac_n "checking for FDFGetFDFVersion in -l$file""... $ac_c" 1>&6
-echo "configure:32941: checking for FDFGetFDFVersion in -l$file" >&5
+echo "configure:32946: checking for FDFGetFDFVersion in -l$file" >&5
ac_lib_var=`echo $file'_'FDFGetFDFVersion | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -32945,7 +32950,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$file $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 32949 "configure"
+#line 32954 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -32956,7 +32961,7 @@ int main() {
FDFGetFDFVersion()
; return 0; }
EOF
-if { (eval echo configure:32960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:32965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -33393,7 +33398,7 @@ fi
php_enable_filter=yes
echo $ac_n "checking whether to enable input filter support""... $ac_c" 1>&6
-echo "configure:33397: checking whether to enable input filter support" >&5
+echo "configure:33402: checking whether to enable input filter support" >&5
# Check whether --enable-filter or --disable-filter was given.
if test "${enable_filter+set}" = set; then
enableval="$enable_filter"
@@ -33440,7 +33445,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_pcre_dir=no
echo $ac_n "checking pcre install prefix""... $ac_c" 1>&6
-echo "configure:33444: checking pcre install prefix" >&5
+echo "configure:33449: checking pcre install prefix" >&5
# Check whether --with-pcre-dir or --without-pcre-dir was given.
if test "${with_pcre_dir+set}" = set; then
withval="$with_pcre_dir"
@@ -33470,7 +33475,7 @@ if test "$PHP_FILTER" != "no"; then
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=$INCLUDES
cat > conftest.$ac_ext <<EOF
-#line 33474 "configure"
+#line 33479 "configure"
#include "confdefs.h"
#include <main/php_config.h>
@@ -33489,7 +33494,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 33493 "configure"
+#line 33498 "configure"
#include "confdefs.h"
#include <main/php_config.h>
@@ -33848,7 +33853,7 @@ fi
php_enable_ftp=no
echo $ac_n "checking whether to enable FTP support""... $ac_c" 1>&6
-echo "configure:33852: checking whether to enable FTP support" >&5
+echo "configure:33857: checking whether to enable FTP support" >&5
# Check whether --enable-ftp or --disable-ftp was given.
if test "${enable_ftp+set}" = set; then
enableval="$enable_ftp"
@@ -33895,7 +33900,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_openssl_dir=no
echo $ac_n "checking OpenSSL dir for FTP""... $ac_c" 1>&6
-echo "configure:33899: checking OpenSSL dir for FTP" >&5
+echo "configure:33904: checking OpenSSL dir for FTP" >&5
# Check whether --with-openssl-dir or --without-openssl-dir was given.
if test "${with_openssl_dir+set}" = set; then
withval="$with_openssl_dir"
@@ -34225,7 +34230,7 @@ EOF
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:34229: checking for $ac_word" >&5
+echo "configure:34234: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -34430,9 +34435,9 @@ fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$OPENSSL_INCDIR
echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
-echo "configure:34434: checking for OpenSSL version" >&5
+echo "configure:34439: checking for OpenSSL version" >&5
cat > conftest.$ac_ext <<EOF
-#line 34436 "configure"
+#line 34441 "configure"
#include "confdefs.h"
#include <openssl/opensslv.h>
@@ -34587,7 +34592,7 @@ rm -f conftest*
done
echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
-echo "configure:34591: checking for CRYPTO_free in -lcrypto" >&5
+echo "configure:34596: checking for CRYPTO_free in -lcrypto" >&5
ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -34595,7 +34600,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 34599 "configure"
+#line 34604 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -34606,7 +34611,7 @@ int main() {
CRYPTO_free()
; return 0; }
EOF
-if { (eval echo configure:34610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:34615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -34763,7 +34768,7 @@ fi
done
echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
-echo "configure:34767: checking for SSL_CTX_set_ssl_version in -lssl" >&5
+echo "configure:34772: checking for SSL_CTX_set_ssl_version in -lssl" >&5
ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -34771,7 +34776,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lssl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 34775 "configure"
+#line 34780 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -34782,7 +34787,7 @@ int main() {
SSL_CTX_set_ssl_version()
; return 0; }
EOF
-if { (eval echo configure:34786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:34791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -34901,7 +34906,7 @@ fi
php_with_gd=no
echo $ac_n "checking for GD support""... $ac_c" 1>&6
-echo "configure:34905: checking for GD support" >&5
+echo "configure:34910: checking for GD support" >&5
# Check whether --with-gd or --without-gd was given.
if test "${with_gd+set}" = set; then
withval="$with_gd"
@@ -34949,7 +34954,7 @@ if test -z "$PHP_JPEG_DIR"; then
php_with_jpeg_dir=no
echo $ac_n "checking for the location of libjpeg""... $ac_c" 1>&6
-echo "configure:34953: checking for the location of libjpeg" >&5
+echo "configure:34958: checking for the location of libjpeg" >&5
# Check whether --with-jpeg-dir or --without-jpeg-dir was given.
if test "${with_jpeg_dir+set}" = set; then
withval="$with_jpeg_dir"
@@ -34977,7 +34982,7 @@ if test -z "$PHP_PNG_DIR"; then
php_with_png_dir=no
echo $ac_n "checking for the location of libpng""... $ac_c" 1>&6
-echo "configure:34981: checking for the location of libpng" >&5
+echo "configure:34986: checking for the location of libpng" >&5
# Check whether --with-png-dir or --without-png-dir was given.
if test "${with_png_dir+set}" = set; then
withval="$with_png_dir"
@@ -35005,7 +35010,7 @@ if test -z "$PHP_ZLIB_DIR"; then
php_with_zlib_dir=no
echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:35009: checking for the location of libz" >&5
+echo "configure:35014: checking for the location of libz" >&5
# Check whether --with-zlib-dir or --without-zlib-dir was given.
if test "${with_zlib_dir+set}" = set; then
withval="$with_zlib_dir"
@@ -35032,7 +35037,7 @@ fi
php_with_xpm_dir=no
echo $ac_n "checking for the location of libXpm""... $ac_c" 1>&6
-echo "configure:35036: checking for the location of libXpm" >&5
+echo "configure:35041: checking for the location of libXpm" >&5
# Check whether --with-xpm-dir or --without-xpm-dir was given.
if test "${with_xpm_dir+set}" = set; then
withval="$with_xpm_dir"
@@ -35058,7 +35063,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_ttf=no
echo $ac_n "checking for FreeType 1.x support""... $ac_c" 1>&6
-echo "configure:35062: checking for FreeType 1.x support" >&5
+echo "configure:35067: checking for FreeType 1.x support" >&5
# Check whether --with-ttf or --without-ttf was given.
if test "${with_ttf+set}" = set; then
withval="$with_ttf"
@@ -35084,7 +35089,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_freetype_dir=no
echo $ac_n "checking for FreeType 2""... $ac_c" 1>&6
-echo "configure:35088: checking for FreeType 2" >&5
+echo "configure:35093: checking for FreeType 2" >&5
# Check whether --with-freetype-dir or --without-freetype-dir was given.
if test "${with_freetype_dir+set}" = set; then
withval="$with_freetype_dir"
@@ -35110,7 +35115,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_t1lib=no
echo $ac_n "checking for T1lib support""... $ac_c" 1>&6
-echo "configure:35114: checking for T1lib support" >&5
+echo "configure:35119: checking for T1lib support" >&5
# Check whether --with-t1lib or --without-t1lib was given.
if test "${with_t1lib+set}" = set; then
withval="$with_t1lib"
@@ -35136,7 +35141,7 @@ echo "$ac_t""$ext_output" 1>&6
php_enable_gd_native_ttf=no
echo $ac_n "checking whether to enable truetype string function in GD""... $ac_c" 1>&6
-echo "configure:35140: checking whether to enable truetype string function in GD" >&5
+echo "configure:35145: checking whether to enable truetype string function in GD" >&5
# Check whether --enable-gd-native-ttf or --disable-gd-native-ttf was given.
if test "${enable_gd_native_ttf+set}" = set; then
enableval="$enable_gd_native_ttf"
@@ -35162,7 +35167,7 @@ echo "$ac_t""$ext_output" 1>&6
php_enable_gd_jis_conv=no
echo $ac_n "checking whether to enable JIS-mapped Japanese font support in GD""... $ac_c" 1>&6
-echo "configure:35166: checking whether to enable JIS-mapped Japanese font support in GD" >&5
+echo "configure:35171: checking whether to enable JIS-mapped Japanese font support in GD" >&5
# Check whether --enable-gd-jis-conv or --disable-gd-jis-conv was given.
if test "${enable_gd_jis_conv+set}" = set; then
enableval="$enable_gd_jis_conv"
@@ -35218,12 +35223,12 @@ if test "$PHP_GD" = "yes"; then
for ac_func in fabsf floorf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:35222: checking for $ac_func" >&5
+echo "configure:35227: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 35227 "configure"
+#line 35232 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -35246,7 +35251,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:35250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:35255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -35418,7 +35423,7 @@ EOF
done
echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
-echo "configure:35422: checking for jpeg_read_header in -ljpeg" >&5
+echo "configure:35427: checking for jpeg_read_header in -ljpeg" >&5
ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -35426,7 +35431,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ljpeg $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 35430 "configure"
+#line 35435 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -35437,7 +35442,7 @@ int main() {
jpeg_read_header()
; return 0; }
EOF
-if { (eval echo configure:35441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:35446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -35719,7 +35724,7 @@ fi
done
echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6
-echo "configure:35723: checking for png_write_image in -lpng" >&5
+echo "configure:35728: checking for png_write_image in -lpng" >&5
ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -35727,7 +35732,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpng $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 35731 "configure"
+#line 35736 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -35738,7 +35743,7 @@ int main() {
png_write_image()
; return 0; }
EOF
-if { (eval echo configure:35742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:35747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -36118,7 +36123,7 @@ fi
done
echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6
-echo "configure:36122: checking for XpmFreeXpmImage in -lXpm" >&5
+echo "configure:36127: checking for XpmFreeXpmImage in -lXpm" >&5
ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -36126,7 +36131,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXpm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 36130 "configure"
+#line 36135 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -36137,7 +36142,7 @@ int main() {
XpmFreeXpmImage()
; return 0; }
EOF
-if { (eval echo configure:36141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:36146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -36512,7 +36517,7 @@ fi
done
echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6
-echo "configure:36516: checking for FT_New_Face in -lfreetype" >&5
+echo "configure:36521: checking for FT_New_Face in -lfreetype" >&5
ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -36520,7 +36525,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lfreetype $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 36524 "configure"
+#line 36529 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -36531,7 +36536,7 @@ int main() {
FT_New_Face()
; return 0; }
EOF
-if { (eval echo configure:36535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:36540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -36894,7 +36899,7 @@ EOF
else
echo $ac_n "checking for FreeType 1 support""... $ac_c" 1>&6
-echo "configure:36898: checking for FreeType 1 support" >&5
+echo "configure:36903: checking for FreeType 1 support" >&5
echo "$ac_t""no - FreeType 2.x is to be used instead" 1>&6
fi
fi
@@ -37008,7 +37013,7 @@ echo "configure:36898: checking for FreeType 1 support" >&5
done
echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6
-echo "configure:37012: checking for T1_StrError in -lt1" >&5
+echo "configure:37017: checking for T1_StrError in -lt1" >&5
ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -37016,7 +37021,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lt1 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 37020 "configure"
+#line 37025 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -37027,7 +37032,7 @@ int main() {
T1_StrError()
; return 0; }
EOF
-if { (eval echo configure:37031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:37036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -37469,7 +37474,7 @@ EOF
done
echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
-echo "configure:37473: checking for jpeg_read_header in -ljpeg" >&5
+echo "configure:37478: checking for jpeg_read_header in -ljpeg" >&5
ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -37477,7 +37482,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ljpeg $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 37481 "configure"
+#line 37486 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -37488,7 +37493,7 @@ int main() {
jpeg_read_header()
; return 0; }
EOF
-if { (eval echo configure:37492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:37497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -37770,7 +37775,7 @@ fi
done
echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6
-echo "configure:37774: checking for png_write_image in -lpng" >&5
+echo "configure:37779: checking for png_write_image in -lpng" >&5
ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -37778,7 +37783,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpng $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 37782 "configure"
+#line 37787 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -37789,7 +37794,7 @@ int main() {
png_write_image()
; return 0; }
EOF
-if { (eval echo configure:37793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:37798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -38169,7 +38174,7 @@ fi
done
echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6
-echo "configure:38173: checking for XpmFreeXpmImage in -lXpm" >&5
+echo "configure:38178: checking for XpmFreeXpmImage in -lXpm" >&5
ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -38177,7 +38182,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXpm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 38181 "configure"
+#line 38186 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -38188,7 +38193,7 @@ int main() {
XpmFreeXpmImage()
; return 0; }
EOF
-if { (eval echo configure:38192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:38197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -38563,7 +38568,7 @@ fi
done
echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6
-echo "configure:38567: checking for FT_New_Face in -lfreetype" >&5
+echo "configure:38572: checking for FT_New_Face in -lfreetype" >&5
ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -38571,7 +38576,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lfreetype $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 38575 "configure"
+#line 38580 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -38582,7 +38587,7 @@ int main() {
FT_New_Face()
; return 0; }
EOF
-if { (eval echo configure:38586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:38591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -38945,7 +38950,7 @@ EOF
else
echo $ac_n "checking for FreeType 1 support""... $ac_c" 1>&6
-echo "configure:38949: checking for FreeType 1 support" >&5
+echo "configure:38954: checking for FreeType 1 support" >&5
echo "$ac_t""no - FreeType 2.x is to be used instead" 1>&6
fi
fi
@@ -39059,7 +39064,7 @@ echo "configure:38949: checking for FreeType 1 support" >&5
done
echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6
-echo "configure:39063: checking for T1_StrError in -lt1" >&5
+echo "configure:39068: checking for T1_StrError in -lt1" >&5
ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -39067,7 +39072,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lt1 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 39071 "configure"
+#line 39076 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -39078,7 +39083,7 @@ int main() {
T1_StrError()
; return 0; }
EOF
-if { (eval echo configure:39082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:39087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -39453,7 +39458,7 @@ EOF
done
echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6
-echo "configure:39457: checking for gdImageString16 in -lgd" >&5
+echo "configure:39462: checking for gdImageString16 in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageString16 | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -39461,7 +39466,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 39465 "configure"
+#line 39470 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -39472,7 +39477,7 @@ int main() {
gdImageString16()
; return 0; }
EOF
-if { (eval echo configure:39476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:39481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -39601,7 +39606,7 @@ fi
done
echo $ac_n "checking for gdImagePaletteCopy in -lgd""... $ac_c" 1>&6
-echo "configure:39605: checking for gdImagePaletteCopy in -lgd" >&5
+echo "configure:39610: checking for gdImagePaletteCopy in -lgd" >&5
ac_lib_var=`echo gd'_'gdImagePaletteCopy | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -39609,7 +39614,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 39613 "configure"
+#line 39618 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -39620,7 +39625,7 @@ int main() {
gdImagePaletteCopy()
; return 0; }
EOF
-if { (eval echo configure:39624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:39629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -39749,7 +39754,7 @@ fi
done
echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6
-echo "configure:39753: checking for gdImageCreateFromPng in -lgd" >&5
+echo "configure:39758: checking for gdImageCreateFromPng in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -39757,7 +39762,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 39761 "configure"
+#line 39766 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -39768,7 +39773,7 @@ int main() {
gdImageCreateFromPng()
; return 0; }
EOF
-if { (eval echo configure:39772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:39777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -39897,7 +39902,7 @@ fi
done
echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6
-echo "configure:39901: checking for gdImageCreateFromGif in -lgd" >&5
+echo "configure:39906: checking for gdImageCreateFromGif in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromGif | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -39905,7 +39910,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 39909 "configure"
+#line 39914 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -39916,7 +39921,7 @@ int main() {
gdImageCreateFromGif()
; return 0; }
EOF
-if { (eval echo configure:39920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:39925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -40045,7 +40050,7 @@ fi
done
echo $ac_n "checking for gdImageGif in -lgd""... $ac_c" 1>&6
-echo "configure:40049: checking for gdImageGif in -lgd" >&5
+echo "configure:40054: checking for gdImageGif in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageGif | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -40053,7 +40058,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 40057 "configure"
+#line 40062 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -40064,7 +40069,7 @@ int main() {
gdImageGif()
; return 0; }
EOF
-if { (eval echo configure:40068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -40193,7 +40198,7 @@ fi
done
echo $ac_n "checking for gdImageWBMP in -lgd""... $ac_c" 1>&6
-echo "configure:40197: checking for gdImageWBMP in -lgd" >&5
+echo "configure:40202: checking for gdImageWBMP in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageWBMP | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -40201,7 +40206,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 40205 "configure"
+#line 40210 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -40212,7 +40217,7 @@ int main() {
gdImageWBMP()
; return 0; }
EOF
-if { (eval echo configure:40216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -40341,7 +40346,7 @@ fi
done
echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6
-echo "configure:40345: checking for gdImageCreateFromJpeg in -lgd" >&5
+echo "configure:40350: checking for gdImageCreateFromJpeg in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromJpeg | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -40349,7 +40354,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 40353 "configure"
+#line 40358 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -40360,7 +40365,7 @@ int main() {
gdImageCreateFromJpeg()
; return 0; }
EOF
-if { (eval echo configure:40364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -40489,7 +40494,7 @@ fi
done
echo $ac_n "checking for gdImageCreateFromXpm in -lgd""... $ac_c" 1>&6
-echo "configure:40493: checking for gdImageCreateFromXpm in -lgd" >&5
+echo "configure:40498: checking for gdImageCreateFromXpm in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromXpm | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -40497,7 +40502,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 40501 "configure"
+#line 40506 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -40508,7 +40513,7 @@ int main() {
gdImageCreateFromXpm()
; return 0; }
EOF
-if { (eval echo configure:40512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -40637,7 +40642,7 @@ fi
done
echo $ac_n "checking for gdImageCreateFromGd2 in -lgd""... $ac_c" 1>&6
-echo "configure:40641: checking for gdImageCreateFromGd2 in -lgd" >&5
+echo "configure:40646: checking for gdImageCreateFromGd2 in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateFromGd2 | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -40645,7 +40650,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 40649 "configure"
+#line 40654 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -40656,7 +40661,7 @@ int main() {
gdImageCreateFromGd2()
; return 0; }
EOF
-if { (eval echo configure:40660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -40785,7 +40790,7 @@ fi
done
echo $ac_n "checking for gdImageCreateTrueColor in -lgd""... $ac_c" 1>&6
-echo "configure:40789: checking for gdImageCreateTrueColor in -lgd" >&5
+echo "configure:40794: checking for gdImageCreateTrueColor in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreateTrueColor | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -40793,7 +40798,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 40797 "configure"
+#line 40802 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -40804,7 +40809,7 @@ int main() {
gdImageCreateTrueColor()
; return 0; }
EOF
-if { (eval echo configure:40808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -40933,7 +40938,7 @@ fi
done
echo $ac_n "checking for gdImageSetTile in -lgd""... $ac_c" 1>&6
-echo "configure:40937: checking for gdImageSetTile in -lgd" >&5
+echo "configure:40942: checking for gdImageSetTile in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageSetTile | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -40941,7 +40946,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 40945 "configure"
+#line 40950 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -40952,7 +40957,7 @@ int main() {
gdImageSetTile()
; return 0; }
EOF
-if { (eval echo configure:40956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:40961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -41081,7 +41086,7 @@ fi
done
echo $ac_n "checking for gdImageEllipse in -lgd""... $ac_c" 1>&6
-echo "configure:41085: checking for gdImageEllipse in -lgd" >&5
+echo "configure:41090: checking for gdImageEllipse in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageEllipse | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -41089,7 +41094,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 41093 "configure"
+#line 41098 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -41100,7 +41105,7 @@ int main() {
gdImageEllipse()
; return 0; }
EOF
-if { (eval echo configure:41104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -41229,7 +41234,7 @@ fi
done
echo $ac_n "checking for gdImageSetBrush in -lgd""... $ac_c" 1>&6
-echo "configure:41233: checking for gdImageSetBrush in -lgd" >&5
+echo "configure:41238: checking for gdImageSetBrush in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageSetBrush | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -41237,7 +41242,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 41241 "configure"
+#line 41246 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -41248,7 +41253,7 @@ int main() {
gdImageSetBrush()
; return 0; }
EOF
-if { (eval echo configure:41252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -41377,7 +41382,7 @@ fi
done
echo $ac_n "checking for gdImageStringTTF in -lgd""... $ac_c" 1>&6
-echo "configure:41381: checking for gdImageStringTTF in -lgd" >&5
+echo "configure:41386: checking for gdImageStringTTF in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageStringTTF | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -41385,7 +41390,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 41389 "configure"
+#line 41394 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -41396,7 +41401,7 @@ int main() {
gdImageStringTTF()
; return 0; }
EOF
-if { (eval echo configure:41400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -41525,7 +41530,7 @@ fi
done
echo $ac_n "checking for gdImageStringFT in -lgd""... $ac_c" 1>&6
-echo "configure:41529: checking for gdImageStringFT in -lgd" >&5
+echo "configure:41534: checking for gdImageStringFT in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageStringFT | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -41533,7 +41538,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 41537 "configure"
+#line 41542 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -41544,7 +41549,7 @@ int main() {
gdImageStringFT()
; return 0; }
EOF
-if { (eval echo configure:41548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -41673,7 +41678,7 @@ fi
done
echo $ac_n "checking for gdImageStringFTEx in -lgd""... $ac_c" 1>&6
-echo "configure:41677: checking for gdImageStringFTEx in -lgd" >&5
+echo "configure:41682: checking for gdImageStringFTEx in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageStringFTEx | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -41681,7 +41686,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 41685 "configure"
+#line 41690 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -41692,7 +41697,7 @@ int main() {
gdImageStringFTEx()
; return 0; }
EOF
-if { (eval echo configure:41696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -41821,7 +41826,7 @@ fi
done
echo $ac_n "checking for gdImageColorClosestHWB in -lgd""... $ac_c" 1>&6
-echo "configure:41825: checking for gdImageColorClosestHWB in -lgd" >&5
+echo "configure:41830: checking for gdImageColorClosestHWB in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageColorClosestHWB | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -41829,7 +41834,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 41833 "configure"
+#line 41838 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -41840,7 +41845,7 @@ int main() {
gdImageColorClosestHWB()
; return 0; }
EOF
-if { (eval echo configure:41844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -41969,7 +41974,7 @@ fi
done
echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6
-echo "configure:41973: checking for gdImageColorResolve in -lgd" >&5
+echo "configure:41978: checking for gdImageColorResolve in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageColorResolve | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -41977,7 +41982,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 41981 "configure"
+#line 41986 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -41988,7 +41993,7 @@ int main() {
gdImageColorResolve()
; return 0; }
EOF
-if { (eval echo configure:41992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:41997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -42117,7 +42122,7 @@ fi
done
echo $ac_n "checking for gdImageGifCtx in -lgd""... $ac_c" 1>&6
-echo "configure:42121: checking for gdImageGifCtx in -lgd" >&5
+echo "configure:42126: checking for gdImageGifCtx in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageGifCtx | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -42125,7 +42130,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 42129 "configure"
+#line 42134 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -42136,7 +42141,7 @@ int main() {
gdImageGifCtx()
; return 0; }
EOF
-if { (eval echo configure:42140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -42265,7 +42270,7 @@ fi
done
echo $ac_n "checking for gdCacheCreate in -lgd""... $ac_c" 1>&6
-echo "configure:42269: checking for gdCacheCreate in -lgd" >&5
+echo "configure:42274: checking for gdCacheCreate in -lgd" >&5
ac_lib_var=`echo gd'_'gdCacheCreate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -42273,7 +42278,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 42277 "configure"
+#line 42282 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -42284,7 +42289,7 @@ int main() {
gdCacheCreate()
; return 0; }
EOF
-if { (eval echo configure:42288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -42413,7 +42418,7 @@ fi
done
echo $ac_n "checking for gdFontCacheShutdown in -lgd""... $ac_c" 1>&6
-echo "configure:42417: checking for gdFontCacheShutdown in -lgd" >&5
+echo "configure:42422: checking for gdFontCacheShutdown in -lgd" >&5
ac_lib_var=`echo gd'_'gdFontCacheShutdown | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -42421,7 +42426,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 42425 "configure"
+#line 42430 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -42432,7 +42437,7 @@ int main() {
gdFontCacheShutdown()
; return 0; }
EOF
-if { (eval echo configure:42436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -42561,7 +42566,7 @@ fi
done
echo $ac_n "checking for gdFreeFontCache in -lgd""... $ac_c" 1>&6
-echo "configure:42565: checking for gdFreeFontCache in -lgd" >&5
+echo "configure:42570: checking for gdFreeFontCache in -lgd" >&5
ac_lib_var=`echo gd'_'gdFreeFontCache | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -42569,7 +42574,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 42573 "configure"
+#line 42578 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -42580,7 +42585,7 @@ int main() {
gdFreeFontCache()
; return 0; }
EOF
-if { (eval echo configure:42584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -42709,7 +42714,7 @@ fi
done
echo $ac_n "checking for gdFontCacheMutexSetup in -lgd""... $ac_c" 1>&6
-echo "configure:42713: checking for gdFontCacheMutexSetup in -lgd" >&5
+echo "configure:42718: checking for gdFontCacheMutexSetup in -lgd" >&5
ac_lib_var=`echo gd'_'gdFontCacheMutexSetup | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -42717,7 +42722,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 42721 "configure"
+#line 42726 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -42728,7 +42733,7 @@ int main() {
gdFontCacheMutexSetup()
; return 0; }
EOF
-if { (eval echo configure:42732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -42857,7 +42862,7 @@ fi
done
echo $ac_n "checking for gdNewDynamicCtxEx in -lgd""... $ac_c" 1>&6
-echo "configure:42861: checking for gdNewDynamicCtxEx in -lgd" >&5
+echo "configure:42866: checking for gdNewDynamicCtxEx in -lgd" >&5
ac_lib_var=`echo gd'_'gdNewDynamicCtxEx | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -42865,7 +42870,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 42869 "configure"
+#line 42874 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -42876,7 +42881,7 @@ int main() {
gdNewDynamicCtxEx()
; return 0; }
EOF
-if { (eval echo configure:42880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:42885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -42931,7 +42936,7 @@ fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$GD_INCLUDE
cat > conftest.$ac_ext <<EOF
-#line 42935 "configure"
+#line 42940 "configure"
#include "confdefs.h"
#include <gd.h>
@@ -42945,7 +42950,7 @@ ctx->gd_free = 1;
; return 0; }
EOF
-if { (eval echo configure:42949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:42954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
@@ -43264,7 +43269,7 @@ EOF
else
cat > conftest.$ac_ext <<EOF
-#line 43268 "configure"
+#line 43273 "configure"
#include "confdefs.h"
char foobar () {}
@@ -43275,7 +43280,7 @@ else
}
EOF
-if { (eval echo configure:43279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:43284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -43427,7 +43432,7 @@ fi
done
echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6
-echo "configure:43431: checking for gdImageCreate in -lgd" >&5
+echo "configure:43436: checking for gdImageCreate in -lgd" >&5
ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -43435,7 +43440,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 43439 "configure"
+#line 43444 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -43446,7 +43451,7 @@ int main() {
gdImageCreate()
; return 0; }
EOF
-if { (eval echo configure:43450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -43511,7 +43516,7 @@ fi
php_with_gettext=no
echo $ac_n "checking for GNU gettext support""... $ac_c" 1>&6
-echo "configure:43515: checking for GNU gettext support" >&5
+echo "configure:43520: checking for GNU gettext support" >&5
# Check whether --with-gettext or --without-gettext was given.
if test "${with_gettext+set}" = set; then
withval="$with_gettext"
@@ -43569,7 +43574,7 @@ if test "$PHP_GETTEXT" != "no"; then
O_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:43573: checking for bindtextdomain in -lintl" >&5
+echo "configure:43578: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -43577,7 +43582,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 43581 "configure"
+#line 43586 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -43588,7 +43593,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:43592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -43610,7 +43615,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for bindtextdomain in -lc""... $ac_c" 1>&6
-echo "configure:43614: checking for bindtextdomain in -lc" >&5
+echo "configure:43619: checking for bindtextdomain in -lc" >&5
ac_lib_var=`echo c'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -43618,7 +43623,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 43622 "configure"
+#line 43627 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -43629,7 +43634,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:43633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:43638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -44082,7 +44087,7 @@ EOF
echo $ac_n "checking for ngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
-echo "configure:44086: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
+echo "configure:44091: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'ngettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -44090,7 +44095,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 44094 "configure"
+#line 44099 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -44101,7 +44106,7 @@ int main() {
ngettext()
; return 0; }
EOF
-if { (eval echo configure:44105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -44125,7 +44130,7 @@ else
fi
echo $ac_n "checking for dngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
-echo "configure:44129: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
+echo "configure:44134: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dngettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -44133,7 +44138,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 44137 "configure"
+#line 44142 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -44144,7 +44149,7 @@ int main() {
dngettext()
; return 0; }
EOF
-if { (eval echo configure:44148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -44168,7 +44173,7 @@ else
fi
echo $ac_n "checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
-echo "configure:44172: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
+echo "configure:44177: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dcngettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -44176,7 +44181,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 44180 "configure"
+#line 44185 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -44187,7 +44192,7 @@ int main() {
dcngettext()
; return 0; }
EOF
-if { (eval echo configure:44191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -44211,7 +44216,7 @@ else
fi
echo $ac_n "checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
-echo "configure:44215: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5
+echo "configure:44220: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5
ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'bind_textdomain_codeset | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -44219,7 +44224,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 44223 "configure"
+#line 44228 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -44230,7 +44235,7 @@ int main() {
bind_textdomain_codeset()
; return 0; }
EOF
-if { (eval echo configure:44234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -44261,7 +44266,7 @@ fi
php_with_gmp=no
echo $ac_n "checking for GNU MP support""... $ac_c" 1>&6
-echo "configure:44265: checking for GNU MP support" >&5
+echo "configure:44270: checking for GNU MP support" >&5
# Check whether --with-gmp or --without-gmp was given.
if test "${with_gmp+set}" = set; then
withval="$with_gmp"
@@ -44412,7 +44417,7 @@ if test "$PHP_GMP" != "no"; then
done
echo $ac_n "checking for __gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6
-echo "configure:44416: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5
+echo "configure:44421: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5
ac_lib_var=`echo gmp'_'__gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -44420,7 +44425,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgmp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 44424 "configure"
+#line 44429 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -44431,7 +44436,7 @@ int main() {
__gmp_randinit_lc_2exp_size()
; return 0; }
EOF
-if { (eval echo configure:44435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -44556,7 +44561,7 @@ else
done
echo $ac_n "checking for gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6
-echo "configure:44560: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5
+echo "configure:44565: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5
ac_lib_var=`echo gmp'_'gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -44564,7 +44569,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgmp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 44568 "configure"
+#line 44573 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -44575,7 +44580,7 @@ int main() {
gmp_randinit_lc_2exp_size()
; return 0; }
EOF
-if { (eval echo configure:44579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:44584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -45036,7 +45041,7 @@ fi
php_enable_hash=yes
echo $ac_n "checking whether to enable hash support""... $ac_c" 1>&6
-echo "configure:45040: checking whether to enable hash support" >&5
+echo "configure:45045: checking whether to enable hash support" >&5
# Check whether --enable-hash or --disable-hash was given.
if test "${enable_hash+set}" = set; then
enableval="$enable_hash"
@@ -45086,7 +45091,7 @@ EOF
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:45090: checking whether byte ordering is bigendian" >&5
+echo "configure:45095: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -45096,7 +45101,7 @@ else
ac_cv_c_bigendian_php=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 45100 "configure"
+#line 45105 "configure"
#include "confdefs.h"
int main(void)
@@ -45112,7 +45117,7 @@ int main(void)
}
EOF
-if { (eval echo configure:45116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:45121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian_php=yes
else
@@ -45137,7 +45142,7 @@ EOF
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:45141: checking size of short" >&5
+echo "configure:45146: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -45145,7 +45150,7 @@ else
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
-#line 45149 "configure"
+#line 45154 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -45156,7 +45161,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:45160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:45165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -45176,7 +45181,7 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:45180: checking size of int" >&5
+echo "configure:45185: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -45184,7 +45189,7 @@ else
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 45188 "configure"
+#line 45193 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -45195,7 +45200,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:45199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:45204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -45215,7 +45220,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:45219: checking size of long" >&5
+echo "configure:45224: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -45223,7 +45228,7 @@ else
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 45227 "configure"
+#line 45232 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -45234,7 +45239,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:45238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:45243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -45254,7 +45259,7 @@ EOF
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:45258: checking size of long long" >&5
+echo "configure:45263: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -45262,7 +45267,7 @@ else
ac_cv_sizeof_long_long=8
else
cat > conftest.$ac_ext <<EOF
-#line 45266 "configure"
+#line 45271 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -45273,7 +45278,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:45277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:45282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long=`cat conftestval`
else
@@ -45610,7 +45615,7 @@ fi
php_with_iconv=yes
echo $ac_n "checking for iconv support""... $ac_c" 1>&6
-echo "configure:45614: checking for iconv support" >&5
+echo "configure:45619: checking for iconv support" >&5
# Check whether --with-iconv or --without-iconv was given.
if test "${with_iconv+set}" = set; then
withval="$with_iconv"
@@ -45672,12 +45677,12 @@ if test "$PHP_ICONV" != "no"; then
if test "$PHP_ICONV" = "yes"; then
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:45676: checking for iconv" >&5
+echo "configure:45681: checking for iconv" >&5
if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 45681 "configure"
+#line 45686 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char iconv(); below. */
@@ -45700,7 +45705,7 @@ iconv();
; return 0; }
EOF
-if { (eval echo configure:45704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:45709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_iconv=yes"
else
@@ -45721,12 +45726,12 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for libiconv""... $ac_c" 1>&6
-echo "configure:45725: checking for libiconv" >&5
+echo "configure:45730: checking for libiconv" >&5
if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 45730 "configure"
+#line 45735 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char libiconv(); below. */
@@ -45749,7 +45754,7 @@ libiconv();
; return 0; }
EOF
-if { (eval echo configure:45753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:45758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_libiconv=yes"
else
@@ -45905,7 +45910,7 @@ EOF
done
echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6
-echo "configure:45909: checking for libiconv in -l$iconv_lib_name" >&5
+echo "configure:45914: checking for libiconv in -l$iconv_lib_name" >&5
ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -45913,7 +45918,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$iconv_lib_name $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 45917 "configure"
+#line 45922 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -45924,7 +45929,7 @@ int main() {
libiconv()
; return 0; }
EOF
-if { (eval echo configure:45928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:45933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -46058,7 +46063,7 @@ else
done
echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6
-echo "configure:46062: checking for iconv in -l$iconv_lib_name" >&5
+echo "configure:46067: checking for iconv in -l$iconv_lib_name" >&5
ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -46066,7 +46071,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$iconv_lib_name $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 46070 "configure"
+#line 46075 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -46077,7 +46082,7 @@ int main() {
iconv()
; return 0; }
EOF
-if { (eval echo configure:46081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -46288,16 +46293,16 @@ else
fi
echo $ac_n "checking if iconv is glibc's""... $ac_c" 1>&6
-echo "configure:46292: checking if iconv is glibc's" >&5
+echo "configure:46297: checking if iconv is glibc's" >&5
cat > conftest.$ac_ext <<EOF
-#line 46294 "configure"
+#line 46299 "configure"
#include "confdefs.h"
#include <gnu/libc-version.h>
int main() {
gnu_get_libc_version();
; return 0; }
EOF
-if { (eval echo configure:46301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
@@ -46315,7 +46320,7 @@ rm -f conftest*
if test -z "$iconv_impl_name"; then
echo $ac_n "checking if using GNU libiconv""... $ac_c" 1>&6
-echo "configure:46319: checking if using GNU libiconv" >&5
+echo "configure:46324: checking if using GNU libiconv" >&5
php_iconv_old_ld="$LDFLAGS"
LDFLAGS="-liconv $LDFLAGS"
if test "$cross_compiling" = yes; then
@@ -46325,7 +46330,7 @@ echo "configure:46319: checking if using GNU libiconv" >&5
else
cat > conftest.$ac_ext <<EOF
-#line 46329 "configure"
+#line 46334 "configure"
#include "confdefs.h"
#include <$PHP_ICONV_H_PATH>
@@ -46335,7 +46340,7 @@ int main() {
}
EOF
-if { (eval echo configure:46339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:46344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
@@ -46357,16 +46362,16 @@ fi
if test -z "$iconv_impl_name"; then
echo $ac_n "checking if iconv is Konstantin Chuguev's""... $ac_c" 1>&6
-echo "configure:46361: checking if iconv is Konstantin Chuguev's" >&5
+echo "configure:46366: checking if iconv is Konstantin Chuguev's" >&5
cat > conftest.$ac_ext <<EOF
-#line 46363 "configure"
+#line 46368 "configure"
#include "confdefs.h"
#include <iconv.h>
int main() {
iconv_ccs_init(NULL, NULL);
; return 0; }
EOF
-if { (eval echo configure:46370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:46375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
@@ -46534,7 +46539,7 @@ EOF
esac
echo $ac_n "checking if iconv supports errno""... $ac_c" 1>&6
-echo "configure:46538: checking if iconv supports errno" >&5
+echo "configure:46543: checking if iconv supports errno" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""no" 1>&6
@@ -46548,7 +46553,7 @@ EOF
else
cat > conftest.$ac_ext <<EOF
-#line 46552 "configure"
+#line 46557 "configure"
#include "confdefs.h"
#include <$PHP_ICONV_H_PATH>
@@ -46569,7 +46574,7 @@ int main() {
}
EOF
-if { (eval echo configure:46573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:46578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
@@ -46601,9 +46606,9 @@ fi
echo $ac_n "checking if your cpp allows macro usage in include lines""... $ac_c" 1>&6
-echo "configure:46605: checking if your cpp allows macro usage in include lines" >&5
+echo "configure:46610: checking if your cpp allows macro usage in include lines" >&5
cat > conftest.$ac_ext <<EOF
-#line 46607 "configure"
+#line 46612 "configure"
#include "confdefs.h"
#define FOO <$PHP_ICONV_H_PATH>
@@ -46613,7 +46618,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:46617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:46622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
@@ -46958,7 +46963,7 @@ fi
php_with_imap=no
echo $ac_n "checking for IMAP support""... $ac_c" 1>&6
-echo "configure:46962: checking for IMAP support" >&5
+echo "configure:46967: checking for IMAP support" >&5
# Check whether --with-imap or --without-imap was given.
if test "${with_imap+set}" = set; then
withval="$with_imap"
@@ -47005,7 +47010,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_kerberos=no
echo $ac_n "checking for IMAP Kerberos support""... $ac_c" 1>&6
-echo "configure:47009: checking for IMAP Kerberos support" >&5
+echo "configure:47014: checking for IMAP Kerberos support" >&5
# Check whether --with-kerberos or --without-kerberos was given.
if test "${with_kerberos+set}" = set; then
withval="$with_kerberos"
@@ -47031,7 +47036,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_imap_ssl=no
echo $ac_n "checking for IMAP SSL support""... $ac_c" 1>&6
-echo "configure:47035: checking for IMAP SSL support" >&5
+echo "configure:47040: checking for IMAP SSL support" >&5
# Check whether --with-imap-ssl or --without-imap-ssl was given.
if test "${with_imap_ssl+set}" = set; then
withval="$with_imap_ssl"
@@ -47427,7 +47432,7 @@ EOF
done
cat > conftest.$ac_ext <<EOF
-#line 47431 "configure"
+#line 47436 "configure"
#include "confdefs.h"
#include <$IMAP_INC_DIR/mail.h>
EOF
@@ -47447,12 +47452,12 @@ rm -f conftest*
old_CFLAGS=$CFLAGS
CFLAGS="-I$IMAP_INC_DIR"
echo $ac_n "checking for utf8_mime2text signature""... $ac_c" 1>&6
-echo "configure:47451: checking for utf8_mime2text signature" >&5
+echo "configure:47456: checking for utf8_mime2text signature" >&5
if eval "test \"`echo '$''{'ac_cv_utf8_mime2text'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 47456 "configure"
+#line 47461 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -47465,7 +47470,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:47469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:47474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_utf8_mime2text=old
@@ -47494,12 +47499,12 @@ EOF
old_CFLAGS=$CFLAGS
CFLAGS="-I$IMAP_INC_DIR"
echo $ac_n "checking for U8T_CANONICAL""... $ac_c" 1>&6
-echo "configure:47498: checking for U8T_CANONICAL" >&5
+echo "configure:47503: checking for U8T_CANONICAL" >&5
if eval "test \"`echo '$''{'ac_cv_u8t_canonical'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 47503 "configure"
+#line 47508 "configure"
#include "confdefs.h"
#include <c-client.h>
@@ -47510,7 +47515,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:47514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:47519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_u8t_canonical=yes
@@ -47540,7 +47545,7 @@ echo "$ac_t""$ac_cv_u8t_canonical" 1>&6
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$IMAP_INC_DIR
cat > conftest.$ac_ext <<EOF
-#line 47544 "configure"
+#line 47549 "configure"
#include "confdefs.h"
#include "imap4r1.h"
@@ -47659,7 +47664,7 @@ rm -f conftest*
done
echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6
-echo "configure:47663: checking for pam_start in -lpam" >&5
+echo "configure:47668: checking for pam_start in -lpam" >&5
ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -47667,7 +47672,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpam $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 47671 "configure"
+#line 47676 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -47678,7 +47683,7 @@ int main() {
pam_start()
; return 0; }
EOF
-if { (eval echo configure:47682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:47687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -47833,7 +47838,7 @@ fi
done
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:47837: checking for crypt in -lcrypt" >&5
+echo "configure:47842: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -47841,7 +47846,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 47845 "configure"
+#line 47850 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -47852,7 +47857,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:47856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:47861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -48056,7 +48061,7 @@ fi
# Extract the first word of "krb5-config", so it can be a program name with args.
set dummy krb5-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:48060: checking for $ac_word" >&5
+echo "configure:48065: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -48425,7 +48430,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 48429 "configure"
+#line 48434 "configure"
#include "confdefs.h"
#include <$IMAP_INC_DIR/linkage.h>
EOF
@@ -48466,7 +48471,7 @@ rm -f conftest*
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:48470: checking for $ac_word" >&5
+echo "configure:48475: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -48671,9 +48676,9 @@ fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$OPENSSL_INCDIR
echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
-echo "configure:48675: checking for OpenSSL version" >&5
+echo "configure:48680: checking for OpenSSL version" >&5
cat > conftest.$ac_ext <<EOF
-#line 48677 "configure"
+#line 48682 "configure"
#include "confdefs.h"
#include <openssl/opensslv.h>
@@ -48828,7 +48833,7 @@ rm -f conftest*
done
echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
-echo "configure:48832: checking for CRYPTO_free in -lcrypto" >&5
+echo "configure:48837: checking for CRYPTO_free in -lcrypto" >&5
ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -48836,7 +48841,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 48840 "configure"
+#line 48845 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -48847,7 +48852,7 @@ int main() {
CRYPTO_free()
; return 0; }
EOF
-if { (eval echo configure:48851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:48856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -49004,7 +49009,7 @@ fi
done
echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
-echo "configure:49008: checking for SSL_CTX_set_ssl_version in -lssl" >&5
+echo "configure:49013: checking for SSL_CTX_set_ssl_version in -lssl" >&5
ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -49012,7 +49017,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lssl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 49016 "configure"
+#line 49021 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -49023,7 +49028,7 @@ int main() {
SSL_CTX_set_ssl_version()
; return 0; }
EOF
-if { (eval echo configure:49027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:49032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -49142,7 +49147,7 @@ else
elif test -f "$IMAP_INC_DIR/linkage.c"; then
cat > conftest.$ac_ext <<EOF
-#line 49146 "configure"
+#line 49151 "configure"
#include "confdefs.h"
#include <$IMAP_INC_DIR/linkage.c>
EOF
@@ -49173,7 +49178,7 @@ rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 49177 "configure"
+#line 49182 "configure"
#include "confdefs.h"
@@ -49200,7 +49205,7 @@ else
}
EOF
-if { (eval echo configure:49204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:49209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -49227,7 +49232,7 @@ fi
echo $ac_n "checking whether build with IMAP works""... $ac_c" 1>&6
-echo "configure:49231: checking whether build with IMAP works" >&5
+echo "configure:49236: checking whether build with IMAP works" >&5
old_LIBS=$LIBS
@@ -49238,7 +49243,7 @@ echo "configure:49231: checking whether build with IMAP works" >&5
else
cat > conftest.$ac_ext <<EOF
-#line 49242 "configure"
+#line 49247 "configure"
#include "confdefs.h"
@@ -49265,7 +49270,7 @@ else
}
EOF
-if { (eval echo configure:49269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:49274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -49297,7 +49302,7 @@ fi
php_with_interbase=no
echo $ac_n "checking for InterBase support""... $ac_c" 1>&6
-echo "configure:49301: checking for InterBase support" >&5
+echo "configure:49306: checking for InterBase support" >&5
# Check whether --with-interbase or --without-interbase was given.
if test "${with_interbase+set}" = set; then
withval="$with_interbase"
@@ -49447,7 +49452,7 @@ if test "$PHP_INTERBASE" != "no"; then
done
echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6
-echo "configure:49451: checking for isc_detach_database in -lfbclient" >&5
+echo "configure:49456: checking for isc_detach_database in -lfbclient" >&5
ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -49455,7 +49460,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lfbclient $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 49459 "configure"
+#line 49464 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -49466,7 +49471,7 @@ int main() {
isc_detach_database()
; return 0; }
EOF
-if { (eval echo configure:49470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:49475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -49593,7 +49598,7 @@ else
done
echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6
-echo "configure:49597: checking for isc_detach_database in -lgds" >&5
+echo "configure:49602: checking for isc_detach_database in -lgds" >&5
ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -49601,7 +49606,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgds $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 49605 "configure"
+#line 49610 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -49612,7 +49617,7 @@ int main() {
isc_detach_database()
; return 0; }
EOF
-if { (eval echo configure:49616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:49621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -49739,7 +49744,7 @@ else
done
echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6
-echo "configure:49743: checking for isc_detach_database in -lib_util" >&5
+echo "configure:49748: checking for isc_detach_database in -lib_util" >&5
ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -49747,7 +49752,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lib_util $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 49751 "configure"
+#line 49756 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -49758,7 +49763,7 @@ int main() {
isc_detach_database()
; return 0; }
EOF
-if { (eval echo configure:49762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:49767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -50224,7 +50229,7 @@ fi
php_enable_json=yes
echo $ac_n "checking whether to enable JavaScript Object Serialization support""... $ac_c" 1>&6
-echo "configure:50228: checking whether to enable JavaScript Object Serialization support" >&5
+echo "configure:50233: checking whether to enable JavaScript Object Serialization support" >&5
# Check whether --enable-json or --disable-json was given.
if test "${enable_json+set}" = set; then
enableval="$enable_json"
@@ -50273,12 +50278,12 @@ if test "$PHP_JSON" != "no"; then
EOF
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:50277: checking for ANSI C header files" >&5
+echo "configure:50282: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 50282 "configure"
+#line 50287 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -50286,7 +50291,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:50290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:50295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -50303,7 +50308,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 50307 "configure"
+#line 50312 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -50321,7 +50326,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 50325 "configure"
+#line 50330 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -50342,7 +50347,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 50346 "configure"
+#line 50351 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -50353,7 +50358,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:50357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:50362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -50672,7 +50677,7 @@ fi
php_with_ldap=no
echo $ac_n "checking for LDAP support""... $ac_c" 1>&6
-echo "configure:50676: checking for LDAP support" >&5
+echo "configure:50681: checking for LDAP support" >&5
# Check whether --with-ldap or --without-ldap was given.
if test "${with_ldap+set}" = set; then
withval="$with_ldap"
@@ -50719,7 +50724,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_ldap_sasl=no
echo $ac_n "checking for LDAP Cyrus SASL support""... $ac_c" 1>&6
-echo "configure:50723: checking for LDAP Cyrus SASL support" >&5
+echo "configure:50728: checking for LDAP Cyrus SASL support" >&5
# Check whether --with-ldap-sasl or --without-ldap-sasl was given.
if test "${with_ldap_sasl+set}" = set; then
withval="$with_ldap_sasl"
@@ -53053,19 +53058,19 @@ EOF
LIBS="$LIBS $LDAP_SHARED_LIBADD"
echo $ac_n "checking for 3 arg ldap_set_rebind_proc""... $ac_c" 1>&6
-echo "configure:53057: checking for 3 arg ldap_set_rebind_proc" >&5
+echo "configure:53062: checking for 3 arg ldap_set_rebind_proc" >&5
if eval "test \"`echo '$''{'ac_cv_3arg_setrebindproc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 53062 "configure"
+#line 53067 "configure"
#include "confdefs.h"
#include <ldap.h>
int main() {
ldap_set_rebind_proc(0,0,0)
; return 0; }
EOF
-if { (eval echo configure:53069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:53074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_3arg_setrebindproc=yes
else
@@ -53088,12 +53093,12 @@ EOF
for ac_func in ldap_parse_result ldap_parse_reference ldap_start_tls_s
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:53092: checking for $ac_func" >&5
+echo "configure:53097: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 53097 "configure"
+#line 53102 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -53116,7 +53121,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:53120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:53125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -53278,7 +53283,7 @@ EOF
done
echo $ac_n "checking for sasl_version in -lldap""... $ac_c" 1>&6
-echo "configure:53282: checking for sasl_version in -lldap" >&5
+echo "configure:53287: checking for sasl_version in -lldap" >&5
ac_lib_var=`echo ldap'_'sasl_version | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -53286,7 +53291,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lldap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 53290 "configure"
+#line 53295 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -53297,7 +53302,7 @@ int main() {
sasl_version()
; return 0; }
EOF
-if { (eval echo configure:53301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:53306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -53466,12 +53471,12 @@ fi
fi
echo $ac_n "checking for ldap_bind_s""... $ac_c" 1>&6
-echo "configure:53470: checking for ldap_bind_s" >&5
+echo "configure:53475: checking for ldap_bind_s" >&5
if eval "test \"`echo '$''{'ac_cv_func_ldap_bind_s'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 53475 "configure"
+#line 53480 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char ldap_bind_s(); below. */
@@ -53494,7 +53499,7 @@ ldap_bind_s();
; return 0; }
EOF
-if { (eval echo configure:53498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:53503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_ldap_bind_s=yes"
else
@@ -53545,7 +53550,7 @@ fi
php_enable_mbstring=no
echo $ac_n "checking whether to enable multibyte string support""... $ac_c" 1>&6
-echo "configure:53549: checking whether to enable multibyte string support" >&5
+echo "configure:53554: checking whether to enable multibyte string support" >&5
# Check whether --enable-mbstring or --disable-mbstring was given.
if test "${enable_mbstring+set}" = set; then
enableval="$enable_mbstring"
@@ -53592,7 +53597,7 @@ echo "$ac_t""$ext_output" 1>&6
php_enable_mbregex=yes
echo $ac_n "checking whether to enable multibyte regex support""... $ac_c" 1>&6
-echo "configure:53596: checking whether to enable multibyte regex support" >&5
+echo "configure:53601: checking whether to enable multibyte regex support" >&5
# Check whether --enable-mbregex or --disable-mbregex was given.
if test "${enable_mbregex+set}" = set; then
enableval="$enable_mbregex"
@@ -53618,7 +53623,7 @@ echo "$ac_t""$ext_output" 1>&6
php_enable_mbregex_backtrack=yes
echo $ac_n "checking whether to check multibyte regex backtrack""... $ac_c" 1>&6
-echo "configure:53622: checking whether to check multibyte regex backtrack" >&5
+echo "configure:53627: checking whether to check multibyte regex backtrack" >&5
# Check whether --enable-mbregex_backtrack or --disable-mbregex_backtrack was given.
if test "${enable_mbregex_backtrack+set}" = set; then
enableval="$enable_mbregex_backtrack"
@@ -53644,7 +53649,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_libmbfl=no
echo $ac_n "checking for external libmbfl""... $ac_c" 1>&6
-echo "configure:53648: checking for external libmbfl" >&5
+echo "configure:53653: checking for external libmbfl" >&5
# Check whether --with-libmbfl or --without-libmbfl was given.
if test "${with_libmbfl+set}" = set; then
withval="$with_libmbfl"
@@ -53680,7 +53685,7 @@ EOF
if test "$PHP_MBREGEX" = "yes"; then
echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
-echo "configure:53684: checking for variable length prototypes and stdarg.h" >&5
+echo "configure:53689: checking for variable length prototypes and stdarg.h" >&5
if eval "test \"`echo '$''{'cv_php_mbstring_stdarg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -53699,7 +53704,7 @@ esac
else
cat > conftest.$ac_ext <<EOF
-#line 53703 "configure"
+#line 53708 "configure"
#include "confdefs.h"
#include <stdarg.h>
@@ -53714,7 +53719,7 @@ int foo(int x, ...) {
int main() { return foo(10, "", 3.14); }
EOF
-if { (eval echo configure:53718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:53723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cv_php_mbstring_stdarg=yes
else
@@ -53735,17 +53740,17 @@ echo "$ac_t""$cv_php_mbstring_stdarg" 1>&6
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:53739: checking for $ac_hdr" >&5
+echo "configure:53744: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 53744 "configure"
+#line 53749 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:53749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:53754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -53772,7 +53777,7 @@ fi
done
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:53776: checking size of int" >&5
+echo "configure:53781: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -53780,7 +53785,7 @@ else
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 53784 "configure"
+#line 53789 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -53791,7 +53796,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:53795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:53800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -53811,7 +53816,7 @@ EOF
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:53815: checking size of short" >&5
+echo "configure:53820: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -53819,7 +53824,7 @@ else
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
-#line 53823 "configure"
+#line 53828 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -53830,7 +53835,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:53834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:53839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -53850,7 +53855,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:53854: checking size of long" >&5
+echo "configure:53859: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -53858,7 +53863,7 @@ else
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 53862 "configure"
+#line 53867 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -53869,7 +53874,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:53873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:53878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -53889,12 +53894,12 @@ EOF
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:53893: checking for working const" >&5
+echo "configure:53898: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 53898 "configure"
+#line 53903 "configure"
#include "confdefs.h"
int main() {
@@ -53943,7 +53948,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:53947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:53952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -53964,12 +53969,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:53968: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:53973: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 53973 "configure"
+#line 53978 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -53978,7 +53983,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:53982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:53987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -54001,19 +54006,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:54005: checking for working alloca.h" >&5
+echo "configure:54010: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 54010 "configure"
+#line 54015 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:54017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:54022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -54034,12 +54039,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:54038: checking for alloca" >&5
+echo "configure:54043: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 54043 "configure"
+#line 54048 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -54067,7 +54072,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:54071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:54076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -54099,12 +54104,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:54103: checking whether alloca needs Cray hooks" >&5
+echo "configure:54108: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 54108 "configure"
+#line 54113 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -54129,12 +54134,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:54133: checking for $ac_func" >&5
+echo "configure:54138: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 54138 "configure"
+#line 54143 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -54157,7 +54162,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:54161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:54166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -54184,7 +54189,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:54188: checking stack direction for C alloca" >&5
+echo "configure:54193: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -54192,7 +54197,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 54196 "configure"
+#line 54201 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -54211,7 +54216,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:54215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:54220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -54233,7 +54238,7 @@ EOF
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:54237: checking for 8-bit clean memcmp" >&5
+echo "configure:54242: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -54241,7 +54246,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 54245 "configure"
+#line 54250 "configure"
#include "confdefs.h"
main()
@@ -54251,7 +54256,7 @@ main()
}
EOF
-if { (eval echo configure:54255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:54260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -54595,7 +54600,7 @@ EOF
done
echo $ac_n "checking for mbfl_buffer_converter_new in -lmbfl""... $ac_c" 1>&6
-echo "configure:54599: checking for mbfl_buffer_converter_new in -lmbfl" >&5
+echo "configure:54604: checking for mbfl_buffer_converter_new in -lmbfl" >&5
ac_lib_var=`echo mbfl'_'mbfl_buffer_converter_new | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -54603,7 +54608,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmbfl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 54607 "configure"
+#line 54612 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -54614,7 +54619,7 @@ int main() {
mbfl_buffer_converter_new()
; return 0; }
EOF
-if { (eval echo configure:54618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:54623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -55237,7 +55242,7 @@ fi
php_with_mcrypt=no
echo $ac_n "checking for mcrypt support""... $ac_c" 1>&6
-echo "configure:55241: checking for mcrypt support" >&5
+echo "configure:55246: checking for mcrypt support" >&5
# Check whether --with-mcrypt or --without-mcrypt was given.
if test "${with_mcrypt+set}" = set; then
withval="$with_mcrypt"
@@ -55293,9 +55298,9 @@ if test "$PHP_MCRYPT" != "no"; then
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$MCRYPT_DIR/include
echo $ac_n "checking for libmcrypt version""... $ac_c" 1>&6
-echo "configure:55297: checking for libmcrypt version" >&5
+echo "configure:55302: checking for libmcrypt version" >&5
cat > conftest.$ac_ext <<EOF
-#line 55299 "configure"
+#line 55304 "configure"
#include "confdefs.h"
#include <mcrypt.h>
@@ -55419,7 +55424,7 @@ rm -f conftest*
done
echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6
-echo "configure:55423: checking for mcrypt_module_open in -lmcrypt" >&5
+echo "configure:55428: checking for mcrypt_module_open in -lmcrypt" >&5
ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -55427,7 +55432,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 55431 "configure"
+#line 55436 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -55438,7 +55443,7 @@ int main() {
mcrypt_module_open()
; return 0; }
EOF
-if { (eval echo configure:55442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:55447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -55591,7 +55596,7 @@ else
done
echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6
-echo "configure:55595: checking for mcrypt_module_open in -lmcrypt" >&5
+echo "configure:55600: checking for mcrypt_module_open in -lmcrypt" >&5
ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -55599,7 +55604,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 55603 "configure"
+#line 55608 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -55610,7 +55615,7 @@ int main() {
mcrypt_module_open()
; return 0; }
EOF
-if { (eval echo configure:55614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:55619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -56072,7 +56077,7 @@ fi
php_with_mhash=no
echo $ac_n "checking for mhash support""... $ac_c" 1>&6
-echo "configure:56076: checking for mhash support" >&5
+echo "configure:56081: checking for mhash support" >&5
# Check whether --with-mhash or --without-mhash was given.
if test "${with_mhash+set}" = set; then
withval="$with_mhash"
@@ -56548,7 +56553,7 @@ fi
php_with_mime_magic=no
echo $ac_n "checking whether to include mime_magic support""... $ac_c" 1>&6
-echo "configure:56552: checking whether to include mime_magic support" >&5
+echo "configure:56557: checking whether to include mime_magic support" >&5
# Check whether --with-mime-magic or --without-mime-magic was given.
if test "${with_mime_magic+set}" = set; then
withval="$with_mime_magic"
@@ -56906,7 +56911,7 @@ fi
php_with_ming=no
echo $ac_n "checking for MING support""... $ac_c" 1>&6
-echo "configure:56910: checking for MING support" >&5
+echo "configure:56915: checking for MING support" >&5
# Check whether --with-ming or --without-ming was given.
if test "${with_ming+set}" = set; then
withval="$with_ming"
@@ -56951,7 +56956,7 @@ echo "$ac_t""$ext_output" 1>&6
if test "$PHP_MING" != "no"; then
echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:56955: checking for sin in -lm" >&5
+echo "configure:56960: checking for sin in -lm" >&5
ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -56959,7 +56964,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 56963 "configure"
+#line 56968 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -56970,7 +56975,7 @@ int main() {
sin()
; return 0; }
EOF
-if { (eval echo configure:56974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:56979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -57117,7 +57122,7 @@ fi
done
echo $ac_n "checking for Ming_useSWFVersion in -lming""... $ac_c" 1>&6
-echo "configure:57121: checking for Ming_useSWFVersion in -lming" >&5
+echo "configure:57126: checking for Ming_useSWFVersion in -lming" >&5
ac_lib_var=`echo ming'_'Ming_useSWFVersion | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -57125,7 +57130,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lming $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 57129 "configure"
+#line 57134 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -57136,7 +57141,7 @@ int main() {
Ming_useSWFVersion()
; return 0; }
EOF
-if { (eval echo configure:57140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:57145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -57399,7 +57404,7 @@ fi
done
echo $ac_n "checking for SWFPrebuiltClip in -lming""... $ac_c" 1>&6
-echo "configure:57403: checking for SWFPrebuiltClip in -lming" >&5
+echo "configure:57408: checking for SWFPrebuiltClip in -lming" >&5
ac_lib_var=`echo ming'_'SWFPrebuiltClip | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -57407,7 +57412,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lming $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 57411 "configure"
+#line 57416 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -57418,7 +57423,7 @@ int main() {
SWFPrebuiltClip()
; return 0; }
EOF
-if { (eval echo configure:57422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:57427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -57547,7 +57552,7 @@ fi
done
echo $ac_n "checking for SWFMovie_namedAnchor in -lming""... $ac_c" 1>&6
-echo "configure:57551: checking for SWFMovie_namedAnchor in -lming" >&5
+echo "configure:57556: checking for SWFMovie_namedAnchor in -lming" >&5
ac_lib_var=`echo ming'_'SWFMovie_namedAnchor | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -57555,7 +57560,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lming $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 57559 "configure"
+#line 57564 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -57566,7 +57571,7 @@ int main() {
SWFMovie_namedAnchor()
; return 0; }
EOF
-if { (eval echo configure:57570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:57575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -57695,7 +57700,7 @@ fi
done
echo $ac_n "checking for Ming_setSWFCompression in -lming""... $ac_c" 1>&6
-echo "configure:57699: checking for Ming_setSWFCompression in -lming" >&5
+echo "configure:57704: checking for Ming_setSWFCompression in -lming" >&5
ac_lib_var=`echo ming'_'Ming_setSWFCompression | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -57703,7 +57708,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lming $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 57707 "configure"
+#line 57712 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -57714,7 +57719,7 @@ int main() {
Ming_setSWFCompression()
; return 0; }
EOF
-if { (eval echo configure:57718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:57723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -57751,14 +57756,14 @@ fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$MING_INC_DIR
echo $ac_n "checking for destroySWFBlock""... $ac_c" 1>&6
-echo "configure:57755: checking for destroySWFBlock" >&5
+echo "configure:57760: checking for destroySWFBlock" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""unknown" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 57762 "configure"
+#line 57767 "configure"
#include "confdefs.h"
#include "ming.h"
@@ -57770,7 +57775,7 @@ int main() {
}
EOF
-if { (eval echo configure:57774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:57779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""missing" 1>&6
@@ -57792,7 +57797,7 @@ fi
cat > conftest.$ac_ext <<EOF
-#line 57796 "configure"
+#line 57801 "configure"
#include "confdefs.h"
#include <ming.h>
@@ -57819,7 +57824,7 @@ rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 57823 "configure"
+#line 57828 "configure"
#include "confdefs.h"
#include <ming.h>
@@ -57830,7 +57835,7 @@ SWFMovie_output(NULL, NULL, NULL, 0);
; return 0; }
EOF
-if { (eval echo configure:57834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:57839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
@@ -58138,7 +58143,7 @@ fi
php_with_msql=no
echo $ac_n "checking for mSQL support""... $ac_c" 1>&6
-echo "configure:58142: checking for mSQL support" >&5
+echo "configure:58147: checking for mSQL support" >&5
# Check whether --with-msql or --without-msql was given.
if test "${with_msql+set}" = set; then
withval="$with_msql"
@@ -58607,11 +58612,11 @@ EOF
echo $ac_n "checking mSQL version""... $ac_c" 1>&6
-echo "configure:58611: checking mSQL version" >&5
+echo "configure:58616: checking mSQL version" >&5
ac_php_oldcppflags=$CPPFLAGS
CPPFLAGS="$INCLUDES $CPPFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 58615 "configure"
+#line 58620 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include "msql.h"
@@ -58619,7 +58624,7 @@ int main() {
int i = IDX_TYPE
; return 0; }
EOF
-if { (eval echo configure:58623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:58628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
@@ -58651,7 +58656,7 @@ rm -f conftest*
php_with_mssql=no
echo $ac_n "checking for MSSQL support via FreeTDS""... $ac_c" 1>&6
-echo "configure:58655: checking for MSSQL support via FreeTDS" >&5
+echo "configure:58660: checking for MSSQL support via FreeTDS" >&5
# Check whether --with-mssql or --without-mssql was given.
if test "${with_mssql+set}" = set; then
withval="$with_mssql"
@@ -59141,7 +59146,7 @@ EOF
fi
echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:59145: checking for dnet_addr in -ldnet_stub" >&5
+echo "configure:59150: checking for dnet_addr in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -59149,7 +59154,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 59153 "configure"
+#line 59158 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -59160,7 +59165,7 @@ int main() {
dnet_addr()
; return 0; }
EOF
-if { (eval echo configure:59164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:59169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -59304,7 +59309,7 @@ fi
php_with_mysql=no
echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
-echo "configure:59308: checking for MySQL support" >&5
+echo "configure:59313: checking for MySQL support" >&5
# Check whether --with-mysql or --without-mysql was given.
if test "${with_mysql+set}" = set; then
withval="$with_mysql"
@@ -59351,7 +59356,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_mysql_sock=no
echo $ac_n "checking for specified location of the MySQL UNIX socket""... $ac_c" 1>&6
-echo "configure:59355: checking for specified location of the MySQL UNIX socket" >&5
+echo "configure:59360: checking for specified location of the MySQL UNIX socket" >&5
# Check whether --with-mysql-sock or --without-mysql-sock was given.
if test "${with_mysql_sock+set}" = set; then
withval="$with_mysql_sock"
@@ -59378,7 +59383,7 @@ if test -z "$PHP_ZLIB_DIR"; then
php_with_zlib_dir=no
echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:59382: checking for the location of libz" >&5
+echo "configure:59387: checking for the location of libz" >&5
# Check whether --with-zlib-dir or --without-zlib-dir was given.
if test "${with_zlib_dir+set}" = set; then
withval="$with_zlib_dir"
@@ -59409,7 +59414,7 @@ EOF
echo $ac_n "checking for MySQL UNIX socket location""... $ac_c" 1>&6
-echo "configure:59413: checking for MySQL UNIX socket location" >&5
+echo "configure:59418: checking for MySQL UNIX socket location" >&5
if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
MYSQL_SOCK=$PHP_MYSQL_SOCK
cat >> confdefs.h <<EOF
@@ -59600,7 +59605,7 @@ Note that the MySQL client library is not bundled anymore!" 1>&2; exit 1; }
done
echo $ac_n "checking for mysql_close in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:59604: checking for mysql_close in -l$MYSQL_LIBNAME" >&5
+echo "configure:59609: checking for mysql_close in -l$MYSQL_LIBNAME" >&5
ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_close | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -59608,7 +59613,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$MYSQL_LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 59612 "configure"
+#line 59617 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -59619,7 +59624,7 @@ int main() {
mysql_close()
; return 0; }
EOF
-if { (eval echo configure:59623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:59628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -59842,7 +59847,7 @@ else
done
echo $ac_n "checking for mysql_error in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:59846: checking for mysql_error in -l$MYSQL_LIBNAME" >&5
+echo "configure:59851: checking for mysql_error in -l$MYSQL_LIBNAME" >&5
ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_error | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -59850,7 +59855,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$MYSQL_LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 59854 "configure"
+#line 59859 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -59861,7 +59866,7 @@ int main() {
mysql_error()
; return 0; }
EOF
-if { (eval echo configure:59865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:59870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -60016,7 +60021,7 @@ fi
done
echo $ac_n "checking for mysql_errno in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:60020: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5
+echo "configure:60025: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5
ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_errno | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -60024,7 +60029,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$MYSQL_LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 60028 "configure"
+#line 60033 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -60035,7 +60040,7 @@ int main() {
mysql_errno()
; return 0; }
EOF
-if { (eval echo configure:60039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:60044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -60517,7 +60522,7 @@ fi
php_with_mysqli=no
echo $ac_n "checking for MySQLi support""... $ac_c" 1>&6
-echo "configure:60521: checking for MySQLi support" >&5
+echo "configure:60526: checking for MySQLi support" >&5
# Check whether --with-mysqli or --without-mysqli was given.
if test "${with_mysqli+set}" = set; then
withval="$with_mysqli"
@@ -60564,7 +60569,7 @@ echo "$ac_t""$ext_output" 1>&6
php_enable_embedded_mysqli=no
echo $ac_n "checking whether to enable embedded MySQLi support""... $ac_c" 1>&6
-echo "configure:60568: checking whether to enable embedded MySQLi support" >&5
+echo "configure:60573: checking whether to enable embedded MySQLi support" >&5
# Check whether --enable-embedded_mysqli or --disable-embedded_mysqli was given.
if test "${enable_embedded_mysqli+set}" = set; then
enableval="$enable_embedded_mysqli"
@@ -60715,7 +60720,7 @@ EOF
done
echo $ac_n "checking for mysql_set_server_option in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6
-echo "configure:60719: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5
+echo "configure:60724: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5
ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_set_server_option | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -60723,7 +60728,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$MYSQL_LIB_NAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 60727 "configure"
+#line 60732 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -60734,7 +60739,7 @@ int main() {
mysql_set_server_option()
; return 0; }
EOF
-if { (eval echo configure:60738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:60743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -60982,7 +60987,7 @@ EOF
done
echo $ac_n "checking for mysql_stmt_field_count in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6
-echo "configure:60986: checking for mysql_stmt_field_count in -l$MYSQL_LIB_NAME" >&5
+echo "configure:60991: checking for mysql_stmt_field_count in -l$MYSQL_LIB_NAME" >&5
ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_stmt_field_count | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -60990,7 +60995,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$MYSQL_LIB_NAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 60994 "configure"
+#line 60999 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -61001,7 +61006,7 @@ int main() {
mysql_stmt_field_count()
; return 0; }
EOF
-if { (eval echo configure:61005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:61010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -61339,7 +61344,7 @@ fi
php_with_ncurses=no
echo $ac_n "checking for ncurses support""... $ac_c" 1>&6
-echo "configure:61343: checking for ncurses support" >&5
+echo "configure:61348: checking for ncurses support" >&5
# Check whether --with-ncurses or --without-ncurses was given.
if test "${with_ncurses+set}" = set; then
withval="$with_ncurses"
@@ -61546,7 +61551,7 @@ EOF
done
echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6
-echo "configure:61550: checking for $LIBSYMBOL in -l$LIBNAME" >&5
+echo "configure:61555: checking for $LIBSYMBOL in -l$LIBNAME" >&5
ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -61554,7 +61559,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 61558 "configure"
+#line 61563 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -61565,7 +61570,7 @@ int main() {
$LIBSYMBOL()
; return 0; }
EOF
-if { (eval echo configure:61569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:61574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -61784,7 +61789,7 @@ EOF
done
echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6
-echo "configure:61788: checking for new_panel in -lpanel" >&5
+echo "configure:61793: checking for new_panel in -lpanel" >&5
ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -61792,7 +61797,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpanel $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 61796 "configure"
+#line 61801 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -61803,7 +61808,7 @@ int main() {
new_panel()
; return 0; }
EOF
-if { (eval echo configure:61807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:61812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -61951,7 +61956,7 @@ fi
echo $ac_n "checking for color_set in -l$LIBNAME""... $ac_c" 1>&6
-echo "configure:61955: checking for color_set in -l$LIBNAME" >&5
+echo "configure:61960: checking for color_set in -l$LIBNAME" >&5
ac_lib_var=`echo $LIBNAME'_'color_set | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -61959,7 +61964,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 61963 "configure"
+#line 61968 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -61970,7 +61975,7 @@ int main() {
color_set()
; return 0; }
EOF
-if { (eval echo configure:61974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:61979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -61994,7 +61999,7 @@ else
fi
echo $ac_n "checking for slk_color in -l$LIBNAME""... $ac_c" 1>&6
-echo "configure:61998: checking for slk_color in -l$LIBNAME" >&5
+echo "configure:62003: checking for slk_color in -l$LIBNAME" >&5
ac_lib_var=`echo $LIBNAME'_'slk_color | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -62002,7 +62007,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 62006 "configure"
+#line 62011 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -62013,7 +62018,7 @@ int main() {
slk_color()
; return 0; }
EOF
-if { (eval echo configure:62017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:62022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -62037,7 +62042,7 @@ else
fi
echo $ac_n "checking for assume_default_colors in -l$LIBNAME""... $ac_c" 1>&6
-echo "configure:62041: checking for assume_default_colors in -l$LIBNAME" >&5
+echo "configure:62046: checking for assume_default_colors in -l$LIBNAME" >&5
ac_lib_var=`echo $LIBNAME'_'assume_default_colors | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -62045,7 +62050,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 62049 "configure"
+#line 62054 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -62056,7 +62061,7 @@ int main() {
assume_default_colors()
; return 0; }
EOF
-if { (eval echo configure:62060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:62065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -62080,7 +62085,7 @@ else
fi
echo $ac_n "checking for use_extended_names in -l$LIBNAME""... $ac_c" 1>&6
-echo "configure:62084: checking for use_extended_names in -l$LIBNAME" >&5
+echo "configure:62089: checking for use_extended_names in -l$LIBNAME" >&5
ac_lib_var=`echo $LIBNAME'_'use_extended_names | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -62088,7 +62093,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 62092 "configure"
+#line 62097 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -62099,7 +62104,7 @@ int main() {
use_extended_names()
; return 0; }
EOF
-if { (eval echo configure:62103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:62108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -62431,7 +62436,7 @@ fi
php_with_oci8=no
echo $ac_n "checking for Oracle (OCI8) support""... $ac_c" 1>&6
-echo "configure:62435: checking for Oracle (OCI8) support" >&5
+echo "configure:62440: checking for Oracle (OCI8) support" >&5
# Check whether --with-oci8 or --without-oci8 was given.
if test "${with_oci8+set}" = set; then
withval="$with_oci8"
@@ -62476,7 +62481,7 @@ echo "$ac_t""$ext_output" 1>&6
if test "$PHP_OCI8" != "no"; then
echo $ac_n "checking PHP version""... $ac_c" 1>&6
-echo "configure:62480: checking PHP version" >&5
+echo "configure:62485: checking PHP version" >&5
tmp_version=$PHP_VERSION
if test -z "$tmp_version"; then
@@ -62507,7 +62512,9 @@ fi
PHP_OCI8_INSTANT_CLIENT="no"
-if test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then
+if test "`echo $PHP_OCI8`" = "instantclient"; then
+ PHP_OCI8_INSTANT_CLIENT="yes"
+elif test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then
PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f3`"
PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f1,4`"
if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then
@@ -62530,7 +62537,7 @@ fi
if test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
echo $ac_n "checking Oracle Install Directory""... $ac_c" 1>&6
-echo "configure:62534: checking Oracle Install Directory" >&5
+echo "configure:62541: checking Oracle Install Directory" >&5
if test "$PHP_OCI8" = "yes"; then
OCI8_DIR=$ORACLE_HOME
else
@@ -62540,7 +62547,7 @@ echo "configure:62534: checking Oracle Install Directory" >&5
echo $ac_n "checking size of long int""... $ac_c" 1>&6
-echo "configure:62544: checking size of long int" >&5
+echo "configure:62551: checking size of long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -62548,7 +62555,7 @@ else
ac_cv_sizeof_long_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 62552 "configure"
+#line 62559 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -62559,7 +62566,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:62563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:62570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_int=`cat conftestval`
else
@@ -62579,7 +62586,7 @@ EOF
echo $ac_n "checking if we're on a 64-bit platform""... $ac_c" 1>&6
-echo "configure:62583: checking if we're on a 64-bit platform" >&5
+echo "configure:62590: checking if we're on a 64-bit platform" >&5
if test "$ac_cv_sizeof_long_int" = "4" ; then
echo "$ac_t""no" 1>&6
TMP_OCI8_LIB_DIR=lib32
@@ -62589,7 +62596,7 @@ echo "configure:62583: checking if we're on a 64-bit platform" >&5
fi
echo $ac_n "checking OCI8 libraries dir""... $ac_c" 1>&6
-echo "configure:62593: checking OCI8 libraries dir" >&5
+echo "configure:62600: checking OCI8 libraries dir" >&5
if test -d "$OCI8_DIR/lib" && test ! -d "$OCI8_DIR/lib32"; then
OCI8_LIB_DIR=lib
elif test ! -d "$OCI8_DIR/lib" && test -d "$OCI8_DIR/lib32"; then
@@ -62923,7 +62930,7 @@ echo "configure:62593: checking OCI8 libraries dir" >&5
echo $ac_n "checking Oracle version""... $ac_c" 1>&6
-echo "configure:62927: checking Oracle version" >&5
+echo "configure:62934: checking Oracle version" >&5
if test -s "$OCI8_DIR/orainst/unix.rgs"; then
OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/ */:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
@@ -63438,7 +63445,7 @@ echo "configure:62927: checking Oracle version" >&5
done
echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:63442: checking for OCIEnvCreate in -lclntsh" >&5
+echo "configure:63449: checking for OCIEnvCreate in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -63446,7 +63453,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 63450 "configure"
+#line 63457 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -63457,7 +63464,7 @@ int main() {
OCIEnvCreate()
; return 0; }
EOF
-if { (eval echo configure:63461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:63468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -63591,7 +63598,7 @@ fi
done
echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6
-echo "configure:63595: checking for OCIStmtPrepare2 in -lclntsh" >&5
+echo "configure:63602: checking for OCIStmtPrepare2 in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -63599,7 +63606,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 63603 "configure"
+#line 63610 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -63610,7 +63617,7 @@ int main() {
OCIStmtPrepare2()
; return 0; }
EOF
-if { (eval echo configure:63614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:63621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -63808,7 +63815,7 @@ fi
done
echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:63812: checking for OCIEnvCreate in -lclntsh" >&5
+echo "configure:63819: checking for OCIEnvCreate in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -63816,7 +63823,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 63820 "configure"
+#line 63827 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -63827,7 +63834,7 @@ int main() {
OCIEnvCreate()
; return 0; }
EOF
-if { (eval echo configure:63831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:63838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -63961,7 +63968,7 @@ fi
done
echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6
-echo "configure:63965: checking for OCIStmtPrepare2 in -lclntsh" >&5
+echo "configure:63972: checking for OCIStmtPrepare2 in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -63969,7 +63976,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 63973 "configure"
+#line 63980 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -63980,7 +63987,7 @@ int main() {
OCIStmtPrepare2()
; return 0; }
EOF
-if { (eval echo configure:63984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:63991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -64020,7 +64027,7 @@ fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=$OCI8_INCLUDES
cat > conftest.$ac_ext <<EOF
-#line 64024 "configure"
+#line 64031 "configure"
#include "confdefs.h"
#include <oci.h>
@@ -64215,7 +64222,7 @@ EOF
done
echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:64219: checking for OCIEnvNlsCreate in -lclntsh" >&5
+echo "configure:64226: checking for OCIEnvNlsCreate in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -64223,7 +64230,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 64227 "configure"
+#line 64234 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -64234,7 +64241,7 @@ int main() {
OCIEnvNlsCreate()
; return 0; }
EOF
-if { (eval echo configure:64238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:64245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -64351,7 +64358,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
done
echo $ac_n "checking for OCINlsCharSetNameToId in -lclntsh""... $ac_c" 1>&6
-echo "configure:64355: checking for OCINlsCharSetNameToId in -lclntsh" >&5
+echo "configure:64362: checking for OCINlsCharSetNameToId in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCINlsCharSetNameToId | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -64359,7 +64366,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 64363 "configure"
+#line 64370 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -64370,7 +64377,7 @@ int main() {
OCINlsCharSetNameToId()
; return 0; }
EOF
-if { (eval echo configure:64374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:64381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -64517,7 +64524,7 @@ fi
done
echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:64521: checking for OCIEnvCreate in -lclntsh" >&5
+echo "configure:64528: checking for OCIEnvCreate in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -64525,7 +64532,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 64529 "configure"
+#line 64536 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -64536,7 +64543,7 @@ int main() {
OCIEnvCreate()
; return 0; }
EOF
-if { (eval echo configure:64540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:64547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -64670,7 +64677,7 @@ fi
done
echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6
-echo "configure:64674: checking for OCIStmtPrepare2 in -lclntsh" >&5
+echo "configure:64681: checking for OCIStmtPrepare2 in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -64678,7 +64685,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 64682 "configure"
+#line 64689 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -64689,7 +64696,7 @@ int main() {
OCIStmtPrepare2()
; return 0; }
EOF
-if { (eval echo configure:64693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:64700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -64823,7 +64830,7 @@ fi
done
echo $ac_n "checking for OCILobRead2 in -lclntsh""... $ac_c" 1>&6
-echo "configure:64827: checking for OCILobRead2 in -lclntsh" >&5
+echo "configure:64834: checking for OCILobRead2 in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCILobRead2 | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -64831,7 +64838,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 64835 "configure"
+#line 64842 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -64842,7 +64849,7 @@ int main() {
OCILobRead2()
; return 0; }
EOF
-if { (eval echo configure:64846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:64853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -65074,7 +65081,7 @@ EOF
done
echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6
-echo "configure:65078: checking for OCILobIsTemporary in -lclntsh" >&5
+echo "configure:65085: checking for OCILobIsTemporary in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -65082,7 +65089,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 65086 "configure"
+#line 65093 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -65093,7 +65100,7 @@ int main() {
OCILobIsTemporary()
; return 0; }
EOF
-if { (eval echo configure:65097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:65104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -65223,7 +65230,7 @@ else
done
echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6
-echo "configure:65227: checking for OCILobIsTemporary in -locijdbc8" >&5
+echo "configure:65234: checking for OCILobIsTemporary in -locijdbc8" >&5
ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -65231,7 +65238,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-locijdbc8 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 65235 "configure"
+#line 65242 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -65242,7 +65249,7 @@ int main() {
OCILobIsTemporary()
; return 0; }
EOF
-if { (eval echo configure:65246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:65253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -65403,7 +65410,7 @@ fi
done
echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6
-echo "configure:65407: checking for OCICollAssign in -lclntsh" >&5
+echo "configure:65414: checking for OCICollAssign in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -65411,7 +65418,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 65415 "configure"
+#line 65422 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -65422,7 +65429,7 @@ int main() {
OCICollAssign()
; return 0; }
EOF
-if { (eval echo configure:65426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:65433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -66047,12 +66054,56 @@ EOF
elif test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then
+ echo $ac_n "checking size of long int""... $ac_c" 1>&6
+echo "configure:66059: checking size of long int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_long_int=4
+else
+ cat > conftest.$ac_ext <<EOF
+#line 66067 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) return(1);
+ fprintf(f, "%d\n", sizeof(long int));
+ return(0);
+}
+EOF
+if { (eval echo configure:66078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_long_int=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_long_int=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
+EOF
+
+
+ LIBDIR_SUFFIX=""
+ if test "$ac_cv_sizeof_long_int" = "8" ; then
+ LIBDIR_SUFFIX=64
+ fi
+
echo $ac_n "checking Oracle Instant Client directory""... $ac_c" 1>&6
-echo "configure:66052: checking Oracle Instant Client directory" >&5
+echo "configure:66103: checking Oracle Instant Client directory" >&5
if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
- PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib 2> /dev/null | tail -1`
+ PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${LIBDIR_SUFFIX}/lib 2> /dev/null | tail -1`
if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
- { echo "configure: error: Oracle Instant Client directory not found. Try --with-oci8=instantclient,DIR" 1>&2; exit 1; }
+ { echo "configure: error: Oracle Instant Client directory /usr/lib/oracle/.../client${LIBDIR_SUFFIX}/lib not found. Try --with-oci8=instantclient,DIR" 1>&2; exit 1; }
fi
fi
echo "$ac_t""$PHP_OCI8_INSTANT_CLIENT" 1>&6
@@ -66060,9 +66111,9 @@ echo "configure:66052: checking Oracle Instant Client directory" >&5
OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT
echo $ac_n "checking Oracle Instant Client SDK header directory""... $ac_c" 1>&6
-echo "configure:66064: checking Oracle Instant Client SDK header directory" >&5
+echo "configure:66115: checking Oracle Instant Client SDK header directory" >&5
- OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib/*$!/usr/include/oracle/\1/client!'`
+ OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client\(.*\)/lib/*$!/usr/include/oracle/\1/client\2!'`
OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include
@@ -66269,7 +66320,7 @@ echo "configure:66064: checking Oracle Instant Client SDK header directory" >&5
echo $ac_n "checking Oracle Instant Client version""... $ac_c" 1>&6
-echo "configure:66273: checking Oracle Instant Client version" >&5
+echo "configure:66324: checking Oracle Instant Client version" >&5
if test -f $PHP_OCI8_INSTANT_CLIENT/libnnz11.$SHLIB_SUFFIX_NAME; then
if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then
if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then
@@ -66763,7 +66814,7 @@ esac
if test "$PHP_ADABAS" != "no"; then
echo $ac_n "checking for Adabas support""... $ac_c" 1>&6
-echo "configure:66767: checking for Adabas support" >&5
+echo "configure:66818: checking for Adabas support" >&5
if test "$PHP_ADABAS" = "yes"; then
PHP_ADABAS=/usr/local
fi
@@ -66969,7 +67020,7 @@ esac
if test "$PHP_SAPDB" != "no"; then
echo $ac_n "checking for SAP DB support""... $ac_c" 1>&6
-echo "configure:66973: checking for SAP DB support" >&5
+echo "configure:67024: checking for SAP DB support" >&5
if test "$PHP_SAPDB" = "yes"; then
PHP_SAPDB=/usr/local
fi
@@ -67105,7 +67156,7 @@ esac
if test "$PHP_SOLID" != "no"; then
echo $ac_n "checking for Solid support""... $ac_c" 1>&6
-echo "configure:67109: checking for Solid support" >&5
+echo "configure:67160: checking for Solid support" >&5
if test "$PHP_SOLID" = "yes"; then
PHP_SOLID=/usr/local/solid
fi
@@ -67132,7 +67183,7 @@ EOF
echo "$ac_t""$ext_output" 1>&6
echo $ac_n "checking Solid library file""... $ac_c" 1>&6
-echo "configure:67136: checking Solid library file" >&5
+echo "configure:67187: checking Solid library file" >&5
ac_solid_uname_r=`uname -r 2>/dev/null`
ac_solid_uname_s=`uname -s 2>/dev/null`
case $ac_solid_uname_s in
@@ -67256,7 +67307,7 @@ esac
if test "$PHP_IBM_DB2" != "no"; then
echo $ac_n "checking for IBM DB2 support""... $ac_c" 1>&6
-echo "configure:67260: checking for IBM DB2 support" >&5
+echo "configure:67311: checking for IBM DB2 support" >&5
if test "$PHP_IBM_DB2" = "yes"; then
ODBC_INCDIR=/home/db2inst1/sqllib/include
ODBC_LIBDIR=/home/db2inst1/sqllib/lib
@@ -67287,7 +67338,7 @@ fi
else
cat > conftest.$ac_ext <<EOF
-#line 67291 "configure"
+#line 67342 "configure"
#include "confdefs.h"
@@ -67298,7 +67349,7 @@ else
}
EOF
-if { (eval echo configure:67302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:67353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -67382,7 +67433,7 @@ esac
if test "$PHP_ODBCROUTER" != "no"; then
echo $ac_n "checking for ODBCRouter.com support""... $ac_c" 1>&6
-echo "configure:67386: checking for ODBCRouter.com support" >&5
+echo "configure:67437: checking for ODBCRouter.com support" >&5
if test "$PHP_ODBCROUTER" = "yes"; then
PHP_ODBCROUTER=/usr
fi
@@ -67449,7 +67500,7 @@ esac
if test "$PHP_EMPRESS" != "no"; then
echo $ac_n "checking for Empress support""... $ac_c" 1>&6
-echo "configure:67453: checking for Empress support" >&5
+echo "configure:67504: checking for Empress support" >&5
if test "$PHP_EMPRESS" = "yes"; then
ODBC_INCDIR=$EMPRESSPATH/include/odbc
ODBC_LIBDIR=$EMPRESSPATH/shlib
@@ -67467,7 +67518,7 @@ EOF
echo "$ac_t""$ext_output" 1>&6
echo $ac_n "checking Empress library file""... $ac_c" 1>&6
-echo "configure:67471: checking Empress library file" >&5
+echo "configure:67522: checking Empress library file" >&5
ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1`
if test ! -f $ODBC_LIBS; then
ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1`
@@ -67526,7 +67577,7 @@ esac
if test "$PHP_EMPRESS_BCS" != "no"; then
echo $ac_n "checking for Empress local access support""... $ac_c" 1>&6
-echo "configure:67530: checking for Empress local access support" >&5
+echo "configure:67581: checking for Empress local access support" >&5
if test "$PHP_EMPRESS_BCS" = "yes"; then
ODBC_INCDIR=$EMPRESSPATH/include/odbc
ODBC_LIBDIR=$EMPRESSPATH/shlib
@@ -67560,7 +67611,7 @@ EOF
echo "$ac_t""$ext_output" 1>&6
echo $ac_n "checking Empress local access library file""... $ac_c" 1>&6
-echo "configure:67564: checking Empress local access library file" >&5
+echo "configure:67615: checking Empress local access library file" >&5
ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1`
if test ! -f $ODBCBCS_LIBS; then
ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1`
@@ -67619,7 +67670,7 @@ esac
if test "$PHP_BIRDSTEP" != "no"; then
echo $ac_n "checking for Birdstep support""... $ac_c" 1>&6
-echo "configure:67623: checking for Birdstep support" >&5
+echo "configure:67674: checking for Birdstep support" >&5
if test "$PHP_BIRDSTEP" = "yes"; then
ODBC_INCDIR=/usr/local/birdstep/include
ODBC_LIBDIR=/usr/local/birdstep/lib
@@ -67734,7 +67785,7 @@ esac
if test "$PHP_CUSTOM_ODBC" != "no"; then
echo $ac_n "checking for a custom ODBC support""... $ac_c" 1>&6
-echo "configure:67738: checking for a custom ODBC support" >&5
+echo "configure:67789: checking for a custom ODBC support" >&5
if test "$PHP_CUSTOM_ODBC" = "yes"; then
PHP_CUSTOM_ODBC=/usr/local
fi
@@ -67801,7 +67852,7 @@ esac
if test "$PHP_IODBC" != "no"; then
echo $ac_n "checking for iODBC support""... $ac_c" 1>&6
-echo "configure:67805: checking for iODBC support" >&5
+echo "configure:67856: checking for iODBC support" >&5
if test "$PHP_IODBC" = "yes"; then
PHP_IODBC=/usr/local
fi
@@ -67950,7 +68001,7 @@ esac
if test "$PHP_ESOOB" != "no"; then
echo $ac_n "checking for Easysoft ODBC-ODBC Bridge support""... $ac_c" 1>&6
-echo "configure:67954: checking for Easysoft ODBC-ODBC Bridge support" >&5
+echo "configure:68005: checking for Easysoft ODBC-ODBC Bridge support" >&5
if test "$PHP_ESOOB" = "yes"; then
PHP_ESOOB=/usr/local/easysoft/oob/client
fi
@@ -68017,7 +68068,7 @@ esac
if test "$PHP_UNIXODBC" != "no"; then
echo $ac_n "checking for unixODBC support""... $ac_c" 1>&6
-echo "configure:68021: checking for unixODBC support" >&5
+echo "configure:68072: checking for unixODBC support" >&5
if test "$PHP_UNIXODBC" = "yes"; then
PHP_UNIXODBC=/usr/local
fi
@@ -68089,7 +68140,7 @@ esac
if test "$PHP_DBMAKER" != "no"; then
echo $ac_n "checking for DBMaker support""... $ac_c" 1>&6
-echo "configure:68093: checking for DBMaker support" >&5
+echo "configure:68144: checking for DBMaker support" >&5
if test "$PHP_DBMAKER" = "yes"; then
# find dbmaker's home directory
DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'`
@@ -68641,7 +68692,7 @@ fi
php_enable_pcntl=no
echo $ac_n "checking whether to enable pcntl support""... $ac_c" 1>&6
-echo "configure:68645: checking whether to enable pcntl support" >&5
+echo "configure:68696: checking whether to enable pcntl support" >&5
# Check whether --enable-pcntl or --disable-pcntl was given.
if test "${enable_pcntl+set}" = set; then
enableval="$enable_pcntl"
@@ -68689,12 +68740,12 @@ if test "$PHP_PCNTL" != "no"; then
for ac_func in fork
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:68693: checking for $ac_func" >&5
+echo "configure:68744: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 68698 "configure"
+#line 68749 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -68717,7 +68768,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:68721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:68772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -68748,12 +68799,12 @@ done
for ac_func in waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:68752: checking for $ac_func" >&5
+echo "configure:68803: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 68757 "configure"
+#line 68808 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -68776,7 +68827,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:68780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:68831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -68807,12 +68858,12 @@ done
for ac_func in sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:68811: checking for $ac_func" >&5
+echo "configure:68862: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 68816 "configure"
+#line 68867 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -68835,7 +68886,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:68839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:68890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -68866,12 +68917,12 @@ done
for ac_func in getpriority setpriority wait3
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:68870: checking for $ac_func" >&5
+echo "configure:68921: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 68875 "configure"
+#line 68926 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -68894,7 +68945,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:68898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:68949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -69209,7 +69260,7 @@ fi
php_enable_pdo=yes
echo $ac_n "checking whether to enable PDO support""... $ac_c" 1>&6
-echo "configure:69213: checking whether to enable PDO support" >&5
+echo "configure:69264: checking whether to enable PDO support" >&5
# Check whether --enable-pdo or --disable-pdo was given.
if test "${enable_pdo+set}" = set; then
enableval="$enable_pdo"
@@ -69634,7 +69685,7 @@ if test "$PHP_PDO" != "no"; then
php_with_pdo_dblib=no
echo $ac_n "checking for PDO_DBLIB support via FreeTDS""... $ac_c" 1>&6
-echo "configure:69638: checking for PDO_DBLIB support via FreeTDS" >&5
+echo "configure:69689: checking for PDO_DBLIB support via FreeTDS" >&5
# Check whether --with-pdo-dblib or --without-pdo-dblib was given.
if test "${with_pdo_dblib+set}" = set; then
withval="$with_pdo_dblib"
@@ -69851,13 +69902,13 @@ if test "$PHP_PDO_DBLIB" != "no"; then
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:69855: checking for PDO includes" >&5
+echo "configure:69906: checking for PDO includes" >&5
if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:69861: checking for PDO includes" >&5
+echo "configure:69912: checking for PDO includes" >&5
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -70160,7 +70211,7 @@ EOF
fi
echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:70164: checking for dnet_addr in -ldnet_stub" >&5
+echo "configure:70215: checking for dnet_addr in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -70168,7 +70219,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 70172 "configure"
+#line 70223 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -70179,7 +70230,7 @@ int main() {
dnet_addr()
; return 0; }
EOF
-if { (eval echo configure:70183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:70234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -70344,7 +70395,7 @@ if test "$PHP_PDO" != "no"; then
php_with_pdo_firebird=no
echo $ac_n "checking for Firebird support for PDO""... $ac_c" 1>&6
-echo "configure:70348: checking for Firebird support for PDO" >&5
+echo "configure:70399: checking for Firebird support for PDO" >&5
# Check whether --with-pdo-firebird or --without-pdo-firebird was given.
if test "${with_pdo_firebird+set}" = set; then
withval="$with_pdo_firebird"
@@ -70494,7 +70545,7 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then
done
echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6
-echo "configure:70498: checking for isc_detach_database in -lfbclient" >&5
+echo "configure:70549: checking for isc_detach_database in -lfbclient" >&5
ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -70502,7 +70553,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lfbclient $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 70506 "configure"
+#line 70557 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -70513,7 +70564,7 @@ int main() {
isc_detach_database()
; return 0; }
EOF
-if { (eval echo configure:70517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:70568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -70640,7 +70691,7 @@ else
done
echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6
-echo "configure:70644: checking for isc_detach_database in -lgds" >&5
+echo "configure:70695: checking for isc_detach_database in -lgds" >&5
ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -70648,7 +70699,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgds $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 70652 "configure"
+#line 70703 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -70659,7 +70710,7 @@ int main() {
isc_detach_database()
; return 0; }
EOF
-if { (eval echo configure:70663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:70714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -70786,7 +70837,7 @@ else
done
echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6
-echo "configure:70790: checking for isc_detach_database in -lib_util" >&5
+echo "configure:70841: checking for isc_detach_database in -lib_util" >&5
ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -70794,7 +70845,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lib_util $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 70798 "configure"
+#line 70849 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -70805,7 +70856,7 @@ int main() {
isc_detach_database()
; return 0; }
EOF
-if { (eval echo configure:70809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:70860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -70850,13 +70901,13 @@ fi
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:70854: checking for PDO includes" >&5
+echo "configure:70905: checking for PDO includes" >&5
if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:70860: checking for PDO includes" >&5
+echo "configure:70911: checking for PDO includes" >&5
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -71323,7 +71374,7 @@ if test "$PHP_PDO" != "no"; then
php_with_pdo_mysql=no
echo $ac_n "checking for MySQL support for PDO""... $ac_c" 1>&6
-echo "configure:71327: checking for MySQL support for PDO" >&5
+echo "configure:71378: checking for MySQL support for PDO" >&5
# Check whether --with-pdo-mysql or --without-pdo-mysql was given.
if test "${with_pdo_mysql+set}" = set; then
withval="$with_pdo_mysql"
@@ -71371,7 +71422,7 @@ if test -z "$PHP_ZLIB_DIR"; then
php_with_zlib_dir=no
echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:71375: checking for the location of libz" >&5
+echo "configure:71426: checking for the location of libz" >&5
# Check whether --with-zlib-dir or --without-zlib-dir was given.
if test "${with_zlib_dir+set}" = set; then
withval="$with_zlib_dir"
@@ -71401,7 +71452,7 @@ EOF
echo $ac_n "checking for mysql_config""... $ac_c" 1>&6
-echo "configure:71405: checking for mysql_config" >&5
+echo "configure:71456: checking for mysql_config" >&5
if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
@@ -71435,7 +71486,7 @@ echo "configure:71405: checking for mysql_config" >&5
# Extract the first word of "sed", so it can be a program name with args.
set dummy sed; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:71439: checking for $ac_word" >&5
+echo "configure:71490: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -71483,7 +71534,7 @@ fi
else
echo "$ac_t""not found" 1>&6
echo $ac_n "checking for mysql install under $PDO_MYSQL_DIR""... $ac_c" 1>&6
-echo "configure:71487: checking for mysql install under $PDO_MYSQL_DIR" >&5
+echo "configure:71538: checking for mysql install under $PDO_MYSQL_DIR" >&5
if test -r $PDO_MYSQL_DIR/include/mysql; then
PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include/mysql
else
@@ -71737,7 +71788,7 @@ EOF
done
echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:71741: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
+echo "configure:71792: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -71745,7 +71796,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$PDO_MYSQL_LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 71749 "configure"
+#line 71800 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -71756,7 +71807,7 @@ int main() {
mysql_query()
; return 0; }
EOF
-if { (eval echo configure:71760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:71811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -72109,7 +72160,7 @@ else
done
echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:72113: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
+echo "configure:72164: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -72117,7 +72168,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$PDO_MYSQL_LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 72121 "configure"
+#line 72172 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -72128,7 +72179,7 @@ int main() {
mysql_query()
; return 0; }
EOF
-if { (eval echo configure:72132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:72183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -72283,7 +72334,7 @@ fi
done
echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
-echo "configure:72287: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
+echo "configure:72338: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -72291,7 +72342,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$PDO_MYSQL_LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 72295 "configure"
+#line 72346 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -72302,7 +72353,7 @@ int main() {
mysql_query()
; return 0; }
EOF
-if { (eval echo configure:72306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:72357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -72475,12 +72526,12 @@ fi
for ac_func in mysql_commit mysql_stmt_prepare mysql_next_result mysql_sqlstate
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:72479: checking for $ac_func" >&5
+echo "configure:72530: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 72484 "configure"
+#line 72535 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -72503,7 +72554,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:72507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:72558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -72532,13 +72583,13 @@ done
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:72536: checking for PDO includes" >&5
+echo "configure:72587: checking for PDO includes" >&5
if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:72542: checking for PDO includes" >&5
+echo "configure:72593: checking for PDO includes" >&5
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -72886,7 +72937,7 @@ if test "$PHP_PDO" != "no"; then
php_with_pdo_oci=no
echo $ac_n "checking Oracle OCI support for PDO""... $ac_c" 1>&6
-echo "configure:72890: checking Oracle OCI support for PDO" >&5
+echo "configure:72941: checking Oracle OCI support for PDO" >&5
# Check whether --with-pdo-oci or --without-pdo-oci was given.
if test "${with_pdo_oci+set}" = set; then
withval="$with_pdo_oci"
@@ -72931,7 +72982,7 @@ echo "$ac_t""$ext_output" 1>&6
if test "$PHP_PDO_OCI" != "no"; then
echo $ac_n "checking Oracle Install-Dir""... $ac_c" 1>&6
-echo "configure:72935: checking Oracle Install-Dir" >&5
+echo "configure:72986: checking Oracle Install-Dir" >&5
if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then
PDO_OCI_DIR=$ORACLE_HOME
else
@@ -72940,7 +72991,7 @@ echo "configure:72935: checking Oracle Install-Dir" >&5
echo "$ac_t""$PHP_PDO_OCI" 1>&6
echo $ac_n "checking if that is sane""... $ac_c" 1>&6
-echo "configure:72944: checking if that is sane" >&5
+echo "configure:72995: checking if that is sane" >&5
if test -z "$PDO_OCI_DIR"; then
{ echo "configure: error:
You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_HOME.
@@ -72953,7 +73004,7 @@ You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_
PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`"
PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`"
echo $ac_n "checking for oci.h""... $ac_c" 1>&6
-echo "configure:72957: checking for oci.h" >&5
+echo "configure:73008: checking for oci.h" >&5
if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then
if test "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" != "/usr/include"; then
@@ -73102,7 +73153,7 @@ echo "configure:72957: checking for oci.h" >&5
else
echo $ac_n "checking size of long int""... $ac_c" 1>&6
-echo "configure:73106: checking size of long int" >&5
+echo "configure:73157: checking size of long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -73110,7 +73161,7 @@ else
ac_cv_sizeof_long_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 73114 "configure"
+#line 73165 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -73121,7 +73172,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:73125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:73176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_int=`cat conftestval`
else
@@ -73141,7 +73192,7 @@ EOF
echo $ac_n "checking if we're on a 64-bit platform""... $ac_c" 1>&6
-echo "configure:73145: checking if we're on a 64-bit platform" >&5
+echo "configure:73196: checking if we're on a 64-bit platform" >&5
if test "$ac_cv_sizeof_long_int" = "4" ; then
echo "$ac_t""no" 1>&6
TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32"
@@ -73151,7 +73202,7 @@ echo "configure:73145: checking if we're on a 64-bit platform" >&5
fi
echo $ac_n "checking OCI8 libraries dir""... $ac_c" 1>&6
-echo "configure:73155: checking OCI8 libraries dir" >&5
+echo "configure:73206: checking OCI8 libraries dir" >&5
if test -d "$PDO_OCI_DIR/lib" && test ! -d "$PDO_OCI_DIR/lib32"; then
PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib"
elif test ! -d "$PDO_OCI_DIR/lib" && test -d "$PDO_OCI_DIR/lib32"; then
@@ -73518,7 +73569,7 @@ echo "configure:73155: checking OCI8 libraries dir" >&5
fi
echo $ac_n "checking Oracle version""... $ac_c" 1>&6
-echo "configure:73522: checking Oracle version" >&5
+echo "configure:73573: checking Oracle version" >&5
if test -s "$PDO_OCI_DIR/orainst/unix.rgs"; then
PDO_OCI_VERSION=`grep '"ocommon"' $PDO_OCI_DIR/orainst/unix.rgs | sed 's/ */:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$PDO_OCI_VERSION" && PDO_OCI_VERSION=7.3
@@ -74209,7 +74260,7 @@ echo "configure:73522: checking Oracle version" >&5
done
echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:74213: checking for OCIEnvCreate in -lclntsh" >&5
+echo "configure:74264: checking for OCIEnvCreate in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -74217,7 +74268,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 74221 "configure"
+#line 74272 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -74228,7 +74279,7 @@ int main() {
OCIEnvCreate()
; return 0; }
EOF
-if { (eval echo configure:74232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:74283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -74362,7 +74413,7 @@ fi
done
echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6
-echo "configure:74366: checking for OCIEnvNlsCreate in -lclntsh" >&5
+echo "configure:74417: checking for OCIEnvNlsCreate in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -74370,7 +74421,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 74374 "configure"
+#line 74425 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -74381,7 +74432,7 @@ int main() {
OCIEnvNlsCreate()
; return 0; }
EOF
-if { (eval echo configure:74385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:74436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -74515,7 +74566,7 @@ fi
done
echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6
-echo "configure:74519: checking for OCILobIsTemporary in -lclntsh" >&5
+echo "configure:74570: checking for OCILobIsTemporary in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -74523,7 +74574,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 74527 "configure"
+#line 74578 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -74534,7 +74585,7 @@ int main() {
OCILobIsTemporary()
; return 0; }
EOF
-if { (eval echo configure:74538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:74589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -74664,7 +74715,7 @@ else
done
echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6
-echo "configure:74668: checking for OCILobIsTemporary in -locijdbc8" >&5
+echo "configure:74719: checking for OCILobIsTemporary in -locijdbc8" >&5
ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -74672,7 +74723,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-locijdbc8 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 74676 "configure"
+#line 74727 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -74683,7 +74734,7 @@ int main() {
OCILobIsTemporary()
; return 0; }
EOF
-if { (eval echo configure:74687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:74738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -74844,7 +74895,7 @@ fi
done
echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6
-echo "configure:74848: checking for OCICollAssign in -lclntsh" >&5
+echo "configure:74899: checking for OCICollAssign in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -74852,7 +74903,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 74856 "configure"
+#line 74907 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -74863,7 +74914,7 @@ int main() {
OCICollAssign()
; return 0; }
EOF
-if { (eval echo configure:74867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:74918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -74997,7 +75048,7 @@ fi
done
echo $ac_n "checking for OCIStmtFetch2 in -lclntsh""... $ac_c" 1>&6
-echo "configure:75001: checking for OCIStmtFetch2 in -lclntsh" >&5
+echo "configure:75052: checking for OCIStmtFetch2 in -lclntsh" >&5
ac_lib_var=`echo clntsh'_'OCIStmtFetch2 | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -75005,7 +75056,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lclntsh $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 75009 "configure"
+#line 75060 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -75016,7 +75067,7 @@ int main() {
OCIStmtFetch2()
; return 0; }
EOF
-if { (eval echo configure:75020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:75071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -75055,13 +75106,13 @@ fi
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:75059: checking for PDO includes" >&5
+echo "configure:75110: checking for PDO includes" >&5
if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:75065: checking for PDO includes" >&5
+echo "configure:75116: checking for PDO includes" >&5
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -75421,7 +75472,7 @@ if test "$PHP_PDO" != "no"; then
php_with_pdo_odbc=no
echo $ac_n "checking for ODBC v3 support for PDO""... $ac_c" 1>&6
-echo "configure:75425: checking for ODBC v3 support for PDO" >&5
+echo "configure:75476: checking for ODBC v3 support for PDO" >&5
# Check whether --with-pdo-odbc or --without-pdo-odbc was given.
if test "${with_pdo_odbc+set}" = set; then
withval="$with_pdo_odbc"
@@ -75472,13 +75523,13 @@ if test "$PHP_PDO_ODBC" != "no"; then
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:75476: checking for PDO includes" >&5
+echo "configure:75527: checking for PDO includes" >&5
if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:75482: checking for PDO includes" >&5
+echo "configure:75533: checking for PDO includes" >&5
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -75499,7 +75550,7 @@ echo "$ac_t""$pdo_inc_path" 1>&6
echo $ac_n "checking for selected PDO ODBC flavour""... $ac_c" 1>&6
-echo "configure:75503: checking for selected PDO ODBC flavour" >&5
+echo "configure:75554: checking for selected PDO ODBC flavour" >&5
pdo_odbc_flavour="`echo $PHP_PDO_ODBC | cut -d, -f1`"
pdo_odbc_dir="`echo $PHP_PDO_ODBC | cut -d, -f2`"
@@ -75572,7 +75623,7 @@ echo "configure:75503: checking for selected PDO ODBC flavour" >&5
echo $ac_n "checking for odbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75576: checking for odbc.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75627: checking for odbc.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/odbc.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75586,7 +75637,7 @@ EOF
echo $ac_n "checking for odbcsdk.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75590: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75641: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/odbcsdk.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75600,7 +75651,7 @@ EOF
echo $ac_n "checking for iodbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75604: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75655: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/iodbc.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75614,7 +75665,7 @@ EOF
echo $ac_n "checking for sqlunix.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75618: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75669: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/sqlunix.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75628,7 +75679,7 @@ EOF
echo $ac_n "checking for sqltypes.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75632: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75683: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/sqltypes.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75642,7 +75693,7 @@ EOF
echo $ac_n "checking for sqlucode.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75646: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75697: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/sqlucode.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75656,7 +75707,7 @@ EOF
echo $ac_n "checking for sql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75660: checking for sql.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75711: checking for sql.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/sql.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75670,7 +75721,7 @@ EOF
echo $ac_n "checking for isql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75674: checking for isql.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75725: checking for isql.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/isql.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75684,7 +75735,7 @@ EOF
echo $ac_n "checking for sqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75688: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75739: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/sqlext.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75698,7 +75749,7 @@ EOF
echo $ac_n "checking for isqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75702: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75753: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/isqlext.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75712,7 +75763,7 @@ EOF
echo $ac_n "checking for udbcext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75716: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75767: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/udbcext.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75726,7 +75777,7 @@ EOF
echo $ac_n "checking for sqlcli1.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75730: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75781: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/sqlcli1.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75740,7 +75791,7 @@ EOF
echo $ac_n "checking for LibraryManager.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75744: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75795: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/LibraryManager.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75754,7 +75805,7 @@ EOF
echo $ac_n "checking for cli0core.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75758: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75809: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/cli0core.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75768,7 +75819,7 @@ EOF
echo $ac_n "checking for cli0ext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75772: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75823: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/cli0ext.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75782,7 +75833,7 @@ EOF
echo $ac_n "checking for cli0cli.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75786: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75837: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/cli0cli.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75796,7 +75847,7 @@ EOF
echo $ac_n "checking for cli0defs.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75800: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75851: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/cli0defs.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -75810,7 +75861,7 @@ EOF
echo $ac_n "checking for cli0env.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
-echo "configure:75814: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5
+echo "configure:75865: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5
if test -f "$PDO_ODBC_INCDIR/cli0env.h"; then
php_pdo_have_header=yes
cat >> confdefs.h <<\EOF
@@ -76016,7 +76067,7 @@ EOF
done
echo $ac_n "checking for SQLBindCol in -l$pdo_odbc_def_lib""... $ac_c" 1>&6
-echo "configure:76020: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5
+echo "configure:76071: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5
ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLBindCol | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76024,7 +76075,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$pdo_odbc_def_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76028 "configure"
+#line 76079 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76035,7 +76086,7 @@ int main() {
SQLBindCol()
; return 0; }
EOF
-if { (eval echo configure:76039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -76150,7 +76201,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
done
echo $ac_n "checking for SQLAllocHandle in -l$pdo_odbc_def_lib""... $ac_c" 1>&6
-echo "configure:76154: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5
+echo "configure:76205: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5
ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLAllocHandle | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76158,7 +76209,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$pdo_odbc_def_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76162 "configure"
+#line 76213 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76169,7 +76220,7 @@ int main() {
SQLAllocHandle()
; return 0; }
EOF
-if { (eval echo configure:76173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -76536,7 +76587,7 @@ if test "$PHP_PDO" != "no"; then
php_with_pdo_pgsql=no
echo $ac_n "checking for PostgreSQL support for PDO""... $ac_c" 1>&6
-echo "configure:76540: checking for PostgreSQL support for PDO" >&5
+echo "configure:76591: checking for PostgreSQL support for PDO" >&5
# Check whether --with-pdo-pgsql or --without-pdo-pgsql was given.
if test "${with_pdo_pgsql+set}" = set; then
withval="$with_pdo_pgsql"
@@ -76593,7 +76644,7 @@ if test "$PHP_PDO_PGSQL" != "no"; then
echo $ac_n "checking for pg_config""... $ac_c" 1>&6
-echo "configure:76597: checking for pg_config" >&5
+echo "configure:76648: checking for pg_config" >&5
for i in $PHP_PDO_PGSQL $PHP_PDO_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
if test -x $i/pg_config; then
PG_CONFIG="$i/pg_config"
@@ -76657,13 +76708,13 @@ EOF
echo $ac_n "checking for openssl dependencies""... $ac_c" 1>&6
-echo "configure:76661: checking for openssl dependencies" >&5
+echo "configure:76712: checking for openssl dependencies" >&5
if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then
echo "$ac_t""yes" 1>&6
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:76667: checking for $ac_word" >&5
+echo "configure:76718: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -76707,7 +76758,7 @@ fi
old_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR"
echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6
-echo "configure:76711: checking for PQescapeString in -lpq" >&5
+echo "configure:76762: checking for PQescapeString in -lpq" >&5
ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76715,7 +76766,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76719 "configure"
+#line 76770 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76726,7 +76777,7 @@ int main() {
PQescapeString()
; return 0; }
EOF
-if { (eval echo configure:76730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -76750,7 +76801,7 @@ else
fi
echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6
-echo "configure:76754: checking for PQescapeStringConn in -lpq" >&5
+echo "configure:76805: checking for PQescapeStringConn in -lpq" >&5
ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76758,7 +76809,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76762 "configure"
+#line 76813 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76769,7 +76820,7 @@ int main() {
PQescapeStringConn()
; return 0; }
EOF
-if { (eval echo configure:76773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -76793,7 +76844,7 @@ else
fi
echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6
-echo "configure:76797: checking for PQescapeByteaConn in -lpq" >&5
+echo "configure:76848: checking for PQescapeByteaConn in -lpq" >&5
ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76801,7 +76852,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76805 "configure"
+#line 76856 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76812,7 +76863,7 @@ int main() {
PQescapeByteaConn()
; return 0; }
EOF
-if { (eval echo configure:76816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -76836,7 +76887,7 @@ else
fi
echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6
-echo "configure:76840: checking for PQsetnonblocking in -lpq" >&5
+echo "configure:76891: checking for PQsetnonblocking in -lpq" >&5
ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76844,7 +76895,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76848 "configure"
+#line 76899 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76855,7 +76906,7 @@ int main() {
PQsetnonblocking()
; return 0; }
EOF
-if { (eval echo configure:76859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -76879,7 +76930,7 @@ else
fi
echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
-echo "configure:76883: checking for PQcmdTuples in -lpq" >&5
+echo "configure:76934: checking for PQcmdTuples in -lpq" >&5
ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76887,7 +76938,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76891 "configure"
+#line 76942 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76898,7 +76949,7 @@ int main() {
PQcmdTuples()
; return 0; }
EOF
-if { (eval echo configure:76902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -76922,7 +76973,7 @@ else
fi
echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6
-echo "configure:76926: checking for PQoidValue in -lpq" >&5
+echo "configure:76977: checking for PQoidValue in -lpq" >&5
ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76930,7 +76981,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76934 "configure"
+#line 76985 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76941,7 +76992,7 @@ int main() {
PQoidValue()
; return 0; }
EOF
-if { (eval echo configure:76945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:76996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -76965,7 +77016,7 @@ else
fi
echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6
-echo "configure:76969: checking for PQclientEncoding in -lpq" >&5
+echo "configure:77020: checking for PQclientEncoding in -lpq" >&5
ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -76973,7 +77024,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 76977 "configure"
+#line 77028 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -76984,7 +77035,7 @@ int main() {
PQclientEncoding()
; return 0; }
EOF
-if { (eval echo configure:76988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77008,7 +77059,7 @@ else
fi
echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6
-echo "configure:77012: checking for PQparameterStatus in -lpq" >&5
+echo "configure:77063: checking for PQparameterStatus in -lpq" >&5
ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -77016,7 +77067,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 77020 "configure"
+#line 77071 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -77027,7 +77078,7 @@ int main() {
PQparameterStatus()
; return 0; }
EOF
-if { (eval echo configure:77031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77051,7 +77102,7 @@ else
fi
echo $ac_n "checking for PQprotocolVersion in -lpq""... $ac_c" 1>&6
-echo "configure:77055: checking for PQprotocolVersion in -lpq" >&5
+echo "configure:77106: checking for PQprotocolVersion in -lpq" >&5
ac_lib_var=`echo pq'_'PQprotocolVersion | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -77059,7 +77110,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 77063 "configure"
+#line 77114 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -77070,7 +77121,7 @@ int main() {
PQprotocolVersion()
; return 0; }
EOF
-if { (eval echo configure:77074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77094,7 +77145,7 @@ else
fi
echo $ac_n "checking for PQtransactionStatus in -lpq""... $ac_c" 1>&6
-echo "configure:77098: checking for PQtransactionStatus in -lpq" >&5
+echo "configure:77149: checking for PQtransactionStatus in -lpq" >&5
ac_lib_var=`echo pq'_'PQtransactionStatus | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -77102,7 +77153,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 77106 "configure"
+#line 77157 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -77113,7 +77164,7 @@ int main() {
PQtransactionStatus()
; return 0; }
EOF
-if { (eval echo configure:77117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77137,7 +77188,7 @@ else
fi
echo $ac_n "checking for PQunescapeBytea in -lpq""... $ac_c" 1>&6
-echo "configure:77141: checking for PQunescapeBytea in -lpq" >&5
+echo "configure:77192: checking for PQunescapeBytea in -lpq" >&5
ac_lib_var=`echo pq'_'PQunescapeBytea | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -77145,7 +77196,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 77149 "configure"
+#line 77200 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -77156,7 +77207,7 @@ int main() {
PQunescapeBytea()
; return 0; }
EOF
-if { (eval echo configure:77160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77180,7 +77231,7 @@ else
fi
echo $ac_n "checking for PQExecParams in -lpq""... $ac_c" 1>&6
-echo "configure:77184: checking for PQExecParams in -lpq" >&5
+echo "configure:77235: checking for PQExecParams in -lpq" >&5
ac_lib_var=`echo pq'_'PQExecParams | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -77188,7 +77239,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 77192 "configure"
+#line 77243 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -77199,7 +77250,7 @@ int main() {
PQExecParams()
; return 0; }
EOF
-if { (eval echo configure:77203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77223,7 +77274,7 @@ else
fi
echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6
-echo "configure:77227: checking for PQresultErrorField in -lpq" >&5
+echo "configure:77278: checking for PQresultErrorField in -lpq" >&5
ac_lib_var=`echo pq'_'PQresultErrorField | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -77231,7 +77282,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 77235 "configure"
+#line 77286 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -77242,7 +77293,7 @@ int main() {
PQresultErrorField()
; return 0; }
EOF
-if { (eval echo configure:77246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77266,7 +77317,7 @@ else
fi
echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6
-echo "configure:77270: checking for pg_encoding_to_char in -lpq" >&5
+echo "configure:77321: checking for pg_encoding_to_char in -lpq" >&5
ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -77274,7 +77325,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 77278 "configure"
+#line 77329 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -77285,7 +77336,7 @@ int main() {
pg_encoding_to_char()
; return 0; }
EOF
-if { (eval echo configure:77289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77310,7 +77361,7 @@ fi
echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6
-echo "configure:77314: checking for PQprepare in -lpq" >&5
+echo "configure:77365: checking for PQprepare in -lpq" >&5
ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -77318,7 +77369,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 77322 "configure"
+#line 77373 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -77329,7 +77380,7 @@ int main() {
PQprepare()
; return 0; }
EOF
-if { (eval echo configure:77333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:77384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -77492,13 +77543,13 @@ fi
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:77496: checking for PDO includes" >&5
+echo "configure:77547: checking for PDO includes" >&5
if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:77502: checking for PDO includes" >&5
+echo "configure:77553: checking for PDO includes" >&5
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -77831,7 +77882,7 @@ if test "$PHP_PDO" != "no"; then
php_with_pdo_sqlite=yes
echo $ac_n "checking for sqlite 3 support for PDO""... $ac_c" 1>&6
-echo "configure:77835: checking for sqlite 3 support for PDO" >&5
+echo "configure:77886: checking for sqlite 3 support for PDO" >&5
# Check whether --with-pdo-sqlite or --without-pdo-sqlite was given.
if test "${with_pdo_sqlite+set}" = set; then
withval="$with_pdo_sqlite"
@@ -77879,13 +77930,13 @@ if test "$PHP_PDO_SQLITE" != "no"; then
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:77883: checking for PDO includes" >&5
+echo "configure:77934: checking for PDO includes" >&5
if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:77889: checking for PDO includes" >&5
+echo "configure:77940: checking for PDO includes" >&5
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -77914,7 +77965,7 @@ echo "$ac_t""$pdo_inc_path" 1>&6
PDO_SQLITE_DIR=$PHP_PDO_SQLITE
else # search default path list
echo $ac_n "checking for sqlite3 files in default path""... $ac_c" 1>&6
-echo "configure:77918: checking for sqlite3 files in default path" >&5
+echo "configure:77969: checking for sqlite3 files in default path" >&5
for i in $SEARCH_PATH ; do
if test -r $i/$SEARCH_FOR; then
PDO_SQLITE_DIR=$i
@@ -78060,7 +78111,7 @@ echo "configure:77918: checking for sqlite3 files in default path" >&5
done
echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6
-echo "configure:78064: checking for $LIBSYMBOL in -l$LIBNAME" >&5
+echo "configure:78115: checking for $LIBSYMBOL in -l$LIBNAME" >&5
ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -78068,7 +78119,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 78072 "configure"
+#line 78123 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -78079,7 +78130,7 @@ int main() {
$LIBSYMBOL()
; return 0; }
EOF
-if { (eval echo configure:78083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:78134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -78309,7 +78360,7 @@ fi
done
echo $ac_n "checking for sqlite3_key in -lsqlite3""... $ac_c" 1>&6
-echo "configure:78313: checking for sqlite3_key in -lsqlite3" >&5
+echo "configure:78364: checking for sqlite3_key in -lsqlite3" >&5
ac_lib_var=`echo sqlite3'_'sqlite3_key | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -78317,7 +78368,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsqlite3 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 78321 "configure"
+#line 78372 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -78328,7 +78379,7 @@ int main() {
sqlite3_key()
; return 0; }
EOF
-if { (eval echo configure:78332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:78383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -78959,7 +79010,7 @@ EOF
echo $ac_n "checking size of char *""... $ac_c" 1>&6
-echo "configure:78963: checking size of char *" >&5
+echo "configure:79014: checking size of char *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -78967,7 +79018,7 @@ else
ac_cv_sizeof_char_p=4
else
cat > conftest.$ac_ext <<EOF
-#line 78971 "configure"
+#line 79022 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -78978,7 +79029,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:78982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:79033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_char_p=`cat conftestval`
else
@@ -79025,12 +79076,12 @@ EOF
for ac_func in usleep nanosleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:79029: checking for $ac_func" >&5
+echo "configure:79080: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 79034 "configure"
+#line 79085 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -79053,7 +79104,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:79057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -79081,17 +79132,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:79085: checking for $ac_hdr" >&5
+echo "configure:79136: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 79090 "configure"
+#line 79141 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:79095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:79146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -79215,7 +79266,7 @@ done
done
echo $ac_n "checking for fdatasync in -lrt""... $ac_c" 1>&6
-echo "configure:79219: checking for fdatasync in -lrt" >&5
+echo "configure:79270: checking for fdatasync in -lrt" >&5
ac_lib_var=`echo rt'_'fdatasync | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79223,7 +79274,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79227 "configure"
+#line 79278 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79234,7 +79285,7 @@ int main() {
fdatasync()
; return 0; }
EOF
-if { (eval echo configure:79238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79317,7 +79368,7 @@ fi
php_with_pgsql=no
echo $ac_n "checking for PostgreSQL support""... $ac_c" 1>&6
-echo "configure:79321: checking for PostgreSQL support" >&5
+echo "configure:79372: checking for PostgreSQL support" >&5
# Check whether --with-pgsql or --without-pgsql was given.
if test "${with_pgsql+set}" = set; then
withval="$with_pgsql"
@@ -79374,7 +79425,7 @@ if test "$PHP_PGSQL" != "no"; then
echo $ac_n "checking for pg_config""... $ac_c" 1>&6
-echo "configure:79378: checking for pg_config" >&5
+echo "configure:79429: checking for pg_config" >&5
for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
if test -x $i/pg_config; then
PG_CONFIG="$i/pg_config"
@@ -79442,7 +79493,7 @@ EOF
old_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR"
echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6
-echo "configure:79446: checking for PQescapeString in -lpq" >&5
+echo "configure:79497: checking for PQescapeString in -lpq" >&5
ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79450,7 +79501,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79454 "configure"
+#line 79505 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79461,7 +79512,7 @@ int main() {
PQescapeString()
; return 0; }
EOF
-if { (eval echo configure:79465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79485,7 +79536,7 @@ else
fi
echo $ac_n "checking for PQunescapeBytea in -lpq""... $ac_c" 1>&6
-echo "configure:79489: checking for PQunescapeBytea in -lpq" >&5
+echo "configure:79540: checking for PQunescapeBytea in -lpq" >&5
ac_lib_var=`echo pq'_'PQunescapeBytea | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79493,7 +79544,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79497 "configure"
+#line 79548 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79504,7 +79555,7 @@ int main() {
PQunescapeBytea()
; return 0; }
EOF
-if { (eval echo configure:79508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79528,7 +79579,7 @@ else
fi
echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6
-echo "configure:79532: checking for PQsetnonblocking in -lpq" >&5
+echo "configure:79583: checking for PQsetnonblocking in -lpq" >&5
ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79536,7 +79587,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79540 "configure"
+#line 79591 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79547,7 +79598,7 @@ int main() {
PQsetnonblocking()
; return 0; }
EOF
-if { (eval echo configure:79551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79571,7 +79622,7 @@ else
fi
echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
-echo "configure:79575: checking for PQcmdTuples in -lpq" >&5
+echo "configure:79626: checking for PQcmdTuples in -lpq" >&5
ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79579,7 +79630,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79583 "configure"
+#line 79634 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79590,7 +79641,7 @@ int main() {
PQcmdTuples()
; return 0; }
EOF
-if { (eval echo configure:79594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79614,7 +79665,7 @@ else
fi
echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6
-echo "configure:79618: checking for PQoidValue in -lpq" >&5
+echo "configure:79669: checking for PQoidValue in -lpq" >&5
ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79622,7 +79673,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79626 "configure"
+#line 79677 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79633,7 +79684,7 @@ int main() {
PQoidValue()
; return 0; }
EOF
-if { (eval echo configure:79637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79657,7 +79708,7 @@ else
fi
echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6
-echo "configure:79661: checking for PQclientEncoding in -lpq" >&5
+echo "configure:79712: checking for PQclientEncoding in -lpq" >&5
ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79665,7 +79716,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79669 "configure"
+#line 79720 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79676,7 +79727,7 @@ int main() {
PQclientEncoding()
; return 0; }
EOF
-if { (eval echo configure:79680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79700,7 +79751,7 @@ else
fi
echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6
-echo "configure:79704: checking for PQparameterStatus in -lpq" >&5
+echo "configure:79755: checking for PQparameterStatus in -lpq" >&5
ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79708,7 +79759,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79712 "configure"
+#line 79763 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79719,7 +79770,7 @@ int main() {
PQparameterStatus()
; return 0; }
EOF
-if { (eval echo configure:79723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79743,7 +79794,7 @@ else
fi
echo $ac_n "checking for PQprotocolVersion in -lpq""... $ac_c" 1>&6
-echo "configure:79747: checking for PQprotocolVersion in -lpq" >&5
+echo "configure:79798: checking for PQprotocolVersion in -lpq" >&5
ac_lib_var=`echo pq'_'PQprotocolVersion | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79751,7 +79802,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79755 "configure"
+#line 79806 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79762,7 +79813,7 @@ int main() {
PQprotocolVersion()
; return 0; }
EOF
-if { (eval echo configure:79766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79786,7 +79837,7 @@ else
fi
echo $ac_n "checking for PQtransactionStatus in -lpq""... $ac_c" 1>&6
-echo "configure:79790: checking for PQtransactionStatus in -lpq" >&5
+echo "configure:79841: checking for PQtransactionStatus in -lpq" >&5
ac_lib_var=`echo pq'_'PQtransactionStatus | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79794,7 +79845,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79798 "configure"
+#line 79849 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79805,7 +79856,7 @@ int main() {
PQtransactionStatus()
; return 0; }
EOF
-if { (eval echo configure:79809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79829,7 +79880,7 @@ else
fi
echo $ac_n "checking for PQexecParams in -lpq""... $ac_c" 1>&6
-echo "configure:79833: checking for PQexecParams in -lpq" >&5
+echo "configure:79884: checking for PQexecParams in -lpq" >&5
ac_lib_var=`echo pq'_'PQexecParams | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79837,7 +79888,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79841 "configure"
+#line 79892 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79848,7 +79899,7 @@ int main() {
PQexecParams()
; return 0; }
EOF
-if { (eval echo configure:79852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79872,7 +79923,7 @@ else
fi
echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6
-echo "configure:79876: checking for PQprepare in -lpq" >&5
+echo "configure:79927: checking for PQprepare in -lpq" >&5
ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79880,7 +79931,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79884 "configure"
+#line 79935 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79891,7 +79942,7 @@ int main() {
PQprepare()
; return 0; }
EOF
-if { (eval echo configure:79895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79915,7 +79966,7 @@ else
fi
echo $ac_n "checking for PQexecPrepared in -lpq""... $ac_c" 1>&6
-echo "configure:79919: checking for PQexecPrepared in -lpq" >&5
+echo "configure:79970: checking for PQexecPrepared in -lpq" >&5
ac_lib_var=`echo pq'_'PQexecPrepared | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79923,7 +79974,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79927 "configure"
+#line 79978 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79934,7 +79985,7 @@ int main() {
PQexecPrepared()
; return 0; }
EOF
-if { (eval echo configure:79938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:79989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -79958,7 +80009,7 @@ else
fi
echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6
-echo "configure:79962: checking for PQresultErrorField in -lpq" >&5
+echo "configure:80013: checking for PQresultErrorField in -lpq" >&5
ac_lib_var=`echo pq'_'PQresultErrorField | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -79966,7 +80017,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 79970 "configure"
+#line 80021 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -79977,7 +80028,7 @@ int main() {
PQresultErrorField()
; return 0; }
EOF
-if { (eval echo configure:79981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80001,7 +80052,7 @@ else
fi
echo $ac_n "checking for PQsendQueryParams in -lpq""... $ac_c" 1>&6
-echo "configure:80005: checking for PQsendQueryParams in -lpq" >&5
+echo "configure:80056: checking for PQsendQueryParams in -lpq" >&5
ac_lib_var=`echo pq'_'PQsendQueryParams | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80009,7 +80060,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80013 "configure"
+#line 80064 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80020,7 +80071,7 @@ int main() {
PQsendQueryParams()
; return 0; }
EOF
-if { (eval echo configure:80024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80044,7 +80095,7 @@ else
fi
echo $ac_n "checking for PQsendPrepare in -lpq""... $ac_c" 1>&6
-echo "configure:80048: checking for PQsendPrepare in -lpq" >&5
+echo "configure:80099: checking for PQsendPrepare in -lpq" >&5
ac_lib_var=`echo pq'_'PQsendPrepare | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80052,7 +80103,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80056 "configure"
+#line 80107 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80063,7 +80114,7 @@ int main() {
PQsendPrepare()
; return 0; }
EOF
-if { (eval echo configure:80067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80087,7 +80138,7 @@ else
fi
echo $ac_n "checking for PQsendQueryPrepared in -lpq""... $ac_c" 1>&6
-echo "configure:80091: checking for PQsendQueryPrepared in -lpq" >&5
+echo "configure:80142: checking for PQsendQueryPrepared in -lpq" >&5
ac_lib_var=`echo pq'_'PQsendQueryPrepared | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80095,7 +80146,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80099 "configure"
+#line 80150 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80106,7 +80157,7 @@ int main() {
PQsendQueryPrepared()
; return 0; }
EOF
-if { (eval echo configure:80110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80130,7 +80181,7 @@ else
fi
echo $ac_n "checking for PQputCopyData in -lpq""... $ac_c" 1>&6
-echo "configure:80134: checking for PQputCopyData in -lpq" >&5
+echo "configure:80185: checking for PQputCopyData in -lpq" >&5
ac_lib_var=`echo pq'_'PQputCopyData | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80138,7 +80189,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80142 "configure"
+#line 80193 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80149,7 +80200,7 @@ int main() {
PQputCopyData()
; return 0; }
EOF
-if { (eval echo configure:80153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80173,7 +80224,7 @@ else
fi
echo $ac_n "checking for PQputCopyEnd in -lpq""... $ac_c" 1>&6
-echo "configure:80177: checking for PQputCopyEnd in -lpq" >&5
+echo "configure:80228: checking for PQputCopyEnd in -lpq" >&5
ac_lib_var=`echo pq'_'PQputCopyEnd | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80181,7 +80232,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80185 "configure"
+#line 80236 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80192,7 +80243,7 @@ int main() {
PQputCopyEnd()
; return 0; }
EOF
-if { (eval echo configure:80196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80216,7 +80267,7 @@ else
fi
echo $ac_n "checking for PQgetCopyData in -lpq""... $ac_c" 1>&6
-echo "configure:80220: checking for PQgetCopyData in -lpq" >&5
+echo "configure:80271: checking for PQgetCopyData in -lpq" >&5
ac_lib_var=`echo pq'_'PQgetCopyData | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80224,7 +80275,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80228 "configure"
+#line 80279 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80235,7 +80286,7 @@ int main() {
PQgetCopyData()
; return 0; }
EOF
-if { (eval echo configure:80239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80259,7 +80310,7 @@ else
fi
echo $ac_n "checking for PQfreemem in -lpq""... $ac_c" 1>&6
-echo "configure:80263: checking for PQfreemem in -lpq" >&5
+echo "configure:80314: checking for PQfreemem in -lpq" >&5
ac_lib_var=`echo pq'_'PQfreemem | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80267,7 +80318,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80271 "configure"
+#line 80322 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80278,7 +80329,7 @@ int main() {
PQfreemem()
; return 0; }
EOF
-if { (eval echo configure:80282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80302,7 +80353,7 @@ else
fi
echo $ac_n "checking for PQsetErrorVerbosity in -lpq""... $ac_c" 1>&6
-echo "configure:80306: checking for PQsetErrorVerbosity in -lpq" >&5
+echo "configure:80357: checking for PQsetErrorVerbosity in -lpq" >&5
ac_lib_var=`echo pq'_'PQsetErrorVerbosity | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80310,7 +80361,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80314 "configure"
+#line 80365 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80321,7 +80372,7 @@ int main() {
PQsetErrorVerbosity()
; return 0; }
EOF
-if { (eval echo configure:80325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80345,7 +80396,7 @@ else
fi
echo $ac_n "checking for PQftable in -lpq""... $ac_c" 1>&6
-echo "configure:80349: checking for PQftable in -lpq" >&5
+echo "configure:80400: checking for PQftable in -lpq" >&5
ac_lib_var=`echo pq'_'PQftable | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80353,7 +80404,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80357 "configure"
+#line 80408 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80364,7 +80415,7 @@ int main() {
PQftable()
; return 0; }
EOF
-if { (eval echo configure:80368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80388,7 +80439,7 @@ else
fi
echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6
-echo "configure:80392: checking for PQescapeStringConn in -lpq" >&5
+echo "configure:80443: checking for PQescapeStringConn in -lpq" >&5
ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80396,7 +80447,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80400 "configure"
+#line 80451 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80407,7 +80458,7 @@ int main() {
PQescapeStringConn()
; return 0; }
EOF
-if { (eval echo configure:80411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80431,7 +80482,7 @@ else
fi
echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6
-echo "configure:80435: checking for PQescapeByteaConn in -lpq" >&5
+echo "configure:80486: checking for PQescapeByteaConn in -lpq" >&5
ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80439,7 +80490,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80443 "configure"
+#line 80494 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80450,7 +80501,7 @@ int main() {
PQescapeByteaConn()
; return 0; }
EOF
-if { (eval echo configure:80454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80474,7 +80525,7 @@ else
fi
echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6
-echo "configure:80478: checking for pg_encoding_to_char in -lpq" >&5
+echo "configure:80529: checking for pg_encoding_to_char in -lpq" >&5
ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -80482,7 +80533,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 80486 "configure"
+#line 80537 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -80493,7 +80544,7 @@ int main() {
pg_encoding_to_char()
; return 0; }
EOF
-if { (eval echo configure:80497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:80548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -80942,7 +80993,7 @@ fi
php_enable_posix=yes
echo $ac_n "checking whether to enable POSIX-like functions""... $ac_c" 1>&6
-echo "configure:80946: checking whether to enable POSIX-like functions" >&5
+echo "configure:80997: checking whether to enable POSIX-like functions" >&5
# Check whether --enable-posix or --disable-posix was given.
if test "${enable_posix+set}" = set; then
enableval="$enable_posix"
@@ -81276,17 +81327,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:81280: checking for $ac_hdr" >&5
+echo "configure:81331: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 81285 "configure"
+#line 81336 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:81290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:81341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -81316,12 +81367,12 @@ done
for ac_func in seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:81320: checking for $ac_func" >&5
+echo "configure:81371: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 81325 "configure"
+#line 81376 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -81344,7 +81395,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:81348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:81399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -81370,14 +81421,14 @@ done
echo $ac_n "checking for working ttyname_r() implementation""... $ac_c" 1>&6
-echo "configure:81374: checking for working ttyname_r() implementation" >&5
+echo "configure:81425: checking for working ttyname_r() implementation" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 81381 "configure"
+#line 81432 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -81390,7 +81441,7 @@ int main(int argc, char *argv[])
}
EOF
-if { (eval echo configure:81394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:81445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
@@ -81417,7 +81468,7 @@ fi
php_with_pspell=no
echo $ac_n "checking for PSPELL support""... $ac_c" 1>&6
-echo "configure:81421: checking for PSPELL support" >&5
+echo "configure:81472: checking for PSPELL support" >&5
# Check whether --with-pspell or --without-pspell was given.
if test "${with_pspell+set}" = set; then
withval="$with_pspell"
@@ -81959,7 +82010,7 @@ EOF
done
echo $ac_n "checking for new_aspell_config in -laspell""... $ac_c" 1>&6
-echo "configure:81963: checking for new_aspell_config in -laspell" >&5
+echo "configure:82014: checking for new_aspell_config in -laspell" >&5
ac_lib_var=`echo aspell'_'new_aspell_config | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -81967,7 +82018,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-laspell $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 81971 "configure"
+#line 82022 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -81978,7 +82029,7 @@ int main() {
new_aspell_config()
; return 0; }
EOF
-if { (eval echo configure:81982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:82033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -82152,7 +82203,7 @@ fi
php_with_libedit=no
echo $ac_n "checking for libedit readline replacement""... $ac_c" 1>&6
-echo "configure:82156: checking for libedit readline replacement" >&5
+echo "configure:82207: checking for libedit readline replacement" >&5
# Check whether --with-libedit or --without-libedit was given.
if test "${with_libedit+set}" = set; then
withval="$with_libedit"
@@ -82200,7 +82251,7 @@ if test "$PHP_LIBEDIT" = "no"; then
php_with_readline=no
echo $ac_n "checking for readline support""... $ac_c" 1>&6
-echo "configure:82204: checking for readline support" >&5
+echo "configure:82255: checking for readline support" >&5
# Check whether --with-readline or --without-readline was given.
if test "${with_readline+set}" = set; then
withval="$with_readline"
@@ -82287,7 +82338,7 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
PHP_READLINE_LIBS=""
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:82291: checking for tgetent in -lncurses" >&5
+echo "configure:82342: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -82295,7 +82346,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 82299 "configure"
+#line 82350 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -82306,7 +82357,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:82310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:82361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -82351,7 +82402,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:82355: checking for tgetent in -ltermcap" >&5
+echo "configure:82406: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -82359,7 +82410,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 82363 "configure"
+#line 82414 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -82370,7 +82421,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:82374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:82425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -82517,7 +82568,7 @@ fi
done
echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:82521: checking for readline in -lreadline" >&5
+echo "configure:82572: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -82525,7 +82576,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 82529 "configure"
+#line 82580 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -82536,7 +82587,7 @@ int main() {
readline()
; return 0; }
EOF
-if { (eval echo configure:82540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:82591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -82765,7 +82816,7 @@ fi
done
echo $ac_n "checking for rl_callback_read_char in -lreadline""... $ac_c" 1>&6
-echo "configure:82769: checking for rl_callback_read_char in -lreadline" >&5
+echo "configure:82820: checking for rl_callback_read_char in -lreadline" >&5
ac_lib_var=`echo readline'_'rl_callback_read_char | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -82773,7 +82824,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 82777 "configure"
+#line 82828 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -82784,7 +82835,7 @@ int main() {
rl_callback_read_char()
; return 0; }
EOF
-if { (eval echo configure:82788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:82839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -82918,7 +82969,7 @@ fi
done
echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
-echo "configure:82922: checking for add_history in -lhistory" >&5
+echo "configure:82973: checking for add_history in -lhistory" >&5
ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -82926,7 +82977,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lhistory $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 82930 "configure"
+#line 82981 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -82937,7 +82988,7 @@ int main() {
add_history()
; return 0; }
EOF
-if { (eval echo configure:82941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:82992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -83116,7 +83167,7 @@ elif test "$PHP_LIBEDIT" != "no"; then
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:83120: checking for tgetent in -lncurses" >&5
+echo "configure:83171: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -83124,7 +83175,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 83128 "configure"
+#line 83179 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -83135,7 +83186,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:83139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:83190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -83179,7 +83230,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:83183: checking for tgetent in -ltermcap" >&5
+echo "configure:83234: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -83187,7 +83238,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 83191 "configure"
+#line 83242 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -83198,7 +83249,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:83202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:83253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -83344,7 +83395,7 @@ fi
done
echo $ac_n "checking for readline in -ledit""... $ac_c" 1>&6
-echo "configure:83348: checking for readline in -ledit" >&5
+echo "configure:83399: checking for readline in -ledit" >&5
ac_lib_var=`echo edit'_'readline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -83352,7 +83403,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ledit $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 83356 "configure"
+#line 83407 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -83363,7 +83414,7 @@ int main() {
readline()
; return 0; }
EOF
-if { (eval echo configure:83367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:83418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -83504,12 +83555,12 @@ if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then
for ac_func in rl_completion_matches
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:83508: checking for $ac_func" >&5
+echo "configure:83559: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 83513 "configure"
+#line 83564 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -83532,7 +83583,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:83536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:83587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -83847,7 +83898,7 @@ fi
php_with_recode=no
echo $ac_n "checking for recode support""... $ac_c" 1>&6
-echo "configure:83851: checking for recode support" >&5
+echo "configure:83902: checking for recode support" >&5
# Check whether --with-recode or --without-recode was given.
if test "${with_recode+set}" = set; then
withval="$with_recode"
@@ -84014,7 +84065,7 @@ if test "$PHP_RECODE" != "no"; then
done
echo $ac_n "checking for recode_format_table in -lrecode""... $ac_c" 1>&6
-echo "configure:84018: checking for recode_format_table in -lrecode" >&5
+echo "configure:84069: checking for recode_format_table in -lrecode" >&5
ac_lib_var=`echo recode'_'recode_format_table | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -84022,7 +84073,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lrecode $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 84026 "configure"
+#line 84077 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -84033,7 +84084,7 @@ int main() {
recode_format_table()
; return 0; }
EOF
-if { (eval echo configure:84037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:84088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -84163,7 +84214,7 @@ else
LDFLAGS="$LDFLAGS -L$RECODE_DIR/$RECODE_LIB"
LIBS="$LIBS -lrecode"
cat > conftest.$ac_ext <<EOF
-#line 84167 "configure"
+#line 84218 "configure"
#include "confdefs.h"
char *program_name;
@@ -84174,7 +84225,7 @@ recode_format_table();
; return 0; }
EOF
-if { (eval echo configure:84178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:84229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
@@ -84337,17 +84388,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:84341: checking for $ac_hdr" >&5
+echo "configure:84392: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 84346 "configure"
+#line 84397 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:84351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:84402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -84661,7 +84712,7 @@ fi
php_enable_reflection=yes
echo $ac_n "checking whether to enable reflection support""... $ac_c" 1>&6
-echo "configure:84665: checking whether to enable reflection support" >&5
+echo "configure:84716: checking whether to enable reflection support" >&5
# Check whether --enable-reflection or --disable-reflection was given.
if test "${enable_reflection+set}" = set; then
enableval="$enable_reflection"
@@ -84976,7 +85027,7 @@ fi
php_enable_session=yes
echo $ac_n "checking whether to enable PHP sessions""... $ac_c" 1>&6
-echo "configure:84980: checking whether to enable PHP sessions" >&5
+echo "configure:85031: checking whether to enable PHP sessions" >&5
# Check whether --enable-session or --disable-session was given.
if test "${enable_session+set}" = set; then
enableval="$enable_session"
@@ -85023,7 +85074,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_mm=no
echo $ac_n "checking for mm support""... $ac_c" 1>&6
-echo "configure:85027: checking for mm support" >&5
+echo "configure:85078: checking for mm support" >&5
# Check whether --with-mm or --without-mm was given.
if test "${with_mm+set}" = set; then
withval="$with_mm"
@@ -85048,7 +85099,7 @@ echo "$ac_t""$ext_output" 1>&6
if test "$PHP_SESSION" != "no"; then
echo $ac_n "checking whether pwrite works""... $ac_c" 1>&6
-echo "configure:85052: checking whether pwrite works" >&5
+echo "configure:85103: checking whether pwrite works" >&5
if eval "test \"`echo '$''{'ac_cv_pwrite'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -85060,7 +85111,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 85064 "configure"
+#line 85115 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -85081,7 +85132,7 @@ else
EOF
-if { (eval echo configure:85085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:85136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_pwrite=yes
@@ -85106,7 +85157,7 @@ fi
else
cat > conftest.$ac_ext <<EOF
-#line 85110 "configure"
+#line 85161 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -85127,7 +85178,7 @@ ssize_t pwrite(int, void *, size_t, off64_t);
EOF
-if { (eval echo configure:85131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:85182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_pwrite=yes
@@ -85168,7 +85219,7 @@ EOF
echo $ac_n "checking whether pread works""... $ac_c" 1>&6
-echo "configure:85172: checking whether pread works" >&5
+echo "configure:85223: checking whether pread works" >&5
if eval "test \"`echo '$''{'ac_cv_pread'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -85181,7 +85232,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 85185 "configure"
+#line 85236 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -85201,7 +85252,7 @@ else
}
EOF
-if { (eval echo configure:85205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:85256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_pread=yes
@@ -85228,7 +85279,7 @@ fi
else
cat > conftest.$ac_ext <<EOF
-#line 85232 "configure"
+#line 85283 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -85248,7 +85299,7 @@ ssize_t pread(int, void *, size_t, off64_t);
}
EOF
-if { (eval echo configure:85252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:85303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_pread=yes
@@ -85763,7 +85814,7 @@ fi
php_enable_shmop=no
echo $ac_n "checking whether to enable shmop support""... $ac_c" 1>&6
-echo "configure:85767: checking whether to enable shmop support" >&5
+echo "configure:85818: checking whether to enable shmop support" >&5
# Check whether --enable-shmop or --disable-shmop was given.
if test "${enable_shmop+set}" = set; then
enableval="$enable_shmop"
@@ -86099,7 +86150,7 @@ fi
php_enable_simplexml=yes
echo $ac_n "checking whether to enable SimpleXML support""... $ac_c" 1>&6
-echo "configure:86103: checking whether to enable SimpleXML support" >&5
+echo "configure:86154: checking whether to enable SimpleXML support" >&5
# Check whether --enable-simplexml or --disable-simplexml was given.
if test "${enable_simplexml+set}" = set; then
enableval="$enable_simplexml"
@@ -86147,7 +86198,7 @@ if test -z "$PHP_LIBXML_DIR"; then
php_with_libxml_dir=no
echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:86151: checking libxml2 install dir" >&5
+echo "configure:86202: checking libxml2 install dir" >&5
# Check whether --with-libxml-dir or --without-libxml-dir was given.
if test "${with_libxml_dir+set}" = set; then
withval="$with_libxml_dir"
@@ -86178,7 +86229,7 @@ if test "$PHP_SIMPLEXML" != "no"; then
echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:86182: checking for xml2-config path" >&5
+echo "configure:86233: checking for xml2-config path" >&5
if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -86336,7 +86387,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:86340: checking whether libxml build works" >&5
+echo "configure:86391: checking whether libxml build works" >&5
if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -86352,7 +86403,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 86356 "configure"
+#line 86407 "configure"
#include "confdefs.h"
@@ -86363,7 +86414,7 @@ else
}
EOF
-if { (eval echo configure:86367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:86418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -86740,7 +86791,7 @@ fi
php_with_snmp=no
echo $ac_n "checking for SNMP support""... $ac_c" 1>&6
-echo "configure:86744: checking for SNMP support" >&5
+echo "configure:86795: checking for SNMP support" >&5
# Check whether --with-snmp or --without-snmp was given.
if test "${with_snmp+set}" = set; then
withval="$with_snmp"
@@ -86787,7 +86838,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_openssl_dir=no
echo $ac_n "checking OpenSSL dir for SNMP""... $ac_c" 1>&6
-echo "configure:86791: checking OpenSSL dir for SNMP" >&5
+echo "configure:86842: checking OpenSSL dir for SNMP" >&5
# Check whether --with-openssl-dir or --without-openssl-dir was given.
if test "${with_openssl_dir+set}" = set; then
withval="$with_openssl_dir"
@@ -86813,7 +86864,7 @@ echo "$ac_t""$ext_output" 1>&6
php_enable_ucd_snmp_hack=no
echo $ac_n "checking whether to enable UCD SNMP hack""... $ac_c" 1>&6
-echo "configure:86817: checking whether to enable UCD SNMP hack" >&5
+echo "configure:86868: checking whether to enable UCD SNMP hack" >&5
# Check whether --enable-ucd-snmp-hack or --disable-ucd-snmp-hack was given.
if test "${enable_ucd_snmp_hack+set}" = set; then
enableval="$enable_ucd_snmp_hack"
@@ -86841,7 +86892,7 @@ if test "$PHP_SNMP" != "no"; then
# Extract the first word of "net-snmp-config", so it can be a program name with args.
set dummy net-snmp-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:86845: checking for $ac_word" >&5
+echo "configure:86896: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SNMP_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -87042,17 +87093,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:87046: checking for $ac_hdr" >&5
+echo "configure:87097: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 87051 "configure"
+#line 87102 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:87056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:87107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -87080,9 +87131,9 @@ done
if test "$ac_cv_header_default_store_h" = "yes"; then
echo $ac_n "checking for OpenSSL support in SNMP libraries""... $ac_c" 1>&6
-echo "configure:87084: checking for OpenSSL support in SNMP libraries" >&5
+echo "configure:87135: checking for OpenSSL support in SNMP libraries" >&5
cat > conftest.$ac_ext <<EOF
-#line 87086 "configure"
+#line 87137 "configure"
#include "confdefs.h"
#include <ucd-snmp-config.h>
@@ -87137,7 +87188,7 @@ rm -f conftest*
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:87141: checking for $ac_word" >&5
+echo "configure:87192: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -87342,9 +87393,9 @@ fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$OPENSSL_INCDIR
echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
-echo "configure:87346: checking for OpenSSL version" >&5
+echo "configure:87397: checking for OpenSSL version" >&5
cat > conftest.$ac_ext <<EOF
-#line 87348 "configure"
+#line 87399 "configure"
#include "confdefs.h"
#include <openssl/opensslv.h>
@@ -87499,7 +87550,7 @@ rm -f conftest*
done
echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
-echo "configure:87503: checking for CRYPTO_free in -lcrypto" >&5
+echo "configure:87554: checking for CRYPTO_free in -lcrypto" >&5
ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -87507,7 +87558,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 87511 "configure"
+#line 87562 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -87518,7 +87569,7 @@ int main() {
CRYPTO_free()
; return 0; }
EOF
-if { (eval echo configure:87522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:87573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -87675,7 +87726,7 @@ fi
done
echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
-echo "configure:87679: checking for SSL_CTX_set_ssl_version in -lssl" >&5
+echo "configure:87730: checking for SSL_CTX_set_ssl_version in -lssl" >&5
ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -87683,7 +87734,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lssl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 87687 "configure"
+#line 87738 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -87694,7 +87745,7 @@ int main() {
SSL_CTX_set_ssl_version()
; return 0; }
EOF
-if { (eval echo configure:87698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:87749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -87807,7 +87858,7 @@ else
fi
echo $ac_n "checking for kstat_read in -lkstat""... $ac_c" 1>&6
-echo "configure:87811: checking for kstat_read in -lkstat" >&5
+echo "configure:87862: checking for kstat_read in -lkstat" >&5
ac_lib_var=`echo kstat'_'kstat_read | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -87815,7 +87866,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lkstat $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 87819 "configure"
+#line 87870 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -87826,7 +87877,7 @@ int main() {
kstat_read()
; return 0; }
EOF
-if { (eval echo configure:87830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:87881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -88097,7 +88148,7 @@ fi
done
echo $ac_n "checking for snmp_parse_oid in -l$SNMP_LIBNAME""... $ac_c" 1>&6
-echo "configure:88101: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5
+echo "configure:88152: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5
ac_lib_var=`echo $SNMP_LIBNAME'_'snmp_parse_oid | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -88105,7 +88156,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$SNMP_LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 88109 "configure"
+#line 88160 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -88116,7 +88167,7 @@ int main() {
snmp_parse_oid()
; return 0; }
EOF
-if { (eval echo configure:88120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:88171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -88250,7 +88301,7 @@ fi
done
echo $ac_n "checking for init_snmp in -l$SNMP_LIBNAME""... $ac_c" 1>&6
-echo "configure:88254: checking for init_snmp in -l$SNMP_LIBNAME" >&5
+echo "configure:88305: checking for init_snmp in -l$SNMP_LIBNAME" >&5
ac_lib_var=`echo $SNMP_LIBNAME'_'init_snmp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -88258,7 +88309,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$SNMP_LIBNAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 88262 "configure"
+#line 88313 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -88269,7 +88320,7 @@ int main() {
init_snmp()
; return 0; }
EOF
-if { (eval echo configure:88273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:88324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -88605,7 +88656,7 @@ fi
php_enable_soap=no
echo $ac_n "checking whether to enable SOAP support""... $ac_c" 1>&6
-echo "configure:88609: checking whether to enable SOAP support" >&5
+echo "configure:88660: checking whether to enable SOAP support" >&5
# Check whether --enable-soap or --disable-soap was given.
if test "${enable_soap+set}" = set; then
enableval="$enable_soap"
@@ -88653,7 +88704,7 @@ if test -z "$PHP_LIBXML_DIR"; then
php_with_libxml_dir=no
echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:88657: checking libxml2 install dir" >&5
+echo "configure:88708: checking libxml2 install dir" >&5
# Check whether --with-libxml-dir or --without-libxml-dir was given.
if test "${with_libxml_dir+set}" = set; then
withval="$with_libxml_dir"
@@ -88684,7 +88735,7 @@ if test "$PHP_SOAP" != "no"; then
echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:88688: checking for xml2-config path" >&5
+echo "configure:88739: checking for xml2-config path" >&5
if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -88842,7 +88893,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:88846: checking whether libxml build works" >&5
+echo "configure:88897: checking whether libxml build works" >&5
if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -88858,7 +88909,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 88862 "configure"
+#line 88913 "configure"
#include "confdefs.h"
@@ -88869,7 +88920,7 @@ else
}
EOF
-if { (eval echo configure:88873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:88924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -89208,7 +89259,7 @@ fi
php_enable_sockets=no
echo $ac_n "checking whether to enable sockets support""... $ac_c" 1>&6
-echo "configure:89212: checking whether to enable sockets support" >&5
+echo "configure:89263: checking whether to enable sockets support" >&5
# Check whether --enable-sockets or --disable-sockets was given.
if test "${enable_sockets+set}" = set; then
enableval="$enable_sockets"
@@ -89253,13 +89304,13 @@ echo "$ac_t""$ext_output" 1>&6
if test "$PHP_SOCKETS" != "no"; then
echo $ac_n "checking for struct cmsghdr""... $ac_c" 1>&6
-echo "configure:89257: checking for struct cmsghdr" >&5
+echo "configure:89308: checking for struct cmsghdr" >&5
if eval "test \"`echo '$''{'ac_cv_cmsghdr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 89263 "configure"
+#line 89314 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -89268,7 +89319,7 @@ int main() {
struct cmsghdr s; s
; return 0; }
EOF
-if { (eval echo configure:89272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:89323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cmsghdr=yes
else
@@ -89293,12 +89344,12 @@ EOF
for ac_func in hstrerror socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:89297: checking for $ac_func" >&5
+echo "configure:89348: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 89302 "configure"
+#line 89353 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -89321,7 +89372,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:89325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:89376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -89349,17 +89400,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:89353: checking for $ac_hdr" >&5
+echo "configure:89404: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 89358 "configure"
+#line 89409 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:89363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:89414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -89386,7 +89437,7 @@ fi
done
cat > conftest.$ac_ext <<EOF
-#line 89390 "configure"
+#line 89441 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -89396,7 +89447,7 @@ int main() {
static struct msghdr tp; int n = (int) tp.msg_flags; return n
; return 0; }
EOF
-if { (eval echo configure:89400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:89451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
@@ -89702,7 +89753,7 @@ fi
php_enable_spl=yes
echo $ac_n "checking enable SPL suppport""... $ac_c" 1>&6
-echo "configure:89706: checking enable SPL suppport" >&5
+echo "configure:89757: checking enable SPL suppport" >&5
# Check whether --enable-spl or --disable-spl was given.
if test "${enable_spl+set}" = set; then
enableval="$enable_spl"
@@ -89747,7 +89798,7 @@ echo "$ac_t""$ext_output" 1>&6
if test "$PHP_SPL" != "no"; then
echo $ac_n "checking whether zend_object_value is packed""... $ac_c" 1>&6
-echo "configure:89751: checking whether zend_object_value is packed" >&5
+echo "configure:89802: checking whether zend_object_value is packed" >&5
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
if test "$cross_compiling" = yes; then
@@ -89757,7 +89808,7 @@ echo "configure:89751: checking whether zend_object_value is packed" >&5
else
cat > conftest.$ac_ext <<EOF
-#line 89761 "configure"
+#line 89812 "configure"
#include "confdefs.h"
#include "Zend/zend_types.h"
@@ -89766,7 +89817,7 @@ int main(int argc, char **argv) {
}
EOF
-if { (eval echo configure:89770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:89821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_result=1
@@ -90120,7 +90171,7 @@ fi
php_with_sqlite=yes
echo $ac_n "checking for sqlite support""... $ac_c" 1>&6
-echo "configure:90124: checking for sqlite support" >&5
+echo "configure:90175: checking for sqlite support" >&5
# Check whether --with-sqlite or --without-sqlite was given.
if test "${with_sqlite+set}" = set; then
withval="$with_sqlite"
@@ -90167,7 +90218,7 @@ echo "$ac_t""$ext_output" 1>&6
php_enable_sqlite_utf8=no
echo $ac_n "checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)""... $ac_c" 1>&6
-echo "configure:90171: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5
+echo "configure:90222: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5
# Check whether --enable-sqlite-utf8 or --disable-sqlite-utf8 was given.
if test "${enable_sqlite_utf8+set}" = set; then
enableval="$enable_sqlite_utf8"
@@ -90198,13 +90249,13 @@ if test "$PHP_SQLITE" != "no"; then
if test "$PHP_PDO" != "no"; then
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:90202: checking for PDO includes" >&5
+echo "configure:90253: checking for PDO includes" >&5
if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
-echo "configure:90208: checking for PDO includes" >&5
+echo "configure:90259: checking for PDO includes" >&5
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
@@ -90238,7 +90289,7 @@ EOF
SQLITE_DIR=$PHP_SQLITE
else # search default path list
echo $ac_n "checking for sqlite files in default path""... $ac_c" 1>&6
-echo "configure:90242: checking for sqlite files in default path" >&5
+echo "configure:90293: checking for sqlite files in default path" >&5
for i in $SEARCH_PATH ; do
if test -r $i/$SEARCH_FOR; then
SQLITE_DIR=$i
@@ -90350,7 +90401,7 @@ echo "configure:90242: checking for sqlite files in default path" >&5
done
echo $ac_n "checking for sqlite_open in -lsqlite""... $ac_c" 1>&6
-echo "configure:90354: checking for sqlite_open in -lsqlite" >&5
+echo "configure:90405: checking for sqlite_open in -lsqlite" >&5
ac_lib_var=`echo sqlite'_'sqlite_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -90358,7 +90409,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsqlite $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 90362 "configure"
+#line 90413 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -90369,7 +90420,7 @@ int main() {
sqlite_open()
; return 0; }
EOF
-if { (eval echo configure:90373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:90424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -90542,7 +90593,7 @@ fi
# Extract the first word of "lemon", so it can be a program name with args.
set dummy lemon; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:90546: checking for $ac_word" >&5
+echo "configure:90597: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEMON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -90570,7 +90621,7 @@ fi
if test "$LEMON"; then
echo $ac_n "checking for lemon version""... $ac_c" 1>&6
-echo "configure:90574: checking for lemon version" >&5
+echo "configure:90625: checking for lemon version" >&5
if eval "test \"`echo '$''{'php_cv_lemon_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -90972,7 +91023,7 @@ but you've either not enabled pdo, or have disabled it.
echo $ac_n "checking size of char *""... $ac_c" 1>&6
-echo "configure:90976: checking size of char *" >&5
+echo "configure:91027: checking size of char *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -90980,7 +91031,7 @@ else
ac_cv_sizeof_char_p=4
else
cat > conftest.$ac_ext <<EOF
-#line 90984 "configure"
+#line 91035 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -90991,7 +91042,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:90995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_char_p=`cat conftestval`
else
@@ -91053,12 +91104,12 @@ EOF
for ac_func in usleep nanosleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:91057: checking for $ac_func" >&5
+echo "configure:91108: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 91062 "configure"
+#line 91113 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -91081,7 +91132,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:91085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:91136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -91109,17 +91160,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:91113: checking for $ac_hdr" >&5
+echo "configure:91164: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 91118 "configure"
+#line 91169 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:91123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:91174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -91150,7 +91201,7 @@ fi
echo $ac_n "checking whether flush should be called explicitly after a buffered io""... $ac_c" 1>&6
-echo "configure:91154: checking whether flush should be called explicitly after a buffered io" >&5
+echo "configure:91205: checking whether flush should be called explicitly after a buffered io" >&5
if eval "test \"`echo '$''{'ac_cv_flush_io'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -91161,7 +91212,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 91165 "configure"
+#line 91216 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -91199,7 +91250,7 @@ int main(int argc, char **argv)
}
EOF
-if { (eval echo configure:91203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_flush_io=no
@@ -91227,7 +91278,7 @@ fi
if test "$ac_cv_func_crypt" = "no"; then
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:91231: checking for crypt in -lcrypt" >&5
+echo "configure:91282: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -91235,7 +91286,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 91239 "configure"
+#line 91290 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -91246,7 +91297,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:91250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:91301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -91275,7 +91326,7 @@ fi
fi
echo $ac_n "checking for standard DES crypt""... $ac_c" 1>&6
-echo "configure:91279: checking for standard DES crypt" >&5
+echo "configure:91330: checking for standard DES crypt" >&5
if eval "test \"`echo '$''{'ac_cv_crypt_des'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -91286,7 +91337,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 91290 "configure"
+#line 91341 "configure"
#include "confdefs.h"
#if HAVE_UNISTD_H
@@ -91305,7 +91356,7 @@ main() {
#endif
}
EOF
-if { (eval echo configure:91309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_crypt_des=yes
@@ -91335,7 +91386,7 @@ EOF
echo $ac_n "checking for extended DES crypt""... $ac_c" 1>&6
-echo "configure:91339: checking for extended DES crypt" >&5
+echo "configure:91390: checking for extended DES crypt" >&5
if eval "test \"`echo '$''{'ac_cv_crypt_ext_des'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -91346,7 +91397,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 91350 "configure"
+#line 91401 "configure"
#include "confdefs.h"
#if HAVE_UNISTD_H
@@ -91365,7 +91416,7 @@ main() {
#endif
}
EOF
-if { (eval echo configure:91369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_crypt_ext_des=yes
@@ -91395,7 +91446,7 @@ EOF
echo $ac_n "checking for MD5 crypt""... $ac_c" 1>&6
-echo "configure:91399: checking for MD5 crypt" >&5
+echo "configure:91450: checking for MD5 crypt" >&5
if eval "test \"`echo '$''{'ac_cv_crypt_md5'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -91406,7 +91457,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 91410 "configure"
+#line 91461 "configure"
#include "confdefs.h"
#if HAVE_UNISTD_H
@@ -91434,7 +91485,7 @@ main() {
#endif
}
EOF
-if { (eval echo configure:91438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_crypt_md5=yes
@@ -91493,7 +91544,7 @@ EOF
echo $ac_n "checking for Blowfish crypt""... $ac_c" 1>&6
-echo "configure:91497: checking for Blowfish crypt" >&5
+echo "configure:91548: checking for Blowfish crypt" >&5
if eval "test \"`echo '$''{'ac_cv_crypt_blowfish'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -91504,7 +91555,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 91508 "configure"
+#line 91559 "configure"
#include "confdefs.h"
#if HAVE_UNISTD_H
@@ -91529,7 +91580,7 @@ main() {
#endif
}
EOF
-if { (eval echo configure:91533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_crypt_blowfish=yes
@@ -91561,12 +91612,12 @@ EOF
for ac_func in getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:91565: checking for $ac_func" >&5
+echo "configure:91616: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 91570 "configure"
+#line 91621 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -91589,7 +91640,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:91593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:91644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -91614,7 +91665,7 @@ fi
done
echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
-echo "configure:91618: checking for working fnmatch" >&5
+echo "configure:91669: checking for working fnmatch" >&5
if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -91625,11 +91676,11 @@ if test "$cross_compiling" = yes; then
ac_cv_func_fnmatch_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 91629 "configure"
+#line 91680 "configure"
#include "confdefs.h"
main() { exit (fnmatch ("a*", "abc", 0) != 0); }
EOF
-if { (eval echo configure:91633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_fnmatch_works=yes
else
@@ -91760,13 +91811,13 @@ elif test "$REGEX_TYPE" = "system"; then
EOF
echo $ac_n "checking whether field re_magic exists in struct regex_t""... $ac_c" 1>&6
-echo "configure:91764: checking whether field re_magic exists in struct regex_t" >&5
+echo "configure:91815: checking whether field re_magic exists in struct regex_t" >&5
if eval "test \"`echo '$''{'ac_cv_regex_t_re_magic'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 91770 "configure"
+#line 91821 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <regex.h>
@@ -91774,7 +91825,7 @@ int main() {
regex_t rt; rt.re_magic;
; return 0; }
EOF
-if { (eval echo configure:91778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:91829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_regex_t_re_magic=yes
else
@@ -91795,11 +91846,11 @@ EOF
fi
fi
echo $ac_n "checking which regex library to use""... $ac_c" 1>&6
-echo "configure:91799: checking which regex library to use" >&5
+echo "configure:91850: checking which regex library to use" >&5
echo "$ac_t""$REGEX_TYPE" 1>&6
echo $ac_n "checking whether rounding works as expected""... $ac_c" 1>&6
-echo "configure:91803: checking whether rounding works as expected" >&5
+echo "configure:91854: checking whether rounding works as expected" >&5
if test "$cross_compiling" = yes; then
PHP_ROUND_FUZZ=0.50000000001
@@ -91807,7 +91858,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 91811 "configure"
+#line 91862 "configure"
#include "confdefs.h"
#include <math.h>
@@ -91820,7 +91871,7 @@ else
}
EOF
-if { (eval echo configure:91824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:91875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
PHP_ROUND_FUZZ=0.5
@@ -91850,12 +91901,12 @@ else
for ac_func in fork CreateProcess
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:91854: checking for $ac_func" >&5
+echo "configure:91905: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 91859 "configure"
+#line 91910 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -91878,7 +91929,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:91882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:91933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -91910,7 +91961,7 @@ done
fi
echo $ac_n "checking if your OS can spawn processes with inherited handles""... $ac_c" 1>&6
-echo "configure:91914: checking if your OS can spawn processes with inherited handles" >&5
+echo "configure:91965: checking if your OS can spawn processes with inherited handles" >&5
if test "$php_can_support_proc_open" = "yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -91935,12 +91986,12 @@ fi
unset found
echo $ac_n "checking for res_nmkquery""... $ac_c" 1>&6
-echo "configure:91939: checking for res_nmkquery" >&5
+echo "configure:91990: checking for res_nmkquery" >&5
if eval "test \"`echo '$''{'ac_cv_func_res_nmkquery'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 91944 "configure"
+#line 91995 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char res_nmkquery(); below. */
@@ -91963,7 +92014,7 @@ res_nmkquery();
; return 0; }
EOF
-if { (eval echo configure:91967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_res_nmkquery=yes"
else
@@ -91981,12 +92032,12 @@ if eval "test \"`echo '$ac_cv_func_'res_nmkquery`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __res_nmkquery""... $ac_c" 1>&6
-echo "configure:91985: checking for __res_nmkquery" >&5
+echo "configure:92036: checking for __res_nmkquery" >&5
if eval "test \"`echo '$''{'ac_cv_func___res_nmkquery'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 91990 "configure"
+#line 92041 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char __res_nmkquery(); below. */
@@ -92009,7 +92060,7 @@ __res_nmkquery();
; return 0; }
EOF
-if { (eval echo configure:92013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func___res_nmkquery=yes"
else
@@ -92047,7 +92098,7 @@ EOF
unset ac_cv_lib_resolv___res_nmkquery
unset found
echo $ac_n "checking for res_nmkquery in -lresolv""... $ac_c" 1>&6
-echo "configure:92051: checking for res_nmkquery in -lresolv" >&5
+echo "configure:92102: checking for res_nmkquery in -lresolv" >&5
ac_lib_var=`echo resolv'_'res_nmkquery | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92055,7 +92106,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92059 "configure"
+#line 92110 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92066,7 +92117,7 @@ int main() {
res_nmkquery()
; return 0; }
EOF
-if { (eval echo configure:92070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92086,7 +92137,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __res_nmkquery in -lresolv""... $ac_c" 1>&6
-echo "configure:92090: checking for __res_nmkquery in -lresolv" >&5
+echo "configure:92141: checking for __res_nmkquery in -lresolv" >&5
ac_lib_var=`echo resolv'_'__res_nmkquery | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92094,7 +92145,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92098 "configure"
+#line 92149 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92105,7 +92156,7 @@ int main() {
__res_nmkquery()
; return 0; }
EOF
-if { (eval echo configure:92109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92137,11 +92188,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 92141 "configure"
+#line 92192 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:92145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:92196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -92183,7 +92234,7 @@ EOF
unset ac_cv_lib_bind___res_nmkquery
unset found
echo $ac_n "checking for res_nmkquery in -lbind""... $ac_c" 1>&6
-echo "configure:92187: checking for res_nmkquery in -lbind" >&5
+echo "configure:92238: checking for res_nmkquery in -lbind" >&5
ac_lib_var=`echo bind'_'res_nmkquery | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92191,7 +92242,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92195 "configure"
+#line 92246 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92202,7 +92253,7 @@ int main() {
res_nmkquery()
; return 0; }
EOF
-if { (eval echo configure:92206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92222,7 +92273,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __res_nmkquery in -lbind""... $ac_c" 1>&6
-echo "configure:92226: checking for __res_nmkquery in -lbind" >&5
+echo "configure:92277: checking for __res_nmkquery in -lbind" >&5
ac_lib_var=`echo bind'_'__res_nmkquery | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92230,7 +92281,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92234 "configure"
+#line 92285 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92241,7 +92292,7 @@ int main() {
__res_nmkquery()
; return 0; }
EOF
-if { (eval echo configure:92245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92273,11 +92324,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 92277 "configure"
+#line 92328 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:92281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:92332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -92319,7 +92370,7 @@ EOF
unset ac_cv_lib_socket___res_nmkquery
unset found
echo $ac_n "checking for res_nmkquery in -lsocket""... $ac_c" 1>&6
-echo "configure:92323: checking for res_nmkquery in -lsocket" >&5
+echo "configure:92374: checking for res_nmkquery in -lsocket" >&5
ac_lib_var=`echo socket'_'res_nmkquery | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92327,7 +92378,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92331 "configure"
+#line 92382 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92338,7 +92389,7 @@ int main() {
res_nmkquery()
; return 0; }
EOF
-if { (eval echo configure:92342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92358,7 +92409,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __res_nmkquery in -lsocket""... $ac_c" 1>&6
-echo "configure:92362: checking for __res_nmkquery in -lsocket" >&5
+echo "configure:92413: checking for __res_nmkquery in -lsocket" >&5
ac_lib_var=`echo socket'_'__res_nmkquery | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92366,7 +92417,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92370 "configure"
+#line 92421 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92377,7 +92428,7 @@ int main() {
__res_nmkquery()
; return 0; }
EOF
-if { (eval echo configure:92381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92409,11 +92460,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 92413 "configure"
+#line 92464 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:92417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:92468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -92470,12 +92521,12 @@ EOF
unset found
echo $ac_n "checking for res_nsend""... $ac_c" 1>&6
-echo "configure:92474: checking for res_nsend" >&5
+echo "configure:92525: checking for res_nsend" >&5
if eval "test \"`echo '$''{'ac_cv_func_res_nsend'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 92479 "configure"
+#line 92530 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char res_nsend(); below. */
@@ -92498,7 +92549,7 @@ res_nsend();
; return 0; }
EOF
-if { (eval echo configure:92502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_res_nsend=yes"
else
@@ -92516,12 +92567,12 @@ if eval "test \"`echo '$ac_cv_func_'res_nsend`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __res_nsend""... $ac_c" 1>&6
-echo "configure:92520: checking for __res_nsend" >&5
+echo "configure:92571: checking for __res_nsend" >&5
if eval "test \"`echo '$''{'ac_cv_func___res_nsend'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 92525 "configure"
+#line 92576 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char __res_nsend(); below. */
@@ -92544,7 +92595,7 @@ __res_nsend();
; return 0; }
EOF
-if { (eval echo configure:92548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func___res_nsend=yes"
else
@@ -92582,7 +92633,7 @@ EOF
unset ac_cv_lib_resolv___res_nsend
unset found
echo $ac_n "checking for res_nsend in -lresolv""... $ac_c" 1>&6
-echo "configure:92586: checking for res_nsend in -lresolv" >&5
+echo "configure:92637: checking for res_nsend in -lresolv" >&5
ac_lib_var=`echo resolv'_'res_nsend | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92590,7 +92641,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92594 "configure"
+#line 92645 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92601,7 +92652,7 @@ int main() {
res_nsend()
; return 0; }
EOF
-if { (eval echo configure:92605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92621,7 +92672,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __res_nsend in -lresolv""... $ac_c" 1>&6
-echo "configure:92625: checking for __res_nsend in -lresolv" >&5
+echo "configure:92676: checking for __res_nsend in -lresolv" >&5
ac_lib_var=`echo resolv'_'__res_nsend | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92629,7 +92680,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92633 "configure"
+#line 92684 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92640,7 +92691,7 @@ int main() {
__res_nsend()
; return 0; }
EOF
-if { (eval echo configure:92644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92672,11 +92723,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 92676 "configure"
+#line 92727 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:92680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:92731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -92718,7 +92769,7 @@ EOF
unset ac_cv_lib_bind___res_nsend
unset found
echo $ac_n "checking for res_nsend in -lbind""... $ac_c" 1>&6
-echo "configure:92722: checking for res_nsend in -lbind" >&5
+echo "configure:92773: checking for res_nsend in -lbind" >&5
ac_lib_var=`echo bind'_'res_nsend | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92726,7 +92777,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92730 "configure"
+#line 92781 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92737,7 +92788,7 @@ int main() {
res_nsend()
; return 0; }
EOF
-if { (eval echo configure:92741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92757,7 +92808,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __res_nsend in -lbind""... $ac_c" 1>&6
-echo "configure:92761: checking for __res_nsend in -lbind" >&5
+echo "configure:92812: checking for __res_nsend in -lbind" >&5
ac_lib_var=`echo bind'_'__res_nsend | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92765,7 +92816,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92769 "configure"
+#line 92820 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92776,7 +92827,7 @@ int main() {
__res_nsend()
; return 0; }
EOF
-if { (eval echo configure:92780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92808,11 +92859,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 92812 "configure"
+#line 92863 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:92816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:92867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -92854,7 +92905,7 @@ EOF
unset ac_cv_lib_socket___res_nsend
unset found
echo $ac_n "checking for res_nsend in -lsocket""... $ac_c" 1>&6
-echo "configure:92858: checking for res_nsend in -lsocket" >&5
+echo "configure:92909: checking for res_nsend in -lsocket" >&5
ac_lib_var=`echo socket'_'res_nsend | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92862,7 +92913,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92866 "configure"
+#line 92917 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92873,7 +92924,7 @@ int main() {
res_nsend()
; return 0; }
EOF
-if { (eval echo configure:92877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92893,7 +92944,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __res_nsend in -lsocket""... $ac_c" 1>&6
-echo "configure:92897: checking for __res_nsend in -lsocket" >&5
+echo "configure:92948: checking for __res_nsend in -lsocket" >&5
ac_lib_var=`echo socket'_'__res_nsend | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -92901,7 +92952,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 92905 "configure"
+#line 92956 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -92912,7 +92963,7 @@ int main() {
__res_nsend()
; return 0; }
EOF
-if { (eval echo configure:92916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:92967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -92944,11 +92995,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 92948 "configure"
+#line 92999 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:92952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -93005,12 +93056,12 @@ EOF
unset found
echo $ac_n "checking for dn_expand""... $ac_c" 1>&6
-echo "configure:93009: checking for dn_expand" >&5
+echo "configure:93060: checking for dn_expand" >&5
if eval "test \"`echo '$''{'ac_cv_func_dn_expand'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 93014 "configure"
+#line 93065 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dn_expand(); below. */
@@ -93033,7 +93084,7 @@ dn_expand();
; return 0; }
EOF
-if { (eval echo configure:93037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dn_expand=yes"
else
@@ -93051,12 +93102,12 @@ if eval "test \"`echo '$ac_cv_func_'dn_expand`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __dn_expand""... $ac_c" 1>&6
-echo "configure:93055: checking for __dn_expand" >&5
+echo "configure:93106: checking for __dn_expand" >&5
if eval "test \"`echo '$''{'ac_cv_func___dn_expand'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 93060 "configure"
+#line 93111 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char __dn_expand(); below. */
@@ -93079,7 +93130,7 @@ __dn_expand();
; return 0; }
EOF
-if { (eval echo configure:93083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func___dn_expand=yes"
else
@@ -93117,7 +93168,7 @@ EOF
unset ac_cv_lib_resolv___dn_expand
unset found
echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:93121: checking for dn_expand in -lresolv" >&5
+echo "configure:93172: checking for dn_expand in -lresolv" >&5
ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -93125,7 +93176,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 93129 "configure"
+#line 93180 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -93136,7 +93187,7 @@ int main() {
dn_expand()
; return 0; }
EOF
-if { (eval echo configure:93140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -93156,7 +93207,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:93160: checking for __dn_expand in -lresolv" >&5
+echo "configure:93211: checking for __dn_expand in -lresolv" >&5
ac_lib_var=`echo resolv'_'__dn_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -93164,7 +93215,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 93168 "configure"
+#line 93219 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -93175,7 +93226,7 @@ int main() {
__dn_expand()
; return 0; }
EOF
-if { (eval echo configure:93179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -93207,11 +93258,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 93211 "configure"
+#line 93262 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:93215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -93253,7 +93304,7 @@ EOF
unset ac_cv_lib_bind___dn_expand
unset found
echo $ac_n "checking for dn_expand in -lbind""... $ac_c" 1>&6
-echo "configure:93257: checking for dn_expand in -lbind" >&5
+echo "configure:93308: checking for dn_expand in -lbind" >&5
ac_lib_var=`echo bind'_'dn_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -93261,7 +93312,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 93265 "configure"
+#line 93316 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -93272,7 +93323,7 @@ int main() {
dn_expand()
; return 0; }
EOF
-if { (eval echo configure:93276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -93292,7 +93343,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __dn_expand in -lbind""... $ac_c" 1>&6
-echo "configure:93296: checking for __dn_expand in -lbind" >&5
+echo "configure:93347: checking for __dn_expand in -lbind" >&5
ac_lib_var=`echo bind'_'__dn_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -93300,7 +93351,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 93304 "configure"
+#line 93355 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -93311,7 +93362,7 @@ int main() {
__dn_expand()
; return 0; }
EOF
-if { (eval echo configure:93315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -93343,11 +93394,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 93347 "configure"
+#line 93398 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:93351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -93389,7 +93440,7 @@ EOF
unset ac_cv_lib_socket___dn_expand
unset found
echo $ac_n "checking for dn_expand in -lsocket""... $ac_c" 1>&6
-echo "configure:93393: checking for dn_expand in -lsocket" >&5
+echo "configure:93444: checking for dn_expand in -lsocket" >&5
ac_lib_var=`echo socket'_'dn_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -93397,7 +93448,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 93401 "configure"
+#line 93452 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -93408,7 +93459,7 @@ int main() {
dn_expand()
; return 0; }
EOF
-if { (eval echo configure:93412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -93428,7 +93479,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for __dn_expand in -lsocket""... $ac_c" 1>&6
-echo "configure:93432: checking for __dn_expand in -lsocket" >&5
+echo "configure:93483: checking for __dn_expand in -lsocket" >&5
ac_lib_var=`echo socket'_'__dn_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -93436,7 +93487,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 93440 "configure"
+#line 93491 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -93447,7 +93498,7 @@ int main() {
__dn_expand()
; return 0; }
EOF
-if { (eval echo configure:93451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -93479,11 +93530,11 @@ fi
found=no
else
cat > conftest.$ac_ext <<EOF
-#line 93483 "configure"
+#line 93534 "configure"
#include "confdefs.h"
main() { return (0); }
EOF
-if { (eval echo configure:93487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
found=yes
else
@@ -93536,7 +93587,7 @@ EOF
echo $ac_n "checking whether atof() accepts NAN""... $ac_c" 1>&6
-echo "configure:93540: checking whether atof() accepts NAN" >&5
+echo "configure:93591: checking whether atof() accepts NAN" >&5
if eval "test \"`echo '$''{'ac_cv_atof_accept_nan'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -93547,7 +93598,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 93551 "configure"
+#line 93602 "configure"
#include "confdefs.h"
#include <math.h>
@@ -93567,7 +93618,7 @@ int main(int argc, char** argv)
}
EOF
-if { (eval echo configure:93571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_atof_accept_nan=yes
@@ -93594,7 +93645,7 @@ EOF
fi
echo $ac_n "checking whether atof() accepts INF""... $ac_c" 1>&6
-echo "configure:93598: checking whether atof() accepts INF" >&5
+echo "configure:93649: checking whether atof() accepts INF" >&5
if eval "test \"`echo '$''{'ac_cv_atof_accept_inf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -93605,7 +93656,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 93609 "configure"
+#line 93660 "configure"
#include "confdefs.h"
#include <math.h>
@@ -93628,7 +93679,7 @@ int main(int argc, char** argv)
}
EOF
-if { (eval echo configure:93632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_atof_accept_inf=yes
@@ -93655,7 +93706,7 @@ EOF
fi
echo $ac_n "checking whether HUGE_VAL == INF""... $ac_c" 1>&6
-echo "configure:93659: checking whether HUGE_VAL == INF" >&5
+echo "configure:93710: checking whether HUGE_VAL == INF" >&5
if eval "test \"`echo '$''{'ac_cv_huge_val_inf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -93666,7 +93717,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 93670 "configure"
+#line 93721 "configure"
#include "confdefs.h"
#include <math.h>
@@ -93689,7 +93740,7 @@ int main(int argc, char** argv)
}
EOF
-if { (eval echo configure:93693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_huge_val_inf=yes
@@ -93716,7 +93767,7 @@ EOF
fi
echo $ac_n "checking whether HUGE_VAL + -HUGEVAL == NAN""... $ac_c" 1>&6
-echo "configure:93720: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5
+echo "configure:93771: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5
if eval "test \"`echo '$''{'ac_cv_huge_val_nan'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -93727,7 +93778,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 93731 "configure"
+#line 93782 "configure"
#include "confdefs.h"
#include <math.h>
@@ -93752,7 +93803,7 @@ int main(int argc, char** argv)
}
EOF
-if { (eval echo configure:93756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:93807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_huge_val_nan=yes
@@ -93779,13 +93830,13 @@ EOF
fi
echo $ac_n "checking whether strptime() declaration fails""... $ac_c" 1>&6
-echo "configure:93783: checking whether strptime() declaration fails" >&5
+echo "configure:93834: checking whether strptime() declaration fails" >&5
if eval "test \"`echo '$''{'ac_cv_strptime_decl_fails'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 93789 "configure"
+#line 93840 "configure"
#include "confdefs.h"
#include <time.h>
@@ -93801,7 +93852,7 @@ int strptime(const char *s, const char *format, struct tm *tm);
; return 0; }
EOF
-if { (eval echo configure:93805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:93856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_strptime_decl_fails=no
@@ -93829,17 +93880,17 @@ for ac_hdr in wchar.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:93833: checking for $ac_hdr" >&5
+echo "configure:93884: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 93838 "configure"
+#line 93889 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:93843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:93894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -93868,12 +93919,12 @@ done
for ac_func in mblen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:93872: checking for $ac_func" >&5
+echo "configure:93923: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 93877 "configure"
+#line 93928 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -93896,7 +93947,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:93900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:93951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -93923,12 +93974,12 @@ done
for ac_func in mbrlen mbsinit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:93927: checking for $ac_func" >&5
+echo "configure:93978: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 93932 "configure"
+#line 93983 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -93951,7 +94002,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:93955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:94006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -93976,13 +94027,13 @@ fi
done
echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:93980: checking for mbstate_t" >&5
+echo "configure:94031: checking for mbstate_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 93986 "configure"
+#line 94037 "configure"
#include "confdefs.h"
#ifdef HAVE_WCHAR_H
@@ -93995,7 +94046,7 @@ int __tmp__() { mbstate_t a; }
; return 0; }
EOF
-if { (eval echo configure:93999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:94050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_mbstate_t=yes
@@ -94371,7 +94422,7 @@ EOF
php_with_sybase=no
echo $ac_n "checking for Sybase support""... $ac_c" 1>&6
-echo "configure:94375: checking for Sybase support" >&5
+echo "configure:94426: checking for Sybase support" >&5
# Check whether --with-sybase or --without-sybase was given.
if test "${with_sybase+set}" = set; then
withval="$with_sybase"
@@ -94832,7 +94883,7 @@ EOF
fi
echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:94836: checking for dnet_addr in -ldnet_stub" >&5
+echo "configure:94887: checking for dnet_addr in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -94840,7 +94891,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 94844 "configure"
+#line 94895 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -94851,7 +94902,7 @@ int main() {
dnet_addr()
; return 0; }
EOF
-if { (eval echo configure:94855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:94906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -94977,7 +95028,7 @@ fi
EOF
echo $ac_n "checking for tdsdbopen in -lsybdb""... $ac_c" 1>&6
-echo "configure:94981: checking for tdsdbopen in -lsybdb" >&5
+echo "configure:95032: checking for tdsdbopen in -lsybdb" >&5
ac_lib_var=`echo sybdb'_'tdsdbopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -94985,7 +95036,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsybdb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 94989 "configure"
+#line 95040 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -94996,7 +95047,7 @@ int main() {
tdsdbopen()
; return 0; }
EOF
-if { (eval echo configure:95000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:95051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -95038,7 +95089,7 @@ fi
php_with_sybase_ct=no
echo $ac_n "checking for Sybase-CT support""... $ac_c" 1>&6
-echo "configure:95042: checking for Sybase-CT support" >&5
+echo "configure:95093: checking for Sybase-CT support" >&5
# Check whether --with-sybase-ct or --without-sybase-ct was given.
if test "${with_sybase_ct+set}" = set; then
withval="$with_sybase_ct"
@@ -95677,7 +95728,7 @@ EOF
done
echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6
-echo "configure:95681: checking for netg_errstr in -ltcl" >&5
+echo "configure:95732: checking for netg_errstr in -ltcl" >&5
ac_lib_var=`echo tcl'_'netg_errstr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -95685,7 +95736,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltcl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 95689 "configure"
+#line 95740 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -95696,7 +95747,7 @@ int main() {
netg_errstr()
; return 0; }
EOF
-if { (eval echo configure:95700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:95751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -95871,7 +95922,7 @@ fi
done
echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6
-echo "configure:95875: checking for insck__getVdate in -linsck" >&5
+echo "configure:95926: checking for insck__getVdate in -linsck" >&5
ac_lib_var=`echo insck'_'insck__getVdate | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -95879,7 +95930,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-linsck $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 95883 "configure"
+#line 95934 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -95890,7 +95941,7 @@ int main() {
insck__getVdate()
; return 0; }
EOF
-if { (eval echo configure:95894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:95945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -96038,7 +96089,7 @@ fi
done
echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6
-echo "configure:96042: checking for bsd_tcp in -linsck" >&5
+echo "configure:96093: checking for bsd_tcp in -linsck" >&5
ac_lib_var=`echo insck'_'bsd_tcp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -96046,7 +96097,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-linsck $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 96050 "configure"
+#line 96101 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -96057,7 +96108,7 @@ int main() {
bsd_tcp()
; return 0; }
EOF
-if { (eval echo configure:96061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:96112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -96117,7 +96168,7 @@ fi
php_enable_sysvmsg=no
echo $ac_n "checking whether to enable System V IPC support""... $ac_c" 1>&6
-echo "configure:96121: checking whether to enable System V IPC support" >&5
+echo "configure:96172: checking whether to enable System V IPC support" >&5
# Check whether --enable-sysvmsg or --disable-sysvmsg was given.
if test "${enable_sysvmsg+set}" = set; then
enableval="$enable_sysvmsg"
@@ -96163,17 +96214,17 @@ echo "$ac_t""$ext_output" 1>&6
if test "$PHP_SYSVMSG" != "no"; then
ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
-echo "configure:96167: checking for sys/msg.h" >&5
+echo "configure:96218: checking for sys/msg.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 96172 "configure"
+#line 96223 "configure"
#include "confdefs.h"
#include <sys/msg.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:96177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:96228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -96489,7 +96540,7 @@ fi
php_enable_sysvsem=no
echo $ac_n "checking whether to enable System V semaphore support""... $ac_c" 1>&6
-echo "configure:96493: checking whether to enable System V semaphore support" >&5
+echo "configure:96544: checking whether to enable System V semaphore support" >&5
# Check whether --enable-sysvsem or --disable-sysvsem was given.
if test "${enable_sysvsem+set}" = set; then
enableval="$enable_sysvsem"
@@ -96819,12 +96870,12 @@ EOF
EOF
echo $ac_n "checking for union semun""... $ac_c" 1>&6
-echo "configure:96823: checking for union semun" >&5
+echo "configure:96874: checking for union semun" >&5
if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 96828 "configure"
+#line 96879 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -96835,7 +96886,7 @@ int main() {
union semun x;
; return 0; }
EOF
-if { (eval echo configure:96839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:96890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
php_cv_semun=yes
@@ -96871,7 +96922,7 @@ fi
php_enable_sysvshm=no
echo $ac_n "checking whether to enable System V shared memory support""... $ac_c" 1>&6
-echo "configure:96875: checking whether to enable System V shared memory support" >&5
+echo "configure:96926: checking whether to enable System V shared memory support" >&5
# Check whether --enable-sysvshm or --disable-sysvshm was given.
if test "${enable_sysvshm+set}" = set; then
enableval="$enable_sysvshm"
@@ -97207,7 +97258,7 @@ fi
php_with_tidy=no
echo $ac_n "checking for TIDY support""... $ac_c" 1>&6
-echo "configure:97211: checking for TIDY support" >&5
+echo "configure:97262: checking for TIDY support" >&5
# Check whether --with-tidy or --without-tidy was given.
if test "${with_tidy+set}" = set; then
withval="$with_tidy"
@@ -97499,7 +97550,7 @@ if test "$PHP_TIDY" != "no"; then
done
echo $ac_n "checking for tidyOptGetDoc in -ltidy""... $ac_c" 1>&6
-echo "configure:97503: checking for tidyOptGetDoc in -ltidy" >&5
+echo "configure:97554: checking for tidyOptGetDoc in -ltidy" >&5
ac_lib_var=`echo tidy'_'tidyOptGetDoc | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -97507,7 +97558,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltidy $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 97511 "configure"
+#line 97562 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -97518,7 +97569,7 @@ int main() {
tidyOptGetDoc()
; return 0; }
EOF
-if { (eval echo configure:97522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:97573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -97851,7 +97902,7 @@ fi
php_enable_tokenizer=yes
echo $ac_n "checking whether to enable tokenizer support""... $ac_c" 1>&6
-echo "configure:97855: checking whether to enable tokenizer support" >&5
+echo "configure:97906: checking whether to enable tokenizer support" >&5
# Check whether --enable-tokenizer or --disable-tokenizer was given.
if test "${enable_tokenizer+set}" = set; then
enableval="$enable_tokenizer"
@@ -98189,7 +98240,7 @@ fi
php_enable_wddx=no
echo $ac_n "checking whether to enable WDDX support""... $ac_c" 1>&6
-echo "configure:98193: checking whether to enable WDDX support" >&5
+echo "configure:98244: checking whether to enable WDDX support" >&5
# Check whether --enable-wddx or --disable-wddx was given.
if test "${enable_wddx+set}" = set; then
enableval="$enable_wddx"
@@ -98237,7 +98288,7 @@ if test -z "$PHP_LIBXML_DIR"; then
php_with_libxml_dir=no
echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:98241: checking libxml2 install dir" >&5
+echo "configure:98292: checking libxml2 install dir" >&5
# Check whether --with-libxml-dir or --without-libxml-dir was given.
if test "${with_libxml_dir+set}" = set; then
withval="$with_libxml_dir"
@@ -98264,7 +98315,7 @@ fi
php_with_libexpat_dir=no
echo $ac_n "checking libexpat dir for WDDX""... $ac_c" 1>&6
-echo "configure:98268: checking libexpat dir for WDDX" >&5
+echo "configure:98319: checking libexpat dir for WDDX" >&5
# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
if test "${with_libexpat_dir+set}" = set; then
withval="$with_libexpat_dir"
@@ -98295,7 +98346,7 @@ if test "$PHP_WDDX" != "no"; then
echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:98299: checking for xml2-config path" >&5
+echo "configure:98350: checking for xml2-config path" >&5
if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -98453,7 +98504,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:98457: checking whether libxml build works" >&5
+echo "configure:98508: checking whether libxml build works" >&5
if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -98469,7 +98520,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 98473 "configure"
+#line 98524 "configure"
#include "confdefs.h"
@@ -98480,7 +98531,7 @@ else
}
EOF
-if { (eval echo configure:98484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:98535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -99036,7 +99087,7 @@ fi
php_enable_xml=yes
echo $ac_n "checking whether to enable XML support""... $ac_c" 1>&6
-echo "configure:99040: checking whether to enable XML support" >&5
+echo "configure:99091: checking whether to enable XML support" >&5
# Check whether --enable-xml or --disable-xml was given.
if test "${enable_xml+set}" = set; then
enableval="$enable_xml"
@@ -99084,7 +99135,7 @@ if test -z "$PHP_LIBXML_DIR"; then
php_with_libxml_dir=no
echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:99088: checking libxml2 install dir" >&5
+echo "configure:99139: checking libxml2 install dir" >&5
# Check whether --with-libxml-dir or --without-libxml-dir was given.
if test "${with_libxml_dir+set}" = set; then
withval="$with_libxml_dir"
@@ -99111,7 +99162,7 @@ fi
php_with_libexpat_dir=no
echo $ac_n "checking libexpat install dir""... $ac_c" 1>&6
-echo "configure:99115: checking libexpat install dir" >&5
+echo "configure:99166: checking libexpat install dir" >&5
# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
if test "${with_libexpat_dir+set}" = set; then
withval="$with_libexpat_dir"
@@ -99143,7 +99194,7 @@ if test "$PHP_XML" != "no"; then
echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:99147: checking for xml2-config path" >&5
+echo "configure:99198: checking for xml2-config path" >&5
if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -99301,7 +99352,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:99305: checking whether libxml build works" >&5
+echo "configure:99356: checking whether libxml build works" >&5
if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -99317,7 +99368,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 99321 "configure"
+#line 99372 "configure"
#include "confdefs.h"
@@ -99328,7 +99379,7 @@ else
}
EOF
-if { (eval echo configure:99332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:99383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -99853,7 +99904,7 @@ fi
php_enable_xmlreader=yes
echo $ac_n "checking whether to enable XMLReader support""... $ac_c" 1>&6
-echo "configure:99857: checking whether to enable XMLReader support" >&5
+echo "configure:99908: checking whether to enable XMLReader support" >&5
# Check whether --enable-xmlreader or --disable-xmlreader was given.
if test "${enable_xmlreader+set}" = set; then
enableval="$enable_xmlreader"
@@ -99901,7 +99952,7 @@ if test -z "$PHP_LIBXML_DIR"; then
php_with_libxml_dir=no
echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:99905: checking libxml2 install dir" >&5
+echo "configure:99956: checking libxml2 install dir" >&5
# Check whether --with-libxml-dir or --without-libxml-dir was given.
if test "${with_libxml_dir+set}" = set; then
withval="$with_libxml_dir"
@@ -99932,7 +99983,7 @@ if test "$PHP_XMLREADER" != "no"; then
echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:99936: checking for xml2-config path" >&5
+echo "configure:99987: checking for xml2-config path" >&5
if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -100090,7 +100141,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:100094: checking whether libxml build works" >&5
+echo "configure:100145: checking whether libxml build works" >&5
if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -100106,7 +100157,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 100110 "configure"
+#line 100161 "configure"
#include "confdefs.h"
@@ -100117,7 +100168,7 @@ else
}
EOF
-if { (eval echo configure:100121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:100172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -100488,7 +100539,7 @@ fi
php_with_xmlrpc=no
echo $ac_n "checking for XMLRPC-EPI support""... $ac_c" 1>&6
-echo "configure:100492: checking for XMLRPC-EPI support" >&5
+echo "configure:100543: checking for XMLRPC-EPI support" >&5
# Check whether --with-xmlrpc or --without-xmlrpc was given.
if test "${with_xmlrpc+set}" = set; then
withval="$with_xmlrpc"
@@ -100536,7 +100587,7 @@ if test -z "$PHP_LIBXML_DIR"; then
php_with_libxml_dir=no
echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:100540: checking libxml2 install dir" >&5
+echo "configure:100591: checking libxml2 install dir" >&5
# Check whether --with-libxml-dir or --without-libxml-dir was given.
if test "${with_libxml_dir+set}" = set; then
withval="$with_libxml_dir"
@@ -100563,7 +100614,7 @@ fi
php_with_libexpat_dir=no
echo $ac_n "checking libexpat dir for XMLRPC-EPI""... $ac_c" 1>&6
-echo "configure:100567: checking libexpat dir for XMLRPC-EPI" >&5
+echo "configure:100618: checking libexpat dir for XMLRPC-EPI" >&5
# Check whether --with-libexpat-dir or --without-libexpat-dir was given.
if test "${with_libexpat_dir+set}" = set; then
withval="$with_libexpat_dir"
@@ -100589,7 +100640,7 @@ echo "$ac_t""$ext_output" 1>&6
php_with_iconv_dir=no
echo $ac_n "checking iconv dir for XMLRPC-EPI""... $ac_c" 1>&6
-echo "configure:100593: checking iconv dir for XMLRPC-EPI" >&5
+echo "configure:100644: checking iconv dir for XMLRPC-EPI" >&5
# Check whether --with-iconv-dir or --without-iconv-dir was given.
if test "${with_iconv_dir+set}" = set; then
withval="$with_iconv_dir"
@@ -100648,7 +100699,7 @@ EOF
echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:100652: checking for xml2-config path" >&5
+echo "configure:100703: checking for xml2-config path" >&5
if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -100806,7 +100857,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:100810: checking whether libxml build works" >&5
+echo "configure:100861: checking whether libxml build works" >&5
if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -100822,7 +100873,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 100826 "configure"
+#line 100877 "configure"
#include "confdefs.h"
@@ -100833,7 +100884,7 @@ else
}
EOF
-if { (eval echo configure:100837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:100888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -101098,12 +101149,12 @@ EOF
if test "$PHP_ICONV" = "yes"; then
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:101102: checking for iconv" >&5
+echo "configure:101153: checking for iconv" >&5
if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 101107 "configure"
+#line 101158 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char iconv(); below. */
@@ -101126,7 +101177,7 @@ iconv();
; return 0; }
EOF
-if { (eval echo configure:101130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:101181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_iconv=yes"
else
@@ -101147,12 +101198,12 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for libiconv""... $ac_c" 1>&6
-echo "configure:101151: checking for libiconv" >&5
+echo "configure:101202: checking for libiconv" >&5
if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 101156 "configure"
+#line 101207 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char libiconv(); below. */
@@ -101175,7 +101226,7 @@ libiconv();
; return 0; }
EOF
-if { (eval echo configure:101179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:101230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_libiconv=yes"
else
@@ -101331,7 +101382,7 @@ EOF
done
echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6
-echo "configure:101335: checking for libiconv in -l$iconv_lib_name" >&5
+echo "configure:101386: checking for libiconv in -l$iconv_lib_name" >&5
ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -101339,7 +101390,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$iconv_lib_name $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 101343 "configure"
+#line 101394 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -101350,7 +101401,7 @@ int main() {
libiconv()
; return 0; }
EOF
-if { (eval echo configure:101354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:101405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -101484,7 +101535,7 @@ else
done
echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6
-echo "configure:101488: checking for iconv in -l$iconv_lib_name" >&5
+echo "configure:101539: checking for iconv in -l$iconv_lib_name" >&5
ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -101492,7 +101543,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$iconv_lib_name $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 101496 "configure"
+#line 101547 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -101503,7 +101554,7 @@ int main() {
iconv()
; return 0; }
EOF
-if { (eval echo configure:101507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:101558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -101692,7 +101743,7 @@ if test "$PHP_XMLRPC" = "yes"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:101696: checking for $ac_word" >&5
+echo "configure:101747: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -101720,21 +101771,21 @@ else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:101724: checking for inline" >&5
+echo "configure:101775: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 101731 "configure"
+#line 101782 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:101738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:101789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -101772,12 +101823,12 @@ EOF
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:101776: checking for ANSI C header files" >&5
+echo "configure:101827: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 101781 "configure"
+#line 101832 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -101785,7 +101836,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:101789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:101840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -101802,7 +101853,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 101806 "configure"
+#line 101857 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -101820,7 +101871,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 101824 "configure"
+#line 101875 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -101841,7 +101892,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 101845 "configure"
+#line 101896 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -101852,7 +101903,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:101856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:101907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -101879,17 +101930,17 @@ for ac_hdr in xmlparse.h xmltok.h stdlib.h strings.h string.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:101883: checking for $ac_hdr" >&5
+echo "configure:101934: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 101888 "configure"
+#line 101939 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:101893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:101944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -101921,7 +101972,7 @@ done
echo $ac_n "checking size of char""... $ac_c" 1>&6
-echo "configure:101925: checking size of char" >&5
+echo "configure:101976: checking size of char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -101929,7 +101980,7 @@ else
ac_cv_sizeof_char=1
else
cat > conftest.$ac_ext <<EOF
-#line 101933 "configure"
+#line 101984 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -101940,7 +101991,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:101944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:101995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_char=`cat conftestval`
else
@@ -101961,7 +102012,7 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:101965: checking size of int" >&5
+echo "configure:102016: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -101969,7 +102020,7 @@ else
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 101973 "configure"
+#line 102024 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -101980,7 +102031,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:101984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:102035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -102000,7 +102051,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:102004: checking size of long" >&5
+echo "configure:102055: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -102008,7 +102059,7 @@ else
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 102012 "configure"
+#line 102063 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -102019,7 +102070,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:102023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:102074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -102039,7 +102090,7 @@ EOF
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:102043: checking size of long long" >&5
+echo "configure:102094: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -102047,7 +102098,7 @@ else
ac_cv_sizeof_long_long=8
else
cat > conftest.$ac_ext <<EOF
-#line 102051 "configure"
+#line 102102 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
@@ -102058,7 +102109,7 @@ int main()
return(0);
}
EOF
-if { (eval echo configure:102062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:102113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long=`cat conftestval`
else
@@ -102078,12 +102129,12 @@ EOF
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:102082: checking for size_t" >&5
+echo "configure:102133: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 102087 "configure"
+#line 102138 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -102111,12 +102162,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:102115: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:102166: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 102120 "configure"
+#line 102171 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -102125,7 +102176,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:102129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:102180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -102146,12 +102197,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:102150: checking for uid_t in sys/types.h" >&5
+echo "configure:102201: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 102155 "configure"
+#line 102206 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -102191,12 +102242,12 @@ for ac_func in \
memcpy memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:102195: checking for $ac_func" >&5
+echo "configure:102246: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 102200 "configure"
+#line 102251 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -102219,7 +102270,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:102223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:102274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -102562,7 +102613,7 @@ elif test "$PHP_XMLRPC" != "no"; then
XMLRPC_DIR=$PHP_XMLRPC/include/xmlrpc-epi
else
echo $ac_n "checking for XMLRPC-EPI in default path""... $ac_c" 1>&6
-echo "configure:102566: checking for XMLRPC-EPI in default path" >&5
+echo "configure:102617: checking for XMLRPC-EPI in default path" >&5
for i in /usr/local /usr; do
if test -r $i/include/xmlrpc.h; then
XMLRPC_DIR=$i/include
@@ -102994,7 +103045,7 @@ fi
php_enable_xmlwriter=yes
echo $ac_n "checking whether to enable XMLWriter support""... $ac_c" 1>&6
-echo "configure:102998: checking whether to enable XMLWriter support" >&5
+echo "configure:103049: checking whether to enable XMLWriter support" >&5
# Check whether --enable-xmlwriter or --disable-xmlwriter was given.
if test "${enable_xmlwriter+set}" = set; then
enableval="$enable_xmlwriter"
@@ -103042,7 +103093,7 @@ if test -z "$PHP_LIBXML_DIR"; then
php_with_libxml_dir=no
echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
-echo "configure:103046: checking libxml2 install dir" >&5
+echo "configure:103097: checking libxml2 install dir" >&5
# Check whether --with-libxml-dir or --without-libxml-dir was given.
if test "${with_libxml_dir+set}" = set; then
withval="$with_libxml_dir"
@@ -103073,7 +103124,7 @@ if test "$PHP_XMLWRITER" != "no"; then
echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
-echo "configure:103077: checking for xml2-config path" >&5
+echo "configure:103128: checking for xml2-config path" >&5
if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -103231,7 +103282,7 @@ echo "$ac_t""$ac_cv_php_xml2_config_path" 1>&6
echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
-echo "configure:103235: checking whether libxml build works" >&5
+echo "configure:103286: checking whether libxml build works" >&5
if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -103247,7 +103298,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 103251 "configure"
+#line 103302 "configure"
#include "confdefs.h"
@@ -103258,7 +103309,7 @@ else
}
EOF
-if { (eval echo configure:103262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:103313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBS=$old_LIBS
@@ -103597,7 +103648,7 @@ fi
php_with_xsl=no
echo $ac_n "checking for XSL support""... $ac_c" 1>&6
-echo "configure:103601: checking for XSL support" >&5
+echo "configure:103652: checking for XSL support" >&5
# Check whether --with-xsl or --without-xsl was given.
if test "${with_xsl+set}" = set; then
withval="$with_xsl"
@@ -103800,7 +103851,7 @@ if test "$PHP_XSL" != "no"; then
echo $ac_n "checking for EXSLT support""... $ac_c" 1>&6
-echo "configure:103804: checking for EXSLT support" >&5
+echo "configure:103855: checking for EXSLT support" >&5
for i in $PHP_XSL /usr/local /usr; do
if test -r "$i/include/libexslt/exslt.h"; then
PHP_XSL_EXSL_DIR=$i
@@ -104265,7 +104316,7 @@ fi
php_enable_zip=no
echo $ac_n "checking for zip archive read/writesupport""... $ac_c" 1>&6
-echo "configure:104269: checking for zip archive read/writesupport" >&5
+echo "configure:104320: checking for zip archive read/writesupport" >&5
# Check whether --enable-zip or --disable-zip was given.
if test "${enable_zip+set}" = set; then
enableval="$enable_zip"
@@ -104313,7 +104364,7 @@ if test -z "$PHP_ZLIB_DIR"; then
php_with_zlib_dir=no
echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
-echo "configure:104317: checking for the location of libz" >&5
+echo "configure:104368: checking for the location of libz" >&5
# Check whether --with-zlib-dir or --without-zlib-dir was given.
if test "${with_zlib_dir+set}" = set; then
withval="$with_zlib_dir"
@@ -104361,7 +104412,7 @@ if test "$PHP_ZIP" != "no"; then
fi
echo $ac_n "checking for the location of zlib""... $ac_c" 1>&6
-echo "configure:104365: checking for the location of zlib" >&5
+echo "configure:104416: checking for the location of zlib" >&5
if test "$PHP_ZLIB_DIR" = "no"; then
{ echo "configure: error: zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located" 1>&2; exit 1; }
else
@@ -104807,6 +104858,35 @@ EOF
PHP_VAR_SUBST="$PHP_VAR_SUBST ZIP_SHARED_LIBADD"
+
+
+
+ header_path=ext/zip/lib
+ for header_file in lib/zip.h lib/zipint.h lib/zip_alias.h lib/zipint_alias.h; do
+ hp_hf="$header_path/$header_file"
+
+
+ unique=`echo $hp_hf|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$INSTALLHEADERS$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "INSTALLHEADERS$unique=set"
+
+ INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
+
+ fi
+
+ done
+
+
+
+
+
+ src=$ext_srcdir/Makefile.frag
+ ac_srcdir=$ext_srcdir
+ ac_builddir=$ext_builddir
+ test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
+
fi
@@ -104878,7 +104958,7 @@ fi
php_with_pear=DEFAULT
echo $ac_n "checking whether to install PEAR""... $ac_c" 1>&6
-echo "configure:104882: checking whether to install PEAR" >&5
+echo "configure:104962: checking whether to install PEAR" >&5
# Check whether --with-pear or --without-pear was given.
if test "${with_pear+set}" = set; then
withval="$with_pear"
@@ -104988,7 +105068,7 @@ fi
bison_version=none
if test "$YACC"; then
echo $ac_n "checking for bison version""... $ac_c" 1>&6
-echo "configure:104992: checking for bison version" >&5
+echo "configure:105072: checking for bison version" >&5
if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -105045,17 +105125,17 @@ dlfcn.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:105049: checking for $ac_hdr" >&5
+echo "configure:105129: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105054 "configure"
+#line 105134 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:105059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:105139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -105083,12 +105163,12 @@ done
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:105087: checking for size_t" >&5
+echo "configure:105167: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105092 "configure"
+#line 105172 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -105116,12 +105196,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:105120: checking return type of signal handlers" >&5
+echo "configure:105200: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105125 "configure"
+#line 105205 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -105138,7 +105218,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:105142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:105222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -105162,12 +105242,12 @@ EOF
echo $ac_n "checking for uint""... $ac_c" 1>&6
-echo "configure:105166: checking for uint" >&5
+echo "configure:105246: checking for uint" >&5
if eval "test \"`echo '$''{'ac_cv_type_uint'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105171 "configure"
+#line 105251 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -105195,12 +105275,12 @@ EOF
fi
echo $ac_n "checking for ulong""... $ac_c" 1>&6
-echo "configure:105199: checking for ulong" >&5
+echo "configure:105279: checking for ulong" >&5
if eval "test \"`echo '$''{'ac_cv_type_ulong'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105204 "configure"
+#line 105284 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -105230,9 +105310,9 @@ fi
echo $ac_n "checking for int32_t""... $ac_c" 1>&6
-echo "configure:105234: checking for int32_t" >&5
+echo "configure:105314: checking for int32_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 105236 "configure"
+#line 105316 "configure"
#include "confdefs.h"
#if HAVE_SYS_TYPES_H
@@ -105251,7 +105331,7 @@ if (sizeof (int32_t))
; return 0; }
EOF
-if { (eval echo configure:105255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:105335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<EOF
@@ -105270,9 +105350,9 @@ fi
rm -f conftest*
echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
-echo "configure:105274: checking for uint32_t" >&5
+echo "configure:105354: checking for uint32_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 105276 "configure"
+#line 105356 "configure"
#include "confdefs.h"
#if HAVE_SYS_TYPES_H
@@ -105291,7 +105371,7 @@ if (sizeof (uint32_t))
; return 0; }
EOF
-if { (eval echo configure:105295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:105375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<EOF
@@ -105310,12 +105390,12 @@ fi
rm -f conftest*
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:105314: checking for vprintf" >&5
+echo "configure:105394: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105319 "configure"
+#line 105399 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@@ -105338,7 +105418,7 @@ vprintf();
; return 0; }
EOF
-if { (eval echo configure:105342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:105422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@@ -105362,12 +105442,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:105366: checking for _doprnt" >&5
+echo "configure:105446: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105371 "configure"
+#line 105451 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@@ -105390,7 +105470,7 @@ _doprnt();
; return 0; }
EOF
-if { (eval echo configure:105394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:105474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@@ -105415,7 +105495,7 @@ fi
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:105419: checking for 8-bit clean memcmp" >&5
+echo "configure:105499: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -105423,7 +105503,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 105427 "configure"
+#line 105507 "configure"
#include "confdefs.h"
main()
@@ -105433,7 +105513,7 @@ main()
}
EOF
-if { (eval echo configure:105437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:105517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -105453,19 +105533,19 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:105457: checking for working alloca.h" >&5
+echo "configure:105537: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105462 "configure"
+#line 105542 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:105469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:105549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -105486,12 +105566,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:105490: checking for alloca" >&5
+echo "configure:105570: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105495 "configure"
+#line 105575 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -105519,7 +105599,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:105523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:105603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -105551,12 +105631,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:105555: checking whether alloca needs Cray hooks" >&5
+echo "configure:105635: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105560 "configure"
+#line 105640 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -105581,12 +105661,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:105585: checking for $ac_func" >&5
+echo "configure:105665: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105590 "configure"
+#line 105670 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -105609,7 +105689,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:105613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:105693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -105636,7 +105716,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:105640: checking stack direction for C alloca" >&5
+echo "configure:105720: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -105644,7 +105724,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 105648 "configure"
+#line 105728 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -105663,7 +105743,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:105667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:105747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -105687,12 +105767,12 @@ fi
for ac_func in memcpy strdup getpid kill strtod strtol finite fpclass
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:105691: checking for $ac_func" >&5
+echo "configure:105771: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105696 "configure"
+#line 105776 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -105715,7 +105795,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:105719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:105799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -105741,7 +105821,7 @@ done
echo $ac_n "checking whether sprintf is broken""... $ac_c" 1>&6
-echo "configure:105745: checking whether sprintf is broken" >&5
+echo "configure:105825: checking whether sprintf is broken" >&5
if eval "test \"`echo '$''{'ac_cv_broken_sprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -105752,11 +105832,11 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 105756 "configure"
+#line 105836 "configure"
#include "confdefs.h"
main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }
EOF
-if { (eval echo configure:105760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:105840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_broken_sprintf=no
@@ -105790,12 +105870,12 @@ EOF
for ac_func in finite isfinite isinf isnan
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:105794: checking for $ac_func" >&5
+echo "configure:105874: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105799 "configure"
+#line 105879 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -105818,7 +105898,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:105822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:105902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -105845,13 +105925,13 @@ done
echo $ac_n "checking whether fp_except is defined""... $ac_c" 1>&6
-echo "configure:105849: checking whether fp_except is defined" >&5
+echo "configure:105929: checking whether fp_except is defined" >&5
if eval "test \"`echo '$''{'ac_cv_type_fp_except'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105855 "configure"
+#line 105935 "configure"
#include "confdefs.h"
#include <floatingpoint.h>
@@ -105862,7 +105942,7 @@ fp_except x = (fp_except) 0;
; return 0; }
EOF
-if { (eval echo configure:105866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:105946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_fp_except=yes
@@ -105892,17 +105972,17 @@ for ac_hdr in dlfcn.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:105896: checking for $ac_hdr" >&5
+echo "configure:105976: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 105901 "configure"
+#line 105981 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:105906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:105986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -105930,14 +106010,14 @@ done
echo $ac_n "checking whether dlsym() requires a leading underscore in symbol names""... $ac_c" 1>&6
-echo "configure:105934: checking whether dlsym() requires a leading underscore in symbol names" >&5
+echo "configure:106014: checking whether dlsym() requires a leading underscore in symbol names" >&5
if test "$cross_compiling" = yes; then :
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 105941 "configure"
+#line 106021 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -105998,7 +106078,7 @@ int main ()
exit (status);
}
EOF
- if { (eval echo configure:106002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ if { (eval echo configure:106082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -106081,23 +106161,23 @@ fi
echo $ac_n "checking virtual machine dispatch method""... $ac_c" 1>&6
-echo "configure:106085: checking virtual machine dispatch method" >&5
+echo "configure:106165: checking virtual machine dispatch method" >&5
echo "$ac_t""$PHP_ZEND_VM" 1>&6
echo $ac_n "checking whether to enable thread-safety""... $ac_c" 1>&6
-echo "configure:106089: checking whether to enable thread-safety" >&5
+echo "configure:106169: checking whether to enable thread-safety" >&5
echo "$ac_t""$ZEND_MAINTAINER_ZTS" 1>&6
echo $ac_n "checking whether to enable inline optimization for GCC""... $ac_c" 1>&6
-echo "configure:106093: checking whether to enable inline optimization for GCC" >&5
+echo "configure:106173: checking whether to enable inline optimization for GCC" >&5
echo "$ac_t""$ZEND_INLINE_OPTIMIZATION" 1>&6
echo $ac_n "checking whether to enable Zend debugging""... $ac_c" 1>&6
-echo "configure:106097: checking whether to enable Zend debugging" >&5
+echo "configure:106177: checking whether to enable Zend debugging" >&5
echo "$ac_t""$ZEND_DEBUG" 1>&6
echo $ac_n "checking whether to enable Zend multibyte""... $ac_c" 1>&6
-echo "configure:106101: checking whether to enable Zend multibyte" >&5
+echo "configure:106181: checking whether to enable Zend multibyte" >&5
echo "$ac_t""$ZEND_MULTIBYTE" 1>&6
case $PHP_ZEND_VM in
@@ -106170,21 +106250,21 @@ fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:106174: checking for inline" >&5
+echo "configure:106254: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 106181 "configure"
+#line 106261 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:106188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:106268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -106213,7 +106293,7 @@ esac
echo $ac_n "checking target system is Darwin""... $ac_c" 1>&6
-echo "configure:106217: checking target system is Darwin" >&5
+echo "configure:106297: checking target system is Darwin" >&5
if echo "$target" | grep "darwin" > /dev/null; then
cat >> confdefs.h <<\EOF
#define DARWIN 1
@@ -106225,7 +106305,7 @@ else
fi
echo $ac_n "checking for MM alignment and log values""... $ac_c" 1>&6
-echo "configure:106229: checking for MM alignment and log values" >&5
+echo "configure:106309: checking for MM alignment and log values" >&5
if test "$cross_compiling" = yes; then
@@ -106233,7 +106313,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 106237 "configure"
+#line 106317 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -106269,7 +106349,7 @@ int main()
}
EOF
-if { (eval echo configure:106273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:106353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1`
@@ -106294,7 +106374,7 @@ fi
echo "$ac_t""done" 1>&6
echo $ac_n "checking for memory allocation using mmap(MAP_ANON)""... $ac_c" 1>&6
-echo "configure:106298: checking for memory allocation using mmap(MAP_ANON)" >&5
+echo "configure:106378: checking for memory allocation using mmap(MAP_ANON)" >&5
if test "$cross_compiling" = yes; then
@@ -106302,7 +106382,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 106306 "configure"
+#line 106386 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -106338,7 +106418,7 @@ int main()
}
EOF
-if { (eval echo configure:106342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:106422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
@@ -106360,7 +106440,7 @@ fi
echo $ac_n "checking for memory allocation using mmap("/dev/zero")""... $ac_c" 1>&6
-echo "configure:106364: checking for memory allocation using mmap("/dev/zero")" >&5
+echo "configure:106444: checking for memory allocation using mmap("/dev/zero")" >&5
if test "$cross_compiling" = yes; then
@@ -106368,7 +106448,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 106372 "configure"
+#line 106452 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -106414,7 +106494,7 @@ int main()
}
EOF
-if { (eval echo configure:106418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:106498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
@@ -106438,12 +106518,12 @@ fi
for ac_func in mremap
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:106442: checking for $ac_func" >&5
+echo "configure:106522: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 106447 "configure"
+#line 106527 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -106466,7 +106546,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:106470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:106550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -106533,17 +106613,17 @@ for ac_hdr in stdarg.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:106537: checking for $ac_hdr" >&5
+echo "configure:106617: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 106542 "configure"
+#line 106622 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:106547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:106627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -106620,7 +106700,7 @@ if test "$TSRM_PTH" != "no"; then
echo $ac_n "checking for GNU Pth""... $ac_c" 1>&6
-echo "configure:106624: checking for GNU Pth" >&5
+echo "configure:106704: checking for GNU Pth" >&5
PTH_PREFIX="`$TSRM_PTH --prefix`"
if test -z "$PTH_PREFIX"; then
echo "$ac_t""Please check your Pth installation" 1>&6
@@ -106650,17 +106730,17 @@ elif test "$TSRM_ST" != "no"; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:106654: checking for $ac_hdr" >&5
+echo "configure:106734: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 106659 "configure"
+#line 106739 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:106664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:106744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -106690,7 +106770,7 @@ done
LIBS="$LIBS -lst"
echo $ac_n "checking for SGI's State Threads""... $ac_c" 1>&6
-echo "configure:106694: checking for SGI's State Threads" >&5
+echo "configure:106774: checking for SGI's State Threads" >&5
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define TSRM_ST 1
@@ -106729,7 +106809,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 106733 "configure"
+#line 106813 "configure"
#include "confdefs.h"
#include <pthread.h>
@@ -106747,7 +106827,7 @@ int main() {
return pthread_create(&thd, NULL, thread_routine, &data);
}
EOF
-if { (eval echo configure:106751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:106831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
pthreads_working=yes
@@ -106767,7 +106847,7 @@ fi
CFLAGS=$save_CFLAGS
echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6
-echo "configure:106771: checking for pthreads_cflags" >&5
+echo "configure:106851: checking for pthreads_cflags" >&5
if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -106789,7 +106869,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 106793 "configure"
+#line 106873 "configure"
#include "confdefs.h"
#include <pthread.h>
@@ -106807,7 +106887,7 @@ int main() {
return pthread_create(&thd, NULL, thread_routine, &data);
}
EOF
-if { (eval echo configure:106811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:106891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
pthreads_working=yes
@@ -106837,7 +106917,7 @@ fi
echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6
echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6
-echo "configure:106841: checking for pthreads_lib" >&5
+echo "configure:106921: checking for pthreads_lib" >&5
if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -106859,7 +106939,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
-#line 106863 "configure"
+#line 106943 "configure"
#include "confdefs.h"
#include <pthread.h>
@@ -106877,7 +106957,7 @@ int main() {
return pthread_create(&thd, NULL, thread_routine, &data);
}
EOF
-if { (eval echo configure:106881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:106961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
pthreads_working=yes
@@ -106928,7 +107008,7 @@ EOF
echo $ac_n "checking for POSIX threads""... $ac_c" 1>&6
-echo "configure:106932: checking for POSIX threads" >&5
+echo "configure:107012: checking for POSIX threads" >&5
echo "$ac_t""yes" 1>&6
fi
@@ -107541,7 +107621,7 @@ fi
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:107545: checking build system type" >&5
+echo "configure:107625: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -107570,7 +107650,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6
-echo "configure:107574: checking for ld used by $CC" >&5
+echo "configure:107654: checking for ld used by $CC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -107600,10 +107680,10 @@ echo "configure:107574: checking for ld used by $CC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:107604: checking for GNU ld" >&5
+echo "configure:107684: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:107607: checking for non-GNU ld" >&5
+echo "configure:107687: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -107642,7 +107722,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:107646: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:107726: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -107662,7 +107742,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:107666: checking for $LD option to reload object files" >&5
+echo "configure:107746: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -107687,7 +107767,7 @@ case $host_os in
esac
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:107691: checking for BSD-compatible nm" >&5
+echo "configure:107771: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -107733,7 +107813,7 @@ echo "$ac_t""$lt_cv_path_NM" 1>&6
NM="$lt_cv_path_NM"
echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
-echo "configure:107737: checking how to recognise dependent libraries" >&5
+echo "configure:107817: checking how to recognise dependent libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -107911,13 +107991,13 @@ deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:107915: checking for object suffix" >&5
+echo "configure:107995: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:107921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:108001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -107937,7 +108017,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:107941: checking for executable suffix" >&5
+echo "configure:108021: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -107947,7 +108027,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:107951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:108031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
@@ -107990,7 +108070,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:107994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:108074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -108004,8 +108084,8 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 108008 "configure"' > conftest.$ac_ext
- if { (eval echo configure:108009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 108088 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:108089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
@@ -108038,7 +108118,7 @@ ia64-*-hpux*)
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:108042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:108122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
@@ -108082,7 +108162,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:108086: checking whether the C compiler needs -belf" >&5
+echo "configure:108166: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108095,14 +108175,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 108099 "configure"
+#line 108179 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:108106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:108186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -108140,7 +108220,7 @@ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
(test "X$CXX" != "Xg++"))) ; then
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:108144: checking how to run the C++ preprocessor" >&5
+echo "configure:108224: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -108153,12 +108233,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 108157 "configure"
+#line 108237 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:108162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:108242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -108189,7 +108269,7 @@ fi
# find the maximum length of command line arguments
echo $ac_n "checking the maximum length of command line arguments""... $ac_c" 1>&6
-echo "configure:108193: checking the maximum length of command line arguments" >&5
+echo "configure:108273: checking the maximum length of command line arguments" >&5
if eval "test \"`echo '$''{'lt_cv_sys_max_cmd_len'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108290,7 +108370,7 @@ fi
# Check for command to grab the raw symbol name followed by C symbol from nm.
echo $ac_n "checking command to parse $NM output from $compiler object""... $ac_c" 1>&6
-echo "configure:108294: checking command to parse $NM output from $compiler object" >&5
+echo "configure:108374: checking command to parse $NM output from $compiler object" >&5
if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108385,10 +108465,10 @@ void nm_test_func(){}
int main(){nm_test_var='a';nm_test_func();return(0);}
EOF
- if { (eval echo configure:108389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:108469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
# Now try to grab the symbols.
nlist=conftest.nm
- if { (eval echo configure:108392: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
+ if { (eval echo configure:108472: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
@@ -108439,7 +108519,7 @@ EOF
lt_save_CFLAGS="$CFLAGS"
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { (eval echo configure:108443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ if { (eval echo configure:108523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
LIBS="$lt_save_LIBS"
@@ -108479,7 +108559,7 @@ else
fi
echo $ac_n "checking for objdir""... $ac_c" 1>&6
-echo "configure:108483: checking for objdir" >&5
+echo "configure:108563: checking for objdir" >&5
if eval "test \"`echo '$''{'lt_cv_objdir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108545,7 +108625,7 @@ with_gnu_ld="$lt_cv_prog_gnu_ld"
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108549: checking for $ac_word" >&5
+echo "configure:108629: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108577,7 +108657,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108581: checking for $ac_word" >&5
+echo "configure:108661: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108612,7 +108692,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108616: checking for $ac_word" >&5
+echo "configure:108696: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108644,7 +108724,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108648: checking for $ac_word" >&5
+echo "configure:108728: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108679,7 +108759,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108683: checking for $ac_word" >&5
+echo "configure:108763: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108711,7 +108791,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:108715: checking for $ac_word" >&5
+echo "configure:108795: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108797,7 +108877,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:108801: checking for ${ac_tool_prefix}file" >&5
+echo "configure:108881: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -108857,7 +108937,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:108861: checking for file" >&5
+echo "configure:108941: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -109016,7 +109096,7 @@ fi
# Check to make sure the static flag actually works.
#
echo $ac_n "checking if $compiler static flag $lt_prog_compiler_static works""... $ac_c" 1>&6
-echo "configure:109020: checking if $compiler static flag $lt_prog_compiler_static works" >&5
+echo "configure:109100: checking if $compiler static flag $lt_prog_compiler_static works" >&5
if eval "test \"`echo '$''{'lt_prog_compiler_static_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -109066,7 +109146,7 @@ if test "$GCC" = yes; then
echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
-echo "configure:109070: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo "configure:109150: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
if eval "test \"`echo '$''{'lt_cv_prog_compiler_rtti_exceptions'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -109083,11 +109163,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:109087: $lt_compile\"" >&5)
+ (eval echo "\"configure:109167: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:109091: \$? = $ac_status" >&5
+ echo "configure:109171: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -109116,7 +109196,7 @@ lt_prog_compiler_pic=
lt_prog_compiler_static=
echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
-echo "configure:109120: checking for $compiler option to produce PIC" >&5
+echo "configure:109200: checking for $compiler option to produce PIC" >&5
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
@@ -109327,7 +109407,7 @@ echo "$ac_t""$lt_prog_compiler_pic" 1>&6
if test -n "$lt_prog_compiler_pic"; then
echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic works""... $ac_c" 1>&6
-echo "configure:109331: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo "configure:109411: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
if eval "test \"`echo '$''{'lt_prog_compiler_pic_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -109344,11 +109424,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:109348: $lt_compile\"" >&5)
+ (eval echo "\"configure:109428: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:109352: \$? = $ac_status" >&5
+ echo "configure:109432: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -109386,7 +109466,7 @@ case $host_os in
esac
echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
-echo "configure:109390: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo "configure:109470: checking if $compiler supports -c -o file.$ac_objext" >&5
if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -109406,11 +109486,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:109410: $lt_compile\"" >&5)
+ (eval echo "\"configure:109490: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "configure:109414: \$? = $ac_status" >&5
+ echo "configure:109494: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -109440,7 +109520,7 @@ hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
-echo "configure:109444: checking if we can lock with hard links" >&5
+echo "configure:109524: checking if we can lock with hard links" >&5
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
@@ -109457,7 +109537,7 @@ else
fi
echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:109461: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo "configure:109541: checking whether the $compiler linker ($LD) supports shared libraries" >&5
runpath_var=
allow_undefined_flag=
@@ -109810,12 +109890,12 @@ EOF
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 109814 "configure"
+#line 109894 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:109819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:109899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -109841,12 +109921,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 109845 "configure"
+#line 109925 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:109850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:109930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -110318,11 +110398,11 @@ x|xyes)
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
-echo "configure:110322: checking whether -lc should be explicitly linked in" >&5
+echo "configure:110402: checking whether -lc should be explicitly linked in" >&5
$rm conftest*
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- if { (eval echo configure:110326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
+ if { (eval echo configure:110406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
soname=conftest
lib=conftest
libobjs=conftest.$ac_objext
@@ -110335,7 +110415,7 @@ echo "configure:110322: checking whether -lc should be explicitly linked in" >&5
libname=conftest
lt_save_allow_undefined_flag=$allow_undefined_flag
allow_undefined_flag=
- if { (eval echo configure:110339: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
+ if { (eval echo configure:110419: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
then
archive_cmds_need_lc=no
else
@@ -110354,7 +110434,7 @@ echo "configure:110322: checking whether -lc should be explicitly linked in" >&5
esac
echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
-echo "configure:110358: checking dynamic linker characteristics" >&5
+echo "configure:110438: checking dynamic linker characteristics" >&5
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -110728,8 +110808,8 @@ linux*)
libsuff=
case $host_cpu in
x86_64*|s390x*|powerpc64*)
- echo '#line 110732 "configure"' > conftest.$ac_ext
- if { (eval echo configure:110733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 110812 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:110813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*64-bit*)
libsuff=64
@@ -110928,7 +111008,7 @@ echo "$ac_t""$dynamic_linker" 1>&6
test "$dynamic_linker" = no && can_build_shared=no
echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
-echo "configure:110932: checking how to hardcode library paths into programs" >&5
+echo "configure:111012: checking how to hardcode library paths into programs" >&5
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \
test -n "$runpath_var" || \
@@ -110966,7 +111046,7 @@ fi
striplib=
old_striplib=
echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
-echo "configure:110970: checking whether stripping libraries is possible" >&5
+echo "configure:111050: checking whether stripping libraries is possible" >&5
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
@@ -111016,7 +111096,7 @@ else
darwin*)
# if libdl is installed we need to link against it
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:111020: checking for dlopen in -ldl" >&5
+echo "configure:111100: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -111024,7 +111104,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 111028 "configure"
+#line 111108 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -111035,7 +111115,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:111039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -111064,12 +111144,12 @@ fi
*)
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "configure:111068: checking for shl_load" >&5
+echo "configure:111148: checking for shl_load" >&5
if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 111073 "configure"
+#line 111153 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shl_load(); below. */
@@ -111092,7 +111172,7 @@ shl_load();
; return 0; }
EOF
-if { (eval echo configure:111096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shl_load=yes"
else
@@ -111110,7 +111190,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:111114: checking for shl_load in -ldld" >&5
+echo "configure:111194: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -111118,7 +111198,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 111122 "configure"
+#line 111202 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -111129,7 +111209,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:111133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -111148,12 +111228,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:111152: checking for dlopen" >&5
+echo "configure:111232: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 111157 "configure"
+#line 111237 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -111176,7 +111256,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:111180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -111194,7 +111274,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:111198: checking for dlopen in -ldl" >&5
+echo "configure:111278: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -111202,7 +111282,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 111206 "configure"
+#line 111286 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -111213,7 +111293,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:111217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -111232,7 +111312,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "configure:111236: checking for dlopen in -lsvld" >&5
+echo "configure:111316: checking for dlopen in -lsvld" >&5
ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -111240,7 +111320,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsvld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 111244 "configure"
+#line 111324 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -111251,7 +111331,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:111255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -111270,7 +111350,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:111274: checking for dld_link in -ldld" >&5
+echo "configure:111354: checking for dld_link in -ldld" >&5
ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -111278,7 +111358,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 111282 "configure"
+#line 111362 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -111289,7 +111369,7 @@ int main() {
dld_link()
; return 0; }
EOF
-if { (eval echo configure:111293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:111373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -111345,7 +111425,7 @@ fi
LIBS="$lt_cv_dlopen_libs $LIBS"
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "configure:111349: checking whether a program can dlopen itself" >&5
+echo "configure:111429: checking whether a program can dlopen itself" >&5
if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -111355,7 +111435,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 111359 "configure"
+#line 111439 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -111416,7 +111496,7 @@ int main ()
exit (status);
}
EOF
- if { (eval echo configure:111420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ if { (eval echo configure:111500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -111439,7 +111519,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6
if test "x$lt_cv_dlopen_self" = xyes; then
LDFLAGS="$LDFLAGS $link_static_flag"
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "configure:111443: checking whether a statically linked program can dlopen itself" >&5
+echo "configure:111523: checking whether a statically linked program can dlopen itself" >&5
if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -111449,7 +111529,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 111453 "configure"
+#line 111533 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -111510,7 +111590,7 @@ int main ()
exit (status);
}
EOF
- if { (eval echo configure:111514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ if { (eval echo configure:111594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -111551,11 +111631,11 @@ fi
# Report which librarie types wil actually be built
echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
-echo "configure:111555: checking if libtool supports shared libraries" >&5
+echo "configure:111635: checking if libtool supports shared libraries" >&5
echo "$ac_t""$can_build_shared" 1>&6
echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
-echo "configure:111559: checking whether to build shared libraries" >&5
+echo "configure:111639: checking whether to build shared libraries" >&5
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -111578,7 +111658,7 @@ esac
echo "$ac_t""$enable_shared" 1>&6
echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
-echo "configure:111582: checking whether to build static libraries" >&5
+echo "configure:111662: checking whether to build static libraries" >&5
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
echo "$ac_t""$enable_static" 1>&6
@@ -112247,7 +112327,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6
-echo "configure:112251: checking for ld used by $CC" >&5
+echo "configure:112331: checking for ld used by $CC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -112277,10 +112357,10 @@ echo "configure:112251: checking for ld used by $CC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:112281: checking for GNU ld" >&5
+echo "configure:112361: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:112284: checking for non-GNU ld" >&5
+echo "configure:112364: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -112319,7 +112399,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:112323: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:112403: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -112385,7 +112465,7 @@ fi
# PORTME: fill in a description of your system's C++ link characteristics
echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:112389: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo "configure:112469: checking whether the $compiler linker ($LD) supports shared libraries" >&5
ld_shlibs_CXX=yes
case $host_os in
aix3*)
@@ -112481,12 +112561,12 @@ case $host_os in
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 112485 "configure"
+#line 112565 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:112490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:112570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -112513,12 +112593,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 112517 "configure"
+#line 112597 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:112522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:112602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
@@ -113225,7 +113305,7 @@ private:
};
EOF
-if { (eval echo configure:113229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:113309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
# Parse the compiler output and extract the necessary
# objects, libraries and library flags.
@@ -113335,7 +113415,7 @@ lt_prog_compiler_pic_CXX=
lt_prog_compiler_static_CXX=
echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
-echo "configure:113339: checking for $compiler option to produce PIC" >&5
+echo "configure:113419: checking for $compiler option to produce PIC" >&5
# C++ specific cases for pic, static, wl, etc.
if test "$GXX" = yes; then
@@ -113610,7 +113690,7 @@ echo "$ac_t""$lt_prog_compiler_pic_CXX" 1>&6
if test -n "$lt_prog_compiler_pic_CXX"; then
echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works""... $ac_c" 1>&6
-echo "configure:113614: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo "configure:113694: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
if eval "test \"`echo '$''{'lt_prog_compiler_pic_works_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -113627,11 +113707,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:113631: $lt_compile\"" >&5)
+ (eval echo "\"configure:113711: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:113635: \$? = $ac_status" >&5
+ echo "configure:113715: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -113669,7 +113749,7 @@ case $host_os in
esac
echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
-echo "configure:113673: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo "configure:113753: checking if $compiler supports -c -o file.$ac_objext" >&5
if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -113689,11 +113769,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:113693: $lt_compile\"" >&5)
+ (eval echo "\"configure:113773: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "configure:113697: \$? = $ac_status" >&5
+ echo "configure:113777: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -113723,7 +113803,7 @@ hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
-echo "configure:113727: checking if we can lock with hard links" >&5
+echo "configure:113807: checking if we can lock with hard links" >&5
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
@@ -113740,7 +113820,7 @@ else
fi
echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:113744: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo "configure:113824: checking whether the $compiler linker ($LD) supports shared libraries" >&5
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
@@ -113790,11 +113870,11 @@ x|xyes)
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
-echo "configure:113794: checking whether -lc should be explicitly linked in" >&5
+echo "configure:113874: checking whether -lc should be explicitly linked in" >&5
$rm conftest*
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- if { (eval echo configure:113798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
+ if { (eval echo configure:113878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
soname=conftest
lib=conftest
libobjs=conftest.$ac_objext
@@ -113807,7 +113887,7 @@ echo "configure:113794: checking whether -lc should be explicitly linked in" >&5
libname=conftest
lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
allow_undefined_flag_CXX=
- if { (eval echo configure:113811: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
+ if { (eval echo configure:113891: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
then
archive_cmds_need_lc_CXX=no
else
@@ -113826,7 +113906,7 @@ echo "configure:113794: checking whether -lc should be explicitly linked in" >&5
esac
echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
-echo "configure:113830: checking dynamic linker characteristics" >&5
+echo "configure:113910: checking dynamic linker characteristics" >&5
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -114200,8 +114280,8 @@ linux*)
libsuff=
case $host_cpu in
x86_64*|s390x*|powerpc64*)
- echo '#line 114204 "configure"' > conftest.$ac_ext
- if { (eval echo configure:114205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 114284 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:114285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*64-bit*)
libsuff=64
@@ -114400,7 +114480,7 @@ echo "$ac_t""$dynamic_linker" 1>&6
test "$dynamic_linker" = no && can_build_shared=no
echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
-echo "configure:114404: checking how to hardcode library paths into programs" >&5
+echo "configure:114484: checking how to hardcode library paths into programs" >&5
hardcode_action_CXX=
if test -n "$hardcode_libdir_flag_spec_CXX" || \
test -n "$runpath_var_CXX" || \
@@ -114438,7 +114518,7 @@ fi
striplib=
old_striplib=
echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
-echo "configure:114442: checking whether stripping libraries is possible" >&5
+echo "configure:114522: checking whether stripping libraries is possible" >&5
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
@@ -114488,7 +114568,7 @@ else
darwin*)
# if libdl is installed we need to link against it
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:114492: checking for dlopen in -ldl" >&5
+echo "configure:114572: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -114496,7 +114576,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 114500 "configure"
+#line 114580 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -114510,7 +114590,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:114514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:114594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -114539,12 +114619,12 @@ fi
*)
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "configure:114543: checking for shl_load" >&5
+echo "configure:114623: checking for shl_load" >&5
if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 114548 "configure"
+#line 114628 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shl_load(); below. */
@@ -114570,7 +114650,7 @@ shl_load();
; return 0; }
EOF
-if { (eval echo configure:114574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:114654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shl_load=yes"
else
@@ -114588,7 +114668,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:114592: checking for shl_load in -ldld" >&5
+echo "configure:114672: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -114596,7 +114676,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 114600 "configure"
+#line 114680 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -114610,7 +114690,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:114614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:114694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -114629,12 +114709,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:114633: checking for dlopen" >&5
+echo "configure:114713: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 114638 "configure"
+#line 114718 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -114660,7 +114740,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:114664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:114744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -114678,7 +114758,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:114682: checking for dlopen in -ldl" >&5
+echo "configure:114762: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -114686,7 +114766,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 114690 "configure"
+#line 114770 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -114700,7 +114780,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:114704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:114784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -114719,7 +114799,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "configure:114723: checking for dlopen in -lsvld" >&5
+echo "configure:114803: checking for dlopen in -lsvld" >&5
ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -114727,7 +114807,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsvld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 114731 "configure"
+#line 114811 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -114741,7 +114821,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:114745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:114825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -114760,7 +114840,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:114764: checking for dld_link in -ldld" >&5
+echo "configure:114844: checking for dld_link in -ldld" >&5
ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -114768,7 +114848,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 114772 "configure"
+#line 114852 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -114782,7 +114862,7 @@ int main() {
dld_link()
; return 0; }
EOF
-if { (eval echo configure:114786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:114866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -114838,7 +114918,7 @@ fi
LIBS="$lt_cv_dlopen_libs $LIBS"
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "configure:114842: checking whether a program can dlopen itself" >&5
+echo "configure:114922: checking whether a program can dlopen itself" >&5
if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -114848,7 +114928,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 114852 "configure"
+#line 114932 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -114909,7 +114989,7 @@ int main ()
exit (status);
}
EOF
- if { (eval echo configure:114913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ if { (eval echo configure:114993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -114932,7 +115012,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6
if test "x$lt_cv_dlopen_self" = xyes; then
LDFLAGS="$LDFLAGS $link_static_flag"
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "configure:114936: checking whether a statically linked program can dlopen itself" >&5
+echo "configure:115016: checking whether a statically linked program can dlopen itself" >&5
if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -114942,7 +115022,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 114946 "configure"
+#line 115026 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -115003,7 +115083,7 @@ int main ()
exit (status);
}
EOF
- if { (eval echo configure:115007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ if { (eval echo configure:115087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
diff --git a/configure.in b/configure.in
index ea4a00d34..8cdbe1a1b 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.579.2.52.2.83 2007/11/08 13:44:11 iliaa Exp $ -*- autoconf -*-
+## $Id: configure.in,v 1.579.2.52.2.97 2008/04/30 18:27:55 iliaa Exp $ -*- autoconf -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h)
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=2
-PHP_RELEASE_VERSION=5
+PHP_RELEASE_VERSION=6
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index b09b5f50e..d99a16a33 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: bcmath.c,v 1.62.2.2.2.8 2007/06/08 00:41:57 iliaa Exp $ */
+/* $Id: bcmath.c,v 1.62.2.2.2.9 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h
index c3d4b6915..097dc2812 100644
--- a/ext/bcmath/php_bcmath.h
+++ b/ext/bcmath/php_bcmath.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_bcmath.h,v 1.20.2.1.2.2 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: php_bcmath.h,v 1.20.2.1.2.3 2007/12/31 07:20:04 sebastian Exp $ */
#ifndef PHP_BCMATH_H
#define PHP_BCMATH_H
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 1b1d38d70..74edd2d7a 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: bz2.c,v 1.14.2.3.2.12 2007/03/14 03:50:18 iliaa Exp $ */
+/* $Id: bz2.c,v 1.14.2.3.2.13 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c
index eaca6cd48..63ca109f2 100644
--- a/ext/bz2/bz2_filter.c
+++ b/ext/bz2/bz2_filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: bz2_filter.c,v 1.3.2.2.2.5 2007/08/09 23:27:22 iliaa Exp $ */
+/* $Id: bz2_filter.c,v 1.3.2.2.2.9 2008/01/12 22:04:03 cellog Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -101,11 +101,6 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
consumed += desired;
bin += desired;
- if (!desired) {
- flags |= PSFS_FLAG_FLUSH_CLOSE;
- break;
- }
-
if (data->strm.avail_out < data->outbuf_len) {
php_stream_bucket *out_bucket;
size_t bucketlen = data->outbuf_len - data->strm.avail_out;
@@ -114,6 +109,10 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
data->strm.avail_out = data->outbuf_len;
data->strm.next_out = data->outbuf;
exit_status = PSFS_PASS_ON;
+ } else if (status == BZ_STREAM_END && data->strm.avail_out >= data->outbuf_len) {
+ /* no more data to decompress, and nothing was spat out */
+ php_stream_bucket_delref(bucket TSRMLS_CC);
+ return PSFS_PASS_ON;
}
}
php_stream_bucket_delref(bucket TSRMLS_CC);
@@ -132,6 +131,8 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
data->strm.avail_out = data->outbuf_len;
data->strm.next_out = data->outbuf;
exit_status = PSFS_PASS_ON;
+ } else if (status == BZ_OK) {
+ break;
}
}
}
diff --git a/ext/bz2/php_bz2.h b/ext/bz2/php_bz2.h
index a547f8c5c..fe3132ef4 100644
--- a/ext/bz2/php_bz2.h
+++ b/ext/bz2/php_bz2.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_bz2.h,v 1.7.2.1.2.4 2007/09/12 11:44:25 jani Exp $ */
+/* $Id: php_bz2.h,v 1.7.2.1.2.5 2007/12/31 07:20:04 sebastian Exp $ */
#ifndef PHP_BZ2_H
#define PHP_BZ2_H
diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c
index 4efe16eee..be0e0c5a2 100644
--- a/ext/calendar/cal_unix.c
+++ b/ext/calendar/cal_unix.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c
index 2e914ae42..b20edb5e0 100644
--- a/ext/calendar/calendar.c
+++ b/ext/calendar/calendar.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
| Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: calendar.c,v 1.46.2.2.2.4 2007/02/16 18:32:38 stas Exp $ */
+/* $Id: calendar.c,v 1.46.2.2.2.5 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c
index ed28931ae..bd787de42 100644
--- a/ext/calendar/easter.c
+++ b/ext/calendar/easter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c
index 28b4b2ec5..473c34a37 100644
--- a/ext/com_dotnet/com_com.c
+++ b/ext/com_dotnet/com_com.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_com.c,v 1.16.2.2.2.5 2007/04/09 15:32:08 dmitry Exp $ */
+/* $Id: com_com.c,v 1.16.2.2.2.6 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c
index adcb330be..68f0b419e 100644
--- a/ext/com_dotnet/com_dotnet.c
+++ b/ext/com_dotnet/com_dotnet.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_dotnet.c,v 1.14.2.1.2.4 2007/02/21 01:11:11 stas Exp $ */
+/* $Id: com_dotnet.c,v 1.14.2.1.2.5 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c
index ae8b73c73..739943fca 100644
--- a/ext/com_dotnet/com_extension.c
+++ b/ext/com_dotnet/com_extension.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_extension.c,v 1.17.2.2.2.6 2007/03/05 15:49:00 wharmby Exp $ */
+/* $Id: com_extension.c,v 1.17.2.2.2.7 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index e277339d0..388ec7847 100644
--- a/ext/com_dotnet/com_handlers.c
+++ b/ext/com_dotnet/com_handlers.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_handlers.c,v 1.30.2.5.2.6 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: com_handlers.c,v 1.30.2.5.2.7 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_iterator.c b/ext/com_dotnet/com_iterator.c
index 90ab03ef1..9f540cd6a 100644
--- a/ext/com_dotnet/com_iterator.c
+++ b/ext/com_dotnet/com_iterator.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_iterator.c,v 1.9.2.2.2.2 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: com_iterator.c,v 1.9.2.2.2.3 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c
index 7ee866f98..10ac789e7 100644
--- a/ext/com_dotnet/com_misc.c
+++ b/ext/com_dotnet/com_misc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_misc.c,v 1.8.2.2.2.3 2007/02/02 15:44:06 wharmby Exp $ */
+/* $Id: com_misc.c,v 1.8.2.2.2.4 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_olechar.c b/ext/com_dotnet/com_olechar.c
index 651166537..e746fb1a6 100644
--- a/ext/com_dotnet/com_olechar.c
+++ b/ext/com_dotnet/com_olechar.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_olechar.c,v 1.5.2.1.2.3 2007/02/21 01:13:44 stas Exp $ */
+/* $Id: com_olechar.c,v 1.5.2.1.2.4 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c
index 49a21651e..127d86b13 100755
--- a/ext/com_dotnet/com_persist.c
+++ b/ext/com_dotnet/com_persist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_persist.c,v 1.5.2.3.2.2 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: com_persist.c,v 1.5.2.3.2.3 2007/12/31 07:20:04 sebastian Exp $ */
/* Infrastructure for working with persistent COM objects.
* Implements: IStream* wrapper for PHP streams.
diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c
index c08ee5b3a..ec6945418 100644
--- a/ext/com_dotnet/com_saproxy.c
+++ b/ext/com_dotnet/com_saproxy.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_saproxy.c,v 1.15.2.2.2.3 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: com_saproxy.c,v 1.15.2.2.2.4 2007/12/31 07:20:04 sebastian Exp $ */
/* This module implements a SafeArray proxy which is used internally
* by the engine when resolving multi-dimensional array accesses on
diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c
index 25ac81c96..be3e8d159 100644
--- a/ext/com_dotnet/com_typeinfo.c
+++ b/ext/com_dotnet/com_typeinfo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_typeinfo.c,v 1.7.2.1.2.3 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: com_typeinfo.c,v 1.7.2.1.2.4 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c
index b60463b78..4b2b83cf4 100644
--- a/ext/com_dotnet/com_variant.c
+++ b/ext/com_dotnet/com_variant.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_variant.c,v 1.11.2.2.2.6 2007/04/09 15:32:35 dmitry Exp $ */
+/* $Id: com_variant.c,v 1.11.2.2.2.7 2007/12/31 07:20:04 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/com_dotnet/com_wrapper.c b/ext/com_dotnet/com_wrapper.c
index a9f9afd8f..193c5a14f 100644
--- a/ext/com_dotnet/com_wrapper.c
+++ b/ext/com_dotnet/com_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: com_wrapper.c,v 1.9.2.1.2.5 2007/03/05 15:49:00 wharmby Exp $ */
+/* $Id: com_wrapper.c,v 1.9.2.1.2.6 2007/12/31 07:20:05 sebastian Exp $ */
/* This module exports a PHP object as a COM object by wrapping it
* using IDispatchEx */
diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h
index d0f8d3c9f..3ae43efc1 100644
--- a/ext/com_dotnet/php_com_dotnet.h
+++ b/ext/com_dotnet/php_com_dotnet.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_com_dotnet.h,v 1.5.2.1.2.2 2007/03/05 15:49:00 wharmby Exp $ */
+/* $Id: php_com_dotnet.h,v 1.5.2.1.2.3 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef PHP_COM_DOTNET_H
#define PHP_COM_DOTNET_H
diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h
index ba8dbf642..00408f4d1 100644
--- a/ext/com_dotnet/php_com_dotnet_internal.h
+++ b/ext/com_dotnet/php_com_dotnet_internal.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_com_dotnet_internal.h,v 1.14.2.3.2.4 2007/02/02 15:27:35 wharmby Exp $ */
+/* $Id: php_com_dotnet_internal.h,v 1.14.2.3.2.5 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef PHP_COM_DOTNET_INTERNAL_H
#define PHP_COM_DOTNET_INTERNAL_H
diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c
index fb1af418c..823136397 100644
--- a/ext/ctype/ctype.c
+++ b/ext/ctype/ctype.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ctype/php_ctype.h b/ext/ctype/php_ctype.h
index 615bd7225..c13c11935 100644
--- a/ext/ctype/php_ctype.h
+++ b/ext/ctype/php_ctype.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ctype/tests/ctype_alnum_basic.phpt b/ext/ctype/tests/ctype_alnum_basic.phpt
new file mode 100644
index 000000000..32da928c2
--- /dev/null
+++ b/ext/ctype/tests/ctype_alnum_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_alnum() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_alnum(mixed $c)
+ * Description: Checks for alphanumeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_alnum() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = 'abcXYZ';
+$c2 = ' \t*@';
+
+var_dump(ctype_alnum($c1));
+var_dump(ctype_alnum($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alnum() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_alnum_error.phpt b/ext/ctype/tests/ctype_alnum_error.phpt
new file mode 100644
index 000000000..9ced2d7c7
--- /dev/null
+++ b/ext/ctype/tests/ctype_alnum_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test ctype_alnum() function : error conditions - Incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool ctype_alnum(mixed $c)
+ * Description: Checks for alphanumeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass incorrect number of arguments to ctype_alnum() to test behaviour
+ */
+
+echo "*** Testing ctype_alnum() : error conditions ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+// Zero arguments
+echo "\n-- Testing ctype_alnum() function with Zero arguments --\n";
+var_dump( ctype_alnum() );
+
+//Test ctype_alnum with one more than the expected number of arguments
+echo "\n-- Testing ctype_alnum() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_alnum($c, $extra_arg) );
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alnum() : error conditions ***
+
+-- Testing ctype_alnum() function with Zero arguments --
+
+Warning: ctype_alnum() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_alnum() function with more than expected no. of arguments --
+
+Warning: ctype_alnum() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_alnum_variation1.phpt b/ext/ctype/tests/ctype_alnum_variation1.phpt
new file mode 100644
index 000000000..3f6730748
--- /dev/null
+++ b/ext/ctype/tests/ctype_alnum_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_alnum() function : usage variations - Different data types as $c arg
+--FILE--
+<?php
+/* Prototype : bool ctype_alnum(mixed $c)
+ * Description: Checks for alphanumeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_alnum() to test behaviour
+ */
+
+echo "*** Testing ctype_alnum() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "xyz";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+123
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "pqr",
+ 'LMN',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_alnum()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_alnum($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alnum() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(true)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_alnum_variation2.phpt b/ext/ctype/tests/ctype_alnum_variation2.phpt
new file mode 100644
index 000000000..c360e676c
--- /dev/null
+++ b/ext/ctype/tests/ctype_alnum_variation2.phpt
@@ -0,0 +1,92 @@
+--TEST--
+Test ctype_alnum() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_alnum(mixed $c)
+ * Description: Checks for alphanumeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_alnum() to test which character codes are considered
+ * valid alphanumeric characters
+ */
+
+echo "*** Testing ctype_alnum() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($i = 0; $i < 256; $i++) {
+ if (ctype_alnum($i)) {
+ echo "character code $i is alpha numeric\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alnum() : usage variations ***
+character code 48 is alpha numeric
+character code 49 is alpha numeric
+character code 50 is alpha numeric
+character code 51 is alpha numeric
+character code 52 is alpha numeric
+character code 53 is alpha numeric
+character code 54 is alpha numeric
+character code 55 is alpha numeric
+character code 56 is alpha numeric
+character code 57 is alpha numeric
+character code 65 is alpha numeric
+character code 66 is alpha numeric
+character code 67 is alpha numeric
+character code 68 is alpha numeric
+character code 69 is alpha numeric
+character code 70 is alpha numeric
+character code 71 is alpha numeric
+character code 72 is alpha numeric
+character code 73 is alpha numeric
+character code 74 is alpha numeric
+character code 75 is alpha numeric
+character code 76 is alpha numeric
+character code 77 is alpha numeric
+character code 78 is alpha numeric
+character code 79 is alpha numeric
+character code 80 is alpha numeric
+character code 81 is alpha numeric
+character code 82 is alpha numeric
+character code 83 is alpha numeric
+character code 84 is alpha numeric
+character code 85 is alpha numeric
+character code 86 is alpha numeric
+character code 87 is alpha numeric
+character code 88 is alpha numeric
+character code 89 is alpha numeric
+character code 90 is alpha numeric
+character code 97 is alpha numeric
+character code 98 is alpha numeric
+character code 99 is alpha numeric
+character code 100 is alpha numeric
+character code 101 is alpha numeric
+character code 102 is alpha numeric
+character code 103 is alpha numeric
+character code 104 is alpha numeric
+character code 105 is alpha numeric
+character code 106 is alpha numeric
+character code 107 is alpha numeric
+character code 108 is alpha numeric
+character code 109 is alpha numeric
+character code 110 is alpha numeric
+character code 111 is alpha numeric
+character code 112 is alpha numeric
+character code 113 is alpha numeric
+character code 114 is alpha numeric
+character code 115 is alpha numeric
+character code 116 is alpha numeric
+character code 117 is alpha numeric
+character code 118 is alpha numeric
+character code 119 is alpha numeric
+character code 120 is alpha numeric
+character code 121 is alpha numeric
+character code 122 is alpha numeric
+===DONE===
diff --git a/ext/ctype/tests/ctype_alnum_variation3.phpt b/ext/ctype/tests/ctype_alnum_variation3.phpt
new file mode 100644
index 000000000..ee0a74836
--- /dev/null
+++ b/ext/ctype/tests/ctype_alnum_variation3.phpt
@@ -0,0 +1,127 @@
+--TEST--
+Test ctype_alnum() function : usage variations - different string values
+--FILE--
+<?php
+/* Prototype : bool ctype_alnum(mixed $c)
+ * Description: Checks for alphanumeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different strings to ctype_alnum to test behaviour
+ */
+
+echo "*** Testing ctype_alnum() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ 'abc123\n',
+/*20*/ 'abc 123',
+ '',
+ ' ',
+/*23*/ base64_decode("w4DDoMOHw6fDiMOo") // non-ascii characters
+);
+
+
+// loop through each element of $values to test behaviour of ctype_alnum()
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_alnum($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alnum() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+
+-- Iteration 8 --
+bool(true)
+
+-- Iteration 9 --
+bool(true)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_alnum_variation4.phpt b/ext/ctype/tests/ctype_alnum_variation4.phpt
new file mode 100644
index 000000000..d56c925c7
--- /dev/null
+++ b/ext/ctype/tests/ctype_alnum_variation4.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test ctype_alnum() function : usage variations - octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_alnum(mixed $c)
+ * Description: Checks for alphanumeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass octal and hexadecimal values to ctype_alnum() to test behaviour
+ */
+
+echo "*** Testing ctype_alnum() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array (060, 061, 062, 063);
+$hex_values = array(0x30, 0x31, 0x32, 0x33);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_alnum($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_alnum($c));
+ $iterator++;
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alnum() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_alpha_basic.phpt b/ext/ctype/tests/ctype_alpha_basic.phpt
new file mode 100644
index 000000000..c467bf8f6
--- /dev/null
+++ b/ext/ctype/tests/ctype_alpha_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_alpha() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_alpha(mixed $c)
+ * Description: Checks for alphabetic character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_alpha() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = 'abcXYZ';
+$c2 = "Hello, World!";
+
+var_dump(ctype_alpha($c1));
+var_dump(ctype_alpha($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alpha() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_alpha_error.phpt b/ext/ctype/tests/ctype_alpha_error.phpt
new file mode 100644
index 000000000..18c2edb52
--- /dev/null
+++ b/ext/ctype/tests/ctype_alpha_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test ctype_alpha() function : error conditions - Incorrect number of arguments
+--FILE--
+<?php
+/* Prototype : bool ctype_alpha(mixed $c)
+ * Description: Checks for alphabetic character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to ctype_alpha() to test behaviour
+ */
+
+echo "*** Testing ctype_alpha() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ctype_alpha() function with Zero arguments --\n";
+var_dump( ctype_alpha() );
+
+//Test ctype_alpha with one more than the expected number of arguments
+echo "\n-- Testing ctype_alpha() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_alpha($c, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alpha() : error conditions ***
+
+-- Testing ctype_alpha() function with Zero arguments --
+
+Warning: ctype_alpha() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_alpha() function with more than expected no. of arguments --
+
+Warning: ctype_alpha() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_alpha_variation1.phpt b/ext/ctype/tests/ctype_alpha_variation1.phpt
new file mode 100644
index 000000000..98c64a16e
--- /dev/null
+++ b/ext/ctype/tests/ctype_alpha_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_alpha() function : usage variations - different data types as $c arg
+--FILE--
+<?php
+/* Prototype : bool ctype_alpha(mixed $c)
+ * Description: Checks for alphabetic character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_alpha() to test behaviour
+ */
+
+echo "*** Testing ctype_alpha() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "abcdef";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+XYZ
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_alpha()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_alpha($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alpha() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_alpha_variation2.phpt b/ext/ctype/tests/ctype_alpha_variation2.phpt
new file mode 100644
index 000000000..ea3afc2be
--- /dev/null
+++ b/ext/ctype/tests/ctype_alpha_variation2.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Test ctype_alpha() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_alpha(mixed $c)
+ * Description: Checks for alphabetic character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_alpha() to test which character codes are considered
+ * valid alphabetic characters
+ */
+
+echo "*** Testing ctype_alpha() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($i = 0; $i < 256; $i++) {
+ if (ctype_alpha($i)) {
+ echo "character code $i is alphabetic\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alpha() : usage variations ***
+character code 65 is alphabetic
+character code 66 is alphabetic
+character code 67 is alphabetic
+character code 68 is alphabetic
+character code 69 is alphabetic
+character code 70 is alphabetic
+character code 71 is alphabetic
+character code 72 is alphabetic
+character code 73 is alphabetic
+character code 74 is alphabetic
+character code 75 is alphabetic
+character code 76 is alphabetic
+character code 77 is alphabetic
+character code 78 is alphabetic
+character code 79 is alphabetic
+character code 80 is alphabetic
+character code 81 is alphabetic
+character code 82 is alphabetic
+character code 83 is alphabetic
+character code 84 is alphabetic
+character code 85 is alphabetic
+character code 86 is alphabetic
+character code 87 is alphabetic
+character code 88 is alphabetic
+character code 89 is alphabetic
+character code 90 is alphabetic
+character code 97 is alphabetic
+character code 98 is alphabetic
+character code 99 is alphabetic
+character code 100 is alphabetic
+character code 101 is alphabetic
+character code 102 is alphabetic
+character code 103 is alphabetic
+character code 104 is alphabetic
+character code 105 is alphabetic
+character code 106 is alphabetic
+character code 107 is alphabetic
+character code 108 is alphabetic
+character code 109 is alphabetic
+character code 110 is alphabetic
+character code 111 is alphabetic
+character code 112 is alphabetic
+character code 113 is alphabetic
+character code 114 is alphabetic
+character code 115 is alphabetic
+character code 116 is alphabetic
+character code 117 is alphabetic
+character code 118 is alphabetic
+character code 119 is alphabetic
+character code 120 is alphabetic
+character code 121 is alphabetic
+character code 122 is alphabetic
+===DONE===
diff --git a/ext/ctype/tests/ctype_alpha_variation3.phpt b/ext/ctype/tests/ctype_alpha_variation3.phpt
new file mode 100644
index 000000000..3eed89795
--- /dev/null
+++ b/ext/ctype/tests/ctype_alpha_variation3.phpt
@@ -0,0 +1,128 @@
+--TEST--
+Test ctype_alpha() function : usage variations - different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_alpha(mixed $c)
+ * Description: Checks for alphabetic character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_alpha() to test
+ * which are considered valid alphabetic character only strings
+ */
+
+echo "*** Testing ctype_alpha() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ 'abc123\n',
+/*20*/ 'abc 123',
+ '',
+ ' ',
+/*23*/ base64_decode("w4DDoMOHw6fDiMOo") // non-ascii characters
+);
+
+
+// loop through each element of $values to test behaviour of ctype_alnum()
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_alpha($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alpha() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_alpha_variation4.phpt b/ext/ctype/tests/ctype_alpha_variation4.phpt
new file mode 100644
index 000000000..cf091a7b1
--- /dev/null
+++ b/ext/ctype/tests/ctype_alpha_variation4.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test ctype_alpha() function : usage variations - Octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_alpha(mixed $c)
+ * Description: Checks for alphabetic character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass octal and hexadecimal values to ctype_alpha() to test behaviour
+ */
+
+echo "*** Testing ctype_alpha() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array (0101, 0102, 0103, 0104);
+$hex_values = array (0x41, 0x42, 0x43, 0x44);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_alpha($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_alpha($c));
+ $iterator++;
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_alpha() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_cntrl_basic.phpt b/ext/ctype/tests/ctype_cntrl_basic.phpt
new file mode 100644
index 000000000..5bd977b06
--- /dev/null
+++ b/ext/ctype/tests/ctype_cntrl_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_cntrl() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_cntrl(mixed $c)
+ * Description: Checks for control character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_cntrl() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = "\r\n\t";
+$c2 = "Hello, World!\n";
+
+var_dump(ctype_cntrl($c1));
+var_dump(ctype_cntrl($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_cntrl() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_cntrl_error.phpt b/ext/ctype/tests/ctype_cntrl_error.phpt
new file mode 100644
index 000000000..d089e6edf
--- /dev/null
+++ b/ext/ctype/tests/ctype_cntrl_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test ctype_cntrl() function : error conditions - Incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool ctype_cntrl(mixed $c)
+ * Description: Checks for control character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to ctype_cntrl() to test behaviour
+ */
+
+echo "*** Testing ctype_cntrl() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ctype_cntrl() function with Zero arguments --\n";
+var_dump( ctype_cntrl() );
+
+//Test ctype_cntrl with one more than the expected number of arguments
+echo "\n-- Testing ctype_cntrl() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_cntrl($c, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_cntrl() : error conditions ***
+
+-- Testing ctype_cntrl() function with Zero arguments --
+
+Warning: ctype_cntrl() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_cntrl() function with more than expected no. of arguments --
+
+Warning: ctype_cntrl() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_cntrl_variation1.phpt b/ext/ctype/tests/ctype_cntrl_variation1.phpt
new file mode 100644
index 000000000..0740d0def
--- /dev/null
+++ b/ext/ctype/tests/ctype_cntrl_variation1.phpt
@@ -0,0 +1,178 @@
+--TEST--
+Test ctype_cntrl() function : usage variations - Different data types as $c arg
+--FILE--
+<?php
+/* Prototype : bool ctype_cntrl(mixed $c)
+ * Description: Checks for control character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_cntrl() to test behaviour
+ */
+
+echo "*** Testing ctype_cntrl() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "\n\r\t";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+\t\r\n
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "\t\r\n",
+ '
+',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_cntrl()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_cntrl($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_cntrl() : usage variations ***
+
+-- Iteration 1 --
+bool(true)
+
+-- Iteration 2 --
+bool(true)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_cntrl_variation2.phpt b/ext/ctype/tests/ctype_cntrl_variation2.phpt
new file mode 100644
index 000000000..a9deaab58
--- /dev/null
+++ b/ext/ctype/tests/ctype_cntrl_variation2.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Test ctype_cntrl() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_cntrl(mixed $c)
+ * Description: Checks for control character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_cntrl() to test which character codes are considered
+ * valid control characters
+ */
+
+echo "*** Testing ctype_cntrl() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($i = 0; $i < 256; $i++) {
+ if (ctype_cntrl($i)) {
+ echo "character code $i is control character\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_cntrl() : usage variations ***
+character code 0 is control character
+character code 1 is control character
+character code 2 is control character
+character code 3 is control character
+character code 4 is control character
+character code 5 is control character
+character code 6 is control character
+character code 7 is control character
+character code 8 is control character
+character code 9 is control character
+character code 10 is control character
+character code 11 is control character
+character code 12 is control character
+character code 13 is control character
+character code 14 is control character
+character code 15 is control character
+character code 16 is control character
+character code 17 is control character
+character code 18 is control character
+character code 19 is control character
+character code 20 is control character
+character code 21 is control character
+character code 22 is control character
+character code 23 is control character
+character code 24 is control character
+character code 25 is control character
+character code 26 is control character
+character code 27 is control character
+character code 28 is control character
+character code 29 is control character
+character code 30 is control character
+character code 31 is control character
+character code 127 is control character
+===DONE===
diff --git a/ext/ctype/tests/ctype_cntrl_variation3.phpt b/ext/ctype/tests/ctype_cntrl_variation3.phpt
new file mode 100644
index 000000000..6528c1c0a
--- /dev/null
+++ b/ext/ctype/tests/ctype_cntrl_variation3.phpt
@@ -0,0 +1,156 @@
+--TEST--
+Test ctype_cntrl() function : usage variations - Different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_cntrl(mixed $c)
+ * Description: Checks for control character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_cntrl() to test
+ * which are considered valid control character only strings
+ */
+
+echo "*** Testing ctype_cntrl() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ 'abc123\n',
+/*20*/ 'abc 123',
+ '',
+ ' ',
+ base64_decode("w4DDoMOHw6fDiMOo"), // non-ascii characters
+ "\n",
+/*25*/ "\r",
+ "\t",
+ "0xD",
+ "0xA",
+ "0xE",
+/*30*/ "\t\r\n",
+);
+
+
+// loop through each element of $values to test behaviour of ctype_cntrl()
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_cntrl($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_cntrl() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(true)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(true)
+
+-- Iteration 25 --
+bool(true)
+
+-- Iteration 26 --
+bool(true)
+
+-- Iteration 27 --
+bool(false)
+
+-- Iteration 28 --
+bool(false)
+
+-- Iteration 29 --
+bool(false)
+
+-- Iteration 30 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_cntrl_variation4.phpt b/ext/ctype/tests/ctype_cntrl_variation4.phpt
new file mode 100644
index 000000000..38f622d46
--- /dev/null
+++ b/ext/ctype/tests/ctype_cntrl_variation4.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test ctype_cntrl() function : usage variations - Octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_cntrl(mixed $c)
+ * Description: Checks for control character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass hexadecimal and octal values to ctype_cntrl() to test behaviour
+ */
+
+echo "*** Testing ctype_cntrl() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array(01, 02, 03, 04);
+$hex_values = array(0x1, 0x2, 0x3, 0x4);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_cntrl($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_cntrl($c));
+ $iterator++;
+}
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_cntrl() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_digit_basic.phpt b/ext/ctype/tests/ctype_digit_basic.phpt
new file mode 100644
index 000000000..e39208cca
--- /dev/null
+++ b/ext/ctype/tests/ctype_digit_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_digit() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_digit(mixed $c)
+ * Description: Checks for numeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_digit() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = '1234';
+$c2 = 'abc123';
+
+var_dump(ctype_digit($c1));
+var_dump(ctype_digit($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_digit() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_digit_error.phpt b/ext/ctype/tests/ctype_digit_error.phpt
new file mode 100644
index 000000000..7f911eba6
--- /dev/null
+++ b/ext/ctype/tests/ctype_digit_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test ctype_digit() function : error conditions - incorrect number of arguments
+--FILE--
+<?php
+/* Prototype : bool ctype_digit(mixed $c)
+ * Description: Checks for numeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to ctype_digit() to test behaviour
+ */
+
+echo "*** Testing ctype_digit() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ctype_digit() function with Zero arguments --\n";
+var_dump( ctype_digit() );
+
+//Test ctype_digit with one more than the expected number of arguments
+echo "\n-- Testing ctype_digit() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_digit($c, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_digit() : error conditions ***
+
+-- Testing ctype_digit() function with Zero arguments --
+
+Warning: ctype_digit() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_digit() function with more than expected no. of arguments --
+
+Warning: ctype_digit() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_digit_variation1.phpt b/ext/ctype/tests/ctype_digit_variation1.phpt
new file mode 100644
index 000000000..626dcee6c
--- /dev/null
+++ b/ext/ctype/tests/ctype_digit_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_digit() function : usage variations - different data types as $c arg
+--FILE--
+<?php
+/* Prototype : bool ctype_digit(mixed $c)
+ * Description: Checks for numeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_digit() to test behaviour
+ */
+
+echo "*** Testing ctype_digit() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "123456";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+1
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "2",
+ '309',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_digit()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_digit($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_digit() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(true)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_digit_variation2.phpt b/ext/ctype/tests/ctype_digit_variation2.phpt
new file mode 100644
index 000000000..e7b911571
--- /dev/null
+++ b/ext/ctype/tests/ctype_digit_variation2.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test ctype_digit() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_digit(mixed $c)
+ * Description: Checks for numeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_digit() to test which character codes are considered
+ * valid decimal digits
+ */
+
+echo "*** Testing ctype_digit() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($i = 0; $i < 256; $i++) {
+ if (ctype_digit($i)) {
+ echo "character code $i is a numeric digit\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_digit() : usage variations ***
+character code 48 is a numeric digit
+character code 49 is a numeric digit
+character code 50 is a numeric digit
+character code 51 is a numeric digit
+character code 52 is a numeric digit
+character code 53 is a numeric digit
+character code 54 is a numeric digit
+character code 55 is a numeric digit
+character code 56 is a numeric digit
+character code 57 is a numeric digit
+===DONE===
diff --git a/ext/ctype/tests/ctype_digit_variation3.phpt b/ext/ctype/tests/ctype_digit_variation3.phpt
new file mode 100644
index 000000000..4746166a7
--- /dev/null
+++ b/ext/ctype/tests/ctype_digit_variation3.phpt
@@ -0,0 +1,158 @@
+--TEST--
+Test ctype_digit() function : usage variations - different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_digit(mixed $c)
+ * Description: Checks for numeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_digit() to test
+ * which are considered valid decimal digit only strings
+ */
+
+echo "*** Testing ctype_digit() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ ")speci@! ch@r$(",
+ '@!$*',
+ "0",
+/*15*/ "3",
+ "9",
+ "1234",
+ "7890",
+ "0677",
+/*20*/ '0',
+ '3',
+ '9',
+ '1234',
+ '7890',
+/*25*/ "123abc",
+ "abc123",
+ "123\r\t",
+ "123 ",
+ " 123",
+/*30*/ "123E4",
+/*31*/ "0x3F",
+);
+
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_digit($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_digit() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(true)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(true)
+
+-- Iteration 15 --
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(true)
+
+-- Iteration 23 --
+bool(true)
+
+-- Iteration 24 --
+bool(true)
+
+-- Iteration 25 --
+bool(false)
+
+-- Iteration 26 --
+bool(false)
+
+-- Iteration 27 --
+bool(false)
+
+-- Iteration 28 --
+bool(false)
+
+-- Iteration 29 --
+bool(false)
+
+-- Iteration 30 --
+bool(false)
+
+-- Iteration 31 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_digit_variation4.phpt b/ext/ctype/tests/ctype_digit_variation4.phpt
new file mode 100644
index 000000000..852bba32e
--- /dev/null
+++ b/ext/ctype/tests/ctype_digit_variation4.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test ctype_digit() function : usage variations - octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_digit(mixed $c)
+ * Description: Checks for numeric character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass octal and hexadecimal values as $c argument to ctype_digit() to test behaviour
+ */
+
+echo "*** Testing ctype_digit() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array(061, 062, 063, 064);
+$hex_values = array (0x31, 0x32, 0x33, 0x34);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_digit($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_digit($c));
+ $iterator++;
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_digit() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_graph_basic.phpt b/ext/ctype/tests/ctype_graph_basic.phpt
new file mode 100644
index 000000000..bf789fbea
--- /dev/null
+++ b/ext/ctype/tests/ctype_graph_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_graph() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_graph(mixed $c)
+ * Description: Checks for any printable character(s) except space
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_graph() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = 'helloWorld!';
+$c2 = "Hello, world!\n";
+
+var_dump(ctype_graph($c1));
+var_dump(ctype_graph($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_graph() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_graph_error.phpt b/ext/ctype/tests/ctype_graph_error.phpt
new file mode 100644
index 000000000..7cd94fc26
--- /dev/null
+++ b/ext/ctype/tests/ctype_graph_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test ctype_graph() function : error conditions - incorrect number of arguments
+--FILE--
+<?php
+/* Prototype : bool ctype_graph(mixed $c)
+ * Description: Checks for any printable character(s) except space
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to ctype_graph() to test behaviour
+ */
+
+echo "*** Testing ctype_graph() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ctype_graph() function with Zero arguments --\n";
+var_dump( ctype_graph() );
+
+//Test ctype_graph with one more than the expected number of arguments
+echo "\n-- Testing ctype_graph() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_graph($c, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_graph() : error conditions ***
+
+-- Testing ctype_graph() function with Zero arguments --
+
+Warning: ctype_graph() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_graph() function with more than expected no. of arguments --
+
+Warning: ctype_graph() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_graph_variation1.phpt b/ext/ctype/tests/ctype_graph_variation1.phpt
new file mode 100644
index 000000000..ee6e95bd3
--- /dev/null
+++ b/ext/ctype/tests/ctype_graph_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_graph() function : usage variations - different data types as $c arg
+--FILE--
+<?php
+/* Prototype : bool ctype_graph(mixed $c)
+ * Description: Checks for any printable character(s) except space
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_graph() to test behaviour
+ */
+
+echo "*** Testing ctype_graph() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "myClass";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hiWorld!
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_graph()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_graph($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_graph() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(true)
+
+-- Iteration 4 --
+bool(true)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_graph_variation2.phpt b/ext/ctype/tests/ctype_graph_variation2.phpt
new file mode 100644
index 000000000..6ab56c75e
--- /dev/null
+++ b/ext/ctype/tests/ctype_graph_variation2.phpt
@@ -0,0 +1,124 @@
+--TEST--
+Test ctype_graph() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_graph(mixed $c)
+ * Description: Checks for any printable character(s) except space
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_graph() to test which character codes are considered
+ * valid visibly printable characters
+ */
+
+echo "*** Testing ctype_graph() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($i = 0; $i < 256; $i++) {
+ if (ctype_graph($i)) {
+ echo "character code $i is a printable character\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_graph() : usage variations ***
+character code 33 is a printable character
+character code 34 is a printable character
+character code 35 is a printable character
+character code 36 is a printable character
+character code 37 is a printable character
+character code 38 is a printable character
+character code 39 is a printable character
+character code 40 is a printable character
+character code 41 is a printable character
+character code 42 is a printable character
+character code 43 is a printable character
+character code 44 is a printable character
+character code 45 is a printable character
+character code 46 is a printable character
+character code 47 is a printable character
+character code 48 is a printable character
+character code 49 is a printable character
+character code 50 is a printable character
+character code 51 is a printable character
+character code 52 is a printable character
+character code 53 is a printable character
+character code 54 is a printable character
+character code 55 is a printable character
+character code 56 is a printable character
+character code 57 is a printable character
+character code 58 is a printable character
+character code 59 is a printable character
+character code 60 is a printable character
+character code 61 is a printable character
+character code 62 is a printable character
+character code 63 is a printable character
+character code 64 is a printable character
+character code 65 is a printable character
+character code 66 is a printable character
+character code 67 is a printable character
+character code 68 is a printable character
+character code 69 is a printable character
+character code 70 is a printable character
+character code 71 is a printable character
+character code 72 is a printable character
+character code 73 is a printable character
+character code 74 is a printable character
+character code 75 is a printable character
+character code 76 is a printable character
+character code 77 is a printable character
+character code 78 is a printable character
+character code 79 is a printable character
+character code 80 is a printable character
+character code 81 is a printable character
+character code 82 is a printable character
+character code 83 is a printable character
+character code 84 is a printable character
+character code 85 is a printable character
+character code 86 is a printable character
+character code 87 is a printable character
+character code 88 is a printable character
+character code 89 is a printable character
+character code 90 is a printable character
+character code 91 is a printable character
+character code 92 is a printable character
+character code 93 is a printable character
+character code 94 is a printable character
+character code 95 is a printable character
+character code 96 is a printable character
+character code 97 is a printable character
+character code 98 is a printable character
+character code 99 is a printable character
+character code 100 is a printable character
+character code 101 is a printable character
+character code 102 is a printable character
+character code 103 is a printable character
+character code 104 is a printable character
+character code 105 is a printable character
+character code 106 is a printable character
+character code 107 is a printable character
+character code 108 is a printable character
+character code 109 is a printable character
+character code 110 is a printable character
+character code 111 is a printable character
+character code 112 is a printable character
+character code 113 is a printable character
+character code 114 is a printable character
+character code 115 is a printable character
+character code 116 is a printable character
+character code 117 is a printable character
+character code 118 is a printable character
+character code 119 is a printable character
+character code 120 is a printable character
+character code 121 is a printable character
+character code 122 is a printable character
+character code 123 is a printable character
+character code 124 is a printable character
+character code 125 is a printable character
+character code 126 is a printable character
+===DONE===
diff --git a/ext/ctype/tests/ctype_graph_variation3.phpt b/ext/ctype/tests/ctype_graph_variation3.phpt
new file mode 100644
index 000000000..7843a058f
--- /dev/null
+++ b/ext/ctype/tests/ctype_graph_variation3.phpt
@@ -0,0 +1,146 @@
+--TEST--
+Test ctype_graph() function : usage variations - different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_graph(mixed $c)
+ * Description: Checks for any printable character(s) except space
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_graph() to test
+ * which are considered valid printable character only strings
+ */
+
+echo "*** Testing ctype_graph() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ "abc123\n",
+/*20*/ 'abc 123',
+ '',
+ ' ',
+ base64_decode("w4DDoMOHw6fDiMOo"), // non-ascii characters
+ "!$%^&*()_+-={}[]:;@~'#<,>.?/",
+/*25*/ "\"ABC\"",
+ "String\twith\ttabs",
+ "Sample string with newline\n",
+/*28*/ "123 ABC XYZ",
+);
+
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_graph($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_graph() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+
+-- Iteration 8 --
+bool(true)
+
+-- Iteration 9 --
+bool(true)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(true)
+
+-- Iteration 15 --
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(true)
+
+-- Iteration 25 --
+bool(true)
+
+-- Iteration 26 --
+bool(false)
+
+-- Iteration 27 --
+bool(false)
+
+-- Iteration 28 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_graph_variation4.phpt b/ext/ctype/tests/ctype_graph_variation4.phpt
new file mode 100644
index 000000000..0a504324c
--- /dev/null
+++ b/ext/ctype/tests/ctype_graph_variation4.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test ctype_graph() function : usage variations - octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_graph(mixed $c)
+ * Description: Checks for any printable character(s) except space
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass octal and hexadecimal values to ctype_graph() to test behaviour
+ */
+
+echo "*** Testing ctype_graph() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array(061, 062, 063, 064);
+$hex_values = array (0x31, 0x32, 0x33, 0x34);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_graph($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_graph($c));
+ $iterator++;
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_graph() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_lower_basic.phpt b/ext/ctype/tests/ctype_lower_basic.phpt
new file mode 100644
index 000000000..f9c854048
--- /dev/null
+++ b/ext/ctype/tests/ctype_lower_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_lower() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_lower(mixed $c)
+ * Description: Checks for lowercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_lower() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = 'helloworld';
+$c2 = "Hello, world!\n";
+
+var_dump(ctype_lower($c1));
+var_dump(ctype_lower($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_lower() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_lower_error.phpt b/ext/ctype/tests/ctype_lower_error.phpt
new file mode 100644
index 000000000..141d02c6e
--- /dev/null
+++ b/ext/ctype/tests/ctype_lower_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test ctype_lower() function : error conditions - incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool ctype_lower(mixed $c)
+ * Description: Checks for lowercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass incorrect number of arguments to ctype_lower() to test behaviour
+ */
+
+echo "*** Testing ctype_lower() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ctype_lower() function with Zero arguments --\n";
+var_dump( ctype_lower() );
+
+//Test ctype_lower with one more than the expected number of arguments
+echo "\n-- Testing ctype_lower() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_lower($c, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_lower() : error conditions ***
+
+-- Testing ctype_lower() function with Zero arguments --
+
+Warning: ctype_lower() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_lower() function with more than expected no. of arguments --
+
+Warning: ctype_lower() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_lower_variation1.phpt b/ext/ctype/tests/ctype_lower_variation1.phpt
new file mode 100644
index 000000000..60288c3d9
--- /dev/null
+++ b/ext/ctype/tests/ctype_lower_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_lower() function : usage variations - different data types as $c arg
+--FILE--
+<?php
+/* Prototype : bool ctype_lower(mixed $c)
+ * Description: Checks for lowercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_lower() to test behaviour
+ */
+
+echo "*** Testing ctype_lower() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "class";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+heredoc
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_lower()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_lower($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_lower() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_lower_variation2.phpt b/ext/ctype/tests/ctype_lower_variation2.phpt
new file mode 100644
index 000000000..99a3ad775
--- /dev/null
+++ b/ext/ctype/tests/ctype_lower_variation2.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test ctype_lower() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_lower(mixed $c)
+ * Description: Checks for lowercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_lower() to test which character codes are considered
+ * valid lowercase characters
+ */
+
+echo "*** Testing ctype_lower() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($i = 0; $i < 256; $i++) {
+ if (ctype_lower($i)) {
+ echo "character code $i is a lower case character\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_lower() : usage variations ***
+character code 97 is a lower case character
+character code 98 is a lower case character
+character code 99 is a lower case character
+character code 100 is a lower case character
+character code 101 is a lower case character
+character code 102 is a lower case character
+character code 103 is a lower case character
+character code 104 is a lower case character
+character code 105 is a lower case character
+character code 106 is a lower case character
+character code 107 is a lower case character
+character code 108 is a lower case character
+character code 109 is a lower case character
+character code 110 is a lower case character
+character code 111 is a lower case character
+character code 112 is a lower case character
+character code 113 is a lower case character
+character code 114 is a lower case character
+character code 115 is a lower case character
+character code 116 is a lower case character
+character code 117 is a lower case character
+character code 118 is a lower case character
+character code 119 is a lower case character
+character code 120 is a lower case character
+character code 121 is a lower case character
+character code 122 is a lower case character
+===DONE===
diff --git a/ext/ctype/tests/ctype_lower_variation3.phpt b/ext/ctype/tests/ctype_lower_variation3.phpt
new file mode 100644
index 000000000..73d6fcd60
--- /dev/null
+++ b/ext/ctype/tests/ctype_lower_variation3.phpt
@@ -0,0 +1,138 @@
+--TEST--
+Test ctype_lower() function : usage variations - different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_lower(mixed $c)
+ * Description: Checks for lowercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_lower() to test
+ * which are considered valid lowercase character only strings
+ */
+
+echo "*** Testing ctype_lower() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ 'abc123\n',
+/*20*/ 'abc 123',
+ '',
+ ' ',
+ base64_decode("w4DDoMOHw6fDiMOo"), // non-ascii characters
+ "abcXYZ",
+/*25*/ "abc xyz",
+/*26*/ "abc+efg*xyz",
+);
+
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_lower($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_lower() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(true)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(true)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(true)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+
+-- Iteration 26 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_lower_variation4.phpt b/ext/ctype/tests/ctype_lower_variation4.phpt
new file mode 100644
index 000000000..30a68a3af
--- /dev/null
+++ b/ext/ctype/tests/ctype_lower_variation4.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test ctype_lower() function : usage variations - octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_lower(mixed $c)
+ * Description: Checks for lowercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass octal and hexadecimal values to ctype_lower() to test behaviour
+ */
+
+echo "*** Testing ctype_lower() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array(0141, 0142, 0143, 0144);
+$hex_values = array (0x61, 0x62, 0x63, 0x64);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_lower($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_lower($c));
+ $iterator++;
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_lower() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_print_basic.phpt b/ext/ctype/tests/ctype_print_basic.phpt
new file mode 100644
index 000000000..5d01f5abd
--- /dev/null
+++ b/ext/ctype/tests/ctype_print_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_print() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_print(mixed $c)
+ * Description: Checks for printable character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_print() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = "Hello, World!";
+$c2 = null;
+
+var_dump(ctype_print($c1));
+var_dump(ctype_print($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_print() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_print_error.phpt b/ext/ctype/tests/ctype_print_error.phpt
new file mode 100644
index 000000000..243d2f802
--- /dev/null
+++ b/ext/ctype/tests/ctype_print_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test ctype_print() function : error conditions - incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool ctype_print(mixed $c)
+ * Description: Checks for printable character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass incorrect number of arguments to ctype_print() to test behaviour
+ */
+
+echo "*** Testing ctype_print() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ctype_print() function with Zero arguments --\n";
+var_dump( ctype_print() );
+
+//Test ctype_print with one more than the expected number of arguments
+echo "\n-- Testing ctype_print() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_print($c, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_print() : error conditions ***
+
+-- Testing ctype_print() function with Zero arguments --
+
+Warning: ctype_print() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_print() function with more than expected no. of arguments --
+
+Warning: ctype_print() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_print_variation1.phpt b/ext/ctype/tests/ctype_print_variation1.phpt
new file mode 100644
index 000000000..c121dd723
--- /dev/null
+++ b/ext/ctype/tests/ctype_print_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_print() function : usage variations - different data types as $c arg
+--FILE--
+<?php
+/* Prototype : bool ctype_print(mixed $c)
+ * Description: Checks for printable character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_print() to test behaviour
+ */
+
+echo "*** Testing ctype_print() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_print()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_print($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_print() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(true)
+
+-- Iteration 4 --
+bool(true)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_print_variation2.phpt b/ext/ctype/tests/ctype_print_variation2.phpt
new file mode 100644
index 000000000..ac492b882
--- /dev/null
+++ b/ext/ctype/tests/ctype_print_variation2.phpt
@@ -0,0 +1,125 @@
+--TEST--
+Test ctype_print() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_print(mixed $c)
+ * Description: Checks for printable character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_print() to test which character codes are considered
+ * valid printable characters
+ */
+
+echo "*** Testing ctype_print() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($i = 0; $i < 256; $i++) {
+ if (ctype_print($i)) {
+ echo "character code $i is a printable character\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_print() : usage variations ***
+character code 32 is a printable character
+character code 33 is a printable character
+character code 34 is a printable character
+character code 35 is a printable character
+character code 36 is a printable character
+character code 37 is a printable character
+character code 38 is a printable character
+character code 39 is a printable character
+character code 40 is a printable character
+character code 41 is a printable character
+character code 42 is a printable character
+character code 43 is a printable character
+character code 44 is a printable character
+character code 45 is a printable character
+character code 46 is a printable character
+character code 47 is a printable character
+character code 48 is a printable character
+character code 49 is a printable character
+character code 50 is a printable character
+character code 51 is a printable character
+character code 52 is a printable character
+character code 53 is a printable character
+character code 54 is a printable character
+character code 55 is a printable character
+character code 56 is a printable character
+character code 57 is a printable character
+character code 58 is a printable character
+character code 59 is a printable character
+character code 60 is a printable character
+character code 61 is a printable character
+character code 62 is a printable character
+character code 63 is a printable character
+character code 64 is a printable character
+character code 65 is a printable character
+character code 66 is a printable character
+character code 67 is a printable character
+character code 68 is a printable character
+character code 69 is a printable character
+character code 70 is a printable character
+character code 71 is a printable character
+character code 72 is a printable character
+character code 73 is a printable character
+character code 74 is a printable character
+character code 75 is a printable character
+character code 76 is a printable character
+character code 77 is a printable character
+character code 78 is a printable character
+character code 79 is a printable character
+character code 80 is a printable character
+character code 81 is a printable character
+character code 82 is a printable character
+character code 83 is a printable character
+character code 84 is a printable character
+character code 85 is a printable character
+character code 86 is a printable character
+character code 87 is a printable character
+character code 88 is a printable character
+character code 89 is a printable character
+character code 90 is a printable character
+character code 91 is a printable character
+character code 92 is a printable character
+character code 93 is a printable character
+character code 94 is a printable character
+character code 95 is a printable character
+character code 96 is a printable character
+character code 97 is a printable character
+character code 98 is a printable character
+character code 99 is a printable character
+character code 100 is a printable character
+character code 101 is a printable character
+character code 102 is a printable character
+character code 103 is a printable character
+character code 104 is a printable character
+character code 105 is a printable character
+character code 106 is a printable character
+character code 107 is a printable character
+character code 108 is a printable character
+character code 109 is a printable character
+character code 110 is a printable character
+character code 111 is a printable character
+character code 112 is a printable character
+character code 113 is a printable character
+character code 114 is a printable character
+character code 115 is a printable character
+character code 116 is a printable character
+character code 117 is a printable character
+character code 118 is a printable character
+character code 119 is a printable character
+character code 120 is a printable character
+character code 121 is a printable character
+character code 122 is a printable character
+character code 123 is a printable character
+character code 124 is a printable character
+character code 125 is a printable character
+character code 126 is a printable character
+===DONE===
diff --git a/ext/ctype/tests/ctype_print_variation3.phpt b/ext/ctype/tests/ctype_print_variation3.phpt
new file mode 100644
index 000000000..0231a3db2
--- /dev/null
+++ b/ext/ctype/tests/ctype_print_variation3.phpt
@@ -0,0 +1,126 @@
+--TEST--
+Test ctype_print() function : usage variations - different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_print(mixed $c)
+ * Description: Checks for printable character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_print() to test
+ * which are considered valid printable character only strings
+ */
+
+echo "*** Testing ctype_print() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ "abc123\n",
+/*20*/ 'abc 123',
+ '',
+ ' ',
+/*23*/ base64_decode("w4DDoMOHw6fDiMOo") // non-ascii characters
+);
+
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_print($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_print() : usage variations ***
+
+-- Iteration 1 --
+bool(true)
+
+-- Iteration 2 --
+bool(true)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(true)
+
+-- Iteration 5 --
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+
+-- Iteration 8 --
+bool(true)
+
+-- Iteration 9 --
+bool(true)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+
+-- Iteration 13 --
+bool(true)
+
+-- Iteration 14 --
+bool(true)
+
+-- Iteration 15 --
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(true)
+
+-- Iteration 23 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_print_variation4.phpt b/ext/ctype/tests/ctype_print_variation4.phpt
new file mode 100644
index 000000000..b8e643582
--- /dev/null
+++ b/ext/ctype/tests/ctype_print_variation4.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test ctype_print() function : usage variations - octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_print(mixed $c)
+ * Description: Checks for printable character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass octal and hexadecimal values to ctype_print() to test behaviour
+ */
+
+echo "*** Testing ctype_print() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array(040, 041, 042, 043);
+$hex_values = array (0x20, 0x21, 0x23, 0x24);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_print($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_print($c));
+ $iterator++;
+}
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_print() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_punct_basic.phpt b/ext/ctype/tests/ctype_punct_basic.phpt
new file mode 100644
index 000000000..d1f6f4601
--- /dev/null
+++ b/ext/ctype/tests/ctype_punct_basic.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Test ctype_punct() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_punct(mixed $c)
+ * Description: Checks for any printable character which is not whitespace
+ * or an alphanumeric character
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_punct() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = '@!$*';
+$c2 = 'hello, world!';
+
+var_dump(ctype_punct($c1));
+var_dump(ctype_punct($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_punct() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_punct_error.phpt b/ext/ctype/tests/ctype_punct_error.phpt
new file mode 100644
index 000000000..ec4aff71d
--- /dev/null
+++ b/ext/ctype/tests/ctype_punct_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test ctype_punct() function : error conditions - incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool ctype_punct(mixed $c)
+ * Description: Checks for any printable character which is not whitespace
+ * or an alphanumeric character
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass incorrect number of arguments to ctype_punct() to test behaviour
+ */
+
+echo "*** Testing ctype_punct() : error conditions ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+// Zero arguments
+echo "\n-- Testing ctype_punct() function with Zero arguments --\n";
+var_dump( ctype_punct() );
+
+//Test ctype_punct with one more than the expected number of arguments
+echo "\n-- Testing ctype_punct() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_punct($c, $extra_arg) );
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_punct() : error conditions ***
+
+-- Testing ctype_punct() function with Zero arguments --
+
+Warning: ctype_punct() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_punct() function with more than expected no. of arguments --
+
+Warning: ctype_punct() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_punct_variation1.phpt b/ext/ctype/tests/ctype_punct_variation1.phpt
new file mode 100644
index 000000000..2bdfd709c
--- /dev/null
+++ b/ext/ctype/tests/ctype_punct_variation1.phpt
@@ -0,0 +1,178 @@
+--TEST--
+Test ctype_punct() function : usage variations - different data types as $c argument
+--FILE--
+<?php
+/* Prototype : bool ctype_punct(mixed $c)
+ * Description: Checks for any printable character which is not whitespace
+ * or an alphanumeric character
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_punt() to test behaviour
+ */
+
+echo "*** Testing ctype_punct() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return ",<.>";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+[{}]
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ ";:'@",
+ '#~/?',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_punct
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_punct($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_punct() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_punct_variation2.phpt b/ext/ctype/tests/ctype_punct_variation2.phpt
new file mode 100644
index 000000000..cc04753e6
--- /dev/null
+++ b/ext/ctype/tests/ctype_punct_variation2.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Test ctype_punct() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_punct(mixed $c)
+ * Description: Checks for any printable character which is not whitespace
+ * or an alphanumeric character
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_punct() to test which character codes are considered
+ * valid punctuation characters
+ */
+
+echo "*** Testing ctype_punct() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($c = 1; $c < 256; $c++) {
+ if (ctype_punct($c)) {
+ echo "character code $c is punctuation\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_punct() : usage variations ***
+character code 33 is punctuation
+character code 34 is punctuation
+character code 35 is punctuation
+character code 36 is punctuation
+character code 37 is punctuation
+character code 38 is punctuation
+character code 39 is punctuation
+character code 40 is punctuation
+character code 41 is punctuation
+character code 42 is punctuation
+character code 43 is punctuation
+character code 44 is punctuation
+character code 45 is punctuation
+character code 46 is punctuation
+character code 47 is punctuation
+character code 58 is punctuation
+character code 59 is punctuation
+character code 60 is punctuation
+character code 61 is punctuation
+character code 62 is punctuation
+character code 63 is punctuation
+character code 64 is punctuation
+character code 91 is punctuation
+character code 92 is punctuation
+character code 93 is punctuation
+character code 94 is punctuation
+character code 95 is punctuation
+character code 96 is punctuation
+character code 123 is punctuation
+character code 124 is punctuation
+character code 125 is punctuation
+character code 126 is punctuation
+===DONE===
diff --git a/ext/ctype/tests/ctype_punct_variation3.phpt b/ext/ctype/tests/ctype_punct_variation3.phpt
new file mode 100644
index 000000000..5282a291b
--- /dev/null
+++ b/ext/ctype/tests/ctype_punct_variation3.phpt
@@ -0,0 +1,138 @@
+--TEST--
+Test ctype_punct() function : usage variations - different punctuation
+--FILE--
+<?php
+/* Prototype : bool ctype_punct(mixed $c)
+ * Description: Checks for any printable character which is not whitespace
+ * or an alphanumeric character
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_punct() to test
+ * which are considered valid punctuation character only strings
+ */
+
+echo "*** Testing ctype_punct() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ "abc123\n",
+/*20*/ 'abc 123',
+ '',
+ ' ',
+ base64_decode("w4DDoMOHw6fDiMOo"), // non-ascii characters
+ "!$%@\n",
+/*25*/ "\"?!\"",
+/*26*/ "|\ @~",
+);
+
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_punct($value) );
+ $iterator++;
+};
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_punct() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(true)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(true)
+
+-- Iteration 26 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_punct_variation4.phpt b/ext/ctype/tests/ctype_punct_variation4.phpt
new file mode 100644
index 000000000..40ef656cb
--- /dev/null
+++ b/ext/ctype/tests/ctype_punct_variation4.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Test ctype_punct() function : usage variations - Octal and Hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_punct(mixed $c)
+ * Description: Checks for any printable character which is not whitespace
+ * or an alphanumeric character
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different octal and hexadecimal values to ctype_punct() to test behaviour
+ */
+
+echo "*** Testing ctype_punct() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array(041, 042, 043, 044);
+$hex_values = array(0x21, 0x22, 0x23, 0x24);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_punct($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_punct($c));
+ $iterator++;
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_punct() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_space_basic.phpt b/ext/ctype/tests/ctype_space_basic.phpt
new file mode 100644
index 000000000..8f2cbe91b
--- /dev/null
+++ b/ext/ctype/tests/ctype_space_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_space() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_space(mixed $c)
+ * Description: Checks for whitespace character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_space() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = " \t\r\n";
+var_dump(ctype_space($c1));
+
+$c2 = "Hello, world!\n";
+var_dump(ctype_space($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_space() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_space_error.phpt b/ext/ctype/tests/ctype_space_error.phpt
new file mode 100644
index 000000000..e4cd4f4f4
--- /dev/null
+++ b/ext/ctype/tests/ctype_space_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test ctype_space() function : error conditions - Incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool ctype_space(mixed $c)
+ * Description: Checks for whitespace character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to ctype_space() to test behaviour
+ */
+
+echo "*** Testing ctype_space() : error conditions ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+// Zero arguments
+echo "\n-- Testing ctype_space() function with Zero arguments --\n";
+var_dump( ctype_space() );
+
+//Test ctype_space with one more than the expected number of arguments
+echo "\n-- Testing ctype_space() function with more than expected no. of arguments --\n";
+$c = " ";
+$extra_arg = 10;
+var_dump( ctype_space($c, $extra_arg) );
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_space() : error conditions ***
+
+-- Testing ctype_space() function with Zero arguments --
+
+Warning: ctype_space() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_space() function with more than expected no. of arguments --
+
+Warning: ctype_space() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_space_variation1.phpt b/ext/ctype/tests/ctype_space_variation1.phpt
new file mode 100644
index 000000000..be1cb2406
--- /dev/null
+++ b/ext/ctype/tests/ctype_space_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_space() function : usage variations - different data types as $c argument
+--FILE--
+<?php
+/* Prototype : bool ctype_space(mixed $c)
+ * Description: Checks for whitespace character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_space() to test behaviour
+ */
+
+echo "*** Testing ctype_space() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "\n\t\r";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "\n\t\r",
+ ' ',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_space()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_space($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_space() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_space_variation2.phpt b/ext/ctype/tests/ctype_space_variation2.phpt
new file mode 100644
index 000000000..8eadc2359
--- /dev/null
+++ b/ext/ctype/tests/ctype_space_variation2.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test ctype_space() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_space(mixed $c)
+ * Description: Checks for whitespace character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_space() to test which character codes are considered
+ * valid whitespace characters
+ */
+
+echo "*** Testing ctype_space() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($c = 1; $c < 256; $c++) {
+ if (ctype_space($c)) {
+ echo "character code $c is a space character\n";
+ }
+}
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_space() : usage variations ***
+character code 9 is a space character
+character code 10 is a space character
+character code 11 is a space character
+character code 12 is a space character
+character code 13 is a space character
+character code 32 is a space character
+===DONE===
diff --git a/ext/ctype/tests/ctype_space_variation3.phpt b/ext/ctype/tests/ctype_space_variation3.phpt
new file mode 100644
index 000000000..21aa866c9
--- /dev/null
+++ b/ext/ctype/tests/ctype_space_variation3.phpt
@@ -0,0 +1,138 @@
+--TEST--
+Test ctype_space() function : usage variations - different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_space(mixed $c)
+ * Description: Checks for whitespace character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_space() to test
+ * which are considered valid whitespace character only strings
+ */
+
+echo "*** Testing ctype_space() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ "abc123\n",
+/*20*/ 'abc 123',
+ '',
+ ' ',
+ base64_decode("w4DDoMOHw6fDiMOo"), // non-ascii characters
+ "\"\n",
+/*25*/ " \t\r\n",
+/*26*/ "\v\f",
+);
+
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_space($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_space() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(true)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(true)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(true)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(true)
+
+-- Iteration 26 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_space_variation4.phpt b/ext/ctype/tests/ctype_space_variation4.phpt
new file mode 100644
index 000000000..3eed45a45
--- /dev/null
+++ b/ext/ctype/tests/ctype_space_variation4.phpt
@@ -0,0 +1,69 @@
+--TEST--
+Test ctype_space() function : usage variations - octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_space(mixed $c)
+ * Description: Checks for whitespace character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass octal and hexadecimal values as $c to ctype_space() to test behaviour
+ */
+
+echo "*** Testing ctype_space() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array (011, 012, 013, 014, 015, 040);
+$hex_values = array (0x9, 0xA, 0xB, 0xC, 0xD, 0x20);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_space($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_space($c));
+ $iterator++;
+}
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_space() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+-- Iteration 5 --
+bool(true)
+-- Iteration 6 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+-- Iteration 5 --
+bool(true)
+-- Iteration 6 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_upper_basic.phpt b/ext/ctype/tests/ctype_upper_basic.phpt
new file mode 100644
index 000000000..55f91151a
--- /dev/null
+++ b/ext/ctype/tests/ctype_upper_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test ctype_upper() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_upper(mixed $c)
+ * Description: Checks for uppercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_upper() : basic functionality ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = 'HELLOWORLD';
+$c2 = "Hello, World!\n";
+
+var_dump(ctype_upper($c1));
+var_dump(ctype_upper($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_upper() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_upper_error.phpt b/ext/ctype/tests/ctype_upper_error.phpt
new file mode 100644
index 000000000..185e63d9e
--- /dev/null
+++ b/ext/ctype/tests/ctype_upper_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test ctype_upper() function : error conditions - incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool ctype_upper(mixed $c)
+ * Description: Checks for uppercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass incorrect number of arguments to ctype_upper() to test behaviour
+ */
+
+echo "*** Testing ctype_upper() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ctype_upper() function with Zero arguments --\n";
+var_dump( ctype_upper() );
+
+//Test ctype_upper with one more than the expected number of arguments
+echo "\n-- Testing ctype_upper() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_upper($c, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_upper() : error conditions ***
+
+-- Testing ctype_upper() function with Zero arguments --
+
+Warning: ctype_upper() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_upper() function with more than expected no. of arguments --
+
+Warning: ctype_upper() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_upper_variation1.phpt b/ext/ctype/tests/ctype_upper_variation1.phpt
new file mode 100644
index 000000000..f7dd07921
--- /dev/null
+++ b/ext/ctype/tests/ctype_upper_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_upper() function : usage variations - different data types
+--FILE--
+<?php
+/* Prototype : bool ctype_upper(mixed $c)
+ * Description: Checks for uppercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_upper() to test behaviour
+ */
+
+echo "*** Testing ctype_upper() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "HELLO";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+HI
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "STRING",
+ 'STRING',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_upper()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_upper($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_upper() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_upper_variation2.phpt b/ext/ctype/tests/ctype_upper_variation2.phpt
new file mode 100644
index 000000000..03ec85806
--- /dev/null
+++ b/ext/ctype/tests/ctype_upper_variation2.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test ctype_upper() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_upper(mixed $c)
+ * Description: Checks for uppercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_upper() to test which character codes are considered
+ * valid uppercase characters
+ */
+
+echo "*** Testing ctype_upper() : usage variations ***\n";
+$orig = setlocale(LC_CTYPE, "C");
+
+for ($i = 0; $i < 256; $i++) {
+ if (ctype_upper($i)) {
+ echo "character code $i is a uppercase character\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_upper() : usage variations ***
+character code 65 is a uppercase character
+character code 66 is a uppercase character
+character code 67 is a uppercase character
+character code 68 is a uppercase character
+character code 69 is a uppercase character
+character code 70 is a uppercase character
+character code 71 is a uppercase character
+character code 72 is a uppercase character
+character code 73 is a uppercase character
+character code 74 is a uppercase character
+character code 75 is a uppercase character
+character code 76 is a uppercase character
+character code 77 is a uppercase character
+character code 78 is a uppercase character
+character code 79 is a uppercase character
+character code 80 is a uppercase character
+character code 81 is a uppercase character
+character code 82 is a uppercase character
+character code 83 is a uppercase character
+character code 84 is a uppercase character
+character code 85 is a uppercase character
+character code 86 is a uppercase character
+character code 87 is a uppercase character
+character code 88 is a uppercase character
+character code 89 is a uppercase character
+character code 90 is a uppercase character
+===DONE===
diff --git a/ext/ctype/tests/ctype_upper_variation3.phpt b/ext/ctype/tests/ctype_upper_variation3.phpt
new file mode 100644
index 000000000..db57ed5f9
--- /dev/null
+++ b/ext/ctype/tests/ctype_upper_variation3.phpt
@@ -0,0 +1,137 @@
+--TEST--
+Test ctype_upper() function : usage variations - different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_upper(mixed $c)
+ * Description: Checks for uppercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_upper() to test
+ * which are considered valid uppercase character only strings
+ */
+
+echo "*** Testing ctype_upper() : usage variations ***\n";
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ 'abc123\n',
+/*20*/ 'abc 123',
+ '',
+ ' ',
+ base64_decode("w4DDoMOHw6fDiMOo"), // non-ascii characters
+ "abcXYZ",
+/*25*/ "ABC XYZ",
+/*26*/ "ABC+EFG*XYZ",
+);
+
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_upper($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_upper() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(true)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(true)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+
+-- Iteration 26 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_upper_variation4.phpt b/ext/ctype/tests/ctype_upper_variation4.phpt
new file mode 100644
index 000000000..723c4d0a8
--- /dev/null
+++ b/ext/ctype/tests/ctype_upper_variation4.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test ctype_upper() function : usage variations - octal and hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ctype_upper(mixed $c)
+ * Description: Checks for uppercase character(s)
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass octal and hexadecimal values to ctype_upper() to test behaviour
+ */
+
+echo "*** Testing ctype_upper() : usage variations ***\n";
+$orig = setlocale(LC_CTYPE, "C");
+
+$octal_values = array(0101, 0102, 0103, 0104);
+$hex_values = array(0x41, 0x42, 0x43, 0x44);
+
+echo "\n-- Octal Values --\n";
+$iterator = 1;
+foreach($octal_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_upper($c));
+ $iterator++;
+}
+
+echo "\n-- Hexadecimal Values --\n";
+$iterator = 1;
+foreach($hex_values as $c) {
+ echo "-- Iteration $iterator --\n";
+ var_dump(ctype_upper($c));
+ $iterator++;
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_upper() : usage variations ***
+
+-- Octal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+
+-- Hexadecimal Values --
+-- Iteration 1 --
+bool(true)
+-- Iteration 2 --
+bool(true)
+-- Iteration 3 --
+bool(true)
+-- Iteration 4 --
+bool(true)
+===DONE===
diff --git a/ext/ctype/tests/ctype_xdigit_basic.phpt b/ext/ctype/tests/ctype_xdigit_basic.phpt
new file mode 100644
index 000000000..58cc5b2e0
--- /dev/null
+++ b/ext/ctype/tests/ctype_xdigit_basic.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Test ctype_xdigit() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ctype_xdigit(mixed $c)
+ * Description: Checks for character(s) representing a hexadecimal digit
+ * Source code: ext/ctype/ctype.c
+ */
+
+echo "*** Testing ctype_xdigit() : basic functionality ***\n";
+$orig = setlocale(LC_CTYPE, "C");
+
+$c1 = 'abcdefABCDEF0123456789';
+$c2 = 'face 034';
+
+var_dump(ctype_xdigit($c1));
+var_dump(ctype_xdigit($c2));
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_xdigit() : basic functionality ***
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_xdigit_error.phpt b/ext/ctype/tests/ctype_xdigit_error.phpt
new file mode 100644
index 000000000..06ee73341
--- /dev/null
+++ b/ext/ctype/tests/ctype_xdigit_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test ctype_xdigit() function : error conditions - Incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool ctype_xdigit(mixed $c)
+ * Description: Checks for character(s) representing a hexadecimal digit
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass incorrect number of arguments to ctype_xdigit() to test behaviour
+ */
+
+echo "*** Testing ctype_xdigit() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ctype_xdigit() function with Zero arguments --\n";
+var_dump( ctype_xdigit() );
+
+//Test ctype_xdigit with one more than the expected number of arguments
+echo "\n-- Testing ctype_xdigit() function with more than expected no. of arguments --\n";
+$c = 1;
+$extra_arg = 10;
+var_dump( ctype_xdigit($c, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_xdigit() : error conditions ***
+
+-- Testing ctype_xdigit() function with Zero arguments --
+
+Warning: ctype_xdigit() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing ctype_xdigit() function with more than expected no. of arguments --
+
+Warning: ctype_xdigit() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/ctype/tests/ctype_xdigit_variation1.phpt b/ext/ctype/tests/ctype_xdigit_variation1.phpt
new file mode 100644
index 000000000..adde77bbd
--- /dev/null
+++ b/ext/ctype/tests/ctype_xdigit_variation1.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ctype_xdigit() function : usage variations - different data typse as $c arg
+--FILE--
+<?php
+/* Prototype : bool ctype_xdigit(mixed $c)
+ * Description: Checks for character(s) representing a hexadecimal digit
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different data types as $c argument to ctype_xdigit() to test behaviour
+ */
+
+echo "*** Testing ctype_xdigit() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "ABcd";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+234
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $c argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "456",
+ 'def',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of ctype_xdigit()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_xdigit($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_xdigit() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(true)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_xdigit_variation2.phpt b/ext/ctype/tests/ctype_xdigit_variation2.phpt
new file mode 100644
index 000000000..92f9aba0c
--- /dev/null
+++ b/ext/ctype/tests/ctype_xdigit_variation2.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test ctype_xdigit() function : usage variations - different integers
+--FILE--
+<?php
+/* Prototype : bool ctype_xdigit(mixed $c)
+ * Description: Checks for character(s) representing a hexadecimal digit
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different integers to ctype_xdigit() to test which character codes are considered
+ * valid hexadecimal 'digits'
+ */
+
+echo "*** Testing ctype_xdigit() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+for($c = 1; $c < 256; $c++) {
+ if (ctype_xdigit($c)) {
+ echo "character code $c is a hexadecimal 'digit'\n";
+ }
+}
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_xdigit() : usage variations ***
+character code 48 is a hexadecimal 'digit'
+character code 49 is a hexadecimal 'digit'
+character code 50 is a hexadecimal 'digit'
+character code 51 is a hexadecimal 'digit'
+character code 52 is a hexadecimal 'digit'
+character code 53 is a hexadecimal 'digit'
+character code 54 is a hexadecimal 'digit'
+character code 55 is a hexadecimal 'digit'
+character code 56 is a hexadecimal 'digit'
+character code 57 is a hexadecimal 'digit'
+character code 65 is a hexadecimal 'digit'
+character code 66 is a hexadecimal 'digit'
+character code 67 is a hexadecimal 'digit'
+character code 68 is a hexadecimal 'digit'
+character code 69 is a hexadecimal 'digit'
+character code 70 is a hexadecimal 'digit'
+character code 97 is a hexadecimal 'digit'
+character code 98 is a hexadecimal 'digit'
+character code 99 is a hexadecimal 'digit'
+character code 100 is a hexadecimal 'digit'
+character code 101 is a hexadecimal 'digit'
+character code 102 is a hexadecimal 'digit'
+===DONE===
diff --git a/ext/ctype/tests/ctype_xdigit_variation3.phpt b/ext/ctype/tests/ctype_xdigit_variation3.phpt
new file mode 100644
index 000000000..35e8407fc
--- /dev/null
+++ b/ext/ctype/tests/ctype_xdigit_variation3.phpt
@@ -0,0 +1,138 @@
+--TEST--
+Test ctype_xdigit() function : usage variations - Different strings
+--FILE--
+<?php
+/* Prototype : bool ctype_xdigit(mixed $c)
+ * Description: Checks for character(s) representing a hexadecimal digit
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass strings containing different character types to ctype_xdigit() to test
+ * which are considered valid hexadecimal 'digit' only strings
+ */
+
+echo "*** Testing ctype_xdigit() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+$values = array(
+/*1*/ "This string contains just letters and spaces", // Simple string
+ "but this one contains some numbers too 123+456 = 678", // Mixed string
+ "",
+ " ",
+/*5*/ "a",
+ "ABCXYZ",
+ "abcxyz",
+ "ABCXYZ123DEF456",
+ "abczyz123DEF456",
+/*10*/ "\r\n",
+ "123",
+ "03F", // hexadecimal 'digits'
+ ")speci@! ch@r$(",
+ '@!$*',
+/*15*/ 'ABC',
+ 'abc',
+ 'ABC123',
+ 'abc123',
+ 'abc123\n',
+/*20*/ 'abc 123',
+ '',
+ ' ',
+ base64_decode("w4DDoMOHw6fDiMOo"), // non-ascii characters
+ 'ABCdef07',
+ "56ea\tFB",
+ "0x2A"
+ );
+
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( ctype_xdigit($value) );
+ $iterator++;
+};
+
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_xdigit() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(true)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(true)
+
+-- Iteration 25 --
+bool(false)
+
+-- Iteration 26 --
+bool(false)
+===DONE===
diff --git a/ext/ctype/tests/ctype_xdigit_variation4.phpt b/ext/ctype/tests/ctype_xdigit_variation4.phpt
new file mode 100644
index 000000000..68e03cb88
--- /dev/null
+++ b/ext/ctype/tests/ctype_xdigit_variation4.phpt
@@ -0,0 +1,81 @@
+--TEST--
+Test ctype_xdigit() function : usage variations - heaxadecimal and octal values
+--FILE--
+<?php
+/* Prototype : bool ctype_xdigit(mixed $c)
+ * Description: Checks for character(s) representing a hexadecimal digit
+ * Source code: ext/ctype/ctype.c
+ */
+
+/*
+ * Pass different hexadecimal and octal values that:
+ * 1. contain hexadecimal digits
+ * 2. correspond to character codes recognised as hexadecimal digits (see variation2)
+ * referred to as 'correct' integers below
+ */
+
+echo "*** Testing ctype_xdigit() : usage variations ***\n";
+
+$orig = setlocale(LC_CTYPE, "C");
+
+// contain hexadecimal digits but do not correspond to 'correct' ints
+$octal_values1 = array(012, 013, 014, 015);
+
+// correspond to 'correct' integers
+$octal_values2 = array(061, 062, 063, 064);
+
+// contain hexadecimal digits but do not correspond to 'correct' ints
+$hex_values1 = array(0x1A, 0x1B, 0x1C, 0x1D);
+
+//correspond to 'correct' integers
+$hex_values2 = array(0x61, 0x62, 0x63, 0x64);
+
+echo "\n-- Octal values --\n";
+echo "'Incorrect' Integers: \n";
+foreach($octal_values1 as $c) {
+ var_dump(ctype_xdigit($c));
+}
+echo "'Correct' Integers: \n";
+foreach($octal_values2 as $c) {
+ var_dump(ctype_xdigit($c));
+}
+
+echo "\n-- Hexadecimal values --\n";
+echo "'Incorrect' Integers: \n";
+foreach($hex_values1 as $c) {
+ var_dump(ctype_xdigit($c));
+}
+echo "'Correct' Integers: \n";
+foreach($hex_values2 as $c) {
+ var_dump(ctype_xdigit($c));
+}
+setlocale(LC_CTYPE, $orig);
+?>
+===DONE===
+--EXPECTF--
+*** Testing ctype_xdigit() : usage variations ***
+
+-- Octal values --
+'Incorrect' Integers:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+'Correct' Integers:
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+-- Hexadecimal values --
+'Incorrect' Integers:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+'Correct' Integers:
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+===DONE===
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 683c36aec..ff702f20b 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interface.c,v 1.62.2.14.2.29 2007/10/13 11:35:35 bjori Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.34 2008/01/06 17:12:29 iliaa Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -153,7 +153,7 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
#define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s), (long) v);
#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s), (double) v);
-#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), (char *) v, 1);
+#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), (char *) (v ? v : ""), 1);
#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
#if defined(PHP_WIN32) || defined(__GNUC__)
@@ -173,7 +173,7 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
php_curl_ret(__ret); \
} \
\
- if (!php_memnstr(str, tmp_url->path, strlen(tmp_url->path), str + len)) { \
+ if (tmp_url->host || !php_memnstr(str, tmp_url->path, strlen(tmp_url->path), str + len)) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL '%s' contains unencoded control characters", str); \
php_url_free(tmp_url); \
php_curl_ret(__ret); \
@@ -931,7 +931,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
}
/* }}} */
-static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, void *ctx)
+static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, void *ctx) /* {{{ */
{
php_curl *ch = (php_curl *) ctx;
@@ -947,6 +947,7 @@ static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, v
return 0;
}
+/* }}} */
#if CURLOPT_PASSWDFUNCTION != 0
/* {{{ curl_passwd
@@ -1074,9 +1075,9 @@ static void alloc_curl_handle(php_curl **ch)
memset(&(*ch)->err, 0, sizeof((*ch)->err));
- zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (void(*)(void *)) curl_free_string, 0);
- zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), (void(*)(void *)) curl_free_slist, 0);
- zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost), (void(*)(void *)) curl_free_post, 0);
+ zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0);
+ zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), (llist_dtor_func_t) curl_free_slist, 0);
+ zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost), (llist_dtor_func_t) curl_free_post, 0);
}
/* }}} */
@@ -1204,6 +1205,8 @@ PHP_FUNCTION(curl_copy_handle)
curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch);
zend_llist_copy(&dupch->to_free.str, &ch->to_free.str);
+ /* Don't try to free copied strings, they're free'd when the original handle is destroyed */
+ dupch->to_free.str.dtor = NULL;
zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist);
zend_llist_copy(&dupch->to_free.post, &ch->to_free.post);
@@ -1212,7 +1215,7 @@ PHP_FUNCTION(curl_copy_handle)
}
/* }}} */
-static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *return_value TSRMLS_DC)
+static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *return_value TSRMLS_DC) /* {{{ */
{
CURLcode error=CURLE_OK;
@@ -1601,6 +1604,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
return 0;
}
}
+/* }}} */
/* {{{ proto bool curl_setopt(resource ch, int option, mixed value)
Set an option for a cURL transfer */
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 6d66b5fad..cefc5f441 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: multi.c,v 1.19.2.3.2.7 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: multi.c,v 1.19.2.3.2.9 2007/12/31 07:20:05 sebastian Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -122,13 +122,13 @@ void _php_curl_multi_cleanup_list(void *data) /* {{{ */
/* }}} */
/* Used internally as comparison routine passed to zend_list_del_element */
-static int curl_compare_resources( zval *z1, zval **z2 )
+static int curl_compare_resources( zval *z1, zval **z2 ) /* {{{ */
{
return (Z_TYPE_P( z1 ) == Z_TYPE_PP( z2 ) &&
Z_TYPE_P( z1 ) == IS_RESOURCE &&
Z_LVAL_P( z1 ) == Z_LVAL_PP( z2 ) );
}
-
+/* }}} */
/* {{{ proto int curl_multi_remove_handle(resource mh, resource ch)
Remove a multi handle from a set of cURL handles */
@@ -155,7 +155,7 @@ PHP_FUNCTION(curl_multi_remove_handle)
}
/* }}} */
-static void _make_timeval_struct(struct timeval *to, double timeout)
+static void _make_timeval_struct(struct timeval *to, double timeout) /* {{{ */
{
unsigned long conv;
@@ -163,6 +163,7 @@ static void _make_timeval_struct(struct timeval *to, double timeout)
to->tv_sec = conv / 1000000;
to->tv_usec = conv % 1000000;
}
+/* }}} */
/* {{{ proto int curl_multi_select(resource mh[, double timeout])
Get all the sockets associated with the cURL extension, which can then be "selected" */
@@ -319,7 +320,7 @@ PHP_FUNCTION(curl_multi_close)
}
/* }}} */
-void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
{
php_curlm *mh = (php_curlm *) rsrc->ptr;
if (mh) {
@@ -329,6 +330,7 @@ void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
rsrc->ptr = NULL;
}
}
+/* }}} */
#endif
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index 676671c4d..b17df0a77 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_curl.h,v 1.44.2.2.2.2 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: php_curl.h,v 1.44.2.2.2.3 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef _PHP_CURL_H
#define _PHP_CURL_H
diff --git a/ext/curl/streams.c b/ext/curl/streams.c
index b112bae83..2d73f25c8 100644
--- a/ext/curl/streams.c
+++ b/ext/curl/streams.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.14.2.2.2.11 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: streams.c,v 1.14.2.2.2.12 2007/12/31 07:20:05 sebastian Exp $ */
/* This file implements cURL based wrappers.
* NOTE: If you are implementing your own streams that are intended to
diff --git a/ext/date/lib/astro.c b/ext/date/lib/astro.c
index 17c03ba9b..87e91c448 100644
--- a/ext/date/lib/astro.c
+++ b/ext/date/lib/astro.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: astro.c,v 1.1.2.4.2.1 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: astro.c,v 1.1.2.4.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#include <stdio.h>
#include <math.h>
diff --git a/ext/date/lib/dow.c b/ext/date/lib/dow.c
index 08e83d2da..4a5fa32d5 100644
--- a/ext/date/lib/dow.c
+++ b/ext/date/lib/dow.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dow.c,v 1.8.2.3.2.3 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: dow.c,v 1.8.2.3.2.5 2008/02/22 17:49:30 derick Exp $ */
#include "timelib.h"
@@ -35,10 +35,12 @@ static timelib_sll timelib_day_of_week_ex(timelib_sll y, timelib_sll m, timelib_
{
timelib_sll c1, y1, m1, dow;
- /* Only valid for Gregorian calendar */
+ /* Only valid for Gregorian calendar, commented out as we don't handle
+ * julian calendar. We just return the 'wrong' day of week to be
+ * consistent.
if (y < 1753) {
return -1;
- }
+ } */
c1 = century_value(y / 100);
y1 = (y % 100);
m1 = timelib_is_leap(y) ? m_table_leap[m] : m_table_common[m];
diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
index 4d888a886..3c25760d6 100644
--- a/ext/date/lib/parse_date.c
+++ b/ext/date/lib/parse_date.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Thu Jul 12 19:32:22 2007 */
+/* Generated by re2c 0.12.1 on Mon Feb 25 19:27:05 2008 */
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: parse_date.c,v 1.29.2.30.2.14 2007/07/12 18:59:55 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.16 2008/02/25 18:28:03 derick Exp $ */
#include "timelib.h"
@@ -668,7 +668,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found
long value = 0;
const timelib_tz_lookup_table *tp;
- while (**ptr != '\0' && **ptr != ')') {
+ while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') {
++*ptr;
}
end = *ptr;
diff --git a/ext/date/lib/parse_date.c.orig b/ext/date/lib/parse_date.c.orig
index 79bad2b92..4948a2e82 100644
--- a/ext/date/lib/parse_date.c.orig
+++ b/ext/date/lib/parse_date.c.orig
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Thu Jul 12 19:32:22 2007 */
+/* Generated by re2c 0.12.1 on Mon Feb 25 19:27:05 2008 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: parse_date.c,v 1.29.2.30.2.14 2007/07/12 18:59:55 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.16 2008/02/25 18:28:03 derick Exp $ */
#include "timelib.h"
@@ -669,7 +669,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found
long value = 0;
const timelib_tz_lookup_table *tp;
- while (**ptr != '\0' && **ptr != ')') {
+ while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') {
++*ptr;
}
end = *ptr;
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index c88d12e5b..6a24ff1f0 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: parse_date.re,v 1.26.2.27.2.12 2007/07/12 18:58:00 derick Exp $ */
+/* $Id: parse_date.re,v 1.26.2.27.2.13 2008/02/25 18:28:18 derick Exp $ */
#include "timelib.h"
@@ -667,7 +667,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found
long value = 0;
const timelib_tz_lookup_table *tp;
- while (**ptr != '\0' && **ptr != ')') {
+ while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') {
++*ptr;
}
end = *ptr;
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
index 5aae8e036..1ec5def7c 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: parse_tz.c,v 1.20.2.6.2.13 2007/09/04 18:46:21 tony2001 Exp $ */
+/* $Id: parse_tz.c,v 1.20.2.6.2.14 2007/12/31 07:20:05 sebastian Exp $ */
#include "timelib.h"
diff --git a/ext/date/lib/timelib.c b/ext/date/lib/timelib.c
index 3043ebdf2..1a5e3c632 100644
--- a/ext/date/lib/timelib.c
+++ b/ext/date/lib/timelib.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: timelib.c,v 1.7.2.4.2.6 2007/07/20 23:53:40 jani Exp $ */
+/* $Id: timelib.c,v 1.7.2.4.2.7 2007/12/31 07:20:05 sebastian Exp $ */
#include "timelib.h"
#include <ctype.h>
diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h
index 40e32494f..04db962bb 100644
--- a/ext/date/lib/timelib.h
+++ b/ext/date/lib/timelib.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,12 +16,15 @@
+----------------------------------------------------------------------+
*/
-/* $Id: timelib.h,v 1.10.2.11.2.3 2007/07/20 23:53:40 jani Exp $ */
+/* $Id: timelib.h,v 1.10.2.11.2.5 2008/02/22 09:48:18 derick Exp $ */
#ifndef __TIMELIB_H__
#define __TIMELIB_H__
#include "timelib_structs.h"
+#if HAVE_LIMITS_H
+#include <limits.h>
+#endif
#define TIMELIB_NONE 0x00
#define TIMELIB_OVERRIDE_TIME 0x01
diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h
index 323c95a8a..57eb4aafd 100644
--- a/ext/date/lib/timelib_structs.h
+++ b/ext/date/lib/timelib_structs.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: timelib_structs.h,v 1.13.2.6.2.3 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: timelib_structs.h,v 1.13.2.6.2.4 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef __TIMELIB_STRUCTS_H__
#define __TIMELIB_STRUCTS_H__
diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h
index cfab2c936..bbd1c570a 100644
--- a/ext/date/lib/timezonedb.h
+++ b/ext/date/lib/timezonedb.h
@@ -1,4 +1,4 @@
-const timelib_tzdb_index_entry timezonedb_idx_builtin[552] = {
+const timelib_tzdb_index_entry timezonedb_idx_builtin[557] = {
{ "Africa/Abidjan" , 0x000000 },
{ "Africa/Accra" , 0x000049 },
{ "Africa/Addis_Ababa" , 0x0000E5 },
@@ -58,502 +58,507 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[552] = {
{ "America/Antigua" , 0x002535 },
{ "America/Araguaina" , 0x00258F },
{ "America/Argentina/Buenos_Aires" , 0x0026D5 },
- { "America/Argentina/Catamarca" , 0x00284E },
- { "America/Argentina/ComodRivadavia" , 0x0029DE },
- { "America/Argentina/Cordoba" , 0x002B6E },
- { "America/Argentina/Jujuy" , 0x002CF4 },
- { "America/Argentina/La_Rioja" , 0x002E88 },
- { "America/Argentina/Mendoza" , 0x00301D },
- { "America/Argentina/Rio_Gallegos" , 0x0031BB },
- { "America/Argentina/San_Juan" , 0x00334B },
- { "America/Argentina/Tucuman" , 0x0034E0 },
- { "America/Argentina/Ushuaia" , 0x003670 },
- { "America/Aruba" , 0x003800 },
- { "America/Asuncion" , 0x00385A },
- { "America/Atikokan" , 0x003B33 },
- { "America/Atka" , 0x003BB9 },
- { "America/Bahia" , 0x003F13 },
- { "America/Barbados" , 0x00408B },
- { "America/Belem" , 0x004119 },
- { "America/Belize" , 0x0041FB },
- { "America/Blanc-Sablon" , 0x00436B },
- { "America/Boa_Vista" , 0x0043E0 },
- { "America/Bogota" , 0x0044D6 },
- { "America/Boise" , 0x004536 },
- { "America/Buenos_Aires" , 0x004898 },
- { "America/Cambridge_Bay" , 0x004A11 },
- { "America/Campo_Grande" , 0x004D11 },
- { "America/Cancun" , 0x004FE2 },
- { "America/Caracas" , 0x0051FD },
- { "America/Catamarca" , 0x005258 },
- { "America/Cayenne" , 0x0053E8 },
- { "America/Cayman" , 0x00543E },
- { "America/Chicago" , 0x005487 },
- { "America/Chihuahua" , 0x005986 },
- { "America/Coral_Harbour" , 0x005BB0 },
- { "America/Cordoba" , 0x005C36 },
- { "America/Costa_Rica" , 0x005DBC },
- { "America/Cuiaba" , 0x005E3A },
- { "America/Curacao" , 0x006101 },
- { "America/Danmarkshavn" , 0x00615B },
- { "America/Dawson" , 0x006272 },
- { "America/Dawson_Creek" , 0x006569 },
- { "America/Denver" , 0x0066EE },
- { "America/Detroit" , 0x006A5B },
- { "America/Dominica" , 0x006D86 },
- { "America/Edmonton" , 0x006DCF },
- { "America/Eirunepe" , 0x007139 },
- { "America/El_Salvador" , 0x007225 },
- { "America/Ensenada" , 0x00728E },
- { "America/Fort_Wayne" , 0x0076FF },
- { "America/Fortaleza" , 0x0075EB },
- { "America/Glace_Bay" , 0x00795D },
- { "America/Godthab" , 0x007C81 },
- { "America/Goose_Bay" , 0x007F2B },
- { "America/Grand_Turk" , 0x0083B3 },
- { "America/Grenada" , 0x008656 },
- { "America/Guadeloupe" , 0x00869F },
- { "America/Guatemala" , 0x0086E8 },
- { "America/Guayaquil" , 0x008765 },
- { "America/Guyana" , 0x0087AE },
- { "America/Halifax" , 0x008823 },
- { "America/Havana" , 0x008CFF },
- { "America/Hermosillo" , 0x009066 },
- { "America/Indiana/Indianapolis" , 0x009119 },
- { "America/Indiana/Knox" , 0x009377 },
- { "America/Indiana/Marengo" , 0x0096DC },
- { "America/Indiana/Petersburg" , 0x00994E },
- { "America/Indiana/Tell_City" , 0x009E5F },
- { "America/Indiana/Vevay" , 0x00A0C7 },
- { "America/Indiana/Vincennes" , 0x00A2CB },
- { "America/Indiana/Winamac" , 0x00A533 },
- { "America/Indianapolis" , 0x009C01 },
- { "America/Inuvik" , 0x00A7B9 },
- { "America/Iqaluit" , 0x00AA7A },
- { "America/Jamaica" , 0x00AD64 },
- { "America/Jujuy" , 0x00AE1D },
- { "America/Juneau" , 0x00AFB1 },
- { "America/Kentucky/Louisville" , 0x00B305 },
- { "America/Kentucky/Monticello" , 0x00B6EE },
- { "America/Knox_IN" , 0x00BA41 },
- { "America/La_Paz" , 0x00BDA6 },
- { "America/Lima" , 0x00BE01 },
- { "America/Los_Angeles" , 0x00BE9D },
- { "America/Louisville" , 0x00C296 },
- { "America/Maceio" , 0x00C67F },
- { "America/Managua" , 0x00C79D },
- { "America/Manaus" , 0x00C844 },
- { "America/Martinique" , 0x00C930 },
- { "America/Mazatlan" , 0x00C990 },
- { "America/Mendoza" , 0x00CBC9 },
- { "America/Menominee" , 0x00CD67 },
- { "America/Merida" , 0x00D095 },
- { "America/Mexico_City" , 0x00D2A4 },
- { "America/Miquelon" , 0x00D4F6 },
- { "America/Moncton" , 0x00D75C },
- { "America/Monterrey" , 0x00DBCA },
- { "America/Montevideo" , 0x00DDCD },
- { "America/Montreal" , 0x00E0D3 },
- { "America/Montserrat" , 0x00E5B7 },
- { "America/Nassau" , 0x00E600 },
- { "America/New_York" , 0x00E939 },
- { "America/Nipigon" , 0x00EE2C },
- { "America/Nome" , 0x00F126 },
- { "America/Noronha" , 0x00F47F },
- { "America/North_Dakota/Center" , 0x00F593 },
- { "America/North_Dakota/New_Salem" , 0x00F8F0 },
- { "America/Panama" , 0x00FC4D },
- { "America/Pangnirtung" , 0x00FC96 },
- { "America/Paramaribo" , 0x00FF9D },
- { "America/Phoenix" , 0x010023 },
- { "America/Port-au-Prince" , 0x0100A5 },
- { "America/Port_of_Spain" , 0x010297 },
- { "America/Porto_Acre" , 0x0101B5 },
- { "America/Porto_Velho" , 0x0102E0 },
- { "America/Puerto_Rico" , 0x0103C2 },
- { "America/Rainy_River" , 0x010421 },
- { "America/Rankin_Inlet" , 0x01071B },
- { "America/Recife" , 0x0109D7 },
- { "America/Regina" , 0x010AEB },
- { "America/Resolute" , 0x010C68 },
- { "America/Rio_Branco" , 0x010DEE },
- { "America/Rosario" , 0x010ED0 },
- { "America/Santiago" , 0x011056 },
- { "America/Santo_Domingo" , 0x0113E5 },
- { "America/Sao_Paulo" , 0x01149F },
- { "America/Scoresbysund" , 0x011770 },
- { "America/Shiprock" , 0x011A33 },
- { "America/St_Johns" , 0x011DA0 },
- { "America/St_Kitts" , 0x0122BF },
- { "America/St_Lucia" , 0x012308 },
- { "America/St_Thomas" , 0x012351 },
- { "America/St_Vincent" , 0x01239A },
- { "America/Swift_Current" , 0x0123E3 },
- { "America/Tegucigalpa" , 0x0124CA },
- { "America/Thule" , 0x01253D },
- { "America/Thunder_Bay" , 0x012768 },
- { "America/Tijuana" , 0x012A82 },
- { "America/Toronto" , 0x012DDF },
- { "America/Tortola" , 0x0132C3 },
- { "America/Vancouver" , 0x01330C },
- { "America/Virgin" , 0x013719 },
- { "America/Whitehorse" , 0x013762 },
- { "America/Winnipeg" , 0x013A59 },
- { "America/Yakutat" , 0x013E67 },
- { "America/Yellowknife" , 0x0141A3 },
- { "Antarctica/Casey" , 0x01447A },
- { "Antarctica/Davis" , 0x0144C3 },
- { "Antarctica/DumontDUrville" , 0x014517 },
- { "Antarctica/Mawson" , 0x014577 },
- { "Antarctica/McMurdo" , 0x0145C1 },
- { "Antarctica/Palmer" , 0x01489B },
- { "Antarctica/Rothera" , 0x014B8E },
- { "Antarctica/South_Pole" , 0x014BD8 },
- { "Antarctica/Syowa" , 0x014EB2 },
- { "Antarctica/Vostok" , 0x014EFC },
- { "Arctic/Longyearbyen" , 0x014F46 },
- { "Asia/Aden" , 0x01526C },
- { "Asia/Almaty" , 0x0152B5 },
- { "Asia/Amman" , 0x01541A },
- { "Asia/Anadyr" , 0x0156CE },
- { "Asia/Aqtau" , 0x01599A },
- { "Asia/Aqtobe" , 0x015B5C },
- { "Asia/Ashgabat" , 0x015CF9 },
- { "Asia/Ashkhabad" , 0x015E0A },
- { "Asia/Baghdad" , 0x015F1B },
- { "Asia/Bahrain" , 0x0161B0 },
- { "Asia/Baku" , 0x01620A },
- { "Asia/Bangkok" , 0x0164E6 },
- { "Asia/Beirut" , 0x01652F },
- { "Asia/Bishkek" , 0x016830 },
- { "Asia/Brunei" , 0x0169D0 },
- { "Asia/Calcutta" , 0x016A26 },
- { "Asia/Choibalsan" , 0x016A93 },
- { "Asia/Chongqing" , 0x016BE1 },
- { "Asia/Chungking" , 0x016C84 },
- { "Asia/Colombo" , 0x016D27 },
- { "Asia/Dacca" , 0x016DB7 },
- { "Asia/Damascus" , 0x016E3A },
- { "Asia/Dhaka" , 0x01717E },
- { "Asia/Dili" , 0x017201 },
- { "Asia/Dubai" , 0x01727E },
- { "Asia/Dushanbe" , 0x0172C7 },
- { "Asia/Gaza" , 0x0173BE },
- { "Asia/Harbin" , 0x0176FB },
- { "Asia/Hong_Kong" , 0x0177B5 },
- { "Asia/Hovd" , 0x01795F },
- { "Asia/Irkutsk" , 0x017AA0 },
- { "Asia/Istanbul" , 0x017D64 },
- { "Asia/Jakarta" , 0x018145 },
- { "Asia/Jayapura" , 0x0181D5 },
- { "Asia/Jerusalem" , 0x018234 },
- { "Asia/Kabul" , 0x018557 },
- { "Asia/Kamchatka" , 0x01859C },
- { "Asia/Karachi" , 0x018860 },
- { "Asia/Kashgar" , 0x0188F5 },
- { "Asia/Katmandu" , 0x0189A5 },
- { "Asia/Krasnoyarsk" , 0x0189FF },
- { "Asia/Kuala_Lumpur" , 0x018CC3 },
- { "Asia/Kuching" , 0x018D61 },
- { "Asia/Kuwait" , 0x018E34 },
- { "Asia/Macao" , 0x018E7D },
- { "Asia/Macau" , 0x018FAC },
- { "Asia/Magadan" , 0x0190DB },
- { "Asia/Makassar" , 0x01939F },
- { "Asia/Manila" , 0x01940F },
- { "Asia/Muscat" , 0x019488 },
- { "Asia/Nicosia" , 0x0194D1 },
- { "Asia/Novosibirsk" , 0x0197AD },
- { "Asia/Omsk" , 0x019A7E },
- { "Asia/Oral" , 0x019D42 },
- { "Asia/Phnom_Penh" , 0x019EF7 },
- { "Asia/Pontianak" , 0x019F63 },
- { "Asia/Pyongyang" , 0x01A003 },
- { "Asia/Qatar" , 0x01A064 },
- { "Asia/Qyzylorda" , 0x01A0BE },
- { "Asia/Rangoon" , 0x01A268 },
- { "Asia/Riyadh" , 0x01A2D4 },
- { "Asia/Saigon" , 0x01A31D },
- { "Asia/Sakhalin" , 0x01A389 },
- { "Asia/Samarkand" , 0x01A662 },
- { "Asia/Seoul" , 0x01A77D },
- { "Asia/Shanghai" , 0x01A815 },
- { "Asia/Singapore" , 0x01A8BA },
- { "Asia/Taipei" , 0x01A965 },
- { "Asia/Tashkent" , 0x01AA71 },
- { "Asia/Tbilisi" , 0x01AB87 },
- { "Asia/Tehran" , 0x01AD35 },
- { "Asia/Tel_Aviv" , 0x01AF97 },
- { "Asia/Thimbu" , 0x01B2BA },
- { "Asia/Thimphu" , 0x01B314 },
- { "Asia/Tokyo" , 0x01B36E },
- { "Asia/Ujung_Pandang" , 0x01B3EB },
- { "Asia/Ulaanbaatar" , 0x01B45B },
- { "Asia/Ulan_Bator" , 0x01B59C },
- { "Asia/Urumqi" , 0x01B6DD },
- { "Asia/Vientiane" , 0x01B780 },
- { "Asia/Vladivostok" , 0x01B7EC },
- { "Asia/Yakutsk" , 0x01BAB7 },
- { "Asia/Yekaterinburg" , 0x01BD7B },
- { "Asia/Yerevan" , 0x01C06A },
- { "Atlantic/Azores" , 0x01C362 },
- { "Atlantic/Bermuda" , 0x01C853 },
- { "Atlantic/Canary" , 0x01CB28 },
- { "Atlantic/Cape_Verde" , 0x01CDE4 },
- { "Atlantic/Faeroe" , 0x01CE51 },
- { "Atlantic/Faroe" , 0x01D0E9 },
- { "Atlantic/Jan_Mayen" , 0x01D381 },
- { "Atlantic/Madeira" , 0x01D6A7 },
- { "Atlantic/Reykjavik" , 0x01DB95 },
- { "Atlantic/South_Georgia" , 0x01DD42 },
- { "Atlantic/St_Helena" , 0x01E042 },
- { "Atlantic/Stanley" , 0x01DD7A },
- { "Australia/ACT" , 0x01E08B },
- { "Australia/Adelaide" , 0x01E39C },
- { "Australia/Brisbane" , 0x01E6AD },
- { "Australia/Broken_Hill" , 0x01E74D },
- { "Australia/Canberra" , 0x01EA63 },
- { "Australia/Currie" , 0x01ED74 },
- { "Australia/Darwin" , 0x01F085 },
- { "Australia/Eucla" , 0x01F0ED },
- { "Australia/Hobart" , 0x01F198 },
- { "Australia/LHI" , 0x01F4D1 },
- { "Australia/Lindeman" , 0x01F760 },
- { "Australia/Lord_Howe" , 0x01F819 },
- { "Australia/Melbourne" , 0x01FAA8 },
- { "Australia/North" , 0x01FDB9 },
- { "Australia/NSW" , 0x01FE21 },
- { "Australia/Perth" , 0x020132 },
- { "Australia/Queensland" , 0x0201DC },
- { "Australia/South" , 0x02027C },
- { "Australia/Sydney" , 0x02058D },
- { "Australia/Tasmania" , 0x02089E },
- { "Australia/Victoria" , 0x020BD7 },
- { "Australia/West" , 0x020EE8 },
- { "Australia/Yancowinna" , 0x020F92 },
- { "Brazil/Acre" , 0x0212A8 },
- { "Brazil/DeNoronha" , 0x02138A },
- { "Brazil/East" , 0x02149E },
- { "Brazil/West" , 0x02176F },
- { "Canada/Atlantic" , 0x02185B },
- { "Canada/Central" , 0x021D37 },
- { "Canada/East-Saskatchewan" , 0x022629 },
- { "Canada/Eastern" , 0x022145 },
- { "Canada/Mountain" , 0x0227A6 },
- { "Canada/Newfoundland" , 0x022B10 },
- { "Canada/Pacific" , 0x02302F },
- { "Canada/Saskatchewan" , 0x02343C },
- { "Canada/Yukon" , 0x0235B9 },
- { "CET" , 0x0238B0 },
- { "Chile/Continental" , 0x023BA3 },
- { "Chile/EasterIsland" , 0x023F32 },
- { "CST6CDT" , 0x024268 },
- { "Cuba" , 0x0245AD },
- { "EET" , 0x024914 },
- { "Egypt" , 0x024BBB },
- { "Eire" , 0x024F76 },
- { "EST" , 0x02547B },
- { "EST5EDT" , 0x0254B3 },
- { "Etc/GMT" , 0x0257F8 },
- { "Etc/GMT+0" , 0x0258A0 },
- { "Etc/GMT+1" , 0x025912 },
- { "Etc/GMT+10" , 0x025987 },
- { "Etc/GMT+11" , 0x0259FD },
- { "Etc/GMT+12" , 0x025A73 },
- { "Etc/GMT+2" , 0x025B5E },
- { "Etc/GMT+3" , 0x025BD2 },
- { "Etc/GMT+4" , 0x025C46 },
- { "Etc/GMT+5" , 0x025CBA },
- { "Etc/GMT+6" , 0x025D2E },
- { "Etc/GMT+7" , 0x025DA2 },
- { "Etc/GMT+8" , 0x025E16 },
- { "Etc/GMT+9" , 0x025E8A },
- { "Etc/GMT-0" , 0x025868 },
- { "Etc/GMT-1" , 0x0258D8 },
- { "Etc/GMT-10" , 0x02594C },
- { "Etc/GMT-11" , 0x0259C2 },
- { "Etc/GMT-12" , 0x025A38 },
- { "Etc/GMT-13" , 0x025AAE },
- { "Etc/GMT-14" , 0x025AE9 },
- { "Etc/GMT-2" , 0x025B24 },
- { "Etc/GMT-3" , 0x025B98 },
- { "Etc/GMT-4" , 0x025C0C },
- { "Etc/GMT-5" , 0x025C80 },
- { "Etc/GMT-6" , 0x025CF4 },
- { "Etc/GMT-7" , 0x025D68 },
- { "Etc/GMT-8" , 0x025DDC },
- { "Etc/GMT-9" , 0x025E50 },
- { "Etc/GMT0" , 0x025830 },
- { "Etc/Greenwich" , 0x025EC4 },
- { "Etc/UCT" , 0x025EFC },
- { "Etc/Universal" , 0x025F34 },
- { "Etc/UTC" , 0x025F6C },
- { "Etc/Zulu" , 0x025FA4 },
- { "Europe/Amsterdam" , 0x025FDC },
- { "Europe/Andorra" , 0x02640E },
- { "Europe/Athens" , 0x02667E },
- { "Europe/Belfast" , 0x0269B5 },
- { "Europe/Belgrade" , 0x026EE0 },
- { "Europe/Berlin" , 0x027198 },
- { "Europe/Bratislava" , 0x0274DD },
- { "Europe/Brussels" , 0x027803 },
- { "Europe/Bucharest" , 0x027C2E },
- { "Europe/Budapest" , 0x027F4C },
- { "Europe/Chisinau" , 0x0282AE },
- { "Europe/Copenhagen" , 0x028630 },
- { "Europe/Dublin" , 0x02892E },
- { "Europe/Gibraltar" , 0x028E33 },
- { "Europe/Guernsey" , 0x02927E },
- { "Europe/Helsinki" , 0x0297A9 },
- { "Europe/Isle_of_Man" , 0x029A53 },
- { "Europe/Istanbul" , 0x029F7E },
- { "Europe/Jersey" , 0x02A35F },
- { "Europe/Kaliningrad" , 0x02A88A },
- { "Europe/Kiev" , 0x02ABCA },
- { "Europe/Lisbon" , 0x02AEC7 },
- { "Europe/Ljubljana" , 0x02B3B7 },
- { "Europe/London" , 0x02B66F },
- { "Europe/Luxembourg" , 0x02BB9A },
- { "Europe/Madrid" , 0x02BFE4 },
- { "Europe/Malta" , 0x02C396 },
- { "Europe/Mariehamn" , 0x02C743 },
- { "Europe/Minsk" , 0x02C9ED },
- { "Europe/Monaco" , 0x02CCEC },
- { "Europe/Moscow" , 0x02D11B },
- { "Europe/Nicosia" , 0x02D44A },
- { "Europe/Oslo" , 0x02D726 },
- { "Europe/Paris" , 0x02DA4C },
- { "Europe/Podgorica" , 0x02DE86 },
- { "Europe/Prague" , 0x02E13E },
- { "Europe/Riga" , 0x02E464 },
- { "Europe/Rome" , 0x02E79D },
- { "Europe/Samara" , 0x02EB54 },
- { "Europe/San_Marino" , 0x02EE58 },
- { "Europe/Sarajevo" , 0x02F20F },
- { "Europe/Simferopol" , 0x02F4C7 },
- { "Europe/Skopje" , 0x02F7D8 },
- { "Europe/Sofia" , 0x02FA90 },
- { "Europe/Stockholm" , 0x02FD7F },
- { "Europe/Tallinn" , 0x030022 },
- { "Europe/Tirane" , 0x030350 },
- { "Europe/Tiraspol" , 0x03064A },
- { "Europe/Uzhgorod" , 0x0309CC },
- { "Europe/Vaduz" , 0x030CCF },
- { "Europe/Vatican" , 0x030F56 },
- { "Europe/Vienna" , 0x03130D },
- { "Europe/Vilnius" , 0x03162E },
- { "Europe/Volgograd" , 0x031961 },
- { "Europe/Warsaw" , 0x031C47 },
- { "Europe/Zagreb" , 0x03201C },
- { "Europe/Zaporozhye" , 0x0322D4 },
- { "Europe/Zurich" , 0x0325DB },
- { "Factory" , 0x032888 },
- { "GB" , 0x0328ED },
- { "GB-Eire" , 0x032E18 },
- { "GMT" , 0x033343 },
- { "GMT+0" , 0x0333EB },
- { "GMT-0" , 0x0333B3 },
- { "GMT0" , 0x03337B },
- { "Greenwich" , 0x033423 },
- { "Hongkong" , 0x03345B },
- { "HST" , 0x033605 },
- { "Iceland" , 0x03363D },
- { "Indian/Antananarivo" , 0x0337EA },
- { "Indian/Chagos" , 0x033852 },
- { "Indian/Christmas" , 0x0338A8 },
- { "Indian/Cocos" , 0x0338E0 },
- { "Indian/Comoro" , 0x033918 },
- { "Indian/Kerguelen" , 0x033961 },
- { "Indian/Mahe" , 0x0339AA },
- { "Indian/Maldives" , 0x0339F3 },
- { "Indian/Mauritius" , 0x033A3C },
- { "Indian/Mayotte" , 0x033A85 },
- { "Indian/Reunion" , 0x033ACE },
- { "Iran" , 0x033B17 },
- { "Israel" , 0x033D79 },
- { "Jamaica" , 0x03409C },
- { "Japan" , 0x034155 },
- { "Kwajalein" , 0x0341D2 },
- { "Libya" , 0x034229 },
- { "MET" , 0x034317 },
- { "Mexico/BajaNorte" , 0x03460A },
- { "Mexico/BajaSur" , 0x034967 },
- { "Mexico/General" , 0x034BA0 },
- { "MST" , 0x034DF2 },
- { "MST7MDT" , 0x034E2A },
- { "Navajo" , 0x03516F },
- { "NZ" , 0x0354DC },
- { "NZ-CHAT" , 0x03584E },
- { "Pacific/Apia" , 0x035B2A },
- { "Pacific/Auckland" , 0x035B85 },
- { "Pacific/Chatham" , 0x035EF7 },
- { "Pacific/Easter" , 0x0361D3 },
- { "Pacific/Efate" , 0x036509 },
- { "Pacific/Enderbury" , 0x0365C3 },
- { "Pacific/Fakaofo" , 0x036616 },
- { "Pacific/Fiji" , 0x03664E },
- { "Pacific/Funafuti" , 0x0366B8 },
- { "Pacific/Galapagos" , 0x0366F0 },
- { "Pacific/Gambier" , 0x03674B },
- { "Pacific/Guadalcanal" , 0x036795 },
- { "Pacific/Guam" , 0x0367DE },
- { "Pacific/Honolulu" , 0x036828 },
- { "Pacific/Johnston" , 0x0368AA },
- { "Pacific/Kiritimati" , 0x0368E2 },
- { "Pacific/Kosrae" , 0x036935 },
- { "Pacific/Kwajalein" , 0x036980 },
- { "Pacific/Majuro" , 0x0369D7 },
- { "Pacific/Marquesas" , 0x036A1C },
- { "Pacific/Midway" , 0x036A66 },
- { "Pacific/Nauru" , 0x036AD6 },
- { "Pacific/Niue" , 0x036B42 },
- { "Pacific/Norfolk" , 0x036B94 },
- { "Pacific/Noumea" , 0x036BDD },
- { "Pacific/Pago_Pago" , 0x036C61 },
- { "Pacific/Palau" , 0x036CDE },
- { "Pacific/Pitcairn" , 0x036D16 },
- { "Pacific/Ponape" , 0x036D5F },
- { "Pacific/Port_Moresby" , 0x036D98 },
- { "Pacific/Rarotonga" , 0x036DD0 },
- { "Pacific/Saipan" , 0x036EA0 },
- { "Pacific/Samoa" , 0x036EF7 },
- { "Pacific/Tahiti" , 0x036F74 },
- { "Pacific/Tarawa" , 0x036FBE },
- { "Pacific/Tongatapu" , 0x036FF7 },
- { "Pacific/Truk" , 0x037077 },
- { "Pacific/Wake" , 0x0370B0 },
- { "Pacific/Wallis" , 0x0370E9 },
- { "Pacific/Yap" , 0x037121 },
- { "Poland" , 0x03715A },
- { "Portugal" , 0x03752F },
- { "PRC" , 0x037A1F },
- { "PST8PDT" , 0x037AC4 },
- { "ROC" , 0x037E09 },
- { "ROK" , 0x037F15 },
- { "Singapore" , 0x037FAD },
- { "Turkey" , 0x038058 },
- { "UCT" , 0x038439 },
- { "Universal" , 0x038471 },
- { "US/Alaska" , 0x0384A9 },
- { "US/Aleutian" , 0x038806 },
- { "US/Arizona" , 0x038B60 },
- { "US/Central" , 0x038BE2 },
- { "US/East-Indiana" , 0x0395D4 },
- { "US/Eastern" , 0x0390E1 },
- { "US/Hawaii" , 0x039832 },
- { "US/Indiana-Starke" , 0x0398B4 },
- { "US/Michigan" , 0x039C19 },
- { "US/Mountain" , 0x039F44 },
- { "US/Pacific" , 0x03A2B1 },
- { "US/Pacific-New" , 0x03A6AA },
- { "US/Samoa" , 0x03AAA3 },
- { "UTC" , 0x03AB20 },
- { "W-SU" , 0x03ADFF },
- { "WET" , 0x03AB58 },
- { "Zulu" , 0x03B12E },
+ { "America/Argentina/Catamarca" , 0x00297F },
+ { "America/Argentina/ComodRivadavia" , 0x002C40 },
+ { "America/Argentina/Cordoba" , 0x002F01 },
+ { "America/Argentina/Jujuy" , 0x0031B8 },
+ { "America/Argentina/La_Rioja" , 0x00347D },
+ { "America/Argentina/Mendoza" , 0x003743 },
+ { "America/Argentina/Rio_Gallegos" , 0x003A12 },
+ { "America/Argentina/San_Juan" , 0x003CD3 },
+ { "America/Argentina/San_Luis" , 0x003F99 },
+ { "America/Argentina/Tucuman" , 0x004138 },
+ { "America/Argentina/Ushuaia" , 0x0043F9 },
+ { "America/Aruba" , 0x0046BA },
+ { "America/Asuncion" , 0x004714 },
+ { "America/Atikokan" , 0x0049ED },
+ { "America/Atka" , 0x004A73 },
+ { "America/Bahia" , 0x004DCD },
+ { "America/Barbados" , 0x004F45 },
+ { "America/Belem" , 0x004FD3 },
+ { "America/Belize" , 0x0050B5 },
+ { "America/Blanc-Sablon" , 0x005225 },
+ { "America/Boa_Vista" , 0x00529A },
+ { "America/Bogota" , 0x005390 },
+ { "America/Boise" , 0x0053F0 },
+ { "America/Buenos_Aires" , 0x005752 },
+ { "America/Cambridge_Bay" , 0x0059FC },
+ { "America/Campo_Grande" , 0x005CFC },
+ { "America/Cancun" , 0x005FCD },
+ { "America/Caracas" , 0x0061E8 },
+ { "America/Catamarca" , 0x006243 },
+ { "America/Cayenne" , 0x006504 },
+ { "America/Cayman" , 0x00655A },
+ { "America/Chicago" , 0x0065A3 },
+ { "America/Chihuahua" , 0x006AA2 },
+ { "America/Coral_Harbour" , 0x006CCC },
+ { "America/Cordoba" , 0x006D52 },
+ { "America/Costa_Rica" , 0x007009 },
+ { "America/Cuiaba" , 0x007087 },
+ { "America/Curacao" , 0x00734E },
+ { "America/Danmarkshavn" , 0x0073A8 },
+ { "America/Dawson" , 0x0074BF },
+ { "America/Dawson_Creek" , 0x0077B6 },
+ { "America/Denver" , 0x00793B },
+ { "America/Detroit" , 0x007CA8 },
+ { "America/Dominica" , 0x007FD3 },
+ { "America/Edmonton" , 0x00801C },
+ { "America/Eirunepe" , 0x008386 },
+ { "America/El_Salvador" , 0x008472 },
+ { "America/Ensenada" , 0x0084DB },
+ { "America/Fort_Wayne" , 0x00894C },
+ { "America/Fortaleza" , 0x008838 },
+ { "America/Glace_Bay" , 0x008BAA },
+ { "America/Godthab" , 0x008ECE },
+ { "America/Goose_Bay" , 0x009178 },
+ { "America/Grand_Turk" , 0x009600 },
+ { "America/Grenada" , 0x0098A3 },
+ { "America/Guadeloupe" , 0x0098EC },
+ { "America/Guatemala" , 0x009935 },
+ { "America/Guayaquil" , 0x0099B2 },
+ { "America/Guyana" , 0x0099FB },
+ { "America/Halifax" , 0x009A70 },
+ { "America/Havana" , 0x009F4C },
+ { "America/Hermosillo" , 0x00A2B3 },
+ { "America/Indiana/Indianapolis" , 0x00A366 },
+ { "America/Indiana/Knox" , 0x00A5C4 },
+ { "America/Indiana/Marengo" , 0x00A929 },
+ { "America/Indiana/Petersburg" , 0x00AB9B },
+ { "America/Indiana/Tell_City" , 0x00B0AC },
+ { "America/Indiana/Vevay" , 0x00B314 },
+ { "America/Indiana/Vincennes" , 0x00B518 },
+ { "America/Indiana/Winamac" , 0x00B780 },
+ { "America/Indianapolis" , 0x00AE4E },
+ { "America/Inuvik" , 0x00BA06 },
+ { "America/Iqaluit" , 0x00BCC7 },
+ { "America/Jamaica" , 0x00BFB1 },
+ { "America/Jujuy" , 0x00C06A },
+ { "America/Juneau" , 0x00C32F },
+ { "America/Kentucky/Louisville" , 0x00C683 },
+ { "America/Kentucky/Monticello" , 0x00CA6C },
+ { "America/Knox_IN" , 0x00CDBF },
+ { "America/La_Paz" , 0x00D124 },
+ { "America/Lima" , 0x00D17F },
+ { "America/Los_Angeles" , 0x00D21B },
+ { "America/Louisville" , 0x00D614 },
+ { "America/Maceio" , 0x00D9FD },
+ { "America/Managua" , 0x00DB1B },
+ { "America/Manaus" , 0x00DBC2 },
+ { "America/Marigot" , 0x00DCAE },
+ { "America/Martinique" , 0x00DCF7 },
+ { "America/Mazatlan" , 0x00DD57 },
+ { "America/Mendoza" , 0x00DF90 },
+ { "America/Menominee" , 0x00E25F },
+ { "America/Merida" , 0x00E58D },
+ { "America/Mexico_City" , 0x00E79C },
+ { "America/Miquelon" , 0x00E9EE },
+ { "America/Moncton" , 0x00EC54 },
+ { "America/Monterrey" , 0x00F0C2 },
+ { "America/Montevideo" , 0x00F2C5 },
+ { "America/Montreal" , 0x00F5CB },
+ { "America/Montserrat" , 0x00FAAF },
+ { "America/Nassau" , 0x00FAF8 },
+ { "America/New_York" , 0x00FE31 },
+ { "America/Nipigon" , 0x010324 },
+ { "America/Nome" , 0x01061E },
+ { "America/Noronha" , 0x010977 },
+ { "America/North_Dakota/Center" , 0x010A8B },
+ { "America/North_Dakota/New_Salem" , 0x010DE8 },
+ { "America/Panama" , 0x011145 },
+ { "America/Pangnirtung" , 0x01118E },
+ { "America/Paramaribo" , 0x011495 },
+ { "America/Phoenix" , 0x01151B },
+ { "America/Port-au-Prince" , 0x01159D },
+ { "America/Port_of_Spain" , 0x01178F },
+ { "America/Porto_Acre" , 0x0116AD },
+ { "America/Porto_Velho" , 0x0117D8 },
+ { "America/Puerto_Rico" , 0x0118BA },
+ { "America/Rainy_River" , 0x011919 },
+ { "America/Rankin_Inlet" , 0x011C13 },
+ { "America/Recife" , 0x011ECF },
+ { "America/Regina" , 0x011FE3 },
+ { "America/Resolute" , 0x012160 },
+ { "America/Rio_Branco" , 0x0122E6 },
+ { "America/Rosario" , 0x0123C8 },
+ { "America/Santiago" , 0x01267F },
+ { "America/Santo_Domingo" , 0x012A0E },
+ { "America/Sao_Paulo" , 0x012AC8 },
+ { "America/Scoresbysund" , 0x012D99 },
+ { "America/Shiprock" , 0x01305C },
+ { "America/St_Barthelemy" , 0x0133C9 },
+ { "America/St_Johns" , 0x013412 },
+ { "America/St_Kitts" , 0x013931 },
+ { "America/St_Lucia" , 0x01397A },
+ { "America/St_Thomas" , 0x0139C3 },
+ { "America/St_Vincent" , 0x013A0C },
+ { "America/Swift_Current" , 0x013A55 },
+ { "America/Tegucigalpa" , 0x013B3C },
+ { "America/Thule" , 0x013BAF },
+ { "America/Thunder_Bay" , 0x013DDA },
+ { "America/Tijuana" , 0x0140F4 },
+ { "America/Toronto" , 0x014451 },
+ { "America/Tortola" , 0x014935 },
+ { "America/Vancouver" , 0x01497E },
+ { "America/Virgin" , 0x014D8B },
+ { "America/Whitehorse" , 0x014DD4 },
+ { "America/Winnipeg" , 0x0150CB },
+ { "America/Yakutat" , 0x0154D9 },
+ { "America/Yellowknife" , 0x015815 },
+ { "Antarctica/Casey" , 0x015AEC },
+ { "Antarctica/Davis" , 0x015B35 },
+ { "Antarctica/DumontDUrville" , 0x015B89 },
+ { "Antarctica/Mawson" , 0x015BE9 },
+ { "Antarctica/McMurdo" , 0x015C33 },
+ { "Antarctica/Palmer" , 0x015F0D },
+ { "Antarctica/Rothera" , 0x016200 },
+ { "Antarctica/South_Pole" , 0x01624A },
+ { "Antarctica/Syowa" , 0x016524 },
+ { "Antarctica/Vostok" , 0x01656E },
+ { "Arctic/Longyearbyen" , 0x0165B8 },
+ { "Asia/Aden" , 0x0168DE },
+ { "Asia/Almaty" , 0x016927 },
+ { "Asia/Amman" , 0x016A8C },
+ { "Asia/Anadyr" , 0x016D40 },
+ { "Asia/Aqtau" , 0x01700C },
+ { "Asia/Aqtobe" , 0x0171CE },
+ { "Asia/Ashgabat" , 0x01736B },
+ { "Asia/Ashkhabad" , 0x01747C },
+ { "Asia/Baghdad" , 0x01758D },
+ { "Asia/Bahrain" , 0x0176F6 },
+ { "Asia/Baku" , 0x017750 },
+ { "Asia/Bangkok" , 0x017A2C },
+ { "Asia/Beirut" , 0x017A75 },
+ { "Asia/Bishkek" , 0x017D76 },
+ { "Asia/Brunei" , 0x017F16 },
+ { "Asia/Calcutta" , 0x017F6C },
+ { "Asia/Choibalsan" , 0x017FD9 },
+ { "Asia/Chongqing" , 0x018127 },
+ { "Asia/Chungking" , 0x0181CA },
+ { "Asia/Colombo" , 0x01826D },
+ { "Asia/Dacca" , 0x0182FD },
+ { "Asia/Damascus" , 0x018380 },
+ { "Asia/Dhaka" , 0x0186C4 },
+ { "Asia/Dili" , 0x018747 },
+ { "Asia/Dubai" , 0x0187C4 },
+ { "Asia/Dushanbe" , 0x01880D },
+ { "Asia/Gaza" , 0x018904 },
+ { "Asia/Harbin" , 0x018C41 },
+ { "Asia/Ho_Chi_Minh" , 0x018CFB },
+ { "Asia/Hong_Kong" , 0x018D67 },
+ { "Asia/Hovd" , 0x018F11 },
+ { "Asia/Irkutsk" , 0x019052 },
+ { "Asia/Istanbul" , 0x019316 },
+ { "Asia/Jakarta" , 0x0196F7 },
+ { "Asia/Jayapura" , 0x019787 },
+ { "Asia/Jerusalem" , 0x0197E6 },
+ { "Asia/Kabul" , 0x019B09 },
+ { "Asia/Kamchatka" , 0x019B4E },
+ { "Asia/Karachi" , 0x019E12 },
+ { "Asia/Kashgar" , 0x019EA7 },
+ { "Asia/Katmandu" , 0x019F57 },
+ { "Asia/Kolkata" , 0x019FB1 },
+ { "Asia/Krasnoyarsk" , 0x01A01E },
+ { "Asia/Kuala_Lumpur" , 0x01A2E2 },
+ { "Asia/Kuching" , 0x01A380 },
+ { "Asia/Kuwait" , 0x01A453 },
+ { "Asia/Macao" , 0x01A49C },
+ { "Asia/Macau" , 0x01A5CB },
+ { "Asia/Magadan" , 0x01A6FA },
+ { "Asia/Makassar" , 0x01A9BE },
+ { "Asia/Manila" , 0x01AA2E },
+ { "Asia/Muscat" , 0x01AAA7 },
+ { "Asia/Nicosia" , 0x01AAF0 },
+ { "Asia/Novosibirsk" , 0x01ADCC },
+ { "Asia/Omsk" , 0x01B09D },
+ { "Asia/Oral" , 0x01B361 },
+ { "Asia/Phnom_Penh" , 0x01B516 },
+ { "Asia/Pontianak" , 0x01B582 },
+ { "Asia/Pyongyang" , 0x01B622 },
+ { "Asia/Qatar" , 0x01B683 },
+ { "Asia/Qyzylorda" , 0x01B6DD },
+ { "Asia/Rangoon" , 0x01B887 },
+ { "Asia/Riyadh" , 0x01B8F3 },
+ { "Asia/Saigon" , 0x01B93C },
+ { "Asia/Sakhalin" , 0x01B9A8 },
+ { "Asia/Samarkand" , 0x01BC81 },
+ { "Asia/Seoul" , 0x01BD9C },
+ { "Asia/Shanghai" , 0x01BE34 },
+ { "Asia/Singapore" , 0x01BED9 },
+ { "Asia/Taipei" , 0x01BF84 },
+ { "Asia/Tashkent" , 0x01C090 },
+ { "Asia/Tbilisi" , 0x01C1A6 },
+ { "Asia/Tehran" , 0x01C354 },
+ { "Asia/Tel_Aviv" , 0x01C5B6 },
+ { "Asia/Thimbu" , 0x01C8D9 },
+ { "Asia/Thimphu" , 0x01C933 },
+ { "Asia/Tokyo" , 0x01C98D },
+ { "Asia/Ujung_Pandang" , 0x01CA0A },
+ { "Asia/Ulaanbaatar" , 0x01CA7A },
+ { "Asia/Ulan_Bator" , 0x01CBBB },
+ { "Asia/Urumqi" , 0x01CCFC },
+ { "Asia/Vientiane" , 0x01CD9F },
+ { "Asia/Vladivostok" , 0x01CE0B },
+ { "Asia/Yakutsk" , 0x01D0D6 },
+ { "Asia/Yekaterinburg" , 0x01D39A },
+ { "Asia/Yerevan" , 0x01D689 },
+ { "Atlantic/Azores" , 0x01D981 },
+ { "Atlantic/Bermuda" , 0x01DE72 },
+ { "Atlantic/Canary" , 0x01E147 },
+ { "Atlantic/Cape_Verde" , 0x01E403 },
+ { "Atlantic/Faeroe" , 0x01E470 },
+ { "Atlantic/Faroe" , 0x01E708 },
+ { "Atlantic/Jan_Mayen" , 0x01E9A0 },
+ { "Atlantic/Madeira" , 0x01ECC6 },
+ { "Atlantic/Reykjavik" , 0x01F1B4 },
+ { "Atlantic/South_Georgia" , 0x01F361 },
+ { "Atlantic/St_Helena" , 0x01F661 },
+ { "Atlantic/Stanley" , 0x01F399 },
+ { "Australia/ACT" , 0x01F6AA },
+ { "Australia/Adelaide" , 0x01F9BB },
+ { "Australia/Brisbane" , 0x01FCCC },
+ { "Australia/Broken_Hill" , 0x01FD6C },
+ { "Australia/Canberra" , 0x020082 },
+ { "Australia/Currie" , 0x020393 },
+ { "Australia/Darwin" , 0x0206A4 },
+ { "Australia/Eucla" , 0x02070C },
+ { "Australia/Hobart" , 0x0207B7 },
+ { "Australia/LHI" , 0x020AF0 },
+ { "Australia/Lindeman" , 0x020D7F },
+ { "Australia/Lord_Howe" , 0x020E38 },
+ { "Australia/Melbourne" , 0x0210C7 },
+ { "Australia/North" , 0x0213D8 },
+ { "Australia/NSW" , 0x021440 },
+ { "Australia/Perth" , 0x021751 },
+ { "Australia/Queensland" , 0x0217FB },
+ { "Australia/South" , 0x02189B },
+ { "Australia/Sydney" , 0x021BAC },
+ { "Australia/Tasmania" , 0x021EBD },
+ { "Australia/Victoria" , 0x0221F6 },
+ { "Australia/West" , 0x022507 },
+ { "Australia/Yancowinna" , 0x0225B1 },
+ { "Brazil/Acre" , 0x0228C7 },
+ { "Brazil/DeNoronha" , 0x0229A9 },
+ { "Brazil/East" , 0x022ABD },
+ { "Brazil/West" , 0x022D8E },
+ { "Canada/Atlantic" , 0x022E7A },
+ { "Canada/Central" , 0x023356 },
+ { "Canada/East-Saskatchewan" , 0x023C48 },
+ { "Canada/Eastern" , 0x023764 },
+ { "Canada/Mountain" , 0x023DC5 },
+ { "Canada/Newfoundland" , 0x02412F },
+ { "Canada/Pacific" , 0x02464E },
+ { "Canada/Saskatchewan" , 0x024A5B },
+ { "Canada/Yukon" , 0x024BD8 },
+ { "CET" , 0x024ECF },
+ { "Chile/Continental" , 0x0251C2 },
+ { "Chile/EasterIsland" , 0x025551 },
+ { "CST6CDT" , 0x025887 },
+ { "Cuba" , 0x025BCC },
+ { "EET" , 0x025F33 },
+ { "Egypt" , 0x0261DA },
+ { "Eire" , 0x026595 },
+ { "EST" , 0x026A9A },
+ { "EST5EDT" , 0x026AD2 },
+ { "Etc/GMT" , 0x026E17 },
+ { "Etc/GMT+0" , 0x026EBF },
+ { "Etc/GMT+1" , 0x026F31 },
+ { "Etc/GMT+10" , 0x026FA6 },
+ { "Etc/GMT+11" , 0x02701C },
+ { "Etc/GMT+12" , 0x027092 },
+ { "Etc/GMT+2" , 0x02717D },
+ { "Etc/GMT+3" , 0x0271F1 },
+ { "Etc/GMT+4" , 0x027265 },
+ { "Etc/GMT+5" , 0x0272D9 },
+ { "Etc/GMT+6" , 0x02734D },
+ { "Etc/GMT+7" , 0x0273C1 },
+ { "Etc/GMT+8" , 0x027435 },
+ { "Etc/GMT+9" , 0x0274A9 },
+ { "Etc/GMT-0" , 0x026E87 },
+ { "Etc/GMT-1" , 0x026EF7 },
+ { "Etc/GMT-10" , 0x026F6B },
+ { "Etc/GMT-11" , 0x026FE1 },
+ { "Etc/GMT-12" , 0x027057 },
+ { "Etc/GMT-13" , 0x0270CD },
+ { "Etc/GMT-14" , 0x027108 },
+ { "Etc/GMT-2" , 0x027143 },
+ { "Etc/GMT-3" , 0x0271B7 },
+ { "Etc/GMT-4" , 0x02722B },
+ { "Etc/GMT-5" , 0x02729F },
+ { "Etc/GMT-6" , 0x027313 },
+ { "Etc/GMT-7" , 0x027387 },
+ { "Etc/GMT-8" , 0x0273FB },
+ { "Etc/GMT-9" , 0x02746F },
+ { "Etc/GMT0" , 0x026E4F },
+ { "Etc/Greenwich" , 0x0274E3 },
+ { "Etc/UCT" , 0x02751B },
+ { "Etc/Universal" , 0x027553 },
+ { "Etc/UTC" , 0x02758B },
+ { "Etc/Zulu" , 0x0275C3 },
+ { "Europe/Amsterdam" , 0x0275FB },
+ { "Europe/Andorra" , 0x027A2D },
+ { "Europe/Athens" , 0x027C9D },
+ { "Europe/Belfast" , 0x027FD4 },
+ { "Europe/Belgrade" , 0x0284FF },
+ { "Europe/Berlin" , 0x0287B7 },
+ { "Europe/Bratislava" , 0x028AFC },
+ { "Europe/Brussels" , 0x028E22 },
+ { "Europe/Bucharest" , 0x02924D },
+ { "Europe/Budapest" , 0x02956B },
+ { "Europe/Chisinau" , 0x0298CD },
+ { "Europe/Copenhagen" , 0x029C4F },
+ { "Europe/Dublin" , 0x029F4D },
+ { "Europe/Gibraltar" , 0x02A452 },
+ { "Europe/Guernsey" , 0x02A89D },
+ { "Europe/Helsinki" , 0x02ADC8 },
+ { "Europe/Isle_of_Man" , 0x02B072 },
+ { "Europe/Istanbul" , 0x02B59D },
+ { "Europe/Jersey" , 0x02B97E },
+ { "Europe/Kaliningrad" , 0x02BEA9 },
+ { "Europe/Kiev" , 0x02C1E9 },
+ { "Europe/Lisbon" , 0x02C4E6 },
+ { "Europe/Ljubljana" , 0x02C9D6 },
+ { "Europe/London" , 0x02CC8E },
+ { "Europe/Luxembourg" , 0x02D1B9 },
+ { "Europe/Madrid" , 0x02D603 },
+ { "Europe/Malta" , 0x02D9B5 },
+ { "Europe/Mariehamn" , 0x02DD62 },
+ { "Europe/Minsk" , 0x02E00C },
+ { "Europe/Monaco" , 0x02E30B },
+ { "Europe/Moscow" , 0x02E73A },
+ { "Europe/Nicosia" , 0x02EA69 },
+ { "Europe/Oslo" , 0x02ED45 },
+ { "Europe/Paris" , 0x02F06B },
+ { "Europe/Podgorica" , 0x02F4A5 },
+ { "Europe/Prague" , 0x02F75D },
+ { "Europe/Riga" , 0x02FA83 },
+ { "Europe/Rome" , 0x02FDBC },
+ { "Europe/Samara" , 0x030173 },
+ { "Europe/San_Marino" , 0x030477 },
+ { "Europe/Sarajevo" , 0x03082E },
+ { "Europe/Simferopol" , 0x030AE6 },
+ { "Europe/Skopje" , 0x030DF7 },
+ { "Europe/Sofia" , 0x0310AF },
+ { "Europe/Stockholm" , 0x03139E },
+ { "Europe/Tallinn" , 0x031641 },
+ { "Europe/Tirane" , 0x03196F },
+ { "Europe/Tiraspol" , 0x031C69 },
+ { "Europe/Uzhgorod" , 0x031FEB },
+ { "Europe/Vaduz" , 0x0322EE },
+ { "Europe/Vatican" , 0x032575 },
+ { "Europe/Vienna" , 0x03292C },
+ { "Europe/Vilnius" , 0x032C4D },
+ { "Europe/Volgograd" , 0x032F80 },
+ { "Europe/Warsaw" , 0x033266 },
+ { "Europe/Zagreb" , 0x03363B },
+ { "Europe/Zaporozhye" , 0x0338F3 },
+ { "Europe/Zurich" , 0x033BFA },
+ { "Factory" , 0x033EA7 },
+ { "GB" , 0x033F0C },
+ { "GB-Eire" , 0x034437 },
+ { "GMT" , 0x034962 },
+ { "GMT+0" , 0x034A0A },
+ { "GMT-0" , 0x0349D2 },
+ { "GMT0" , 0x03499A },
+ { "Greenwich" , 0x034A42 },
+ { "Hongkong" , 0x034A7A },
+ { "HST" , 0x034C24 },
+ { "Iceland" , 0x034C5C },
+ { "Indian/Antananarivo" , 0x034E09 },
+ { "Indian/Chagos" , 0x034E71 },
+ { "Indian/Christmas" , 0x034EC7 },
+ { "Indian/Cocos" , 0x034EFF },
+ { "Indian/Comoro" , 0x034F37 },
+ { "Indian/Kerguelen" , 0x034F80 },
+ { "Indian/Mahe" , 0x034FC9 },
+ { "Indian/Maldives" , 0x035012 },
+ { "Indian/Mauritius" , 0x03505B },
+ { "Indian/Mayotte" , 0x0350A4 },
+ { "Indian/Reunion" , 0x0350ED },
+ { "Iran" , 0x035136 },
+ { "Israel" , 0x035398 },
+ { "Jamaica" , 0x0356BB },
+ { "Japan" , 0x035774 },
+ { "Kwajalein" , 0x0357F1 },
+ { "Libya" , 0x035848 },
+ { "MET" , 0x035936 },
+ { "Mexico/BajaNorte" , 0x035C29 },
+ { "Mexico/BajaSur" , 0x035F86 },
+ { "Mexico/General" , 0x0361BF },
+ { "MST" , 0x036411 },
+ { "MST7MDT" , 0x036449 },
+ { "Navajo" , 0x03678E },
+ { "NZ" , 0x036AFB },
+ { "NZ-CHAT" , 0x036E6D },
+ { "Pacific/Apia" , 0x037149 },
+ { "Pacific/Auckland" , 0x0371A4 },
+ { "Pacific/Chatham" , 0x037516 },
+ { "Pacific/Easter" , 0x0377F2 },
+ { "Pacific/Efate" , 0x037B28 },
+ { "Pacific/Enderbury" , 0x037BE2 },
+ { "Pacific/Fakaofo" , 0x037C35 },
+ { "Pacific/Fiji" , 0x037C6D },
+ { "Pacific/Funafuti" , 0x037CD7 },
+ { "Pacific/Galapagos" , 0x037D0F },
+ { "Pacific/Gambier" , 0x037D6A },
+ { "Pacific/Guadalcanal" , 0x037DB4 },
+ { "Pacific/Guam" , 0x037DFD },
+ { "Pacific/Honolulu" , 0x037E47 },
+ { "Pacific/Johnston" , 0x037EC9 },
+ { "Pacific/Kiritimati" , 0x037F01 },
+ { "Pacific/Kosrae" , 0x037F54 },
+ { "Pacific/Kwajalein" , 0x037F9F },
+ { "Pacific/Majuro" , 0x037FF6 },
+ { "Pacific/Marquesas" , 0x03803B },
+ { "Pacific/Midway" , 0x038085 },
+ { "Pacific/Nauru" , 0x0380F5 },
+ { "Pacific/Niue" , 0x038161 },
+ { "Pacific/Norfolk" , 0x0381B3 },
+ { "Pacific/Noumea" , 0x0381FC },
+ { "Pacific/Pago_Pago" , 0x038280 },
+ { "Pacific/Palau" , 0x0382FD },
+ { "Pacific/Pitcairn" , 0x038335 },
+ { "Pacific/Ponape" , 0x03837E },
+ { "Pacific/Port_Moresby" , 0x0383B7 },
+ { "Pacific/Rarotonga" , 0x0383EF },
+ { "Pacific/Saipan" , 0x0384BF },
+ { "Pacific/Samoa" , 0x038516 },
+ { "Pacific/Tahiti" , 0x038593 },
+ { "Pacific/Tarawa" , 0x0385DD },
+ { "Pacific/Tongatapu" , 0x038616 },
+ { "Pacific/Truk" , 0x038696 },
+ { "Pacific/Wake" , 0x0386CF },
+ { "Pacific/Wallis" , 0x038708 },
+ { "Pacific/Yap" , 0x038740 },
+ { "Poland" , 0x038779 },
+ { "Portugal" , 0x038B4E },
+ { "PRC" , 0x03903E },
+ { "PST8PDT" , 0x0390E3 },
+ { "ROC" , 0x039428 },
+ { "ROK" , 0x039534 },
+ { "Singapore" , 0x0395CC },
+ { "Turkey" , 0x039677 },
+ { "UCT" , 0x039A58 },
+ { "Universal" , 0x039A90 },
+ { "US/Alaska" , 0x039AC8 },
+ { "US/Aleutian" , 0x039E25 },
+ { "US/Arizona" , 0x03A17F },
+ { "US/Central" , 0x03A201 },
+ { "US/East-Indiana" , 0x03ABF3 },
+ { "US/Eastern" , 0x03A700 },
+ { "US/Hawaii" , 0x03AE51 },
+ { "US/Indiana-Starke" , 0x03AED3 },
+ { "US/Michigan" , 0x03B238 },
+ { "US/Mountain" , 0x03B563 },
+ { "US/Pacific" , 0x03B8D0 },
+ { "US/Pacific-New" , 0x03BCC9 },
+ { "US/Samoa" , 0x03C0C2 },
+ { "UTC" , 0x03C13F },
+ { "W-SU" , 0x03C41E },
+ { "WET" , 0x03C177 },
+ { "Zulu" , 0x03C74D },
};
/* This is a generated file, do not modify */
-const unsigned char timelib_timezone_db_data_builtin[242022] = {
+const unsigned char timelib_timezone_db_data_builtin[247685] = {
/* Africa/Abidjan */
@@ -1320,7 +1325,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
/* America/Argentina/Buenos_Aires */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x38, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1334,19 +1339,38 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0, 0x08, 0x24, 0x6F, 0xA0, 0x23, 0x94, 0xB5, 0xB0,
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xF1, 0x30, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
-0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x01, 0x02, 0x01, 0x02,
+0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x47, 0x77, 0x09, 0xB0,
+0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0,
+0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0,
+0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30,
+0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30,
+0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30,
+0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0,
+0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0,
+0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0,
+0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30,
+0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30,
+0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0,
+0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0,
+0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0,
+0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30,
+0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30,
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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x04, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Argentina/Catamarca */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1361,20 +1385,39 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xFF, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xBB, 0xF1, 0x30,
-0x40, 0xD5, 0x0B, 0xC0, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x40, 0xD5, 0x0B, 0xC0, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0,
+0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0,
+0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30,
+0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30,
+0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30,
+0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0,
+0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0,
+0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0,
+0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30,
+0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30,
+0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30,
+0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0,
+0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0,
+0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0,
+0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30,
+0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57,
-0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04,
+0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0xFF,
+0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
+0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00,
/* America/Argentina/ComodRivadavia */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1389,20 +1432,39 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xFF, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xBB, 0xF1, 0x30,
-0x40, 0xD5, 0x0B, 0xC0, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x40, 0xD5, 0x0B, 0xC0, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0,
+0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0,
+0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30,
+0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30,
+0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30,
+0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0,
+0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0,
+0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0,
+0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30,
+0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30,
+0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30,
+0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0,
+0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0,
+0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0,
+0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30,
+0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57,
-0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04,
+0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0xFF,
+0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
+0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00,
/* America/Argentina/Cordoba */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1416,20 +1478,39 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0, 0x08, 0x24, 0x6F, 0xA0, 0x23, 0x94, 0xB5, 0xB0,
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xFF, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
-0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x01, 0x02, 0x01, 0x02,
+0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x47, 0x77, 0x09, 0xB0,
+0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0,
+0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0,
+0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30,
+0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30,
+0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30,
+0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0,
+0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0,
+0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0,
+0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30,
+0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30,
+0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0,
+0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0,
+0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0,
+0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30,
+0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30,
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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04,
-0x03, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
-0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54,
+0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Argentina/Jujuy */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1443,21 +1524,40 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0, 0x08, 0x24, 0x6F, 0xA0, 0x23, 0x94, 0xB5, 0xB0,
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x2A, 0x57, 0xC0,
0x27, 0xE2, 0xDB, 0xB0, 0x28, 0xEE, 0x8A, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
-0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x01, 0x02, 0x01, 0x02,
+0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x47, 0x77, 0x09, 0xB0,
+0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0,
+0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0,
+0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30,
+0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30,
+0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30,
+0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0,
+0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0,
+0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0,
+0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30,
+0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30,
+0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0,
+0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0,
+0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0,
+0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30,
+0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30,
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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x03, 0x04,
-0x03, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, 0x4D,
-0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
-0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05,
+0x06, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43,
+0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54,
+0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Argentina/La_Rioja */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1472,20 +1572,39 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xCD, 0xB5, 0xA0, 0x28, 0x26, 0x26, 0x40, 0x29, 0x00, 0xF1, 0x30, 0x29, 0xB0, 0x3A, 0xA0,
0x2A, 0xE0, 0xD3, 0x30, 0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0,
-0x40, 0xBB, 0xF1, 0x30, 0x40, 0xD5, 0x0B, 0xC0, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x40, 0xBB, 0xF1, 0x30, 0x40, 0xD5, 0x0B, 0xC0, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20,
+0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0,
+0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0,
+0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0,
+0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20,
+0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20,
+0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20,
+0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0,
+0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0,
+0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0,
+0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20,
+0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20,
+0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0,
+0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0,
+0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0,
+0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02,
-0x04, 0x05, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41,
-0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
+0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
+0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Argentina/Mendoza */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x3A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1500,20 +1619,39 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x19, 0x34, 0x40,
0x27, 0xCD, 0xC3, 0xB0, 0x28, 0xFA, 0x67, 0xC0, 0x29, 0xB0, 0x48, 0xB0, 0x2A, 0xE0, 0xE1, 0x40,
0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xB0, 0x13, 0xB0,
-0x41, 0x56, 0x3E, 0xC0, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x41, 0x56, 0x3E, 0xC0, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0,
+0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0,
+0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30,
+0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30,
+0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30,
+0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0,
+0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0,
+0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0,
+0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30,
+0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30,
+0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30,
+0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0,
+0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0,
+0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0,
+0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30,
+0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
-0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x03, 0x04, 0x02, 0x04,
+0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0xFF,
+0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54,
+0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Argentina/Rio_Gallegos */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1528,20 +1666,39 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xF1, 0x30, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xBB, 0xF1, 0x30,
-0x40, 0xD5, 0x0B, 0xC0, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x40, 0xD5, 0x0B, 0xC0, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0,
+0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0,
+0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30,
+0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30,
+0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30,
+0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0,
+0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0,
+0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0,
+0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30,
+0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30,
+0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30,
+0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0,
+0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0,
+0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0,
+0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30,
+0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57,
-0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04,
+0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0xFF,
+0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
+0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00,
/* America/Argentina/San_Juan */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1556,20 +1713,67 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xCD, 0xB5, 0xA0, 0x28, 0x26, 0x26, 0x40, 0x29, 0x00, 0xF1, 0x30, 0x29, 0xB0, 0x3A, 0xA0,
0x2A, 0xE0, 0xD3, 0x30, 0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0,
-0x40, 0xBA, 0x9F, 0xB0, 0x41, 0x03, 0x30, 0x40, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x40, 0xBA, 0x9F, 0xB0, 0x41, 0x03, 0x30, 0x40, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20,
+0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0,
+0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0,
+0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0,
+0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20,
+0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20,
+0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20,
+0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0,
+0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0,
+0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0,
+0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20,
+0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20,
+0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0,
+0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0,
+0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0,
+0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02,
-0x04, 0x05, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41,
-0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
+0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
+0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+/* America/Argentina/San_Luis */
+0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
+0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
+0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
+0xC1, 0x9D, 0x9D, 0x40, 0xC2, 0x3B, 0xC3, 0x30, 0xC3, 0x7E, 0xD0, 0xC0, 0xC4, 0x1C, 0xF6, 0xB0,
+0xC5, 0x60, 0x04, 0x40, 0xC5, 0xFE, 0x2A, 0x30, 0xC7, 0x41, 0x37, 0xC0, 0xC7, 0xE0, 0xAF, 0x30,
+0xC8, 0x81, 0x94, 0x40, 0xCA, 0x4D, 0xA1, 0xB0, 0xCA, 0xEE, 0x86, 0xC0, 0xCE, 0x4D, 0xFF, 0x30,
+0xCE, 0xB0, 0xED, 0xC0, 0xD3, 0x29, 0x35, 0xB0, 0xD4, 0x43, 0x64, 0xC0, 0xF4, 0x3D, 0x08, 0x30,
+0xF4, 0x9F, 0xF6, 0xC0, 0xF5, 0x05, 0x6C, 0x30, 0xF6, 0x32, 0x10, 0x40, 0xF6, 0xE6, 0x9F, 0xB0,
+0xF8, 0x13, 0x43, 0xC0, 0xF8, 0xC7, 0xD3, 0x30, 0xF9, 0xF4, 0x77, 0x40, 0xFA, 0xD3, 0x36, 0xB0,
+0xFB, 0xC3, 0x35, 0xC0, 0xFC, 0xBC, 0x53, 0x30, 0xFD, 0xAC, 0x52, 0x40, 0xFE, 0x9C, 0x35, 0x30,
+0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0, 0x08, 0x24, 0x6F, 0xA0, 0x23, 0x94, 0xB5, 0xB0,
+0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
+0x27, 0xCD, 0xB5, 0xA0, 0x28, 0x26, 0x26, 0x40, 0x29, 0x00, 0xF1, 0x30, 0x29, 0xB0, 0x3A, 0xA0,
+0x2A, 0xE0, 0xD3, 0x30, 0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0,
+0x40, 0xBA, 0x9F, 0xB0, 0x41, 0x03, 0x30, 0x40, 0x47, 0x77, 0x09, 0xB0, 0x47, 0x93, 0xFC, 0xA0,
+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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0x03, 0x04, 0xFF, 0xFF, 0xC3,
+0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF,
+0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
+0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Argentina/Tucuman */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1584,20 +1788,39 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xFF, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xBB, 0xF1, 0x30,
-0x40, 0xCB, 0xD1, 0x40, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x40, 0xCB, 0xD1, 0x40, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0,
+0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0,
+0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30,
+0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30,
+0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30,
+0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0,
+0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0,
+0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0,
+0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30,
+0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30,
+0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30,
+0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0,
+0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0,
+0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0,
+0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30,
+0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57,
-0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04,
+0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0xFF,
+0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
+0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00,
/* America/Argentina/Ushuaia */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1612,15 +1835,34 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xF1, 0x30, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xB9, 0x4E, 0x30,
-0x40, 0xD5, 0x0B, 0xC0, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x40, 0xD5, 0x0B, 0xC0, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0,
+0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0,
+0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30,
+0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30,
+0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30,
+0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0,
+0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0,
+0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0,
+0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30,
+0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30,
+0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30,
+0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0,
+0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0,
+0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0,
+0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30,
+0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57,
-0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04,
+0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0xFF,
+0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
+0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00,
/* America/Aruba */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1922,7 +2164,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
/* America/Buenos_Aires */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x38, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -1936,14 +2178,33 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0, 0x08, 0x24, 0x6F, 0xA0, 0x23, 0x94, 0xB5, 0xB0,
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xF1, 0x30, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
-0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x01, 0x02, 0x01, 0x02,
+0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x47, 0x77, 0x09, 0xB0,
+0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0,
+0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0,
+0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30,
+0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30,
+0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30,
+0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0,
+0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0,
+0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0,
+0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30,
+0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30,
+0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0,
+0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0,
+0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0,
+0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30,
+0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30,
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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x04, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Cambridge_Bay */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2084,14 +2345,14 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x08, 0x93, 0x1E, 0x2C, 0x3C,
-0xF6, 0x98, 0xEC, 0x48, 0x47, 0x79, 0xBA, 0xC0, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xC1, 0x44, 0x00,
+0xF6, 0x98, 0xEC, 0x48, 0x47, 0x5B, 0x92, 0x70, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xC1, 0x44, 0x00,
0x00, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x43, 0x4D, 0x54,
0x00, 0x56, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Catamarca */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -2106,15 +2367,34 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xFF, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xBB, 0xF1, 0x30,
-0x40, 0xD5, 0x0B, 0xC0, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x40, 0xD5, 0x0B, 0xC0, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0,
+0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0,
+0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30,
+0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30,
+0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30,
+0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0,
+0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0,
+0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0,
+0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30,
+0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30,
+0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30,
+0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0,
+0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0,
+0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0,
+0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30,
+0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57,
-0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04,
+0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0xFF,
+0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
+0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00,
/* America/Cayenne */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2264,7 +2544,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
/* America/Cordoba */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -2278,15 +2558,34 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0, 0x08, 0x24, 0x6F, 0xA0, 0x23, 0x94, 0xB5, 0xB0,
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xFF, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
-0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x01, 0x02, 0x01, 0x02,
+0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x47, 0x77, 0x09, 0xB0,
+0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0,
+0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0,
+0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30,
+0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30,
+0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30,
+0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0,
+0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0,
+0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0,
+0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30,
+0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30,
+0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0,
+0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0,
+0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0,
+0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30,
+0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30,
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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04,
-0x03, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
-0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54,
+0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Costa_Rica */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3132,22 +3431,22 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x36, 0xFD, 0xB7, 0x50, 0x38, 0x1B, 0xCC, 0xD0, 0x38, 0xE6, 0xD3, 0xD0, 0x39, 0xFB, 0xAE, 0xD0,
0x3A, 0xC6, 0xB5, 0xD0, 0x3B, 0xDB, 0x90, 0xD0, 0x3C, 0xAF, 0xD2, 0x50, 0x3D, 0xBB, 0x72, 0xD0,
0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x45, 0x44, 0x35, 0x50,
-0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x24, 0x17, 0x50, 0x47, 0xD3, 0x6E, 0xD0, 0x49, 0x03, 0xF9, 0x50,
-0x49, 0xB3, 0x50, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0x9C, 0x6D, 0x50, 0x4C, 0xCC, 0xF7, 0xD0,
-0x4D, 0x7C, 0x4F, 0x50, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x5C, 0x31, 0x50, 0x50, 0x8C, 0xBB, 0xD0,
-0x51, 0x3C, 0x13, 0x50, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x1B, 0xF5, 0x50, 0x54, 0x4C, 0x7F, 0xD0,
-0x54, 0xFB, 0xD7, 0x50, 0x56, 0x2C, 0x61, 0xD0, 0x56, 0xE4, 0xF3, 0xD0, 0x58, 0x15, 0x7E, 0x50,
-0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xA4, 0xB7, 0xD0, 0x5B, 0xD5, 0x42, 0x50,
-0x5C, 0x84, 0x99, 0xD0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x64, 0x7B, 0xD0, 0x5F, 0x95, 0x06, 0x50,
-0x60, 0x4D, 0x98, 0x50, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x2D, 0x7A, 0x50, 0x63, 0x5E, 0x04, 0xD0,
-0x64, 0x0D, 0x5C, 0x50, 0x65, 0x3D, 0xE6, 0xD0, 0x65, 0xED, 0x3E, 0x50, 0x67, 0x1D, 0xC8, 0xD0,
-0x67, 0xCD, 0x20, 0x50, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xAD, 0x02, 0x50, 0x6A, 0xDD, 0x8C, 0xD0,
-0x6B, 0x96, 0x1E, 0xD0, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x76, 0x00, 0xD0, 0x6E, 0xA6, 0x8B, 0x50,
-0x6F, 0x55, 0xE2, 0xD0, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x35, 0xC4, 0xD0, 0x72, 0x66, 0x4F, 0x50,
-0x73, 0x15, 0xA6, 0xD0, 0x74, 0x46, 0x31, 0x50, 0x74, 0xFE, 0xC3, 0x50, 0x76, 0x2F, 0x4D, 0xD0,
-0x76, 0xDE, 0xA5, 0x50, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xBE, 0x87, 0x50, 0x79, 0xEF, 0x11, 0xD0,
-0x7A, 0x9E, 0x69, 0x50, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0x7E, 0x4B, 0x50, 0x7D, 0xAE, 0xD5, 0xD0,
-0x7E, 0x5E, 0x2D, 0x50, 0x7F, 0x8E, 0xB7, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x24, 0x17, 0x50, 0x47, 0xDC, 0xA9, 0x50, 0x49, 0x03, 0xF9, 0x50,
+0x49, 0xBC, 0x8B, 0x50, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0xA5, 0xA7, 0xD0, 0x4C, 0xCC, 0xF7, 0xD0,
+0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x65, 0x6B, 0xD0, 0x50, 0x8C, 0xBB, 0xD0,
+0x51, 0x45, 0x4D, 0xD0, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x25, 0x2F, 0xD0, 0x54, 0x4C, 0x7F, 0xD0,
+0x55, 0x05, 0x11, 0xD0, 0x56, 0x2C, 0x61, 0xD0, 0x56, 0xEE, 0x2E, 0x50, 0x58, 0x15, 0x7E, 0x50,
+0x58, 0xCE, 0x10, 0x50, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xAD, 0xF2, 0x50, 0x5B, 0xD5, 0x42, 0x50,
+0x5C, 0x8D, 0xD4, 0x50, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x6D, 0xB6, 0x50, 0x5F, 0x95, 0x06, 0x50,
+0x60, 0x56, 0xD2, 0xD0, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x36, 0xB4, 0xD0, 0x63, 0x5E, 0x04, 0xD0,
+0x64, 0x16, 0x96, 0xD0, 0x65, 0x3D, 0xE6, 0xD0, 0x65, 0xF6, 0x78, 0xD0, 0x67, 0x1D, 0xC8, 0xD0,
+0x67, 0xD6, 0x5A, 0xD0, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xB6, 0x3C, 0xD0, 0x6A, 0xDD, 0x8C, 0xD0,
+0x6B, 0x9F, 0x59, 0x50, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x7F, 0x3B, 0x50, 0x6E, 0xA6, 0x8B, 0x50,
+0x6F, 0x5F, 0x1D, 0x50, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x3E, 0xFF, 0x50, 0x72, 0x66, 0x4F, 0x50,
+0x73, 0x1E, 0xE1, 0x50, 0x74, 0x46, 0x31, 0x50, 0x75, 0x07, 0xFD, 0xD0, 0x76, 0x2F, 0x4D, 0xD0,
+0x76, 0xE7, 0xDF, 0xD0, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xC7, 0xC1, 0xD0, 0x79, 0xEF, 0x11, 0xD0,
+0x7A, 0xA7, 0xA3, 0xD0, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0x87, 0x85, 0xD0, 0x7D, 0xAE, 0xD5, 0xD0,
+0x7E, 0x67, 0x67, 0xD0, 0x7F, 0x8E, 0xB7, 0xD0, 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,
@@ -3674,7 +3973,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
/* America/Jujuy */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -3688,16 +3987,35 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0, 0x08, 0x24, 0x6F, 0xA0, 0x23, 0x94, 0xB5, 0xB0,
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x2A, 0x57, 0xC0,
0x27, 0xE2, 0xDB, 0xB0, 0x28, 0xEE, 0x8A, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
-0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x01, 0x02, 0x01, 0x02,
+0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x47, 0x77, 0x09, 0xB0,
+0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0,
+0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0,
+0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30,
+0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30,
+0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30,
+0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0,
+0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0,
+0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0,
+0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30,
+0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30,
+0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0,
+0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0,
+0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0,
+0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30,
+0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30,
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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x03, 0x04,
-0x03, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, 0x4D,
-0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
-0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05,
+0x06, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43,
+0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54,
+0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Juneau */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4134,6 +4452,13 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53,
0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* America/Marigot */
+0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0xD5, 0xE1, 0xB0,
+0x01, 0xFF, 0xFF, 0xC6, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+
/* America/Martinique */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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,
@@ -4184,7 +4509,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
/* America/Mendoza */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x3A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -4199,15 +4524,34 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x19, 0x34, 0x40,
0x27, 0xCD, 0xC3, 0xB0, 0x28, 0xFA, 0x67, 0xC0, 0x29, 0xB0, 0x48, 0xB0, 0x2A, 0xE0, 0xE1, 0x40,
0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xB0, 0x13, 0xB0,
-0x41, 0x56, 0x3E, 0xC0, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x41, 0x56, 0x3E, 0xC0, 0x47, 0x77, 0x09, 0xB0, 0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0,
+0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0, 0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0,
+0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0, 0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30,
+0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30, 0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30,
+0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30, 0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30,
+0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30, 0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0,
+0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0, 0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0,
+0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0, 0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0,
+0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0, 0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30,
+0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30, 0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30,
+0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30, 0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30,
+0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0, 0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0,
+0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0, 0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0,
+0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0, 0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0,
+0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30, 0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30,
+0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30, 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, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x03, 0x04, 0x02, 0x04, 0x05, 0x04, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
-0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x03, 0x04, 0x02, 0x04,
+0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0xFF,
+0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54,
+0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Menominee */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5337,7 +5681,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
/* America/Rosario */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xA2, 0x92, 0x8F, 0x30,
0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30,
0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30,
0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0,
@@ -5351,15 +5695,34 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0, 0x08, 0x24, 0x6F, 0xA0, 0x23, 0x94, 0xB5, 0xB0,
0x24, 0x10, 0x94, 0xA0, 0x25, 0x37, 0xF2, 0xB0, 0x25, 0xF0, 0x76, 0xA0, 0x27, 0x21, 0x0F, 0x30,
0x27, 0xD0, 0x58, 0xA0, 0x29, 0x00, 0xFF, 0x40, 0x29, 0xB0, 0x3A, 0xA0, 0x2A, 0xE0, 0xD3, 0x30,
-0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x01, 0x02, 0x01, 0x02,
+0x2B, 0x99, 0x57, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x47, 0x77, 0x09, 0xB0,
+0x47, 0xDC, 0x7F, 0x20, 0x48, 0xE8, 0x2D, 0xB0, 0x49, 0xBC, 0x61, 0x20, 0x4A, 0xC8, 0x0F, 0xB0,
+0x4B, 0xA5, 0x7D, 0xA0, 0x4C, 0xA7, 0xF1, 0xB0, 0x4D, 0x85, 0x5F, 0xA0, 0x4E, 0x87, 0xD3, 0xB0,
+0x4F, 0x65, 0x41, 0xA0, 0x50, 0x70, 0xF0, 0x30, 0x51, 0x45, 0x23, 0xA0, 0x52, 0x50, 0xD2, 0x30,
+0x53, 0x25, 0x05, 0xA0, 0x54, 0x30, 0xB4, 0x30, 0x55, 0x04, 0xE7, 0xA0, 0x56, 0x10, 0x96, 0x30,
+0x56, 0xEE, 0x04, 0x20, 0x57, 0xF0, 0x78, 0x30, 0x58, 0xCD, 0xE6, 0x20, 0x59, 0xD0, 0x5A, 0x30,
+0x5A, 0xAD, 0xC8, 0x20, 0x5B, 0xB9, 0x76, 0xB0, 0x5C, 0x8D, 0xAA, 0x20, 0x5D, 0x99, 0x58, 0xB0,
+0x5E, 0x6D, 0x8C, 0x20, 0x5F, 0x79, 0x3A, 0xB0, 0x60, 0x56, 0xA8, 0xA0, 0x61, 0x59, 0x1C, 0xB0,
+0x62, 0x36, 0x8A, 0xA0, 0x63, 0x38, 0xFE, 0xB0, 0x64, 0x16, 0x6C, 0xA0, 0x65, 0x18, 0xE0, 0xB0,
+0x65, 0xF6, 0x4E, 0xA0, 0x67, 0x01, 0xFD, 0x30, 0x67, 0xD6, 0x30, 0xA0, 0x68, 0xE1, 0xDF, 0x30,
+0x69, 0xB6, 0x12, 0xA0, 0x6A, 0xC1, 0xC1, 0x30, 0x6B, 0x9F, 0x2F, 0x20, 0x6C, 0xA1, 0xA3, 0x30,
+0x6D, 0x7F, 0x11, 0x20, 0x6E, 0x81, 0x85, 0x30, 0x6F, 0x5E, 0xF3, 0x20, 0x70, 0x6A, 0xA1, 0xB0,
+0x71, 0x3E, 0xD5, 0x20, 0x72, 0x4A, 0x83, 0xB0, 0x73, 0x1E, 0xB7, 0x20, 0x74, 0x2A, 0x65, 0xB0,
+0x75, 0x07, 0xD3, 0xA0, 0x76, 0x0A, 0x47, 0xB0, 0x76, 0xE7, 0xB5, 0xA0, 0x77, 0xEA, 0x29, 0xB0,
+0x78, 0xC7, 0x97, 0xA0, 0x79, 0xCA, 0x0B, 0xB0, 0x7A, 0xA7, 0x79, 0xA0, 0x7B, 0xB3, 0x28, 0x30,
+0x7C, 0x87, 0x5B, 0xA0, 0x7D, 0x93, 0x0A, 0x30, 0x7E, 0x67, 0x3D, 0xA0, 0x7F, 0x72, 0xEC, 0x30,
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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04,
-0x03, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
-0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54,
+0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* America/Santiago */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5389,7 +5752,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 0x6A, 0xAE, 0x30,
0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 0x33, 0xAC, 0xB0,
0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 0xF3, 0x70, 0xB0,
-0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30,
+0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30,
0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30,
0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 0x3B, 0xF7, 0x30,
0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 0x04, 0xF5, 0xB0,
@@ -5586,6 +5949,13 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54,
0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+/* America/St_Barthelemy */
+0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0xD5, 0xE1, 0xB0,
+0x01, 0xFF, 0xFF, 0xC6, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+
/* America/St_Johns */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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,
@@ -6729,7 +7099,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
/* Asia/Baghdad */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x71, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0x9E, 0x30, 0x3C, 0xE0,
+0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0x9E, 0x30, 0x3C, 0xE0,
0x17, 0x30, 0x68, 0x50, 0x17, 0xFA, 0x0F, 0xC0, 0x18, 0xE8, 0xBD, 0x50, 0x19, 0xDB, 0x43, 0x40,
0x1A, 0xCC, 0x93, 0xD0, 0x1B, 0xBD, 0xC8, 0x40, 0x1C, 0xAD, 0xC7, 0x50, 0x1D, 0x9C, 0x74, 0xE0,
0x1E, 0x8C, 0x65, 0xE0, 0x1F, 0x7C, 0x56, 0xE0, 0x20, 0x6C, 0x47, 0xE0, 0x21, 0x5C, 0x38, 0xE0,
@@ -6743,32 +7113,13 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x3C, 0xA7, 0xA3, 0x00, 0x3D, 0x98, 0xE5, 0x80, 0x3E, 0x88, 0xD6, 0x80, 0x3F, 0x7A, 0x19, 0x00,
0x40, 0x6B, 0x5B, 0x80, 0x41, 0x5C, 0x9E, 0x00, 0x42, 0x4C, 0x8F, 0x00, 0x43, 0x3D, 0xD1, 0x80,
0x44, 0x2D, 0xC2, 0x80, 0x45, 0x1F, 0x05, 0x00, 0x46, 0x0E, 0xF6, 0x00, 0x47, 0x00, 0x38, 0x80,
-0x47, 0xF1, 0x7B, 0x00, 0x48, 0xE2, 0xBD, 0x80, 0x49, 0xD2, 0xAE, 0x80, 0x4A, 0xC3, 0xF1, 0x00,
-0x4B, 0xB3, 0xE2, 0x00, 0x4C, 0xA5, 0x24, 0x80, 0x4D, 0x95, 0x15, 0x80, 0x4E, 0x86, 0x58, 0x00,
-0x4F, 0x77, 0x9A, 0x80, 0x50, 0x68, 0xDD, 0x00, 0x51, 0x58, 0xCE, 0x00, 0x52, 0x4A, 0x10, 0x80,
-0x53, 0x3A, 0x01, 0x80, 0x54, 0x2B, 0x44, 0x00, 0x55, 0x1B, 0x35, 0x00, 0x56, 0x0C, 0x77, 0x80,
-0x56, 0xFD, 0xBA, 0x00, 0x57, 0xEE, 0xFC, 0x80, 0x58, 0xDE, 0xED, 0x80, 0x59, 0xD0, 0x30, 0x00,
-0x5A, 0xC0, 0x21, 0x00, 0x5B, 0xB1, 0x63, 0x80, 0x5C, 0xA1, 0x54, 0x80, 0x5D, 0x92, 0x97, 0x00,
-0x5E, 0x83, 0xD9, 0x80, 0x5F, 0x75, 0x1C, 0x00, 0x60, 0x65, 0x0D, 0x00, 0x61, 0x56, 0x4F, 0x80,
-0x62, 0x46, 0x40, 0x80, 0x63, 0x37, 0x83, 0x00, 0x64, 0x27, 0x74, 0x00, 0x65, 0x18, 0xB6, 0x80,
-0x66, 0x09, 0xF9, 0x00, 0x66, 0xFB, 0x3B, 0x80, 0x67, 0xEB, 0x2C, 0x80, 0x68, 0xDC, 0x6F, 0x00,
-0x69, 0xCC, 0x60, 0x00, 0x6A, 0xBD, 0xA2, 0x80, 0x6B, 0xAD, 0x93, 0x80, 0x6C, 0x9E, 0xD6, 0x00,
-0x6D, 0x90, 0x18, 0x80, 0x6E, 0x81, 0x5B, 0x00, 0x6F, 0x71, 0x4C, 0x00, 0x70, 0x62, 0x8E, 0x80,
-0x71, 0x52, 0x7F, 0x80, 0x72, 0x43, 0xC2, 0x00, 0x73, 0x33, 0xB3, 0x00, 0x74, 0x24, 0xF5, 0x80,
-0x75, 0x16, 0x38, 0x00, 0x76, 0x07, 0x7A, 0x80, 0x76, 0xF7, 0x6B, 0x80, 0x77, 0xE8, 0xAE, 0x00,
-0x78, 0xD8, 0x9F, 0x00, 0x79, 0xC9, 0xE1, 0x80, 0x7A, 0xB9, 0xD2, 0x80, 0x7B, 0xAB, 0x15, 0x00,
-0x7C, 0x9C, 0x57, 0x80, 0x7D, 0x8D, 0x9A, 0x00, 0x7E, 0x7D, 0x8B, 0x00, 0x7F, 0x6E, 0xCD, 0x80,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x00, 0x00, 0x29, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38,
-0x40, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x42,
-0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x29, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x04, 0x00, 0x00, 0x38, 0x40, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38,
+0x40, 0x01, 0x08, 0x42, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
/* Asia/Bahrain */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7028,22 +7379,22 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x3A, 0xC6, 0x53, 0x60, 0x3B, 0xB7, 0x87, 0xD0, 0x3C, 0xA7, 0x86, 0xE0, 0x3D, 0x98, 0xBB, 0x50,
0x3E, 0x88, 0xBA, 0x60, 0x3F, 0x79, 0xEE, 0xD0, 0x40, 0x6B, 0x3F, 0x60, 0x41, 0x5C, 0x73, 0xD0,
0x42, 0x4C, 0x72, 0xE0, 0x43, 0x3D, 0xA7, 0x50, 0x44, 0x2D, 0xA6, 0x60, 0x45, 0x12, 0xFD, 0x50,
-0x46, 0x0C, 0x36, 0xE0, 0x47, 0x2A, 0x3E, 0x50, 0x47, 0xEC, 0x18, 0xE0, 0x49, 0x13, 0x5A, 0xD0,
-0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xF3, 0x3C, 0xD0, 0x4B, 0xAB, 0xDC, 0xE0, 0x4C, 0xD3, 0x1E, 0xD0,
-0x4D, 0x8B, 0xBE, 0xE0, 0x4E, 0xB3, 0x00, 0xD0, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x92, 0xE2, 0xD0,
-0x51, 0x54, 0xBD, 0x60, 0x52, 0x72, 0xC4, 0xD0, 0x53, 0x34, 0x9F, 0x60, 0x54, 0x5B, 0xE1, 0x50,
-0x55, 0x14, 0x81, 0x60, 0x56, 0x3B, 0xC3, 0x50, 0x56, 0xF4, 0x63, 0x60, 0x58, 0x1B, 0xA5, 0x50,
-0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xFB, 0x87, 0x50, 0x5A, 0xBD, 0x61, 0xE0, 0x5B, 0xDB, 0x69, 0x50,
-0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xBB, 0x4B, 0x50, 0x5E, 0x7D, 0x25, 0xE0, 0x5F, 0xA4, 0x67, 0xD0,
-0x60, 0x5D, 0x07, 0xE0, 0x61, 0x84, 0x49, 0xD0, 0x62, 0x3C, 0xE9, 0xE0, 0x63, 0x64, 0x2B, 0xD0,
-0x64, 0x26, 0x06, 0x60, 0x65, 0x44, 0x0D, 0xD0, 0x66, 0x05, 0xE8, 0x60, 0x67, 0x23, 0xEF, 0xD0,
-0x67, 0xE5, 0xCA, 0x60, 0x69, 0x0D, 0x0C, 0x50, 0x69, 0xC5, 0xAC, 0x60, 0x6A, 0xEC, 0xEE, 0x50,
-0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0xCC, 0xD0, 0x50, 0x6D, 0x8E, 0xAA, 0xE0, 0x6E, 0xAC, 0xB2, 0x50,
-0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x8C, 0x94, 0x50, 0x71, 0x4E, 0x6E, 0xE0, 0x72, 0x6C, 0x76, 0x50,
-0x73, 0x2E, 0x50, 0xE0, 0x74, 0x55, 0x92, 0xD0, 0x75, 0x0E, 0x32, 0xE0, 0x76, 0x35, 0x74, 0xD0,
-0x76, 0xEE, 0x14, 0xE0, 0x78, 0x15, 0x56, 0xD0, 0x78, 0xD7, 0x31, 0x60, 0x79, 0xF5, 0x38, 0xD0,
-0x7A, 0xB7, 0x13, 0x60, 0x7B, 0xD5, 0x1A, 0xD0, 0x7C, 0x96, 0xF5, 0x60, 0x7D, 0xBE, 0x37, 0x50,
-0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x9E, 0x19, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x46, 0x0C, 0x36, 0xE0, 0x47, 0x2A, 0x3E, 0x50, 0x47, 0xF5, 0x53, 0x60, 0x48, 0xE2, 0x93, 0x50,
+0x49, 0xD5, 0x35, 0x60, 0x4A, 0xC3, 0xC6, 0xD0, 0x4B, 0xB5, 0x17, 0x60, 0x4C, 0xA4, 0xFA, 0x50,
+0x4D, 0x94, 0xF9, 0x60, 0x4E, 0x86, 0x2D, 0xD0, 0x4F, 0x7E, 0x15, 0xE0, 0x50, 0x68, 0xB2, 0xD0,
+0x51, 0x5D, 0xF7, 0xE0, 0x52, 0x49, 0xE6, 0x50, 0x53, 0x3D, 0xD9, 0xE0, 0x54, 0x2B, 0x19, 0xD0,
+0x55, 0x1D, 0xBB, 0xE0, 0x56, 0x0C, 0x4D, 0x50, 0x56, 0xFD, 0x9D, 0xE0, 0x57, 0xEE, 0xD2, 0x50,
+0x58, 0xE6, 0xBA, 0x60, 0x59, 0xD0, 0x05, 0xD0, 0x5A, 0xC6, 0x9C, 0x60, 0x5B, 0xB1, 0x39, 0x50,
+0x5C, 0xA6, 0x7E, 0x60, 0x5D, 0x92, 0x6C, 0xD0, 0x5E, 0x86, 0x60, 0x60, 0x5F, 0x74, 0xF1, 0xD0,
+0x60, 0x66, 0x42, 0x60, 0x61, 0x56, 0x25, 0x50, 0x62, 0x46, 0x24, 0x60, 0x63, 0x37, 0x58, 0xD0,
+0x64, 0x2F, 0x40, 0xE0, 0x65, 0x18, 0x8C, 0x50, 0x66, 0x0F, 0x22, 0xE0, 0x66, 0xFB, 0x11, 0x50,
+0x67, 0xEF, 0x04, 0xE0, 0x68, 0xDC, 0x44, 0xD0, 0x69, 0xCE, 0xE6, 0xE0, 0x6A, 0xBD, 0x78, 0x50,
+0x6B, 0xAE, 0xC8, 0xE0, 0x6C, 0x9E, 0xAB, 0xD0, 0x6D, 0x97, 0xE5, 0x60, 0x6E, 0x81, 0x30, 0xD0,
+0x6F, 0x77, 0xC7, 0x60, 0x70, 0x62, 0x64, 0x50, 0x71, 0x57, 0xA9, 0x60, 0x72, 0x43, 0x97, 0xD0,
+0x73, 0x37, 0x8B, 0x60, 0x74, 0x24, 0xCB, 0x50, 0x75, 0x17, 0x6D, 0x60, 0x76, 0x07, 0x50, 0x50,
+0x76, 0xF7, 0x4F, 0x60, 0x77, 0xE8, 0x83, 0xD0, 0x78, 0xE0, 0x6B, 0xE0, 0x79, 0xC9, 0xB7, 0x50,
+0x7A, 0xC0, 0x4D, 0xE0, 0x7B, 0xAA, 0xEA, 0xD0, 0x7C, 0xA0, 0x2F, 0xE0, 0x7D, 0x8D, 0x6F, 0xD0,
+0x7E, 0x80, 0x11, 0xE0, 0x7F, 0x6E, 0xA3, 0x50, 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,
@@ -7171,6 +7522,15 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x4D, 0x54, 0x00, 0x43, 0x48, 0x41, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* Asia/Ho_Chi_Minh */
+0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x0C, 0x88, 0x6F, 0x42, 0x80,
+0x91, 0x5F, 0xEE, 0xD0, 0x93, 0x85, 0xB1, 0x90, 0xB7, 0x41, 0xBC, 0x00, 0x01, 0x02, 0x03, 0x02,
+0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0xEC, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70,
+0x00, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00,
+0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
/* Asia/Hong_Kong */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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,
@@ -7496,6 +7856,15 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x00, 0x04, 0x00, 0x00, 0x50, 0xDC, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* Asia/Kolkata */
+0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x0D, 0xCA, 0xDB, 0x86, 0xB0,
+0xCC, 0x05, 0x71, 0x18, 0xCC, 0x95, 0x32, 0xA8, 0xD2, 0x74, 0x12, 0x98, 0x01, 0x02, 0x03, 0x02,
+0x00, 0x00, 0x52, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x04, 0x00, 0x00, 0x4D, 0x58,
+0x00, 0x09, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x09, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54,
+0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
/* Asia/Krasnoyarsk */
0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
@@ -10602,7 +10971,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 0x6A, 0xAE, 0x30,
0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 0x33, 0xAC, 0xB0,
0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 0xF3, 0x70, 0xB0,
-0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30,
+0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30,
0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30,
0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 0x3B, 0xF7, 0x30,
0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 0x04, 0xF5, 0xB0,
@@ -10657,7 +11026,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0,
0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0,
0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40,
-0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40,
+0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40,
0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40,
0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0,
0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0,
@@ -10769,22 +11138,22 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x36, 0xFD, 0xB7, 0x50, 0x38, 0x1B, 0xCC, 0xD0, 0x38, 0xE6, 0xD3, 0xD0, 0x39, 0xFB, 0xAE, 0xD0,
0x3A, 0xC6, 0xB5, 0xD0, 0x3B, 0xDB, 0x90, 0xD0, 0x3C, 0xAF, 0xD2, 0x50, 0x3D, 0xBB, 0x72, 0xD0,
0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x45, 0x44, 0x35, 0x50,
-0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x24, 0x17, 0x50, 0x47, 0xD3, 0x6E, 0xD0, 0x49, 0x03, 0xF9, 0x50,
-0x49, 0xB3, 0x50, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0x9C, 0x6D, 0x50, 0x4C, 0xCC, 0xF7, 0xD0,
-0x4D, 0x7C, 0x4F, 0x50, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x5C, 0x31, 0x50, 0x50, 0x8C, 0xBB, 0xD0,
-0x51, 0x3C, 0x13, 0x50, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x1B, 0xF5, 0x50, 0x54, 0x4C, 0x7F, 0xD0,
-0x54, 0xFB, 0xD7, 0x50, 0x56, 0x2C, 0x61, 0xD0, 0x56, 0xE4, 0xF3, 0xD0, 0x58, 0x15, 0x7E, 0x50,
-0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xA4, 0xB7, 0xD0, 0x5B, 0xD5, 0x42, 0x50,
-0x5C, 0x84, 0x99, 0xD0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x64, 0x7B, 0xD0, 0x5F, 0x95, 0x06, 0x50,
-0x60, 0x4D, 0x98, 0x50, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x2D, 0x7A, 0x50, 0x63, 0x5E, 0x04, 0xD0,
-0x64, 0x0D, 0x5C, 0x50, 0x65, 0x3D, 0xE6, 0xD0, 0x65, 0xED, 0x3E, 0x50, 0x67, 0x1D, 0xC8, 0xD0,
-0x67, 0xCD, 0x20, 0x50, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xAD, 0x02, 0x50, 0x6A, 0xDD, 0x8C, 0xD0,
-0x6B, 0x96, 0x1E, 0xD0, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x76, 0x00, 0xD0, 0x6E, 0xA6, 0x8B, 0x50,
-0x6F, 0x55, 0xE2, 0xD0, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x35, 0xC4, 0xD0, 0x72, 0x66, 0x4F, 0x50,
-0x73, 0x15, 0xA6, 0xD0, 0x74, 0x46, 0x31, 0x50, 0x74, 0xFE, 0xC3, 0x50, 0x76, 0x2F, 0x4D, 0xD0,
-0x76, 0xDE, 0xA5, 0x50, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xBE, 0x87, 0x50, 0x79, 0xEF, 0x11, 0xD0,
-0x7A, 0x9E, 0x69, 0x50, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0x7E, 0x4B, 0x50, 0x7D, 0xAE, 0xD5, 0xD0,
-0x7E, 0x5E, 0x2D, 0x50, 0x7F, 0x8E, 0xB7, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x24, 0x17, 0x50, 0x47, 0xDC, 0xA9, 0x50, 0x49, 0x03, 0xF9, 0x50,
+0x49, 0xBC, 0x8B, 0x50, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0xA5, 0xA7, 0xD0, 0x4C, 0xCC, 0xF7, 0xD0,
+0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x65, 0x6B, 0xD0, 0x50, 0x8C, 0xBB, 0xD0,
+0x51, 0x45, 0x4D, 0xD0, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x25, 0x2F, 0xD0, 0x54, 0x4C, 0x7F, 0xD0,
+0x55, 0x05, 0x11, 0xD0, 0x56, 0x2C, 0x61, 0xD0, 0x56, 0xEE, 0x2E, 0x50, 0x58, 0x15, 0x7E, 0x50,
+0x58, 0xCE, 0x10, 0x50, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xAD, 0xF2, 0x50, 0x5B, 0xD5, 0x42, 0x50,
+0x5C, 0x8D, 0xD4, 0x50, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x6D, 0xB6, 0x50, 0x5F, 0x95, 0x06, 0x50,
+0x60, 0x56, 0xD2, 0xD0, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x36, 0xB4, 0xD0, 0x63, 0x5E, 0x04, 0xD0,
+0x64, 0x16, 0x96, 0xD0, 0x65, 0x3D, 0xE6, 0xD0, 0x65, 0xF6, 0x78, 0xD0, 0x67, 0x1D, 0xC8, 0xD0,
+0x67, 0xD6, 0x5A, 0xD0, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xB6, 0x3C, 0xD0, 0x6A, 0xDD, 0x8C, 0xD0,
+0x6B, 0x9F, 0x59, 0x50, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x7F, 0x3B, 0x50, 0x6E, 0xA6, 0x8B, 0x50,
+0x6F, 0x5F, 0x1D, 0x50, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x3E, 0xFF, 0x50, 0x72, 0x66, 0x4F, 0x50,
+0x73, 0x1E, 0xE1, 0x50, 0x74, 0x46, 0x31, 0x50, 0x75, 0x07, 0xFD, 0xD0, 0x76, 0x2F, 0x4D, 0xD0,
+0x76, 0xE7, 0xDF, 0xD0, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xC7, 0xC1, 0xD0, 0x79, 0xEF, 0x11, 0xD0,
+0x7A, 0xA7, 0xA3, 0xD0, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0x87, 0x85, 0xD0, 0x7D, 0xAE, 0xD5, 0xD0,
+0x7E, 0x67, 0x67, 0xD0, 0x7F, 0x8E, 0xB7, 0xD0, 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,
@@ -15657,7 +16026,7 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0,
0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0,
0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40,
-0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40,
+0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40,
0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40,
0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0,
0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0,
@@ -17067,4 +17436,4 @@ const unsigned char timelib_timezone_db_data_builtin[242022] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, };
-const timelib_tzdb timezonedb_builtin = { "2007.9", 552, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2008.2", 557, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
diff --git a/ext/date/lib/tm2unixtime.c b/ext/date/lib/tm2unixtime.c
index b0cbff966..a4e6996b2 100644
--- a/ext/date/lib/tm2unixtime.c
+++ b/ext/date/lib/tm2unixtime.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tm2unixtime.c,v 1.13.2.3.2.2 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: tm2unixtime.c,v 1.13.2.3.2.4 2008/01/26 16:26:47 derick Exp $ */
#include "timelib.h"
@@ -98,6 +98,7 @@ static void do_adjust_for_weekday(timelib_time* time)
} else {
time->d -= (7 - (abs(time->relative.weekday) - current_dow));
}
+ time->have_weekday_relative = 0;
}
static void do_normalize(timelib_time* time)
@@ -130,6 +131,7 @@ static void do_adjust_relative(timelib_time* time)
do_normalize(time);
memset(&(time->relative), 0, sizeof(time->relative));
+ time->have_relative = 0;
}
static void do_adjust_special_weekday(timelib_time* time)
diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c
index 2de7bcf2e..4b36e9c94 100644
--- a/ext/date/lib/unixtime2tm.c
+++ b/ext/date/lib/unixtime2tm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: unixtime2tm.c,v 1.12.2.4.2.3 2007/07/12 18:58:00 derick Exp $ */
+/* $Id: unixtime2tm.c,v 1.12.2.4.2.4 2007/12/31 07:20:05 sebastian Exp $ */
#include "timelib.h"
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 597271241..25189b5c6 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.c,v 1.43.2.45.2.51 2007/07/12 18:59:05 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.58 2008/04/16 17:21:46 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -266,7 +266,18 @@ struct _php_date_obj {
struct _php_timezone_obj {
zend_object std;
- timelib_tzinfo *tz;
+ int initialized;
+ int type;
+ union {
+ timelib_tzinfo *tz; // TIMELIB_ZONETYPE_ID;
+ timelib_sll utc_offset; // TIMELIB_ZONETYPE_OFFSET
+ struct // TIMELIB_ZONETYPE_ABBR
+ {
+ timelib_sll utc_offset;
+ char *abbr;
+ int dst;
+ } z;
+ } tzi;
};
#define DATE_SET_CONTEXT \
@@ -735,9 +746,9 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
offset->abbr = strdup(t->tz_abbr);
} else if (t->zone_type == TIMELIB_ZONETYPE_OFFSET) {
offset = timelib_time_offset_ctor();
- offset->offset = (t->z - (t->dst * 60)) * -60;
+ offset->offset = (t->z) * -60;
offset->leap_secs = 0;
- offset->is_dst = t->dst;
+ offset->is_dst = 0;
offset->abbr = malloc(9); /* GMT±xxxx\0 */
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
@@ -808,7 +819,26 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
);
break;
case 'T': length = slprintf(buffer, 32, "%s", localtime ? offset->abbr : "GMT"); break;
- case 'e': length = slprintf(buffer, 32, "%s", localtime ? t->tz_info->name : "UTC"); break;
+ case 'e': if (!localtime) {
+ length = slprintf(buffer, 32, "%s", "UTC");
+ } else {
+ switch (t->zone_type) {
+ case TIMELIB_ZONETYPE_ID:
+ length = slprintf(buffer, 32, "%s", t->tz_info->name);
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ length = slprintf(buffer, 32, "%s", offset->abbr);
+ break;
+ case TIMELIB_ZONETYPE_OFFSET:
+ length = slprintf(buffer, 32, "%c%02d:%02d",
+ ((offset->offset < 0) ? '-' : '+'),
+ abs(offset->offset / 3600),
+ abs((offset->offset % 3600) / 60)
+ );
+ break;
+ }
+ }
+ break;
case 'Z': length = slprintf(buffer, 32, "%d", localtime ? offset->offset : 0); break;
/* full date/time */
@@ -1086,7 +1116,7 @@ PHP_FUNCTION(strtotime)
now = timelib_time_ctor();
initial_ts = emalloc(25);
- snprintf(initial_ts, 24, "@%ld", preset_ts);
+ snprintf(initial_ts, 24, "@%ld UTC", preset_ts);
t = timelib_strtotime(initial_ts, strlen(initial_ts), NULL, DATE_TIMEZONEDB); /* we ignore the error here, as this should never fail */
timelib_update_ts(t, tzi);
now->tz_info = tzi;
@@ -1590,7 +1620,21 @@ static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC)
zend_object_value new_ov = date_object_new_timezone_ex(old_obj->std.ce, &new_obj TSRMLS_CC);
zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
- new_obj->tz = old_obj->tz;
+ new_obj->type = old_obj->type;
+ new_obj->initialized = 1;
+ switch (new_obj->type) {
+ case TIMELIB_ZONETYPE_ID:
+ new_obj->tzi.tz = old_obj->tzi.tz;
+ break;
+ case TIMELIB_ZONETYPE_OFFSET:
+ new_obj->tzi.utc_offset = old_obj->tzi.utc_offset;
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ new_obj->tzi.z.utc_offset = old_obj->tzi.z.utc_offset;
+ new_obj->tzi.z.dst = old_obj->tzi.z.dst;
+ new_obj->tzi.z.abbr = old_obj->tzi.z.abbr;
+ break;
+ }
return new_ov;
}
@@ -1614,6 +1658,9 @@ static void date_object_free_storage_timezone(void *object TSRMLS_DC)
{
php_timezone_obj *intern = (php_timezone_obj *)object;
+ if (intern->type == TIMELIB_ZONETYPE_ABBR) {
+ free(intern->tzi.z.abbr);
+ }
zend_object_std_dtor(&intern->std TSRMLS_CC);
efree(object);
}
@@ -1632,12 +1679,14 @@ static zval * date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC)
return object;
}
-static void date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, zval *timezone_object TSRMLS_DC)
+static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, zval *timezone_object, int ctor TSRMLS_DC)
{
timelib_time *now;
timelib_tzinfo *tzi;
timelib_error_container *err = NULL;
- int free_tzi = 0;
+ int free_tzi = 0, type = TIMELIB_ZONETYPE_ID, new_dst, errors_found = 0;
+ char *new_abbr;
+ timelib_sll new_offset;
if (dateobj->time) {
if (dateobj->time->tz_info) {
@@ -1646,21 +1695,39 @@ static void date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
timelib_time_dtor(dateobj->time);
}
dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", time_str_len ? time_str_len : sizeof("now") -1, &err, DATE_TIMEZONEDB);
- if (err) {
- if (err->error_count) {
+
+ if (err && err->error_count) {
+ if (ctor) {
/* spit out the first library error message, at least */
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to parse time string (%s) at position %d (%c): %s", time_str,
- err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message);
+ err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message);
}
- timelib_error_container_dtor(err);
+ errors_found = 1;
+ }
+ timelib_error_container_dtor(err);
+ if (errors_found) {
+ return 0;
}
if (timezone_object) {
php_timezone_obj *tzobj;
tzobj = (php_timezone_obj *) zend_object_store_get_object(timezone_object TSRMLS_CC);
- tzi = timelib_tzinfo_clone(tzobj->tz);
- free_tzi = 1;
+ switch (tzobj->type) {
+ case TIMELIB_ZONETYPE_ID:
+ tzi = timelib_tzinfo_clone(tzobj->tzi.tz);
+ free_tzi = 1;
+ break;
+ case TIMELIB_ZONETYPE_OFFSET:
+ new_offset = tzobj->tzi.utc_offset;
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ new_offset = tzobj->tzi.z.utc_offset;
+ new_dst = tzobj->tzi.z.dst;
+ new_abbr = strdup(tzobj->tzi.z.abbr);
+ break;
+ }
+ type = tzobj->type;
} else if (dateobj->time->tz_info) {
tzi = timelib_tzinfo_clone(dateobj->time->tz_info);
free_tzi = 1;
@@ -1669,8 +1736,20 @@ static void date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
}
now = timelib_time_ctor();
- now->tz_info = tzi;
- now->zone_type = TIMELIB_ZONETYPE_ID;
+ now->zone_type = type;
+ switch (type) {
+ case TIMELIB_ZONETYPE_ID:
+ now->tz_info = tzi;
+ break;
+ case TIMELIB_ZONETYPE_OFFSET:
+ now->z = new_offset;
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ now->z = new_offset;
+ now->dst = new_dst;
+ now->tz_abbr = new_abbr;
+ break;
+ }
timelib_unixtime2local(now, (timelib_sll) time(NULL));
timelib_fill_holes(dateobj->time, now, 0);
@@ -1678,13 +1757,15 @@ static void date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
dateobj->time->have_weekday_relative = dateobj->time->have_relative = 0;
- if (now->tz_info != tzi) {
+ if (type == TIMELIB_ZONETYPE_ID && now->tz_info != tzi) {
timelib_tzinfo_dtor(now->tz_info);
}
if (free_tzi) {
timelib_tzinfo_dtor(tzi);
}
- timelib_time_dtor(now);
+ timelib_time_dtor(now);
+
+ return 1;
}
/* {{{ proto DateTime date_create([string time[, DateTimeZone object]])
@@ -1701,7 +1782,9 @@ PHP_FUNCTION(date_create)
}
date_instantiate(date_ce_date, return_value TSRMLS_CC);
- date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, timezone_object TSRMLS_CC);
+ if (!date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, timezone_object, 0 TSRMLS_CC)) {
+ RETURN_FALSE;
+ }
}
/* }}} */
@@ -1716,7 +1799,7 @@ PHP_METHOD(DateTime, __construct)
php_set_error_handling(EH_THROW, NULL TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
- date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, timezone_object TSRMLS_CC);
+ date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, timezone_object, 1 TSRMLS_CC);
}
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
}
@@ -1889,10 +1972,24 @@ PHP_FUNCTION(date_timezone_get)
}
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
- if (dateobj->time->is_localtime && dateobj->time->tz_info) {
+ if (dateobj->time->is_localtime/* && dateobj->time->tz_info*/) {
date_instantiate(date_ce_timezone, return_value TSRMLS_CC);
tzobj = (php_timezone_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
- tzobj->tz = timelib_tzinfo_clone(dateobj->time->tz_info);
+ tzobj->initialized = 1;
+ tzobj->type = dateobj->time->zone_type;
+ switch (dateobj->time->zone_type) {
+ case TIMELIB_ZONETYPE_ID:
+ tzobj->tzi.tz = dateobj->time->tz_info;
+ break;
+ case TIMELIB_ZONETYPE_OFFSET:
+ tzobj->tzi.utc_offset = dateobj->time->z;
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ tzobj->tzi.z.utc_offset = dateobj->time->z;
+ tzobj->tzi.z.dst = dateobj->time->dst;
+ tzobj->tzi.z.abbr = strdup(dateobj->time->tz_abbr);
+ break;
+ }
} else {
RETURN_FALSE;
}
@@ -1915,10 +2012,13 @@ PHP_FUNCTION(date_timezone_set)
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
tzobj = (php_timezone_obj *) zend_object_store_get_object(timezone_object TSRMLS_CC);
+ if (tzobj->type != TIMELIB_ZONETYPE_ID) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can only do this for zones with ID for now");
+ }
if (dateobj->time->tz_info) {
timelib_tzinfo_dtor(dateobj->time->tz_info);
}
- timelib_set_timezone(dateobj->time, timelib_tzinfo_clone(tzobj->tz));
+ timelib_set_timezone(dateobj->time, timelib_tzinfo_clone(tzobj->tzi.tz));
timelib_unixtime2local(dateobj->time, dateobj->time->sse);
}
/* }}} */
@@ -1937,10 +2037,20 @@ PHP_FUNCTION(date_offset_get)
}
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
- if (dateobj->time->is_localtime && dateobj->time->tz_info) {
- offset = timelib_get_time_zone_info(dateobj->time->sse, dateobj->time->tz_info);
- RETVAL_LONG(offset->offset);
- timelib_time_offset_dtor(offset);
+ if (dateobj->time->is_localtime/* && dateobj->time->tz_info*/) {
+ switch (dateobj->time->zone_type) {
+ case TIMELIB_ZONETYPE_ID:
+ offset = timelib_get_time_zone_info(dateobj->time->sse, dateobj->time->tz_info);
+ RETVAL_LONG(offset->offset);
+ timelib_time_offset_dtor(offset);
+ break;
+ case TIMELIB_ZONETYPE_OFFSET:
+ RETVAL_LONG(dateobj->time->z * -60);
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ RETVAL_LONG((dateobj->time->z - (60 * dateobj->time->dst)) * -60);
+ break;
+ }
return;
} else {
RETURN_LONG(0);
@@ -2042,6 +2152,7 @@ PHP_FUNCTION(timezone_open)
char *tz;
int tz_len;
timelib_tzinfo *tzi = NULL;
+ php_timezone_obj *tzobj;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len) == FAILURE) {
RETURN_FALSE;
@@ -2049,7 +2160,10 @@ PHP_FUNCTION(timezone_open)
if (SUCCESS != timezone_initialize(&tzi, tz TSRMLS_CC)) {
RETURN_FALSE;
}
- ((php_timezone_obj *) zend_object_store_get_object(date_instantiate(date_ce_timezone, return_value TSRMLS_CC) TSRMLS_CC))->tz = tzi;
+ tzobj = zend_object_store_get_object(date_instantiate(date_ce_timezone, return_value TSRMLS_CC) TSRMLS_CC);
+ tzobj->type = TIMELIB_ZONETYPE_ID;
+ tzobj->tzi.tz = tzi;
+ tzobj->initialized = 1;
}
/* }}} */
@@ -2061,11 +2175,17 @@ PHP_METHOD(DateTimeZone, __construct)
char *tz;
int tz_len;
timelib_tzinfo *tzi = NULL;
+ php_timezone_obj *tzobj;
php_set_error_handling(EH_THROW, NULL TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) {
if (SUCCESS == timezone_initialize(&tzi, tz TSRMLS_CC)) {
- ((php_timezone_obj *) zend_object_store_get_object(getThis() TSRMLS_CC))->tz = tzi;
+ tzobj = zend_object_store_get_object(getThis() TSRMLS_CC);
+ tzobj->type = TIMELIB_ZONETYPE_ID;
+ tzobj->tzi.tz = tzi;
+ tzobj->initialized = 1;
+ } else {
+ ZVAL_NULL(getThis());
}
}
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
@@ -2084,9 +2204,28 @@ PHP_FUNCTION(timezone_name_get)
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object TSRMLS_CC);
- DATE_CHECK_INITIALIZED(tzobj->tz, DateTimeZone);
+ DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
+
+ switch (tzobj->type) {
+ case TIMELIB_ZONETYPE_ID:
+ RETURN_STRING(tzobj->tzi.tz->name, 1);
+ break;
+ case TIMELIB_ZONETYPE_OFFSET: {
+ char *tmpstr = emalloc(sizeof("UTC+05:00"));
+ timelib_sll utc_offset = tzobj->tzi.utc_offset;
- RETURN_STRING(tzobj->tz->name, 1);
+ snprintf(tmpstr, sizeof("+05:00"), "%c%02d:%02d",
+ utc_offset > 0 ? '-' : '+',
+ abs(utc_offset / 60),
+ abs((utc_offset % 60)));
+
+ RETURN_STRING(tmpstr, 0);
+ }
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ RETURN_STRING(tzobj->tzi.z.abbr, 1);
+ break;
+ }
}
/* }}} */
@@ -2128,13 +2267,23 @@ PHP_FUNCTION(timezone_offset_get)
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object TSRMLS_CC);
- DATE_CHECK_INITIALIZED(tzobj->tz, DateTimeZone);
+ DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
dateobj = (php_date_obj *) zend_object_store_get_object(dateobject TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
- offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tz);
- RETVAL_LONG(offset->offset);
- timelib_time_offset_dtor(offset);
+ switch (tzobj->type) {
+ case TIMELIB_ZONETYPE_ID:
+ offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tzi.tz);
+ RETVAL_LONG(offset->offset);
+ timelib_time_offset_dtor(offset);
+ break;
+ case TIMELIB_ZONETYPE_OFFSET:
+ RETURN_LONG(tzobj->tzi.utc_offset * -60);
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ RETURN_LONG((tzobj->tzi.z.utc_offset - (tzobj->tzi.z.dst*60)) * -60);
+ break;
+ }
}
/* }}} */
@@ -2151,17 +2300,20 @@ PHP_FUNCTION(timezone_transitions_get)
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object TSRMLS_CC);
- DATE_CHECK_INITIALIZED(tzobj->tz, DateTimeZone);
+ DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
+ if (tzobj->type != TIMELIB_ZONETYPE_ID) {
+ RETURN_FALSE;
+ }
array_init(return_value);
- for (i = 0; i < tzobj->tz->timecnt; ++i) {
+ for (i = 0; i < tzobj->tzi.tz->timecnt; ++i) {
MAKE_STD_ZVAL(element);
array_init(element);
- add_assoc_long(element, "ts", tzobj->tz->trans[i]);
- add_assoc_string(element, "time", php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tz->trans[i], 0 TSRMLS_CC), 0);
- add_assoc_long(element, "offset", tzobj->tz->type[tzobj->tz->trans_idx[i]].offset);
- add_assoc_bool(element, "isdst", tzobj->tz->type[tzobj->tz->trans_idx[i]].isdst);
- add_assoc_string(element, "abbr", &tzobj->tz->timezone_abbr[tzobj->tz->type[tzobj->tz->trans_idx[i]].abbr_idx], 1);
+ add_assoc_long(element, "ts", tzobj->tzi.tz->trans[i]);
+ add_assoc_string(element, "time", php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tzi.tz->trans[i], 0 TSRMLS_CC), 0);
+ add_assoc_long(element, "offset", tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].offset);
+ add_assoc_bool(element, "isdst", tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].isdst);
+ add_assoc_string(element, "abbr", &tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx], 1);
add_next_index_zval(return_value, element);
}
diff --git a/ext/date/php_date.h b/ext/date/php_date.h
index ac01af728..79e2785dc 100644
--- a/ext/date/php_date.h
+++ b/ext/date/php_date.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.h,v 1.17.2.11.2.3 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: php_date.h,v 1.17.2.11.2.4 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef PHP_DATE_H
#define PHP_DATE_H
diff --git a/ext/date/tests/bug40743.phpt b/ext/date/tests/bug40743.phpt
new file mode 100644
index 000000000..f3ce17124
--- /dev/null
+++ b/ext/date/tests/bug40743.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Bug #40743 (DateTime ignores the TimeZone object passed to the constructor)
+--FILE--
+<?php
+$dt = new DateTime('@1200506699', new DateTimeZone('Europe/Berlin'));
+echo $dt->format(DATE_RFC822), "\n";
+echo $dt->format('T e Z'), "\n";
+echo "-----\n";
+
+date_default_timezone_set('America/New_York');
+
+$dt = new DateTime('16 Jan 08 13:04:59');
+echo $dt->format(DATE_RFC822 . " e T O U"), "\n";
+
+$dt = new DateTime('@1200506699');
+echo $dt->format(DATE_RFC822 . " e T O U"), "\n";
+
+$dt = new DateTime('@1200506699');
+$dt->setTimezone( new DateTimeZone( 'America/New_York' ) );
+echo $dt->format(DATE_RFC822 . " e T O U"), "\n";
+
+$dt = new DateTime('@1200506699', new DateTimeZone('Europe/Berlin'));
+echo $dt->format(DATE_RFC822 . " e T O U"), "\n";
+
+$dt = new DateTime('16 Jan 08 13:04:59 America/Chicago');
+echo $dt->format(DATE_RFC822 . " e T O U"), "\n";
+
+$dt = new DateTime('16 Jan 08 13:04:59 America/Chicago', new DateTimeZone('Europe/Berlin'));
+echo $dt->format(DATE_RFC822 . " e T O U"), "\n";
+?>
+--EXPECT--
+Wed, 16 Jan 08 18:04:59 +0000
+GMT+0000 +00:00 0
+-----
+Wed, 16 Jan 08 13:04:59 -0500 America/New_York EST -0500 1200506699
+Wed, 16 Jan 08 18:04:59 +0000 +00:00 GMT+0000 +0000 1200506699
+Wed, 16 Jan 08 13:04:59 -0500 America/New_York EST -0500 1200506699
+Wed, 16 Jan 08 18:04:59 +0000 +00:00 GMT+0000 +0000 1200506699
+Wed, 16 Jan 08 13:04:59 -0600 America/Chicago CST -0600 1200510299
+Wed, 16 Jan 08 13:04:59 -0600 America/Chicago CST -0600 1200510299
diff --git a/ext/date/tests/bug41523-64bit.phpt b/ext/date/tests/bug41523-64bit.phpt
new file mode 100644
index 000000000..9b4e90061
--- /dev/null
+++ b/ext/date/tests/bug41523-64bit.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30) (64 bit)
+--SKIPIF--
+<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+--FILE--
+<?php
+date_default_timezone_set("UTC");
+
+var_dump( date_parse('0000-00-00 00:00:00') );
+var_dump( strtotime('0000-00-00 00:00:00') );
+var_dump( $dt = new DateTime('0000-00-00 00:00:00') );
+echo $dt->format( DateTime::ISO8601 ), "\n";
+
+?>
+--EXPECT--
+array(12) {
+ ["year"]=>
+ int(0)
+ ["month"]=>
+ int(0)
+ ["day"]=>
+ int(0)
+ ["hour"]=>
+ int(0)
+ ["minute"]=>
+ int(0)
+ ["second"]=>
+ int(0)
+ ["fraction"]=>
+ float(0)
+ ["warning_count"]=>
+ int(0)
+ ["warnings"]=>
+ array(0) {
+ }
+ ["error_count"]=>
+ int(0)
+ ["errors"]=>
+ array(0) {
+ }
+ ["is_localtime"]=>
+ bool(false)
+}
+int(-62169984000)
+object(DateTime)#1 (0) {
+}
+-0001-11-30T00:00:00+0000
diff --git a/ext/date/tests/bug41523.phpt b/ext/date/tests/bug41523.phpt
index c8aa00fd7..5b0d5bd19 100644
--- a/ext/date/tests/bug41523.phpt
+++ b/ext/date/tests/bug41523.phpt
@@ -1,5 +1,7 @@
--TEST--
-Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30)
+Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30) (32 bit)
+--SKIPIF--
+<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
--FILE--
<?php
date_default_timezone_set("UTC");
diff --git a/ext/date/tests/bug41599.phpt b/ext/date/tests/bug41599.phpt
new file mode 100644
index 000000000..e4febe2cd
--- /dev/null
+++ b/ext/date/tests/bug41599.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #41599 (setTime() fails after modify() is used)
+--FILE--
+<?php
+date_default_timezone_set('Europe/London');
+
+$start = new DateTime('2008-01-17 last Monday');
+echo $start->format('Y-m-d H:i:s'),PHP_EOL;
+//good
+
+$start->modify('Tuesday');
+echo $start->format('Y-m-d H:i:s'),PHP_EOL;
+//good
+
+$start->setTime(4, 0, 0);
+echo $start->format('Y-m-d H:i:s'),PHP_EOL;
+//jumped to next Sunday
+
+$start->setTime(8, 0, 0);
+echo $start->format('Y-m-d H:i:s'),PHP_EOL;
+//jumped to next Sunday again
+?>
+--EXPECT--
+2008-01-14 00:00:00
+2008-01-15 00:00:00
+2008-01-15 04:00:00
+2008-01-15 08:00:00
diff --git a/ext/date/tests/bug42910.phpt b/ext/date/tests/bug42910.phpt
new file mode 100644
index 000000000..1bd079081
--- /dev/null
+++ b/ext/date/tests/bug42910.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #42910 (Constructing DateTime with TimeZone Indicator invalidates DateTimeZone)
+--FILE--
+<?php
+ date_default_timezone_set('America/Los_Angeles');
+ $foo = new DateTime('2007-03-11');
+ $bar = new DateTime('2007-03-11T00:00:00-0800');
+
+ print $foo->format(DateTime::ISO8601) . ' - ' . $foo->getTimezone()->getName() . ' - ' . $foo->format('U') . "\r\n";
+ print $bar->format(DateTime::ISO8601) . ' - ' . $bar->getTimezone()->getName() . ' - ' . $bar->format('U') . "\r\n";
+
+ $foo->setDate(2007, 03, 12);
+ $bar->setDate(2007, 03, 12);
+
+ print $foo->format(DateTime::ISO8601) . ' - ' . $foo->getTimezone()->getName() . ' - ' . $foo->format('U') . "\r\n";
+ print $bar->format(DateTime::ISO8601) . ' - ' . $bar->getTimezone()->getName() . ' - ' . $bar->format('U') . "\r\n";
+
+// --------------
+
+ date_default_timezone_set('Australia/Sydney');
+
+ $date= date_create('2007-11-04 12:00:00+0200');
+ var_dump(date_format($date, 'O e'));
+?>
+--EXPECT--
+2007-03-11T00:00:00-0800 - America/Los_Angeles - 1173600000
+2007-03-11T00:00:00-0800 - -08:00 - 1173600000
+2007-03-12T00:00:00-0700 - America/Los_Angeles - 1173682800
+2007-03-12T00:00:00-0800 - -08:00 - 1173686400
+string(12) "+0200 +02:00"
diff --git a/ext/date/tests/bug43003.phpt b/ext/date/tests/bug43003.phpt
new file mode 100644
index 000000000..8070358b9
--- /dev/null
+++ b/ext/date/tests/bug43003.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #43003 (Invalid timezone reported for DateTime objects constructed using a timestamp)
+--FILE--
+<?php
+date_default_timezone_set('Europe/Oslo');
+
+$oDateTest = new DateTime("@0", new DateTimeZone(date_default_timezone_get()));
+echo $oDateTest->getTimezone()->getName().": " . $oDateTest->format("Y-m-d H:i:s")."\n";
+
+$oDateTest->setTimezone(new DateTimeZone("UTC"));
+echo $oDateTest->getTimezone()->getName().": " . $oDateTest->format("Y-m-d H:i:s")."\n";
+
+$oDateTest->setTimezone(new DateTimeZone(date_default_timezone_get()));
+echo $oDateTest->getTimezone()->getName().": " . $oDateTest->format("Y-m-d H:i:s")."\n";
+
+$oDateTest = new DateTime("@0");
+echo $oDateTest->getTimezone()->getName().": " . $oDateTest->format("Y-m-d H:i:s")."\n";
+
+$oDateTest->setTimezone( new DateTimeZone(date_default_timezone_get()));
+echo $oDateTest->getTimezone()->getName().": " . $oDateTest->format("Y-m-d H:i:s")."\n";
+?>
+--EXPECT--
++00:00: 1970-01-01 00:00:00
+UTC: 1970-01-01 00:00:00
+Europe/Oslo: 1970-01-01 01:00:00
++00:00: 1970-01-01 00:00:00
+Europe/Oslo: 1970-01-01 01:00:00
diff --git a/ext/date/tests/bug43527.phpt b/ext/date/tests/bug43527.phpt
new file mode 100644
index 000000000..cc69def7b
--- /dev/null
+++ b/ext/date/tests/bug43527.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #43527 (DateTime created from a timestamp reports environment timezone)
+--FILE--
+<?php
+date_default_timezone_set("Etc/GMT+1");
+$datetime = new DateTime('Fri, 07 Dec 2007 19:05:14 +1000');
+echo $datetime->getTimezone()->getName(), "\n";
+?>
+--EXPECT--
++10:00
diff --git a/ext/date/tests/bug43808.phpt b/ext/date/tests/bug43808.phpt
new file mode 100644
index 000000000..fe8102199
--- /dev/null
+++ b/ext/date/tests/bug43808.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #43808 (date_create never fails (even when it should))
+--FILE--
+<?php
+$date = date_create('asdfasdf');
+
+if ($date instanceof DateTime) {
+ echo "this is wrong, should be bool";
+}
+
+var_dump( $date );
+?>
+--EXPECT--
+bool(false)
diff --git a/ext/date/tests/bug44742.phpt b/ext/date/tests/bug44742.phpt
new file mode 100644
index 000000000..48952b4e6
--- /dev/null
+++ b/ext/date/tests/bug44742.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #44742 (timezone_offset_get() causes segmentation faults)
+--FILE--
+<?php
+date_default_timezone_set('Europe/London');
+$dates = array(
+ "2008-04-11 00:00:00+0000",
+ "2008-04-11 00:00:00+0200",
+ "2008-04-11 00:00:00+0330",
+ "2008-04-11 00:00:00-0500",
+ "2008-04-11 00:00:00-1130",
+ "2008-04-11 00:00:00 CEST",
+ "2008-04-11 00:00:00 CET",
+ "2008-04-11 00:00:00 UTC",
+ "2008-04-11 00:00:00 America/New_York",
+ "2008-04-11 00:00:00 Europe/Oslo",
+ "2008-04-11 00:00:00 Asia/Singapore",
+);
+foreach ($dates as $date)
+{
+ $date = date_create($date);
+ var_dump(timezone_offset_get(date_timezone_get($date), $date));
+}
+?>
+--EXPECT--
+int(0)
+int(7200)
+int(12600)
+int(-18000)
+int(-41400)
+int(7200)
+int(3600)
+int(0)
+int(-14400)
+int(7200)
+int(28800)
diff --git a/ext/date/tests/mktime-3-64bit.phpt b/ext/date/tests/mktime-3-64bit.phpt
new file mode 100644
index 000000000..bb3fb2df7
--- /dev/null
+++ b/ext/date/tests/mktime-3-64bit.phpt
@@ -0,0 +1,56 @@
+--TEST--
+mktime() [3] (64-bit)
+--SKIPIF--
+<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK" ?>
+--INI--
+error_reporting=2047
+--FILE--
+<?php
+$tzs = array("America/Toronto", "Europe/Oslo");
+$years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000, 2001);
+
+foreach ($tzs as $tz) {
+ echo $tz, "\n";
+ date_default_timezone_set($tz);
+ foreach ($years as $year) {
+ printf("Y: %4d - ", $year);
+ $ret = mktime(1, 1, 1, 1, 1, $year);
+ if ($ret == FALSE) {
+ echo "out of range\n";
+ } else {
+ echo date("F ".DATE_ISO8601, $ret), "\n";
+ }
+ }
+ echo "\n";
+}
+?>
+--EXPECT--
+America/Toronto
+Y: 0 - January 2000-01-01T01:01:01-0500
+Y: 69 - January 2069-01-01T01:01:01-0500
+Y: 70 - January 1970-01-01T01:01:01-0500
+Y: 71 - January 1971-01-01T01:01:01-0500
+Y: 99 - January 1999-01-01T01:01:01-0500
+Y: 100 - January 2000-01-01T01:01:01-0500
+Y: 105 - January 2005-01-01T01:01:01-0500
+Y: 1900 - January 1900-01-01T01:01:01-0500
+Y: 1901 - January 1901-01-01T01:01:01-0500
+Y: 1902 - January 1902-01-01T01:01:01-0500
+Y: 1999 - January 1999-01-01T01:01:01-0500
+Y: 2000 - January 2000-01-01T01:01:01-0500
+Y: 2001 - January 2001-01-01T01:01:01-0500
+
+Europe/Oslo
+Y: 0 - January 2000-01-01T01:01:01+0100
+Y: 69 - January 2069-01-01T01:01:01+0100
+Y: 70 - January 1970-01-01T01:01:01+0100
+Y: 71 - January 1971-01-01T01:01:01+0100
+Y: 99 - January 1999-01-01T01:01:01+0100
+Y: 100 - January 2000-01-01T01:01:01+0100
+Y: 105 - January 2005-01-01T01:01:01+0100
+Y: 1900 - January 1900-01-01T01:01:01+0100
+Y: 1901 - January 1901-01-01T01:01:01+0100
+Y: 1902 - January 1902-01-01T01:01:01+0100
+Y: 1999 - January 1999-01-01T01:01:01+0100
+Y: 2000 - January 2000-01-01T01:01:01+0100
+Y: 2001 - January 2001-01-01T01:01:01+0100
diff --git a/ext/date/tests/mktime-3.phpt b/ext/date/tests/mktime-3.phpt
index 0d19074fc..3201def6c 100644
--- a/ext/date/tests/mktime-3.phpt
+++ b/ext/date/tests/mktime-3.phpt
@@ -1,5 +1,7 @@
--TEST--
-mktime() [3]
+mktime() [3] (32-bit)
+--SKIPIF--
+<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK" ?>
--INI--
error_reporting=2047
--FILE--
diff --git a/ext/date/tests/oo_002.phpt b/ext/date/tests/oo_002.phpt
index e619d9dfe..0cd9187b1 100644
--- a/ext/date/tests/oo_002.phpt
+++ b/ext/date/tests/oo_002.phpt
@@ -6,7 +6,7 @@ date.timezone=Europe/Berlin
<?php
class _d extends DateTime {}
class _t extends DateTimeZone {}
-$d = new _d("1pm Aug 1 GMT");
+$d = new _d("1pm Aug 1 GMT 2007");
var_dump($d->format(DateTime::RFC822));
$c = clone $d;
var_dump($c->format(DateTime::RFC822));
diff --git a/ext/date/tests/strtotime-mysql-64bit.phpt b/ext/date/tests/strtotime-mysql-64bit.phpt
new file mode 100644
index 000000000..38e7f15df
--- /dev/null
+++ b/ext/date/tests/strtotime-mysql-64bit.phpt
@@ -0,0 +1,28 @@
+--TEST--
+strtotime() and mysql timestamps (64 bit)
+--SKIPIF--
+<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+--FILE--
+<?php
+date_default_timezone_set('UTC');
+
+/* Format: YYYYMMDDHHMMSS */
+$d[] = '19970523091528';
+$d[] = '20001231185859';
+$d[] = '20800410101010'; // overflow..
+
+foreach($d as $date) {
+ $time = strtotime($date);
+
+ if (is_integer($time)) {
+ var_dump(date('r', $time));
+ } else {
+ var_dump($time);
+ }
+}
+?>
+--EXPECT--
+string(31) "Fri, 23 May 1997 09:15:28 +0000"
+string(31) "Sun, 31 Dec 2000 18:58:59 +0000"
+string(31) "Wed, 10 Apr 2080 10:10:10 +0000"
+
diff --git a/ext/date/tests/strtotime-mysql.phpt b/ext/date/tests/strtotime-mysql.phpt
index 88a8f10fe..e5935bb16 100755
--- a/ext/date/tests/strtotime-mysql.phpt
+++ b/ext/date/tests/strtotime-mysql.phpt
@@ -1,5 +1,7 @@
--TEST--
-strtotime() and mysql timestamps
+strtotime() and mysql timestamps (32 bit)
+--SKIPIF--
+<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
--FILE--
<?php
date_default_timezone_set('UTC');
diff --git a/ext/date/tests/strtotime3-64bit.phpt b/ext/date/tests/strtotime3-64bit.phpt
new file mode 100644
index 000000000..7dc081635
--- /dev/null
+++ b/ext/date/tests/strtotime3-64bit.phpt
@@ -0,0 +1,71 @@
+--TEST--
+strtotime() function (64 bit)
+--SKIPIF--
+<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+--FILE--
+<?php
+date_default_timezone_set('Europe/Lisbon');
+$time = 1150494719; // 16/June/2006
+
+$strs = array(
+ '',
+ " \t\r\n000",
+ 'yesterday',
+ '22:49:12',
+ '22:49:12 bogusTZ',
+ '22.49.12.42GMT',
+ '22.49.12.42bogusTZ',
+ 't0222',
+ 't0222 t0222',
+ '022233',
+ '022233 bogusTZ',
+ '2-3-2004',
+ '2.3.2004',
+ '20060212T23:12:23UTC',
+ '20060212T23:12:23 bogusTZ',
+ '2006167', //pgydotd
+ 'Jan-15-2006', //pgtextshort
+ '2006-Jan-15', //pgtextreverse
+ '10/Oct/2000:13:55:36 +0100', //clf
+ '10/Oct/2000:13:55:36 +00100', //clf
+ '2006',
+ '1986', // year
+ 'JAN',
+ 'January',
+);
+
+foreach ($strs as $str) {
+ $t = strtotime($str, $time);
+ if (is_integer($t)) {
+ var_dump(date(DATE_RFC2822, $t));
+ } else {
+ var_dump($t);
+ }
+}
+
+?>
+--EXPECT--
+bool(false)
+bool(false)
+string(31) "Thu, 15 Jun 2006 00:00:00 +0100"
+string(31) "Fri, 16 Jun 2006 22:49:12 +0100"
+bool(false)
+string(31) "Fri, 16 Jun 2006 23:49:12 +0100"
+bool(false)
+string(31) "Fri, 16 Jun 2006 02:22:00 +0100"
+string(31) "Mon, 16 Jun 0222 02:22:00 -0036"
+string(31) "Fri, 16 Jun 2006 02:22:33 +0100"
+bool(false)
+string(31) "Tue, 02 Mar 2004 00:00:00 +0000"
+string(31) "Tue, 02 Mar 2004 00:00:00 +0000"
+string(31) "Sun, 12 Feb 2006 23:12:23 +0000"
+bool(false)
+string(31) "Fri, 16 Jun 2006 00:00:00 +0100"
+string(31) "Sun, 15 Jan 2006 00:00:00 +0000"
+string(31) "Sun, 15 Jan 2006 00:00:00 +0000"
+string(31) "Tue, 10 Oct 2000 13:55:36 +0100"
+bool(false)
+string(31) "Fri, 16 Jun 2006 20:06:00 +0100"
+string(31) "Mon, 16 Jun 1986 22:51:59 +0100"
+string(31) "Mon, 16 Jan 2006 00:00:00 +0000"
+string(31) "Mon, 16 Jan 2006 00:00:00 +0000"
diff --git a/ext/date/tests/strtotime3.phpt b/ext/date/tests/strtotime3.phpt
index c5d13d8a6..6aa5640f6 100644
--- a/ext/date/tests/strtotime3.phpt
+++ b/ext/date/tests/strtotime3.phpt
@@ -1,5 +1,7 @@
--TEST--
-strtotime() function
+strtotime() function (32 bit)
+--SKIPIF--
+<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
--FILE--
<?php
date_default_timezone_set('Europe/Lisbon');
diff --git a/ext/date/tests/timestamp-in-dst.phpt b/ext/date/tests/timestamp-in-dst.phpt
new file mode 100644
index 000000000..5b66351e1
--- /dev/null
+++ b/ext/date/tests/timestamp-in-dst.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Format timestamp in DST test
+--INI--
+date.timezone=CEST
+--FILE--
+<?php
+error_reporting(E_ALL); // hide e_strict warning about timezones
+var_dump( date_create( '@1202996091' )->format( 'c' ) );
+?>
+--EXPECT--
+string(25) "2008-02-14T13:34:51+00:00"
diff --git a/ext/dba/config.m4 b/ext/dba/config.m4
index 28295229b..60cb8116f 100644
--- a/ext/dba/config.m4
+++ b/ext/dba/config.m4
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.70.2.2.2.8 2007/07/19 10:50:16 jani Exp $
+dnl $Id: config.m4,v 1.70.2.2.2.9 2007/12/06 14:17:43 helly Exp $
dnl
dnl Suppose we need FlatFile if no support or only CDB is used.
@@ -274,11 +274,16 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[
# DB4
if test "$PHP_DB4" != "no"; then
PHP_DBA_STD_BEGIN
- for i in $PHP_DB4 /usr/local/BerkeleyDB.4.2 /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
+ dbdp="/usr/local/BerkeleyDB.4."
+ for i in $PHP_DB4 ${dbdp}6 ${dbdp}5 ${dbdp}4 ${dbdp}3 ${dbdp}2 ${dbdp}1 ${dbdp}0 /usr/local /usr; do
if test -f "$i/db4/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/db4/db.h
break
+ elif test -f "$i/include/db4.6/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db4.6/db.h
+ break
elif test -f "$i/include/db4.5/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/include/db4.5/db.h
@@ -301,7 +306,7 @@ if test "$PHP_DB4" != "no"; then
break
fi
done
- PHP_DBA_DB_CHECK(4, db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
+ PHP_DBA_DB_CHECK(4, db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
fi
PHP_DBA_STD_RESULT(db4,Berkeley DB4)
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index b31ae29ee..ec3bf5e71 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba.c,v 1.111.2.4.2.5 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba.c,v 1.111.2.4.2.6 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c
index 7f1fb275d..c8d2eaa3d 100644
--- a/ext/dba/dba_cdb.c
+++ b/ext/dba/dba_cdb.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_cdb.c,v 1.32.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_cdb.c,v 1.32.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c
index 32171a111..91d408da0 100755
--- a/ext/dba/dba_db1.c
+++ b/ext/dba/dba_db1.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_db1.c,v 1.3.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_db1.c,v 1.3.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c
index 52b72212f..79d835d01 100644
--- a/ext/dba/dba_db2.c
+++ b/ext/dba/dba_db2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_db2.c,v 1.39.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_db2.c,v 1.39.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c
index c74bbf2f4..5fbcdf851 100644
--- a/ext/dba/dba_db3.c
+++ b/ext/dba/dba_db3.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_db3.c,v 1.33.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_db3.c,v 1.33.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c
index 44fa4e7b1..b2bdec8e8 100644
--- a/ext/dba/dba_db4.c
+++ b/ext/dba/dba_db4.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_db4.c,v 1.15.2.3.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_db4.c,v 1.15.2.3.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c
index 12f020f7a..a7896be85 100644
--- a/ext/dba/dba_dbm.c
+++ b/ext/dba/dba_dbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_dbm.c,v 1.29.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_dbm.c,v 1.29.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_flatfile.c b/ext/dba/dba_flatfile.c
index a86bcf6ad..30f8bf4ac 100644
--- a/ext/dba/dba_flatfile.c
+++ b/ext/dba/dba_flatfile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_flatfile.c,v 1.19.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_flatfile.c,v 1.19.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c
index 0792519f0..de915f950 100644
--- a/ext/dba/dba_gdbm.c
+++ b/ext/dba/dba_gdbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_gdbm.c,v 1.23.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_gdbm.c,v 1.23.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c
index 8263a0307..291258283 100644
--- a/ext/dba/dba_inifile.c
+++ b/ext/dba/dba_inifile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_inifile.c,v 1.5.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_inifile.c,v 1.5.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c
index 7e1363a66..8414385f6 100644
--- a/ext/dba/dba_ndbm.c
+++ b/ext/dba/dba_ndbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_ndbm.c,v 1.19.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_ndbm.c,v 1.19.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/dba_qdbm.c b/ext/dba/dba_qdbm.c
index f5b6348d4..da9a0bd4a 100755
--- a/ext/dba/dba_qdbm.c
+++ b/ext/dba/dba_qdbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_qdbm.c,v 1.4.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: dba_qdbm.c,v 1.4.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dba/libcdb/cdb.c b/ext/dba/libcdb/cdb.c
index f80676ec6..d84214b1c 100644
--- a/ext/dba/libcdb/cdb.c
+++ b/ext/dba/libcdb/cdb.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cdb.c,v 1.10.2.1.2.3 2007/04/14 11:15:13 helly Exp $ */
+/* $Id: cdb.c,v 1.10.2.1.2.4 2007/12/31 07:20:05 sebastian Exp $ */
/* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
@@ -189,6 +189,6 @@ int cdb_find(struct cdb *c, char *key, unsigned int len TSRMLS_DC)
/* {{{ cdb_version */
char *cdb_version()
{
- return "0.75, $Revision: 1.10.2.1.2.3 $";
+ return "0.75, $Revision: 1.10.2.1.2.4 $";
}
/* }}} */
diff --git a/ext/dba/libcdb/cdb.h b/ext/dba/libcdb/cdb.h
index 768335a9c..38af71e28 100644
--- a/ext/dba/libcdb/cdb.h
+++ b/ext/dba/libcdb/cdb.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cdb.h,v 1.7.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: cdb.h,v 1.7.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
/* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
diff --git a/ext/dba/libcdb/cdb_make.c b/ext/dba/libcdb/cdb_make.c
index 3280fe49d..c68451367 100644
--- a/ext/dba/libcdb/cdb_make.c
+++ b/ext/dba/libcdb/cdb_make.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cdb_make.c,v 1.9.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: cdb_make.c,v 1.9.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
/* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
@@ -240,5 +240,5 @@ int cdb_make_finish(struct cdb_make *c TSRMLS_DC)
/* {{{ cdb_make_version */
char *cdb_make_version()
{
- return "0.75, $Revision: 1.9.2.1.2.1 $";
+ return "0.75, $Revision: 1.9.2.1.2.2 $";
}
diff --git a/ext/dba/libcdb/cdb_make.h b/ext/dba/libcdb/cdb_make.h
index 2f2bf1105..b93028181 100644
--- a/ext/dba/libcdb/cdb_make.h
+++ b/ext/dba/libcdb/cdb_make.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cdb_make.h,v 1.7.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: cdb_make.h,v 1.7.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
/* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
diff --git a/ext/dba/libcdb/uint32.c b/ext/dba/libcdb/uint32.c
index 900840fbd..955edbdd0 100644
--- a/ext/dba/libcdb/uint32.c
+++ b/ext/dba/libcdb/uint32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: uint32.c,v 1.6.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: uint32.c,v 1.6.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
/* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
diff --git a/ext/dba/libcdb/uint32.h b/ext/dba/libcdb/uint32.h
index edf28130f..35591e49e 100644
--- a/ext/dba/libcdb/uint32.h
+++ b/ext/dba/libcdb/uint32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: uint32.h,v 1.6.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: uint32.h,v 1.6.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
/* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
diff --git a/ext/dba/libflatfile/flatfile.c b/ext/dba/libflatfile/flatfile.c
index 2ee1dc126..7d8b3ff9f 100644
--- a/ext/dba/libflatfile/flatfile.c
+++ b/ext/dba/libflatfile/flatfile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: flatfile.c,v 1.14.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: flatfile.c,v 1.14.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -307,7 +307,7 @@ datum flatfile_nextkey(flatfile *dba TSRMLS_DC) {
/* {{{ flatfile_version */
char *flatfile_version()
{
- return "1.0, $Revision: 1.14.2.1.2.1 $";
+ return "1.0, $Revision: 1.14.2.1.2.2 $";
}
/* }}} */
diff --git a/ext/dba/libflatfile/flatfile.h b/ext/dba/libflatfile/flatfile.h
index 0b8660e77..3ec25a396 100644
--- a/ext/dba/libflatfile/flatfile.h
+++ b/ext/dba/libflatfile/flatfile.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: flatfile.h,v 1.11.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: flatfile.h,v 1.11.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef PHP_LIB_FLATFILE_H
#define PHP_LIB_FLATFILE_H
diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c
index e7b9cc463..c87025314 100644
--- a/ext/dba/libinifile/inifile.c
+++ b/ext/dba/libinifile/inifile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: inifile.c,v 1.14.2.1.2.3 2007/01/01 19:40:29 iliaa Exp $ */
+/* $Id: inifile.c,v 1.14.2.1.2.4 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -43,7 +43,7 @@
/* {{{ inifile_version */
char *inifile_version()
{
- return "1.0, $Revision: 1.14.2.1.2.3 $";
+ return "1.0, $Revision: 1.14.2.1.2.4 $";
}
/* }}} */
diff --git a/ext/dba/libinifile/inifile.h b/ext/dba/libinifile/inifile.h
index 8ebbc27e9..f50806acb 100644
--- a/ext/dba/libinifile/inifile.h
+++ b/ext/dba/libinifile/inifile.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: inifile.h,v 1.5.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: inifile.h,v 1.5.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef PHP_LIB_INIFILE_H
#define PHP_LIB_INIFILE_H
diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h
index 5e8d08b87..f7fd95d41 100644
--- a/ext/dba/php_dba.h
+++ b/ext/dba/php_dba.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_dba.h,v 1.29.2.1.2.1 2007/01/01 09:35:59 sebastian Exp $ */
+/* $Id: php_dba.h,v 1.29.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef PHP_DBA_H
#define PHP_DBA_H
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c
index 3a42c4526..aeb950fec 100644
--- a/ext/dbase/dbase.c
+++ b/ext/dbase/dbase.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dbase.c,v 1.74.2.2.2.9 2007/02/25 23:17:12 tony2001 Exp $ */
+/* $Id: dbase.c,v 1.74.2.2.2.10 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dbase/dbf_head.c b/ext/dbase/dbf_head.c
index 62296bd5e..010fccf87 100644
--- a/ext/dbase/dbf_head.c
+++ b/ext/dbase/dbf_head.c
@@ -160,6 +160,9 @@ int get_dbf_field(dbhead_t *dbh, dbfield_t *dbf)
case 'D':
dbf->db_flen = 8;
break;
+ case 'L':
+ dbf->db_flen = 1;
+ break;
default:
dbf->db_flen = get_short(dbfield.dbf_flen);
break;
@@ -195,6 +198,12 @@ int put_dbf_field(dbhead_t *dbh, dbfield_t *dbf)
dbfield.dbf_flen[0] = dbf->db_flen;
dbfield.dbf_flen[1] = dbf->db_fdc;
break;
+ case 'D':
+ dbf->db_flen = 8;
+ break;
+ case 'L':
+ dbf->db_flen = 1;
+ break;
default:
put_short(dbfield.dbf_flen, dbf->db_flen);
}
diff --git a/ext/dbase/php_dbase.h b/ext/dbase/php_dbase.h
index 0fd8ef707..e3e75d234 100644
--- a/ext/dbase/php_dbase.h
+++ b/ext/dbase/php_dbase.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_dbase.h,v 1.15.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: php_dbase.h,v 1.15.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef PHP_DBASE_H
#define PHP_DBASE_H
diff --git a/ext/dom/attr.c b/ext/dom/attr.c
index 524045d74..a77c8e9ac 100644
--- a/ext/dom/attr.c
+++ b/ext/dom/attr.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: attr.c,v 1.18.2.2.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: attr.c,v 1.18.2.2.2.4 2008/02/04 15:23:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -30,6 +30,18 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_is_id, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_construct, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMAttr extends DOMNode
*
@@ -38,8 +50,8 @@
*/
zend_function_entry php_dom_attr_class_functions[] = {
- PHP_FALIAS(isId, dom_attr_is_id, NULL)
- PHP_ME(domattr, __construct, NULL, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(isId, dom_attr_is_id, arginfo_dom_attr_is_id)
+ PHP_ME(domattr, __construct, arginfo_dom_attr_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c
index 7c5684d72..d153026e3 100644
--- a/ext/dom/cdatasection.c
+++ b/ext/dom/cdatasection.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cdatasection.c,v 1.11.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: cdatasection.c,v 1.11.2.1.2.3 2008/02/04 15:23:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,13 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_cdatasection_construct, 0, 0, 1)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMCdataSection extends DOMText
*
@@ -36,7 +43,7 @@
*/
zend_function_entry php_dom_cdatasection_class_functions[] = {
- PHP_ME(domcdatasection, __construct, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(domcdatasection, __construct, arginfo_dom_cdatasection_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c
index 22f410c36..20b5a3980 100644
--- a/ext/dom/characterdata.c
+++ b/ext/dom/characterdata.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: characterdata.c,v 1.15.2.1.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: characterdata.c,v 1.15.2.1.2.4 2008/02/04 15:23:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,38 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_substring_data, 0, 0, 2)
+ ZEND_ARG_INFO(0, offset)
+ ZEND_ARG_INFO(0, count)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_append_data, 0, 0, 1)
+ ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_insert_data, 0, 0, 2)
+ ZEND_ARG_INFO(0, offset)
+ ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_delete_data, 0, 0, 2)
+ ZEND_ARG_INFO(0, offset)
+ ZEND_ARG_INFO(0, count)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_replace_data, 0, 0, 3)
+ ZEND_ARG_INFO(0, offset)
+ ZEND_ARG_INFO(0, count)
+ ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMCharacterData extends DOMNode
*
@@ -36,11 +68,11 @@
*/
zend_function_entry php_dom_characterdata_class_functions[] = {
- PHP_FALIAS(substringData, dom_characterdata_substring_data, NULL)
- PHP_FALIAS(appendData, dom_characterdata_append_data, NULL)
- PHP_FALIAS(insertData, dom_characterdata_insert_data, NULL)
- PHP_FALIAS(deleteData, dom_characterdata_delete_data, NULL)
- PHP_FALIAS(replaceData, dom_characterdata_replace_data, NULL)
+ PHP_FALIAS(substringData, dom_characterdata_substring_data, arginfo_dom_characterdata_substring_data)
+ PHP_FALIAS(appendData, dom_characterdata_append_data, arginfo_dom_characterdata_append_data)
+ PHP_FALIAS(insertData, dom_characterdata_insert_data, arginfo_dom_characterdata_insert_data)
+ PHP_FALIAS(deleteData, dom_characterdata_delete_data, arginfo_dom_characterdata_delete_data)
+ PHP_FALIAS(replaceData, dom_characterdata_replace_data, arginfo_dom_characterdata_replace_data)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/comment.c b/ext/dom/comment.c
index a52fd094a..94d720352 100644
--- a/ext/dom/comment.c
+++ b/ext/dom/comment.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: comment.c,v 1.11.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: comment.c,v 1.11.2.1.2.3 2008/02/04 15:23:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,13 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_comment_construct, 0, 0, 0)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMComment extends DOMCharacterData
*
@@ -36,7 +43,7 @@
*/
zend_function_entry php_dom_comment_class_functions[] = {
- PHP_ME(domcomment, __construct, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(domcomment, __construct, arginfo_dom_comment_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 3c91c8885..c5d504d2f 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: document.c,v 1.68.2.3.2.5 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.8 2008/02/04 15:23:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -41,6 +41,182 @@ struct _idsIterator {
#define DOM_LOAD_STRING 0
#define DOM_LOAD_FILE 1
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_element, 0, 0, 1)
+ ZEND_ARG_INFO(0, tagName)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_document_fragment, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_text_node, 0, 0, 1)
+ ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_comment, 0, 0, 1)
+ ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_cdatasection, 0, 0, 1)
+ ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_processing_instruction, 0, 0, 2)
+ ZEND_ARG_INFO(0, target)
+ ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_attribute, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_entity_reference, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_get_elements_by_tag_name, 0, 0, 1)
+ ZEND_ARG_INFO(0, tagName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_import_node, 0, 0, 2)
+ ZEND_ARG_OBJ_INFO(0, importedNode, DOMNode, 0)
+ ZEND_ARG_INFO(0, deep)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_element_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, qualifiedName)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_attribute_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, qualifiedName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_get_elements_by_tag_name_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_get_element_by_id, 0, 0, 1)
+ ZEND_ARG_INFO(0, elementId)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_adopt_node, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, source, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_normalize_document, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_rename_node, 0, 0, 3)
+ ZEND_ARG_OBJ_INFO(0, node, DOMNode, 0)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, qualifiedName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_load, 0, 0, 1)
+ ZEND_ARG_INFO(0, source)
+ ZEND_ARG_INFO(0, options)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_save, 0, 0, 1)
+ ZEND_ARG_INFO(0, file)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadxml, 0, 0, 1)
+ ZEND_ARG_INFO(0, source)
+ ZEND_ARG_INFO(0, options)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savexml, 0, 0, 0)
+ ZEND_ARG_OBJ_INFO(0, node, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_construct, 0, 0, 0)
+ ZEND_ARG_INFO(0, version)
+ ZEND_ARG_INFO(0, encoding)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_validate, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_xinclude, 0, 0, 0)
+ ZEND_ARG_INFO(0, options)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtml, 0, 0, 1)
+ ZEND_ARG_INFO(0, source)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtmlfile, 0, 0, 1)
+ ZEND_ARG_INFO(0, source)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savehtml, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savehtmlfile, 0, 0, 1)
+ ZEND_ARG_INFO(0, file)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_schema_validate_file, 0, 0, 1)
+ ZEND_ARG_INFO(0, filename)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_schema_validate_xml, 0, 0, 1)
+ ZEND_ARG_INFO(0, source)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_relaxNG_validate_file, 0, 0, 1)
+ ZEND_ARG_INFO(0, filename)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_relaxNG_validate_xml, 0, 0, 1)
+ ZEND_ARG_INFO(0, source)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_registernodeclass, 0, 0, 2)
+ ZEND_ARG_INFO(0, baseClass)
+ ZEND_ARG_INFO(0, extendedClass)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMDocument extends DOMNode
*
@@ -49,43 +225,43 @@ struct _idsIterator {
*/
zend_function_entry php_dom_document_class_functions[] = {
- PHP_FALIAS(createElement, dom_document_create_element, NULL)
- PHP_FALIAS(createDocumentFragment, dom_document_create_document_fragment, NULL)
- PHP_FALIAS(createTextNode, dom_document_create_text_node, NULL)
- PHP_FALIAS(createComment, dom_document_create_comment, NULL)
- PHP_FALIAS(createCDATASection, dom_document_create_cdatasection, NULL)
- PHP_FALIAS(createProcessingInstruction, dom_document_create_processing_instruction, NULL)
- PHP_FALIAS(createAttribute, dom_document_create_attribute, NULL)
- PHP_FALIAS(createEntityReference, dom_document_create_entity_reference, NULL)
- PHP_FALIAS(getElementsByTagName, dom_document_get_elements_by_tag_name, NULL)
- PHP_FALIAS(importNode, dom_document_import_node, NULL)
- PHP_FALIAS(createElementNS, dom_document_create_element_ns, NULL)
- PHP_FALIAS(createAttributeNS, dom_document_create_attribute_ns, NULL)
- PHP_FALIAS(getElementsByTagNameNS, dom_document_get_elements_by_tag_name_ns, NULL)
- PHP_FALIAS(getElementById, dom_document_get_element_by_id, NULL)
- PHP_FALIAS(adoptNode, dom_document_adopt_node, NULL)
- PHP_FALIAS(normalizeDocument, dom_document_normalize_document, NULL)
- PHP_FALIAS(renameNode, dom_document_rename_node, NULL)
- PHP_ME(domdocument, load, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
- PHP_FALIAS(save, dom_document_save, NULL)
- PHP_ME(domdocument, loadXML, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
- PHP_FALIAS(saveXML, dom_document_savexml, NULL)
- PHP_ME(domdocument, __construct, NULL, ZEND_ACC_PUBLIC)
- PHP_FALIAS(validate, dom_document_validate, NULL)
- PHP_FALIAS(xinclude, dom_document_xinclude, NULL)
+ PHP_FALIAS(createElement, dom_document_create_element, arginfo_dom_document_create_element)
+ PHP_FALIAS(createDocumentFragment, dom_document_create_document_fragment, arginfo_dom_document_create_document_fragment)
+ PHP_FALIAS(createTextNode, dom_document_create_text_node, arginfo_dom_document_create_text_node)
+ PHP_FALIAS(createComment, dom_document_create_comment, arginfo_dom_document_create_comment)
+ PHP_FALIAS(createCDATASection, dom_document_create_cdatasection, arginfo_dom_document_create_cdatasection)
+ PHP_FALIAS(createProcessingInstruction, dom_document_create_processing_instruction, arginfo_dom_document_create_processing_instruction)
+ PHP_FALIAS(createAttribute, dom_document_create_attribute, arginfo_dom_document_create_attribute)
+ PHP_FALIAS(createEntityReference, dom_document_create_entity_reference, arginfo_dom_document_create_entity_reference)
+ PHP_FALIAS(getElementsByTagName, dom_document_get_elements_by_tag_name, arginfo_dom_document_get_elements_by_tag_name)
+ PHP_FALIAS(importNode, dom_document_import_node, arginfo_dom_document_import_node)
+ PHP_FALIAS(createElementNS, dom_document_create_element_ns, arginfo_dom_document_create_element_ns)
+ PHP_FALIAS(createAttributeNS, dom_document_create_attribute_ns, arginfo_dom_document_create_attribute_ns)
+ PHP_FALIAS(getElementsByTagNameNS, dom_document_get_elements_by_tag_name_ns, arginfo_dom_document_get_elements_by_tag_name_ns)
+ PHP_FALIAS(getElementById, dom_document_get_element_by_id, arginfo_dom_document_get_element_by_id)
+ PHP_FALIAS(adoptNode, dom_document_adopt_node, arginfo_dom_document_adopt_node)
+ PHP_FALIAS(normalizeDocument, dom_document_normalize_document, arginfo_dom_document_normalize_document)
+ PHP_FALIAS(renameNode, dom_document_rename_node, arginfo_dom_document_rename_node)
+ PHP_ME(domdocument, load, arginfo_dom_document_load, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_FALIAS(save, dom_document_save, arginfo_dom_document_save)
+ PHP_ME(domdocument, loadXML, arginfo_dom_document_loadxml, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_FALIAS(saveXML, dom_document_savexml, arginfo_dom_document_savexml)
+ PHP_ME(domdocument, __construct, arginfo_dom_document_construct, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(validate, dom_document_validate, arginfo_dom_document_validate)
+ PHP_FALIAS(xinclude, dom_document_xinclude, arginfo_dom_document_xinclude)
#if defined(LIBXML_HTML_ENABLED)
- PHP_ME(domdocument, loadHTML, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
- PHP_ME(domdocument, loadHTMLFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
- PHP_FALIAS(saveHTML, dom_document_save_html, NULL)
- PHP_FALIAS(saveHTMLFile, dom_document_save_html_file, NULL)
+ PHP_ME(domdocument, loadHTML, arginfo_dom_document_loadhtml, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_ME(domdocument, loadHTMLFile, arginfo_dom_document_loadhtmlfile, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_FALIAS(saveHTML, dom_document_save_html, arginfo_dom_document_savehtml)
+ PHP_FALIAS(saveHTMLFile, dom_document_save_html_file, arginfo_dom_document_savehtmlfile)
#endif /* defined(LIBXML_HTML_ENABLED) */
#if defined(LIBXML_SCHEMAS_ENABLED)
- PHP_FALIAS(schemaValidate, dom_document_schema_validate_file, NULL)
- PHP_FALIAS(schemaValidateSource, dom_document_schema_validate_xml, NULL)
- PHP_FALIAS(relaxNGValidate, dom_document_relaxNG_validate_file, NULL)
- PHP_FALIAS(relaxNGValidateSource, dom_document_relaxNG_validate_xml, NULL)
+ PHP_FALIAS(schemaValidate, dom_document_schema_validate_file, arginfo_dom_document_schema_validate_file)
+ PHP_FALIAS(schemaValidateSource, dom_document_schema_validate_xml, arginfo_dom_document_schema_validate_xml)
+ PHP_FALIAS(relaxNGValidate, dom_document_relaxNG_validate_file, arginfo_dom_document_relaxNG_validate_file)
+ PHP_FALIAS(relaxNGValidateSource, dom_document_relaxNG_validate_xml, arginfo_dom_document_relaxNG_validate_xml)
#endif
- PHP_ME(domdocument, registerNodeClass, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(domdocument, registerNodeClass, arginfo_dom_document_registernodeclass, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
@@ -1737,6 +1913,10 @@ static void php_dom_remove_xinclude_nodes(xmlNodePtr cur TSRMLS_DC) {
/* XML_XINCLUDE_END node will be a sibling of XML_XINCLUDE_START */
while(cur && cur->type != XML_XINCLUDE_END) {
+ /* remove xinclude processing nodes from recursive xincludes */
+ if (cur->type == XML_ELEMENT_NODE) {
+ php_dom_remove_xinclude_nodes(cur->children TSRMLS_CC);
+ }
cur = cur->next;
}
diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c
index 3f5c3cabb..feaa8b52a 100644
--- a/ext/dom/documentfragment.c
+++ b/ext/dom/documentfragment.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: documentfragment.c,v 1.15.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: documentfragment.c,v 1.15.2.1.2.3 2008/02/04 15:23:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,17 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_documentfragement_construct, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_documentfragement_appendXML, 0, 0, 1)
+ ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMDocumentFragment extends DOMNode
*
@@ -36,8 +47,8 @@
*/
zend_function_entry php_dom_documentfragment_class_functions[] = {
- PHP_ME(domdocumentfragment, __construct, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(domdocumentfragment, appendXML, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(domdocumentfragment, __construct, arginfo_dom_documentfragement_construct, ZEND_ACC_PUBLIC)
+ PHP_ME(domdocumentfragment, appendXML, arginfo_dom_documentfragement_appendXML, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c
index 68b5f69f0..db4fa4833 100644
--- a/ext/dom/documenttype.c
+++ b/ext/dom/documenttype.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: documenttype.c,v 1.15.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: documenttype.c,v 1.15.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/dom_ce.h b/ext/dom/dom_ce.h
index a05dc777c..14c832863 100644
--- a/ext/dom/dom_ce.h
+++ b/ext/dom/dom_ce.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dom_ce.h,v 1.8.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: dom_ce.h,v 1.8.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef DOM_CE_H
#define DOM_CE_H
diff --git a/ext/dom/dom_fe.h b/ext/dom/dom_fe.h
index 9a8a930c7..df791c8a5 100644
--- a/ext/dom/dom_fe.h
+++ b/ext/dom/dom_fe.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dom_fe.h,v 1.14.2.1.2.4 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: dom_fe.h,v 1.14.2.1.2.5 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef DOM_FE_H
#define DOM_FE_H
diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c
index 1bd90a4f5..ef660cf4f 100644
--- a/ext/dom/dom_iterators.c
+++ b/ext/dom/dom_iterators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dom_iterators.c,v 1.9.2.3.2.5 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: dom_iterators.c,v 1.9.2.3.2.6 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/dom_properties.h b/ext/dom/dom_properties.h
index 3eed63a17..27ad5c1bd 100644
--- a/ext/dom/dom_properties.h
+++ b/ext/dom/dom_properties.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dom_properties.h,v 1.7.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: dom_properties.h,v 1.7.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifndef DOM_PROPERTIES_H
#define DOM_PROPERTIES_H
diff --git a/ext/dom/domconfiguration.c b/ext/dom/domconfiguration.c
index 27e1dfb3f..21e14dd4b 100644
--- a/ext/dom/domconfiguration.c
+++ b/ext/dom/domconfiguration.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domconfiguration.c,v 1.5.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domconfiguration.c,v 1.5.2.1.2.3 2008/02/04 15:23:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,25 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_set_parameter, 0, 0, 2)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_get_parameter, 0, 0, 0)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_can_set_parameter, 0, 0, 0)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class domdomconfiguration
*
@@ -36,9 +55,9 @@
*/
zend_function_entry php_dom_domconfiguration_class_functions[] = {
- PHP_FALIAS(setParameter, dom_domconfiguration_set_parameter, NULL)
- PHP_FALIAS(getParameter, dom_domconfiguration_get_parameter, NULL)
- PHP_FALIAS(canSetParameter, dom_domconfiguration_can_set_parameter, NULL)
+ PHP_FALIAS(setParameter, dom_domconfiguration_set_parameter, arginfo_dom_configuration_set_parameter)
+ PHP_FALIAS(getParameter, dom_domconfiguration_get_parameter, arginfo_dom_configuration_get_parameter)
+ PHP_FALIAS(canSetParameter, dom_domconfiguration_can_set_parameter, arginfo_dom_configuration_can_set_parameter)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/domerror.c b/ext/dom/domerror.c
index 3e5d8af34..4fae3eeb7 100644
--- a/ext/dom/domerror.c
+++ b/ext/dom/domerror.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domerror.c,v 1.6.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domerror.c,v 1.6.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domerrorhandler.c b/ext/dom/domerrorhandler.c
index 9a353cebd..493aa38f9 100644
--- a/ext/dom/domerrorhandler.c
+++ b/ext/dom/domerrorhandler.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domerrorhandler.c,v 1.5.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domerrorhandler.c,v 1.5.2.1.2.3 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,13 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_domerrorhandler_handle_error, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, error, DOMError, 0)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class domerrorhandler
*
@@ -36,7 +43,7 @@
*/
zend_function_entry php_dom_domerrorhandler_class_functions[] = {
- PHP_FALIAS(handleError, dom_domerrorhandler_handle_error, NULL)
+ PHP_FALIAS(handleError, dom_domerrorhandler_handle_error, arginfo_dom_domerrorhandler_handle_error)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c
index b55bd67c9..0bd87ece2 100644
--- a/ext/dom/domexception.c
+++ b/ext/dom/domexception.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domexception.c,v 1.11.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domexception.c,v 1.11.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c
index 76d7f00b3..890a5abab 100644
--- a/ext/dom/domimplementation.c
+++ b/ext/dom/domimplementation.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementation.c,v 1.15.2.2.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domimplementation.c,v 1.15.2.2.2.4 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,6 +27,32 @@
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementation_get_feature, 0, 0, 2)
+ ZEND_ARG_INFO(0, feature)
+ ZEND_ARG_INFO(0, version)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementation_has_feature, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementation_create_documenttype, 0, 0, 3)
+ ZEND_ARG_INFO(0, qualifiedName)
+ ZEND_ARG_INFO(0, publicId)
+ ZEND_ARG_INFO(0, systemId)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementation_create_document, 0, 0, 3)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, qualifiedName)
+ ZEND_ARG_OBJ_INFO(0, docType, DOMDocumentType, 0)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMImplementation
*
@@ -35,10 +61,10 @@
*/
zend_function_entry php_dom_domimplementation_class_functions[] = {
- PHP_ME(domimplementation, getFeature, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
- PHP_ME(domimplementation, hasFeature, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
- PHP_ME(domimplementation, createDocumentType, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
- PHP_ME(domimplementation, createDocument, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_ME(domimplementation, getFeature, arginfo_dom_implementation_get_feature, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_ME(domimplementation, hasFeature, arginfo_dom_implementation_has_feature, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_ME(domimplementation, createDocumentType, arginfo_dom_implementation_create_documenttype, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_ME(domimplementation, createDocument, arginfo_dom_implementation_create_document, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/domimplementationlist.c b/ext/dom/domimplementationlist.c
index 3b0966dae..d65e2beb6 100644
--- a/ext/dom/domimplementationlist.c
+++ b/ext/dom/domimplementationlist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementationlist.c,v 1.6.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domimplementationlist.c,v 1.6.2.1.2.3 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,13 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementationlist_item, 0, 0, 1)
+ ZEND_ARG_INFO(0, index)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class domimplementationlist
*
@@ -36,7 +43,7 @@
*/
zend_function_entry php_dom_domimplementationlist_class_functions[] = {
- PHP_FALIAS(item, dom_domimplementationlist_item, NULL)
+ PHP_FALIAS(item, dom_domimplementationlist_item, arginfo_dom_implementationlist_item)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/domimplementationsource.c b/ext/dom/domimplementationsource.c
index 6553bdeef..3bc4d2b9c 100644
--- a/ext/dom/domimplementationsource.c
+++ b/ext/dom/domimplementationsource.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementationsource.c,v 1.5.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domimplementationsource.c,v 1.5.2.1.2.3 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,18 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementationsource_getdomimplementation, 0, 0, 1)
+ ZEND_ARG_INFO(0, features)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementationsource_getdomimplementations, 0, 0, 1)
+ ZEND_ARG_INFO(0, features)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class domimplementationsource
*
@@ -36,8 +48,8 @@
*/
zend_function_entry php_dom_domimplementationsource_class_functions[] = {
- PHP_FALIAS(getDomimplementation, dom_domimplementationsource_get_domimplementation, NULL)
- PHP_FALIAS(getDomimplementations, dom_domimplementationsource_get_domimplementations, NULL)
+ PHP_FALIAS(getDomimplementation, dom_domimplementationsource_get_domimplementation, arginfo_dom_implementationsource_getdomimplementation)
+ PHP_FALIAS(getDomimplementations, dom_domimplementationsource_get_domimplementations, arginfo_dom_implementationsource_getdomimplementations)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/domlocator.c b/ext/dom/domlocator.c
index 52627a1e3..fd915a9d1 100644
--- a/ext/dom/domlocator.c
+++ b/ext/dom/domlocator.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domlocator.c,v 1.6.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domlocator.c,v 1.6.2.1.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domstringlist.c b/ext/dom/domstringlist.c
index 4a720e8cd..c902bbaf9 100644
--- a/ext/dom/domstringlist.c
+++ b/ext/dom/domstringlist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domstringlist.c,v 1.6.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: domstringlist.c,v 1.6.2.1.2.3 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,13 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_stringlist_item, 0, 0, 1)
+ ZEND_ARG_INFO(0, index)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class domstringlist
*
@@ -36,7 +43,7 @@
*/
zend_function_entry php_dom_domstringlist_class_functions[] = {
- PHP_FALIAS(item, dom_domstringlist_item, NULL)
+ PHP_FALIAS(item, dom_domstringlist_item, arginfo_dom_stringlist_item)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/element.c b/ext/dom/element.c
index 4d9303f50..5f6614de7 100644
--- a/ext/dom/element.c
+++ b/ext/dom/element.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: element.c,v 1.36.2.4.2.8 2007/05/04 19:30:59 rrichards Exp $ */
+/* $Id: element.c,v 1.36.2.4.2.10 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,117 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_attribute, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_attribute, 0, 0, 2)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_remove_attribute, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_attribute_node, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_attribute_node, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, newAttr, DOMAttr, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_remove_attribute_node, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, oldAttr, DOMAttr, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_elements_by_tag_name, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_attribute_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_attribute_ns, 0, 0, 3)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, qualifiedName)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_remove_attribute_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_attribute_node_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_attribute_node_ns, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, newAttr, DOMAttr, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_elements_by_tag_name_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_has_attribute, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_has_attribute_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_id_attribute, 0, 0, 2)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_INFO(0, isId)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_id_attribute_ns, 0, 0, 3)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ ZEND_ARG_INFO(0, isId)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_id_attribute_node, 0, 0, 2)
+ ZEND_ARG_OBJ_INFO(0, attr, DOMAttr, 0)
+ ZEND_ARG_INFO(0, isId)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_construct, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_INFO(0, value)
+ ZEND_ARG_INFO(0, uri)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMElement extends DOMNode
*
@@ -36,25 +147,25 @@
*/
zend_function_entry php_dom_element_class_functions[] = {
- PHP_FALIAS(getAttribute, dom_element_get_attribute, NULL)
- PHP_FALIAS(setAttribute, dom_element_set_attribute, NULL)
- PHP_FALIAS(removeAttribute, dom_element_remove_attribute, NULL)
- PHP_FALIAS(getAttributeNode, dom_element_get_attribute_node, NULL)
- PHP_FALIAS(setAttributeNode, dom_element_set_attribute_node, NULL)
- PHP_FALIAS(removeAttributeNode, dom_element_remove_attribute_node, NULL)
- PHP_FALIAS(getElementsByTagName, dom_element_get_elements_by_tag_name, NULL)
- PHP_FALIAS(getAttributeNS, dom_element_get_attribute_ns, NULL)
- PHP_FALIAS(setAttributeNS, dom_element_set_attribute_ns, NULL)
- PHP_FALIAS(removeAttributeNS, dom_element_remove_attribute_ns, NULL)
- PHP_FALIAS(getAttributeNodeNS, dom_element_get_attribute_node_ns, NULL)
- PHP_FALIAS(setAttributeNodeNS, dom_element_set_attribute_node_ns, NULL)
- PHP_FALIAS(getElementsByTagNameNS, dom_element_get_elements_by_tag_name_ns, NULL)
- PHP_FALIAS(hasAttribute, dom_element_has_attribute, NULL)
- PHP_FALIAS(hasAttributeNS, dom_element_has_attribute_ns, NULL)
- PHP_FALIAS(setIdAttribute, dom_element_set_id_attribute, NULL)
- PHP_FALIAS(setIdAttributeNS, dom_element_set_id_attribute_ns, NULL)
- PHP_FALIAS(setIdAttributeNode, dom_element_set_id_attribute_node, NULL)
- PHP_ME(domelement, __construct, NULL, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(getAttribute, dom_element_get_attribute, arginfo_dom_element_get_attribute)
+ PHP_FALIAS(setAttribute, dom_element_set_attribute, arginfo_dom_element_set_attribute)
+ PHP_FALIAS(removeAttribute, dom_element_remove_attribute, arginfo_dom_element_remove_attribute)
+ PHP_FALIAS(getAttributeNode, dom_element_get_attribute_node, arginfo_dom_element_get_attribute_node)
+ PHP_FALIAS(setAttributeNode, dom_element_set_attribute_node, arginfo_dom_element_set_attribute_node)
+ PHP_FALIAS(removeAttributeNode, dom_element_remove_attribute_node, arginfo_dom_element_remove_attribute_node)
+ PHP_FALIAS(getElementsByTagName, dom_element_get_elements_by_tag_name, arginfo_dom_element_get_elements_by_tag_name)
+ PHP_FALIAS(getAttributeNS, dom_element_get_attribute_ns, arginfo_dom_element_get_attribute_ns)
+ PHP_FALIAS(setAttributeNS, dom_element_set_attribute_ns, arginfo_dom_element_set_attribute_ns)
+ PHP_FALIAS(removeAttributeNS, dom_element_remove_attribute_ns, arginfo_dom_element_remove_attribute_ns)
+ PHP_FALIAS(getAttributeNodeNS, dom_element_get_attribute_node_ns, arginfo_dom_element_get_attribute_node_ns)
+ PHP_FALIAS(setAttributeNodeNS, dom_element_set_attribute_node_ns, arginfo_dom_element_set_attribute_node_ns)
+ PHP_FALIAS(getElementsByTagNameNS, dom_element_get_elements_by_tag_name_ns, arginfo_dom_element_get_elements_by_tag_name_ns)
+ PHP_FALIAS(hasAttribute, dom_element_has_attribute, arginfo_dom_element_has_attribute)
+ PHP_FALIAS(hasAttributeNS, dom_element_has_attribute_ns, arginfo_dom_element_has_attribute_ns)
+ PHP_FALIAS(setIdAttribute, dom_element_set_id_attribute, arginfo_dom_element_set_id_attribute)
+ PHP_FALIAS(setIdAttributeNS, dom_element_set_id_attribute_ns, arginfo_dom_element_set_id_attribute_ns)
+ PHP_FALIAS(setIdAttributeNode, dom_element_set_id_attribute_node, arginfo_dom_element_set_id_attribute_node)
+ PHP_ME(domelement, __construct, arginfo_dom_element_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/entity.c b/ext/dom/entity.c
index b89a2286d..8781367ca 100644
--- a/ext/dom/entity.c
+++ b/ext/dom/entity.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: entity.c,v 1.9.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: entity.c,v 1.9.2.1.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c
index d15540627..740a29ebd 100644
--- a/ext/dom/entityreference.c
+++ b/ext/dom/entityreference.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: entityreference.c,v 1.12.2.1.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: entityreference.c,v 1.12.2.1.2.4 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,13 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_entityreference_construct, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMEntityReference extends DOMNode
*
@@ -36,7 +43,7 @@
*/
zend_function_entry php_dom_entityreference_class_functions[] = {
- PHP_ME(domentityreference, __construct, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(domentityreference, __construct, arginfo_dom_entityreference_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c
index 1e4212106..75885e101 100644
--- a/ext/dom/namednodemap.c
+++ b/ext/dom/namednodemap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: namednodemap.c,v 1.15.2.2.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: namednodemap.c,v 1.15.2.2.2.3 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,45 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_get_named_item, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_set_named_item, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, arg, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_remove_named_item, 0, 0, 0)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_item, 0, 0, 0)
+ ZEND_ARG_INFO(0, index)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_get_named_item_ns, 0, 0, 0)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_set_named_item_ns, 0, 0, 0)
+ ZEND_ARG_OBJ_INFO(0, arg, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_remove_named_item_ns, 0, 0, 0)
+ ZEND_ARG_INFO(0, namespaceURI)
+ ZEND_ARG_INFO(0, localName)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMNamedNodeMap
*
@@ -36,13 +75,13 @@
*/
zend_function_entry php_dom_namednodemap_class_functions[] = {
- PHP_FALIAS(getNamedItem, dom_namednodemap_get_named_item, NULL)
- PHP_FALIAS(setNamedItem, dom_namednodemap_set_named_item, NULL)
- PHP_FALIAS(removeNamedItem, dom_namednodemap_remove_named_item, NULL)
- PHP_FALIAS(item, dom_namednodemap_item, NULL)
- PHP_FALIAS(getNamedItemNS, dom_namednodemap_get_named_item_ns, NULL)
- PHP_FALIAS(setNamedItemNS, dom_namednodemap_set_named_item_ns, NULL)
- PHP_FALIAS(removeNamedItemNS, dom_namednodemap_remove_named_item_ns, NULL)
+ PHP_FALIAS(getNamedItem, dom_namednodemap_get_named_item, arginfo_dom_namednodemap_get_named_item)
+ PHP_FALIAS(setNamedItem, dom_namednodemap_set_named_item, arginfo_dom_namednodemap_set_named_item)
+ PHP_FALIAS(removeNamedItem, dom_namednodemap_remove_named_item, arginfo_dom_namednodemap_remove_named_item)
+ PHP_FALIAS(item, dom_namednodemap_item, arginfo_dom_namednodemap_item)
+ PHP_FALIAS(getNamedItemNS, dom_namednodemap_get_named_item_ns, arginfo_dom_namednodemap_get_named_item_ns)
+ PHP_FALIAS(setNamedItemNS, dom_namednodemap_set_named_item_ns, arginfo_dom_namednodemap_set_named_item_ns)
+ PHP_FALIAS(removeNamedItemNS, dom_namednodemap_remove_named_item_ns, arginfo_dom_namednodemap_remove_named_item_ns)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/namelist.c b/ext/dom/namelist.c
index 43edb9b8c..93b4778ec 100644
--- a/ext/dom/namelist.c
+++ b/ext/dom/namelist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: namelist.c,v 1.7.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: namelist.c,v 1.7.2.1.2.3 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,18 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namelist_get_name, 0, 0, 1)
+ ZEND_ARG_INFO(0, index)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namelist_get_namespace_uri, 0, 0, 1)
+ ZEND_ARG_INFO(0, index)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMNameList
*
@@ -36,8 +48,8 @@
*/
zend_function_entry php_dom_namelist_class_functions[] = {
- PHP_FALIAS(getName, dom_namelist_get_name, NULL)
- PHP_FALIAS(getNamespaceURI, dom_namelist_get_namespace_uri, NULL)
+ PHP_FALIAS(getName, dom_namelist_get_name, arginfo_dom_namelist_get_name)
+ PHP_FALIAS(getNamespaceURI, dom_namelist_get_namespace_uri, arginfo_dom_namelist_get_namespace_uri)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/node.c b/ext/dom/node.c
index ce04c182f..d02f20a14 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: node.c,v 1.37.2.3.2.8 2007/05/04 19:30:59 rrichards Exp $ */
+/* $Id: node.c,v 1.37.2.3.2.11 2008/01/30 06:48:20 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,6 +27,122 @@
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_insert_before, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
+ ZEND_ARG_OBJ_INFO(0, refChild, DOMNode, 1)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_replace_child, 0, 0, 2)
+ ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
+ ZEND_ARG_OBJ_INFO(0, oldChild, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_remove_child, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, oldChild, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_append_child, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_has_child_nodes, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_clone_node, 0, 0, 1)
+ ZEND_ARG_INFO(0, deep)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_normalize, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_is_supported, 0, 0, 2)
+ ZEND_ARG_INFO(0, feature)
+ ZEND_ARG_INFO(0, version)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_has_attributes, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_compare_document_position, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, other, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_is_same_node, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, other, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_lookup_prefix, 0, 0, 1)
+ ZEND_ARG_INFO(0, namespaceURI)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_is_default_namespace, 0, 0, 1)
+ ZEND_ARG_INFO(0, namespaceURI)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_lookup_namespace_uri, 0, 0, 1)
+ ZEND_ARG_INFO(0, prefix)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_is_equal_node, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, arg, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_get_feature, 0, 0, 2)
+ ZEND_ARG_INFO(0, feature)
+ ZEND_ARG_INFO(0, version)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_set_user_data, 0, 0, 3)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_OBJ_INFO(0, data, DOMUserData, 0)
+ ZEND_ARG_INFO(0, handler)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_get_user_data, 0, 0, 1)
+ ZEND_ARG_INFO(0, key)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_getNodePath, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_C14N, 0, 0, 0)
+ ZEND_ARG_INFO(0, exclusive)
+ ZEND_ARG_INFO(0, with_comments)
+ ZEND_ARG_ARRAY_INFO(0, xpath, 1)
+ ZEND_ARG_ARRAY_INFO(0, ns_prefixes, 1)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_C14NFile, 0, 0, 1)
+ ZEND_ARG_INFO(0, uri)
+ ZEND_ARG_INFO(0, exclusive)
+ ZEND_ARG_INFO(0, with_comments)
+ ZEND_ARG_ARRAY_INFO(0, xpath, 1)
+ ZEND_ARG_ARRAY_INFO(0, ns_prefixes, 1)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMNode
*
@@ -35,27 +151,27 @@
*/
zend_function_entry php_dom_node_class_functions[] = {
- PHP_FALIAS(insertBefore, dom_node_insert_before, NULL)
- PHP_FALIAS(replaceChild, dom_node_replace_child, NULL)
- PHP_FALIAS(removeChild, dom_node_remove_child, NULL)
- PHP_FALIAS(appendChild, dom_node_append_child, NULL)
- PHP_FALIAS(hasChildNodes, dom_node_has_child_nodes, NULL)
- PHP_FALIAS(cloneNode, dom_node_clone_node, NULL)
- PHP_FALIAS(normalize, dom_node_normalize, NULL)
- PHP_FALIAS(isSupported, dom_node_is_supported, NULL)
- PHP_FALIAS(hasAttributes, dom_node_has_attributes, NULL)
- PHP_FALIAS(compareDocumentPosition, dom_node_compare_document_position, NULL)
- PHP_FALIAS(isSameNode, dom_node_is_same_node, NULL)
- PHP_FALIAS(lookupPrefix, dom_node_lookup_prefix, NULL)
- PHP_FALIAS(isDefaultNamespace, dom_node_is_default_namespace, NULL)
- PHP_FALIAS(lookupNamespaceUri, dom_node_lookup_namespace_uri, NULL)
- PHP_FALIAS(isEqualNode, dom_node_is_equal_node, NULL)
- PHP_FALIAS(getFeature, dom_node_get_feature, NULL)
- PHP_FALIAS(setUserData, dom_node_set_user_data, NULL)
- PHP_FALIAS(getUserData, dom_node_get_user_data, NULL)
- PHP_ME(domnode, getNodePath, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(domnode, C14N, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(domnode, C14NFile, NULL, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(insertBefore, dom_node_insert_before, arginfo_dom_node_insert_before)
+ PHP_FALIAS(replaceChild, dom_node_replace_child, arginfo_dom_node_replace_child)
+ PHP_FALIAS(removeChild, dom_node_remove_child, arginfo_dom_node_remove_child)
+ PHP_FALIAS(appendChild, dom_node_append_child, arginfo_dom_node_append_child)
+ PHP_FALIAS(hasChildNodes, dom_node_has_child_nodes, arginfo_dom_node_has_child_nodes)
+ PHP_FALIAS(cloneNode, dom_node_clone_node, arginfo_dom_node_clone_node)
+ PHP_FALIAS(normalize, dom_node_normalize, arginfo_dom_node_normalize)
+ PHP_FALIAS(isSupported, dom_node_is_supported, arginfo_dom_node_is_supported)
+ PHP_FALIAS(hasAttributes, dom_node_has_attributes, arginfo_dom_node_has_attributes)
+ PHP_FALIAS(compareDocumentPosition, dom_node_compare_document_position, arginfo_dom_node_compare_document_position)
+ PHP_FALIAS(isSameNode, dom_node_is_same_node, arginfo_dom_node_is_same_node)
+ PHP_FALIAS(lookupPrefix, dom_node_lookup_prefix, arginfo_dom_node_lookup_prefix)
+ PHP_FALIAS(isDefaultNamespace, dom_node_is_default_namespace, arginfo_dom_node_is_default_namespace)
+ PHP_FALIAS(lookupNamespaceUri, dom_node_lookup_namespace_uri, arginfo_dom_node_lookup_namespace_uri)
+ PHP_FALIAS(isEqualNode, dom_node_is_equal_node, arginfo_dom_node_is_equal_node)
+ PHP_FALIAS(getFeature, dom_node_get_feature, arginfo_dom_node_get_feature)
+ PHP_FALIAS(setUserData, dom_node_set_user_data, arginfo_dom_node_set_user_data)
+ PHP_FALIAS(getUserData, dom_node_get_user_data, arginfo_dom_node_get_user_data)
+ PHP_ME(domnode, getNodePath, arginfo_dom_node_getNodePath, ZEND_ACC_PUBLIC)
+ PHP_ME(domnode, C14N, arginfo_dom_node_C14N, ZEND_ACC_PUBLIC)
+ PHP_ME(domnode, C14NFile, arginfo_dom_node_C14NFile, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c
index c496a7865..fbd6bfd1c 100644
--- a/ext/dom/nodelist.c
+++ b/ext/dom/nodelist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: nodelist.c,v 1.17.2.2.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: nodelist.c,v 1.17.2.2.2.4 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,13 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_nodelist_item, 0, 0, 1)
+ ZEND_ARG_INFO(0, index)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMNodeList
*
@@ -36,7 +43,7 @@
*/
zend_function_entry php_dom_nodelist_class_functions[] = {
- PHP_FALIAS(item, dom_nodelist_item, NULL)
+ PHP_FALIAS(item, dom_nodelist_item, arginfo_dom_nodelist_item)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/notation.c b/ext/dom/notation.c
index baf7cccb6..5009bfbe4 100644
--- a/ext/dom/notation.c
+++ b/ext/dom/notation.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: notation.c,v 1.9.2.2.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: notation.c,v 1.9.2.2.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index e84185e8e..f994fc08f 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_dom.c,v 1.73.2.12.2.12 2007/08/30 16:32:34 rrichards Exp $ */
+/* $Id: php_dom.c,v 1.73.2.12.2.13 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h
index d801f4877..6f82067ad 100644
--- a/ext/dom/php_dom.h
+++ b/ext/dom/php_dom.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_dom.h,v 1.28.2.1.2.4 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: php_dom.h,v 1.28.2.1.2.5 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef PHP_DOM_H
#define PHP_DOM_H
diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c
index 291a7e280..cbfb29861 100644
--- a/ext/dom/processinginstruction.c
+++ b/ext/dom/processinginstruction.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: processinginstruction.c,v 1.17.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: processinginstruction.c,v 1.17.2.1.2.3 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,14 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_processinginstruction_construct, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMProcessingInstruction extends DOMNode
*
@@ -36,7 +44,7 @@
*/
zend_function_entry php_dom_processinginstruction_class_functions[] = {
- PHP_ME(domprocessinginstruction, __construct, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(domprocessinginstruction, __construct, arginfo_dom_processinginstruction_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/string_extend.c b/ext/dom/string_extend.c
index 0a3db5367..60a522f1b 100644
--- a/ext/dom/string_extend.c
+++ b/ext/dom/string_extend.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string_extend.c,v 1.5.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: string_extend.c,v 1.5.2.1.2.3 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,18 @@
#include "php_dom.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_string_extend_find_offset16, 0, 0, 1)
+ ZEND_ARG_INFO(0, offset32)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_string_extend_find_offset32, 0, 0, 1)
+ ZEND_ARG_INFO(0, offset16)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class domstringextend
*
@@ -36,8 +48,8 @@
*/
zend_function_entry php_dom_string_extend_class_functions[] = {
- PHP_FALIAS(findOffset16, dom_string_extend_find_offset16, NULL)
- PHP_FALIAS(findOffset32, dom_string_extend_find_offset32, NULL)
+ PHP_FALIAS(findOffset16, dom_string_extend_find_offset16, arginfo_dom_string_extend_find_offset16)
+ PHP_FALIAS(findOffset32, dom_string_extend_find_offset32, arginfo_dom_string_extend_find_offset32)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/tests/bug36756.phpt b/ext/dom/tests/bug36756.phpt
index af7488d3f..4e47b86e4 100644
--- a/ext/dom/tests/bug36756.phpt
+++ b/ext/dom/tests/bug36756.phpt
@@ -31,5 +31,5 @@ child
Warning: Couldn't fetch DOMElement. Node no longer exists in %sbug36756.php on line %d
-Notice: Undefined property: DOMElement::$nodeType in %sbug36756.php on line %d
+Notice: Undefined property: DOMElement::$nodeType in %sbug36756.php on line %d
nodeType:
diff --git a/ext/dom/tests/bug38474.phpt b/ext/dom/tests/bug38474.phpt
index 7febd22d3..5c1c1abd1 100644
--- a/ext/dom/tests/bug38474.phpt
+++ b/ext/dom/tests/bug38474.phpt
@@ -1,7 +1,12 @@
--TEST--
Bug #38474 (getAttribute select attribute by order, even when prefixed) (OK to fail with libxml2 < 2.6.2x)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+if (version_compare(LIBXML_DOTTED_VERSION, "2.6.20", "<")) {
+ print "skip libxml version " . LIBXML_DOTTED_VERSION;
+}
+?>
--FILE--
<?php
$xml = '<node xmlns:pre="http://foo.com/tr/pre"
diff --git a/ext/dom/tests/bug43364.phpt b/ext/dom/tests/bug43364.phpt
new file mode 100644
index 000000000..0df581b7a
--- /dev/null
+++ b/ext/dom/tests/bug43364.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Bug #43364 (recursive xincludes don't remove internal xml nodes properly)
+--FILE--
+<?php
+function loopElements($nodes)
+{
+ $count = 0;
+ foreach($nodes as $node) {
+ if($node instanceof DOMElement) {
+ $count++;
+ if($node->childNodes->length > 0) {
+ $count += loopElements($node->childNodes);
+ }
+ }
+ }
+ return $count;
+}
+
+$xml = <<<DOC
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:xi="http://www.w3.org/2001/XInclude">
+ <a>
+ <a_child1>ac1</a_child1>
+ <a_child2>ac2</a_child2>
+ </a>
+ <b><xi:include xpointer="xpointer(/root/a)" /></b>
+ <c><xi:include xpointer="xpointer(/root/b)" /></c>
+</root>
+DOC;
+
+$doc = new DomDocument();
+$doc->loadXml($xml);
+$doc->xinclude();
+
+$count = loopElements(array($doc->documentElement));
+
+var_dump($count);
+?>
+--EXPECT--
+int(13)
diff --git a/ext/dom/text.c b/ext/dom/text.c
index 6cc47bdda..82f871d4e 100644
--- a/ext/dom/text.c
+++ b/ext/dom/text.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: text.c,v 1.23.2.1.2.4 2007/05/14 11:52:35 rrichards Exp $ */
+/* $Id: text.c,v 1.23.2.1.2.6 2008/02/04 15:23:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,6 +28,27 @@
#include "php_dom.h"
#include "dom_ce.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_text_split_text, 0, 0, 1)
+ ZEND_ARG_INFO(0, offset)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_text_is_whitespace_in_element_content, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_text_replace_whole_text, 0, 0, 1)
+ ZEND_ARG_INFO(0, content)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_text_construct, 0, 0, 0)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class DOMText extends DOMCharacterData
*
@@ -36,11 +57,11 @@
*/
zend_function_entry php_dom_text_class_functions[] = {
- PHP_FALIAS(splitText, dom_text_split_text, NULL)
- PHP_FALIAS(isWhitespaceInElementContent, dom_text_is_whitespace_in_element_content, NULL)
- PHP_FALIAS(isElementContentWhitespace, dom_text_is_whitespace_in_element_content, NULL)
- PHP_FALIAS(replaceWholeText, dom_text_replace_whole_text, NULL)
- PHP_ME(domtext, __construct, NULL, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(splitText, dom_text_split_text, arginfo_dom_text_split_text)
+ PHP_FALIAS(isWhitespaceInElementContent, dom_text_is_whitespace_in_element_content, arginfo_dom_text_is_whitespace_in_element_content)
+ PHP_FALIAS(isElementContentWhitespace, dom_text_is_whitespace_in_element_content, arginfo_dom_text_is_whitespace_in_element_content)
+ PHP_FALIAS(replaceWholeText, dom_text_replace_whole_text, arginfo_dom_text_replace_whole_text)
+ PHP_ME(domtext, __construct, arginfo_dom_text_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
diff --git a/ext/dom/typeinfo.c b/ext/dom/typeinfo.c
index ae36fcf3c..0dd169329 100644
--- a/ext/dom/typeinfo.c
+++ b/ext/dom/typeinfo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: typeinfo.c,v 1.6.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: typeinfo.c,v 1.6.2.1.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/userdatahandler.c b/ext/dom/userdatahandler.c
index 797f206a8..3a43fd6cb 100644
--- a/ext/dom/userdatahandler.c
+++ b/ext/dom/userdatahandler.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: userdatahandler.c,v 1.6.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: userdatahandler.c,v 1.6.2.1.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h
index fbdf64439..a96861697 100644
--- a/ext/dom/xml_common.h
+++ b/ext/dom/xml_common.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml_common.h,v 1.23.2.1.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: xml_common.h,v 1.23.2.1.2.3 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef PHP_XML_COMMON_H
#define PHP_XML_COMMON_H
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c
index e953de198..9910e4e25 100644
--- a/ext/dom/xpath.c
+++ b/ext/dom/xpath.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xpath.c,v 1.26.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: xpath.c,v 1.26.2.1.2.3 2008/01/29 15:55:29 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -36,11 +36,36 @@
#if defined(LIBXML_XPATH_ENABLED)
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_construct, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_register_ns, 0, 0, 2)
+ ZEND_ARG_INFO(0, prefix)
+ ZEND_ARG_INFO(0, uri)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_query, 0, 0, 1)
+ ZEND_ARG_INFO(0, expr)
+ ZEND_ARG_OBJ_INFO(0, context, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_evaluate, 0, 0, 1)
+ ZEND_ARG_INFO(0, expr)
+ ZEND_ARG_OBJ_INFO(0, context, DOMNode, 0)
+ZEND_END_ARG_INFO();
+/* }}} */
+
zend_function_entry php_dom_xpath_class_functions[] = {
- PHP_ME(domxpath, __construct, NULL, ZEND_ACC_PUBLIC)
- PHP_FALIAS(registerNamespace, dom_xpath_register_ns, NULL)
- PHP_FALIAS(query, dom_xpath_query, NULL)
- PHP_FALIAS(evaluate, dom_xpath_evaluate, NULL)
+ PHP_ME(domxpath, __construct, arginfo_dom_xpath_construct, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(registerNamespace, dom_xpath_register_ns, arginfo_dom_xpath_register_ns)
+ PHP_FALIAS(query, dom_xpath_query, arginfo_dom_xpath_query)
+ PHP_FALIAS(evaluate, dom_xpath_evaluate, arginfo_dom_xpath_evaluate)
{NULL, NULL, NULL}
};
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 34b6058cf..c347f6b12 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: exif.c,v 1.173.2.5.2.20 2007/06/10 20:12:45 iliaa Exp $ */
+/* $Id: exif.c,v 1.173.2.5.2.25 2008/03/12 17:33:14 iliaa Exp $ */
/* ToDos
*
@@ -142,7 +142,7 @@ zend_function_entry exif_functions[] = {
};
/* }}} */
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.5.2.20 2007/06/10 20:12:45 iliaa Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.5.2.25 2008/03/12 17:33:14 iliaa Exp $"
/* {{{ PHP_MINFO_FUNCTION
*/
@@ -241,12 +241,21 @@ PHP_MSHUTDOWN_FUNCTION(exif)
}
/* }}} */
+/* {{{ exif dependencies */
+static zend_module_dep exif_module_deps[] = {
+ ZEND_MOD_REQUIRED("standard")
+#if EXIF_USE_MBSTRING
+ ZEND_MOD_REQUIRED("mbstring")
+#endif
+ {NULL, NULL, NULL}
+};
+/* }}} */
+
/* {{{ exif_module_entry
*/
zend_module_entry exif_module_entry = {
-#if ZEND_MODULE_API_NO >= 20010901
- STANDARD_MODULE_HEADER,
-#endif
+ STANDARD_MODULE_HEADER_EX, NULL,
+ exif_module_deps,
"exif",
exif_functions,
PHP_MINIT(exif),
@@ -2868,7 +2877,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
/* exception are IFD pointers */
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal pointer offset(x%04X + x%04X = x%04X > x%04X)", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), offset_val, byte_count, offset_val+byte_count, IFDlength);
}
- return TRUE;
+ return FALSE;
}
if (byte_count>sizeof(cbuf)) {
/* mark as outside range and get buffer */
diff --git a/ext/exif/php_exif.h b/ext/exif/php_exif.h
index 289c00b7c..c020dfe3b 100644
--- a/ext/exif/php_exif.h
+++ b/ext/exif/php_exif.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_exif.h,v 1.14.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: php_exif.h,v 1.14.2.1.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#if HAVE_EXIF
extern zend_module_entry exif_module_entry;
diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c
index bc97574e3..e919f88f4 100644
--- a/ext/fbsql/php_fbsql.c
+++ b/ext/fbsql/php_fbsql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_fbsql.c,v 1.114.2.3.2.6 2007/02/24 02:17:24 helly Exp $ */
+/* $Id: php_fbsql.c,v 1.114.2.3.2.7 2007/12/31 07:20:06 sebastian Exp $ */
/* TODO:
*
diff --git a/ext/fbsql/php_fbsql.h b/ext/fbsql/php_fbsql.h
index ba09d8819..a8c82ba43 100644
--- a/ext/fbsql/php_fbsql.h
+++ b/ext/fbsql/php_fbsql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_fbsql.h,v 1.31.2.1.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: php_fbsql.h,v 1.31.2.1.2.3 2007/12/31 07:20:06 sebastian Exp $ */
#define HAVE_FBSQL 1
diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c
index a5360cfc2..91c4f91e7 100644
--- a/ext/fdf/fdf.c
+++ b/ext/fdf/fdf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fdf.c,v 1.89.2.2.2.9 2007/03/05 21:54:46 stas Exp $ */
+/* $Id: fdf.c,v 1.89.2.2.2.10 2007/12/31 07:20:06 sebastian Exp $ */
/* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html. */
diff --git a/ext/fdf/php_fdf.h b/ext/fdf/php_fdf.h
index dd7945817..c9161582b 100644
--- a/ext/fdf/php_fdf.h
+++ b/ext/fdf/php_fdf.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_fdf.h,v 1.22.2.1.2.1 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: php_fdf.h,v 1.22.2.1.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef PHP_FDF_H
#define PHP_FDF_H
diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c
index e72377e17..4405347d9 100644
--- a/ext/filter/callback_filter.c
+++ b/ext/filter/callback_filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: callback_filter.c,v 1.9.2.4 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: callback_filter.c,v 1.9.2.5 2007/12/31 07:20:06 sebastian Exp $ */
#include "php_filter.h"
diff --git a/ext/filter/filter.c b/ext/filter/filter.c
index ba6367d5c..e26a747f9 100644
--- a/ext/filter/filter.c
+++ b/ext/filter/filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.52.2.39 2007/04/04 20:50:26 pajoye Exp $ */
+/* $Id: filter.c,v 1.52.2.42 2008/02/24 18:34:30 felipe Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -275,7 +275,7 @@ PHP_MINFO_FUNCTION(filter)
{
php_info_print_table_start();
php_info_print_table_row( 2, "Input Validation and Filtering", "enabled" );
- php_info_print_table_row( 2, "Revision", "$Revision: 1.52.2.39 $");
+ php_info_print_table_row( 2, "Revision", "$Revision: 1.52.2.42 $");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
@@ -322,7 +322,7 @@ static void php_zval_filter(zval **value, long filter, long flags, zval *options
filter_func.function(*value, flags, options, charset TSRMLS_CC);
if (
- options &&
+ options && (Z_TYPE_P(options) == IS_ARRAY || Z_TYPE_P(options) == IS_OBJECT) &&
((flags & FILTER_NULL_ON_FAILURE && Z_TYPE_PP(value) == IS_NULL) ||
(!(flags & FILTER_NULL_ON_FAILURE) && Z_TYPE_PP(value) == IS_BOOL && Z_LVAL_PP(value) == 0)) &&
zend_hash_exists(HASH_OF(options), "default", sizeof("default"))
@@ -453,15 +453,16 @@ static void php_zval_filter_recursive(zval **value, long filter, long flags, zva
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(value), &pos);
zend_hash_get_current_data_ex(Z_ARRVAL_PP(value), (void **) &element, &pos) == SUCCESS;
- zend_hash_move_forward_ex(Z_ARRVAL_PP(value), &pos)) {
-
- if (Z_TYPE_PP(element) == IS_ARRAY) {
- Z_ARRVAL_PP(element)->nApplyCount++;
- php_zval_filter_recursive(element, filter, flags, options, charset, copy TSRMLS_CC);
- Z_ARRVAL_PP(element)->nApplyCount--;
- } else {
- php_zval_filter(element, filter, flags, options, charset, copy TSRMLS_CC);
- }
+ zend_hash_move_forward_ex(Z_ARRVAL_PP(value), &pos)
+ ) {
+ SEPARATE_ZVAL_IF_NOT_REF(element);
+ if (Z_TYPE_PP(element) == IS_ARRAY) {
+ Z_ARRVAL_PP(element)->nApplyCount++;
+ php_zval_filter_recursive(element, filter, flags, options, charset, copy TSRMLS_CC);
+ Z_ARRVAL_PP(element)->nApplyCount--;
+ } else {
+ php_zval_filter(element, filter, flags, options, charset, copy TSRMLS_CC);
+ }
}
} else {
php_zval_filter(value, filter, flags, options, charset, copy TSRMLS_CC);
diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h
index 6ae79afb5..e8e8fcf3a 100644
--- a/ext/filter/filter_private.h
+++ b/ext/filter/filter_private.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter_private.h,v 1.12.2.9 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: filter_private.h,v 1.12.2.10 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef FILTER_PRIVATE_H
#define FILTER_PRIVATE_H
diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c
index 4463f4e0d..103d5a51e 100644
--- a/ext/filter/logical_filters.c
+++ b/ext/filter/logical_filters.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: logical_filters.c,v 1.1.2.22 2007/05/03 23:38:27 iliaa Exp $ */
+/* $Id: logical_filters.c,v 1.1.2.24 2008/03/18 23:32:42 iliaa Exp $ */
#include "php_filter.h"
#include "filter_private.h"
@@ -469,7 +469,7 @@ void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
{
/* From http://cvs.php.net/co.php/pear/HTML_QuickForm/QuickForm/Rule/Email.php?r=1.4 */
- const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/D";
+ const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9])(([A-Za-z0-9\\-])*([A-Za-z0-9]))?\\.)+[A-Za-z\\-]+))$/D";
pcre *re = NULL;
pcre_extra *pcre_extra = NULL;
diff --git a/ext/filter/php_filter.h b/ext/filter/php_filter.h
index f4b0133d7..a1dd54a3e 100644
--- a/ext/filter/php_filter.h
+++ b/ext/filter/php_filter.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_filter.h,v 1.10.2.2 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: php_filter.h,v 1.10.2.3 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef PHP_FILTER_H
#define PHP_FILTER_H
diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c
index 17f33c3a2..132ae86f7 100644
--- a/ext/filter/sanitizing_filters.c
+++ b/ext/filter/sanitizing_filters.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sanitizing_filters.c,v 1.11.2.9 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: sanitizing_filters.c,v 1.11.2.10 2007/12/31 07:20:06 sebastian Exp $ */
#include "php_filter.h"
#include "filter_private.h"
diff --git a/ext/filter/tests/052.phpt b/ext/filter/tests/052.phpt
new file mode 100644
index 000000000..257613e9d
--- /dev/null
+++ b/ext/filter/tests/052.phpt
@@ -0,0 +1,73 @@
+--TEST--
+filter_var() / filter_var_array() and passed data integrity
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
+--FILE--
+<?php
+function filter_cb($var)
+{
+ return 1;
+}
+
+$data = array ('bar' => array ('fu<script>bar', 'bar<script>fu') );
+var_dump(filter_var($data, FILTER_SANITIZE_STRING, FILTER_FORCE_ARRAY));
+var_dump($data);
+var_dump(filter_var($data, FILTER_CALLBACK, array('options' => 'filter_cb')));
+var_dump($data);
+var_dump(filter_var_array($data, array('bar' => array('filter' => FILTER_CALLBACK, 'options' => 'filter_cb'))));
+var_dump($data);
+--EXPECT--
+array(1) {
+ ["bar"]=>
+ array(2) {
+ [0]=>
+ string(5) "fubar"
+ [1]=>
+ string(5) "barfu"
+ }
+}
+array(1) {
+ ["bar"]=>
+ array(2) {
+ [0]=>
+ string(13) "fu<script>bar"
+ [1]=>
+ string(13) "bar<script>fu"
+ }
+}
+array(1) {
+ ["bar"]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ }
+}
+array(1) {
+ ["bar"]=>
+ array(2) {
+ [0]=>
+ string(13) "fu<script>bar"
+ [1]=>
+ string(13) "bar<script>fu"
+ }
+}
+array(1) {
+ ["bar"]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ }
+}
+array(1) {
+ ["bar"]=>
+ array(2) {
+ [0]=>
+ string(13) "fu<script>bar"
+ [1]=>
+ string(13) "bar<script>fu"
+ }
+}
diff --git a/ext/filter/tests/053.phpt b/ext/filter/tests/053.phpt
new file mode 100644
index 000000000..218f7fd01
--- /dev/null
+++ b/ext/filter/tests/053.phpt
@@ -0,0 +1,15 @@
+--TEST--
+filter_var() - using callback
+--FILE--
+<?php
+
+function filter_test($str) { return FALSE; }
+filter_var('durty/boy', FILTER_CALLBACK, array(
+ 'options' => 'filter_test',
+));
+
+print "Done\n";
+
+?>
+--EXPECTF--
+Done
diff --git a/ext/filter/tests/bug44445.phpt b/ext/filter/tests/bug44445.phpt
new file mode 100644
index 000000000..36a864141
--- /dev/null
+++ b/ext/filter/tests/bug44445.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #44445 (email validator does not handle domains starting/ending with a -)
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
+--FILE--
+<?php
+var_dump(filter_var("foo@-foo.com",FILTER_VALIDATE_EMAIL));
+var_dump(filter_var("foo@foo-.com",FILTER_VALIDATE_EMAIL));
+?>
+--EXPECT--
+bool(false)
+bool(false)
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index ad998d0cd..cdc73b546 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ftp.c,v 1.112.2.4.2.9 2007/06/07 08:59:00 tony2001 Exp $ */
+/* $Id: ftp.c,v 1.112.2.4.2.10 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h
index fcfb72089..d9f3fd197 100644
--- a/ext/ftp/ftp.h
+++ b/ext/ftp/ftp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ftp.h,v 1.43.2.1.2.2 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: ftp.h,v 1.43.2.1.2.3 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef FTP_H
#define FTP_H
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index 2b55f8e0d..69d947efa 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ftp.c,v 1.103.2.2.2.2 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_ftp.c,v 1.103.2.2.2.3 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/ftp/php_ftp.h b/ext/ftp/php_ftp.h
index 8498bfe5d..309f6780f 100644
--- a/ext/ftp/php_ftp.h
+++ b/ext/ftp/php_ftp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ftp.h,v 1.29.2.1.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_ftp.h,v 1.29.2.1.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef _INCLUDED_FTP_H
#define _INCLUDED_FTP_H
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index b12a7ecf9..541ed86e9 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.312.2.20.2.32 2007/09/11 21:03:48 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.34 2008/04/04 17:39:52 felipe Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2813,7 +2813,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
}
}
- if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+ if (argc >= 2 && Z_STRLEN_PP(file)) {
PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename");
fp = VCWD_FOPEN(fn, "wb");
diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c
index 773462f99..cd721b3f9 100644
--- a/ext/gd/gd_ctx.c
+++ b/ext/gd/gd_ctx.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd_ctx.c,v 1.22.2.5.2.3 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: gd_ctx.c,v 1.22.2.5.2.4 2007/12/31 07:20:06 sebastian Exp $ */
#include "php_gd.h"
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index 49a540c42..e543f2fe2 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -947,7 +947,8 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
/* EAM DEBUG */
#if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2)))
- if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL && strcmp(font->face->family_name, "Symbol") == 0) {
+ if (font->face->family_name && font->face->charmap->encoding &&
+ font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL && strcmp(font->face->family_name, "Symbol") == 0) {
/* I do not know the significance of the constant 0xf000.
* It was determined by inspection of the character codes
* stored in Microsoft font symbol.
diff --git a/ext/gd/libgd/xbm.c b/ext/gd/libgd/xbm.c
index 30ed3cf4a..6e7f473a9 100644
--- a/ext/gd/libgd/xbm.c
+++ b/ext/gd/libgd/xbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xbm.c,v 1.7.2.2.2.2 2007/08/09 12:08:29 mattias Exp $ */
+/* $Id: xbm.c,v 1.7.2.2.2.3 2007/12/31 07:20:06 sebastian Exp $ */
#include <stdio.h>
#include <math.h>
diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h
index 05ccab1d3..6c981f3ce 100644
--- a/ext/gd/php_gd.h
+++ b/ext/gd/php_gd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_gd.h,v 1.59.2.3.2.5 2007/04/17 15:31:45 pajoye Exp $ */
+/* $Id: php_gd.h,v 1.59.2.3.2.6 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef PHP_GD_H
#define PHP_GD_H
diff --git a/ext/gd/tests/gd_info_basic.phpt b/ext/gd/tests/gd_info_basic.phpt
new file mode 100644
index 000000000..61a2304e8
--- /dev/null
+++ b/ext/gd/tests/gd_info_basic.phpt
@@ -0,0 +1,29 @@
+--TEST--
+gd_info()
+--SKIPIF--
+<?php
+ if (!function_exists('gd_info')) {
+ die('skip gd_info() not available');
+ }
+?>
+--FILE--
+<?php
+
+/* Prototype : array gd_info ( void )
+ * Description: Retrieve information about the currently installed GD library
+ * Source code: ext/standard/image.c
+ * Alias to functions:
+ */
+ echo "basic test of gd_info() function\n";
+
+ var_dump(gd_info());
+
+ echo "\nDone\n";
+?>
+--EXPECTF--
+basic test of gd_info() function
+array(%d) {
+%a
+}
+
+Done
diff --git a/ext/gd/tests/image_type_to_mime_type_basic.phpt b/ext/gd/tests/image_type_to_mime_type_basic.phpt
new file mode 100644
index 000000000..7384c4632
--- /dev/null
+++ b/ext/gd/tests/image_type_to_mime_type_basic.phpt
@@ -0,0 +1,64 @@
+--TEST--
+image_type_to_mime_type()
+--SKIPIF--
+<?php
+ if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
+ require_once('skipif_imagetype.inc');
+?>
+--FILE--
+<?php
+
+/* Prototype : string image_type_to_mime_type ( int $imagetype )
+ * Description: Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype.
+ * Source code: ext/standard/image.c
+ * Alias to functions:
+ */
+
+echo "Starting image_type_to_mime_type() test\n\n";
+
+$image_types = array (
+ IMAGETYPE_GIF,
+ IMAGETYPE_JPEG,
+ IMAGETYPE_PNG,
+ IMAGETYPE_SWF,
+ IMAGETYPE_PSD,
+ IMAGETYPE_BMP,
+ IMAGETYPE_TIFF_II,
+ IMAGETYPE_TIFF_MM,
+ IMAGETYPE_JPC,
+ IMAGETYPE_JP2,
+ IMAGETYPE_JPX,
+ IMAGETYPE_JB2,
+ IMAGETYPE_IFF,
+ IMAGETYPE_WBMP,
+ IMAGETYPE_JPEG2000,
+ IMAGETYPE_XBM
+);
+
+ foreach($image_types as $image_type) {
+ var_dump(image_type_to_mime_type($image_type));
+ }
+
+echo "\nDone image_type_to_mime_type() test\n";
+?>
+--EXPECT--
+Starting image_type_to_mime_type() test
+
+string(9) "image/gif"
+string(10) "image/jpeg"
+string(9) "image/png"
+string(29) "application/x-shockwave-flash"
+string(9) "image/psd"
+string(9) "image/bmp"
+string(10) "image/tiff"
+string(10) "image/tiff"
+string(24) "application/octet-stream"
+string(9) "image/jp2"
+string(24) "application/octet-stream"
+string(24) "application/octet-stream"
+string(9) "image/iff"
+string(18) "image/vnd.wap.wbmp"
+string(24) "application/octet-stream"
+string(9) "image/xbm"
+
+Done image_type_to_mime_type() test \ No newline at end of file
diff --git a/ext/gd/tests/imagecopyresampled_basic.phpt b/ext/gd/tests/imagecopyresampled_basic.phpt
new file mode 100644
index 000000000..12ac15511
--- /dev/null
+++ b/ext/gd/tests/imagecopyresampled_basic.phpt
@@ -0,0 +1,71 @@
+--TEST--
+imagecopyresampled()
+--SKIPIF--
+<?php
+ if (!function_exists('imagecopyresampled')) die('skip imagecopyresampled() not available');
+ require_once('skipif_imagetype.inc');
+?>
+--FILE--
+<?php
+
+/* Prototype : bool imagecopyresampled ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h )
+ * Description: Copy and resize part of an image with resampling.
+ * Source code: ext/standard/image.c
+ * Alias to functions:
+ */
+
+echo "Simple test of imagecopyresampled() function\n";
+
+$dest_lge = dirname(realpath(__FILE__)) . '/imagelarge.png';
+$dest_sml = dirname(realpath(__FILE__)) . '/imagesmall.png';
+
+// create a blank image
+$image_lge = imagecreatetruecolor(400, 300);
+
+// set the background color to black
+$bg = imagecolorallocate($image_lge, 0, 0, 0);
+
+// fill polygon with blue
+$col_ellipse = imagecolorallocate($image_lge, 0, 255, 0);
+
+// draw the eclipse
+imagefilledellipse($image_lge, 200, 150, 300, 200, $col_ellipse);
+
+// output the picture to a file
+imagepng($image_lge, $dest_lge);
+
+// Get new dimensions
+$percent = 0.5; // new image 50% of orginal
+list($width, $height) = getimagesize($dest_lge);
+echo "Size of orginal: width=". $width . " height=" . $height . "\n";
+
+$new_width = $width * $percent;
+$new_height = $height * $percent;
+
+// Resample
+$image_sml = imagecreatetruecolor($new_width, $new_height);
+imagecopyresampled($image_sml, $image_lge, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
+
+imagepng($image_sml, $dest_sml);
+
+list($width, $height) = getimagesize($dest_sml);
+echo "Size of copy: width=". $width . " height=" . $height . "\n";
+
+imagedestroy($image_lge);
+imagedestroy($image_sml);
+
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+ $dest_lge = dirname(realpath(__FILE__)) . '/imagelarge.png';
+ $dest_sml = dirname(realpath(__FILE__)) . '/imagesmall.png';
+ @unlink($dest_lge);
+ @unlink($dest_sml);
+?>
+--EXPECT--
+Simple test of imagecopyresampled() function
+Size of orginal: width=400 height=300
+Size of copy: width=200 height=150
+Done
diff --git a/ext/gd/tests/imagedashedline_basic.phpt b/ext/gd/tests/imagedashedline_basic.phpt
new file mode 100644
index 000000000..1d6797520
--- /dev/null
+++ b/ext/gd/tests/imagedashedline_basic.phpt
@@ -0,0 +1,78 @@
+--TEST--
+imagedashedline()
+--SKIPIF--
+<?php
+ if (!function_exists('imagedashedline')) die('skip imagedashedline() not available');
+ require_once('skipif_imagetype.inc');
+?>
+--FILE--
+<?php
+
+/* Prototype : bool imagedashedline ( resource $image , int $x1 , int $y1 , int $x2 , int $y2 , int $color )
+ * Description: Draws a dashed line.
+ * This function is deprecated. Use combination of imagesetstyle() and imageline() instead.
+ * Source code: ext/standard/image.c
+ * Alias to functions:
+ */
+
+
+echo "Simple test of imagedashedline() function\n";
+
+$dest = dirname(realpath(__FILE__)) . '/imagedashedline.png';
+
+// create a blank image
+$image = imagecreatetruecolor(250, 250);
+
+// set the background color to black
+$bg = imagecolorallocate($image, 0, 0, 0);
+
+// red dashed lines
+$col_line = imagecolorallocate($image, 255, 0, 0);
+
+// draw a couple of vertical dashed lines
+imagedashedline($image, 100, 20, 100, 230, $col_line );
+imagedashedline($image, 150, 20, 150, 230, $col_line );
+
+// output the picture to a file
+imagepng($image, $dest);
+
+//check color of a point on edge..
+$col1 = imagecolorat($image, 100, 230);
+// ..and a point on background
+$col2 = imagecolorat($image, 5, 5);
+
+$color1 = imagecolorsforindex($image, $col1);
+$color2 = imagecolorsforindex($image, $col2);
+var_dump($color1, $color2);
+
+imagedestroy($image);
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+ $dest = dirname(realpath(__FILE__)) . '/imagedashedline.png';
+ @unlink($dest);
+?>
+--EXPECT--
+Simple test of imagedashedline() function
+array(4) {
+ ["red"]=>
+ int(255)
+ ["green"]=>
+ int(0)
+ ["blue"]=>
+ int(0)
+ ["alpha"]=>
+ int(0)
+}
+array(4) {
+ ["red"]=>
+ int(0)
+ ["green"]=>
+ int(0)
+ ["blue"]=>
+ int(0)
+ ["alpha"]=>
+ int(0)
+}
+Done
diff --git a/ext/gd/tests/imagefilledpolygon_basic.phpt b/ext/gd/tests/imagefilledpolygon_basic.phpt
new file mode 100644
index 000000000..6871a28b7
--- /dev/null
+++ b/ext/gd/tests/imagefilledpolygon_basic.phpt
@@ -0,0 +1,102 @@
+--TEST--
+imagefilledpolygon()
+--SKIPIF--
+<?php
+ if (!function_exists('imagefilledpolygon')) die('skip imagefilledpolygon() not available');
+ require_once('skipif_imagetype.inc');
+?>
+--FILE--
+<?php
+
+/* Prototype : bool imagefilledpolygon ( resource $image , array $points , int $num_points , int $color )
+ * Description: Draws a filled polygon.
+ * Source code: ext/standard/image.c
+ * Alias to functions:
+ */
+
+echo "Simple test of imagefilledpolygon() function\n";
+
+$dest = dirname(realpath(__FILE__)) . '/imagefilledpolygon.png';
+
+$points = array(
+ 40, 50,
+ 20, 240,
+ 60, 60,
+ 240, 20,
+ 50, 40,
+ 10, 10
+ );
+
+// create a blank image
+$image = imagecreatetruecolor(250, 250);
+
+// set the background color to black
+$bg = imagecolorallocate($image, 0, 0, 0);
+
+// fill polygon with green
+$col_poly = imagecolorallocate($image, 0, 255, 0);
+
+// draw the polygon
+imagefilledpolygon($image, $points, count($points)/2, $col_poly);
+
+// output the picture to a file
+imagepng($image, $dest);
+
+// get it back
+$image_in = imagecreatefrompng($dest);
+
+//check color of a point on edge..
+$col1 = imagecolorat($image_in, 40, 50);
+//.. a point in filled body
+$col2 = imagecolorat($image_in, 15, 15);
+// ..and a point on background
+$col3 = imagecolorat($image_in, 5, 5);
+
+$color1 = imagecolorsforindex($image_in, $col1);
+$color2 = imagecolorsforindex($image_in, $col2);
+$color3 = imagecolorsforindex($image_in, $col3);
+var_dump($color1, $color2, $color3);
+
+imagedestroy($image);
+imagedestroy($image_in);
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+ $dest = dirname(realpath(__FILE__)) . '/imagefilledpolygon.png';
+ @unlink($dest);
+?>
+--EXPECT--
+Simple test of imagefilledpolygon() function
+array(4) {
+ ["red"]=>
+ int(0)
+ ["green"]=>
+ int(255)
+ ["blue"]=>
+ int(0)
+ ["alpha"]=>
+ int(0)
+}
+array(4) {
+ ["red"]=>
+ int(0)
+ ["green"]=>
+ int(255)
+ ["blue"]=>
+ int(0)
+ ["alpha"]=>
+ int(0)
+}
+array(4) {
+ ["red"]=>
+ int(0)
+ ["green"]=>
+ int(0)
+ ["blue"]=>
+ int(0)
+ ["alpha"]=>
+ int(0)
+}
+Done
diff --git a/ext/gd/tests/imagepolygon_basic.phpt b/ext/gd/tests/imagepolygon_basic.phpt
new file mode 100644
index 000000000..5c79cdf5b
--- /dev/null
+++ b/ext/gd/tests/imagepolygon_basic.phpt
@@ -0,0 +1,80 @@
+--TEST--
+imageploygon()
+--SKIPIF--
+<?php
+ if (!function_exists('imagepolygon')) die('skip imagepolygon() not available');
+ require_once('skipif_imagetype.inc');
+?>
+--FILE--
+<?php
+
+/* Prototype : bool imagepolygon ( resource $image , array $points , int $num_points , int $color )
+ * Description: Draws a polygon.
+ * Source code: ext/standard/image.c
+ * Alias to functions:
+ */
+
+
+echo "Simple test of imagepolygon() function\n";
+
+$dest = dirname(realpath(__FILE__)) . '/imagepolygon.png';
+
+// create a blank image
+$image = imagecreatetruecolor(400, 300);
+
+// set the background color to black
+$bg = imagecolorallocate($image, 0, 0, 0);
+
+// draw a red polygon
+$col_poly = imagecolorallocate($image, 255, 0, 0);
+
+// draw the polygon
+imagepolygon($image, array (
+ 0, 0,
+ 100, 200,
+ 300, 200
+ ),
+ 3,
+ $col_poly);
+
+// output the picture to a file
+imagepng($image, $dest);
+
+$col1 = imagecolorat($image, 100, 200);
+$col2 = imagecolorat($image, 100, 100);
+$color1 = imagecolorsforindex($image, $col1);
+$color2 = imagecolorsforindex($image, $col2);
+var_dump($color1, $color2);
+
+imagedestroy($image);
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+ $dest = dirname(realpath(__FILE__)) . '/imagepolygon.png';
+ @unlink($dest);
+?>
+--EXPECT--
+Simple test of imagepolygon() function
+array(4) {
+ ["red"]=>
+ int(255)
+ ["green"]=>
+ int(0)
+ ["blue"]=>
+ int(0)
+ ["alpha"]=>
+ int(0)
+}
+array(4) {
+ ["red"]=>
+ int(0)
+ ["green"]=>
+ int(0)
+ ["blue"]=>
+ int(0)
+ ["alpha"]=>
+ int(0)
+}
+Done
diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c
index 6dea6d082..71bd68a7f 100644
--- a/ext/gettext/gettext.c
+++ b/ext/gettext/gettext.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gettext.c,v 1.46.2.2.2.4 2007/01/16 14:42:38 tony2001 Exp $ */
+/* $Id: gettext.c,v 1.46.2.2.2.5 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/gettext/php_gettext.h b/ext/gettext/php_gettext.h
index 285db2e03..f75f53427 100644
--- a/ext/gettext/php_gettext.h
+++ b/ext/gettext/php_gettext.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_gettext.h,v 1.20.2.1.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_gettext.h,v 1.20.2.1.2.2 2007/12/31 07:20:06 sebastian Exp $ */
#ifndef PHP_GETTEXT_H
#define PHP_GETTEXT_H
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 6610a8c00..09f468d1b 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h
index 22b4abcf4..ff8c66625 100644
--- a/ext/gmp/php_gmp.h
+++ b/ext/gmp/php_gmp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index 0edecb7fc..8a5e2bf70 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash.c,v 1.18.2.5.2.7 2007/02/27 03:28:16 iliaa Exp $ */
+/* $Id: hash.c,v 1.18.2.5.2.8 2007/12/31 07:20:06 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/hash/hash_adler32.c b/ext/hash/hash_adler32.c
index 60ff1e817..9dc5dc4b2 100644
--- a/ext/hash/hash_adler32.c
+++ b/ext/hash/hash_adler32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_adler32.c,v 1.3.2.4.2.2 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_adler32.c,v 1.3.2.4.2.3 2007/12/31 07:20:06 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_adler32.h"
diff --git a/ext/hash/hash_crc32.c b/ext/hash/hash_crc32.c
index 7ef5a4f21..f13c5d45e 100644
--- a/ext/hash/hash_crc32.c
+++ b/ext/hash/hash_crc32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_crc32.c,v 1.2.2.3.2.2 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_crc32.c,v 1.2.2.3.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_crc32.h"
diff --git a/ext/hash/hash_gost.c b/ext/hash/hash_gost.c
index 87b8dcfeb..c860c347c 100644
--- a/ext/hash/hash_gost.c
+++ b/ext/hash/hash_gost.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_gost.c,v 1.2.2.3.2.2 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_gost.c,v 1.2.2.3.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_gost.h"
diff --git a/ext/hash/hash_haval.c b/ext/hash/hash_haval.c
index 312220dca..04557f634 100644
--- a/ext/hash/hash_haval.c
+++ b/ext/hash/hash_haval.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_haval.c,v 1.4.2.3.2.2 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_haval.c,v 1.4.2.3.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_haval.h"
diff --git a/ext/hash/hash_md.c b/ext/hash/hash_md.c
index 28b459657..85347db26 100644
--- a/ext/hash/hash_md.c
+++ b/ext/hash/hash_md.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_md.c,v 1.6.2.4.2.3 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_md.c,v 1.6.2.4.2.4 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_md.h"
diff --git a/ext/hash/hash_ripemd.c b/ext/hash/hash_ripemd.c
index 4cdc4f78d..e656431ae 100644
--- a/ext/hash/hash_ripemd.c
+++ b/ext/hash/hash_ripemd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_ripemd.c,v 1.5.2.3.2.3 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_ripemd.c,v 1.5.2.3.2.4 2007/12/31 07:20:07 sebastian Exp $ */
/* Heavily borrowed from md5.c & sha1.c of PHP archival fame
Note that ripemd laughs in the face of logic and uses
diff --git a/ext/hash/hash_salsa.c b/ext/hash/hash_salsa.c
index a95a350d0..9cc84ce8b 100644
--- a/ext/hash/hash_salsa.c
+++ b/ext/hash/hash_salsa.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_salsa.c,v 1.3.2.3.2.2 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_salsa.c,v 1.3.2.3.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_salsa.h"
diff --git a/ext/hash/hash_sha.c b/ext/hash/hash_sha.c
index 6b9b04f5e..74aef1544 100644
--- a/ext/hash/hash_sha.c
+++ b/ext/hash/hash_sha.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_sha.c,v 1.10.2.3.2.2 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_sha.c,v 1.10.2.3.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_sha.h"
diff --git a/ext/hash/hash_snefru.c b/ext/hash/hash_snefru.c
index 829701a52..412698502 100644
--- a/ext/hash/hash_snefru.c
+++ b/ext/hash/hash_snefru.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_snefru.c,v 1.3.2.3.2.2 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_snefru.c,v 1.3.2.3.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_snefru.h"
diff --git a/ext/hash/hash_tiger.c b/ext/hash/hash_tiger.c
index 161e7651a..906ad5ab0 100644
--- a/ext/hash/hash_tiger.c
+++ b/ext/hash/hash_tiger.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_tiger.c,v 1.4.2.4.2.3 2007/09/04 18:46:21 tony2001 Exp $ */
+/* $Id: hash_tiger.c,v 1.4.2.4.2.4 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
#include "php_hash_tiger.h"
diff --git a/ext/hash/hash_whirlpool.c b/ext/hash/hash_whirlpool.c
index 08224e3df..8b6c7ed27 100644
--- a/ext/hash/hash_whirlpool.c
+++ b/ext/hash/hash_whirlpool.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash_whirlpool.c,v 1.3.2.3.2.2 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash_whirlpool.c,v 1.3.2.3.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#include "php_hash.h"
diff --git a/ext/hash/php_hash.h b/ext/hash/php_hash.h
index 919146a97..2c863f722 100644
--- a/ext/hash/php_hash.h
+++ b/ext/hash/php_hash.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash.h,v 1.13.2.7.2.3 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: php_hash.h,v 1.13.2.7.2.4 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_H
#define PHP_HASH_H
diff --git a/ext/hash/php_hash_adler32.h b/ext/hash/php_hash_adler32.h
index b0e367588..36f56de72 100644
--- a/ext/hash/php_hash_adler32.h
+++ b/ext/hash/php_hash_adler32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_adler32.h,v 1.3.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_adler32.h,v 1.3.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_ADLER32_H
#define PHP_HASH_ADLER32_H
diff --git a/ext/hash/php_hash_crc32.h b/ext/hash/php_hash_crc32.h
index f5662c564..0a74fb884 100644
--- a/ext/hash/php_hash_crc32.h
+++ b/ext/hash/php_hash_crc32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_crc32.h,v 1.3.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_crc32.h,v 1.3.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_CRC32_H
#define PHP_HASH_CRC32_H
diff --git a/ext/hash/php_hash_crc32_tables.h b/ext/hash/php_hash_crc32_tables.h
index 760ce7b30..ba9ad1b1b 100644
--- a/ext/hash/php_hash_crc32_tables.h
+++ b/ext/hash/php_hash_crc32_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_crc32_tables.h,v 1.2.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_crc32_tables.h,v 1.2.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
static const php_hash_uint32 crc32_table[] = { 0x0,
0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
diff --git a/ext/hash/php_hash_gost.h b/ext/hash/php_hash_gost.h
index acc40f6db..a54286e36 100644
--- a/ext/hash/php_hash_gost.h
+++ b/ext/hash/php_hash_gost.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_gost.h,v 1.2.2.4.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_gost.h,v 1.2.2.4.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_GOST_H
#define PHP_HASH_GOST_H
diff --git a/ext/hash/php_hash_haval.h b/ext/hash/php_hash_haval.h
index 5bf8eacb3..8b8672a54 100644
--- a/ext/hash/php_hash_haval.h
+++ b/ext/hash/php_hash_haval.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_haval.h,v 1.2.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_haval.h,v 1.2.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_HAVAL_H
#define PHP_HASH_HAVAL_H
diff --git a/ext/hash/php_hash_md.h b/ext/hash/php_hash_md.h
index a19d77aa0..adff1e7e4 100644
--- a/ext/hash/php_hash_md.h
+++ b/ext/hash/php_hash_md.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_md.h,v 1.2.2.4.2.2 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_md.h,v 1.2.2.4.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_MD_H
#define PHP_HASH_MD_H
diff --git a/ext/hash/php_hash_ripemd.h b/ext/hash/php_hash_ripemd.h
index 4cb55a638..18180e0e1 100644
--- a/ext/hash/php_hash_ripemd.h
+++ b/ext/hash/php_hash_ripemd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_ripemd.h,v 1.2.2.3.2.2 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_ripemd.h,v 1.2.2.3.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_RIPEMD_H
#define PHP_HASH_RIPEMD_H
diff --git a/ext/hash/php_hash_salsa.h b/ext/hash/php_hash_salsa.h
index 501b243ba..dad09c78a 100644
--- a/ext/hash/php_hash_salsa.h
+++ b/ext/hash/php_hash_salsa.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_salsa.h,v 1.4.2.4.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_salsa.h,v 1.4.2.4.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_SALSA_H
#define PHP_HASH_SALSA_H
diff --git a/ext/hash/php_hash_sha.h b/ext/hash/php_hash_sha.h
index 6cd6c86f9..1fd952b23 100644
--- a/ext/hash/php_hash_sha.h
+++ b/ext/hash/php_hash_sha.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_sha.h,v 1.3.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_sha.h,v 1.3.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_SHA_H
#define PHP_HASH_SHA_H
diff --git a/ext/hash/php_hash_snefru.h b/ext/hash/php_hash_snefru.h
index 21af83dc9..bc99fda11 100644
--- a/ext/hash/php_hash_snefru.h
+++ b/ext/hash/php_hash_snefru.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_snefru.h,v 1.2.2.4.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_snefru.h,v 1.2.2.4.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_SNEFRU_H
#define PHP_HASH_SNEFRU_H
diff --git a/ext/hash/php_hash_snefru_tables.h b/ext/hash/php_hash_snefru_tables.h
index 5acb54353..ed461a7df 100644
--- a/ext/hash/php_hash_snefru_tables.h
+++ b/ext/hash/php_hash_snefru_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_snefru_tables.h,v 1.3.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_snefru_tables.h,v 1.3.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
static const php_hash_uint32 tables[16][256]= {
diff --git a/ext/hash/php_hash_tiger.h b/ext/hash/php_hash_tiger.h
index da6ad3b8b..338ead529 100644
--- a/ext/hash/php_hash_tiger.h
+++ b/ext/hash/php_hash_tiger.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_tiger.h,v 1.3.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_tiger.h,v 1.3.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_TIGER_H
#define PHP_HASH_TIGER_H
diff --git a/ext/hash/php_hash_tiger_tables.h b/ext/hash/php_hash_tiger_tables.h
index 3591f93b5..2fba9a4ff 100644
--- a/ext/hash/php_hash_tiger_tables.h
+++ b/ext/hash/php_hash_tiger_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_tiger_tables.h,v 1.2.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_tiger_tables.h,v 1.2.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#define t1 (table)
#define t2 (table+256)
diff --git a/ext/hash/php_hash_types.h b/ext/hash/php_hash_types.h
index d4d61d841..c7a7b0e42 100644
--- a/ext/hash/php_hash_types.h
+++ b/ext/hash/php_hash_types.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_types.h,v 1.2.2.4.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_types.h,v 1.2.2.4.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_TYPES_H
#define PHP_HASH_TYPES_H
diff --git a/ext/hash/php_hash_whirlpool.h b/ext/hash/php_hash_whirlpool.h
index d56005b0e..aed8f0480 100644
--- a/ext/hash/php_hash_whirlpool.h
+++ b/ext/hash/php_hash_whirlpool.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_whirlpool.h,v 1.2.2.4.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_whirlpool.h,v 1.2.2.4.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_WHIRLPOOL_H
#define PHP_HASH_WHIRLPOOL_H
diff --git a/ext/hash/php_hash_whirlpool_tables.h b/ext/hash/php_hash_whirlpool_tables.h
index e3e31554d..69aa4293f 100644
--- a/ext/hash/php_hash_whirlpool_tables.h
+++ b/ext/hash/php_hash_whirlpool_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash_whirlpool_tables.h,v 1.1.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_hash_whirlpool_tables.h,v 1.1.2.3.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_HASH_WHIRLPOOL_TABLES_H
#define PHP_HASH_WHIRLPOOL_TABLES_H
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 19710c90f..d7b4b4524 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: iconv.c,v 1.124.2.8.2.22 2007/11/01 19:13:49 tony2001 Exp $ */
+/* $Id: iconv.c,v 1.124.2.8.2.23 2007/12/31 07:20:07 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h
index 03d17c0e7..975ae0c55 100644
--- a/ext/iconv/php_iconv.h
+++ b/ext/iconv/php_iconv.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Revision: 1.28.2.2.2.2 $ */
+/* $Revision: 1.28.2.2.2.3 $ */
#ifndef PHP_ICONV_H
#define PHP_ICONV_H
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 8b057a835..b93100d67 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,7 +26,7 @@
| PHP 4.0 updates: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.c,v 1.208.2.7.2.26 2007/07/31 00:31:10 stas Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.31 2008/04/17 11:04:49 felipe Exp $ */
#define IMAP41
@@ -792,7 +792,11 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
#ifdef SET_MAXLOGINTRIALS
if (myargc == 5) {
convert_to_long_ex(retries);
- mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) Z_LVAL_PP(retries));
+ if (Z_LVAL_PP(retries) < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING ,"Retries must be greater or equal to 0");
+ } else {
+ mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) Z_LVAL_PP(retries));
+ }
}
#endif
@@ -1051,6 +1055,7 @@ PHP_FUNCTION(imap_setacl)
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
convert_to_string_ex(mailbox);
+ convert_to_string_ex(id);
convert_to_string_ex(rights);
RETURN_BOOL(imap_setacl(imap_le_struct->imap_stream, Z_STRVAL_PP(mailbox), Z_STRVAL_PP(id), Z_STRVAL_PP(rights)));
@@ -1582,8 +1587,8 @@ PHP_FUNCTION(imap_headerinfo)
convert_to_long_ex(msgno);
if (myargc >= 3) {
convert_to_long_ex(fromlength);
- if (Z_LVAL_PP(fromlength) < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "From length has to be greater than or equal to 0");
+ if (Z_LVAL_PP(fromlength) < 0 || Z_LVAL_PP(fromlength) >= MAILTMPLEN) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "From length has to be between 1 and %i", MAILTMPLEN);
RETURN_FALSE;
}
} else {
@@ -1591,8 +1596,8 @@ PHP_FUNCTION(imap_headerinfo)
}
if (myargc >= 4) {
convert_to_long_ex(subjectlength);
- if (Z_LVAL_PP(subjectlength) < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject length has to be greater than or equal to 0");
+ if (Z_LVAL_PP(subjectlength) < 0 || Z_LVAL_PP(subjectlength) >= MAILTMPLEN) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject length has to be between 1 and %i", MAILTMPLEN);
RETURN_FALSE;
}
} else {
@@ -3036,8 +3041,8 @@ PHP_FUNCTION(imap_mail_compose)
}
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(body));
- if (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data) != SUCCESS) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "body parameter cannot be empty");
+ if (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data) != SUCCESS || Z_TYPE_PP(data) != IS_ARRAY) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "body parameter must be a non-empty array");
RETURN_FALSE;
}
diff --git a/ext/imap/php_imap.h b/ext/imap/php_imap.h
index e6ebd2ad7..06ca89ac5 100644
--- a/ext/imap/php_imap.h
+++ b/ext/imap/php_imap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.h,v 1.32.2.2.2.1 2007/01/01 09:36:02 sebastian Exp $ */
+/* $Id: php_imap.h,v 1.32.2.2.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_IMAP_H
#define PHP_IMAP_H
diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c
index 98e686781..ce994aed7 100644
--- a/ext/interbase/ibase_blobs.c
+++ b/ext/interbase/ibase_blobs.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ibase_blobs.c,v 1.9.2.1.2.3 2007/02/24 02:17:24 helly Exp $ */
+/* $Id: ibase_blobs.c,v 1.9.2.1.2.4 2007/12/31 07:20:07 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/interbase/ibase_events.c b/ext/interbase/ibase_events.c
index 74d131759..6a9f13d50 100644
--- a/ext/interbase/ibase_events.c
+++ b/ext/interbase/ibase_events.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ibase_events.c,v 1.8.2.1.2.1 2007/01/01 09:36:02 sebastian Exp $ */
+/* $Id: ibase_events.c,v 1.8.2.1.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c
index b9e1c5581..b1062ef95 100644
--- a/ext/interbase/ibase_query.c
+++ b/ext/interbase/ibase_query.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ibase_query.c,v 1.23.2.1.2.10 2007/06/07 08:59:00 tony2001 Exp $ */
+/* $Id: ibase_query.c,v 1.23.2.1.2.11 2007/12/31 07:20:07 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c
index 8e424ed10..d3d18c848 100644
--- a/ext/interbase/ibase_service.c
+++ b/ext/interbase/ibase_service.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ibase_service.c,v 1.11.2.2.2.5 2007/03/06 00:24:00 stas Exp $ */
+/* $Id: ibase_service.c,v 1.11.2.2.2.6 2007/12/31 07:20:07 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index f75ef8b4f..47d0d3e9a 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.225.2.4.2.7 2007/02/28 10:37:07 bjori Exp $ */
+/* $Id: interbase.c,v 1.225.2.4.2.8 2007/12/31 07:20:07 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/interbase/php_ibase_includes.h b/ext/interbase/php_ibase_includes.h
index 45c26eaf3..57195e132 100755
--- a/ext/interbase/php_ibase_includes.h
+++ b/ext/interbase/php_ibase_includes.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ibase_includes.h,v 1.16.2.1.2.1 2007/01/01 09:36:02 sebastian Exp $ */
+/* $Id: php_ibase_includes.h,v 1.16.2.1.2.3 2008/01/23 01:22:57 iliaa Exp $ */
#ifndef PHP_IBASE_INCLUDES_H
#define PHP_IBASE_INCLUDES_H
@@ -30,7 +30,7 @@
#endif
#ifndef METADATALENGTH
-#define METADATALENGTH 32
+#define METADATALENGTH 68
#endif
#define RESET_ERRMSG do { IBG(errmsg)[0] = '\0'; IBG(sql_code) = 0; } while (0)
diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c
index c07af4343..4237222e5 100644
--- a/ext/interbase/php_ibase_udf.c
+++ b/ext/interbase/php_ibase_udf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ibase_udf.c,v 1.9.2.1.2.2 2007/03/12 23:21:41 iliaa Exp $ */
+/* $Id: php_ibase_udf.c,v 1.9.2.1.2.3 2007/12/31 07:20:07 sebastian Exp $ */
/**
* This UDF library adds the ability to call PHP functions from SQL
diff --git a/ext/interbase/php_interbase.h b/ext/interbase/php_interbase.h
index 0d443133f..7437abff1 100644
--- a/ext/interbase/php_interbase.h
+++ b/ext/interbase/php_interbase.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_interbase.h,v 1.71.2.1.2.1 2007/01/01 09:36:02 sebastian Exp $ */
+/* $Id: php_interbase.h,v 1.71.2.1.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_INTERBASE_H
#define PHP_INTERBASE_H
diff --git a/ext/json/json.c b/ext/json/json.c
index 393d41f5e..e7bb805e7 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: json.c,v 1.9.2.20 2007/10/01 15:23:15 iliaa Exp $ */
+/* $Id: json.c,v 1.9.2.21 2007/12/31 07:20:07 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/json/php_json.h b/ext/json/php_json.h
index e9e6395a0..27ef7a0ac 100644
--- a/ext/json/php_json.h
+++ b/ext/json/php_json.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_json.h,v 1.8.2.2 2007/01/01 09:36:02 sebastian Exp $ */
+/* $Id: php_json.h,v 1.8.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_JSON_H
#define PHP_JSON_H
diff --git a/ext/json/tests/005.phpt b/ext/json/tests/005.phpt
index f6a8977d1..01a307f4a 100644
--- a/ext/json/tests/005.phpt
+++ b/ext/json/tests/005.phpt
@@ -13,15 +13,11 @@ var_dump(json_encode($a));
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
array(1) {
[0]=>
- array(1) {
- [0]=>
- *RECURSION*
+ array(0) {
}
}
-
-Warning: json_encode(): recursion detected in %s on line %d
-string(8) "[[null]]"
+string(4) "[[]]"
Done
diff --git a/ext/json/tests/bug41567.phpt b/ext/json/tests/bug41567.phpt
index 5553df397..5a141003e 100644
--- a/ext/json/tests/bug41567.phpt
+++ b/ext/json/tests/bug41567.phpt
@@ -10,6 +10,8 @@ var_dump(json_decode($a));
echo "Done\n";
?>
+--INI--
+precision=14
--EXPECT--
float(123456789.12345)
Done
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index f6e3c8739..eb70b483b 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ldap.c,v 1.161.2.3.2.11 2007/07/17 09:09:42 jani Exp $ */
+/* $Id: ldap.c,v 1.161.2.3.2.12 2007/12/31 07:20:07 sebastian Exp $ */
#define IS_EXT_MODULE
#ifdef HAVE_CONFIG_H
@@ -322,7 +322,7 @@ PHP_MINFO_FUNCTION(ldap)
php_info_print_table_start();
php_info_print_table_row(2, "LDAP Support", "enabled");
- php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.161.2.3.2.11 2007/07/17 09:09:42 jani Exp $");
+ php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.161.2.3.2.12 2007/12/31 07:20:07 sebastian Exp $");
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
diff --git a/ext/ldap/php_ldap.h b/ext/ldap/php_ldap.h
index 9b0627cf7..c401c3c28 100644
--- a/ext/ldap/php_ldap.h
+++ b/ext/ldap/php_ldap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ldap.h,v 1.32.2.1.2.2 2007/07/13 01:24:16 jani Exp $ */
+/* $Id: php_ldap.h,v 1.32.2.1.2.3 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_LDAP_H
#define PHP_LDAP_H
diff --git a/ext/ldap/tests/ldap_dn2ufn.phpt b/ext/ldap/tests/ldap_dn2ufn.phpt
new file mode 100644
index 000000000..50e4572d3
--- /dev/null
+++ b/ext/ldap/tests/ldap_dn2ufn.phpt
@@ -0,0 +1,33 @@
+--TEST--
+ldap_dn2ufn() test
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+/* Convert valid DN */
+var_dump(ldap_dn2ufn("cn=bob,dc=example,dc=com"));
+
+/* Convert valid DN */
+var_dump(ldap_dn2ufn("cn=bob,ou=users,dc=example,dc=com"));
+
+/* Convert DN with < > characters */
+var_dump(ldap_dn2ufn("cn=<bob>,dc=example,dc=com"));
+
+/* Too many parameters */
+ldap_dn2ufn("cn=bob,dc=example,dc=com", 1);
+
+/* Bad DN value */
+var_dump(ldap_dn2ufn("bob,dc=example,dc=com"));
+
+echo "Done\n";
+
+?>
+--EXPECTF--
+string(16) "bob, example.com"
+string(23) "bob, users, example.com"
+bool(false)
+
+Warning: Wrong parameter count for ldap_dn2ufn() in %s on line %d
+bool(false)
+Done
diff --git a/ext/ldap/tests/ldap_explode_dn.phpt b/ext/ldap/tests/ldap_explode_dn.phpt
new file mode 100644
index 000000000..f713ca31f
--- /dev/null
+++ b/ext/ldap/tests/ldap_explode_dn.phpt
@@ -0,0 +1,94 @@
+--TEST--
+ldap_explode_dn() test
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+/* Explode with attributes */
+var_dump(ldap_explode_dn("cn=bob,dc=example,dc=com", 0));
+
+/* Explode with attributes */
+var_dump(ldap_explode_dn("cn=bob,ou=users,dc=example,dc=com", 0));
+
+/* Explode without attributes */
+var_dump(ldap_explode_dn("cn=bob,dc=example,dc=com", 1));
+
+/* Explode without attributes */
+var_dump(ldap_explode_dn("cn=bob,ou=users,dc=example,dc=com", 1));
+
+/* Explode with attributes and < > characters */
+var_dump(ldap_explode_dn("cn=<bob>,dc=example,dc=com", 0));
+
+/* Explode without attributes and < > characters */
+var_dump(ldap_explode_dn("cn=<bob>,dc=example,dc=com", 1));
+
+/* Too few parameters */
+ldap_explode_dn("cn=bob,dc=example,dc=com");
+
+/* Too many parameters */
+ldap_explode_dn("cn=bob,dc=example,dc=com", 1, 1);
+
+/* Bad DN value with attributes */
+var_dump(ldap_explode_dn("bob,dc=example,dc=com", 0));
+
+/* Bad DN value without attributes */
+var_dump(ldap_explode_dn("bob,dc=example,dc=com", 1));
+
+echo "Done\n";
+
+?>
+--EXPECTF--
+array(4) {
+ ["count"]=>
+ int(3)
+ [0]=>
+ string(6) "cn=bob"
+ [1]=>
+ string(10) "dc=example"
+ [2]=>
+ string(6) "dc=com"
+}
+array(5) {
+ ["count"]=>
+ int(4)
+ [0]=>
+ string(6) "cn=bob"
+ [1]=>
+ string(8) "ou=users"
+ [2]=>
+ string(10) "dc=example"
+ [3]=>
+ string(6) "dc=com"
+}
+array(4) {
+ ["count"]=>
+ int(3)
+ [0]=>
+ string(3) "bob"
+ [1]=>
+ string(7) "example"
+ [2]=>
+ string(3) "com"
+}
+array(5) {
+ ["count"]=>
+ int(4)
+ [0]=>
+ string(3) "bob"
+ [1]=>
+ string(5) "users"
+ [2]=>
+ string(7) "example"
+ [3]=>
+ string(3) "com"
+}
+bool(false)
+bool(false)
+
+Warning: Wrong parameter count for ldap_explode_dn() in %s on line %d
+
+Warning: Wrong parameter count for ldap_explode_dn() in %s on line %d
+bool(false)
+bool(false)
+Done
diff --git a/ext/ldap/tests/skipif.inc b/ext/ldap/tests/skipif.inc
new file mode 100644
index 000000000..d3494284b
--- /dev/null
+++ b/ext/ldap/tests/skipif.inc
@@ -0,0 +1,5 @@
+<?php
+if (!extension_loaded('ldap')){
+ die('skip ldap extension not available');
+}
+?>
diff --git a/ext/libxml/config.w32 b/ext/libxml/config.w32
index 963960364..37ddac1ef 100644
--- a/ext/libxml/config.w32
+++ b/ext/libxml/config.w32
@@ -1,16 +1,16 @@
-// $Id: config.w32,v 1.8 2005/02/25 22:59:26 fmk Exp $
+// $Id: config.w32,v 1.8.4.1 2008/01/11 13:37:24 rrichards Exp $
// vim:ft=javascript
ARG_WITH("libxml", "LibXML support", "yes");
if (PHP_LIBXML == "yes") {
- if (CHECK_LIB("libxml2_a.lib;libxml2.lib", "libxml") &&
+ if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
CHECK_LIB("iconv_a.lib;iconv.lib", "libxml") &&
CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS")) {
EXTENSION("libxml", "libxml.c", false /* never shared */);
AC_DEFINE("HAVE_LIBXML", 1, "LibXML support");
- ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC ");
+ ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL ");
if (!PHP_LIBXML_SHARED) {
ADD_DEF_FILE("ext\\libxml\\php_libxml2.def");
}
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 923194833..a715c5403 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: libxml.c,v 1.32.2.7.2.15 2007/08/01 11:43:05 tony2001 Exp $ */
+/* $Id: libxml.c,v 1.32.2.7.2.17 2008/01/30 15:29:51 rrichards Exp $ */
#define IS_EXT_MODULE
@@ -141,24 +141,6 @@ zend_module_entry libxml_module_entry = {
/* }}} */
/* {{{ internal functions for interoperability */
-static int php_libxml_dec_node(php_libxml_node_ptr *nodeptr)
-{
- int ret_refcount;
-
- ret_refcount = --nodeptr->refcount;
- if (ret_refcount == 0) {
- if (nodeptr->node != NULL && nodeptr->node->type != XML_DOCUMENT_NODE) {
- nodeptr->node->_private = NULL;
- }
- /* node is destroyed by another object. reset ret_refcount to 1 and node to NULL
- so the php_libxml_node_ptr is detroyed when the object is destroyed */
- nodeptr->refcount = 1;
- nodeptr->node = NULL;
- }
-
- return ret_refcount;
-}
-
static int php_libxml_clear_object(php_libxml_node_object *object TSRMLS_DC)
{
if (object->properties) {
@@ -179,7 +161,10 @@ static int php_libxml_unregister_node(xmlNodePtr nodep TSRMLS_DC)
if (wrapper) {
php_libxml_clear_object(wrapper TSRMLS_CC);
} else {
- php_libxml_dec_node(nodeptr);
+ if (nodeptr->node != NULL && nodeptr->node->type != XML_DOCUMENT_NODE) {
+ nodeptr->node->_private = NULL;
+ }
+ nodeptr->node = NULL;
}
}
diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h
index f2af8c800..d5707178b 100644
--- a/ext/libxml/php_libxml.h
+++ b/ext/libxml/php_libxml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_libxml.h,v 1.15.2.2.2.6 2007/08/01 11:43:05 tony2001 Exp $ */
+/* $Id: php_libxml.h,v 1.15.2.2.2.7 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef PHP_LIBXML_H
#define PHP_LIBXML_H
diff --git a/ext/libxml/php_libxml2.def b/ext/libxml/php_libxml2.def
index ef21f5e64..9557b3e34 100644
--- a/ext/libxml/php_libxml2.def
+++ b/ext/libxml/php_libxml2.def
@@ -1,1543 +1,1544 @@
-EXPORTS
-__docbDefaultSAXHandler
-__htmlDefaultSAXHandler
-__oldXMLWDcompatibility
-__xmlBufferAllocScheme
-__xmlDefaultBufferSize
-__xmlDefaultSAXHandler
-__xmlDefaultSAXLocator
-__xmlDeregisterNodeDefaultValue
-__xmlDoValidityCheckingDefaultValue
-xmlFree DATA
-__xmlGenericError
-__xmlGenericErrorContext
-__xmlGetWarningsDefaultValue
-__xmlIndentTreeOutput
-xmlIsBaseCharGroup DATA
-xmlIsCharGroup DATA
-xmlIsCombiningGroup DATA
-xmlIsDigitGroup DATA
-xmlIsExtenderGroup DATA
-xmlIsIdeographicGroup DATA
-xmlIsPubidChar_tab DATA
-__xmlKeepBlanksDefaultValue
-xmlLastError DATA
-__xmlLineNumbersDefaultValue
-__xmlLoadExtDtdDefaultValue
-xmlMalloc DATA
-xmlMallocAtomic DATA
-xmlMemStrdup DATA
-xmlOutputBufferCreateFilenameValue DATA
-__xmlParserDebugEntities
-xmlParserInputBufferCreateFilenameValue DATA
-xmlParserMaxDepth DATA
-__xmlParserVersion
-__xmlPedanticParserDefaultValue
-xmlRealloc DATA
-__xmlRegisterNodeDefaultValue
-__xmlSaveNoEmptyTags
-xmlStringComment DATA
-xmlStringText DATA
-xmlStringTextNoenc DATA
-xmlStructuredError DATA
-__xmlSubstituteEntitiesDefaultValue
-__xmlTreeIndentString
-xmlXPathNAN DATA
-xmlXPathNINF DATA
-xmlXPathPINF DATA
-UTF8ToHtml
-UTF8Toisolat1
-attribute
-attributeDecl
-cdataBlock
-characters
-checkNamespace
-comment
-docbCreateFileParserCtxt
-docbCreatePushParserCtxt
-docbDefaultSAXHandlerInit
-docbEncodeEntities
-docbFreeParserCtxt
-docbParseChunk
-docbParseDoc
-docbParseDocument
-docbParseFile
-docbSAXParseDoc
-docbSAXParseFile
-elementDecl
-endDocument
-endElement
-entityDecl
-externalSubset
-getColumnNumber
-getEntity
-getLineNumber
-getNamespace
-getParameterEntity
-getPublicId
-getSystemId
-globalNamespace
-hasExternalSubset
-hasInternalSubset
-htmlAttrAllowed
-htmlAutoCloseTag
-htmlCreateFileParserCtxt
-htmlCreateMemoryParserCtxt
-htmlCreatePushParserCtxt
-htmlCtxtReadDoc
-htmlCtxtReadFd
-htmlCtxtReadFile
-htmlCtxtReadIO
-htmlCtxtReadMemory
-htmlCtxtReset
-htmlCtxtUseOptions
-htmlDefaultSAXHandlerInit
-htmlDocContentDumpFormatOutput
-htmlDocContentDumpOutput
-htmlDocDump
-htmlDocDumpMemory
-htmlElementAllowedHere
-htmlElementStatusHere
-htmlEncodeEntities
-htmlEntityLookup
-htmlEntityValueLookup
-htmlFreeParserCtxt
-htmlGetMetaEncoding
-htmlHandleOmittedElem
-htmlInitAutoClose
-htmlIsAutoClosed
-htmlIsBooleanAttr
-htmlIsScriptAttribute
-htmlNewDoc
-htmlNewDocNoDtD
-htmlNodeDump
-htmlNodeDumpFile
-htmlNodeDumpFileFormat
-htmlNodeDumpFormatOutput
-htmlNodeDumpOutput
-htmlNodeStatus
-htmlParseCharRef
-htmlParseChunk
-htmlParseDoc
-htmlParseDocument
-htmlParseElement
-htmlParseEntityRef
-htmlParseFile
-htmlReadDoc
-htmlReadFd
-htmlReadFile
-htmlReadIO
-htmlReadMemory
-htmlSAXParseDoc
-htmlSAXParseFile
-htmlSaveFile
-htmlSaveFileEnc
-htmlSaveFileFormat
-htmlSetMetaEncoding
-htmlTagLookup
-ignorableWhitespace
-initGenericErrorDefaultFunc
-initdocbDefaultSAXHandler
-inithtmlDefaultSAXHandler
-initxmlDefaultSAXHandler
-inputPop
-inputPush
-internalSubset
-isStandalone
-isolat1ToUTF8
-namePop
-namePush
-namespaceDecl
-nodePop
-nodePush
-notationDecl
-processingInstruction
-reference
-resolveEntity
-setDocumentLocator
-setNamespace
-startDocument
-startElement
-unparsedEntityDecl
-valuePop
-valuePush
-xmlACatalogAdd
-xmlACatalogDump
-xmlACatalogRemove
-xmlACatalogResolve
-xmlACatalogResolvePublic
-xmlACatalogResolveSystem
-xmlACatalogResolveURI
-xmlAddAttributeDecl
-xmlAddChild
-xmlAddChildList
-xmlAddDocEntity
-xmlAddDtdEntity
-xmlAddElementDecl
-xmlAddEncodingAlias
-xmlAddID
-xmlAddNextSibling
-xmlAddNotationDecl
-xmlAddPrevSibling
-xmlAddRef
-xmlAddSibling
-xmlAllocOutputBuffer
-xmlAllocParserInputBuffer
-xmlAttrSerializeTxtContent
-xmlAutomataCompile
-xmlAutomataGetInitState
-xmlAutomataIsDeterminist
-xmlAutomataNewAllTrans
-xmlAutomataNewCountTrans
-xmlAutomataNewCountTrans2
-xmlAutomataNewCountedTrans
-xmlAutomataNewCounter
-xmlAutomataNewCounterTrans
-xmlAutomataNewEpsilon
-xmlAutomataNewOnceTrans
-xmlAutomataNewOnceTrans2
-xmlAutomataNewState
-xmlAutomataNewTransition
-xmlAutomataNewTransition2
-xmlAutomataSetFinalState
-xmlBoolToText
-xmlBufferAdd
-xmlBufferAddHead
-xmlBufferCCat
-xmlBufferCat
-xmlBufferContent
-xmlBufferCreate
-xmlBufferCreateSize
-xmlBufferCreateStatic
-xmlBufferDump
-xmlBufferEmpty
-xmlBufferFree
-xmlBufferGrow
-xmlBufferLength
-xmlBufferResize
-xmlBufferSetAllocationScheme
-xmlBufferShrink
-xmlBufferWriteCHAR
-xmlBufferWriteChar
-xmlBufferWriteQuotedString
-xmlBuildQName
-xmlBuildRelativeURI
-xmlBuildURI
-xmlByteConsumed
-xmlC14NDocDumpMemory
-xmlC14NDocSave
-xmlC14NDocSaveTo
-xmlC14NExecute
-xmlCanonicPath
-xmlCatalogAdd
-xmlCatalogAddLocal
-xmlCatalogCleanup
-xmlCatalogConvert
-xmlCatalogDump
-xmlCatalogFreeLocal
-xmlCatalogGetDefaults
-xmlCatalogGetPublic
-xmlCatalogGetSystem
-xmlCatalogIsEmpty
-xmlCatalogLocalResolve
-xmlCatalogLocalResolveURI
-xmlCatalogRemove
-xmlCatalogResolve
-xmlCatalogResolvePublic
-xmlCatalogResolveSystem
-xmlCatalogResolveURI
-xmlCatalogSetDebug
-xmlCatalogSetDefaultPrefer
-xmlCatalogSetDefaults
-xmlCharEncCloseFunc
-xmlCharEncFirstLine
-xmlCharEncInFunc
-xmlCharEncOutFunc
-xmlCharInRange
-xmlCharStrdup
-xmlCharStrndup
-xmlCheckFilename
-xmlCheckHTTPInput
-xmlCheckLanguageID
-xmlCheckUTF8
-xmlCheckVersion
-xmlCleanupCharEncodingHandlers
-xmlCleanupEncodingAliases
-xmlCleanupGlobals
-xmlCleanupInputCallbacks
-xmlCleanupMemory
-xmlCleanupOutputCallbacks
-xmlCleanupParser
-xmlCleanupPredefinedEntities
-xmlCleanupThreads
-xmlClearNodeInfoSeq
-xmlClearParserCtxt
-xmlConvertSGMLCatalog
-xmlCopyAttributeTable
-xmlCopyChar
-xmlCopyCharMultiByte
-xmlCopyDoc
-xmlCopyDtd
-xmlCopyElementContent
-xmlCopyElementTable
-xmlCopyEntitiesTable
-xmlCopyEnumeration
-xmlCopyError
-xmlCopyNamespace
-xmlCopyNamespaceList
-xmlCopyNode
-xmlCopyNodeList
-xmlCopyNotationTable
-xmlCopyProp
-xmlCopyPropList
-xmlCreateDocParserCtxt
-xmlCreateEntitiesTable
-xmlCreateEntityParserCtxt
-xmlCreateEnumeration
-xmlCreateFileParserCtxt
-xmlCreateIOParserCtxt
-xmlCreateIntSubset
-xmlCreateMemoryParserCtxt
-xmlCreatePushParserCtxt
-xmlCreateURI
-xmlCreateURLParserCtxt
-xmlCtxtGetLastError
-xmlCtxtReadDoc
-xmlCtxtReadFd
-xmlCtxtReadFile
-xmlCtxtReadIO
-xmlCtxtReadMemory
-xmlCtxtReset
-xmlCtxtResetLastError
-xmlCtxtResetPush
-xmlCtxtUseOptions
-xmlCurrentChar
-xmlDebugCheckDocument
-xmlDebugDumpAttr
-xmlDebugDumpAttrList
-xmlDebugDumpDTD
-xmlDebugDumpDocument
-xmlDebugDumpDocumentHead
-xmlDebugDumpEntities
-xmlDebugDumpNode
-xmlDebugDumpNodeList
-xmlDebugDumpOneNode
-xmlDebugDumpString
-xmlDecodeEntities
-xmlDefaultSAXHandlerInit
-xmlDelEncodingAlias
-xmlDeregisterNodeDefault
-xmlDetectCharEncoding
-xmlDictCreate
-xmlDictCreateSub
-xmlDictFree
-xmlDictLookup
-xmlDictOwns
-xmlDictQLookup
-xmlDictReference
-xmlDictSize
-xmlDocCopyNode
-xmlDocCopyNodeList
-xmlDocDump
-xmlDocDumpFormatMemory
-xmlDocDumpFormatMemoryEnc
-xmlDocDumpMemory
-xmlDocDumpMemoryEnc
-xmlDocFormatDump
-xmlDocGetRootElement
-xmlDocSetRootElement
-xmlDumpAttributeDecl
-xmlDumpAttributeTable
-xmlDumpElementDecl
-xmlDumpElementTable
-xmlDumpEntitiesTable
-xmlDumpEntityDecl
-xmlDumpNotationDecl
-xmlDumpNotationTable
-xmlElemDump
-xmlEncodeEntities
-xmlEncodeEntitiesReentrant
-xmlEncodeSpecialChars
-xmlErrMemory
-xmlFileClose
-xmlFileMatch
-xmlFileOpen
-xmlFileRead
-xmlFindCharEncodingHandler
-xmlFreeAttributeTable
-xmlFreeAutomata
-xmlFreeCatalog
-xmlFreeDoc
-xmlFreeDtd
-xmlFreeElementContent
-xmlFreeElementTable
-xmlFreeEntitiesTable
-xmlFreeEnumeration
-xmlFreeIDTable
-xmlFreeInputStream
-xmlFreeMutex
-xmlFreeNode
-xmlFreeNodeList
-xmlFreeNotationTable
-xmlFreeNs
-xmlFreeNsList
-xmlFreeParserCtxt
-xmlFreeParserInputBuffer
-xmlFreePattern
-xmlFreePatternList
-xmlFreeProp
-xmlFreePropList
-xmlFreeRMutex
-xmlFreeRefTable
-xmlFreeTextReader
-xmlFreeTextWriter
-xmlFreeURI
-xmlFreeValidCtxt
-xmlGcMemGet
-xmlGcMemSetup
-xmlGetBufferAllocationScheme
-xmlGetCharEncodingHandler
-xmlGetCharEncodingName
-xmlGetCompressMode
-xmlGetDocCompressMode
-xmlGetDocEntity
-xmlGetDtdAttrDesc
-xmlGetDtdElementDesc
-xmlGetDtdEntity
-xmlGetDtdNotationDesc
-xmlGetDtdQAttrDesc
-xmlGetDtdQElementDesc
-xmlGetEncodingAlias
-xmlGetExternalEntityLoader
-xmlGetFeature
-xmlGetFeaturesList
-xmlGetGlobalState
-xmlGetID
-xmlGetIntSubset
-xmlGetLastChild
-xmlGetLastError
-xmlGetLineNo
-xmlGetNoNsProp
-xmlGetNodePath
-xmlGetNsList
-xmlGetNsProp
-xmlGetParameterEntity
-xmlGetPredefinedEntity
-xmlGetProp
-xmlGetRefs
-xmlGetThreadId
-xmlGetUTF8Char
-xmlHandleEntity
-xmlHasNsProp
-xmlHasProp
-xmlHashAddEntry
-xmlHashAddEntry2
-xmlHashAddEntry3
-xmlHashCopy
-xmlHashCreate
-xmlHashFree
-xmlHashLookup
-xmlHashLookup2
-xmlHashLookup3
-xmlHashQLookup
-xmlHashQLookup2
-xmlHashQLookup3
-xmlHashRemoveEntry
-xmlHashRemoveEntry2
-xmlHashRemoveEntry3
-xmlHashScan
-xmlHashScan3
-xmlHashScanFull
-xmlHashScanFull3
-xmlHashSize
-xmlHashUpdateEntry
-xmlHashUpdateEntry2
-xmlHashUpdateEntry3
-xmlIOFTPClose
-xmlIOFTPMatch
-xmlIOFTPOpen
-xmlIOFTPRead
-xmlIOHTTPClose
-xmlIOHTTPMatch
-xmlIOHTTPOpen
-xmlIOHTTPOpenW
-xmlIOHTTPRead
-xmlIOParseDTD
-xmlInitCharEncodingHandlers
-xmlInitGlobals
-xmlInitMemory
-xmlInitNodeInfoSeq
-xmlInitParser
-xmlInitParserCtxt
-xmlInitThreads
-xmlInitializeCatalog
-xmlInitializeGlobalState
-xmlInitializePredefinedEntities
-xmlIsBaseChar
-xmlIsBlank
-xmlIsBlankNode
-xmlIsChar
-xmlIsCombining
-xmlIsDigit
-xmlIsExtender
-xmlIsID
-xmlIsIdeographic
-xmlIsLetter
-xmlIsMainThread
-xmlIsMixedElement
-xmlIsPubidChar
-xmlIsRef
-xmlIsXHTML
-xmlKeepBlanksDefault
-xmlLineNumbersDefault
-xmlLinkGetData
-xmlListAppend
-xmlListClear
-xmlListCopy
-xmlListCreate
-xmlListDelete
-xmlListDup
-xmlListEmpty
-xmlListEnd
-xmlListFront
-xmlListInsert
-xmlListMerge
-xmlListPopBack
-xmlListPopFront
-xmlListPushBack
-xmlListPushFront
-xmlListRemoveAll
-xmlListRemoveFirst
-xmlListRemoveLast
-xmlListReverse
-xmlListReverseSearch
-xmlListReverseWalk
-xmlListSearch
-xmlListSize
-xmlListSort
-xmlListWalk
-xmlLoadACatalog
-xmlLoadCatalog
-xmlLoadCatalogs
-xmlLoadExternalEntity
-xmlLoadSGMLSuperCatalog
-xmlLockLibrary
-xmlLsCountNode
-xmlLsOneNode
-xmlMallocAtomicLoc
-xmlMallocLoc
-xmlMemBlocks
-xmlMemDisplay
-xmlMemFree
-xmlMemGet
-xmlMemMalloc
-xmlMemRealloc
-xmlMemSetup
-xmlMemShow
-xmlMemStrdupLoc
-xmlMemUsed
-xmlMemoryDump
-xmlMemoryStrdup
-xmlModuleClose
-xmlModuleFree
-xmlModuleOpen
-xmlModuleSymbol
-xmlMutexLock
-xmlMutexUnlock
-xmlNamespaceParseNCName
-xmlNamespaceParseNSDef
-xmlNamespaceParseQName
-xmlNanoFTPCheckResponse
-xmlNanoFTPCleanup
-xmlNanoFTPClose
-xmlNanoFTPCloseConnection
-xmlNanoFTPConnect
-xmlNanoFTPConnectTo
-xmlNanoFTPCwd
-xmlNanoFTPDele
-xmlNanoFTPFreeCtxt
-xmlNanoFTPGet
-xmlNanoFTPGetConnection
-xmlNanoFTPGetResponse
-xmlNanoFTPGetSocket
-xmlNanoFTPInit
-xmlNanoFTPList
-xmlNanoFTPNewCtxt
-xmlNanoFTPOpen
-xmlNanoFTPProxy
-xmlNanoFTPQuit
-xmlNanoFTPRead
-xmlNanoFTPScanProxy
-xmlNanoFTPUpdateURL
-xmlNanoHTTPAuthHeader
-xmlNanoHTTPCleanup
-xmlNanoHTTPClose
-xmlNanoHTTPContentLength
-xmlNanoHTTPEncoding
-xmlNanoHTTPFetch
-xmlNanoHTTPInit
-xmlNanoHTTPMethod
-xmlNanoHTTPMethodRedir
-xmlNanoHTTPMimeType
-xmlNanoHTTPOpen
-xmlNanoHTTPOpenRedir
-xmlNanoHTTPRead
-xmlNanoHTTPRedir
-xmlNanoHTTPReturnCode
-xmlNanoHTTPSave
-xmlNanoHTTPScanProxy
-xmlNewAutomata
-xmlNewCDataBlock
-xmlNewCatalog
-xmlNewCharEncodingHandler
-xmlNewCharRef
-xmlNewChild
-xmlNewComment
-xmlNewDoc
-xmlNewDocComment
-xmlNewDocFragment
-xmlNewDocNode
-xmlNewDocNodeEatName
-xmlNewDocPI
-xmlNewDocProp
-xmlNewDocRawNode
-xmlNewDocText
-xmlNewDocTextLen
-xmlNewDtd
-xmlNewElementContent
-xmlNewEntityInputStream
-xmlNewGlobalNs
-xmlNewIOInputStream
-xmlNewInputFromFile
-xmlNewInputStream
-xmlNewMutex
-xmlNewNode
-xmlNewNodeEatName
-xmlNewNs
-xmlNewNsProp
-xmlNewNsPropEatName
-xmlNewPI
-xmlNewParserCtxt
-xmlNewProp
-xmlNewRMutex
-xmlNewReference
-xmlNewStringInputStream
-xmlNewText
-xmlNewTextChild
-xmlNewTextLen
-xmlNewTextReader
-xmlNewTextReaderFilename
-xmlNewTextWriter
-xmlNewTextWriterDoc
-xmlNewTextWriterFilename
-xmlNewTextWriterMemory
-xmlNewTextWriterPushParser
-xmlNewTextWriterTree
-xmlNewValidCtxt
-xmlNextChar
-xmlNoNetExternalEntityLoader
-xmlNodeAddContent
-xmlNodeAddContentLen
-xmlNodeBufGetContent
-xmlNodeDump
-xmlNodeDumpOutput
-xmlNodeGetBase
-xmlNodeGetContent
-xmlNodeGetLang
-xmlNodeGetSpacePreserve
-xmlNodeIsText
-xmlNodeListGetRawString
-xmlNodeListGetString
-xmlNodeSetBase
-xmlNodeSetContent
-xmlNodeSetContentLen
-xmlNodeSetLang
-xmlNodeSetName
-xmlNodeSetSpacePreserve
-xmlNormalizeURIPath
-xmlNormalizeWindowsPath
-xmlOutputBufferClose
-xmlOutputBufferCreateFd
-xmlOutputBufferCreateFile
-xmlOutputBufferCreateFilename
-xmlOutputBufferCreateFilenameDefault
-xmlOutputBufferCreateIO
-xmlOutputBufferFlush
-xmlOutputBufferWrite
-xmlOutputBufferWriteEscape
-xmlOutputBufferWriteString
-xmlParseAttValue
-xmlParseAttribute
-xmlParseAttributeListDecl
-xmlParseAttributeType
-xmlParseBalancedChunkMemory
-xmlParseBalancedChunkMemoryRecover
-xmlParseCDSect
-xmlParseCatalogFile
-xmlParseCharData
-xmlParseCharEncoding
-xmlParseCharRef
-xmlParseChunk
-xmlParseComment
-xmlParseContent
-xmlParseCtxtExternalEntity
-xmlParseDTD
-xmlParseDefaultDecl
-xmlParseDoc
-xmlParseDocTypeDecl
-xmlParseDocument
-xmlParseElement
-xmlParseElementChildrenContentDecl
-xmlParseElementContentDecl
-xmlParseElementDecl
-xmlParseElementMixedContentDecl
-xmlParseEncName
-xmlParseEncodingDecl
-xmlParseEndTag
-xmlParseEntity
-xmlParseEntityDecl
-xmlParseEntityRef
-xmlParseEntityValue
-xmlParseEnumeratedType
-xmlParseEnumerationType
-xmlParseExtParsedEnt
-xmlParseExternalEntity
-xmlParseExternalID
-xmlParseExternalSubset
-xmlParseFile
-xmlParseInNodeContext
-xmlParseMarkupDecl
-xmlParseMemory
-xmlParseMisc
-xmlParseName
-xmlParseNamespace
-xmlParseNmtoken
-xmlParseNotationDecl
-xmlParseNotationType
-xmlParsePEReference
-xmlParsePI
-xmlParsePITarget
-xmlParsePubidLiteral
-xmlParseQuotedString
-xmlParseReference
-xmlParseSDDecl
-xmlParseStartTag
-xmlParseSystemLiteral
-xmlParseTextDecl
-xmlParseURI
-xmlParseURIReference
-xmlParseVersionInfo
-xmlParseVersionNum
-xmlParseXMLDecl
-xmlParserAddNodeInfo
-xmlParserError
-xmlParserFindNodeInfo
-xmlParserFindNodeInfoIndex
-xmlParserGetDirectory
-xmlParserHandlePEReference
-xmlParserHandleReference
-xmlParserInputBufferCreateFd
-xmlParserInputBufferCreateFile
-xmlParserInputBufferCreateFilename
-xmlParserInputBufferCreateFilenameDefault
-xmlParserInputBufferCreateIO
-xmlParserInputBufferCreateMem
-xmlParserInputBufferCreateStatic
-xmlParserInputBufferGrow
-xmlParserInputBufferPush
-xmlParserInputBufferRead
-xmlParserInputGrow
-xmlParserInputRead
-xmlParserInputShrink
-xmlParserPrintFileContext
-xmlParserPrintFileInfo
-xmlParserValidityError
-xmlParserValidityWarning
-xmlParserWarning
-xmlPatternMatch
-xmlPatterncompile
-xmlPedanticParserDefault
-xmlPopInput
-xmlPopInputCallbacks
-xmlPrintURI
-xmlPushInput
-xmlRMutexLock
-xmlRMutexUnlock
-xmlReadDoc
-xmlReadFd
-xmlReadFile
-xmlReadIO
-xmlReadMemory
-xmlReaderForDoc
-xmlReaderForFd
-xmlReaderForFile
-xmlReaderForIO
-xmlReaderForMemory
-xmlReaderNewDoc
-xmlReaderNewFd
-xmlReaderNewFile
-xmlReaderNewIO
-xmlReaderNewMemory
-xmlReaderNewWalker
-xmlReaderWalker
-xmlReallocLoc
-xmlReconciliateNs
-xmlRecoverDoc
-xmlRecoverFile
-xmlRecoverMemory
-xmlRegExecPushString
-xmlRegExecPushString2
-xmlRegFreeExecCtxt
-xmlRegFreeRegexp
-xmlRegNewExecCtxt
-xmlRegexpCompile
-xmlRegexpExec
-xmlRegexpIsDeterminist
-xmlRegexpPrint
-xmlRegisterCharEncodingHandler
-xmlRegisterDefaultInputCallbacks
-xmlRegisterDefaultOutputCallbacks
-xmlRegisterHTTPPostCallbacks
-xmlRegisterInputCallbacks
-xmlRegisterNodeDefault
-xmlRegisterOutputCallbacks
-xmlRelaxNGCleanupTypes
-xmlRelaxNGDump
-xmlRelaxNGDumpTree
-xmlRelaxNGFree
-xmlRelaxNGFreeParserCtxt
-xmlRelaxNGFreeValidCtxt
-xmlRelaxNGGetParserErrors
-xmlRelaxNGGetValidErrors
-xmlRelaxNGInitTypes
-xmlRelaxNGNewDocParserCtxt
-xmlRelaxNGNewMemParserCtxt
-xmlRelaxNGNewParserCtxt
-xmlRelaxNGNewValidCtxt
-xmlRelaxNGParse
-xmlRelaxNGSetParserErrors
-xmlRelaxNGSetValidErrors
-xmlRelaxNGValidateDoc
-xmlRelaxNGValidateFullElement
-xmlRelaxNGValidatePopElement
-xmlRelaxNGValidatePushCData
-xmlRelaxNGValidatePushElement
-xmlRelaxParserSetFlag
-xmlRemoveID
-xmlRemoveProp
-xmlRemoveRef
-xmlReplaceNode
-xmlResetError
-xmlResetLastError
-xmlSAX2AttributeDecl
-xmlSAX2CDataBlock
-xmlSAX2Characters
-xmlSAX2Comment
-xmlSAX2ElementDecl
-xmlSAX2EndDocument
-xmlSAX2EndElement
-xmlSAX2EndElementNs
-xmlSAX2EntityDecl
-xmlSAX2ExternalSubset
-xmlSAX2GetColumnNumber
-xmlSAX2GetEntity
-xmlSAX2GetLineNumber
-xmlSAX2GetParameterEntity
-xmlSAX2GetPublicId
-xmlSAX2GetSystemId
-xmlSAX2HasExternalSubset
-xmlSAX2HasInternalSubset
-xmlSAX2IgnorableWhitespace
-xmlSAX2InitDefaultSAXHandler
-xmlSAX2InitDocbDefaultSAXHandler
-xmlSAX2InitHtmlDefaultSAXHandler
-xmlSAX2InternalSubset
-xmlSAX2IsStandalone
-xmlSAX2NotationDecl
-xmlSAX2ProcessingInstruction
-xmlSAX2Reference
-xmlSAX2ResolveEntity
-xmlSAX2SetDocumentLocator
-xmlSAX2StartDocument
-xmlSAX2StartElement
-xmlSAX2StartElementNs
-xmlSAX2UnparsedEntityDecl
-xmlSAXDefaultVersion
-xmlSAXParseDTD
-xmlSAXParseDoc
-xmlSAXParseEntity
-xmlSAXParseFile
-xmlSAXParseFileWithData
-xmlSAXParseMemory
-xmlSAXParseMemoryWithData
-xmlSAXUserParseFile
-xmlSAXUserParseMemory
-xmlSAXVersion
-xmlSaveClose
-xmlSaveDoc
-xmlSaveFile
-xmlSaveFileEnc
-xmlSaveFileTo
-xmlSaveFlush
-xmlSaveFormatFile
-xmlSaveFormatFileEnc
-xmlSaveFormatFileTo
-xmlSaveSetAttrEscape
-xmlSaveSetEscape
-xmlSaveToFd
-xmlSaveToFilename
-xmlSaveToIO
-xmlSaveTree
-xmlSaveUri
-xmlScanName
-xmlSchemaCheckFacet
-xmlSchemaCleanupTypes
-xmlSchemaCollapseString
-xmlSchemaCompareValues
-xmlSchemaDump
-xmlSchemaFree
-xmlSchemaFreeFacet
-xmlSchemaFreeParserCtxt
-xmlSchemaFreeType
-xmlSchemaFreeValidCtxt
-xmlSchemaFreeValue
-xmlSchemaFreeWildcard
-xmlSchemaGetBuiltInListSimpleTypeItemType
-xmlSchemaGetBuiltInType
-xmlSchemaGetFacetValueAsULong
-xmlSchemaGetParserErrors
-xmlSchemaGetPredefinedType
-xmlSchemaGetValidErrors
-xmlSchemaInitTypes
-xmlSchemaIsBuiltInTypeFacet
-xmlSchemaNewDocParserCtxt
-xmlSchemaNewFacet
-xmlSchemaNewMemParserCtxt
-xmlSchemaNewParserCtxt
-xmlSchemaNewValidCtxt
-xmlSchemaParse
-xmlSchemaSetParserErrors
-xmlSchemaSetValidErrors
-xmlSchemaSetValidOptions
-xmlSchemaValPredefTypeNode
-xmlSchemaValPredefTypeNodeNoNorm
-xmlSchemaValidCtxtGetOptions
-xmlSchemaValidateDoc
-xmlSchemaValidateFacet
-xmlSchemaValidateLengthFacet
-xmlSchemaValidateListSimpleTypeFacet
-xmlSchemaValidateOneElement
-xmlSchemaValidatePredefinedType
-xmlSchemaValidateStream
-xmlSearchNs
-xmlSearchNsByHref
-xmlSetBufferAllocationScheme
-xmlSetCompressMode
-xmlSetDocCompressMode
-xmlSetEntityReferenceFunc
-xmlSetExternalEntityLoader
-xmlSetFeature
-xmlSetGenericErrorFunc
-xmlSetListDoc
-xmlSetNs
-xmlSetNsProp
-xmlSetProp
-xmlSetStructuredErrorFunc
-xmlSetTreeDoc
-xmlSetupParserForBuffer
-xmlShell
-xmlShellBase
-xmlShellCat
-xmlShellDir
-xmlShellDu
-xmlShellList
-xmlShellLoad
-xmlShellPrintNode
-xmlShellPrintXPathError
-xmlShellPrintXPathResult
-xmlShellPwd
-xmlShellSave
-xmlShellValidate
-xmlShellWrite
-xmlSkipBlankChars
-xmlSnprintfElementContent
-xmlSplitQName
-xmlSplitQName2
-xmlSplitQName3
-xmlSprintfElementContent
-xmlStopParser
-xmlStrEqual
-xmlStrPrintf
-xmlStrQEqual
-xmlStrVPrintf
-xmlStrcasecmp
-xmlStrcasestr
-xmlStrcat
-xmlStrchr
-xmlStrcmp
-xmlStrdup
-xmlStringCurrentChar
-xmlStringDecodeEntities
-xmlStringGetNodeList
-xmlStringLenDecodeEntities
-xmlStringLenGetNodeList
-xmlStrlen
-xmlStrncasecmp
-xmlStrncat
-xmlStrncatNew
-xmlStrncmp
-xmlStrndup
-xmlStrstr
-xmlStrsub
-xmlSubstituteEntitiesDefault
-xmlSwitchEncoding
-xmlSwitchInputEncoding
-xmlSwitchToEncoding
-xmlTextConcat
-xmlTextMerge
-xmlTextReaderAttributeCount
-xmlTextReaderBaseUri
-xmlTextReaderClose
-xmlTextReaderConstBaseUri
-xmlTextReaderConstEncoding
-xmlTextReaderConstLocalName
-xmlTextReaderConstName
-xmlTextReaderConstNamespaceUri
-xmlTextReaderConstPrefix
-xmlTextReaderConstString
-xmlTextReaderConstValue
-xmlTextReaderConstXmlLang
-xmlTextReaderConstXmlVersion
-xmlTextReaderCurrentDoc
-xmlTextReaderCurrentNode
-xmlTextReaderDepth
-xmlTextReaderExpand
-xmlTextReaderGetAttribute
-xmlTextReaderGetAttributeNo
-xmlTextReaderGetAttributeNs
-xmlTextReaderGetErrorHandler
-xmlTextReaderGetParserProp
-xmlTextReaderGetRemainder
-xmlTextReaderHasAttributes
-xmlTextReaderHasValue
-xmlTextReaderIsDefault
-xmlTextReaderIsEmptyElement
-xmlTextReaderIsNamespaceDecl
-xmlTextReaderIsValid
-xmlTextReaderLocalName
-xmlTextReaderLocatorBaseURI
-xmlTextReaderLocatorLineNumber
-xmlTextReaderLookupNamespace
-xmlTextReaderMoveToAttribute
-xmlTextReaderMoveToAttributeNo
-xmlTextReaderMoveToAttributeNs
-xmlTextReaderMoveToElement
-xmlTextReaderMoveToFirstAttribute
-xmlTextReaderMoveToNextAttribute
-xmlTextReaderName
-xmlTextReaderNamespaceUri
-xmlTextReaderNext
-xmlTextReaderNextSibling
-xmlTextReaderNodeType
-xmlTextReaderNormalization
-xmlTextReaderPrefix
-xmlTextReaderPreserve
-xmlTextReaderPreservePattern
-xmlTextReaderQuoteChar
-xmlTextReaderRead
-xmlTextReaderReadAttributeValue
-xmlTextReaderReadInnerXml
-xmlTextReaderReadOuterXml
-xmlTextReaderReadState
-xmlTextReaderReadString
-xmlTextReaderRelaxNGSetSchema
-xmlTextReaderRelaxNGValidate
-xmlTextReaderSetErrorHandler
-xmlTextReaderSetParserProp
-xmlTextReaderSetStructuredErrorHandler
-xmlTextReaderStandalone
-xmlTextReaderValue
-xmlTextReaderXmlLang
-xmlTextWriterEndAttribute
-xmlTextWriterEndCDATA
-xmlTextWriterEndComment
-xmlTextWriterEndDTD
-xmlTextWriterEndDTDAttlist
-xmlTextWriterEndDTDElement
-xmlTextWriterEndDTDEntity
-xmlTextWriterEndDocument
-xmlTextWriterEndElement
-xmlTextWriterEndPI
-xmlTextWriterFlush
-xmlTextWriterFullEndElement
-xmlTextWriterSetIndent
-xmlTextWriterSetIndentString
-xmlTextWriterStartAttribute
-xmlTextWriterStartAttributeNS
-xmlTextWriterStartCDATA
-xmlTextWriterStartComment
-xmlTextWriterStartDTD
-xmlTextWriterStartDTDAttlist
-xmlTextWriterStartDTDElement
-xmlTextWriterStartDTDEntity
-xmlTextWriterStartDocument
-xmlTextWriterStartElement
-xmlTextWriterStartElementNS
-xmlTextWriterStartPI
-xmlTextWriterWriteAttribute
-xmlTextWriterWriteAttributeNS
-xmlTextWriterWriteBase64
-xmlTextWriterWriteBinHex
-xmlTextWriterWriteCDATA
-xmlTextWriterWriteComment
-xmlTextWriterWriteDTD
-xmlTextWriterWriteDTDAttlist
-xmlTextWriterWriteDTDElement
-xmlTextWriterWriteDTDEntity
-xmlTextWriterWriteDTDExternalEntity
-xmlTextWriterWriteDTDExternalEntityContents
-xmlTextWriterWriteDTDInternalEntity
-xmlTextWriterWriteDTDNotation
-xmlTextWriterWriteElement
-xmlTextWriterWriteElementNS
-xmlTextWriterWriteFormatAttribute
-xmlTextWriterWriteFormatAttributeNS
-xmlTextWriterWriteFormatCDATA
-xmlTextWriterWriteFormatComment
-xmlTextWriterWriteFormatDTD
-xmlTextWriterWriteFormatDTDAttlist
-xmlTextWriterWriteFormatDTDElement
-xmlTextWriterWriteFormatDTDInternalEntity
-xmlTextWriterWriteFormatElement
-xmlTextWriterWriteFormatElementNS
-xmlTextWriterWriteFormatPI
-xmlTextWriterWriteFormatRaw
-xmlTextWriterWriteFormatString
-xmlTextWriterWritePI
-xmlTextWriterWriteRaw
-xmlTextWriterWriteRawLen
-xmlTextWriterWriteString
-xmlTextWriterWriteVFormatAttribute
-xmlTextWriterWriteVFormatAttributeNS
-xmlTextWriterWriteVFormatCDATA
-xmlTextWriterWriteVFormatComment
-xmlTextWriterWriteVFormatDTD
-xmlTextWriterWriteVFormatDTDAttlist
-xmlTextWriterWriteVFormatDTDElement
-xmlTextWriterWriteVFormatDTDInternalEntity
-xmlTextWriterWriteVFormatElement
-xmlTextWriterWriteVFormatElementNS
-xmlTextWriterWriteVFormatPI
-xmlTextWriterWriteVFormatRaw
-xmlTextWriterWriteVFormatString
-xmlThrDefBufferAllocScheme
-xmlThrDefDefaultBufferSize
-xmlThrDefDeregisterNodeDefault
-xmlThrDefDoValidityCheckingDefaultValue
-xmlThrDefGetWarningsDefaultValue
-xmlThrDefIndentTreeOutput
-xmlThrDefKeepBlanksDefaultValue
-xmlThrDefLineNumbersDefaultValue
-xmlThrDefLoadExtDtdDefaultValue
-xmlThrDefOutputBufferCreateFilenameDefault
-xmlThrDefParserDebugEntities
-xmlThrDefParserInputBufferCreateFilenameDefault
-xmlThrDefPedanticParserDefaultValue
-xmlThrDefRegisterNodeDefault
-xmlThrDefSaveNoEmptyTags
-xmlThrDefSetGenericErrorFunc
-xmlThrDefSetStructuredErrorFunc
-xmlThrDefSubstituteEntitiesDefaultValue
-xmlThrDefTreeIndentString
-xmlUCSIsAegeanNumbers
-xmlUCSIsAlphabeticPresentationForms
-xmlUCSIsArabic
-xmlUCSIsArabicPresentationFormsA
-xmlUCSIsArabicPresentationFormsB
-xmlUCSIsArmenian
-xmlUCSIsArrows
-xmlUCSIsBasicLatin
-xmlUCSIsBengali
-xmlUCSIsBlock
-xmlUCSIsBlockElements
-xmlUCSIsBopomofo
-xmlUCSIsBopomofoExtended
-xmlUCSIsBoxDrawing
-xmlUCSIsBraillePatterns
-xmlUCSIsBuhid
-xmlUCSIsByzantineMusicalSymbols
-xmlUCSIsCJKCompatibility
-xmlUCSIsCJKCompatibilityForms
-xmlUCSIsCJKCompatibilityIdeographs
-xmlUCSIsCJKCompatibilityIdeographsSupplement
-xmlUCSIsCJKRadicalsSupplement
-xmlUCSIsCJKSymbolsandPunctuation
-xmlUCSIsCJKUnifiedIdeographs
-xmlUCSIsCJKUnifiedIdeographsExtensionA
-xmlUCSIsCJKUnifiedIdeographsExtensionB
-xmlUCSIsCat
-xmlUCSIsCatC
-xmlUCSIsCatCc
-xmlUCSIsCatCf
-xmlUCSIsCatCo
-xmlUCSIsCatCs
-xmlUCSIsCatL
-xmlUCSIsCatLl
-xmlUCSIsCatLm
-xmlUCSIsCatLo
-xmlUCSIsCatLt
-xmlUCSIsCatLu
-xmlUCSIsCatM
-xmlUCSIsCatMc
-xmlUCSIsCatMe
-xmlUCSIsCatMn
-xmlUCSIsCatN
-xmlUCSIsCatNd
-xmlUCSIsCatNl
-xmlUCSIsCatNo
-xmlUCSIsCatP
-xmlUCSIsCatPc
-xmlUCSIsCatPd
-xmlUCSIsCatPe
-xmlUCSIsCatPf
-xmlUCSIsCatPi
-xmlUCSIsCatPo
-xmlUCSIsCatPs
-xmlUCSIsCatS
-xmlUCSIsCatSc
-xmlUCSIsCatSk
-xmlUCSIsCatSm
-xmlUCSIsCatSo
-xmlUCSIsCatZ
-xmlUCSIsCatZl
-xmlUCSIsCatZp
-xmlUCSIsCatZs
-xmlUCSIsCherokee
-xmlUCSIsCombiningDiacriticalMarks
-xmlUCSIsCombiningDiacriticalMarksforSymbols
-xmlUCSIsCombiningHalfMarks
-xmlUCSIsCombiningMarksforSymbols
-xmlUCSIsControlPictures
-xmlUCSIsCurrencySymbols
-xmlUCSIsCypriotSyllabary
-xmlUCSIsCyrillic
-xmlUCSIsCyrillicSupplement
-xmlUCSIsDeseret
-xmlUCSIsDevanagari
-xmlUCSIsDingbats
-xmlUCSIsEnclosedAlphanumerics
-xmlUCSIsEnclosedCJKLettersandMonths
-xmlUCSIsEthiopic
-xmlUCSIsGeneralPunctuation
-xmlUCSIsGeometricShapes
-xmlUCSIsGeorgian
-xmlUCSIsGothic
-xmlUCSIsGreek
-xmlUCSIsGreekExtended
-xmlUCSIsGreekandCoptic
-xmlUCSIsGujarati
-xmlUCSIsGurmukhi
-xmlUCSIsHalfwidthandFullwidthForms
-xmlUCSIsHangulCompatibilityJamo
-xmlUCSIsHangulJamo
-xmlUCSIsHangulSyllables
-xmlUCSIsHanunoo
-xmlUCSIsHebrew
-xmlUCSIsHighPrivateUseSurrogates
-xmlUCSIsHighSurrogates
-xmlUCSIsHiragana
-xmlUCSIsIPAExtensions
-xmlUCSIsIdeographicDescriptionCharacters
-xmlUCSIsKanbun
-xmlUCSIsKangxiRadicals
-xmlUCSIsKannada
-xmlUCSIsKatakana
-xmlUCSIsKatakanaPhoneticExtensions
-xmlUCSIsKhmer
-xmlUCSIsKhmerSymbols
-xmlUCSIsLao
-xmlUCSIsLatin1Supplement
-xmlUCSIsLatinExtendedA
-xmlUCSIsLatinExtendedAdditional
-xmlUCSIsLatinExtendedB
-xmlUCSIsLetterlikeSymbols
-xmlUCSIsLimbu
-xmlUCSIsLinearBIdeograms
-xmlUCSIsLinearBSyllabary
-xmlUCSIsLowSurrogates
-xmlUCSIsMalayalam
-xmlUCSIsMathematicalAlphanumericSymbols
-xmlUCSIsMathematicalOperators
-xmlUCSIsMiscellaneousMathematicalSymbolsA
-xmlUCSIsMiscellaneousMathematicalSymbolsB
-xmlUCSIsMiscellaneousSymbols
-xmlUCSIsMiscellaneousSymbolsandArrows
-xmlUCSIsMiscellaneousTechnical
-xmlUCSIsMongolian
-xmlUCSIsMusicalSymbols
-xmlUCSIsMyanmar
-xmlUCSIsNumberForms
-xmlUCSIsOgham
-xmlUCSIsOldItalic
-xmlUCSIsOpticalCharacterRecognition
-xmlUCSIsOriya
-xmlUCSIsOsmanya
-xmlUCSIsPhoneticExtensions
-xmlUCSIsPrivateUse
-xmlUCSIsPrivateUseArea
-xmlUCSIsRunic
-xmlUCSIsShavian
-xmlUCSIsSinhala
-xmlUCSIsSmallFormVariants
-xmlUCSIsSpacingModifierLetters
-xmlUCSIsSpecials
-xmlUCSIsSuperscriptsandSubscripts
-xmlUCSIsSupplementalArrowsA
-xmlUCSIsSupplementalArrowsB
-xmlUCSIsSupplementalMathematicalOperators
-xmlUCSIsSupplementaryPrivateUseAreaA
-xmlUCSIsSupplementaryPrivateUseAreaB
-xmlUCSIsSyriac
-xmlUCSIsTagalog
-xmlUCSIsTagbanwa
-xmlUCSIsTags
-xmlUCSIsTaiLe
-xmlUCSIsTaiXuanJingSymbols
-xmlUCSIsTamil
-xmlUCSIsTelugu
-xmlUCSIsThaana
-xmlUCSIsThai
-xmlUCSIsTibetan
-xmlUCSIsUgaritic
-xmlUCSIsUnifiedCanadianAboriginalSyllabics
-xmlUCSIsVariationSelectors
-xmlUCSIsVariationSelectorsSupplement
-xmlUCSIsYiRadicals
-xmlUCSIsYiSyllables
-xmlUCSIsYijingHexagramSymbols
-xmlURIEscape
-xmlURIEscapeStr
-xmlURIUnescapeString
-xmlUTF8Charcmp
-xmlUTF8Size
-xmlUTF8Strlen
-xmlUTF8Strloc
-xmlUTF8Strndup
-xmlUTF8Strpos
-xmlUTF8Strsize
-xmlUTF8Strsub
-xmlUnlinkNode
-xmlUnlockLibrary
-xmlUnsetNsProp
-xmlUnsetProp
-xmlValidBuildContentModel
-xmlValidCtxtNormalizeAttributeValue
-xmlValidGetPotentialChildren
-xmlValidGetValidElements
-xmlValidNormalizeAttributeValue
-xmlValidateAttributeDecl
-xmlValidateAttributeValue
-xmlValidateDocument
-xmlValidateDocumentFinal
-xmlValidateDtd
-xmlValidateDtdFinal
-xmlValidateElement
-xmlValidateElementDecl
-xmlValidateNCName
-xmlValidateNMToken
-xmlValidateName
-xmlValidateNameValue
-xmlValidateNamesValue
-xmlValidateNmtokenValue
-xmlValidateNmtokensValue
-xmlValidateNotationDecl
-xmlValidateNotationUse
-xmlValidateOneAttribute
-xmlValidateOneElement
-xmlValidateOneNamespace
-xmlValidatePopElement
-xmlValidatePushCData
-xmlValidatePushElement
-xmlValidateQName
-xmlValidateRoot
-xmlXIncludeFreeContext
-xmlXIncludeNewContext
-xmlXIncludeProcess
-xmlXIncludeProcessFlags
-xmlXIncludeProcessNode
-xmlXIncludeProcessTree
-xmlXIncludeProcessTreeFlags
-xmlXIncludeSetFlags
-xmlXPathAddValues
-xmlXPathBooleanFunction
-xmlXPathCastBooleanToNumber
-xmlXPathCastBooleanToString
-xmlXPathCastNodeSetToBoolean
-xmlXPathCastNodeSetToNumber
-xmlXPathCastNodeSetToString
-xmlXPathCastNodeToNumber
-xmlXPathCastNodeToString
-xmlXPathCastNumberToBoolean
-xmlXPathCastNumberToString
-xmlXPathCastStringToBoolean
-xmlXPathCastStringToNumber
-xmlXPathCastToBoolean
-xmlXPathCastToNumber
-xmlXPathCastToString
-xmlXPathCeilingFunction
-xmlXPathCmpNodes
-xmlXPathCompareValues
-xmlXPathCompile
-xmlXPathCompiledEval
-xmlXPathConcatFunction
-xmlXPathContainsFunction
-xmlXPathContextSetCache
-xmlXPathConvertBoolean
-xmlXPathConvertNumber
-xmlXPathConvertString
-xmlXPathCountFunction
-xmlXPathCtxtCompile
-xmlXPathDebugDumpCompExpr
-xmlXPathDebugDumpObject
-xmlXPathDifference
-xmlXPathDistinct
-xmlXPathDistinctSorted
-xmlXPathDivValues
-xmlXPathEqualValues
-xmlXPathErr
-xmlXPathEval
-xmlXPathEvalExpr
-xmlXPathEvalExpression
-xmlXPathEvalPredicate
-xmlXPathEvaluatePredicateResult
-xmlXPathFalseFunction
-xmlXPathFloorFunction
-xmlXPathFreeCompExpr
-xmlXPathFreeContext
-xmlXPathFreeNodeSet
-xmlXPathFreeNodeSetList
-xmlXPathFreeObject
-xmlXPathFreeParserContext
-xmlXPathFunctionLookup
-xmlXPathFunctionLookupNS
-xmlXPathHasSameNodes
-xmlXPathIdFunction
-xmlXPathInit
-xmlXPathIntersection
-xmlXPathIsInf
-xmlXPathIsNaN
-xmlXPathIsNodeType
-xmlXPathLangFunction
-xmlXPathLastFunction
-xmlXPathLeading
-xmlXPathLeadingSorted
-xmlXPathLocalNameFunction
-xmlXPathModValues
-xmlXPathMultValues
-xmlXPathNamespaceURIFunction
-xmlXPathNewBoolean
-xmlXPathNewCString
-xmlXPathNewContext
-xmlXPathNewFloat
-xmlXPathNewNodeSet
-xmlXPathNewNodeSetList
-xmlXPathNewParserContext
-xmlXPathNewString
-xmlXPathNewValueTree
-xmlXPathNextAncestor
-xmlXPathNextAncestorOrSelf
-xmlXPathNextAttribute
-xmlXPathNextChild
-xmlXPathNextDescendant
-xmlXPathNextDescendantOrSelf
-xmlXPathNextFollowing
-xmlXPathNextFollowingSibling
-xmlXPathNextNamespace
-xmlXPathNextParent
-xmlXPathNextPreceding
-xmlXPathNextPrecedingSibling
-xmlXPathNextSelf
-xmlXPathNodeLeading
-xmlXPathNodeLeadingSorted
-xmlXPathNodeSetAdd
-xmlXPathNodeSetAddNs
-xmlXPathNodeSetAddUnique
-xmlXPathNodeSetContains
-xmlXPathNodeSetCreate
-xmlXPathNodeSetDel
-xmlXPathNodeSetFreeNs
-xmlXPathNodeSetMerge
-xmlXPathNodeSetRemove
-xmlXPathNodeSetSort
-xmlXPathNodeTrailing
-xmlXPathNodeTrailingSorted
-xmlXPathNormalizeFunction
-xmlXPathNotEqualValues
-xmlXPathNotFunction
-xmlXPathNsLookup
-xmlXPathNumberFunction
-xmlXPathObjectCopy
-xmlXPathOrderDocElems
-xmlXPathParseNCName
-xmlXPathParseName
-xmlXPathPopBoolean
-xmlXPathPopExternal
-xmlXPathPopNodeSet
-xmlXPathPopNumber
-xmlXPathPopString
-xmlXPathPositionFunction
-xmlXPathRegisterAllFunctions
-xmlXPathRegisterFunc
-xmlXPathRegisterFuncLookup
-xmlXPathRegisterFuncNS
-xmlXPathRegisterNs
-xmlXPathRegisterVariable
-xmlXPathRegisterVariableLookup
-xmlXPathRegisterVariableNS
-xmlXPathRegisteredFuncsCleanup
-xmlXPathRegisteredNsCleanup
-xmlXPathRegisteredVariablesCleanup
-xmlXPathRoot
-xmlXPathRoundFunction
-xmlXPathStartsWithFunction
-xmlXPathStringEvalNumber
-xmlXPathStringFunction
-xmlXPathStringLengthFunction
-xmlXPathSubValues
-xmlXPathSubstringAfterFunction
-xmlXPathSubstringBeforeFunction
-xmlXPathSubstringFunction
-xmlXPathSumFunction
-xmlXPathTrailing
-xmlXPathTrailingSorted
-xmlXPathTranslateFunction
-xmlXPathTrueFunction
-xmlXPathValueFlipSign
-xmlXPathVariableLookup
-xmlXPathVariableLookupNS
-xmlXPathWrapCString
-xmlXPathWrapExternal
-xmlXPathWrapNodeSet
-xmlXPathWrapString
-xmlXPatherror
-xmlXPtrBuildNodeList
-xmlXPtrEval
-xmlXPtrEvalRangePredicate
-xmlXPtrFreeLocationSet
-xmlXPtrLocationSetAdd
-xmlXPtrLocationSetCreate
-xmlXPtrLocationSetDel
-xmlXPtrLocationSetMerge
-xmlXPtrLocationSetRemove
-xmlXPtrNewCollapsedRange
-xmlXPtrNewContext
-xmlXPtrNewLocationSetNodeSet
-xmlXPtrNewLocationSetNodes
-xmlXPtrNewRange
-xmlXPtrNewRangeNodeObject
-xmlXPtrNewRangeNodePoint
-xmlXPtrNewRangeNodes
-xmlXPtrNewRangePointNode
-xmlXPtrNewRangePoints
-xmlXPtrRangeToFunction
-xmlXPtrWrapLocationSet
+EXPORTS
+__docbDefaultSAXHandler
+__htmlDefaultSAXHandler
+__oldXMLWDcompatibility
+__xmlBufferAllocScheme
+__xmlDefaultBufferSize
+__xmlDefaultSAXHandler
+__xmlDefaultSAXLocator
+__xmlDeregisterNodeDefaultValue
+__xmlDoValidityCheckingDefaultValue
+xmlFree DATA
+__xmlGenericError
+__xmlGenericErrorContext
+__xmlGetWarningsDefaultValue
+__xmlIndentTreeOutput
+xmlIsBaseCharGroup DATA
+xmlIsCharGroup DATA
+xmlIsCombiningGroup DATA
+xmlIsDigitGroup DATA
+xmlIsExtenderGroup DATA
+xmlIsIdeographicGroup DATA
+xmlIsPubidChar_tab DATA
+__xmlKeepBlanksDefaultValue
+xmlLastError DATA
+__xmlLineNumbersDefaultValue
+__xmlLoadExtDtdDefaultValue
+xmlMalloc DATA
+xmlMallocAtomic DATA
+xmlMemStrdup DATA
+xmlOutputBufferCreateFilenameValue DATA
+__xmlParserDebugEntities
+xmlParserInputBufferCreateFilenameValue DATA
+xmlParserMaxDepth DATA
+__xmlParserVersion
+__xmlPedanticParserDefaultValue
+xmlRealloc DATA
+__xmlRegisterNodeDefaultValue
+__xmlSaveNoEmptyTags
+xmlStringComment DATA
+xmlStringText DATA
+xmlStringTextNoenc DATA
+xmlStructuredError DATA
+__xmlSubstituteEntitiesDefaultValue
+__xmlTreeIndentString
+xmlXPathNAN DATA
+xmlXPathNINF DATA
+xmlXPathPINF DATA
+UTF8ToHtml
+UTF8Toisolat1
+attribute
+attributeDecl
+cdataBlock
+characters
+checkNamespace
+comment
+docbCreateFileParserCtxt
+docbCreatePushParserCtxt
+docbDefaultSAXHandlerInit
+docbEncodeEntities
+docbFreeParserCtxt
+docbParseChunk
+docbParseDoc
+docbParseDocument
+docbParseFile
+docbSAXParseDoc
+docbSAXParseFile
+elementDecl
+endDocument
+endElement
+entityDecl
+externalSubset
+getColumnNumber
+getEntity
+getLineNumber
+getNamespace
+getParameterEntity
+getPublicId
+getSystemId
+globalNamespace
+hasExternalSubset
+hasInternalSubset
+htmlAttrAllowed
+htmlAutoCloseTag
+htmlCreateFileParserCtxt
+htmlCreateMemoryParserCtxt
+htmlCreatePushParserCtxt
+htmlCtxtReadDoc
+htmlCtxtReadFd
+htmlCtxtReadFile
+htmlCtxtReadIO
+htmlCtxtReadMemory
+htmlCtxtReset
+htmlCtxtUseOptions
+htmlDefaultSAXHandlerInit
+htmlDocContentDumpFormatOutput
+htmlDocContentDumpOutput
+htmlDocDump
+htmlDocDumpMemory
+htmlElementAllowedHere
+htmlElementStatusHere
+htmlEncodeEntities
+htmlEntityLookup
+htmlEntityValueLookup
+htmlFreeParserCtxt
+htmlGetMetaEncoding
+htmlHandleOmittedElem
+htmlInitAutoClose
+htmlIsAutoClosed
+htmlIsBooleanAttr
+htmlIsScriptAttribute
+htmlNewDoc
+htmlNewDocNoDtD
+htmlNodeDump
+htmlNodeDumpFile
+htmlNodeDumpFileFormat
+htmlNodeDumpFormatOutput
+htmlNodeDumpOutput
+htmlNodeStatus
+htmlParseCharRef
+htmlParseChunk
+htmlParseDoc
+htmlParseDocument
+htmlParseElement
+htmlParseEntityRef
+htmlParseFile
+htmlReadDoc
+htmlReadFd
+htmlReadFile
+htmlReadIO
+htmlReadMemory
+htmlSAXParseDoc
+htmlSAXParseFile
+htmlSaveFile
+htmlSaveFileEnc
+htmlSaveFileFormat
+htmlSetMetaEncoding
+htmlTagLookup
+ignorableWhitespace
+initGenericErrorDefaultFunc
+initdocbDefaultSAXHandler
+inithtmlDefaultSAXHandler
+initxmlDefaultSAXHandler
+inputPop
+inputPush
+internalSubset
+isStandalone
+isolat1ToUTF8
+namePop
+namePush
+namespaceDecl
+nodePop
+nodePush
+notationDecl
+processingInstruction
+reference
+resolveEntity
+setDocumentLocator
+setNamespace
+startDocument
+startElement
+unparsedEntityDecl
+valuePop
+valuePush
+xmlACatalogAdd
+xmlACatalogDump
+xmlACatalogRemove
+xmlACatalogResolve
+xmlACatalogResolvePublic
+xmlACatalogResolveSystem
+xmlACatalogResolveURI
+xmlAddAttributeDecl
+xmlAddChild
+xmlAddChildList
+xmlAddDocEntity
+xmlAddDtdEntity
+xmlAddElementDecl
+xmlAddEncodingAlias
+xmlAddID
+xmlAddNextSibling
+xmlAddNotationDecl
+xmlAddPrevSibling
+xmlAddRef
+xmlAddSibling
+xmlAllocOutputBuffer
+xmlAllocParserInputBuffer
+xmlAttrSerializeTxtContent
+xmlAutomataCompile
+xmlAutomataGetInitState
+xmlAutomataIsDeterminist
+xmlAutomataNewAllTrans
+xmlAutomataNewCountTrans
+xmlAutomataNewCountTrans2
+xmlAutomataNewCountedTrans
+xmlAutomataNewCounter
+xmlAutomataNewCounterTrans
+xmlAutomataNewEpsilon
+xmlAutomataNewOnceTrans
+xmlAutomataNewOnceTrans2
+xmlAutomataNewState
+xmlAutomataNewTransition
+xmlAutomataNewTransition2
+xmlAutomataSetFinalState
+xmlBoolToText
+xmlBufferAdd
+xmlBufferAddHead
+xmlBufferCCat
+xmlBufferCat
+xmlBufferContent
+xmlBufferCreate
+xmlBufferCreateSize
+xmlBufferCreateStatic
+xmlBufferDump
+xmlBufferEmpty
+xmlBufferFree
+xmlBufferGrow
+xmlBufferLength
+xmlBufferResize
+xmlBufferSetAllocationScheme
+xmlBufferShrink
+xmlBufferWriteCHAR
+xmlBufferWriteChar
+xmlBufferWriteQuotedString
+xmlBuildQName
+xmlBuildRelativeURI
+xmlBuildURI
+xmlByteConsumed
+xmlC14NDocDumpMemory
+xmlC14NDocSave
+xmlC14NDocSaveTo
+xmlC14NExecute
+xmlCanonicPath
+xmlCatalogAdd
+xmlCatalogAddLocal
+xmlCatalogCleanup
+xmlCatalogConvert
+xmlCatalogDump
+xmlCatalogFreeLocal
+xmlCatalogGetDefaults
+xmlCatalogGetPublic
+xmlCatalogGetSystem
+xmlCatalogIsEmpty
+xmlCatalogLocalResolve
+xmlCatalogLocalResolveURI
+xmlCatalogRemove
+xmlCatalogResolve
+xmlCatalogResolvePublic
+xmlCatalogResolveSystem
+xmlCatalogResolveURI
+xmlCatalogSetDebug
+xmlCatalogSetDefaultPrefer
+xmlCatalogSetDefaults
+xmlCharEncCloseFunc
+xmlCharEncFirstLine
+xmlCharEncInFunc
+xmlCharEncOutFunc
+xmlCharInRange
+xmlCharStrdup
+xmlCharStrndup
+xmlCheckFilename
+xmlCheckHTTPInput
+xmlCheckLanguageID
+xmlCheckUTF8
+xmlCheckVersion
+xmlCleanupCharEncodingHandlers
+xmlCleanupEncodingAliases
+xmlCleanupGlobals
+xmlCleanupInputCallbacks
+xmlCleanupMemory
+xmlCleanupOutputCallbacks
+xmlCleanupParser
+xmlCleanupPredefinedEntities
+xmlCleanupThreads
+xmlClearNodeInfoSeq
+xmlClearParserCtxt
+xmlConvertSGMLCatalog
+xmlCopyAttributeTable
+xmlCopyChar
+xmlCopyCharMultiByte
+xmlCopyDoc
+xmlCopyDtd
+xmlCopyElementContent
+xmlCopyElementTable
+xmlCopyEntitiesTable
+xmlCopyEnumeration
+xmlCopyError
+xmlCopyNamespace
+xmlCopyNamespaceList
+xmlCopyNode
+xmlCopyNodeList
+xmlCopyNotationTable
+xmlCopyProp
+xmlCopyPropList
+xmlCreateDocParserCtxt
+xmlCreateEntitiesTable
+xmlCreateEntityParserCtxt
+xmlCreateEnumeration
+xmlCreateFileParserCtxt
+xmlCreateIOParserCtxt
+xmlCreateIntSubset
+xmlCreateMemoryParserCtxt
+xmlCreatePushParserCtxt
+xmlCreateURI
+xmlCreateURLParserCtxt
+xmlCtxtGetLastError
+xmlCtxtReadDoc
+xmlCtxtReadFd
+xmlCtxtReadFile
+xmlCtxtReadIO
+xmlCtxtReadMemory
+xmlCtxtReset
+xmlCtxtResetLastError
+xmlCtxtResetPush
+xmlCtxtUseOptions
+xmlCurrentChar
+xmlDebugCheckDocument
+xmlDebugDumpAttr
+xmlDebugDumpAttrList
+xmlDebugDumpDTD
+xmlDebugDumpDocument
+xmlDebugDumpDocumentHead
+xmlDebugDumpEntities
+xmlDebugDumpNode
+xmlDebugDumpNodeList
+xmlDebugDumpOneNode
+xmlDebugDumpString
+xmlDecodeEntities
+xmlDefaultSAXHandlerInit
+xmlDelEncodingAlias
+xmlDeregisterNodeDefault
+xmlDetectCharEncoding
+xmlDictCreate
+xmlDictCreateSub
+xmlDictFree
+xmlDictLookup
+xmlDictOwns
+xmlDictQLookup
+xmlDictReference
+xmlDictSize
+xmlDocCopyNode
+xmlDocCopyNodeList
+xmlDocDump
+xmlDocDumpFormatMemory
+xmlDocDumpFormatMemoryEnc
+xmlDocDumpMemory
+xmlDocDumpMemoryEnc
+xmlDocFormatDump
+xmlDocGetRootElement
+xmlDocSetRootElement
+xmlDumpAttributeDecl
+xmlDumpAttributeTable
+xmlDumpElementDecl
+xmlDumpElementTable
+xmlDumpEntitiesTable
+xmlDumpEntityDecl
+xmlDumpNotationDecl
+xmlDumpNotationTable
+xmlElemDump
+xmlEncodeEntities
+xmlEncodeEntitiesReentrant
+xmlEncodeSpecialChars
+xmlErrMemory
+xmlFileClose
+xmlFileMatch
+xmlFileOpen
+xmlFileRead
+xmlFindCharEncodingHandler
+xmlFreeAttributeTable
+xmlFreeAutomata
+xmlFreeCatalog
+xmlFreeDoc
+xmlFreeDtd
+xmlFreeElementContent
+xmlFreeElementTable
+xmlFreeEntitiesTable
+xmlFreeEnumeration
+xmlFreeIDTable
+xmlFreeInputStream
+xmlFreeMutex
+xmlFreeNode
+xmlFreeNodeList
+xmlFreeNotationTable
+xmlFreeNs
+xmlFreeNsList
+xmlFreeParserCtxt
+xmlFreeParserInputBuffer
+xmlFreePattern
+xmlFreePatternList
+xmlFreeProp
+xmlFreePropList
+xmlFreeRMutex
+xmlFreeRefTable
+xmlFreeTextReader
+xmlFreeTextWriter
+xmlFreeURI
+xmlFreeValidCtxt
+xmlGcMemGet
+xmlGcMemSetup
+xmlGetBufferAllocationScheme
+xmlGetCharEncodingHandler
+xmlGetCharEncodingName
+xmlGetCompressMode
+xmlGetDocCompressMode
+xmlGetDocEntity
+xmlGetDtdAttrDesc
+xmlGetDtdElementDesc
+xmlGetDtdEntity
+xmlGetDtdNotationDesc
+xmlGetDtdQAttrDesc
+xmlGetDtdQElementDesc
+xmlGetEncodingAlias
+xmlGetExternalEntityLoader
+xmlGetFeature
+xmlGetFeaturesList
+xmlGetGlobalState
+xmlGetID
+xmlGetIntSubset
+xmlGetLastChild
+xmlGetLastError
+xmlGetLineNo
+xmlGetNoNsProp
+xmlGetNodePath
+xmlGetNsList
+xmlGetNsProp
+xmlGetParameterEntity
+xmlGetPredefinedEntity
+xmlGetProp
+xmlGetRefs
+xmlGetThreadId
+xmlGetUTF8Char
+xmlHandleEntity
+xmlHasNsProp
+xmlHasProp
+xmlHashAddEntry
+xmlHashAddEntry2
+xmlHashAddEntry3
+xmlHashCopy
+xmlHashCreate
+xmlHashFree
+xmlHashLookup
+xmlHashLookup2
+xmlHashLookup3
+xmlHashQLookup
+xmlHashQLookup2
+xmlHashQLookup3
+xmlHashRemoveEntry
+xmlHashRemoveEntry2
+xmlHashRemoveEntry3
+xmlHashScan
+xmlHashScan3
+xmlHashScanFull
+xmlHashScanFull3
+xmlHashSize
+xmlHashUpdateEntry
+xmlHashUpdateEntry2
+xmlHashUpdateEntry3
+xmlIOFTPClose
+xmlIOFTPMatch
+xmlIOFTPOpen
+xmlIOFTPRead
+xmlIOHTTPClose
+xmlIOHTTPMatch
+xmlIOHTTPOpen
+xmlIOHTTPOpenW
+xmlIOHTTPRead
+xmlIOParseDTD
+xmlInitCharEncodingHandlers
+xmlInitGlobals
+xmlInitMemory
+xmlInitNodeInfoSeq
+xmlInitParser
+xmlInitParserCtxt
+xmlInitThreads
+xmlInitializeCatalog
+xmlInitializeGlobalState
+xmlInitializePredefinedEntities
+xmlIsBaseChar
+xmlIsBlank
+xmlIsBlankNode
+xmlIsChar
+xmlIsCombining
+xmlIsDigit
+xmlIsExtender
+xmlIsID
+xmlIsIdeographic
+xmlIsLetter
+xmlIsMainThread
+xmlIsMixedElement
+xmlIsPubidChar
+xmlIsRef
+xmlIsXHTML
+xmlKeepBlanksDefault
+xmlLineNumbersDefault
+xmlLinkGetData
+xmlListAppend
+xmlListClear
+xmlListCopy
+xmlListCreate
+xmlListDelete
+xmlListDup
+xmlListEmpty
+xmlListEnd
+xmlListFront
+xmlListInsert
+xmlListMerge
+xmlListPopBack
+xmlListPopFront
+xmlListPushBack
+xmlListPushFront
+xmlListRemoveAll
+xmlListRemoveFirst
+xmlListRemoveLast
+xmlListReverse
+xmlListReverseSearch
+xmlListReverseWalk
+xmlListSearch
+xmlListSize
+xmlListSort
+xmlListWalk
+xmlLoadACatalog
+xmlLoadCatalog
+xmlLoadCatalogs
+xmlLoadExternalEntity
+xmlLoadSGMLSuperCatalog
+xmlLockLibrary
+xmlLsCountNode
+xmlLsOneNode
+xmlMallocAtomicLoc
+xmlMallocLoc
+xmlMemBlocks
+xmlMemDisplay
+xmlMemFree
+xmlMemGet
+xmlMemMalloc
+xmlMemRealloc
+xmlMemSetup
+xmlMemShow
+xmlMemStrdupLoc
+xmlMemUsed
+xmlMemoryDump
+xmlMemoryStrdup
+xmlModuleClose
+xmlModuleFree
+xmlModuleOpen
+xmlModuleSymbol
+xmlMutexLock
+xmlMutexUnlock
+xmlNamespaceParseNCName
+xmlNamespaceParseNSDef
+xmlNamespaceParseQName
+xmlNanoFTPCheckResponse
+xmlNanoFTPCleanup
+xmlNanoFTPClose
+xmlNanoFTPCloseConnection
+xmlNanoFTPConnect
+xmlNanoFTPConnectTo
+xmlNanoFTPCwd
+xmlNanoFTPDele
+xmlNanoFTPFreeCtxt
+xmlNanoFTPGet
+xmlNanoFTPGetConnection
+xmlNanoFTPGetResponse
+xmlNanoFTPGetSocket
+xmlNanoFTPInit
+xmlNanoFTPList
+xmlNanoFTPNewCtxt
+xmlNanoFTPOpen
+xmlNanoFTPProxy
+xmlNanoFTPQuit
+xmlNanoFTPRead
+xmlNanoFTPScanProxy
+xmlNanoFTPUpdateURL
+xmlNanoHTTPAuthHeader
+xmlNanoHTTPCleanup
+xmlNanoHTTPClose
+xmlNanoHTTPContentLength
+xmlNanoHTTPEncoding
+xmlNanoHTTPFetch
+xmlNanoHTTPInit
+xmlNanoHTTPMethod
+xmlNanoHTTPMethodRedir
+xmlNanoHTTPMimeType
+xmlNanoHTTPOpen
+xmlNanoHTTPOpenRedir
+xmlNanoHTTPRead
+xmlNanoHTTPRedir
+xmlNanoHTTPReturnCode
+xmlNanoHTTPSave
+xmlNanoHTTPScanProxy
+xmlNewAutomata
+xmlNewCDataBlock
+xmlNewCatalog
+xmlNewCharEncodingHandler
+xmlNewCharRef
+xmlNewChild
+xmlNewComment
+xmlNewDoc
+xmlNewDocComment
+xmlNewDocFragment
+xmlNewDocNode
+xmlNewDocNodeEatName
+xmlNewDocPI
+xmlNewDocProp
+xmlNewDocRawNode
+xmlNewDocText
+xmlNewDocTextLen
+xmlNewDtd
+xmlNewElementContent
+xmlNewEntityInputStream
+xmlNewGlobalNs
+xmlNewIOInputStream
+xmlNewInputFromFile
+xmlNewInputStream
+xmlNewMutex
+xmlNewNode
+xmlNewNodeEatName
+xmlNewNs
+xmlNewNsProp
+xmlNewNsPropEatName
+xmlNewPI
+xmlNewParserCtxt
+xmlNewProp
+xmlNewRMutex
+xmlNewReference
+xmlNewStringInputStream
+xmlNewText
+xmlNewTextChild
+xmlNewTextLen
+xmlNewTextReader
+xmlNewTextReaderFilename
+xmlNewTextWriter
+xmlNewTextWriterDoc
+xmlNewTextWriterFilename
+xmlNewTextWriterMemory
+xmlNewTextWriterPushParser
+xmlNewTextWriterTree
+xmlNewValidCtxt
+xmlNextChar
+xmlNoNetExternalEntityLoader
+xmlNodeAddContent
+xmlNodeAddContentLen
+xmlNodeBufGetContent
+xmlNodeDump
+xmlNodeDumpOutput
+xmlNodeGetBase
+xmlNodeGetContent
+xmlNodeGetLang
+xmlNodeGetSpacePreserve
+xmlNodeIsText
+xmlNodeListGetRawString
+xmlNodeListGetString
+xmlNodeSetBase
+xmlNodeSetContent
+xmlNodeSetContentLen
+xmlNodeSetLang
+xmlNodeSetName
+xmlNodeSetSpacePreserve
+xmlNormalizeURIPath
+xmlNormalizeWindowsPath
+xmlOutputBufferClose
+xmlOutputBufferCreateFd
+xmlOutputBufferCreateFile
+xmlOutputBufferCreateFilename
+xmlOutputBufferCreateFilenameDefault
+xmlOutputBufferCreateIO
+xmlOutputBufferFlush
+xmlOutputBufferWrite
+xmlOutputBufferWriteEscape
+xmlOutputBufferWriteString
+xmlParseAttValue
+xmlParseAttribute
+xmlParseAttributeListDecl
+xmlParseAttributeType
+xmlParseBalancedChunkMemory
+xmlParseBalancedChunkMemoryRecover
+xmlParseCDSect
+xmlParseCatalogFile
+xmlParseCharData
+xmlParseCharEncoding
+xmlParseCharRef
+xmlParseChunk
+xmlParseComment
+xmlParseContent
+xmlParseCtxtExternalEntity
+xmlParseDTD
+xmlParseDefaultDecl
+xmlParseDoc
+xmlParseDocTypeDecl
+xmlParseDocument
+xmlParseElement
+xmlParseElementChildrenContentDecl
+xmlParseElementContentDecl
+xmlParseElementDecl
+xmlParseElementMixedContentDecl
+xmlParseEncName
+xmlParseEncodingDecl
+xmlParseEndTag
+xmlParseEntity
+xmlParseEntityDecl
+xmlParseEntityRef
+xmlParseEntityValue
+xmlParseEnumeratedType
+xmlParseEnumerationType
+xmlParseExtParsedEnt
+xmlParseExternalEntity
+xmlParseExternalID
+xmlParseExternalSubset
+xmlParseFile
+xmlParseInNodeContext
+xmlParseMarkupDecl
+xmlParseMemory
+xmlParseMisc
+xmlParseName
+xmlParseNamespace
+xmlParseNmtoken
+xmlParseNotationDecl
+xmlParseNotationType
+xmlParsePEReference
+xmlParsePI
+xmlParsePITarget
+xmlParsePubidLiteral
+xmlParseQuotedString
+xmlParseReference
+xmlParseSDDecl
+xmlParseStartTag
+xmlParseSystemLiteral
+xmlParseTextDecl
+xmlParseURI
+xmlParseURIReference
+xmlParseVersionInfo
+xmlParseVersionNum
+xmlParseXMLDecl
+xmlParserAddNodeInfo
+xmlParserError
+xmlParserFindNodeInfo
+xmlParserFindNodeInfoIndex
+xmlParserGetDirectory
+xmlParserHandlePEReference
+xmlParserHandleReference
+xmlParserInputBufferCreateFd
+xmlParserInputBufferCreateFile
+xmlParserInputBufferCreateFilename
+xmlParserInputBufferCreateFilenameDefault
+xmlParserInputBufferCreateIO
+xmlParserInputBufferCreateMem
+xmlParserInputBufferCreateStatic
+xmlParserInputBufferGrow
+xmlParserInputBufferPush
+xmlParserInputBufferRead
+xmlParserInputGrow
+xmlParserInputRead
+xmlParserInputShrink
+xmlParserPrintFileContext
+xmlParserPrintFileInfo
+xmlParserValidityError
+xmlParserValidityWarning
+xmlParserWarning
+xmlPatternMatch
+xmlPatterncompile
+xmlPedanticParserDefault
+xmlPopInput
+xmlPopInputCallbacks
+xmlPrintURI
+xmlPushInput
+xmlRMutexLock
+xmlRMutexUnlock
+xmlReadDoc
+xmlReadFd
+xmlReadFile
+xmlReadIO
+xmlReadMemory
+xmlReaderForDoc
+xmlReaderForFd
+xmlReaderForFile
+xmlReaderForIO
+xmlReaderForMemory
+xmlReaderNewDoc
+xmlReaderNewFd
+xmlReaderNewFile
+xmlReaderNewIO
+xmlReaderNewMemory
+xmlReaderNewWalker
+xmlReaderWalker
+xmlReallocLoc
+xmlReconciliateNs
+xmlRecoverDoc
+xmlRecoverFile
+xmlRecoverMemory
+xmlRegExecPushString
+xmlRegExecPushString2
+xmlRegFreeExecCtxt
+xmlRegFreeRegexp
+xmlRegNewExecCtxt
+xmlRegexpCompile
+xmlRegexpExec
+xmlRegexpIsDeterminist
+xmlRegexpPrint
+xmlRegisterCharEncodingHandler
+xmlRegisterDefaultInputCallbacks
+xmlRegisterDefaultOutputCallbacks
+xmlRegisterHTTPPostCallbacks
+xmlRegisterInputCallbacks
+xmlRegisterNodeDefault
+xmlRegisterOutputCallbacks
+xmlRelaxNGCleanupTypes
+xmlRelaxNGDump
+xmlRelaxNGDumpTree
+xmlRelaxNGFree
+xmlRelaxNGFreeParserCtxt
+xmlRelaxNGFreeValidCtxt
+xmlRelaxNGGetParserErrors
+xmlRelaxNGGetValidErrors
+xmlRelaxNGInitTypes
+xmlRelaxNGNewDocParserCtxt
+xmlRelaxNGNewMemParserCtxt
+xmlRelaxNGNewParserCtxt
+xmlRelaxNGNewValidCtxt
+xmlRelaxNGParse
+xmlRelaxNGSetParserErrors
+xmlRelaxNGSetValidErrors
+xmlRelaxNGValidateDoc
+xmlRelaxNGValidateFullElement
+xmlRelaxNGValidatePopElement
+xmlRelaxNGValidatePushCData
+xmlRelaxNGValidatePushElement
+xmlRelaxParserSetFlag
+xmlRemoveID
+xmlRemoveProp
+xmlRemoveRef
+xmlReplaceNode
+xmlResetError
+xmlResetLastError
+xmlSAX2AttributeDecl
+xmlSAX2CDataBlock
+xmlSAX2Characters
+xmlSAX2Comment
+xmlSAX2ElementDecl
+xmlSAX2EndDocument
+xmlSAX2EndElement
+xmlSAX2EndElementNs
+xmlSAX2EntityDecl
+xmlSAX2ExternalSubset
+xmlSAX2GetColumnNumber
+xmlSAX2GetEntity
+xmlSAX2GetLineNumber
+xmlSAX2GetParameterEntity
+xmlSAX2GetPublicId
+xmlSAX2GetSystemId
+xmlSAX2HasExternalSubset
+xmlSAX2HasInternalSubset
+xmlSAX2IgnorableWhitespace
+xmlSAX2InitDefaultSAXHandler
+xmlSAX2InitDocbDefaultSAXHandler
+xmlSAX2InitHtmlDefaultSAXHandler
+xmlSAX2InternalSubset
+xmlSAX2IsStandalone
+xmlSAX2NotationDecl
+xmlSAX2ProcessingInstruction
+xmlSAX2Reference
+xmlSAX2ResolveEntity
+xmlSAX2SetDocumentLocator
+xmlSAX2StartDocument
+xmlSAX2StartElement
+xmlSAX2StartElementNs
+xmlSAX2UnparsedEntityDecl
+xmlSAXDefaultVersion
+xmlSAXParseDTD
+xmlSAXParseDoc
+xmlSAXParseEntity
+xmlSAXParseFile
+xmlSAXParseFileWithData
+xmlSAXParseMemory
+xmlSAXParseMemoryWithData
+xmlSAXUserParseFile
+xmlSAXUserParseMemory
+xmlSAXVersion
+xmlSaveClose
+xmlSaveDoc
+xmlSaveFile
+xmlSaveFileEnc
+xmlSaveFileTo
+xmlSaveFlush
+xmlSaveFormatFile
+xmlSaveFormatFileEnc
+xmlSaveFormatFileTo
+xmlSaveSetAttrEscape
+xmlSaveSetEscape
+xmlSaveToFd
+xmlSaveToFilename
+xmlSaveToIO
+xmlSaveTree
+xmlSaveUri
+xmlScanName
+xmlSchemaCheckFacet
+xmlSchemaCleanupTypes
+xmlSchemaCollapseString
+xmlSchemaCompareValues
+xmlSchemaDump
+xmlSchemaFree
+xmlSchemaFreeFacet
+xmlSchemaFreeParserCtxt
+xmlSchemaFreeType
+xmlSchemaFreeValidCtxt
+xmlSchemaFreeValue
+xmlSchemaFreeWildcard
+xmlSchemaGetBuiltInListSimpleTypeItemType
+xmlSchemaGetBuiltInType
+xmlSchemaGetFacetValueAsULong
+xmlSchemaGetParserErrors
+xmlSchemaGetPredefinedType
+xmlSchemaGetValidErrors
+xmlSchemaInitTypes
+xmlSchemaIsBuiltInTypeFacet
+xmlSchemaNewDocParserCtxt
+xmlSchemaNewFacet
+xmlSchemaNewMemParserCtxt
+xmlSchemaNewParserCtxt
+xmlSchemaNewValidCtxt
+xmlSchemaParse
+xmlSchemaSetParserErrors
+xmlSchemaSetValidErrors
+xmlSchemaSetValidOptions
+xmlSchemaValPredefTypeNode
+xmlSchemaValPredefTypeNodeNoNorm
+xmlSchemaValidCtxtGetOptions
+xmlSchemaValidateDoc
+xmlSchemaValidateFacet
+xmlSchemaValidateLengthFacet
+xmlSchemaValidateListSimpleTypeFacet
+xmlSchemaValidateOneElement
+xmlSchemaValidatePredefinedType
+xmlSchemaValidateStream
+xmlSearchNs
+xmlSearchNsByHref
+xmlSetBufferAllocationScheme
+xmlSetCompressMode
+xmlSetDocCompressMode
+xmlSetEntityReferenceFunc
+xmlSetExternalEntityLoader
+xmlSetFeature
+xmlSetGenericErrorFunc
+xmlSetListDoc
+xmlSetNs
+xmlSetNsProp
+xmlSetProp
+xmlSetStructuredErrorFunc
+xmlSetTreeDoc
+xmlSetupParserForBuffer
+xmlShell
+xmlShellBase
+xmlShellCat
+xmlShellDir
+xmlShellDu
+xmlShellList
+xmlShellLoad
+xmlShellPrintNode
+xmlShellPrintXPathError
+xmlShellPrintXPathResult
+xmlShellPwd
+xmlShellSave
+xmlShellValidate
+xmlShellWrite
+xmlSkipBlankChars
+xmlSnprintfElementContent
+xmlSplitQName
+xmlSplitQName2
+xmlSplitQName3
+xmlSprintfElementContent
+xmlStopParser
+xmlStrEqual
+xmlStrPrintf
+xmlStrQEqual
+xmlStrVPrintf
+xmlStrcasecmp
+xmlStrcasestr
+xmlStrcat
+xmlStrchr
+xmlStrcmp
+xmlStrdup
+xmlStringCurrentChar
+xmlStringDecodeEntities
+xmlStringGetNodeList
+xmlStringLenDecodeEntities
+xmlStringLenGetNodeList
+xmlStrlen
+xmlStrncasecmp
+xmlStrncat
+xmlStrncatNew
+xmlStrncmp
+xmlStrndup
+xmlStrstr
+xmlStrsub
+xmlSubstituteEntitiesDefault
+xmlSwitchEncoding
+xmlSwitchInputEncoding
+xmlSwitchToEncoding
+xmlTextConcat
+xmlTextMerge
+xmlTextReaderAttributeCount
+xmlTextReaderBaseUri
+xmlTextReaderClose
+xmlTextReaderConstBaseUri
+xmlTextReaderConstEncoding
+xmlTextReaderConstLocalName
+xmlTextReaderConstName
+xmlTextReaderConstNamespaceUri
+xmlTextReaderConstPrefix
+xmlTextReaderConstString
+xmlTextReaderConstValue
+xmlTextReaderConstXmlLang
+xmlTextReaderConstXmlVersion
+xmlTextReaderCurrentDoc
+xmlTextReaderCurrentNode
+xmlTextReaderDepth
+xmlTextReaderExpand
+xmlTextReaderGetAttribute
+xmlTextReaderGetAttributeNo
+xmlTextReaderGetAttributeNs
+xmlTextReaderGetErrorHandler
+xmlTextReaderGetParserProp
+xmlTextReaderGetRemainder
+xmlTextReaderHasAttributes
+xmlTextReaderHasValue
+xmlTextReaderIsDefault
+xmlTextReaderIsEmptyElement
+xmlTextReaderIsNamespaceDecl
+xmlTextReaderIsValid
+xmlTextReaderLocalName
+xmlTextReaderLocatorBaseURI
+xmlTextReaderLocatorLineNumber
+xmlTextReaderLookupNamespace
+xmlTextReaderMoveToAttribute
+xmlTextReaderMoveToAttributeNo
+xmlTextReaderMoveToAttributeNs
+xmlTextReaderMoveToElement
+xmlTextReaderMoveToFirstAttribute
+xmlTextReaderMoveToNextAttribute
+xmlTextReaderName
+xmlTextReaderNamespaceUri
+xmlTextReaderNext
+xmlTextReaderNextSibling
+xmlTextReaderNodeType
+xmlTextReaderNormalization
+xmlTextReaderPrefix
+xmlTextReaderPreserve
+xmlTextReaderPreservePattern
+xmlTextReaderQuoteChar
+xmlTextReaderRead
+xmlTextReaderReadAttributeValue
+xmlTextReaderReadInnerXml
+xmlTextReaderReadOuterXml
+xmlTextReaderReadState
+xmlTextReaderReadString
+xmlTextReaderRelaxNGSetSchema
+xmlTextReaderRelaxNGValidate
+xmlTextReaderSetErrorHandler
+xmlTextReaderSetParserProp
+xmlTextReaderSetStructuredErrorHandler
+xmlTextReaderStandalone
+xmlTextReaderValue
+xmlTextReaderXmlLang
+xmlTextWriterEndAttribute
+xmlTextWriterEndCDATA
+xmlTextWriterEndComment
+xmlTextWriterEndDTD
+xmlTextWriterEndDTDAttlist
+xmlTextWriterEndDTDElement
+xmlTextWriterEndDTDEntity
+xmlTextWriterEndDocument
+xmlTextWriterEndElement
+xmlTextWriterEndPI
+xmlTextWriterFlush
+xmlTextWriterFullEndElement
+xmlTextWriterSetIndent
+xmlTextWriterSetIndentString
+xmlTextWriterStartAttribute
+xmlTextWriterStartAttributeNS
+xmlTextWriterStartCDATA
+xmlTextWriterStartComment
+xmlTextWriterStartDTD
+xmlTextWriterStartDTDAttlist
+xmlTextWriterStartDTDElement
+xmlTextWriterStartDTDEntity
+xmlTextWriterStartDocument
+xmlTextWriterStartElement
+xmlTextWriterStartElementNS
+xmlTextWriterStartPI
+xmlTextWriterWriteAttribute
+xmlTextWriterWriteAttributeNS
+xmlTextWriterWriteBase64
+xmlTextWriterWriteBinHex
+xmlTextWriterWriteCDATA
+xmlTextWriterWriteComment
+xmlTextWriterWriteDTD
+xmlTextWriterWriteDTDAttlist
+xmlTextWriterWriteDTDElement
+xmlTextWriterWriteDTDEntity
+xmlTextWriterWriteDTDExternalEntity
+xmlTextWriterWriteDTDExternalEntityContents
+xmlTextWriterWriteDTDInternalEntity
+xmlTextWriterWriteDTDNotation
+xmlTextWriterWriteElement
+xmlTextWriterWriteElementNS
+xmlTextWriterWriteFormatAttribute
+xmlTextWriterWriteFormatAttributeNS
+xmlTextWriterWriteFormatCDATA
+xmlTextWriterWriteFormatComment
+xmlTextWriterWriteFormatDTD
+xmlTextWriterWriteFormatDTDAttlist
+xmlTextWriterWriteFormatDTDElement
+xmlTextWriterWriteFormatDTDInternalEntity
+xmlTextWriterWriteFormatElement
+xmlTextWriterWriteFormatElementNS
+xmlTextWriterWriteFormatPI
+xmlTextWriterWriteFormatRaw
+xmlTextWriterWriteFormatString
+xmlTextWriterWritePI
+xmlTextWriterWriteRaw
+xmlTextWriterWriteRawLen
+xmlTextWriterWriteString
+xmlTextWriterWriteVFormatAttribute
+xmlTextWriterWriteVFormatAttributeNS
+xmlTextWriterWriteVFormatCDATA
+xmlTextWriterWriteVFormatComment
+xmlTextWriterWriteVFormatDTD
+xmlTextWriterWriteVFormatDTDAttlist
+xmlTextWriterWriteVFormatDTDElement
+xmlTextWriterWriteVFormatDTDInternalEntity
+xmlTextWriterWriteVFormatElement
+xmlTextWriterWriteVFormatElementNS
+xmlTextWriterWriteVFormatPI
+xmlTextWriterWriteVFormatRaw
+xmlTextWriterWriteVFormatString
+xmlThrDefBufferAllocScheme
+xmlThrDefDefaultBufferSize
+xmlThrDefDeregisterNodeDefault
+xmlThrDefDoValidityCheckingDefaultValue
+xmlThrDefGetWarningsDefaultValue
+xmlThrDefIndentTreeOutput
+xmlThrDefKeepBlanksDefaultValue
+xmlThrDefLineNumbersDefaultValue
+xmlThrDefLoadExtDtdDefaultValue
+xmlThrDefOutputBufferCreateFilenameDefault
+xmlThrDefParserDebugEntities
+xmlThrDefParserInputBufferCreateFilenameDefault
+xmlThrDefPedanticParserDefaultValue
+xmlThrDefRegisterNodeDefault
+xmlThrDefSaveNoEmptyTags
+xmlThrDefSetGenericErrorFunc
+xmlThrDefSetStructuredErrorFunc
+xmlThrDefSubstituteEntitiesDefaultValue
+xmlThrDefTreeIndentString
+xmlUCSIsAegeanNumbers
+xmlUCSIsAlphabeticPresentationForms
+xmlUCSIsArabic
+xmlUCSIsArabicPresentationFormsA
+xmlUCSIsArabicPresentationFormsB
+xmlUCSIsArmenian
+xmlUCSIsArrows
+xmlUCSIsBasicLatin
+xmlUCSIsBengali
+xmlUCSIsBlock
+xmlUCSIsBlockElements
+xmlUCSIsBopomofo
+xmlUCSIsBopomofoExtended
+xmlUCSIsBoxDrawing
+xmlUCSIsBraillePatterns
+xmlUCSIsBuhid
+xmlUCSIsByzantineMusicalSymbols
+xmlUCSIsCJKCompatibility
+xmlUCSIsCJKCompatibilityForms
+xmlUCSIsCJKCompatibilityIdeographs
+xmlUCSIsCJKCompatibilityIdeographsSupplement
+xmlUCSIsCJKRadicalsSupplement
+xmlUCSIsCJKSymbolsandPunctuation
+xmlUCSIsCJKUnifiedIdeographs
+xmlUCSIsCJKUnifiedIdeographsExtensionA
+xmlUCSIsCJKUnifiedIdeographsExtensionB
+xmlUCSIsCat
+xmlUCSIsCatC
+xmlUCSIsCatCc
+xmlUCSIsCatCf
+xmlUCSIsCatCo
+xmlUCSIsCatCs
+xmlUCSIsCatL
+xmlUCSIsCatLl
+xmlUCSIsCatLm
+xmlUCSIsCatLo
+xmlUCSIsCatLt
+xmlUCSIsCatLu
+xmlUCSIsCatM
+xmlUCSIsCatMc
+xmlUCSIsCatMe
+xmlUCSIsCatMn
+xmlUCSIsCatN
+xmlUCSIsCatNd
+xmlUCSIsCatNl
+xmlUCSIsCatNo
+xmlUCSIsCatP
+xmlUCSIsCatPc
+xmlUCSIsCatPd
+xmlUCSIsCatPe
+xmlUCSIsCatPf
+xmlUCSIsCatPi
+xmlUCSIsCatPo
+xmlUCSIsCatPs
+xmlUCSIsCatS
+xmlUCSIsCatSc
+xmlUCSIsCatSk
+xmlUCSIsCatSm
+xmlUCSIsCatSo
+xmlUCSIsCatZ
+xmlUCSIsCatZl
+xmlUCSIsCatZp
+xmlUCSIsCatZs
+xmlUCSIsCherokee
+xmlUCSIsCombiningDiacriticalMarks
+xmlUCSIsCombiningDiacriticalMarksforSymbols
+xmlUCSIsCombiningHalfMarks
+xmlUCSIsCombiningMarksforSymbols
+xmlUCSIsControlPictures
+xmlUCSIsCurrencySymbols
+xmlUCSIsCypriotSyllabary
+xmlUCSIsCyrillic
+xmlUCSIsCyrillicSupplement
+xmlUCSIsDeseret
+xmlUCSIsDevanagari
+xmlUCSIsDingbats
+xmlUCSIsEnclosedAlphanumerics
+xmlUCSIsEnclosedCJKLettersandMonths
+xmlUCSIsEthiopic
+xmlUCSIsGeneralPunctuation
+xmlUCSIsGeometricShapes
+xmlUCSIsGeorgian
+xmlUCSIsGothic
+xmlUCSIsGreek
+xmlUCSIsGreekExtended
+xmlUCSIsGreekandCoptic
+xmlUCSIsGujarati
+xmlUCSIsGurmukhi
+xmlUCSIsHalfwidthandFullwidthForms
+xmlUCSIsHangulCompatibilityJamo
+xmlUCSIsHangulJamo
+xmlUCSIsHangulSyllables
+xmlUCSIsHanunoo
+xmlUCSIsHebrew
+xmlUCSIsHighPrivateUseSurrogates
+xmlUCSIsHighSurrogates
+xmlUCSIsHiragana
+xmlUCSIsIPAExtensions
+xmlUCSIsIdeographicDescriptionCharacters
+xmlUCSIsKanbun
+xmlUCSIsKangxiRadicals
+xmlUCSIsKannada
+xmlUCSIsKatakana
+xmlUCSIsKatakanaPhoneticExtensions
+xmlUCSIsKhmer
+xmlUCSIsKhmerSymbols
+xmlUCSIsLao
+xmlUCSIsLatin1Supplement
+xmlUCSIsLatinExtendedA
+xmlUCSIsLatinExtendedAdditional
+xmlUCSIsLatinExtendedB
+xmlUCSIsLetterlikeSymbols
+xmlUCSIsLimbu
+xmlUCSIsLinearBIdeograms
+xmlUCSIsLinearBSyllabary
+xmlUCSIsLowSurrogates
+xmlUCSIsMalayalam
+xmlUCSIsMathematicalAlphanumericSymbols
+xmlUCSIsMathematicalOperators
+xmlUCSIsMiscellaneousMathematicalSymbolsA
+xmlUCSIsMiscellaneousMathematicalSymbolsB
+xmlUCSIsMiscellaneousSymbols
+xmlUCSIsMiscellaneousSymbolsandArrows
+xmlUCSIsMiscellaneousTechnical
+xmlUCSIsMongolian
+xmlUCSIsMusicalSymbols
+xmlUCSIsMyanmar
+xmlUCSIsNumberForms
+xmlUCSIsOgham
+xmlUCSIsOldItalic
+xmlUCSIsOpticalCharacterRecognition
+xmlUCSIsOriya
+xmlUCSIsOsmanya
+xmlUCSIsPhoneticExtensions
+xmlUCSIsPrivateUse
+xmlUCSIsPrivateUseArea
+xmlUCSIsRunic
+xmlUCSIsShavian
+xmlUCSIsSinhala
+xmlUCSIsSmallFormVariants
+xmlUCSIsSpacingModifierLetters
+xmlUCSIsSpecials
+xmlUCSIsSuperscriptsandSubscripts
+xmlUCSIsSupplementalArrowsA
+xmlUCSIsSupplementalArrowsB
+xmlUCSIsSupplementalMathematicalOperators
+xmlUCSIsSupplementaryPrivateUseAreaA
+xmlUCSIsSupplementaryPrivateUseAreaB
+xmlUCSIsSyriac
+xmlUCSIsTagalog
+xmlUCSIsTagbanwa
+xmlUCSIsTags
+xmlUCSIsTaiLe
+xmlUCSIsTaiXuanJingSymbols
+xmlUCSIsTamil
+xmlUCSIsTelugu
+xmlUCSIsThaana
+xmlUCSIsThai
+xmlUCSIsTibetan
+xmlUCSIsUgaritic
+xmlUCSIsUnifiedCanadianAboriginalSyllabics
+xmlUCSIsVariationSelectors
+xmlUCSIsVariationSelectorsSupplement
+xmlUCSIsYiRadicals
+xmlUCSIsYiSyllables
+xmlUCSIsYijingHexagramSymbols
+xmlURIEscape
+xmlURIEscapeStr
+xmlURIUnescapeString
+xmlUTF8Charcmp
+xmlUTF8Size
+xmlUTF8Strlen
+xmlUTF8Strloc
+xmlUTF8Strndup
+xmlUTF8Strpos
+xmlUTF8Strsize
+xmlUTF8Strsub
+xmlUnlinkNode
+xmlUnlockLibrary
+xmlUnsetNsProp
+xmlUnsetProp
+xmlValidBuildContentModel
+xmlValidCtxtNormalizeAttributeValue
+xmlValidGetPotentialChildren
+xmlValidGetValidElements
+xmlValidNormalizeAttributeValue
+xmlValidateAttributeDecl
+xmlValidateAttributeValue
+xmlValidateDocument
+xmlValidateDocumentFinal
+xmlValidateDtd
+xmlValidateDtdFinal
+xmlValidateElement
+xmlValidateElementDecl
+xmlValidateNCName
+xmlValidateNMToken
+xmlValidateName
+xmlValidateNameValue
+xmlValidateNamesValue
+xmlValidateNmtokenValue
+xmlValidateNmtokensValue
+xmlValidateNotationDecl
+xmlValidateNotationUse
+xmlValidateOneAttribute
+xmlValidateOneElement
+xmlValidateOneNamespace
+xmlValidatePopElement
+xmlValidatePushCData
+xmlValidatePushElement
+xmlValidateQName
+xmlValidateRoot
+xmlXIncludeFreeContext
+xmlXIncludeNewContext
+xmlXIncludeProcess
+xmlXIncludeProcessFlags
+xmlXIncludeProcessNode
+xmlXIncludeProcessTree
+xmlXIncludeProcessTreeFlags
+xmlXIncludeSetFlags
+xmlXPathAddValues
+xmlXPathBooleanFunction
+xmlXPathCastBooleanToNumber
+xmlXPathCastBooleanToString
+xmlXPathCastNodeSetToBoolean
+xmlXPathCastNodeSetToNumber
+xmlXPathCastNodeSetToString
+xmlXPathCastNodeToNumber
+xmlXPathCastNodeToString
+xmlXPathCastNumberToBoolean
+xmlXPathCastNumberToString
+xmlXPathCastStringToBoolean
+xmlXPathCastStringToNumber
+xmlXPathCastToBoolean
+xmlXPathCastToNumber
+xmlXPathCastToString
+xmlXPathCeilingFunction
+xmlXPathCmpNodes
+xmlXPathCompareValues
+xmlXPathCompile
+xmlXPathCompiledEval
+xmlXPathCompiledEvalToBoolean
+xmlXPathConcatFunction
+xmlXPathContainsFunction
+xmlXPathContextSetCache
+xmlXPathConvertBoolean
+xmlXPathConvertNumber
+xmlXPathConvertString
+xmlXPathCountFunction
+xmlXPathCtxtCompile
+xmlXPathDebugDumpCompExpr
+xmlXPathDebugDumpObject
+xmlXPathDifference
+xmlXPathDistinct
+xmlXPathDistinctSorted
+xmlXPathDivValues
+xmlXPathEqualValues
+xmlXPathErr
+xmlXPathEval
+xmlXPathEvalExpr
+xmlXPathEvalExpression
+xmlXPathEvalPredicate
+xmlXPathEvaluatePredicateResult
+xmlXPathFalseFunction
+xmlXPathFloorFunction
+xmlXPathFreeCompExpr
+xmlXPathFreeContext
+xmlXPathFreeNodeSet
+xmlXPathFreeNodeSetList
+xmlXPathFreeObject
+xmlXPathFreeParserContext
+xmlXPathFunctionLookup
+xmlXPathFunctionLookupNS
+xmlXPathHasSameNodes
+xmlXPathIdFunction
+xmlXPathInit
+xmlXPathIntersection
+xmlXPathIsInf
+xmlXPathIsNaN
+xmlXPathIsNodeType
+xmlXPathLangFunction
+xmlXPathLastFunction
+xmlXPathLeading
+xmlXPathLeadingSorted
+xmlXPathLocalNameFunction
+xmlXPathModValues
+xmlXPathMultValues
+xmlXPathNamespaceURIFunction
+xmlXPathNewBoolean
+xmlXPathNewCString
+xmlXPathNewContext
+xmlXPathNewFloat
+xmlXPathNewNodeSet
+xmlXPathNewNodeSetList
+xmlXPathNewParserContext
+xmlXPathNewString
+xmlXPathNewValueTree
+xmlXPathNextAncestor
+xmlXPathNextAncestorOrSelf
+xmlXPathNextAttribute
+xmlXPathNextChild
+xmlXPathNextDescendant
+xmlXPathNextDescendantOrSelf
+xmlXPathNextFollowing
+xmlXPathNextFollowingSibling
+xmlXPathNextNamespace
+xmlXPathNextParent
+xmlXPathNextPreceding
+xmlXPathNextPrecedingSibling
+xmlXPathNextSelf
+xmlXPathNodeLeading
+xmlXPathNodeLeadingSorted
+xmlXPathNodeSetAdd
+xmlXPathNodeSetAddNs
+xmlXPathNodeSetAddUnique
+xmlXPathNodeSetContains
+xmlXPathNodeSetCreate
+xmlXPathNodeSetDel
+xmlXPathNodeSetFreeNs
+xmlXPathNodeSetMerge
+xmlXPathNodeSetRemove
+xmlXPathNodeSetSort
+xmlXPathNodeTrailing
+xmlXPathNodeTrailingSorted
+xmlXPathNormalizeFunction
+xmlXPathNotEqualValues
+xmlXPathNotFunction
+xmlXPathNsLookup
+xmlXPathNumberFunction
+xmlXPathObjectCopy
+xmlXPathOrderDocElems
+xmlXPathParseNCName
+xmlXPathParseName
+xmlXPathPopBoolean
+xmlXPathPopExternal
+xmlXPathPopNodeSet
+xmlXPathPopNumber
+xmlXPathPopString
+xmlXPathPositionFunction
+xmlXPathRegisterAllFunctions
+xmlXPathRegisterFunc
+xmlXPathRegisterFuncLookup
+xmlXPathRegisterFuncNS
+xmlXPathRegisterNs
+xmlXPathRegisterVariable
+xmlXPathRegisterVariableLookup
+xmlXPathRegisterVariableNS
+xmlXPathRegisteredFuncsCleanup
+xmlXPathRegisteredNsCleanup
+xmlXPathRegisteredVariablesCleanup
+xmlXPathRoot
+xmlXPathRoundFunction
+xmlXPathStartsWithFunction
+xmlXPathStringEvalNumber
+xmlXPathStringFunction
+xmlXPathStringLengthFunction
+xmlXPathSubValues
+xmlXPathSubstringAfterFunction
+xmlXPathSubstringBeforeFunction
+xmlXPathSubstringFunction
+xmlXPathSumFunction
+xmlXPathTrailing
+xmlXPathTrailingSorted
+xmlXPathTranslateFunction
+xmlXPathTrueFunction
+xmlXPathValueFlipSign
+xmlXPathVariableLookup
+xmlXPathVariableLookupNS
+xmlXPathWrapCString
+xmlXPathWrapExternal
+xmlXPathWrapNodeSet
+xmlXPathWrapString
+xmlXPatherror
+xmlXPtrBuildNodeList
+xmlXPtrEval
+xmlXPtrEvalRangePredicate
+xmlXPtrFreeLocationSet
+xmlXPtrLocationSetAdd
+xmlXPtrLocationSetCreate
+xmlXPtrLocationSetDel
+xmlXPtrLocationSetMerge
+xmlXPtrLocationSetRemove
+xmlXPtrNewCollapsedRange
+xmlXPtrNewContext
+xmlXPtrNewLocationSetNodeSet
+xmlXPtrNewLocationSetNodes
+xmlXPtrNewRange
+xmlXPtrNewRangeNodeObject
+xmlXPtrNewRangeNodePoint
+xmlXPtrNewRangeNodes
+xmlXPtrNewRangePointNode
+xmlXPtrNewRangePoints
+xmlXPtrRangeToFunction
+xmlXPtrWrapLocationSet
diff --git a/ext/mbstring/libmbfl/nls/nls_hy.c b/ext/mbstring/libmbfl/nls/nls_hy.c
index a2511484c..1c4b38351 100644
--- a/ext/mbstring/libmbfl/nls/nls_hy.c
+++ b/ext/mbstring/libmbfl/nls/nls_hy.c
@@ -11,7 +11,7 @@
const mbfl_language mbfl_language_armenian = {
mbfl_no_language_armenian ,
- "Armenian ",
+ "Armenian",
"hy",
NULL,
mbfl_no_encoding_armscii8,
diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c
index 1cae5788e..f6a175d8d 100644
--- a/ext/mbstring/mb_gpc.c
+++ b/ext/mbstring/mb_gpc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mb_gpc.c,v 1.17.2.2.2.3 2007/03/18 16:36:13 iliaa Exp $ */
+/* $Id: mb_gpc.c,v 1.17.2.2.2.4 2007/12/31 07:20:07 sebastian Exp $ */
/* {{{ includes */
#ifdef HAVE_CONFIG_H
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index d269a2225..7d2e2840c 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.224.2.22.2.25 2007/09/24 11:51:36 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.30 2008/02/17 02:06:56 hirokawa Exp $ */
/*
* PHP 4 Multibyte String module "mbstring"
@@ -888,6 +888,8 @@ PHP_RINIT_FUNCTION(mbstring)
const struct mb_overload_def *p;
MBSTRG(current_language) = MBSTRG(language);
+ php_mb_nls_get_default_detect_order_list(MBSTRG(language),
+ &MBSTRG(default_detect_order_list), &MBSTRG(default_detect_order_list_size));
if (MBSTRG(internal_encoding) == mbfl_no_encoding_invalid) {
char *default_enc = NULL;
@@ -1611,7 +1613,7 @@ PHP_FUNCTION(mb_strpos)
}
}
- if (offset < 0 || (unsigned long)offset > haystack.len) {
+ if (offset < 0 || (unsigned long)offset > (unsigned long)mbfl_strlen(&haystack)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string.");
RETURN_FALSE;
}
@@ -1724,6 +1726,13 @@ PHP_FUNCTION(mb_strrpos)
if (needle.len <= 0) {
RETURN_FALSE;
}
+
+ if ((offset > 0 && offset > mbfl_strlen(&haystack)) ||
+ (offset < 0 && -offset > mbfl_strlen(&haystack))) {
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string");
+ RETURN_FALSE;
+ }
+
n = mbfl_strpos(&haystack, &needle, offset, 1);
if (n >= 0) {
RETVAL_LONG(n);
@@ -2325,7 +2334,7 @@ PHP_FUNCTION(mb_strimwidth)
convert_to_long_ex(arg2);
from = Z_LVAL_PP(arg2);
if (from < 0 || from > Z_STRLEN_PP(arg1)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Start position is out of reange");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Start position is out of range");
RETURN_FALSE;
}
diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h
index ae184a0ac..02765d17f 100644
--- a/ext/mbstring/mbstring.h
+++ b/ext/mbstring/mbstring.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.h,v 1.66.2.4.2.5 2007/01/01 09:36:02 sebastian Exp $ */
+/* $Id: mbstring.h,v 1.66.2.4.2.6 2007/12/31 07:20:07 sebastian Exp $ */
/*
* PHP 4 Multibyte String module "mbstring" (currently only for Japanese)
diff --git a/ext/mbstring/oniguruma/enc/utf16_be.c b/ext/mbstring/oniguruma/enc/utf16_be.c
index 250a0cf34..536d107d6 100755
--- a/ext/mbstring/oniguruma/enc/utf16_be.c
+++ b/ext/mbstring/oniguruma/enc/utf16_be.c
@@ -2,7 +2,7 @@
utf16_be.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/enc/utf16_le.c b/ext/mbstring/oniguruma/enc/utf16_le.c
index c2d860ed0..cefcb60ad 100755
--- a/ext/mbstring/oniguruma/enc/utf16_le.c
+++ b/ext/mbstring/oniguruma/enc/utf16_le.c
@@ -2,7 +2,7 @@
utf16_le.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/enc/utf32_be.c b/ext/mbstring/oniguruma/enc/utf32_be.c
index c98b910ba..c1f066897 100755
--- a/ext/mbstring/oniguruma/enc/utf32_be.c
+++ b/ext/mbstring/oniguruma/enc/utf32_be.c
@@ -2,7 +2,7 @@
utf32_be.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/enc/utf32_le.c b/ext/mbstring/oniguruma/enc/utf32_le.c
index 043a86074..c10cbfa77 100755
--- a/ext/mbstring/oniguruma/enc/utf32_le.c
+++ b/ext/mbstring/oniguruma/enc/utf32_le.c
@@ -2,7 +2,7 @@
utf32_le.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/enc/utf8.c b/ext/mbstring/oniguruma/enc/utf8.c
index 4188aa910..42ce807f9 100644
--- a/ext/mbstring/oniguruma/enc/utf8.c
+++ b/ext/mbstring/oniguruma/enc/utf8.c
@@ -2,7 +2,7 @@
utf8.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/oniguruma.h b/ext/mbstring/oniguruma/oniguruma.h
index 0cd7e2593..5fb6ec154 100644
--- a/ext/mbstring/oniguruma/oniguruma.h
+++ b/ext/mbstring/oniguruma/oniguruma.h
@@ -4,7 +4,7 @@
oniguruma.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regcomp.c b/ext/mbstring/oniguruma/regcomp.c
index e441516c3..a679a20b2 100644
--- a/ext/mbstring/oniguruma/regcomp.c
+++ b/ext/mbstring/oniguruma/regcomp.c
@@ -2,7 +2,7 @@
regcomp.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regenc.h b/ext/mbstring/oniguruma/regenc.h
index a10c738b5..833dd2af4 100644
--- a/ext/mbstring/oniguruma/regenc.h
+++ b/ext/mbstring/oniguruma/regenc.h
@@ -4,7 +4,7 @@
regenc.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regerror.c b/ext/mbstring/oniguruma/regerror.c
index 4888fe00f..46dc6ae15 100644
--- a/ext/mbstring/oniguruma/regerror.c
+++ b/ext/mbstring/oniguruma/regerror.c
@@ -2,7 +2,7 @@
regerror.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regexec.c b/ext/mbstring/oniguruma/regexec.c
index 0715b2afc..a1685c8c6 100644
--- a/ext/mbstring/oniguruma/regexec.c
+++ b/ext/mbstring/oniguruma/regexec.c
@@ -2,7 +2,7 @@
regexec.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regext.c b/ext/mbstring/oniguruma/regext.c
index f03b40e2a..1586012b8 100755
--- a/ext/mbstring/oniguruma/regext.c
+++ b/ext/mbstring/oniguruma/regext.c
@@ -2,7 +2,7 @@
regext.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/reggnu.c b/ext/mbstring/oniguruma/reggnu.c
index b52486595..fdc7974ae 100644
--- a/ext/mbstring/oniguruma/reggnu.c
+++ b/ext/mbstring/oniguruma/reggnu.c
@@ -2,7 +2,7 @@
reggnu.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regint.h b/ext/mbstring/oniguruma/regint.h
index 1be9efb97..4eff34c3b 100644
--- a/ext/mbstring/oniguruma/regint.h
+++ b/ext/mbstring/oniguruma/regint.h
@@ -4,7 +4,7 @@
regint.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regparse.c b/ext/mbstring/oniguruma/regparse.c
index 6066631ed..26fc35b11 100644
--- a/ext/mbstring/oniguruma/regparse.c
+++ b/ext/mbstring/oniguruma/regparse.c
@@ -2,7 +2,7 @@
regparse.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regparse.h b/ext/mbstring/oniguruma/regparse.h
index 007d982ce..c0cdded7b 100644
--- a/ext/mbstring/oniguruma/regparse.h
+++ b/ext/mbstring/oniguruma/regparse.h
@@ -4,7 +4,7 @@
regparse.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regposix.c b/ext/mbstring/oniguruma/regposix.c
index c61a6ce7f..23ae95693 100644
--- a/ext/mbstring/oniguruma/regposix.c
+++ b/ext/mbstring/oniguruma/regposix.c
@@ -2,7 +2,7 @@
regposix.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regsyntax.c b/ext/mbstring/oniguruma/regsyntax.c
index 4c2f39b67..542e599c8 100644
--- a/ext/mbstring/oniguruma/regsyntax.c
+++ b/ext/mbstring/oniguruma/regsyntax.c
@@ -2,7 +2,7 @@
regsyntax.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/regversion.c b/ext/mbstring/oniguruma/regversion.c
index d1e01d75d..cbebdb026 100644
--- a/ext/mbstring/oniguruma/regversion.c
+++ b/ext/mbstring/oniguruma/regversion.c
@@ -2,7 +2,7 @@
regversion.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,7 @@ onig_copyright(void)
{
static char s[58];
- sprintf(s, "Oniguruma %d.%d.%d : Copyright (C) 2002-2007 K.Kosako",
+ sprintf(s, "Oniguruma %d.%d.%d : Copyright (C) 2002-2008 K.Kosako",
ONIGURUMA_VERSION_MAJOR,
ONIGURUMA_VERSION_MINOR,
ONIGURUMA_VERSION_TEENY);
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index f22d54098..be4921edd 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mbregex.c,v 1.53.2.1.2.4 2007/01/11 22:23:20 tony2001 Exp $ */
+/* $Id: php_mbregex.c,v 1.53.2.1.2.7 2008/02/17 02:04:12 hirokawa Exp $ */
#ifdef HAVE_CONFIG_H
@@ -546,6 +546,13 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
convert_to_string_ex(arg_pattern);
/* don't bother doing an extended regex with just a number */
}
+
+ if (!Z_STRVAL_PP(arg_pattern) || Z_STRLEN_PP(arg_pattern) == 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "empty pattern");
+ RETVAL_FALSE;
+ goto out;
+ }
+
re = php_mbregex_compile_pattern(Z_STRVAL_PP(arg_pattern), Z_STRLEN_PP(arg_pattern), options, MBSTRG(current_mbctype), MBSTRG(regex_default_syntax) TSRMLS_CC);
if (re == NULL) {
RETVAL_FALSE;
@@ -737,7 +744,12 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
/* null terminate buffer */
smart_str_appendc(&eval_buf, '\0');
/* do eval */
- zend_eval_string(eval_buf.c, &v, description TSRMLS_CC);
+ if (zend_eval_string(eval_buf.c, &v, description TSRMLS_CC) == FAILURE) {
+ efree(description);
+ php_error_docref(NULL TSRMLS_CC,E_ERROR, "Failed evaluating code: %s%s", PHP_EOL, eval_buf.c);
+ /* zend_error() does not return in this case */
+ }
+
/* result of eval */
convert_to_string(&v);
smart_str_appendl(&out_buf, Z_STRVAL(v), Z_STRLEN(v));
diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h
index ff90e9d2a..e583b0063 100644
--- a/ext/mbstring/php_mbregex.h
+++ b/ext/mbstring/php_mbregex.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mbregex.h,v 1.12.2.1.2.1 2007/01/01 09:36:02 sebastian Exp $ */
+/* $Id: php_mbregex.h,v 1.12.2.1.2.2 2007/12/31 07:20:07 sebastian Exp $ */
#ifndef _PHP_MBREGEX_H
#define _PHP_MBREGEX_H
diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c
index 1f1d8cb84..d90cabb84 100644
--- a/ext/mbstring/php_unicode.c
+++ b/ext/mbstring/php_unicode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -276,6 +276,11 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, char *srcstr, size_t
size_t i;
enum mbfl_no_encoding _src_encoding = mbfl_name2no_encoding(src_encoding);
+ if (_src_encoding == mbfl_no_encoding_invalid) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", src_encoding);
+ return NULL;
+ }
+
unicode = php_mb_convert_encoding(srcstr, srclen, "UCS-4BE", src_encoding, &unicode_len TSRMLS_CC);
if (unicode == NULL)
return NULL;
diff --git a/ext/mbstring/php_unicode.h b/ext/mbstring/php_unicode.h
index 3ae4246d4..1bbc77830 100644
--- a/ext/mbstring/php_unicode.h
+++ b/ext/mbstring/php_unicode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mbstring/tests/bug43301.phpt b/ext/mbstring/tests/bug43301.phpt
new file mode 100644
index 000000000..858520fdf
--- /dev/null
+++ b/ext/mbstring/tests/bug43301.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #43301 (mb_ereg*_replace() crashes when replacement string is invalid PHP expression and 'e' option is used)
+--SKIPIF--
+<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
+--FILE--
+<?php
+
+$ptr = 'hello';
+
+$txt = <<<doc
+hello, I have got a cr*sh on you
+doc;
+
+echo mb_ereg_replace($ptr,'$1',$txt,'e');
+?>
+--EXPECTF--
+Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in %s/bug43301.php(%d) : mbregex replace on line 1
+
+Fatal error: mb_ereg_replace(): Failed evaluating code:
+$1 in %s/bug43301.php on line %d
diff --git a/ext/mbstring/tests/mb_convert_encoding_basic.phpt b/ext/mbstring/tests/mb_convert_encoding_basic.phpt
new file mode 100644
index 000000000..d7f194eb2
--- /dev/null
+++ b/ext/mbstring/tests/mb_convert_encoding_basic.phpt
@@ -0,0 +1,95 @@
+--TEST--
+Test mb_convert_encoding() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_convert_encoding') or die("skip mb_convert_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_convert_encoding(string $str, string $to_encoding [, mixed $from_encoding])
+ * Description: Returns converted string in desired encoding
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test basic functionality of mb_convert_encoding()
+ */
+
+echo "*** Testing mb_convert_encoding() : basic functionality ***\n";
+
+//All strings are the same when displayed in their respective encodings
+$sjis_string = base64_decode('k/qWe4zqg2WDTINYg2eCxYK3gUIwMTIzNIJUglWCVoJXgliBQg==');
+$jis_string = base64_decode('GyRCRnxLXDhsJUYlLSU5JUgkRyQ5ISMbKEIwMTIzNBskQiM1IzYjNyM4IzkhIxsoQg==');
+$euc_jp_string = base64_decode('xvzL3LjspcalraW5pcikx6S5oaMwMTIzNKO1o7ajt6O4o7mhow==');
+$utf8_string = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+echo "\n-- Convert to JIS --\n";
+echo "JIS encoded string in base64:\n";
+var_dump(base64_encode($jis_string));
+echo "Converted Strings:\n";
+var_dump(base64_encode(mb_convert_encoding($sjis_string, 'JIS', 'SJIS')));
+var_dump(base64_encode(mb_convert_encoding($euc_jp_string, 'JIS', 'EUC-JP')));
+var_dump(base64_encode(mb_convert_encoding($utf8_string, 'JIS', 'UTF-8')));
+
+echo "\n-- Convert to EUC-JP --\n";
+echo "EUC-JP encoded string in base64:\n";
+var_dump(base64_encode($euc_jp_string));
+echo "Converted Strings:\n";
+var_dump(base64_encode(mb_convert_encoding($sjis_string, 'EUC-JP', 'SJIS')));
+var_dump(base64_encode(mb_convert_encoding($jis_string, 'EUC-JP', 'JIS')));
+var_dump(base64_encode(mb_convert_encoding($utf8_string, 'EUC-JP', 'UTF-8')));
+
+echo "\n-- Convert to SJIS --\n";
+echo "SJIS encoded string in base64:\n";
+var_dump(base64_encode($sjis_string));
+echo "Converted Strings:\n";
+var_dump(base64_encode(mb_convert_encoding($jis_string, 'SJIS', 'JIS')));
+var_dump(base64_encode(mb_convert_encoding($euc_jp_string, 'SJIS', 'EUC-JP')));
+var_dump(base64_encode(mb_convert_encoding($utf8_string, 'SJIS', 'UTF-8')));
+
+echo "\n-- Convert to UTF-8 --\n";
+echo "UTF-8 encoded string in base64:\n";
+var_dump(base64_encode($utf8_string));
+echo "Converted Strings:\n";
+var_dump(base64_encode(mb_convert_encoding($sjis_string, 'UTF-8', 'SJIS')));
+var_dump(base64_encode(mb_convert_encoding($jis_string, 'UTF-8', 'JIS')));
+var_dump(base64_encode(mb_convert_encoding($euc_jp_string, 'UTF-8', 'EUC-JP')));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_convert_encoding() : basic functionality ***
+
+-- Convert to JIS --
+JIS encoded string in base64:
+string(68) "GyRCRnxLXDhsJUYlLSU5JUgkRyQ5ISMbKEIwMTIzNBskQiM1IzYjNyM4IzkhIxsoQg=="
+Converted Strings:
+string(68) "GyRCRnxLXDhsJUYlLSU5JUgkRyQ5ISMbKEIwMTIzNBskQiM1IzYjNyM4IzkhIxsoQg=="
+string(68) "GyRCRnxLXDhsJUYlLSU5JUgkRyQ5ISMbKEIwMTIzNBskQiM1IzYjNyM4IzkhIxsoQg=="
+string(68) "GyRCRnxLXDhsJUYlLSU5JUgkRyQ5ISMbKEIwMTIzNBskQiM1IzYjNyM4IzkhIxsoQg=="
+
+-- Convert to EUC-JP --
+EUC-JP encoded string in base64:
+string(52) "xvzL3LjspcalraW5pcikx6S5oaMwMTIzNKO1o7ajt6O4o7mhow=="
+Converted Strings:
+string(52) "xvzL3LjspcalraW5pcikx6S5oaMwMTIzNKO1o7ajt6O4o7mhow=="
+string(52) "xvzL3LjspcalraW5pcikx6S5oaMwMTIzNKO1o7ajt6O4o7mhow=="
+string(52) "xvzL3LjspcalraW5pcikx6S5oaMwMTIzNKO1o7ajt6O4o7mhow=="
+
+-- Convert to SJIS --
+SJIS encoded string in base64:
+string(52) "k/qWe4zqg2WDTINYg2eCxYK3gUIwMTIzNIJUglWCVoJXgliBQg=="
+Converted Strings:
+string(52) "k/qWe4zqg2WDTINYg2eCxYK3gUIwMTIzNIJUglWCVoJXgliBQg=="
+string(52) "k/qWe4zqg2WDTINYg2eCxYK3gUIwMTIzNIJUglWCVoJXgliBQg=="
+string(52) "k/qWe4zqg2WDTINYg2eCxYK3gUIwMTIzNIJUglWCVoJXgliBQg=="
+
+-- Convert to UTF-8 --
+UTF-8 encoded string in base64:
+string(72) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+Converted Strings:
+string(72) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+string(72) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+string(72) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_basic.phpt b/ext/mbstring/tests/mb_encode_mimeheader_basic.phpt
new file mode 100644
index 000000000..fb0c28166
--- /dev/null
+++ b/ext/mbstring/tests/mb_encode_mimeheader_basic.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Test mb_encode_mimeheader() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
+?>
+
+--FILE--
+<?php
+/* Prototype : string mb_encode_mimeheader
+ * (string $str [, string $charset [, string $transfer-encoding [, string $linefeed [, int $indent]]]])
+ * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test basic functionality of mb_encode_mimeheader with different strings.
+ * For the below strings:
+ * 'English' is ASCII only, 'Japanese' has no ASCII characters and 'Greek' is mixed.
+ */
+
+echo "*** Testing mb_encode_mimeheader() : basic ***\n";
+mb_internal_encoding('utf-8');
+
+$inputs = array('English' => 'This is an English string. 0123456789',
+ 'Japanese' => base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC'),
+ 'Greek' => base64_decode('zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg=='));
+
+foreach ($inputs as $lang => $input) {
+ echo "\nLanguage: $lang\n";
+ echo "-- Base 64: --\n";
+ var_dump(mb_encode_mimeheader($input, 'UTF-8', 'B'));
+ echo "-- Quoted-Printable --\n";
+ var_dump(mb_encode_mimeheader($input, 'UTF-8', 'Q'));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_encode_mimeheader() : basic ***
+
+Language: English
+-- Base 64: --
+string(37) "This is an English string. 0123456789"
+-- Quoted-Printable --
+string(37) "This is an English string. 0123456789"
+
+Language: Japanese
+-- Base 64: --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+-- Quoted-Printable --
+string(117) "=?UTF-8?Q?=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88?=
+ =?UTF-8?Q?=E3=81=A7=E3=81=99=E3=80=82?="
+
+Language: Greek
+-- Base 64: --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+-- Quoted-Printable --
+string(249) "=?UTF-8?Q?=CE=91=CF=85=CF=84=CF=8C=20=CE=B5=CE=AF=CE=BD=CE=B1=CE=B9=20?=
+ =?UTF-8?Q?=CE=B5=CE=BB=CE=BB=CE=B7=CE=BD=CE=B9=CE=BA=CF=8C=20=CE=BA=CE=B5?=
+ =?UTF-8?Q?=CE=AF=CE=BC=CE=B5=CE=BD=CE=BF=2E=20=30=31=32=33=34=35=36=37=38?=
+ =?UTF-8?Q?=39=2E?="
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt
new file mode 100644
index 000000000..f440e1d44
--- /dev/null
+++ b/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt
@@ -0,0 +1,186 @@
+--TEST--
+Test mb_encode_mimeheader() function : usage variations - Pass different data types to $str arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_encode_mimeheader
+ * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
+ * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types to $str argument to see how mb_encode_mimeheader() behaves
+ */
+
+echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
+
+mb_internal_encoding('utf-8');
+
+// Initialise function arguments not being substituted
+$charset = 'utf-8';
+$transfer_encoding = 'B';
+$linefeed = "\r\n";
+$indent = 2;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $str argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_encode_mimeheader($input, $charset, $transfer_encoding, $linefeed, $indent));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_encode_mimeheader() : usage variations ***
+
+-- Iteration 1 --
+string(1) "0"
+
+-- Iteration 2 --
+string(1) "1"
+
+-- Iteration 3 --
+string(5) "12345"
+
+-- Iteration 4 --
+string(5) "-2345"
+
+-- Iteration 5 --
+string(4) "10.5"
+
+-- Iteration 6 --
+string(5) "-10.5"
+
+-- Iteration 7 --
+string(12) "123456789000"
+
+-- Iteration 8 --
+string(13) "1.23456789E-9"
+
+-- Iteration 9 --
+string(3) "0.5"
+
+-- Iteration 10 --
+string(0) ""
+
+-- Iteration 11 --
+string(0) ""
+
+-- Iteration 12 --
+string(1) "1"
+
+-- Iteration 13 --
+string(0) ""
+
+-- Iteration 14 --
+string(1) "1"
+
+-- Iteration 15 --
+string(0) ""
+
+-- Iteration 16 --
+string(0) ""
+
+-- Iteration 17 --
+string(0) ""
+
+-- Iteration 18 --
+string(6) "string"
+
+-- Iteration 19 --
+string(6) "string"
+
+-- Iteration 20 --
+string(11) "hello world"
+
+-- Iteration 21 --
+string(14) "Class A object"
+
+-- Iteration 22 --
+string(0) ""
+
+-- Iteration 23 --
+string(0) ""
+
+-- Iteration 24 --
+
+Warning: mb_encode_mimeheader() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt
new file mode 100644
index 000000000..855c3b33b
--- /dev/null
+++ b/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt
@@ -0,0 +1,224 @@
+--TEST--
+Test mb_encode_mimeheader() function : usage variations - Pass different data types to $charset arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_encode_mimeheader
+ * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
+ * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types to $charset argument to see how mb_encode_mimeheader() behaves
+ */
+
+echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
+
+mb_internal_encoding('utf-8');
+
+// Initialise function arguments not being substituted
+$str = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC');
+$transfer_encoding = 'B';
+$linefeed = "\r\n";
+$indent = 2;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+utf-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $charset argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "utf-8",
+ 'utf-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_encode_mimeheader($str, $input, $transfer_encoding, $linefeed, $indent));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_encode_mimeheader() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 19 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 20 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 21 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 22 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_encode_mimeheader() expects parameter 2 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt
new file mode 100644
index 000000000..8c6bf08e7
--- /dev/null
+++ b/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt
@@ -0,0 +1,186 @@
+--TEST--
+Test mb_encode_mimeheader() function : usage variations - Pass different data types to $transfer_encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_encode_mimeheader
+ * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
+ * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types to $transfer_encoding argument to see how mb_encode_mimeheader() behaves
+ */
+
+echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
+
+mb_internal_encoding('utf-8');
+
+// Initialise function arguments not being substituted
+$str = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC');
+$charset = 'utf-8';
+$linefeed = "\r\n";
+$indent = 2;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $transfer_encoding argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_encode_mimeheader($str, $charset, $input, $linefeed, $indent));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_encode_mimeheader() : usage variations ***
+
+-- Iteration 1 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 2 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 3 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 4 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 5 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 6 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 7 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 8 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 9 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 10 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 11 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 12 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 13 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 14 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 15 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 16 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 17 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 18 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 19 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 20 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 21 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 22 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 23 --
+string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?="
+
+-- Iteration 24 --
+
+Warning: mb_encode_mimeheader() expects parameter 3 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt
new file mode 100644
index 000000000..64e236d70
--- /dev/null
+++ b/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt
@@ -0,0 +1,187 @@
+--TEST--
+Test mb_encode_mimeheader() function : usage variations - Pass different data types to $linefeed arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_encode_mimeheader
+ * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
+ * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types to $linefeed argument to see how mb_encode_mimeheader() behaves
+ */
+
+echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
+mb_internal_encoding('utf-8');
+
+
+// Initialise function arguments not being substituted
+//longer $str to go over 1 line
+$str = base64_decode('zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==');
+$charset = 'utf-8';
+$transfer_encoding = 'B';
+$indent = 2;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $linefeed argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_encode_mimeheader($str, $charset, $transfer_encoding, $input, $indent));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_encode_mimeheader() : usage variations ***
+
+-- Iteration 1 --
+string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=0 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 2 --
+string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 3 --
+string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=12345 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 4 --
+string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=-2345 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 5 --
+string(117) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=10.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 6 --
+string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=-10.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 7 --
+string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=12345678 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 8 --
+string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1.234567 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 9 --
+string(116) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=0.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 10 --
+string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 11 --
+string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 12 --
+string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 13 --
+string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 14 --
+string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 15 --
+string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 16 --
+string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 17 --
+string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 18 --
+string(119) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=string =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 19 --
+string(119) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=string =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 20 --
+string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=hello wo =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 21 --
+string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=Class A =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 22 --
+string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 23 --
+string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 24 --
+
+Warning: mb_encode_mimeheader() expects parameter 4 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt
new file mode 100644
index 000000000..593b3c15a
--- /dev/null
+++ b/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt
@@ -0,0 +1,215 @@
+--TEST--
+Test mb_encode_mimeheader() function : usage variations - Pass different data types to $indent arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_encode_mimeheader
+ * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
+ * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types to $indent argument to see how mb_encode_mimeheader() behaves
+ */
+
+echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
+
+mb_internal_encoding('utf-8');
+
+// Initialise function arguments not being substituted
+$str = base64_decode('zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==');
+$charset = 'utf-8';
+$transfer_encoding = 'B';
+$linefeed = "\r\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $indent argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_encode_mimeheader()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_encode_mimeheader($str, $charset, $transfer_encoding, $linefeed, $input));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_encode_mimeheader() : usage variations ***
+
+-- Iteration 1 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 2 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 3 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 4 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 5 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66?=
+ =?UTF-8?B?zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 6 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 7 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 8 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 9 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 10 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 11 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 12 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 13 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 14 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 15 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 16 --
+
+Warning: mb_encode_mimeheader() expects parameter 5 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: mb_encode_mimeheader() expects parameter 5 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: mb_encode_mimeheader() expects parameter 5 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: mb_encode_mimeheader() expects parameter 5 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: mb_encode_mimeheader() expects parameter 5 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: mb_encode_mimeheader() expects parameter 5 to be long, object given in %s on line %d
+NULL
+
+-- Iteration 22 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 23 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 24 --
+
+Warning: mb_encode_mimeheader() expects parameter 5 to be long, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation6.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation6.phpt
new file mode 100644
index 000000000..20ba5c17d
--- /dev/null
+++ b/ext/mbstring/tests/mb_encode_mimeheader_variation6.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test mb_encode_mimeheader() function : usage variations - Pass different strings to $linefeed arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_encode_mimeheader
+ * (string $str [, string $charset [, string $transfer_encoding [, string $linefeed [, int $indent]]]])
+ * Description: Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?=
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different strings to $linefeed argument
+ */
+
+echo "*** Testing mb_encode_mimeheader() : usage variations ***\n";
+
+mb_internal_encoding('utf-8');
+
+$linefeeds = array("\r\n",
+ "\n",
+ "---");
+$str = base64_decode('zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==');
+
+$iterator = 1;
+foreach ($linefeeds as $linefeed) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(mb_encode_mimeheader($str, 'utf-8', 'B', $linefeed));
+ $iterator++;
+}
+
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_encode_mimeheader() : usage variations ***
+
+-- Iteration 1 --
+string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 2 --
+string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=
+ =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+
+-- Iteration 3 --
+string(116) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=--- =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?="
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_ereg1.phpt b/ext/mbstring/tests/mb_ereg1.phpt
index e420312da..663d1b778 100644
--- a/ext/mbstring/tests/mb_ereg1.phpt
+++ b/ext/mbstring/tests/mb_ereg1.phpt
@@ -30,17 +30,16 @@ array(3) {
[2]=>
int(3)
}
-int(1)
+
+Warning: mb_ereg(): empty pattern in %s on line %d
+bool(false)
array(3) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
- array(1) {
- [0]=>
- bool(false)
- }
+ string(0) ""
}
Notice: Array to string conversion in %s on line %d
diff --git a/ext/mbstring/tests/mb_ereg_basic.phpt b/ext/mbstring/tests/mb_ereg_basic.phpt
new file mode 100644
index 000000000..0bdaf74ee
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_basic.phpt
@@ -0,0 +1,117 @@
+--TEST--
+Test mb_ereg() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Test basic functionality of mb_ereg
+ */
+
+echo "*** Testing mb_ereg() : basic functionality ***\n";
+
+if(mb_regex_encoding('utf-8') == true) {
+ echo "Regex encoding set to utf-8\n";
+} else {
+ echo "Could not set regex encoding to utf-8\n";
+}
+$string_ascii = 'This is an English string. 0123456789.';
+$regex_ascii1 = '(.*is)+.*\.[[:blank:]][0-9]{9}';
+$regex_ascii2 = '.*is+';
+
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+$regex_mb1 = base64_decode('KOaXpeacrOiqnikuKj8oWzEtOV0rKQ==');
+$regex_mb2 = base64_decode('5LiW55WM');
+
+echo "\n**-- ASCII String --**\n";
+echo "-- Without \$regs argument--\n";
+var_dump(mb_ereg($regex_ascii1, $string_ascii));
+var_dump(mb_ereg($regex_ascii2, $string_ascii));
+echo "--With \$regs argument --\n";
+var_dump(mb_ereg($regex_ascii1, $string_ascii, $regs_ascii1));
+var_dump($regs_ascii1);
+var_dump(mb_ereg($regex_ascii2, $string_ascii, $regs_ascii2));
+var_dump($regs_ascii2);
+
+echo "\n**-- Multibyte String --**\n";
+echo "-- Without \$regs argument --\n";
+var_dump(mb_ereg($regex_mb1, $string_mb));
+var_dump(mb_ereg($regex_mb2, $string_mb));
+echo "-- With \$regs argument --\n";
+var_dump(mb_ereg($regex_mb1, $string_mb, $regs_mb1));
+base64_encode_var_dump($regs_mb1);
+var_dump(mb_ereg($regex_mb2, $string_mb, $regs_mb2));
+var_dump($regs_mb2);
+
+echo "Done";
+
+/**
+ * replicate a var dump of an array but outputted string values are base64 encoded
+ *
+ * @param array $regs
+ */
+function base64_encode_var_dump($regs) {
+ if ($regs) {
+ echo "array(" . count($regs) . ") {\n";
+ foreach ($regs as $key => $value) {
+ echo " [$key]=>\n ";
+ if (is_string($value)) {
+ var_dump(base64_encode($value));
+ } else {
+ var_dump($value);
+ }
+ }
+ echo "}\n";
+ } else {
+ echo "NULL\n";
+ }
+}
+?>
+
+--EXPECTF--
+*** Testing mb_ereg() : basic functionality ***
+Regex encoding set to utf-8
+
+**-- ASCII String --**
+-- Without $regs argument--
+int(1)
+int(1)
+--With $regs argument --
+int(36)
+array(2) {
+ [0]=>
+ string(36) "This is an English string. 012345678"
+ [1]=>
+ string(17) "This is an Englis"
+}
+int(17)
+array(1) {
+ [0]=>
+ string(17) "This is an Englis"
+}
+
+**-- Multibyte String --**
+-- Without $regs argument --
+int(1)
+bool(false)
+-- With $regs argument --
+int(35)
+array(3) {
+ [0]=>
+ string(48) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzQ="
+ [1]=>
+ string(12) "5pel5pys6Kqe"
+ [2]=>
+ string(8) "MTIzNA=="
+}
+bool(false)
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_ereg_error.phpt b/ext/mbstring/tests/mb_ereg_error.phpt
new file mode 100644
index 000000000..21216257c
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_error.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test mb_ereg() function : error conditions - pass incorrect number of arguments
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Test behaviour of mb_ereg() when passed an incorrcect number of arguments
+ */
+
+echo "*** Testing mb_ereg() : error conditions ***\n";
+
+
+//Test mb_ereg with one more than the expected number of arguments
+echo "\n-- Testing mb_ereg() function with more than expected no. of arguments --\n";
+$pattern = 'string_val';
+$string = 'string_val';
+$registers = array(1, 2);
+$extra_arg = 10;
+var_dump( mb_ereg($pattern, $string, $registers, $extra_arg) );
+
+// Testing mb_ereg with one less than the expected number of arguments
+echo "\n-- Testing mb_ereg() function with less than expected no. of arguments --\n";
+$pattern = 'string_val';
+var_dump( mb_ereg($pattern) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_ereg() : error conditions ***
+
+-- Testing mb_ereg() function with more than expected no. of arguments --
+
+Warning: mb_ereg() expects at most 3 parameters, 4 given in %s on line %d
+bool(false)
+
+-- Testing mb_ereg() function with less than expected no. of arguments --
+
+Warning: mb_ereg() expects at least 2 parameters, 1 given in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_ereg_variation1.phpt b/ext/mbstring/tests/mb_ereg_variation1.phpt
new file mode 100644
index 000000000..a8aa5d8ba
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_variation1.phpt
@@ -0,0 +1,165 @@
+--TEST--
+Test mb_ereg() function : usage variations - pass different data types to $pattern argument
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Pass different data types to $pattern argument
+ */
+
+echo "*** Testing mb_ereg() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$string = 'string value';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $pattern argument
+$inputs = array(
+
+// int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+// float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+// boolean data
+/*10*/ true,
+ TRUE,
+
+// string data
+/*12*/ "string",
+ 'string',
+ $heredoc,
+
+// object data
+/*15*/ new classA(),
+
+// resource variable
+/*16*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_ereg()
+$iterator = 1;
+foreach($inputs as $input) {
+ if (@is_array($regs)){
+ $regs = null;
+ }
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_ereg($input, $string, $regs) );
+ var_dump($regs);
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_ereg() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+NULL
+
+-- Iteration 2 --
+bool(false)
+NULL
+
+-- Iteration 3 --
+bool(false)
+NULL
+
+-- Iteration 4 --
+bool(false)
+NULL
+
+-- Iteration 5 --
+bool(false)
+NULL
+
+-- Iteration 6 --
+bool(false)
+NULL
+
+-- Iteration 7 --
+bool(false)
+NULL
+
+-- Iteration 8 --
+bool(false)
+NULL
+
+-- Iteration 9 --
+bool(false)
+NULL
+
+-- Iteration 10 --
+bool(false)
+NULL
+
+-- Iteration 11 --
+bool(false)
+NULL
+
+-- Iteration 12 --
+int(6)
+array(1) {
+ [0]=>
+ string(6) "string"
+}
+
+-- Iteration 13 --
+int(6)
+array(1) {
+ [0]=>
+ string(6) "string"
+}
+
+-- Iteration 14 --
+bool(false)
+NULL
+
+-- Iteration 15 --
+bool(false)
+NULL
+
+-- Iteration 16 --
+bool(false)
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_ereg_variation2.phpt b/ext/mbstring/tests/mb_ereg_variation2.phpt
new file mode 100644
index 000000000..d85c8bd56
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_variation2.phpt
@@ -0,0 +1,216 @@
+--TEST--
+Test mb_ereg() function : usage variations - pass different data types to $string arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Test behaviour of mb_ereg() when passed different data types as $string arg
+ */
+
+echo "*** Testing mb_ereg() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$pattern = 'str';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $string argument
+$inputs = array(
+
+// int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+// float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+// null data
+/*10*/ NULL,
+ null,
+
+// boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+// empty data
+/*16*/ "",
+ '',
+
+// string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+// object data
+/*21*/ new classA(),
+
+// undefined data
+/*22*/ @$undefined_var,
+
+// unset data
+/*23*/ @$unset_var,
+
+// resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_ereg()
+$iterator = 1;
+foreach($inputs as $input) {
+ if (@is_array($regs)){
+ $regs = null;
+ }
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_ereg($pattern, $input, $regs) );
+ var_dump($regs);
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+
+?>
+
+--EXPECTF--
+*** Testing mb_ereg() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+NULL
+
+-- Iteration 2 --
+bool(false)
+NULL
+
+-- Iteration 3 --
+bool(false)
+NULL
+
+-- Iteration 4 --
+bool(false)
+NULL
+
+-- Iteration 5 --
+bool(false)
+NULL
+
+-- Iteration 6 --
+bool(false)
+NULL
+
+-- Iteration 7 --
+bool(false)
+NULL
+
+-- Iteration 8 --
+bool(false)
+NULL
+
+-- Iteration 9 --
+bool(false)
+NULL
+
+-- Iteration 10 --
+bool(false)
+NULL
+
+-- Iteration 11 --
+bool(false)
+NULL
+
+-- Iteration 12 --
+bool(false)
+NULL
+
+-- Iteration 13 --
+bool(false)
+NULL
+
+-- Iteration 14 --
+bool(false)
+NULL
+
+-- Iteration 15 --
+bool(false)
+NULL
+
+-- Iteration 16 --
+bool(false)
+NULL
+
+-- Iteration 17 --
+bool(false)
+NULL
+
+-- Iteration 18 --
+int(3)
+array(1) {
+ [0]=>
+ string(3) "str"
+}
+
+-- Iteration 19 --
+int(3)
+array(1) {
+ [0]=>
+ string(3) "str"
+}
+
+-- Iteration 20 --
+bool(false)
+NULL
+
+-- Iteration 21 --
+bool(false)
+NULL
+
+-- Iteration 22 --
+bool(false)
+NULL
+
+-- Iteration 23 --
+bool(false)
+NULL
+
+-- Iteration 24 --
+
+Warning: mb_ereg() expects parameter 2 to be string, resource given in %s on line %d
+bool(false)
+NULL
+Done
diff --git a/ext/mbstring/tests/mb_ereg_variation3.phpt b/ext/mbstring/tests/mb_ereg_variation3.phpt
new file mode 100644
index 000000000..0236e4410
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_variation3.phpt
@@ -0,0 +1,163 @@
+--TEST--
+Test mb_ereg() function : usage variations - pass different character classes to see they match correctly
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * test that mb_ereg can match correctly when passed different character classes.
+ */
+
+echo "*** Testing mb_ereg() : variation ***\n";
+
+
+mb_regex_encoding('utf-8'); // have to set otherwise won't match $mb properly
+$mb = base64_decode('5pel5pys6Kqe');
+$character_classes = array ('aB1' => '[[:alnum:]]+', /*1*/
+ 'aBcD' => '[[:alpha:]]+',
+ 'ab/=' => '[[:ascii:]]+',
+ " \t" => '[[:blank:]]+',
+ '234' => '[[:digit:]]+', /*5*/
+ "$mb" => '[[:graph:]]+',
+ 'fjds' => '[[:lower:]]+',
+ "$mb\t" => '[[:print:]]+',
+ '.!"*@' => '[[:punct:]]+',
+ "\t" => '[[:space:]]+', /*10*/
+ 'IDSJV' => '[[:upper:]]+',
+ '3b5D' => '[[:xdigit:]]+'); /*12*/
+
+$iterator = 1;
+foreach($character_classes as $string => $pattern) {
+ if (is_array(@$regs)) {
+ $regs = null;
+ }
+ // make sure any multibyte output is in base 64
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(mb_ereg($pattern, $string, $regs));
+ if (strpos($string, $mb) === FALSE) {
+ var_dump($regs);
+ } else {
+ base64_encode_var_dump($regs);
+ }
+ $iterator++;
+}
+/**
+ * replicate a var dump of an array but outputted string values are base64 encoded
+ *
+ * @param array $regs
+ */
+function base64_encode_var_dump($regs) {
+ if ($regs) {
+ echo "array(" . count($regs) . ") {\n";
+ foreach ($regs as $key => $value) {
+ echo " [$key]=>\n ";
+ if (is_string($value)) {
+ var_dump(base64_encode($value));
+ } else {
+ var_dump($value);
+ }
+ }
+ echo "}\n";
+ } else {
+ echo "NULL\n";
+ }
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_ereg() : variation ***
+
+-- Iteration 1 --
+int(3)
+array(1) {
+ [0]=>
+ string(3) "aB1"
+}
+
+-- Iteration 2 --
+int(4)
+array(1) {
+ [0]=>
+ string(4) "aBcD"
+}
+
+-- Iteration 3 --
+int(4)
+array(1) {
+ [0]=>
+ string(4) "ab/="
+}
+
+-- Iteration 4 --
+int(2)
+array(1) {
+ [0]=>
+ string(2) " "
+}
+
+-- Iteration 5 --
+int(3)
+array(1) {
+ [0]=>
+ string(3) "234"
+}
+
+-- Iteration 6 --
+int(9)
+array(1) {
+ [0]=>
+ string(12) "5pel5pys6Kqe"
+}
+
+-- Iteration 7 --
+int(4)
+array(1) {
+ [0]=>
+ string(4) "fjds"
+}
+
+-- Iteration 8 --
+int(10)
+array(1) {
+ [0]=>
+ string(16) "5pel5pys6KqeCQ=="
+}
+
+-- Iteration 9 --
+int(5)
+array(1) {
+ [0]=>
+ string(5) ".!"*@"
+}
+
+-- Iteration 10 --
+int(1)
+array(1) {
+ [0]=>
+ string(1) " "
+}
+
+-- Iteration 11 --
+int(5)
+array(1) {
+ [0]=>
+ string(5) "IDSJV"
+}
+
+-- Iteration 12 --
+int(4)
+array(1) {
+ [0]=>
+ string(4) "3b5D"
+}
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_ereg_variation4.phpt b/ext/mbstring/tests/mb_ereg_variation4.phpt
new file mode 100644
index 000000000..7f7d6dfc9
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_variation4.phpt
@@ -0,0 +1,149 @@
+--TEST--
+Test mb_ereg() function : usage variations - pass different character classes as pattern for multibyte string
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Test how character classes match a multibyte string
+ */
+
+echo "*** Testing mb_ereg() : usage variations ***\n";
+
+mb_regex_encoding('utf-8');
+
+//contains japanese characters, ASCII digits and different, UTF-8 encoded digits
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+$character_classes = array ('[[:alnum:]]+', /*1*/
+ '[[:alpha:]]+',
+ '[[:ascii:]]+',
+ '[[:blank:]]+',
+ '[[:cntrl:]]+',/*5*/
+ '[[:digit:]]+',
+ '[[:graph:]]+',
+ '[[:lower:]]+',
+ '[[:print:]]+',
+ '[[:punct:]]+', /*10*/
+ '[[:space:]]+',
+ '[[:upper:]]+',
+ '[[:xdigit:]]+'); /*13*/
+
+$iterator = 1;
+foreach ($character_classes as $pattern) {
+ if (is_array(@$regs)) {
+ $regs = null;
+ }
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(mb_ereg($pattern, $string_mb, $regs));
+ if ($regs) {
+ base64_encode_var_dump($regs);
+ }
+ $iterator++;
+}
+/**
+ * replicate a var dump of an array but outputted string values are base64 encoded
+ *
+ * @param array $regs
+ */
+function base64_encode_var_dump($regs) {
+ if ($regs) {
+ echo "array(" . count($regs) . ") {\n";
+ foreach ($regs as $key => $value) {
+ echo " [$key]=>\n ";
+ if (is_string($value)) {
+ var_dump(base64_encode($value));
+ } else {
+ var_dump($value);
+ }
+ }
+ echo "}\n";
+ } else {
+ echo "NULL\n";
+ }
+}
+echo "Done";
+
+?>
+--EXPECTF--
+*** Testing mb_ereg() : usage variations ***
+
+-- Iteration 1 --
+int(47)
+array(1) {
+ [0]=>
+ string(64) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZMDEyMzTvvJXvvJbvvJfvvJjvvJk="
+}
+
+-- Iteration 2 --
+int(27)
+array(1) {
+ [0]=>
+ string(36) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ"
+}
+
+-- Iteration 3 --
+int(5)
+array(1) {
+ [0]=>
+ string(8) "MDEyMzQ="
+}
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+int(20)
+array(1) {
+ [0]=>
+ string(28) "MDEyMzTvvJXvvJbvvJfvvJjvvJk="
+}
+
+-- Iteration 7 --
+int(50)
+array(1) {
+ [0]=>
+ string(68) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+}
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+int(50)
+array(1) {
+ [0]=>
+ string(68) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+}
+
+-- Iteration 10 --
+int(3)
+array(1) {
+ [0]=>
+ string(4) "44CC"
+}
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+int(5)
+array(1) {
+ [0]=>
+ string(8) "MDEyMzQ="
+}
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_ereg_variation5.phpt b/ext/mbstring/tests/mb_ereg_variation5.phpt
new file mode 100644
index 000000000..95bc59919
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_variation5.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Test mb_ereg() function : usage variations - Test anchors in regex
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Test mb_ereg with anchors (start and end of string) in $pattern
+ */
+
+echo "*** Testing mb_ereg() : usage variations ***\n";
+
+mb_regex_encoding('utf-8');
+
+$string_ascii = 'This is an English string. 0123456789.';
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+$regex = '^.*?[[:blank:]]?[[:punct:][:digit:]]+\.?$';
+
+echo "\nASCII String without \$regs arg:\t\t";
+var_dump(mb_ereg($regex, $string_ascii));
+echo "ASCII String with \$regs arg:\n";
+var_dump(mb_ereg($regex, $string_ascii, $regs_ascii));
+var_dump($regs_ascii);
+
+echo "\nMultibyte String without \$regs arg:\t";
+var_dump(mb_ereg($regex, $string_mb));
+echo "Multubyte String with \$regs arg:\n";
+var_dump(mb_ereg($regex, $string_mb, $regs_mb));
+base64_encode_var_dump($regs_mb);
+
+echo "Done";
+
+/**
+ * replicate a var dump of an array but outputted string values are base64 encoded
+ *
+ * @param array $regs
+ */
+function base64_encode_var_dump($regs) {
+ if ($regs) {
+ echo "array(" . count($regs) . ") {\n";
+ foreach ($regs as $key => $value) {
+ echo " [$key]=>\n ";
+ if (is_string($value)) {
+ var_dump(base64_encode($value));
+ } else {
+ var_dump($value);
+ }
+ }
+ echo "}\n";
+ } else {
+ echo "NULL\n";
+ }
+}
+?>
+--EXPECTF--
+*** Testing mb_ereg() : usage variations ***
+
+ASCII String without $regs arg: int(1)
+ASCII String with $regs arg:
+int(38)
+array(1) {
+ [0]=>
+ string(38) "This is an English string. 0123456789."
+}
+
+Multibyte String without $regs arg: int(1)
+Multubyte String with $regs arg:
+int(53)
+array(1) {
+ [0]=>
+ string(72) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+}
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_ereg_variation6.phpt b/ext/mbstring/tests/mb_ereg_variation6.phpt
new file mode 100644
index 000000000..33d2ee571
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_variation6.phpt
@@ -0,0 +1,185 @@
+--TEST--
+Test mb_ereg() function : usage variations - match special characters
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Test how mb_ereg() matches special characters for $pattern
+ */
+
+echo "*** Testing mb_ereg() : usage variations ***\n";
+
+if(mb_regex_encoding('utf-8') == true) {
+ echo "Regex encoding set to utf-8\n";
+} else {
+ echo "Could not set regex encoding to utf-8\n";
+}
+
+$regex_char = array ('\w+', '\W+', '\s+', '\S+', '\d+', '\D+', '\b', '\B');
+
+$string_ascii = 'This is an English string. 0123456789.';
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+foreach ($regex_char as $char) {
+ echo "\n--** Pattern is: $char **--\n";
+ if (@$regs_ascii || @$regs_mb) {
+ $regs_ascii = null;
+ $regs_mb = null;
+ }
+ echo "-- ASCII String: --\n";
+ var_dump(mb_ereg($char, $string_ascii, $regs_ascii));
+ var_dump($regs_ascii);
+
+ echo "-- Multibyte String: --\n";
+ var_dump(mb_ereg($char, $string_mb, $regs_mb));
+ base64_encode_var_dump($regs_mb);
+
+}
+
+/**
+ * replicate a var dump of an array but outputted string values are base64 encoded
+ *
+ * @param array $regs
+ */
+function base64_encode_var_dump($regs) {
+ if ($regs) {
+ echo "array(" . count($regs) . ") {\n";
+ foreach ($regs as $key => $value) {
+ echo " [$key]=>\n ";
+ if (is_string($value)) {
+ var_dump(base64_encode($value));
+ } else {
+ var_dump($value);
+ }
+ }
+ echo "}\n";
+ } else {
+ echo "NULL\n";
+ }
+}
+
+echo "Done";
+
+?>
+--EXPECTF--
+*** Testing mb_ereg() : usage variations ***
+Regex encoding set to utf-8
+
+--** Pattern is: \w+ **--
+-- ASCII String: --
+int(4)
+array(1) {
+ [0]=>
+ string(4) "This"
+}
+-- Multibyte String: --
+int(27)
+array(1) {
+ [0]=>
+ string(36) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ"
+}
+
+--** Pattern is: \W+ **--
+-- ASCII String: --
+int(1)
+array(1) {
+ [0]=>
+ string(1) " "
+}
+-- Multibyte String: --
+int(3)
+array(1) {
+ [0]=>
+ string(4) "44CC"
+}
+
+--** Pattern is: \s+ **--
+-- ASCII String: --
+int(1)
+array(1) {
+ [0]=>
+ string(1) " "
+}
+-- Multibyte String: --
+bool(false)
+NULL
+
+--** Pattern is: \S+ **--
+-- ASCII String: --
+int(4)
+array(1) {
+ [0]=>
+ string(4) "This"
+}
+-- Multibyte String: --
+int(53)
+array(1) {
+ [0]=>
+ string(72) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+}
+
+--** Pattern is: \d+ **--
+-- ASCII String: --
+int(10)
+array(1) {
+ [0]=>
+ string(10) "0123456789"
+}
+-- Multibyte String: --
+int(20)
+array(1) {
+ [0]=>
+ string(28) "MDEyMzTvvJXvvJbvvJfvvJjvvJk="
+}
+
+--** Pattern is: \D+ **--
+-- ASCII String: --
+int(27)
+array(1) {
+ [0]=>
+ string(27) "This is an English string. "
+}
+-- Multibyte String: --
+int(30)
+array(1) {
+ [0]=>
+ string(40) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC"
+}
+
+--** Pattern is: \b **--
+-- ASCII String: --
+int(1)
+array(1) {
+ [0]=>
+ bool(false)
+}
+-- Multibyte String: --
+int(1)
+array(1) {
+ [0]=>
+ bool(false)
+}
+
+--** Pattern is: \B **--
+-- ASCII String: --
+int(1)
+array(1) {
+ [0]=>
+ bool(false)
+}
+-- Multibyte String: --
+int(1)
+array(1) {
+ [0]=>
+ bool(false)
+}
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_ereg_variation7.phpt b/ext/mbstring/tests/mb_ereg_variation7.phpt
new file mode 100644
index 000000000..81c958957
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_variation7.phpt
@@ -0,0 +1,94 @@
+--TEST--
+Test mb_ereg() function : usage variations - different regex features in $pattern
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_ereg(string $pattern, string $string [, array $registers])
+ * Description: Regular expression match for multibyte string
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Testing the following regular expression features match correctly:
+ * 1. definite quantifiers
+ * 2. Alternation
+ * 3. subpatterns in parentheses
+ */
+
+echo "*** Testing mb_ereg() : usage variations ***\n";
+
+if(mb_regex_encoding('utf-8') == true) {
+ echo "Regex encoding set to utf-8\n";
+} else {
+ echo "Could not set regex encoding to utf-8\n";
+}
+
+$string_ascii = 'This is an English string. 0123456789.';
+$regex_ascii = '([A-Z]\w{1,4}is( [aeiou]|h)) ?.*\.\s[0-9]+(5([6-9][79]){2})[[:punct:]]$';
+var_dump(mb_ereg($regex_ascii, $string_ascii, $regs_ascii));
+var_dump($regs_ascii);
+
+$string_mb = base64_decode('zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==');
+$regex_mb = base64_decode("W86RLc6pXShcdysgKSvOtVvOsS3PiVxzXSvOui4qKM+MfM6/KS4qXC5cc1swLTldKyg1KFs2LTldWzc5XSl7Mn0pW1s6cHVuY3Q6XV0k");
+var_dump(mb_ereg($regex_mb, $string_mb, $regs_mb));
+base64_encode_var_dump($regs_mb);
+
+/**
+ * replicate a var dump of an array but outputted string values are base64 encoded
+ *
+ * @param array $regs
+ */
+function base64_encode_var_dump($regs) {
+ if ($regs) {
+ echo "array(" . count($regs) . ") {\n";
+ foreach ($regs as $key => $value) {
+ echo " [$key]=>\n ";
+ if (is_string($value)) {
+ var_dump(base64_encode($value));
+ } else {
+ var_dump($value);
+ }
+ }
+ echo "}\n";
+ } else {
+ echo "NULL\n";
+ }
+}
+
+echo "Done";
+
+?>
+--EXPECTF--
+*** Testing mb_ereg() : usage variations ***
+Regex encoding set to utf-8
+int(38)
+array(5) {
+ [0]=>
+ string(38) "This is an English string. 0123456789."
+ [1]=>
+ string(6) "This i"
+ [2]=>
+ string(2) " i"
+ [3]=>
+ string(5) "56789"
+ [4]=>
+ string(2) "89"
+}
+int(64)
+array(5) {
+ [0]=>
+ string(88) "zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg=="
+ [1]=>
+ string(16) "zrXOr869zrHOuSA="
+ [2]=>
+ string(4) "zr8="
+ [3]=>
+ string(8) "NTY3ODk="
+ [4]=>
+ string(4) "ODk="
+}
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_internal_encoding_basic.phpt b/ext/mbstring/tests/mb_internal_encoding_basic.phpt
new file mode 100644
index 000000000..a289dcf8d
--- /dev/null
+++ b/ext/mbstring/tests/mb_internal_encoding_basic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test mb_internal_encoding() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_internal_encoding([string $encoding])
+ * Description: Sets the current internal encoding or Returns
+ * the current internal encoding as a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test basic functionality of mb_internal_encoding
+ */
+
+echo "*** Testing mb_internal_encoding() : basic functionality ***\n";
+
+var_dump(mb_internal_encoding()); //default internal encoding
+
+var_dump(mb_internal_encoding('UTF-8')); //change internal encoding to UTF-8
+
+var_dump(mb_internal_encoding()); //check internal encoding is now set to UTF-8
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_internal_encoding() : basic functionality ***
+string(%d) "%s"
+bool(true)
+string(5) "UTF-8"
+Done
diff --git a/ext/mbstring/tests/mb_internal_encoding_error1.phpt b/ext/mbstring/tests/mb_internal_encoding_error1.phpt
new file mode 100644
index 000000000..61f133a44
--- /dev/null
+++ b/ext/mbstring/tests/mb_internal_encoding_error1.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test mb_internal_encoding() function : error conditions - pass incorrect number of args
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_internal_encoding([string $encoding])
+ * Description: Sets the current internal encoding or
+ * Returns the current internal encoding as a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test mb_internal_encoding with one more than the expected number of arguments
+ */
+
+echo "*** Testing mb_internal_encoding() : error conditions ***\n";
+
+echo "\n-- Testing mb_internal_encoding() function with more than expected no. of arguments --\n";
+$encoding = 'string_val';
+$extra_arg = 10;
+var_dump( mb_internal_encoding($encoding, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_internal_encoding() : error conditions ***
+
+-- Testing mb_internal_encoding() function with more than expected no. of arguments --
+
+Warning: mb_internal_encoding() expects at most 1 parameter, 2 given in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_internal_encoding_error2.phpt b/ext/mbstring/tests/mb_internal_encoding_error2.phpt
new file mode 100644
index 000000000..d0a1653eb
--- /dev/null
+++ b/ext/mbstring/tests/mb_internal_encoding_error2.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test mb_internal_encoding() function : error conditions - pass an unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_internal_encoding([string $encoding])
+ * Description: Sets the current internal encoding or
+ * Returns the current internal encoding as a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_internal_encoding an unknown encoding
+ */
+
+echo "*** Testing mb_internal_encoding() : error conditions ***\n";
+
+var_dump(mb_internal_encoding('unknown-encoding'));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_internal_encoding() : error conditions ***
+
+Warning: mb_internal_encoding(): Unknown encoding "unknown-encoding" in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_internal_encoding_variation1.phpt b/ext/mbstring/tests/mb_internal_encoding_variation1.phpt
new file mode 100644
index 000000000..3aa1784b1
--- /dev/null
+++ b/ext/mbstring/tests/mb_internal_encoding_variation1.phpt
@@ -0,0 +1,217 @@
+--TEST--
+Test mb_internal_encoding() function : usage variations - Pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_internal_encoding([string $encoding])
+ * Description: Sets the current internal encoding or Returns
+ * the current internal encoding as a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types as $encoding to mb_internal_encoding() to test behaviour
+ * Where possible 'UTF-8' has been entered as a string value
+ */
+
+echo "*** Testing mb_internal_encoding() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $encoding argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_internal_encoding()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_internal_encoding($input) );
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+?>
+--EXPECTF--
+
+*** Testing mb_internal_encoding() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_internal_encoding(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_internal_encoding(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_internal_encoding(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_internal_encoding(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_internal_encoding(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_internal_encoding(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_internal_encoding(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_internal_encoding(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+
+Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_internal_encoding() expects parameter 1 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_internal_encoding_variation2.phpt b/ext/mbstring/tests/mb_internal_encoding_variation2.phpt
new file mode 100644
index 000000000..3abf2517a
--- /dev/null
+++ b/ext/mbstring/tests/mb_internal_encoding_variation2.phpt
@@ -0,0 +1,374 @@
+--TEST--
+Test mb_internal_encoding() function : usage variations - Test different encodings
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_internal_encoding([string $encoding])
+ * Description: Sets the current internal encoding or Returns
+ * the current internal encoding as a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test all listed encoding types from php.net to check all are known to function
+ * NB: The strings passed are *NOT* necessarily encoded in the encoding passed to the function.
+ * This test is purely to see whether the function recognises the encoding.
+ */
+
+echo "*** Testing mb_internal_encoding() : usage variations ***\n";
+
+$encoding = array('UCS-4', /*1*/
+ 'UCS-4BE',
+ 'UCS-4LE',
+ 'UCS-2',
+ 'UCS-2BE', /*5*/
+ 'UCS-2LE',
+ 'UTF-32',
+ 'UTF-32BE',
+ 'UTF-32LE',
+ 'UTF-16', /*10*/
+ 'UTF-16BE',
+ 'UTF-16LE',
+ 'UTF-7',
+ 'UTF7-IMAP',
+ 'UTF-8', /*15*/
+ 'ASCII',
+ 'EUC-JP',
+ 'SJIS',
+ 'eucJP-win',
+ 'SJIS-win', /*20*/
+ 'ISO-2022-JP',
+ 'JIS',
+ 'ISO-8859-1',
+ 'ISO-8859-2',
+ 'ISO-8859-3', /*25*/
+ 'ISO-8859-4',
+ 'ISO-8859-5',
+ 'ISO-8859-6',
+ 'ISO-8859-7',
+ 'ISO-8859-8', /*30*/
+ 'ISO-8859-9',
+ 'ISO-8859-10',
+ 'ISO-8859-13',
+ 'ISO-8859-14',
+ 'ISO-8859-15', /*35*/
+ 'byte2be',
+ 'byte2le',
+ 'byte4be',
+ 'byte4le',
+ 'BASE64', /*40*/
+ 'HTML-ENTITIES',
+ '7bit',
+ '8bit',
+ 'EUC-CN',
+ 'CP936', /*45*/
+ 'HZ',
+ 'EUC-TW',
+ 'CP950',
+ 'BIG-5',
+ 'EUC-KR', /*50*/
+ 'UHC',
+ 'ISO-2022-KR',
+ 'Windows-1251',
+ 'Windows-1252',
+ 'CP866', /*55*/
+ 'KOI8-R'); /*56*/
+
+$iterator = 1;
+foreach($encoding as $enc) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(mb_internal_encoding());
+ var_dump(mb_internal_encoding($enc));
+ var_dump(mb_internal_encoding());
+ $iterator++;
+}
+echo "Done";
+?>
+--EXPECTF--
+
+*** Testing mb_internal_encoding() : usage variations ***
+
+-- Iteration 1 --
+string(%d) "%s"
+bool(true)
+string(5) "UCS-4"
+
+-- Iteration 2 --
+string(5) "UCS-4"
+bool(true)
+string(7) "UCS-4BE"
+
+-- Iteration 3 --
+string(7) "UCS-4BE"
+bool(true)
+string(7) "UCS-4LE"
+
+-- Iteration 4 --
+string(7) "UCS-4LE"
+bool(true)
+string(5) "UCS-2"
+
+-- Iteration 5 --
+string(5) "UCS-2"
+bool(true)
+string(7) "UCS-2BE"
+
+-- Iteration 6 --
+string(7) "UCS-2BE"
+bool(true)
+string(7) "UCS-2LE"
+
+-- Iteration 7 --
+string(7) "UCS-2LE"
+bool(true)
+string(6) "UTF-32"
+
+-- Iteration 8 --
+string(6) "UTF-32"
+bool(true)
+string(8) "UTF-32BE"
+
+-- Iteration 9 --
+string(8) "UTF-32BE"
+bool(true)
+string(8) "UTF-32LE"
+
+-- Iteration 10 --
+string(8) "UTF-32LE"
+bool(true)
+string(6) "UTF-16"
+
+-- Iteration 11 --
+string(6) "UTF-16"
+bool(true)
+string(8) "UTF-16BE"
+
+-- Iteration 12 --
+string(8) "UTF-16BE"
+bool(true)
+string(8) "UTF-16LE"
+
+-- Iteration 13 --
+string(8) "UTF-16LE"
+bool(true)
+string(5) "UTF-7"
+
+-- Iteration 14 --
+string(5) "UTF-7"
+bool(true)
+string(9) "UTF7-IMAP"
+
+-- Iteration 15 --
+string(9) "UTF7-IMAP"
+bool(true)
+string(5) "UTF-8"
+
+-- Iteration 16 --
+string(5) "UTF-8"
+bool(true)
+string(5) "ASCII"
+
+-- Iteration 17 --
+string(5) "ASCII"
+bool(true)
+string(6) "EUC-JP"
+
+-- Iteration 18 --
+string(6) "EUC-JP"
+bool(true)
+string(4) "SJIS"
+
+-- Iteration 19 --
+string(4) "SJIS"
+bool(true)
+string(9) "eucJP-win"
+
+-- Iteration 20 --
+string(9) "eucJP-win"
+bool(true)
+string(8) "SJIS-win"
+
+-- Iteration 21 --
+string(8) "SJIS-win"
+bool(true)
+string(11) "ISO-2022-JP"
+
+-- Iteration 22 --
+string(11) "ISO-2022-JP"
+bool(true)
+string(3) "JIS"
+
+-- Iteration 23 --
+string(3) "JIS"
+bool(true)
+string(10) "ISO-8859-1"
+
+-- Iteration 24 --
+string(10) "ISO-8859-1"
+bool(true)
+string(10) "ISO-8859-2"
+
+-- Iteration 25 --
+string(10) "ISO-8859-2"
+bool(true)
+string(10) "ISO-8859-3"
+
+-- Iteration 26 --
+string(10) "ISO-8859-3"
+bool(true)
+string(10) "ISO-8859-4"
+
+-- Iteration 27 --
+string(10) "ISO-8859-4"
+bool(true)
+string(10) "ISO-8859-5"
+
+-- Iteration 28 --
+string(10) "ISO-8859-5"
+bool(true)
+string(10) "ISO-8859-6"
+
+-- Iteration 29 --
+string(10) "ISO-8859-6"
+bool(true)
+string(10) "ISO-8859-7"
+
+-- Iteration 30 --
+string(10) "ISO-8859-7"
+bool(true)
+string(10) "ISO-8859-8"
+
+-- Iteration 31 --
+string(10) "ISO-8859-8"
+bool(true)
+string(10) "ISO-8859-9"
+
+-- Iteration 32 --
+string(10) "ISO-8859-9"
+bool(true)
+string(11) "ISO-8859-10"
+
+-- Iteration 33 --
+string(11) "ISO-8859-10"
+bool(true)
+string(11) "ISO-8859-13"
+
+-- Iteration 34 --
+string(11) "ISO-8859-13"
+bool(true)
+string(11) "ISO-8859-14"
+
+-- Iteration 35 --
+string(11) "ISO-8859-14"
+bool(true)
+string(11) "ISO-8859-15"
+
+-- Iteration 36 --
+string(11) "ISO-8859-15"
+bool(true)
+string(7) "byte2be"
+
+-- Iteration 37 --
+string(7) "byte2be"
+bool(true)
+string(7) "byte2le"
+
+-- Iteration 38 --
+string(7) "byte2le"
+bool(true)
+string(7) "byte4be"
+
+-- Iteration 39 --
+string(7) "byte4be"
+bool(true)
+string(7) "byte4le"
+
+-- Iteration 40 --
+string(7) "byte4le"
+bool(true)
+string(6) "BASE64"
+
+-- Iteration 41 --
+string(6) "BASE64"
+bool(true)
+string(13) "HTML-ENTITIES"
+
+-- Iteration 42 --
+string(13) "HTML-ENTITIES"
+bool(true)
+string(4) "7bit"
+
+-- Iteration 43 --
+string(4) "7bit"
+bool(true)
+string(4) "8bit"
+
+-- Iteration 44 --
+string(4) "8bit"
+bool(true)
+string(6) "EUC-CN"
+
+-- Iteration 45 --
+string(6) "EUC-CN"
+bool(true)
+string(5) "CP936"
+
+-- Iteration 46 --
+string(5) "CP936"
+bool(true)
+string(2) "HZ"
+
+-- Iteration 47 --
+string(2) "HZ"
+bool(true)
+string(6) "EUC-TW"
+
+-- Iteration 48 --
+string(6) "EUC-TW"
+bool(true)
+string(5) "BIG-5"
+
+-- Iteration 49 --
+string(5) "BIG-5"
+bool(true)
+string(5) "BIG-5"
+
+-- Iteration 50 --
+string(5) "BIG-5"
+bool(true)
+string(6) "EUC-KR"
+
+-- Iteration 51 --
+string(6) "EUC-KR"
+bool(true)
+string(3) "UHC"
+
+-- Iteration 52 --
+string(3) "UHC"
+bool(true)
+string(11) "ISO-2022-KR"
+
+-- Iteration 53 --
+string(11) "ISO-2022-KR"
+bool(true)
+string(12) "Windows-1251"
+
+-- Iteration 54 --
+string(12) "Windows-1251"
+bool(true)
+string(12) "Windows-1252"
+
+-- Iteration 55 --
+string(12) "Windows-1252"
+bool(true)
+string(5) "CP866"
+
+-- Iteration 56 --
+string(5) "CP866"
+bool(true)
+string(6) "KOI8-R"
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_regex_encoding_basic.phpt b/ext/mbstring/tests/mb_regex_encoding_basic.phpt
new file mode 100644
index 000000000..a0a41e967
--- /dev/null
+++ b/ext/mbstring/tests/mb_regex_encoding_basic.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test mb_regex_encoding() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_regex_encoding') or die("skip mb_regex_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : proto string mb_regex_encoding([string encoding])
+ * Description: Returns the current encoding for regex as a string.
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Test Basic functionality of mb_regex_encoding
+ */
+
+echo "*** Testing mb_regex_encoding() : basic functionality ***\n";
+
+var_dump(mb_regex_encoding());
+
+var_dump(mb_regex_encoding('UTF-8'));
+
+var_dump(mb_regex_encoding());
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_regex_encoding() : basic functionality ***
+string(%d) "%s"
+bool(true)
+string(5) "UTF-8"
+Done
diff --git a/ext/mbstring/tests/mb_regex_encoding_error1.phpt b/ext/mbstring/tests/mb_regex_encoding_error1.phpt
new file mode 100644
index 000000000..6fe19aa9d
--- /dev/null
+++ b/ext/mbstring/tests/mb_regex_encoding_error1.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test mb_regex_encoding() function : error conditions - pass incorrect number of args
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_regex_encoding') or die("skip mb_regex_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_regex_encoding([string $encoding])
+ * Description: Returns the current encoding for regex as a string.
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Test mb_regex_encoding with one more than expected number of arguments
+ */
+
+echo "*** Testing mb_regex_encoding() : error conditions ***\n";
+
+
+echo "\n-- Testing mb_regex_encoding() function with more than expected no. of arguments --\n";
+$encoding = 'string_val';
+$extra_arg = 10;
+var_dump( mb_regex_encoding($encoding, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_regex_encoding() : error conditions ***
+
+-- Testing mb_regex_encoding() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for mb_regex_encoding() in %s on line %d
+NULL
+Done
diff --git a/ext/mbstring/tests/mb_regex_encoding_error2.phpt b/ext/mbstring/tests/mb_regex_encoding_error2.phpt
new file mode 100644
index 000000000..c752609da
--- /dev/null
+++ b/ext/mbstring/tests/mb_regex_encoding_error2.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test mb_regex_encoding() function : error conditions - Pass an unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_regex_encoding') or die("skip mb_regex_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_regex_encoding([string $encoding])
+ * Description: Returns the current encoding for regex as a string.
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Pass mb_regex_encoding an unknown type of encoding
+ */
+
+echo "*** Testing mb_regex_encoding() : error conditions ***\n";
+
+var_dump(mb_regex_encoding('unknown'));
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_regex_encoding() : error conditions ***
+
+Warning: mb_regex_encoding(): Unknown encoding "unknown" in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_regex_encoding_variation1.phpt b/ext/mbstring/tests/mb_regex_encoding_variation1.phpt
new file mode 100644
index 000000000..0d2ff99ac
--- /dev/null
+++ b/ext/mbstring/tests/mb_regex_encoding_variation1.phpt
@@ -0,0 +1,215 @@
+--TEST--
+Test mb_regex_encoding() function : usage variations - Pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_regex_encoding') or die("skip mb_regex_encoding() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_regex_encoding([string $encoding])
+ * Description: Returns the current encoding for regex as a string.
+ * Source code: ext/mbstring/php_mbregex.c
+ */
+
+/*
+ * Pass different data types as $encoding argument to mb_regex_encoding() to test behaviour
+ * Where possible, 'UTF-8' has been entered as a string value
+ */
+
+echo "*** Testing mb_regex_encoding() : usage variations ***\n";
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $encoding argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_regex_encoding()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_regex_encoding($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_regex_encoding() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_regex_encoding(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_regex_encoding(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_regex_encoding(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_regex_encoding(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_regex_encoding(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_regex_encoding(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_regex_encoding(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_regex_encoding(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+
+Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_regex_encoding(): Unknown encoding "Resource id #%d" in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strlen_basic.phpt b/ext/mbstring/tests/mb_strlen_basic.phpt
new file mode 100644
index 000000000..6214f3069
--- /dev/null
+++ b/ext/mbstring/tests/mb_strlen_basic.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test mb_strlen() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strlen') or die("skip mb_strlen() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strlen(string $str [, string $encoding])
+ * Description: Get character numbers of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test basic functionality of mb_strlen()
+ */
+
+echo "*** Testing mb_strlen() : basic functionality***\n";
+
+$string_ascii = 'abc def';
+//Japanese string in UTF-8
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+echo "\n-- ASCII String --\n";
+var_dump(mb_strlen($string_ascii));
+
+echo "\n-- Multibyte String --\n";
+var_dump(mb_strlen($string_mb, 'UTF-8'));
+
+echo "\nDone";
+?>
+
+--EXPECTF--
+*** Testing mb_strlen() : basic functionality***
+
+-- ASCII String --
+int(7)
+
+-- Multibyte String --
+int(21)
+
+Done
diff --git a/ext/mbstring/tests/mb_strlen_error1.phpt b/ext/mbstring/tests/mb_strlen_error1.phpt
new file mode 100644
index 000000000..8fcd87ec3
--- /dev/null
+++ b/ext/mbstring/tests/mb_strlen_error1.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test mb_strlen() function : error conditions - pass incorrect number of args
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strlen') or die("skip mb_strlen() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strlen(string $str [, string $encoding])
+ * Description: Get character numbers of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strlen an incorrect number of arguments to test behaviour
+ */
+
+echo "*** Testing mb_strlen() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing mb_strlen() function with Zero arguments --\n";
+var_dump( mb_strlen() );
+
+//Test mb_strlen with one more than the expected number of arguments
+echo "\n-- Testing mb_strlen() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$encoding = 'string_val';
+$extra_arg = 10;
+var_dump( mb_strlen($str, $encoding, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strlen() : error conditions ***
+
+-- Testing mb_strlen() function with Zero arguments --
+
+Warning: mb_strlen() expects at least 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing mb_strlen() function with more than expected no. of arguments --
+
+Warning: mb_strlen() expects at most 2 parameters, 3 given in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_strlen_error2.phpt b/ext/mbstring/tests/mb_strlen_error2.phpt
new file mode 100644
index 000000000..a530a8441
--- /dev/null
+++ b/ext/mbstring/tests/mb_strlen_error2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test mb_strlen() function : error conditions - pass an unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strlen') or die("skip mb_strlen() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strlen(string $str [, string $encoding])
+ * Description: Get character numbers of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test mb_strlen when passed an unknown encoding
+ */
+
+echo "*** Testing mb_strlen() : error ***\n";
+
+$string = 'abcdef';
+
+$encoding = 'unknown-encoding';
+
+var_dump(mb_strlen($string, $encoding));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strlen() : error ***
+
+Warning: mb_strlen(): Unknown encoding "unknown-encoding" in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_strlen_variation1.phpt b/ext/mbstring/tests/mb_strlen_variation1.phpt
new file mode 100644
index 000000000..a64fad17e
--- /dev/null
+++ b/ext/mbstring/tests/mb_strlen_variation1.phpt
@@ -0,0 +1,180 @@
+--TEST--
+Test mb_strlen() function : usage variations - Pass different data types as $str arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strlen') or die("skip mb_strlen() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strlen(string $str [, string $encoding])
+ * Description: Get character numbers of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test mb_strlen by passing different data types as $str argument
+ */
+
+echo "*** Testing mb_strlen() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $str argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strlen()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strlen($input, $encoding));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strlen() : usage variations ***
+
+-- Iteration 1 --
+int(1)
+
+-- Iteration 2 --
+int(1)
+
+-- Iteration 3 --
+int(5)
+
+-- Iteration 4 --
+int(5)
+
+-- Iteration 5 --
+int(4)
+
+-- Iteration 6 --
+int(5)
+
+-- Iteration 7 --
+int(12)
+
+-- Iteration 8 --
+int(13)
+
+-- Iteration 9 --
+int(3)
+
+-- Iteration 10 --
+int(0)
+
+-- Iteration 11 --
+int(0)
+
+-- Iteration 12 --
+int(1)
+
+-- Iteration 13 --
+int(0)
+
+-- Iteration 14 --
+int(1)
+
+-- Iteration 15 --
+int(0)
+
+-- Iteration 16 --
+int(0)
+
+-- Iteration 17 --
+int(0)
+
+-- Iteration 18 --
+int(6)
+
+-- Iteration 19 --
+int(6)
+
+-- Iteration 20 --
+int(11)
+
+-- Iteration 21 --
+int(14)
+
+-- Iteration 22 --
+int(0)
+
+-- Iteration 23 --
+int(0)
+
+-- Iteration 24 --
+
+Warning: mb_strlen() expects parameter 1 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strlen_variation2.phpt b/ext/mbstring/tests/mb_strlen_variation2.phpt
new file mode 100644
index 000000000..d34f3cfcb
--- /dev/null
+++ b/ext/mbstring/tests/mb_strlen_variation2.phpt
@@ -0,0 +1,220 @@
+--TEST--
+Test mb_strlen() function : usage variations - Pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strlen') or die("skip mb_strlen() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strlen(string $str [, string $encoding])
+ * Description: Get character numbers of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test mb_strlen() by passing different data types as $encoding argument.
+ * Where possible 'UTF-8' has been entered as a string value
+ */
+
+echo "*** Testing mb_strlen() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$str = 'string value';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strlen()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strlen($str, $input));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strlen() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_strlen(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_strlen(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_strlen(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_strlen(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_strlen(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_strlen(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_strlen(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_strlen(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_strlen(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_strlen(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_strlen(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_strlen(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_strlen(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_strlen(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_strlen(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_strlen(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_strlen(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+int(12)
+
+-- Iteration 19 --
+int(12)
+
+-- Iteration 20 --
+int(12)
+
+-- Iteration 21 --
+int(12)
+
+-- Iteration 22 --
+
+Warning: mb_strlen(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_strlen(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strlen() expects parameter 2 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strlen_variation3.phpt b/ext/mbstring/tests/mb_strlen_variation3.phpt
new file mode 100644
index 000000000..13dc90993
--- /dev/null
+++ b/ext/mbstring/tests/mb_strlen_variation3.phpt
@@ -0,0 +1,445 @@
+--TEST--
+Test mb_strlen() function : usage variations - Pass list of encodings
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strlen') or die("skip mb_strlen() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strlen(string $str [, string $encoding])
+ * Description: Get character numbers of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass all encodings listed on php.net to mb_strlen to test that function recognises them
+ * NB: The strings passed are *NOT* necessarily encoded in the encoding passed to the function.
+ * This test is purely to see whether the function recognises the encoding.
+ */
+
+echo "*** Testing mb_strlen() : usage variations ***\n";
+
+$encoding = array('UCS-4', /*1*/
+ 'UCS-4BE',
+ 'UCS-4LE',
+ 'UCS-2',
+ 'UCS-2BE', /*5*/
+ 'UCS-2LE',
+ 'UTF-32',
+ 'UTF-32BE',
+ 'UTF-32LE',
+ 'UTF-16', /*10*/
+ 'UTF-16BE',
+ 'UTF-16LE',
+ 'UTF-7',
+ 'UTF7-IMAP',
+ 'UTF-8', /*15*/
+ 'ASCII',
+ 'EUC-JP',
+ 'SJIS',
+ 'eucJP-win',
+ 'SJIS-win', /*20*/
+ 'ISO-2022-JP',
+ 'JIS',
+ 'ISO-8859-1',
+ 'ISO-8859-2',
+ 'ISO-8859-3', /*25*/
+ 'ISO-8859-4',
+ 'ISO-8859-5',
+ 'ISO-8859-6',
+ 'ISO-8859-7',
+ 'ISO-8859-8', /*30*/
+ 'ISO-8859-9',
+ 'ISO-8859-10',
+ 'ISO-8859-13',
+ 'ISO-8859-14',
+ 'ISO-8859-15', /*35*/
+ 'byte2be',
+ 'byte2le',
+ 'byte4be',
+ 'byte4le',
+ 'BASE64', /*40*/
+ 'HTML-ENTITIES',
+ '7bit',
+ '8bit',
+ 'EUC-CN',
+ 'CP936', /*45*/
+ 'HZ',
+ 'EUC-TW',
+ 'CP950',
+ 'BIG-5',
+ 'EUC-KR', /*50*/
+ 'UHC',
+ 'ISO-2022-KR',
+ 'Windows-1251',
+ 'Windows-1252',
+ 'CP866', /*55*/
+ 'KOI8-R'); /*56*/
+
+
+
+$iterator = 1;
+$string_ascii = 'abc def';
+$string_mb = base64_decode('44K/44OT44Ol44Os44O844OG44Kj44Oz44Kw44O744Oe44K344O844Oz44O744Kr44Oz44OR44OL44O8');
+
+foreach($encoding as $enc) {
+ echo "\n-- Iteration $iterator: $enc --\n";
+
+ echo "-- ASCII String --\n";
+ if(mb_strlen($string_ascii, $enc)) {
+ echo "Encoding $enc recognised\n";
+ } else {
+ echo "Encoding $enc not recognised\n";
+ }
+
+ echo "-- Multibyte String --\n";
+ if(mb_strlen($string_mb, $enc)){
+ echo "Encoding $enc recognised\n";
+ } else {
+ echo "Encoding $enc not recognised\n";
+ }
+ $iterator++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strlen() : usage variations ***
+
+-- Iteration 1: UCS-4 --
+-- ASCII String --
+Encoding UCS-4 recognised
+-- Multibyte String --
+Encoding UCS-4 recognised
+
+-- Iteration 2: UCS-4BE --
+-- ASCII String --
+Encoding UCS-4BE recognised
+-- Multibyte String --
+Encoding UCS-4BE recognised
+
+-- Iteration 3: UCS-4LE --
+-- ASCII String --
+Encoding UCS-4LE recognised
+-- Multibyte String --
+Encoding UCS-4LE recognised
+
+-- Iteration 4: UCS-2 --
+-- ASCII String --
+Encoding UCS-2 recognised
+-- Multibyte String --
+Encoding UCS-2 recognised
+
+-- Iteration 5: UCS-2BE --
+-- ASCII String --
+Encoding UCS-2BE recognised
+-- Multibyte String --
+Encoding UCS-2BE recognised
+
+-- Iteration 6: UCS-2LE --
+-- ASCII String --
+Encoding UCS-2LE recognised
+-- Multibyte String --
+Encoding UCS-2LE recognised
+
+-- Iteration 7: UTF-32 --
+-- ASCII String --
+Encoding UTF-32 recognised
+-- Multibyte String --
+Encoding UTF-32 recognised
+
+-- Iteration 8: UTF-32BE --
+-- ASCII String --
+Encoding UTF-32BE recognised
+-- Multibyte String --
+Encoding UTF-32BE recognised
+
+-- Iteration 9: UTF-32LE --
+-- ASCII String --
+Encoding UTF-32LE recognised
+-- Multibyte String --
+Encoding UTF-32LE recognised
+
+-- Iteration 10: UTF-16 --
+-- ASCII String --
+Encoding UTF-16 recognised
+-- Multibyte String --
+Encoding UTF-16 recognised
+
+-- Iteration 11: UTF-16BE --
+-- ASCII String --
+Encoding UTF-16BE recognised
+-- Multibyte String --
+Encoding UTF-16BE recognised
+
+-- Iteration 12: UTF-16LE --
+-- ASCII String --
+Encoding UTF-16LE recognised
+-- Multibyte String --
+Encoding UTF-16LE recognised
+
+-- Iteration 13: UTF-7 --
+-- ASCII String --
+Encoding UTF-7 recognised
+-- Multibyte String --
+Encoding UTF-7 recognised
+
+-- Iteration 14: UTF7-IMAP --
+-- ASCII String --
+Encoding UTF7-IMAP recognised
+-- Multibyte String --
+Encoding UTF7-IMAP recognised
+
+-- Iteration 15: UTF-8 --
+-- ASCII String --
+Encoding UTF-8 recognised
+-- Multibyte String --
+Encoding UTF-8 recognised
+
+-- Iteration 16: ASCII --
+-- ASCII String --
+Encoding ASCII recognised
+-- Multibyte String --
+Encoding ASCII recognised
+
+-- Iteration 17: EUC-JP --
+-- ASCII String --
+Encoding EUC-JP recognised
+-- Multibyte String --
+Encoding EUC-JP recognised
+
+-- Iteration 18: SJIS --
+-- ASCII String --
+Encoding SJIS recognised
+-- Multibyte String --
+Encoding SJIS recognised
+
+-- Iteration 19: eucJP-win --
+-- ASCII String --
+Encoding eucJP-win recognised
+-- Multibyte String --
+Encoding eucJP-win recognised
+
+-- Iteration 20: SJIS-win --
+-- ASCII String --
+Encoding SJIS-win recognised
+-- Multibyte String --
+Encoding SJIS-win recognised
+
+-- Iteration 21: ISO-2022-JP --
+-- ASCII String --
+Encoding ISO-2022-JP recognised
+-- Multibyte String --
+Encoding ISO-2022-JP recognised
+
+-- Iteration 22: JIS --
+-- ASCII String --
+Encoding JIS recognised
+-- Multibyte String --
+Encoding JIS recognised
+
+-- Iteration 23: ISO-8859-1 --
+-- ASCII String --
+Encoding ISO-8859-1 recognised
+-- Multibyte String --
+Encoding ISO-8859-1 recognised
+
+-- Iteration 24: ISO-8859-2 --
+-- ASCII String --
+Encoding ISO-8859-2 recognised
+-- Multibyte String --
+Encoding ISO-8859-2 recognised
+
+-- Iteration 25: ISO-8859-3 --
+-- ASCII String --
+Encoding ISO-8859-3 recognised
+-- Multibyte String --
+Encoding ISO-8859-3 recognised
+
+-- Iteration 26: ISO-8859-4 --
+-- ASCII String --
+Encoding ISO-8859-4 recognised
+-- Multibyte String --
+Encoding ISO-8859-4 recognised
+
+-- Iteration 27: ISO-8859-5 --
+-- ASCII String --
+Encoding ISO-8859-5 recognised
+-- Multibyte String --
+Encoding ISO-8859-5 recognised
+
+-- Iteration 28: ISO-8859-6 --
+-- ASCII String --
+Encoding ISO-8859-6 recognised
+-- Multibyte String --
+Encoding ISO-8859-6 recognised
+
+-- Iteration 29: ISO-8859-7 --
+-- ASCII String --
+Encoding ISO-8859-7 recognised
+-- Multibyte String --
+Encoding ISO-8859-7 recognised
+
+-- Iteration 30: ISO-8859-8 --
+-- ASCII String --
+Encoding ISO-8859-8 recognised
+-- Multibyte String --
+Encoding ISO-8859-8 recognised
+
+-- Iteration 31: ISO-8859-9 --
+-- ASCII String --
+Encoding ISO-8859-9 recognised
+-- Multibyte String --
+Encoding ISO-8859-9 recognised
+
+-- Iteration 32: ISO-8859-10 --
+-- ASCII String --
+Encoding ISO-8859-10 recognised
+-- Multibyte String --
+Encoding ISO-8859-10 recognised
+
+-- Iteration 33: ISO-8859-13 --
+-- ASCII String --
+Encoding ISO-8859-13 recognised
+-- Multibyte String --
+Encoding ISO-8859-13 recognised
+
+-- Iteration 34: ISO-8859-14 --
+-- ASCII String --
+Encoding ISO-8859-14 recognised
+-- Multibyte String --
+Encoding ISO-8859-14 recognised
+
+-- Iteration 35: ISO-8859-15 --
+-- ASCII String --
+Encoding ISO-8859-15 recognised
+-- Multibyte String --
+Encoding ISO-8859-15 recognised
+
+-- Iteration 36: byte2be --
+-- ASCII String --
+Encoding byte2be recognised
+-- Multibyte String --
+Encoding byte2be recognised
+
+-- Iteration 37: byte2le --
+-- ASCII String --
+Encoding byte2le recognised
+-- Multibyte String --
+Encoding byte2le recognised
+
+-- Iteration 38: byte4be --
+-- ASCII String --
+Encoding byte4be recognised
+-- Multibyte String --
+Encoding byte4be recognised
+
+-- Iteration 39: byte4le --
+-- ASCII String --
+Encoding byte4le recognised
+-- Multibyte String --
+Encoding byte4le recognised
+
+-- Iteration 40: BASE64 --
+-- ASCII String --
+Encoding BASE64 recognised
+-- Multibyte String --
+Encoding BASE64 recognised
+
+-- Iteration 41: HTML-ENTITIES --
+-- ASCII String --
+Encoding HTML-ENTITIES recognised
+-- Multibyte String --
+Encoding HTML-ENTITIES recognised
+
+-- Iteration 42: 7bit --
+-- ASCII String --
+Encoding 7bit recognised
+-- Multibyte String --
+Encoding 7bit recognised
+
+-- Iteration 43: 8bit --
+-- ASCII String --
+Encoding 8bit recognised
+-- Multibyte String --
+Encoding 8bit recognised
+
+-- Iteration 44: EUC-CN --
+-- ASCII String --
+Encoding EUC-CN recognised
+-- Multibyte String --
+Encoding EUC-CN recognised
+
+-- Iteration 45: CP936 --
+-- ASCII String --
+Encoding CP936 recognised
+-- Multibyte String --
+Encoding CP936 recognised
+
+-- Iteration 46: HZ --
+-- ASCII String --
+Encoding HZ recognised
+-- Multibyte String --
+Encoding HZ recognised
+
+-- Iteration 47: EUC-TW --
+-- ASCII String --
+Encoding EUC-TW recognised
+-- Multibyte String --
+Encoding EUC-TW recognised
+
+-- Iteration 48: CP950 --
+-- ASCII String --
+Encoding CP950 recognised
+-- Multibyte String --
+Encoding CP950 recognised
+
+-- Iteration 49: BIG-5 --
+-- ASCII String --
+Encoding BIG-5 recognised
+-- Multibyte String --
+Encoding BIG-5 recognised
+
+-- Iteration 50: EUC-KR --
+-- ASCII String --
+Encoding EUC-KR recognised
+-- Multibyte String --
+Encoding EUC-KR recognised
+
+-- Iteration 51: UHC --
+-- ASCII String --
+Encoding UHC recognised
+-- Multibyte String --
+Encoding UHC recognised
+
+-- Iteration 52: ISO-2022-KR --
+-- ASCII String --
+Encoding ISO-2022-KR recognised
+-- Multibyte String --
+Encoding ISO-2022-KR recognised
+
+-- Iteration 53: Windows-1251 --
+-- ASCII String --
+Encoding Windows-1251 recognised
+-- Multibyte String --
+Encoding Windows-1251 recognised
+
+-- Iteration 54: Windows-1252 --
+-- ASCII String --
+Encoding Windows-1252 recognised
+-- Multibyte String --
+Encoding Windows-1252 recognised
+
+-- Iteration 55: CP866 --
+-- ASCII String --
+Encoding CP866 recognised
+-- Multibyte String --
+Encoding CP866 recognised
+
+-- Iteration 56: KOI8-R --
+-- ASCII String --
+Encoding KOI8-R recognised
+-- Multibyte String --
+Encoding KOI8-R recognised
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strpos_basic.phpt b/ext/mbstring/tests/mb_strpos_basic.phpt
new file mode 100644
index 000000000..4284ab805
--- /dev/null
+++ b/ext/mbstring/tests/mb_strpos_basic.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test mb_strpos() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test basic functionality of mb_strpos with ASCII and multibyte characters
+ */
+
+echo "*** Testing mb_strpos() : basic functionality***\n";
+
+mb_internal_encoding('UTF-8');
+
+$string_ascii = 'abc def';
+//Japanese string in UTF-8
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+echo "\n-- ASCII string 1 --\n";
+var_dump(mb_strpos($string_ascii, 'd', 2, 'ISO-8859-1'));
+
+echo "\n-- ASCII string 2 --\n";
+var_dump(mb_strpos($string_ascii, '123'));
+
+echo "\n-- Multibyte string 1 --\n";
+$needle1 = base64_decode('5pel5pys6Kqe');
+var_dump(mb_strpos($string_mb, $needle1));
+
+echo "\n-- Multibyte string 2 --\n";
+$needle2 = base64_decode("44GT44KT44Gr44Gh44Gv44CB5LiW55WM");
+var_dump(mb_strpos($string_mb, $needle2));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strpos() : basic functionality***
+
+-- ASCII string 1 --
+int(4)
+
+-- ASCII string 2 --
+bool(false)
+
+-- Multibyte string 1 --
+int(0)
+
+-- Multibyte string 2 --
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strpos_error1.phpt b/ext/mbstring/tests/mb_strpos_error1.phpt
new file mode 100644
index 000000000..8f5ba8542
--- /dev/null
+++ b/ext/mbstring/tests/mb_strpos_error1.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Test mb_strpos() function : error conditions - Pass incorrect number of args
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test how mb_strpos behaves when passed an incorrect number of arguments
+ */
+
+echo "*** Testing mb_strpos() : error conditions ***\n";
+
+
+//Test mb_strpos with one more than the expected number of arguments
+echo "\n-- Testing mb_strpos() function with more than expected no. of arguments --\n";
+$haystack = 'string_val';
+$needle = 'string_val';
+$offset = 10;
+$encoding = 'string_val';
+$extra_arg = 10;
+var_dump( mb_strpos($haystack, $needle, $offset, $encoding, $extra_arg) );
+
+// Testing mb_strpos with one less than the expected number of arguments
+echo "\n-- Testing mb_strpos() function with less than expected no. of arguments --\n";
+$haystack = 'string_val';
+var_dump( mb_strpos($haystack) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strpos() : error conditions ***
+
+-- Testing mb_strpos() function with more than expected no. of arguments --
+
+Warning: mb_strpos() expects at most 4 parameters, 5 given in %s on line %d
+bool(false)
+
+-- Testing mb_strpos() function with less than expected no. of arguments --
+
+Warning: mb_strpos() expects at least 2 parameters, 1 given in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_strpos_error2.phpt b/ext/mbstring/tests/mb_strpos_error2.phpt
new file mode 100644
index 000000000..f75390f2c
--- /dev/null
+++ b/ext/mbstring/tests/mb_strpos_error2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test mb_strpos() function : error conditions - Pass unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass an unknown encoding to mb_strpos() to test behaviour
+ */
+
+echo "*** Testing mb_strpos() : error conditions ***\n";
+$haystack = 'Hello, world';
+$needle = 'world';
+$offset = 2;
+$encoding = 'unknown-encoding';
+
+var_dump( mb_strpos($haystack, $needle, $offset, $encoding) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strpos() : error conditions ***
+
+Warning: mb_strpos(): Unknown encoding "unknown-encoding" in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_strpos_variation1.phpt b/ext/mbstring/tests/mb_strpos_variation1.phpt
new file mode 100644
index 000000000..61f534791
--- /dev/null
+++ b/ext/mbstring/tests/mb_strpos_variation1.phpt
@@ -0,0 +1,182 @@
+--TEST--
+Test mb_strpos() function : usage variations - pass different data types to $haystack arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strpos different data types as $haystack arg to test behaviour
+ */
+
+echo "*** Testing mb_strpos() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$needle = 'string_val';
+$offset = 0;
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $haystack argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strpos()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strpos($input, $needle, $offset, $encoding));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strpos() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strpos() expects parameter 1 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strpos_variation2.phpt b/ext/mbstring/tests/mb_strpos_variation2.phpt
new file mode 100644
index 000000000..ed62ea8aa
--- /dev/null
+++ b/ext/mbstring/tests/mb_strpos_variation2.phpt
@@ -0,0 +1,198 @@
+--TEST--
+Test mb_strpos() function : usage variations - pass different data types as $needle arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strpos different data types as $needle arg to test behaviour
+ */
+
+echo "*** Testing mb_strpos() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$haystack = 'string_val';
+$offset = 0;
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $needle argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strpos()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strpos($haystack, $input, $offset, $encoding));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strpos() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_strpos(): Empty delimiter. in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_strpos(): Empty delimiter. in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_strpos(): Empty delimiter. in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_strpos(): Empty delimiter. in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_strpos(): Empty delimiter. in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_strpos(): Empty delimiter. in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+int(0)
+
+-- Iteration 19 --
+int(0)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+
+Warning: mb_strpos(): Empty delimiter. in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_strpos(): Empty delimiter. in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strpos() expects parameter 2 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strpos_variation3.phpt b/ext/mbstring/tests/mb_strpos_variation3.phpt
new file mode 100644
index 000000000..8f8540ee8
--- /dev/null
+++ b/ext/mbstring/tests/mb_strpos_variation3.phpt
@@ -0,0 +1,202 @@
+--TEST--
+Test mb_strpos() function : usage variations - pass different data types as $offset arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strpos different data types as $offset arg to test behaviour
+ */
+
+echo "*** Testing mb_strpos() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$needle = 'a';
+$haystack = 'string_val';
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $offest argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strpos()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strpos($haystack, $needle, $input, $encoding));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strpos() : usage variations ***
+
+-- Iteration 1 --
+int(8)
+
+-- Iteration 2 --
+int(8)
+
+-- Iteration 3 --
+
+Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+int(8)
+
+-- Iteration 9 --
+int(8)
+
+-- Iteration 10 --
+int(8)
+
+-- Iteration 11 --
+int(8)
+
+-- Iteration 12 --
+int(8)
+
+-- Iteration 13 --
+int(8)
+
+-- Iteration 14 --
+int(8)
+
+-- Iteration 15 --
+int(8)
+
+-- Iteration 16 --
+
+Warning: mb_strpos() expects parameter 3 to be long, string given in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_strpos() expects parameter 3 to be long, string given in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: mb_strpos() expects parameter 3 to be long, string given in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+
+Warning: mb_strpos() expects parameter 3 to be long, string given in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: mb_strpos() expects parameter 3 to be long, string given in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: mb_strpos() expects parameter 3 to be long, object given in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+int(8)
+
+-- Iteration 23 --
+int(8)
+
+-- Iteration 24 --
+
+Warning: mb_strpos() expects parameter 3 to be long, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strpos_variation4.phpt b/ext/mbstring/tests/mb_strpos_variation4.phpt
new file mode 100644
index 000000000..ac818c661
--- /dev/null
+++ b/ext/mbstring/tests/mb_strpos_variation4.phpt
@@ -0,0 +1,222 @@
+--TEST--
+Test mb_strpos() function : usage variations - pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strpos different data types as $encoding arg to test behaviour
+ * Where possible 'UTF-8' has been entered as a string value
+ */
+
+echo "*** Testing mb_strpos() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$haystack = 'string_val';
+$needle = 'val';
+$offset = 0;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strpos()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strpos($haystack, $needle, $offset, $input));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strpos() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_strpos(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_strpos(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_strpos(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_strpos(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_strpos(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_strpos(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_strpos(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_strpos(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_strpos(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_strpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_strpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_strpos(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_strpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_strpos(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_strpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_strpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_strpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+int(7)
+
+-- Iteration 19 --
+int(7)
+
+-- Iteration 20 --
+int(7)
+
+-- Iteration 21 --
+int(7)
+
+-- Iteration 22 --
+
+Warning: mb_strpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_strpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strpos() expects parameter 4 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strrpos_basic.phpt b/ext/mbstring/tests/mb_strrpos_basic.phpt
new file mode 100644
index 000000000..9de0388f4
--- /dev/null
+++ b/ext/mbstring/tests/mb_strrpos_basic.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Test mb_strrpos() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of last occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test basic functionality of mb_strrpos()
+ */
+
+echo "*** Testing mb_strrpos() : basic ***\n";
+
+mb_internal_encoding('UTF-8');
+
+$string_ascii = 'This is an English string. 0123456789.';
+//Japanese string in UTF-8
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+echo "\n-- ASCII string 1 --\n";
+var_dump(mb_strrpos($string_ascii, 'is', 4, 'ISO-8859-1'));
+
+echo "\n-- ASCII string 2 --\n";
+var_dump(mb_strrpos($string_ascii, 'hello, world'));
+
+echo "\n-- Multibyte string 1 --\n";
+$needle1 = base64_decode('44CC');
+var_dump(mb_strrpos($string_mb, $needle1));
+
+echo "\n-- Multibyte string 2 --\n";
+$needle2 = base64_decode('44GT44KT44Gr44Gh44Gv44CB5LiW55WM');
+var_dump(mb_strrpos($string_mb, $needle2));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strrpos() : basic ***
+
+-- ASCII string 1 --
+int(15)
+
+-- ASCII string 2 --
+bool(false)
+
+-- Multibyte string 1 --
+int(20)
+
+-- Multibyte string 2 --
+bool(false)
+Done
+
diff --git a/ext/mbstring/tests/mb_strrpos_error1.phpt b/ext/mbstring/tests/mb_strrpos_error1.phpt
new file mode 100644
index 000000000..727ef569f
--- /dev/null
+++ b/ext/mbstring/tests/mb_strrpos_error1.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Test mb_strrpos() function : error conditions - pass incorrect number of args
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of last occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strrpos() an incorrect number of arguments
+ */
+
+echo "*** Testing mb_strrpos() : error conditions ***\n";
+
+
+//Test mb_strrpos with one more than the expected number of arguments
+echo "\n-- Testing mb_strrpos() function with more than expected no. of arguments --\n";
+$haystack = 'string_val';
+$needle = 'string_val';
+$offset = 10;
+$encoding = 'string_val';
+$extra_arg = 10;
+var_dump( mb_strrpos($haystack, $needle, $offset, $encoding, $extra_arg) );
+
+// Testing mb_strrpos with one less than the expected number of arguments
+echo "\n-- Testing mb_strrpos() function with less than expected no. of arguments --\n";
+$haystack = 'string_val';
+var_dump( mb_strrpos($haystack) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strrpos() : error conditions ***
+
+-- Testing mb_strrpos() function with more than expected no. of arguments --
+
+Warning: mb_strrpos() expects at most 4 parameters, 5 given in %s on line %d
+bool(false)
+
+-- Testing mb_strrpos() function with less than expected no. of arguments --
+
+Warning: mb_strrpos() expects at least 2 parameters, 1 given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strrpos_error2.phpt b/ext/mbstring/tests/mb_strrpos_error2.phpt
new file mode 100644
index 000000000..8247d370d
--- /dev/null
+++ b/ext/mbstring/tests/mb_strrpos_error2.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test mb_strrpos() function : error conditions - pass an unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of last occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strrpos() an encoding that doesn't exist
+ */
+
+echo "*** Testing mb_strrpos() : error conditions ***\n";
+
+$haystack = 'This is an English string. 0123456789.';
+$needle = '123';
+$offset = 5;
+$encoding = 'unknown-encoding';
+
+var_dump(mb_strrpos($haystack, $needle , $offset, $encoding));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strrpos() : error conditions ***
+
+Warning: mb_strrpos(): Unknown encoding "unknown-encoding" in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strrpos_variation1.phpt b/ext/mbstring/tests/mb_strrpos_variation1.phpt
new file mode 100644
index 000000000..922cb73fd
--- /dev/null
+++ b/ext/mbstring/tests/mb_strrpos_variation1.phpt
@@ -0,0 +1,181 @@
+--TEST--
+Test mb_strrpos() function : usage variations - pass different data types to $haystack arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of last occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strrpos() different data types as $haystack argument to test behaviour
+ */
+
+echo "*** Testing mb_strrpos() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$needle = 'world';
+$offset = 0;
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "hello, world";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello, world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $haystack argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "hello, world",
+ 'hello, world',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strrpos()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strrpos($input, $needle, $offset, $encoding));
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strrpos() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+int(7)
+
+-- Iteration 19 --
+int(7)
+
+-- Iteration 20 --
+int(7)
+
+-- Iteration 21 --
+int(7)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strrpos() expects parameter 1 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strrpos_variation2.phpt b/ext/mbstring/tests/mb_strrpos_variation2.phpt
new file mode 100644
index 000000000..4986096c7
--- /dev/null
+++ b/ext/mbstring/tests/mb_strrpos_variation2.phpt
@@ -0,0 +1,183 @@
+--TEST--
+Test mb_strrpos() function : usage variations - Pass different data types to $needle arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of last occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strrpos() different data types as $needle argument to test behaviour
+ */
+
+echo "*** Testing mb_strrpos() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$haystack = 'hello, world';
+$offset = 0;
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "world";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $needle argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "world",
+ 'world',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strrpos()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strrpos($haystack, $input, $offset, $encoding));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strrpos() : usage variations ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+int(7)
+
+-- Iteration 19 --
+int(7)
+
+-- Iteration 20 --
+int(7)
+
+-- Iteration 21 --
+int(7)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strrpos() expects parameter 2 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strrpos_variation3.phpt b/ext/mbstring/tests/mb_strrpos_variation3.phpt
new file mode 100644
index 000000000..714ea1693
--- /dev/null
+++ b/ext/mbstring/tests/mb_strrpos_variation3.phpt
@@ -0,0 +1,153 @@
+--TEST--
+Test mb_strrpos() function : usage variations - Pass different data types as $offset arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of last occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strrpos() different data types as $offset argument to test behaviour
+ */
+
+echo "*** Testing mb_strrpos() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$needle = 'a';
+$haystack = 'string_val';
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "7";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed to $offset argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // object data
+/*16*/ new classA(),
+
+ // undefined data
+/*17*/ @$undefined_var,
+
+ // unset data
+/*18*/ @$unset_var
+);
+
+// loop through each element of $inputs to check the behavior of mb_strrpos()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strrpos($haystack, $needle, $input, $encoding));
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strrpos() : usage variations ***
+
+-- Iteration 1 --
+int(8)
+
+-- Iteration 2 --
+int(8)
+
+-- Iteration 3 --
+
+Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+
+Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+int(8)
+
+-- Iteration 9 --
+int(8)
+
+-- Iteration 10 --
+int(8)
+
+-- Iteration 11 --
+int(8)
+
+-- Iteration 12 --
+int(8)
+
+-- Iteration 13 --
+int(8)
+
+-- Iteration 14 --
+int(8)
+
+-- Iteration 15 --
+int(8)
+
+-- Iteration 16 --
+
+Notice: Object of class classA could not be converted to int in %s on line %d
+int(8)
+
+-- Iteration 17 --
+int(8)
+
+-- Iteration 18 --
+int(8)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strrpos_variation4.phpt b/ext/mbstring/tests/mb_strrpos_variation4.phpt
new file mode 100644
index 000000000..e3d3d43c0
--- /dev/null
+++ b/ext/mbstring/tests/mb_strrpos_variation4.phpt
@@ -0,0 +1,222 @@
+--TEST--
+Test mb_strrpos() function : usage variations - pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of last occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass mb_strrpos() different data types as $encoding argument to test behaviour
+ * Where possible 'UTF-8' has been entered as a string value
+ */
+
+echo "*** Testing mb_strrpos() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$haystack = 'hello, world';
+$needle = 'world';
+$offset = 0;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $encoding argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strrpos()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strrpos($haystack, $needle, $offset, $input));
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strrpos() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_strrpos(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_strrpos(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_strrpos(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_strrpos(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_strrpos(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_strrpos(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_strrpos(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_strrpos(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+int(7)
+
+-- Iteration 19 --
+int(7)
+
+-- Iteration 20 --
+int(7)
+
+-- Iteration 21 --
+int(7)
+
+-- Iteration 22 --
+
+Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_strrpos(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strrpos() expects parameter 4 to be string, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strrpos_variation5.phpt b/ext/mbstring/tests/mb_strrpos_variation5.phpt
new file mode 100644
index 000000000..8fdd40da3
--- /dev/null
+++ b/ext/mbstring/tests/mb_strrpos_variation5.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test mb_strrpos() function : usage variations - pass encoding as third argument (deprecated behaviour)
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of last occurrence of a string within another
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Testing deprecated behaviour where third argument can be $encoding
+ */
+
+echo "*** Testing mb_strrpos() : usage variations ***\n";
+
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+$needle_mb = base64_decode('44CC');
+
+$stringh = <<<END
+utf-8
+END;
+
+$inputs = array('Double Quoted String' => "utf-8",
+ 'Single Quoted String' => 'utf-8',
+ 'Heredoc' => $stringh);
+foreach ($inputs as $type => $input) {
+ echo "\n-- $type --\n";
+ echo "-- With fourth encoding argument --\n";
+ var_dump(mb_strrpos($string_mb, $needle_mb, $input, 'utf-8'));
+ echo "-- Without fourth encoding argument --\n";
+ var_dump(mb_strrpos($string_mb, $needle_mb, $input));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strrpos() : usage variations ***
+
+-- Double Quoted String --
+-- With fourth encoding argument --
+int(20)
+-- Without fourth encoding argument --
+int(20)
+
+-- Single Quoted String --
+-- With fourth encoding argument --
+int(20)
+-- Without fourth encoding argument --
+int(20)
+
+-- Heredoc --
+-- With fourth encoding argument --
+int(20)
+-- Without fourth encoding argument --
+int(20)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtolower_basic.phpt b/ext/mbstring/tests/mb_strtolower_basic.phpt
new file mode 100644
index 000000000..b1d31e2bc
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtolower_basic.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Test mb_strtolower() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
+ * Description: Returns a lowercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test basic functionality of mb_strtolower
+ */
+
+echo "*** Testing mb_strtolower() : basic functionality***\n";
+
+$ascii_lower = 'abcdefghijklmnopqrstuvwxyz';
+$ascii_upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+$greek_lower = base64_decode('zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J');
+$greek_upper = base64_decode('zpHOks6TzpTOlc6WzpfOmM6ZzprOm86czp3Ons6fzqDOoc6jzqTOpc6mzqfOqM6p');
+
+echo "\n-- ASCII String --\n";
+$ascii = mb_strtolower($ascii_upper);
+var_dump($ascii);
+
+if($ascii == $ascii_lower) {
+ echo "Correctly converted\n";
+} else {
+ echo "Incorrectly converted\n";
+}
+
+echo "\n-- Multibyte String --\n";
+$mb = mb_strtolower($greek_upper, 'UTF-8');
+var_dump(base64_encode($mb));
+
+if ($mb == $greek_lower) {
+ echo "Correctly converted\n";
+} else {
+ echo "Incorreclty converted\n";
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strtolower() : basic functionality***
+
+-- ASCII String --
+string(26) "abcdefghijklmnopqrstuvwxyz"
+Correctly converted
+
+-- Multibyte String --
+string(64) "zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J"
+Correctly converted
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtolower_error1.phpt b/ext/mbstring/tests/mb_strtolower_error1.phpt
new file mode 100644
index 000000000..13cdd3ce7
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtolower_error1.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test mb_strtolower() function : error conditions - pass incorrect number of arguments
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
+ * Description: Returns a lowercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to mb_strtolower() to test behaviour
+ */
+
+echo "*** Testing mb_strtolower() : error conditions***\n";
+
+//Test mb_strtolower with one more than the expected number of arguments
+echo "\n-- Testing mb_strtolower() function with more than expected no. of arguments --\n";
+$sourcestring = 'string_value';
+$encoding = 'UTF-8';
+$extra_arg = 10;
+var_dump( mb_strtolower($sourcestring, $encoding, $extra_arg) );
+
+//Test mb_strtolower with zero arguments
+echo "\n-- Testing mb_strtolower() function with zero arguments --\n";
+var_dump( mb_strtolower() );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strtolower() : error conditions***
+
+-- Testing mb_strtolower() function with more than expected no. of arguments --
+
+Warning: mb_strtolower() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+
+-- Testing mb_strtolower() function with zero arguments --
+
+Warning: mb_strtolower() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtolower_error2.phpt b/ext/mbstring/tests/mb_strtolower_error2.phpt
new file mode 100644
index 000000000..d84026b41
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtolower_error2.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test mb_strtolower() function : error conditions - pass an unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
+ * Description: Returns a lowercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass an unknown encoding to mb_strtolower() to test behaviour
+ */
+
+echo "*** Testing mb_strtolower() : error conditions***\n";
+
+$sourcestring = 'hello, world';
+$encoding = 'unknown-encoding';
+
+var_dump( mb_strtolower($sourcestring, $encoding) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strtolower() : error conditions***
+
+Warning: mb_strtolower(): Unknown encoding "unknown-encoding" in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtolower_variation1.phpt b/ext/mbstring/tests/mb_strtolower_variation1.phpt
new file mode 100644
index 000000000..ac468ca0d
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtolower_variation1.phpt
@@ -0,0 +1,180 @@
+--TEST--
+Test mb_strtolower() function : usage variations - pass different data types as $sourcestring arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
+ * Description: Returns a lowercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types to $sourcestring argument to test behaviour of mb_strtolower()
+ */
+
+echo "*** Testing mb_strtolower() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$encoding = 'UTF-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+Hello World
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $sourcestring argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "String",
+ 'String',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strtolower()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strtolower($input, $encoding) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strtolower() : usage variations ***
+
+-- Iteration 1 --
+string(1) "0"
+
+-- Iteration 2 --
+string(1) "1"
+
+-- Iteration 3 --
+string(5) "12345"
+
+-- Iteration 4 --
+string(5) "-2345"
+
+-- Iteration 5 --
+string(4) "10.5"
+
+-- Iteration 6 --
+string(5) "-10.5"
+
+-- Iteration 7 --
+string(12) "123456789000"
+
+-- Iteration 8 --
+string(13) "1.23456789e-9"
+
+-- Iteration 9 --
+string(3) "0.5"
+
+-- Iteration 10 --
+string(0) ""
+
+-- Iteration 11 --
+string(0) ""
+
+-- Iteration 12 --
+string(1) "1"
+
+-- Iteration 13 --
+string(0) ""
+
+-- Iteration 14 --
+string(1) "1"
+
+-- Iteration 15 --
+string(0) ""
+
+-- Iteration 16 --
+string(0) ""
+
+-- Iteration 17 --
+string(0) ""
+
+-- Iteration 18 --
+string(6) "string"
+
+-- Iteration 19 --
+string(6) "string"
+
+-- Iteration 20 --
+string(11) "hello world"
+
+-- Iteration 21 --
+string(14) "class a object"
+
+-- Iteration 22 --
+string(0) ""
+
+-- Iteration 23 --
+string(0) ""
+
+-- Iteration 24 --
+
+Warning: mb_strtolower() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtolower_variation2.phpt b/ext/mbstring/tests/mb_strtolower_variation2.phpt
new file mode 100644
index 000000000..c9a674f5c
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtolower_variation2.phpt
@@ -0,0 +1,219 @@
+--TEST--
+Test mb_strtolower() function : usage variations - pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
+ * Description: Returns a lowercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types to $encoding argument to test behaviour of mb_strtolower()
+ * Where possible, 'UTF-8' has been entered as a string value
+ */
+
+echo "*** Testing mb_strtolower() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$sourcestring = 'Hello, World';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $encoding argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strtolower()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strtolower($sourcestring, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_strtolower() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_strtolower(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_strtolower(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_strtolower(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_strtolower(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_strtolower(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_strtolower(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_strtolower(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_strtolower(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_strtolower(): Unknown encoding "(null)" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_strtolower(): Unknown encoding "(null)" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_strtolower(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_strtolower(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_strtolower(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_strtolower(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+string(12) "hello, world"
+
+-- Iteration 19 --
+string(12) "hello, world"
+
+-- Iteration 20 --
+string(12) "hello, world"
+
+-- Iteration 21 --
+string(12) "hello, world"
+
+-- Iteration 22 --
+
+Warning: mb_strtolower(): Unknown encoding "(null)" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_strtolower(): Unknown encoding "(null)" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strtolower() expects parameter 2 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtolower_variation3.phpt b/ext/mbstring/tests/mb_strtolower_variation3.phpt
new file mode 100644
index 000000000..7ff3cee33
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtolower_variation3.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test mb_strtolower() function : usage variations - pass mixed ASCII and non-ASCII strings
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
+ * Description: Returns a lowercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * 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).
+ */
+
+echo "*** Testing mb_strtolower() : usage variations ***\n";
+
+$string_mixed = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCUEhQLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg==');
+$string_mixed_lower = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCcGhwLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg==');
+$string_all_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC');
+
+echo "\n-- Mixed string (mulitbyte and ASCII characters) --\n";
+$a = mb_strtolower($string_mixed, 'UTF-8');
+var_dump(base64_encode($a));
+if ($a == $string_mixed_lower) {
+ echo "Correctly Converted\n";
+} else {
+ echo "Incorrectly Converted\n";
+}
+
+echo "\n-- Multibyte Only String--\n";
+$b = mb_strtolower($string_all_mb, 'UTF-8');
+var_dump(base64_encode($b));
+if ($b == $string_all_mb) { // Japanese characters only - should not be any conversion
+ echo "Correctly Converted\n";
+} else {
+ echo "Incorrectly Converted\n";
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtolower() : usage variations ***
+
+-- Mixed string (mulitbyte and ASCII characters) --
+string(80) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCcGhwLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg=="
+Correctly Converted
+
+-- Multibyte Only String--
+string(40) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC"
+Correctly Converted
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtolower_variation4.phpt b/ext/mbstring/tests/mb_strtolower_variation4.phpt
new file mode 100644
index 000000000..f08b50879
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtolower_variation4.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test mb_strtolower() function : usage variations - pass different characters to check conversion is correct
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtolower(string $sourcestring [, string $encoding])
+ * Description: Returns a lowercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass accented characters and Russian characters to check case conversion is correct
+ */
+
+echo "*** Testing mb_strtolower() : usage variations ***\n";
+
+$uppers = array('Basic Latin' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ 'Characters With Accents' => base64_decode('w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5XDlg=='),
+ 'Russian' => base64_decode('0JDQkdCS0JPQlNCV0JbQlw=='));
+$lowers = array('Basic Latin' => 'abcdefghijklmnopqrstuvwxyz',
+ 'Characters With Accents' => base64_decode('w6DDocOiw6PDpMOlw6bDp8Oow6nDqsOrw6zDrcOuw6/DsMOxw7LDs8O0w7XDtg=='),
+ 'Russian' => base64_decode('0LDQsdCy0LPQtNC10LbQtw=='));
+
+foreach ($uppers as $lang => $sourcestring) {
+ echo "\n-- $lang --\n";
+ $a = mb_strtolower($sourcestring, 'utf-8');
+ var_dump(base64_encode($a));
+ if ($a == $lowers[$lang]) {
+ echo "Correctly Converted\n";
+ } else {
+ echo "Incorrectly Converted\n";
+ }
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtolower() : usage variations ***
+
+-- Basic Latin --
+string(36) "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo="
+Correctly Converted
+
+-- Characters With Accents --
+string(64) "w6DDocOiw6PDpMOlw6bDp8Oow6nDqsOrw6zDrcOuw6/DsMOxw7LDs8O0w7XDtg=="
+Correctly Converted
+
+-- Russian --
+string(24) "0LDQsdCy0LPQtNC10LbQtw=="
+Correctly Converted
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtoupper_basic.phpt b/ext/mbstring/tests/mb_strtoupper_basic.phpt
new file mode 100644
index 000000000..b282647f8
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtoupper_basic.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test mb_strtoupper() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
+ * Description: Returns a uppercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test basic functionality of mb_strtoupper
+ */
+
+echo "*** Testing mb_strtoupper() : basic functionality ***\n";
+
+mb_internal_encoding('utf-8');
+$ascii_lower = 'abcdefghijklmnopqrstuvwxyz';
+$ascii_upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+$greek_lower = base64_decode('zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J');
+$greek_upper = base64_decode('zpHOks6TzpTOlc6WzpfOmM6ZzprOm86czp3Ons6fzqDOoc6jzqTOpc6mzqfOqM6p');
+
+echo "\n-- ASCII String --\n";
+$ascii = mb_strtoupper($ascii_lower);
+var_dump($ascii);
+
+if($ascii == $ascii_upper) {
+ echo "Correctly converted\n";
+} else {
+ echo "Incorrectly converted\n";
+}
+
+echo "\n-- Multibyte String --\n";
+$mb = mb_strtoupper($greek_lower, 'UTF-8');
+var_dump(base64_encode($mb));
+
+if ($mb == $greek_upper) {
+ echo "Correctly converted\n";
+} else {
+ echo "Incorreclty converted\n";
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtoupper() : basic functionality ***
+
+-- ASCII String --
+string(26) "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+Correctly converted
+
+-- Multibyte String --
+string(64) "zpHOks6TzpTOlc6WzpfOmM6ZzprOm86czp3Ons6fzqDOoc6jzqTOpc6mzqfOqM6p"
+Correctly converted
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtoupper_error1.phpt b/ext/mbstring/tests/mb_strtoupper_error1.phpt
new file mode 100644
index 000000000..d61c389c1
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtoupper_error1.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test mb_strtoupper() function : error conditions - pass incorrect number of args
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
+ * Description: Returns a uppercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to mb_strtoupper() to test behaviour
+ */
+
+echo "*** Testing mb_strtoupper() : error conditions ***\n";
+
+//Test mb_strtoupper with one more than the expected number of arguments
+echo "\n-- Testing mb_strtoupper() function with more than expected no. of arguments --\n";
+$sourcestring = 'string_value';
+$encoding = 'UTF-8';
+$extra_arg = 10;
+var_dump( mb_strtoupper($sourcestring, $encoding, $extra_arg) );
+
+//Test mb_strtoupper with zero arguments
+echo "\n-- Testing mb_strtoupper() function with zero arguments --\n";
+var_dump( mb_strtoupper() );
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtoupper() : error conditions ***
+
+-- Testing mb_strtoupper() function with more than expected no. of arguments --
+
+Warning: mb_strtoupper() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+
+-- Testing mb_strtoupper() function with zero arguments --
+
+Warning: mb_strtoupper() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtoupper_error2.phpt b/ext/mbstring/tests/mb_strtoupper_error2.phpt
new file mode 100644
index 000000000..b198fe100
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtoupper_error2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test mb_strtoupper() function : error conditions - pass an unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
+ * Description: Returns a uppercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass an unknown encoding as $encoding argument to check behaviour of mbstrtoupper()
+ */
+
+echo "*** Testing mb_strtoupper() : error conditions ***\n";
+
+$sourcestring = 'hello, world';
+$encoding = 'unknown-encoding';
+
+var_dump( mb_strtoupper($sourcestring, $encoding) );
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtoupper() : error conditions ***
+
+Warning: mb_strtoupper(): Unknown encoding "unknown-encoding" in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtoupper_variation1.phpt b/ext/mbstring/tests/mb_strtoupper_variation1.phpt
new file mode 100644
index 000000000..b602f696b
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtoupper_variation1.phpt
@@ -0,0 +1,182 @@
+--TEST--
+Test mb_strtoupper() function : usage varitations - pass different data types as $sourcestring arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
+ * Description: Returns a uppercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ *
+ * Pass different data types as $sourcestring argument to mb_strtoupper to test behaviour
+ */
+
+echo "*** Testing mb_strtoupper() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$encoding = 'UTF-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+Hello, World
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $sourcestring argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "String",
+ 'String',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strtoupper()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strtoupper($input, $encoding) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtoupper() : usage variations ***
+
+-- Iteration 1 --
+string(1) "0"
+
+-- Iteration 2 --
+string(1) "1"
+
+-- Iteration 3 --
+string(5) "12345"
+
+-- Iteration 4 --
+string(5) "-2345"
+
+-- Iteration 5 --
+string(4) "10.5"
+
+-- Iteration 6 --
+string(5) "-10.5"
+
+-- Iteration 7 --
+string(12) "123456789000"
+
+-- Iteration 8 --
+string(13) "1.23456789E-9"
+
+-- Iteration 9 --
+string(3) "0.5"
+
+-- Iteration 10 --
+string(0) ""
+
+-- Iteration 11 --
+string(0) ""
+
+-- Iteration 12 --
+string(1) "1"
+
+-- Iteration 13 --
+string(0) ""
+
+-- Iteration 14 --
+string(1) "1"
+
+-- Iteration 15 --
+string(0) ""
+
+-- Iteration 16 --
+string(0) ""
+
+-- Iteration 17 --
+string(0) ""
+
+-- Iteration 18 --
+string(6) "STRING"
+
+-- Iteration 19 --
+string(6) "STRING"
+
+-- Iteration 20 --
+string(12) "HELLO, WORLD"
+
+-- Iteration 21 --
+string(14) "CLASS A OBJECT"
+
+-- Iteration 22 --
+string(0) ""
+
+-- Iteration 23 --
+string(0) ""
+
+-- Iteration 24 --
+
+Warning: mb_strtoupper() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtoupper_variation2.phpt b/ext/mbstring/tests/mb_strtoupper_variation2.phpt
new file mode 100644
index 000000000..3291ce71c
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtoupper_variation2.phpt
@@ -0,0 +1,220 @@
+--TEST--
+Test mb_strtoupper() function : usage varitations - Pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
+ * Description: Returns a uppercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types as $encoding argument to mb_strtoupper() to test behaviour
+ * Where possible, 'UTF-8' is entered as string value
+ */
+
+echo "*** Testing mb_strtoupper() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$sourcestring = 'Hello, World';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $encoding argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_strtoupper()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_strtoupper($sourcestring, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtoupper() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_strtoupper(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_strtoupper(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_strtoupper(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_strtoupper(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_strtoupper(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_strtoupper(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_strtoupper(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_strtoupper(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_strtoupper(): Unknown encoding "(null)" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_strtoupper(): Unknown encoding "(null)" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+string(12) "HELLO, WORLD"
+
+-- Iteration 19 --
+string(12) "HELLO, WORLD"
+
+-- Iteration 20 --
+string(12) "HELLO, WORLD"
+
+-- Iteration 21 --
+string(12) "HELLO, WORLD"
+
+-- Iteration 22 --
+
+Warning: mb_strtoupper(): Unknown encoding "(null)" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_strtoupper(): Unknown encoding "(null)" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_strtoupper() expects parameter 2 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtoupper_variation3.phpt b/ext/mbstring/tests/mb_strtoupper_variation3.phpt
new file mode 100644
index 000000000..9b2956976
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtoupper_variation3.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Test mb_strtoupper() function : usage varitations - pass mixed ASCII and non-ASCII strings
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
+ * Description: Returns a uppercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * 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).
+ */
+
+echo "*** Testing mb_strtoupper() : usage variations ***\n";
+
+$string_mixed_upper = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCUEhQLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg==');
+$string_mixed_lower = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCcGhwLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg==');
+$string_all_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC');
+
+
+echo "\n-- Mixed string (mulitbyte and ASCII characters) --\n";
+$a = mb_strtoupper($string_mixed_lower, 'UTF-8');
+var_dump(base64_encode($a));
+if ($a == $string_mixed_upper) {
+ echo "Correctly Converted\n";
+} else {
+ echo "Incorrectly Converted\n";
+}
+
+echo "\n-- Multibyte Only String--\n";
+$b = mb_strtoupper($string_all_mb, 'UTF-8');
+var_dump(base64_encode($b));
+if ($b == $string_all_mb) { // Japanese characters only - should not be any conversion
+ echo "Correctly Converted\n";
+} else {
+ echo "Incorrectly Converted\n";
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtoupper() : usage variations ***
+
+-- Mixed string (mulitbyte and ASCII characters) --
+string(80) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCUEhQLiAwMTIzNO+8le+8lu+8l++8mO+8meOAgg=="
+Correctly Converted
+
+-- Multibyte Only String--
+string(40) "5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC"
+Correctly Converted
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_strtoupper_variation4.phpt b/ext/mbstring/tests/mb_strtoupper_variation4.phpt
new file mode 100644
index 000000000..8f5abe726
--- /dev/null
+++ b/ext/mbstring/tests/mb_strtoupper_variation4.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test mb_strtoupper() function : usage varitations - Pass different character types to check conversion is correct
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_strtoupper(string $sourcestring [, string $encoding]
+ * Description: Returns a uppercased version of $sourcestring
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass characters from different languages to check that mb_strtoupper is
+ * doing a correct case conversion
+ */
+
+echo "*** Testing mb_strtoupper() : usage variations ***\n";
+
+$uppers = array('Basic Latin' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ 'Characters With Accents' => base64_decode('w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5XDlg=='),
+ 'Russian' => base64_decode('0JDQkdCS0JPQlNCV0JbQlw=='));
+$lowers = array('Basic Latin' => 'abcdefghijklmnopqrstuvwxyz',
+ 'Characters With Accents' => base64_decode('w6DDocOiw6PDpMOlw6bDp8Oow6nDqsOrw6zDrcOuw6/DsMOxw7LDs8O0w7XDtg=='),
+ 'Russian' => base64_decode('0LDQsdCy0LPQtNC10LbQtw=='));
+
+foreach ($lowers as $lang => $sourcestring) {
+ echo "\n-- $lang --\n";
+ $a = mb_strtoupper($sourcestring, 'UTF-8');
+ var_dump(base64_encode($a));
+ if ($a == $uppers[$lang]) {
+ echo "Correctly Converted\n";
+ } else {
+ echo "Incorrectly Converted\n";
+ }
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_strtoupper() : usage variations ***
+
+-- Basic Latin --
+string(36) "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVo="
+Correctly Converted
+
+-- Characters With Accents --
+string(64) "w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5XDlg=="
+Correctly Converted
+
+-- Russian --
+string(24) "0JDQkdCS0JPQlNCV0JbQlw=="
+Correctly Converted
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_basic.phpt b/ext/mbstring/tests/mb_substr_basic.phpt
new file mode 100644
index 000000000..a43cf15bb
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_basic.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test mb_substr() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
+ * Description: Returns part of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test Basic Functionality of mb_substr with ASCII characters and multibyte strings.
+ */
+
+echo "*** Testing mb_substr() : basic functionality ***\n";
+
+$string_ascii = 'ABCDEF';
+//Japanese string in UTF-8
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+echo "\n-- ASCII string 1 --\n";
+var_dump(mb_substr($string_ascii, 3));
+
+echo "\n-- ASCII string 2 --\n";
+var_dump(mb_substr($string_ascii, 3, 5, 'ISO-8859-1'));
+
+echo "\n-- Multibyte string 1 --\n";
+$result_1 = mb_substr($string_mb, 2, 7);
+var_dump(base64_encode($result_1));
+
+echo "\n-- Multibyte string 2 --\n";
+$result_2 = mb_substr($string_mb, 2, 7, 'utf-8');
+var_dump(base64_encode($result_2));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr() : basic functionality ***
+
+-- ASCII string 1 --
+string(3) "DEF"
+
+-- ASCII string 2 --
+string(3) "DEF"
+
+-- Multibyte string 1 --
+string(12) "peacrOiqng=="
+
+-- Multibyte string 2 --
+string(28) "6Kqe44OG44Kt44K544OI44Gn44GZ"
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_count_basic.phpt b/ext/mbstring/tests/mb_substr_count_basic.phpt
new file mode 100644
index 000000000..4b8756741
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_count_basic.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test mb_substr_count() function : basic functionality
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
+ * Description: Count the number of substring occurrences
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test Basic functionality of mb_substr_count
+ */
+
+echo "*** Testing mb_substr_count() : basic functionality ***\n";
+
+$string_ascii = 'This is an English string. 0123456789.';
+
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+$needle_mb1 = base64_decode('44CC');
+$needle_mb2 = base64_decode('44GT44KT44Gr44Gh44Gv44CB5LiW55WM');
+
+echo "\n-- ASCII String --\n";
+var_dump(mb_substr_count($string_ascii, 'is'));
+var_dump(mb_substr_count($string_ascii, 'hello, world'));
+
+echo "\n-- Multibyte String --\n";
+var_dump(mb_substr_count($string_mb, $needle_mb1));
+var_dump(mb_substr_count($string_mb, $needle_mb2));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr_count() : basic functionality ***
+
+-- ASCII String --
+int(3)
+int(0)
+
+-- Multibyte String --
+int(2)
+int(0)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_count_error1.phpt b/ext/mbstring/tests/mb_substr_count_error1.phpt
new file mode 100644
index 000000000..8ddcaa6d6
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_count_error1.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test mb_substr_count() function : error conditions - pass incorrect number of arguments
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
+ * Description: Count the number of substring occurrences
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to mb_substr_count() to test behaviour
+ */
+
+echo "*** Testing mb_substr_count() : error conditions ***\n";
+
+
+//Test mb_substr_count with one more than the expected number of arguments
+echo "\n-- Testing mb_substr_count() function with more than expected no. of arguments --\n";
+$haystack = 'string_val';
+$needle = 'val';
+$encoding = 'utf-8';
+$extra_arg = 10;
+var_dump( mb_substr_count($haystack, $needle, $encoding, $extra_arg) );
+
+// Testing mb_substr_count with one less than the expected number of arguments
+echo "\n-- Testing mb_substr_count() function with less than expected no. of arguments --\n";
+$haystack = 'string_val';
+var_dump( mb_substr_count($haystack) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr_count() : error conditions ***
+
+-- Testing mb_substr_count() function with more than expected no. of arguments --
+
+Warning: mb_substr_count() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+
+-- Testing mb_substr_count() function with less than expected no. of arguments --
+
+Warning: mb_substr_count() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_count_error2.phpt b/ext/mbstring/tests/mb_substr_count_error2.phpt
new file mode 100644
index 000000000..e2572b028
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_count_error2.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test mb_substr_count() function : error conditions - pass unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
+ * Description: Count the number of substring occurrences
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test behaviour of mb_substr_count() function when passed an unknown encoding
+ */
+
+echo "*** Testing mb_substr_count() : error conditions ***\n";
+
+$haystack = 'Hello, World!';
+$needle = 'Hello';
+$encoding = 'unknown-encoding';
+
+echo "\n-- Testing mb_substr_count() function with an unknown encoding --\n";
+var_dump(mb_substr_count($haystack, $needle, $encoding));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr_count() : error conditions ***
+
+-- Testing mb_substr_count() function with an unknown encoding --
+
+Warning: mb_substr_count(): Unknown encoding "unknown-encoding" in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_count_variation1.phpt b/ext/mbstring/tests/mb_substr_count_variation1.phpt
new file mode 100644
index 000000000..8121b4871
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_count_variation1.phpt
@@ -0,0 +1,183 @@
+--TEST--
+Test mb_substr_count() function : usage variations - Pass different data types as $haystack arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype :int mb_substr_count(string $haystack, string $needle [, string $encoding])
+ * Description: Count the number of substring occurrences
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types as $haystack argument to mb_substr_count() to test behaviour
+ */
+
+echo "*** Testing mb_substr_count() : usage variations ***\n";
+
+
+// Initialise function arguments not being substituted
+$needle = 'world';
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "hello, world";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello, world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $haystack argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "hello, world",
+ 'hello, world',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_substr_count()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_substr_count($input, $needle, $encoding) );
+ $iterator++;
+};
+
+fclose($fp);
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr_count() : usage variations ***
+
+-- Iteration 1 --
+int(0)
+
+-- Iteration 2 --
+int(0)
+
+-- Iteration 3 --
+int(0)
+
+-- Iteration 4 --
+int(0)
+
+-- Iteration 5 --
+int(0)
+
+-- Iteration 6 --
+int(0)
+
+-- Iteration 7 --
+int(0)
+
+-- Iteration 8 --
+int(0)
+
+-- Iteration 9 --
+int(0)
+
+-- Iteration 10 --
+int(0)
+
+-- Iteration 11 --
+int(0)
+
+-- Iteration 12 --
+int(0)
+
+-- Iteration 13 --
+int(0)
+
+-- Iteration 14 --
+int(0)
+
+-- Iteration 15 --
+int(0)
+
+-- Iteration 16 --
+int(0)
+
+-- Iteration 17 --
+int(0)
+
+-- Iteration 18 --
+int(1)
+
+-- Iteration 19 --
+int(1)
+
+-- Iteration 20 --
+int(1)
+
+-- Iteration 21 --
+int(1)
+
+-- Iteration 22 --
+int(0)
+
+-- Iteration 23 --
+int(0)
+
+-- Iteration 24 --
+
+Warning: mb_substr_count() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+Done
diff --git a/ext/mbstring/tests/mb_substr_count_variation2.phpt b/ext/mbstring/tests/mb_substr_count_variation2.phpt
new file mode 100644
index 000000000..dac48b55a
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_count_variation2.phpt
@@ -0,0 +1,197 @@
+--TEST--
+Test mb_substr_count() function : usage variations - pass different data types as $needle arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
+ * Description: Count the number of substring occurrences
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types as $needle to mb_substr_count() to test behaviour
+ */
+
+echo "*** Testing mb_substr_count() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$haystack = 'hello, world';
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "world";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $needle argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "world",
+ 'world',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_substr_count()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_substr_count($haystack, $input, $encoding) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr_count() : usage variations ***
+
+-- Iteration 1 --
+int(0)
+
+-- Iteration 2 --
+int(0)
+
+-- Iteration 3 --
+int(0)
+
+-- Iteration 4 --
+int(0)
+
+-- Iteration 5 --
+int(0)
+
+-- Iteration 6 --
+int(0)
+
+-- Iteration 7 --
+int(0)
+
+-- Iteration 8 --
+int(0)
+
+-- Iteration 9 --
+int(0)
+
+-- Iteration 10 --
+
+Warning: mb_substr_count(): Empty substring. in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_substr_count(): Empty substring. in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+int(0)
+
+-- Iteration 13 --
+
+Warning: mb_substr_count(): Empty substring. in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+int(0)
+
+-- Iteration 15 --
+
+Warning: mb_substr_count(): Empty substring. in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_substr_count(): Empty substring. in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_substr_count(): Empty substring. in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+int(1)
+
+-- Iteration 19 --
+int(1)
+
+-- Iteration 20 --
+int(1)
+
+-- Iteration 21 --
+int(1)
+
+-- Iteration 22 --
+
+Warning: mb_substr_count(): Empty substring. in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_substr_count(): Empty substring. in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_substr_count() expects parameter 2 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_count_variation3.phpt b/ext/mbstring/tests/mb_substr_count_variation3.phpt
new file mode 100644
index 000000000..d2e7a6056
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_count_variation3.phpt
@@ -0,0 +1,220 @@
+--TEST--
+Test mb_substr_count() function :usage variations - pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
+ * Description: Count the number of substring occurrences
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types as $encoding argument to mb_substr_count() to test behaviour
+ * Where possible, 'UTF-8' is entered as string value
+ */
+
+echo "*** Testing mb_substr_count() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$haystack = 'hello, world';
+$needle = 'world';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $encoding argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_substr_count()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_substr_count($haystack, $needle, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr_count() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_substr_count(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_substr_count(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_substr_count(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_substr_count(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_substr_count(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_substr_count(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_substr_count(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_substr_count(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+int(1)
+
+-- Iteration 19 --
+int(1)
+
+-- Iteration 20 --
+int(1)
+
+-- Iteration 21 --
+int(1)
+
+-- Iteration 22 --
+
+Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_substr_count() expects parameter 3 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_error1.phpt b/ext/mbstring/tests/mb_substr_error1.phpt
new file mode 100644
index 000000000..c2007c93b
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_error1.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test mb_substr() function : error conditions - Pass incorrect number of args
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
+ * Description: Returns part of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass incorrect number of arguments to mb_substr() to test behaviour
+ */
+
+echo "*** Testing mb_substr() : error conditions ***\n";
+
+//Test mb_substr with one more than the expected number of arguments
+echo "\n-- Testing mb_substr() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$start = 10;
+$length = 10;
+$encoding = 'string_val';
+$extra_arg = 10;
+var_dump( mb_substr($str, $start, $length, $encoding, $extra_arg) );
+
+// Testing mb_substr with one less than the expected number of arguments
+echo "\n-- Testing mb_substr() function with less than expected no. of arguments --\n";
+$str = 'string_val';
+var_dump( mb_substr($str) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr() : error conditions ***
+
+-- Testing mb_substr() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for mb_substr() in %s on line %d
+NULL
+
+-- Testing mb_substr() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for mb_substr() in %s on line %d
+NULL
+Done
diff --git a/ext/mbstring/tests/mb_substr_error2.phpt b/ext/mbstring/tests/mb_substr_error2.phpt
new file mode 100644
index 000000000..72be974ed
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_error2.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test mb_substr() function : error conditions - Pass an unknown encoding
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
+ * Description: Returns part of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass an unknown encoding to mb_substr() to test behaviour
+ */
+
+echo "*** Testing mb_substr() : error conditions ***\n";
+
+$str = 'Hello, world';
+$start = 1;
+$length = 5;
+$encoding = 'unknown-encoding';
+
+var_dump( mb_substr($str, $start, $length, $encoding));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr() : error conditions ***
+
+Warning: mb_substr(): Unknown encoding "unknown-encoding" in %s on line %d
+bool(false)
+Done
diff --git a/ext/mbstring/tests/mb_substr_variation1.phpt b/ext/mbstring/tests/mb_substr_variation1.phpt
new file mode 100644
index 000000000..fd9d0db47
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_variation1.phpt
@@ -0,0 +1,179 @@
+--TEST--
+Test mb_substr() function : usage variations - pass unexpected arguments (including strings) in place of $str
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
+ * Description: Returns part of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types as $str to mb_substr() to test behaviour
+ */
+
+echo "*** Testing mb_substr() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$start = 0;
+$length = 5;
+$encoding = 'utf-8';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $str argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_substr()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_substr($input, $start, $length, $encoding));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr() : usage variations ***
+
+-- Iteration 1 --
+string(1) "0"
+
+-- Iteration 2 --
+string(1) "1"
+
+-- Iteration 3 --
+string(5) "12345"
+
+-- Iteration 4 --
+string(5) "-2345"
+
+-- Iteration 5 --
+string(4) "10.5"
+
+-- Iteration 6 --
+string(5) "-10.5"
+
+-- Iteration 7 --
+string(5) "12345"
+
+-- Iteration 8 --
+string(5) "1.234"
+
+-- Iteration 9 --
+string(3) "0.5"
+
+-- Iteration 10 --
+string(0) ""
+
+-- Iteration 11 --
+string(0) ""
+
+-- Iteration 12 --
+string(1) "1"
+
+-- Iteration 13 --
+string(0) ""
+
+-- Iteration 14 --
+string(1) "1"
+
+-- Iteration 15 --
+string(0) ""
+
+-- Iteration 16 --
+string(0) ""
+
+-- Iteration 17 --
+string(0) ""
+
+-- Iteration 18 --
+string(5) "strin"
+
+-- Iteration 19 --
+string(5) "strin"
+
+-- Iteration 20 --
+string(5) "hello"
+
+-- Iteration 21 --
+string(5) "Class"
+
+-- Iteration 22 --
+string(0) ""
+
+-- Iteration 23 --
+string(0) ""
+
+-- Iteration 24 --
+string(5) "Resou"
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_variation2.phpt b/ext/mbstring/tests/mb_substr_variation2.phpt
new file mode 100644
index 000000000..cb8a37af5
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_variation2.phpt
@@ -0,0 +1,220 @@
+--TEST--
+Test mb_substr() function : usage variations - Pass different data types as $encoding arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
+ * Description: Returns part of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass different data types as $encoding argument to mb_substr() to test behaviour
+ * Where possible, 'UTF-8' is entered as string value
+ */
+
+echo "*** Testing mb_substr() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$str = 'string_val';
+$start = 1;
+$length = 5;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "UTF-8";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+UTF-8
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "UTF-8",
+ 'UTF-8',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of mb_substr
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( mb_substr($str, $start, $length, $input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: mb_substr(): Unknown encoding "0" in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: mb_substr(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: mb_substr(): Unknown encoding "12345" in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: mb_substr(): Unknown encoding "-2345" in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: mb_substr(): Unknown encoding "10.5" in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: mb_substr(): Unknown encoding "-10.5" in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: mb_substr(): Unknown encoding "123456789000" in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: mb_substr(): Unknown encoding "1.23456789E-9" in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: mb_substr(): Unknown encoding "0.5" in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: mb_substr(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: mb_substr(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: mb_substr(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: mb_substr(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: mb_substr(): Unknown encoding "1" in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: mb_substr(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: mb_substr(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: mb_substr(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+string(5) "tring"
+
+-- Iteration 19 --
+string(5) "tring"
+
+-- Iteration 20 --
+string(5) "tring"
+
+-- Iteration 21 --
+string(5) "tring"
+
+-- Iteration 22 --
+
+Warning: mb_substr(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: mb_substr(): Unknown encoding "" in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: mb_substr(): Unknown encoding "Resource id #%d" in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_variation3.phpt b/ext/mbstring/tests/mb_substr_variation3.phpt
new file mode 100644
index 000000000..bb930b4b9
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_variation3.phpt
@@ -0,0 +1,445 @@
+--TEST--
+Test mb_substr() function : usage variations - test different encodings
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
+ * Description: Returns part of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Pass all encodings listed on php.net to test that function recognises them.
+ * NB: The strings passed are *NOT* necessarily encoded in the encoding passed to the function.
+ * This test is purely to see whether the function recognises the encoding.
+ */
+
+echo "*** Testing mb_substr() : usage variations ***\n";
+
+$encoding = array('UCS-4', /*1*/
+ 'UCS-4BE',
+ 'UCS-4LE',
+ 'UCS-2',
+ 'UCS-2BE', /*5*/
+ 'UCS-2LE',
+ 'UTF-32',
+ 'UTF-32BE',
+ 'UTF-32LE',
+ 'UTF-16', /*10*/
+ 'UTF-16BE',
+ 'UTF-16LE',
+ 'UTF-7',
+ 'UTF7-IMAP',
+ 'UTF-8', /*15*/
+ 'ASCII',
+ 'EUC-JP',
+ 'SJIS',
+ 'eucJP-win',
+ 'SJIS-win', /*20*/
+ 'ISO-2022-JP',
+ 'JIS',
+ 'ISO-8859-1',
+ 'ISO-8859-2',
+ 'ISO-8859-3', /*25*/
+ 'ISO-8859-4',
+ 'ISO-8859-5',
+ 'ISO-8859-6',
+ 'ISO-8859-7',
+ 'ISO-8859-8', /*30*/
+ 'ISO-8859-9',
+ 'ISO-8859-10',
+ 'ISO-8859-13',
+ 'ISO-8859-14',
+ 'ISO-8859-15', /*35*/
+ 'byte2be',
+ 'byte2le',
+ 'byte4be',
+ 'byte4le',
+ 'BASE64', /*40*/
+ 'HTML-ENTITIES',
+ '7bit',
+ '8bit',
+ 'EUC-CN',
+ 'CP936', /*45*/
+ 'HZ',
+ 'EUC-TW',
+ 'CP950',
+ 'BIG-5',
+ 'EUC-KR', /*50*/
+ 'UHC',
+ 'ISO-2022-KR',
+ 'Windows-1251',
+ 'Windows-1252',
+ 'CP866', /*55*/
+ 'KOI8-R'); /*56*/
+
+
+
+$iterator = 1;
+$string_ascii = 'abc def';
+//Japanese string encoded in UTF-8
+$string_mb = base64_decode('44K/44OT44Ol44Os44O844OG44Kj44Oz44Kw44O744Oe44K344O844Oz44O744Kr44Oz44OR44OL44O8');
+
+foreach($encoding as $enc) {
+ echo "\n-- Iteration $iterator: $enc --\n";
+
+ echo "-- ASCII String --\n";
+ if (mb_substr($string_ascii, 1, 5, $enc)) {
+ echo "Encoding $enc recognised\n";
+ } else {
+ echo "Encoding $enc not recognised\n";
+ }
+
+ echo "-- Multibyte String --\n";
+ if (mb_substr($string_mb, 1, 5, $enc)) {
+ echo "Encoding $enc recognised\n";
+ } else {
+ echo "Encoding $enc not recognised\n";
+ }
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr() : usage variations ***
+
+-- Iteration 1: UCS-4 --
+-- ASCII String --
+Encoding UCS-4 recognised
+-- Multibyte String --
+Encoding UCS-4 recognised
+
+-- Iteration 1: UCS-4BE --
+-- ASCII String --
+Encoding UCS-4BE recognised
+-- Multibyte String --
+Encoding UCS-4BE recognised
+
+-- Iteration 1: UCS-4LE --
+-- ASCII String --
+Encoding UCS-4LE recognised
+-- Multibyte String --
+Encoding UCS-4LE recognised
+
+-- Iteration 1: UCS-2 --
+-- ASCII String --
+Encoding UCS-2 recognised
+-- Multibyte String --
+Encoding UCS-2 recognised
+
+-- Iteration 1: UCS-2BE --
+-- ASCII String --
+Encoding UCS-2BE recognised
+-- Multibyte String --
+Encoding UCS-2BE recognised
+
+-- Iteration 1: UCS-2LE --
+-- ASCII String --
+Encoding UCS-2LE recognised
+-- Multibyte String --
+Encoding UCS-2LE recognised
+
+-- Iteration 1: UTF-32 --
+-- ASCII String --
+Encoding UTF-32 recognised
+-- Multibyte String --
+Encoding UTF-32 recognised
+
+-- Iteration 1: UTF-32BE --
+-- ASCII String --
+Encoding UTF-32BE recognised
+-- Multibyte String --
+Encoding UTF-32BE recognised
+
+-- Iteration 1: UTF-32LE --
+-- ASCII String --
+Encoding UTF-32LE recognised
+-- Multibyte String --
+Encoding UTF-32LE recognised
+
+-- Iteration 1: UTF-16 --
+-- ASCII String --
+Encoding UTF-16 recognised
+-- Multibyte String --
+Encoding UTF-16 recognised
+
+-- Iteration 1: UTF-16BE --
+-- ASCII String --
+Encoding UTF-16BE recognised
+-- Multibyte String --
+Encoding UTF-16BE recognised
+
+-- Iteration 1: UTF-16LE --
+-- ASCII String --
+Encoding UTF-16LE recognised
+-- Multibyte String --
+Encoding UTF-16LE recognised
+
+-- Iteration 1: UTF-7 --
+-- ASCII String --
+Encoding UTF-7 recognised
+-- Multibyte String --
+Encoding UTF-7 recognised
+
+-- Iteration 1: UTF7-IMAP --
+-- ASCII String --
+Encoding UTF7-IMAP recognised
+-- Multibyte String --
+Encoding UTF7-IMAP recognised
+
+-- Iteration 1: UTF-8 --
+-- ASCII String --
+Encoding UTF-8 recognised
+-- Multibyte String --
+Encoding UTF-8 recognised
+
+-- Iteration 1: ASCII --
+-- ASCII String --
+Encoding ASCII recognised
+-- Multibyte String --
+Encoding ASCII recognised
+
+-- Iteration 1: EUC-JP --
+-- ASCII String --
+Encoding EUC-JP recognised
+-- Multibyte String --
+Encoding EUC-JP recognised
+
+-- Iteration 1: SJIS --
+-- ASCII String --
+Encoding SJIS recognised
+-- Multibyte String --
+Encoding SJIS recognised
+
+-- Iteration 1: eucJP-win --
+-- ASCII String --
+Encoding eucJP-win recognised
+-- Multibyte String --
+Encoding eucJP-win recognised
+
+-- Iteration 1: SJIS-win --
+-- ASCII String --
+Encoding SJIS-win recognised
+-- Multibyte String --
+Encoding SJIS-win recognised
+
+-- Iteration 1: ISO-2022-JP --
+-- ASCII String --
+Encoding ISO-2022-JP recognised
+-- Multibyte String --
+Encoding ISO-2022-JP recognised
+
+-- Iteration 1: JIS --
+-- ASCII String --
+Encoding JIS recognised
+-- Multibyte String --
+Encoding JIS recognised
+
+-- Iteration 1: ISO-8859-1 --
+-- ASCII String --
+Encoding ISO-8859-1 recognised
+-- Multibyte String --
+Encoding ISO-8859-1 recognised
+
+-- Iteration 1: ISO-8859-2 --
+-- ASCII String --
+Encoding ISO-8859-2 recognised
+-- Multibyte String --
+Encoding ISO-8859-2 recognised
+
+-- Iteration 1: ISO-8859-3 --
+-- ASCII String --
+Encoding ISO-8859-3 recognised
+-- Multibyte String --
+Encoding ISO-8859-3 recognised
+
+-- Iteration 1: ISO-8859-4 --
+-- ASCII String --
+Encoding ISO-8859-4 recognised
+-- Multibyte String --
+Encoding ISO-8859-4 recognised
+
+-- Iteration 1: ISO-8859-5 --
+-- ASCII String --
+Encoding ISO-8859-5 recognised
+-- Multibyte String --
+Encoding ISO-8859-5 recognised
+
+-- Iteration 1: ISO-8859-6 --
+-- ASCII String --
+Encoding ISO-8859-6 recognised
+-- Multibyte String --
+Encoding ISO-8859-6 recognised
+
+-- Iteration 1: ISO-8859-7 --
+-- ASCII String --
+Encoding ISO-8859-7 recognised
+-- Multibyte String --
+Encoding ISO-8859-7 recognised
+
+-- Iteration 1: ISO-8859-8 --
+-- ASCII String --
+Encoding ISO-8859-8 recognised
+-- Multibyte String --
+Encoding ISO-8859-8 recognised
+
+-- Iteration 1: ISO-8859-9 --
+-- ASCII String --
+Encoding ISO-8859-9 recognised
+-- Multibyte String --
+Encoding ISO-8859-9 recognised
+
+-- Iteration 1: ISO-8859-10 --
+-- ASCII String --
+Encoding ISO-8859-10 recognised
+-- Multibyte String --
+Encoding ISO-8859-10 recognised
+
+-- Iteration 1: ISO-8859-13 --
+-- ASCII String --
+Encoding ISO-8859-13 recognised
+-- Multibyte String --
+Encoding ISO-8859-13 recognised
+
+-- Iteration 1: ISO-8859-14 --
+-- ASCII String --
+Encoding ISO-8859-14 recognised
+-- Multibyte String --
+Encoding ISO-8859-14 recognised
+
+-- Iteration 1: ISO-8859-15 --
+-- ASCII String --
+Encoding ISO-8859-15 recognised
+-- Multibyte String --
+Encoding ISO-8859-15 recognised
+
+-- Iteration 1: byte2be --
+-- ASCII String --
+Encoding byte2be recognised
+-- Multibyte String --
+Encoding byte2be recognised
+
+-- Iteration 1: byte2le --
+-- ASCII String --
+Encoding byte2le recognised
+-- Multibyte String --
+Encoding byte2le recognised
+
+-- Iteration 1: byte4be --
+-- ASCII String --
+Encoding byte4be recognised
+-- Multibyte String --
+Encoding byte4be recognised
+
+-- Iteration 1: byte4le --
+-- ASCII String --
+Encoding byte4le recognised
+-- Multibyte String --
+Encoding byte4le recognised
+
+-- Iteration 1: BASE64 --
+-- ASCII String --
+Encoding BASE64 recognised
+-- Multibyte String --
+Encoding BASE64 recognised
+
+-- Iteration 1: HTML-ENTITIES --
+-- ASCII String --
+Encoding HTML-ENTITIES recognised
+-- Multibyte String --
+Encoding HTML-ENTITIES recognised
+
+-- Iteration 1: 7bit --
+-- ASCII String --
+Encoding 7bit recognised
+-- Multibyte String --
+Encoding 7bit recognised
+
+-- Iteration 1: 8bit --
+-- ASCII String --
+Encoding 8bit recognised
+-- Multibyte String --
+Encoding 8bit recognised
+
+-- Iteration 1: EUC-CN --
+-- ASCII String --
+Encoding EUC-CN recognised
+-- Multibyte String --
+Encoding EUC-CN recognised
+
+-- Iteration 1: CP936 --
+-- ASCII String --
+Encoding CP936 recognised
+-- Multibyte String --
+Encoding CP936 recognised
+
+-- Iteration 1: HZ --
+-- ASCII String --
+Encoding HZ recognised
+-- Multibyte String --
+Encoding HZ recognised
+
+-- Iteration 1: EUC-TW --
+-- ASCII String --
+Encoding EUC-TW recognised
+-- Multibyte String --
+Encoding EUC-TW recognised
+
+-- Iteration 1: CP950 --
+-- ASCII String --
+Encoding CP950 recognised
+-- Multibyte String --
+Encoding CP950 recognised
+
+-- Iteration 1: BIG-5 --
+-- ASCII String --
+Encoding BIG-5 recognised
+-- Multibyte String --
+Encoding BIG-5 recognised
+
+-- Iteration 1: EUC-KR --
+-- ASCII String --
+Encoding EUC-KR recognised
+-- Multibyte String --
+Encoding EUC-KR recognised
+
+-- Iteration 1: UHC --
+-- ASCII String --
+Encoding UHC recognised
+-- Multibyte String --
+Encoding UHC recognised
+
+-- Iteration 1: ISO-2022-KR --
+-- ASCII String --
+Encoding ISO-2022-KR recognised
+-- Multibyte String --
+Encoding ISO-2022-KR recognised
+
+-- Iteration 1: Windows-1251 --
+-- ASCII String --
+Encoding Windows-1251 recognised
+-- Multibyte String --
+Encoding Windows-1251 recognised
+
+-- Iteration 1: Windows-1252 --
+-- ASCII String --
+Encoding Windows-1252 recognised
+-- Multibyte String --
+Encoding Windows-1252 recognised
+
+-- Iteration 1: CP866 --
+-- ASCII String --
+Encoding CP866 recognised
+-- Multibyte String --
+Encoding CP866 recognised
+
+-- Iteration 1: KOI8-R --
+-- ASCII String --
+Encoding KOI8-R recognised
+-- Multibyte String --
+Encoding KOI8-R recognised
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_variation4.phpt b/ext/mbstring/tests/mb_substr_variation4.phpt
new file mode 100644
index 000000000..d2c4de3ce
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_variation4.phpt
@@ -0,0 +1,131 @@
+--TEST--
+Test mb_substr() function : usage variations - pass different integers to $start arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
+?>
+--FILE--
+<?php
+/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
+ * Description: Returns part of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test how mb_substr() behaves when passed a range of integers as $start argument
+ */
+
+echo "*** Testing mb_substr() : usage variations ***\n";
+
+mb_internal_encoding('UTF-8');
+
+$string_ascii = '+Is an English string'; //21 chars
+
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); //21 chars
+
+/*
+ * Loop through integers as multiples of ten for $offset argument
+ * 60 is larger than *BYTE* count for $string_mb
+ */
+for ($i = -60; $i <= 60; $i += 10) {
+ if (@$a || @$b) {
+ $a = null;
+ $b = null;
+ }
+ echo "\n**-- Offset is: $i --**\n";
+ echo "-- ASCII String --\n";
+ var_dump($a = mb_substr($string_ascii, $i, 4));
+ echo "--Multibyte String --\n";
+ $b = mb_substr($string_mb, $i, 4, 'UTF-8');
+ if (strlen($a) == mb_strlen($b, 'UTF-8')) { // should return same length
+ var_dump(base64_encode($b));
+ } else {
+ echo "Difference in length of ASCII string and multibyte string\n";
+ }
+
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing mb_substr() : usage variations ***
+
+**-- Offset is: -60 --**
+-- ASCII String --
+string(4) "+Is "
+--Multibyte String --
+string(16) "5pel5pys6Kqe44OG"
+
+**-- Offset is: -50 --**
+-- ASCII String --
+string(4) "+Is "
+--Multibyte String --
+string(16) "5pel5pys6Kqe44OG"
+
+**-- Offset is: -40 --**
+-- ASCII String --
+string(4) "+Is "
+--Multibyte String --
+string(16) "5pel5pys6Kqe44OG"
+
+**-- Offset is: -30 --**
+-- ASCII String --
+string(4) "+Is "
+--Multibyte String --
+string(16) "5pel5pys6Kqe44OG"
+
+**-- Offset is: -20 --**
+-- ASCII String --
+string(4) "Is a"
+--Multibyte String --
+string(16) "5pys6Kqe44OG44Kt"
+
+**-- Offset is: -10 --**
+-- ASCII String --
+string(4) "ish "
+--Multibyte String --
+string(8) "MTIzNA=="
+
+**-- Offset is: 0 --**
+-- ASCII String --
+string(4) "+Is "
+--Multibyte String --
+string(16) "5pel5pys6Kqe44OG"
+
+**-- Offset is: 10 --**
+-- ASCII String --
+string(4) "lish"
+--Multibyte String --
+string(8) "MDEyMw=="
+
+**-- Offset is: 20 --**
+-- ASCII String --
+string(1) "g"
+--Multibyte String --
+string(4) "44CC"
+
+**-- Offset is: 30 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: 40 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: 50 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: 60 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+Done \ No newline at end of file
diff --git a/ext/mbstring/tests/mb_substr_variation5.phpt b/ext/mbstring/tests/mb_substr_variation5.phpt
new file mode 100644
index 000000000..02ea6d3aa
--- /dev/null
+++ b/ext/mbstring/tests/mb_substr_variation5.phpt
@@ -0,0 +1,134 @@
+--TEST--
+Test mb_substr() function : usage variations - pass different integers to $length arg
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
+?>
+--FILE--
+
+<?php
+/* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
+ * Description: Returns part of a string
+ * Source code: ext/mbstring/mbstring.c
+ */
+
+/*
+ * Test how mb_substr() behaves when passed a range of integers as $length argument
+ */
+
+echo "*** Testing mb_substr() : usage variations ***\n";
+
+mb_internal_encoding('UTF-8');
+
+$string_ascii = '+Is an English string'; //21 chars
+
+//Japanese string, 21 characters
+$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
+
+/*
+ * Loop through integers as multiples of ten for $offset argument
+ * 60 is larger than *BYTE* count for $string_mb
+ */
+for ($i = -60; $i <= 60; $i += 10) {
+ if (@$a || @$b) {
+ $a = null;
+ $b = null;
+ }
+ echo "\n**-- Offset is: $i --**\n";
+ echo "-- ASCII String --\n";
+ var_dump($a = mb_substr($string_ascii, 1, $i));
+ echo "--Multibyte String --\n";
+ $b = mb_substr($string_mb, 1, $i, 'UTF-8');
+ if (strlen($a) == mb_strlen($b, 'UTF-8')) { // should return same length
+ var_dump(base64_encode($b));
+ } else {
+ echo "Difference in length of ASCII string and multibyte string\n";
+ }
+
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing mb_substr() : usage variations ***
+
+**-- Offset is: -60 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: -50 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: -40 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: -30 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: -20 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: -10 --**
+-- ASCII String --
+string(10) "Is an Engl"
+--Multibyte String --
+string(40) "5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMA=="
+
+**-- Offset is: 0 --**
+-- ASCII String --
+string(0) ""
+--Multibyte String --
+string(0) ""
+
+**-- Offset is: 10 --**
+-- ASCII String --
+string(10) "Is an Engl"
+--Multibyte String --
+string(40) "5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMA=="
+
+**-- Offset is: 20 --**
+-- ASCII String --
+string(20) "Is an English string"
+--Multibyte String --
+string(68) "5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+
+**-- Offset is: 30 --**
+-- ASCII String --
+string(20) "Is an English string"
+--Multibyte String --
+string(68) "5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+
+**-- Offset is: 40 --**
+-- ASCII String --
+string(20) "Is an English string"
+--Multibyte String --
+string(68) "5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+
+**-- Offset is: 50 --**
+-- ASCII String --
+string(20) "Is an English string"
+--Multibyte String --
+string(68) "5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+
+**-- Offset is: 60 --**
+-- ASCII String --
+string(20) "Is an English string"
+--Multibyte String --
+string(68) "5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII="
+Done \ No newline at end of file
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index fb2463db7..a05b0314d 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
| Derick Rethans <derick@derickrethans.nl> |
+----------------------------------------------------------------------+
*/
-/* $Id: mcrypt.c,v 1.91.2.3.2.11 2007/07/19 14:32:55 tony2001 Exp $ */
+/* $Id: mcrypt.c,v 1.91.2.3.2.12 2007/12/31 07:20:08 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/mcrypt/php_mcrypt.h b/ext/mcrypt/php_mcrypt.h
index 46b7e92bd..428c90d00 100644
--- a/ext/mcrypt/php_mcrypt.h
+++ b/ext/mcrypt/php_mcrypt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
| Derick Rethans <derick@derickrethans.nl> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_mcrypt.h,v 1.26.2.1.2.2 2007/01/01 09:36:02 sebastian Exp $ */
+/* $Id: php_mcrypt.h,v 1.26.2.1.2.3 2007/12/31 07:20:08 sebastian Exp $ */
#ifndef PHP_MCRYPT_H
#define PHP_MCRYPT_H
diff --git a/ext/mhash/mhash.c b/ext/mhash/mhash.c
index f3fcd7fc6..dccf0158b 100644
--- a/ext/mhash/mhash.c
+++ b/ext/mhash/mhash.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
| Nikos Mavroyanopoulos <nmav@hellug.gr> (HMAC, KEYGEN) |
+----------------------------------------------------------------------+
*/
-/* $Id: mhash.c,v 1.48.2.3.2.5 2007/02/27 03:28:16 iliaa Exp $ */
+/* $Id: mhash.c,v 1.48.2.3.2.6 2007/12/31 07:20:08 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/mhash/php_mhash.h b/ext/mhash/php_mhash.h
index bf30d19bb..0258c9e3f 100644
--- a/ext/mhash/php_mhash.h
+++ b/ext/mhash/php_mhash.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
| Nikos Mavroyanopoulos <nmav@hellug.gr> (HMAC, KEYGEN) |
+----------------------------------------------------------------------+
*/
-/* $Id: php_mhash.h,v 1.12.2.1.2.1 2007/01/01 09:36:03 sebastian Exp $ */
+/* $Id: php_mhash.h,v 1.12.2.1.2.2 2007/12/31 07:20:08 sebastian Exp $ */
#ifndef PHP_MHASH_H
#define PHP_MHASH_H
diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c
index 0deb6a3d1..f864f6079 100644
--- a/ext/mime_magic/mime_magic.c
+++ b/ext/mime_magic/mime_magic.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Hartmut Holzgraefe <hholzgra@php.net> |
+----------------------------------------------------------------------+
- $Id: mime_magic.c,v 1.42.2.5.2.7 2007/06/07 08:44:41 tony2001 Exp $
+ $Id: mime_magic.c,v 1.42.2.5.2.8 2007/12/31 07:20:08 sebastian Exp $
This module contains a lot of stuff taken from Apache mod_mime_magic,
so the license section is a little bit longer than usual:
diff --git a/ext/mime_magic/php_mime_magic.h b/ext/mime_magic/php_mime_magic.h
index 4cf5e506e..43f576ee1 100644
--- a/ext/mime_magic/php_mime_magic.h
+++ b/ext/mime_magic/php_mime_magic.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: |
+----------------------------------------------------------------------+
- $Id: php_mime_magic.h,v 1.11.2.1.2.1 2007/01/01 09:36:03 sebastian Exp $
+ $Id: php_mime_magic.h,v 1.11.2.1.2.2 2007/12/31 07:20:08 sebastian Exp $
*/
#ifndef PHP_MIME_MAGIC_H
diff --git a/ext/mime_magic/phpmimemagic.h b/ext/mime_magic/phpmimemagic.h
index 6b0ec69aa..c8426722b 100644
--- a/ext/mime_magic/phpmimemagic.h
+++ b/ext/mime_magic/phpmimemagic.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: |
+----------------------------------------------------------------------+
- $Id: phpmimemagic.h,v 1.3.2.2.2.1 2007/01/01 09:36:03 sebastian Exp $
+ $Id: phpmimemagic.h,v 1.3.2.2.2.2 2007/12/31 07:20:08 sebastian Exp $
*/
#ifndef PHPMIMEMAGIC_H
diff --git a/ext/ming/ming.c b/ext/ming/ming.c
index 66b511c64..0f63216fa 100644
--- a/ext/ming/ming.c
+++ b/ext/ming/ming.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ming.c,v 1.79.2.4.2.8 2007/01/06 19:25:31 nlopess Exp $ */
+/* $Id: ming.c,v 1.79.2.4.2.9 2007/12/31 07:20:08 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/ming/php_ming.h b/ext/ming/php_ming.h
index 1a6fde889..5de1ab97a 100644
--- a/ext/ming/php_ming.h
+++ b/ext/ming/php_ming.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ming.h,v 1.17.2.1.2.3 2007/01/06 19:25:31 nlopess Exp $ */
+/* $Id: php_ming.h,v 1.17.2.1.2.4 2007/12/31 07:20:08 sebastian Exp $ */
#ifndef _PHP_MING_H
#define _PHP_MING_H
diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c
index 47d2baf87..27440a459 100644
--- a/ext/msql/php_msql.c
+++ b/ext/msql/php_msql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_msql.c,v 1.60.2.4.2.2 2007/02/24 02:17:25 helly Exp $ */
+/* $Id: php_msql.c,v 1.60.2.4.2.3 2007/12/31 07:20:08 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/msql/php_msql.h b/ext/msql/php_msql.h
index ecbdcd41b..4fdca4f58 100644
--- a/ext/msql/php_msql.h
+++ b/ext/msql/php_msql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_msql.h,v 1.13.2.1.2.1 2007/01/01 09:36:03 sebastian Exp $ */
+/* $Id: php_msql.h,v 1.13.2.1.2.2 2007/12/31 07:20:08 sebastian Exp $ */
#ifndef PHP_MSQL_H
#define PHP_MSQL_H
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c
index fdf670af3..549d3fd40 100644
--- a/ext/mssql/php_mssql.c
+++ b/ext/mssql/php_mssql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mssql.c,v 1.152.2.13.2.5 2007/10/22 22:43:44 iliaa Exp $ */
+/* $Id: php_mssql.c,v 1.152.2.13.2.8 2008/03/05 23:53:23 iliaa Exp $ */
#ifdef COMPILE_DL_MSSQL
#define HAVE_MSSQL 1
diff --git a/ext/mssql/php_mssql.h b/ext/mssql/php_mssql.h
index 9546062ca..049d58a03 100644
--- a/ext/mssql/php_mssql.h
+++ b/ext/mssql/php_mssql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
*/
-/* $Id: php_mssql.h,v 1.42.2.3.2.1 2007/01/01 09:36:03 sebastian Exp $ */
+/* $Id: php_mssql.h,v 1.42.2.3.2.2 2007/12/31 07:20:08 sebastian Exp $ */
#ifndef PHP_MSSQL_H
#define PHP_MSSQL_H
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 515f7314b..4fa30fb4b 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.213.2.6.2.17 2007/10/08 18:25:52 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.25 2008/04/16 08:54:44 tony2001 Exp $ */
/* TODO:
*
@@ -419,7 +419,7 @@ PHP_MSHUTDOWN_FUNCTION(mysql)
#ifdef PHP_WIN32
unsigned long client_ver = mysql_get_client_version();
/* Can't call mysql_server_end() multiple times prior to 5.0.42 on Windows */
- if ((client_ver > 50042 && client_ver < 50100) || client_ver > 50122) {
+ if ((client_ver >= 50046 && client_ver < 50100) || client_ver > 50122) {
mysql_server_end();
}
#else
@@ -514,14 +514,14 @@ PHP_MINFO_FUNCTION(mysql)
static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
char *user=NULL, *passwd=NULL, *host_and_port=NULL, *socket=NULL, *tmp=NULL, *host=NULL;
+ int user_len, passwd_len, host_len;
char *hashed_details=NULL;
int hashed_details_length, port = MYSQL_PORT;
- int client_flags = 0;
+ long client_flags = 0;
php_mysql_conn *mysql=NULL;
#if MYSQL_VERSION_ID <= 32230
void (*handler) (int);
#endif
- zval **z_host=NULL, **z_user=NULL, **z_passwd=NULL, **z_new_link=NULL, **z_client_flags=NULL;
zend_bool free_host=0, new_link=0;
long connect_timeout;
@@ -556,100 +556,37 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
hashed_details_length = spprintf(&hashed_details, 0, "mysql__%s_", user);
client_flags = CLIENT_INTERACTIVE;
} else {
- host_and_port = MySG(default_host);
- user = MySG(default_user);
- passwd = MySG(default_password);
-
- switch(ZEND_NUM_ARGS()) {
- case 0: /* defaults */
- break;
- case 1: {
- if (zend_get_parameters_ex(1, &z_host)==FAILURE) {
- MYSQL_DO_CONNECT_RETURN_FALSE();
- }
- }
- break;
- case 2: {
- if (zend_get_parameters_ex(2, &z_host, &z_user)==FAILURE) {
- MYSQL_DO_CONNECT_RETURN_FALSE();
- }
- convert_to_string_ex(z_user);
- user = Z_STRVAL_PP(z_user);
- }
- break;
- case 3: {
- if (zend_get_parameters_ex(3, &z_host, &z_user, &z_passwd) == FAILURE) {
- MYSQL_DO_CONNECT_RETURN_FALSE();
- }
- convert_to_string_ex(z_user);
- convert_to_string_ex(z_passwd);
- user = Z_STRVAL_PP(z_user);
- passwd = Z_STRVAL_PP(z_passwd);
- }
- break;
- case 4: {
- if (!persistent) {
- if (zend_get_parameters_ex(4, &z_host, &z_user, &z_passwd, &z_new_link) == FAILURE) {
- MYSQL_DO_CONNECT_RETURN_FALSE();
- }
- convert_to_string_ex(z_user);
- convert_to_string_ex(z_passwd);
- convert_to_boolean_ex(z_new_link);
- user = Z_STRVAL_PP(z_user);
- passwd = Z_STRVAL_PP(z_passwd);
- new_link = Z_BVAL_PP(z_new_link);
- }
- else {
- if (zend_get_parameters_ex(4, &z_host, &z_user, &z_passwd, &z_client_flags) == FAILURE) {
- MYSQL_DO_CONNECT_RETURN_FALSE();
- }
- convert_to_string_ex(z_user);
- convert_to_string_ex(z_passwd);
- convert_to_long_ex(z_client_flags);
- user = Z_STRVAL_PP(z_user);
- passwd = Z_STRVAL_PP(z_passwd);
- client_flags = Z_LVAL_PP(z_client_flags);
- }
- }
- break;
- case 5: {
- if (zend_get_parameters_ex(5, &z_host, &z_user, &z_passwd, &z_new_link, &z_client_flags) == FAILURE) {
- MYSQL_DO_CONNECT_RETURN_FALSE();
- }
- convert_to_string_ex(z_user);
- convert_to_string_ex(z_passwd);
- convert_to_boolean_ex(z_new_link);
- convert_to_long_ex(z_client_flags);
- user = Z_STRVAL_PP(z_user);
- passwd = Z_STRVAL_PP(z_passwd);
- new_link = Z_BVAL_PP(z_new_link);
- client_flags = Z_LVAL_PP(z_client_flags);
- }
- break;
- default:
- WRONG_PARAM_COUNT;
- break;
+ /* mysql_pconnect does not support new_link parameter */
+ if (persistent) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!s!l", &host_and_port, &host_len,
+ &user, &user_len, &passwd, &passwd_len,
+ &client_flags)==FAILURE) {
+ return;
+ }
+ } else {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!s!bl", &host_and_port, &host_len,
+ &user, &user_len, &passwd, &passwd_len,
+ &new_link, &client_flags)==FAILURE) {
+ return;
+ }
}
+
+ if (!host_and_port) {
+ host_and_port = MySG(default_host);
+ }
+ if (!user) {
+ user = MySG(default_user);
+ }
+ if (!passwd) {
+ passwd = MySG(default_password);
+ }
+
/* disable local infile option for open_basedir */
if (((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) && (client_flags & CLIENT_LOCAL_FILES)) {
client_flags ^= CLIENT_LOCAL_FILES;
}
- if (z_host) {
- SEPARATE_ZVAL(z_host); /* We may modify z_host if it contains a port, separate */
- convert_to_string_ex(z_host);
- host_and_port = Z_STRVAL_PP(z_host);
- if (z_user) {
- convert_to_string_ex(z_user);
- user = Z_STRVAL_PP(z_user);
- if (z_passwd) {
- convert_to_string_ex(z_passwd);
- passwd = Z_STRVAL_PP(z_passwd);
- }
- }
- }
-
- hashed_details_length = spprintf(&hashed_details, 0, "mysql_%s_%s_%s_%d", SAFE_STRING(host_and_port), SAFE_STRING(user), SAFE_STRING(passwd), client_flags);
+ hashed_details_length = spprintf(&hashed_details, 0, "mysql_%s_%s_%s_%ld", SAFE_STRING(host_and_port), SAFE_STRING(user), SAFE_STRING(passwd), client_flags);
}
/* We cannot use mysql_port anymore in windows, need to use
diff --git a/ext/mysql/php_mysql.h b/ext/mysql/php_mysql.h
index 6de1d3bc6..95b5e433e 100644
--- a/ext/mysql/php_mysql.h
+++ b/ext/mysql/php_mysql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
*/
-/* $Id: php_mysql.h,v 1.37.2.1.2.3 2007/10/08 18:25:52 andrey Exp $ */
+/* $Id: php_mysql.h,v 1.37.2.1.2.4 2007/12/31 07:20:08 sebastian Exp $ */
#ifndef PHP_MYSQL_H
#define PHP_MYSQL_H
diff --git a/ext/mysql/php_mysql_structs.h b/ext/mysql/php_mysql_structs.h
index c0f9a0bec..d4947f640 100644
--- a/ext/mysql/php_mysql_structs.h
+++ b/ext/mysql/php_mysql_structs.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
*/
-/* $Id: php_mysql_structs.h,v 1.1.4.2 2007/10/08 18:25:52 andrey Exp $ */
+/* $Id: php_mysql_structs.h,v 1.1.4.3 2007/12/31 07:20:08 sebastian Exp $ */
#ifndef PHP_MYSQL_STRUCTS_H
#define PHP_MYSQL_STRUCTS_H
diff --git a/ext/mysql/tests/001.phpt b/ext/mysql/tests/001.phpt
index 4f79ae3ef..4f1a3cc98 100755
--- a/ext/mysql/tests/001.phpt
+++ b/ext/mysql/tests/001.phpt
@@ -14,7 +14,7 @@ $test .= ($db) ? '1' : '0';
mysql_close($db);
/*** test mysql_connect localhost:port ***/
-$db = mysql_connect("{$host}:3306", $user, $passwd, '');
+$db = mysql_connect("{$host}:3306", $user, $passwd, true);
$test .= ($db) ? '1' : '0';
mysql_close($db);
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 7a5ce3335..90d941991 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli.c,v 1.72.2.16.2.21 2007/10/22 10:35:33 andrey Exp $
+ $Id: mysqli.c,v 1.72.2.16.2.25 2008/03/08 14:59:37 andrey Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -669,7 +669,7 @@ PHP_MSHUTDOWN_FUNCTION(mysqli)
#ifdef PHP_WIN32
unsigned long client_ver = mysql_get_client_version();
/* Can't call mysql_server_end() multiple times prior to 5.0.42 on Windows */
- if ((client_ver > 50042 && client_ver < 50100) || client_ver > 50122) {
+ if ((client_ver >= 50046 && client_ver < 50100) || client_ver > 50122) {
mysql_server_end();
}
#else
@@ -693,7 +693,7 @@ PHP_MSHUTDOWN_FUNCTION(mysqli)
*/
PHP_RINIT_FUNCTION(mysqli)
{
-#ifdef ZTS && MYSQL_VERSION_ID >= 40000
+#if defined(ZTS) && MYSQL_VERSION_ID >= 40000
if (mysql_thread_init()) {
return FAILURE;
}
@@ -709,7 +709,7 @@ PHP_RINIT_FUNCTION(mysqli)
*/
PHP_RSHUTDOWN_FUNCTION(mysqli)
{
-#ifdef ZTS && MYSQL_VERSION_ID >= 40000
+#if defined(ZTS) && MYSQL_VERSION_ID >= 40000
mysql_thread_end();
#endif
if (MyG(error_msg)) {
@@ -1194,7 +1194,9 @@ void php_local_infile_end(void *ptr)
return;
}
- php_stream_close(mysql->li_stream);
+ if (mysql->li_stream) {
+ php_stream_close(mysql->li_stream);
+ }
free(data);
return;
}
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index aa1af4f0a..57cc96a88 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli_api.c,v 1.118.2.22.2.18 2007/10/17 08:19:50 tony2001 Exp $
+ $Id: mysqli_api.c,v 1.118.2.22.2.20 2008/01/01 16:51:09 hholzgra Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1438,6 +1438,9 @@ PHP_FUNCTION(mysqli_real_connect)
MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED);
+
+ /* set some required options */
+ flags |= CLIENT_MULTI_RESULTS; /* needed for mysql_multi_query() */
/* remove some insecure options */
flags &= ~CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */
if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) {
diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c
index 3d153b9dc..6fd4fb74a 100644
--- a/ext/mysqli/mysqli_driver.c
+++ b/ext/mysqli/mysqli_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/mysqli_embedded.c b/ext/mysqli/mysqli_embedded.c
index 12affc87c..042fb42ec 100644
--- a/ext/mysqli/mysqli_embedded.c
+++ b/ext/mysqli/mysqli_embedded.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/mysqli_exception.c b/ext/mysqli/mysqli_exception.c
index 1fa3ecae3..e523a6322 100644
--- a/ext/mysqli/mysqli_exception.c
+++ b/ext/mysqli/mysqli_exception.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c
index e10f97e62..1eb2ec83b 100644
--- a/ext/mysqli/mysqli_fe.c
+++ b/ext/mysqli/mysqli_fe.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli_fe.c,v 1.49.2.5.2.1 2007/01/01 09:36:03 sebastian Exp $
+ $Id: mysqli_fe.c,v 1.49.2.5.2.2 2007/12/31 07:20:08 sebastian Exp $
*/
#ifdef HAVE_CONFIG_H
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 2a2f41d89..3bc8fc183 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli_nonapi.c,v 1.54.2.7.2.5 2007/09/06 10:07:42 andrey Exp $
+ $Id: mysqli_nonapi.c,v 1.54.2.7.2.6 2007/12/31 07:20:08 sebastian Exp $
*/
#ifdef HAVE_CONFIG_H
diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c
index 4d8bba823..9fc9047e0 100644
--- a/ext/mysqli/mysqli_prop.c
+++ b/ext/mysqli/mysqli_prop.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli_prop.c,v 1.23.2.5.2.3 2007/10/16 13:00:32 andrey Exp $
+ $Id: mysqli_prop.c,v 1.23.2.5.2.4 2007/12/31 07:20:08 sebastian Exp $
*/
#ifdef HAVE_CONFIG_H
diff --git a/ext/mysqli/mysqli_repl.c b/ext/mysqli/mysqli_repl.c
index f32f1de6d..bc4e89d79 100644
--- a/ext/mysqli/mysqli_repl.c
+++ b/ext/mysqli/mysqli_repl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli_repl.c,v 1.3.2.2.2.1 2007/01/01 09:36:03 sebastian Exp $
+ $Id: mysqli_repl.c,v 1.3.2.2.2.2 2007/12/31 07:20:08 sebastian Exp $
*/
#ifdef HAVE_CONFIG_H
diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c
index 4241a3308..26a6ba267 100644
--- a/ext/mysqli/mysqli_report.c
+++ b/ext/mysqli/mysqli_report.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli_report.c,v 1.11.2.2.2.2 2007/01/01 09:36:03 sebastian Exp $
+ $Id: mysqli_report.c,v 1.11.2.2.2.3 2007/12/31 07:20:08 sebastian Exp $
*/
#ifdef HAVE_CONFIG_H
diff --git a/ext/mysqli/mysqli_report.h b/ext/mysqli/mysqli_report.h
index db3b10d93..a4a9fda3d 100644
--- a/ext/mysqli/mysqli_report.h
+++ b/ext/mysqli/mysqli_report.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli_report.h,v 1.5.2.1.2.1 2007/01/01 09:36:03 sebastian Exp $
+ $Id: mysqli_report.h,v 1.5.2.1.2.2 2007/12/31 07:20:08 sebastian Exp $
*/
#ifndef __HAVE_MYSQLI_PROFILER_H__
diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c
index 12a05122d..5608ef1ac 100644
--- a/ext/mysqli/mysqli_warning.c
+++ b/ext/mysqli/mysqli_warning.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h
index e16ff8314..e83113aee 100644
--- a/ext/mysqli/php_mysqli.h
+++ b/ext/mysqli/php_mysqli.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: php_mysqli.h,v 1.54.2.7.2.6 2007/09/12 09:12:56 andrey Exp $
+ $Id: php_mysqli.h,v 1.54.2.7.2.7 2007/12/31 07:20:08 sebastian Exp $
*/
/* A little hack to prevent build break, when mysql is used together with
diff --git a/ext/mysqli/tests/047.phpt b/ext/mysqli/tests/047.phpt
index 4b5df9867..cca5c3c67 100644
--- a/ext/mysqli/tests/047.phpt
+++ b/ext/mysqli/tests/047.phpt
@@ -58,9 +58,9 @@ array(2) {
["max_length"]=>
int(0)
["length"]=>
- int(11)
+ int(%d)
["charsetnr"]=>
- int(63)
+ int(%d)
["flags"]=>
int(32768)
["type"]=>
@@ -83,9 +83,9 @@ array(2) {
["max_length"]=>
int(0)
["length"]=>
- int(10)
+ int(%d)
["charsetnr"]=>
- int(8)
+ int(%d)
["flags"]=>
int(0)
["type"]=>
@@ -110,9 +110,9 @@ object(stdClass)#6 (11) {
["max_length"]=>
int(0)
["length"]=>
- int(11)
+ int(%d)
["charsetnr"]=>
- int(63)
+ int(%d)
["flags"]=>
int(32768)
["type"]=>
@@ -134,9 +134,9 @@ object(stdClass)#6 (11) {
["max_length"]=>
int(0)
["length"]=>
- int(10)
+ int(%d)
["charsetnr"]=>
- int(8)
+ int(%d)
["flags"]=>
int(0)
["type"]=>
@@ -160,9 +160,9 @@ object(stdClass)#6 (11) {
["max_length"]=>
int(0)
["length"]=>
- int(11)
+ int(%d)
["charsetnr"]=>
- int(63)
+ int(%d)
["flags"]=>
int(32768)
["type"]=>
@@ -184,13 +184,13 @@ object(stdClass)#5 (11) {
["max_length"]=>
int(0)
["length"]=>
- int(10)
+ int(%d)
["charsetnr"]=>
- int(8)
+ int(%d)
["flags"]=>
int(0)
["type"]=>
int(253)
["decimals"]=>
int(0)
-} \ No newline at end of file
+}
diff --git a/ext/mysqli/tests/bug42548.phpt b/ext/mysqli/tests/bug42548.phpt
new file mode 100644
index 000000000..541833cf9
--- /dev/null
+++ b/ext/mysqli/tests/bug42548.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Bug #42548 PROCEDURE xxx can't return a result set in the given context (works in 5.2.3!!)
+--SKIPIF--
+<?php if (!extension_loaded("mysqli")) print "skip"; ?>
+--FILE--
+<?php
+include "connect.inc";
+
+$mysqli = mysqli_init();
+$mysqli->real_connect($host, $user, $passwd, 'test');
+if (mysqli_connect_errno()) {
+ printf("Connect failed: %s\n", mysqli_connect_error());
+ exit();
+}
+
+$mysqli->query("DROP PROCEDURE IF EXISTS p1") or die($mysqli->error);
+$mysqli->query("CREATE PROCEDURE p1() BEGIN SELECT 23; SELECT 42; END") or die($mysqli->error);
+
+if ($mysqli->multi_query("CALL p1();"))
+{
+ do
+ {
+ if ($objResult = $mysqli->store_result()) {
+ while ($row = $objResult->fetch_assoc()) {
+ print_r($row);
+ }
+ $objResult->close();
+ if ($mysqli->more_results()) {
+ print "----- next result -----------\n";
+ }
+ } else {
+ print "no results found";
+ }
+ } while ($mysqli->more_results() && $mysqli->next_result());
+} else {
+ print $mysqli->error;
+}
+
+$mysqli->query("DROP PROCEDURE p1") or die($mysqli->error);
+$mysqli->close();
+?>
+--EXPECT--
+Array
+(
+ [23] => 23
+)
+----- next result -----------
+Array
+(
+ [42] => 42
+)
+----- next result -----------
+no results found
diff --git a/ext/ncurses/ncurses.c b/ext/ncurses/ncurses.c
index a4e7c51b5..53fdbbcca 100644
--- a/ext/ncurses/ncurses.c
+++ b/ext/ncurses/ncurses.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ncurses/ncurses_fe.c b/ext/ncurses/ncurses_fe.c
index 8ca6e7104..f790aa029 100644
--- a/ext/ncurses/ncurses_fe.c
+++ b/ext/ncurses/ncurses_fe.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ncurses/ncurses_functions.c b/ext/ncurses/ncurses_functions.c
index db71779dd..cfce79a3c 100644
--- a/ext/ncurses/ncurses_functions.c
+++ b/ext/ncurses/ncurses_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ncurses/php_ncurses.h b/ext/ncurses/php_ncurses.h
index 12cdd8640..0b9d94181 100644
--- a/ext/ncurses/php_ncurses.h
+++ b/ext/ncurses/php_ncurses.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ncurses/php_ncurses_fe.h b/ext/ncurses/php_ncurses_fe.h
index 190e3d700..e12b6f8fb 100644
--- a/ext/ncurses/php_ncurses_fe.h
+++ b/ext/ncurses/php_ncurses_fe.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4
index fda720148..37c99e880 100644
--- a/ext/oci8/config.m4
+++ b/ext/oci8/config.m4
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.55.2.3.2.11 2007/08/14 12:15:04 tony2001 Exp $
+dnl $Id: config.m4,v 1.55.2.3.2.12 2008/01/16 00:42:02 sixd Exp $
dnl
if test -z "$SED"; then
@@ -143,7 +143,9 @@ fi
PHP_OCI8_INSTANT_CLIENT="no"
-if test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then
+if test "`echo $PHP_OCI8`" = "instantclient"; then
+ PHP_OCI8_INSTANT_CLIENT="yes"
+elif test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then
PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f3`"
PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f1,4`"
if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then
@@ -345,14 +347,21 @@ if test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
elif test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then
+ AC_CHECK_SIZEOF(long int, 4)
+ LIBDIR_SUFFIX=""
+ if test "$ac_cv_sizeof_long_int" = "8" ; then
+ LIBDIR_SUFFIX=64
+ fi
+
AC_MSG_CHECKING([Oracle Instant Client directory])
if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
+dnl Find the directory if user specified "instantclient" but did not give a dir.
dnl Generally the Instant Client can be anywhere so the user must pass in the
dnl directory to the libraries. But on Linux we default to the most recent
dnl version in /usr/lib
- PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib 2> /dev/null | tail -1`
+ PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${LIBDIR_SUFFIX}/lib 2> /dev/null | tail -1`
if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
- AC_MSG_ERROR([Oracle Instant Client directory not found. Try --with-oci8=instantclient,DIR])
+ AC_MSG_ERROR([Oracle Instant Client directory /usr/lib/oracle/.../client${LIBDIR_SUFFIX}/lib not found. Try --with-oci8=instantclient,DIR])
fi
fi
AC_MSG_RESULT($PHP_OCI8_INSTANT_CLIENT)
@@ -362,7 +371,7 @@ dnl version in /usr/lib
AC_MSG_CHECKING([Oracle Instant Client SDK header directory])
dnl Header directory for Instant Client SDK RPM install
- OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib[/]*$!/usr/include/oracle/\1/client!'`
+ OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client\(.*\)/lib/*$!/usr/include/oracle/\1/client\2!'`
dnl Header directory for Instant Client SDK zip file install
OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 08a0629bf..8f8a2b8cd 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,7 +26,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.269.2.16.2.38 2007/08/31 22:30:27 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.269.2.16.2.43 2008/04/10 21:53:46 sixd Exp $ */
/* TODO
*
* file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() with OCI_ATTR_LOBEMPTY
@@ -377,7 +377,7 @@ zend_module_entry oci8_module_entry = {
PHP_RINIT(oci), /* per-request startup function */
PHP_RSHUTDOWN(oci), /* per-request shutdown function */
PHP_MINFO(oci), /* information function */
- "1.2.4",
+ "1.2.5",
#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5)
PHP_MODULE_GLOBALS(oci), /* globals descriptor */
PHP_GINIT(oci), /* globals ctor */
@@ -673,8 +673,8 @@ PHP_MINFO_FUNCTION(oci)
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
- php_info_print_table_row(2, "Version", "1.2.4");
- php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16.2.38 $");
+ php_info_print_table_row(2, "Version", "1.2.5");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16.2.43 $");
snprintf(buf, sizeof(buf), "%ld", OCI_G(num_persistent));
php_info_print_table_row(2, "Active Persistent Connections", buf);
@@ -1604,6 +1604,7 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode TSR
ub4 lob_length;
int column_size;
char *lob_buffer;
+ int lob_fetch_status;
if (column->indicator == -1) { /* column is NULL */
ZVAL_NULL(value);
@@ -1634,7 +1635,11 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode TSR
if (column->data_type != SQLT_RDD && (mode & PHP_OCI_RETURN_LOBS)) {
/* PHP_OCI_RETURN_LOBS means that we want the content of the LOB back instead of the locator */
- if (php_oci_lob_read(descriptor, -1, 0, &lob_buffer, &lob_length TSRMLS_CC)) {
+ lob_fetch_status = php_oci_lob_read(descriptor, -1, 0, &lob_buffer, &lob_length TSRMLS_CC);
+#ifdef HAVE_OCI8_TEMP_LOB
+ php_oci_temp_lob_close(descriptor TSRMLS_CC);
+#endif
+ if (lob_fetch_status) {
ZVAL_FALSE(value);
return 1;
} else {
diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c
index 3e7b30b56..73879a674 100644
--- a/ext/oci8/oci8_collection.c
+++ b/ext/oci8/oci8_collection.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_collection.c,v 1.5.2.3.2.7 2007/07/31 19:21:08 tony2001 Exp $ */
+/* $Id: oci8_collection.c,v 1.5.2.3.2.9 2008/02/15 23:05:19 sixd Exp $ */
@@ -44,9 +44,9 @@
/* {{{ php_oci_collection_create()
Create and return connection handle */
-php_oci_collection * php_oci_collection_create(php_oci_connection* connection, char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC)
+php_oci_collection * php_oci_collection_create(php_oci_connection *connection, char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC)
{
- dvoid *dschp1;
+ dvoid *dschp1 = NULL;
dvoid *parmp1;
dvoid *parmp2;
php_oci_collection *collection;
@@ -219,11 +219,17 @@ php_oci_collection * php_oci_collection_create(php_oci_connection* connection, c
goto CLEANUP;
}
+ /* free the describe handle (Bug #44113) */
+ PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, OCI_HTYPE_DESCRIBE));
PHP_OCI_REGISTER_RESOURCE(collection, le_collection);
return collection;
CLEANUP:
+ if (dschp1) {
+ /* free the describe handle (Bug #44113) */
+ PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, OCI_HTYPE_DESCRIBE));
+ }
php_oci_error(connection->err, connection->errcode TSRMLS_CC);
php_oci_collection_close(collection TSRMLS_CC);
return NULL;
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index c6a78a24f..071bfaba4 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_interface.c,v 1.8.2.7.2.13 2007/08/02 19:04:37 sixd Exp $ */
+/* $Id: oci8_interface.c,v 1.8.2.7.2.16 2008/04/02 14:56:43 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1509,11 +1509,8 @@ PHP_FUNCTION(oci_free_statement)
}
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
- if (!statement->nested) {
- /* nested cursors cannot be freed, they are allocated once and used during the fetch */
- zend_list_delete(statement->id);
- }
-
+
+ zend_list_delete(statement->id);
RETURN_TRUE;
}
/* }}} */
diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c
index 066ff0a3b..1bccf3188 100644
--- a/ext/oci8/oci8_lob.c
+++ b/ext/oci8/oci8_lob.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_lob.c,v 1.7.2.6.2.14 2007/07/31 19:21:08 tony2001 Exp $ */
+/* $Id: oci8_lob.c,v 1.7.2.6.2.18 2008/02/25 23:52:10 sixd Exp $ */
@@ -88,6 +88,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, long typ
descriptor->buffering = PHP_OCI_LOB_BUFFER_DISABLED; /* buffering is off by default */
descriptor->charset_form = SQLCS_IMPLICIT; /* default value */
descriptor->charset_id = connection->charset;
+ descriptor->is_open = 0;
if (descriptor->type == OCI_DTYPE_LOB || descriptor->type == OCI_DTYPE_FILE) {
/* add Lobs & Files to hash. we'll flush them at the end */
@@ -570,16 +571,31 @@ int php_oci_lob_copy (php_oci_descriptor *descriptor_dest, php_oci_descriptor *d
int php_oci_lob_close (php_oci_descriptor *descriptor TSRMLS_DC)
{
php_oci_connection *connection = descriptor->connection;
- int is_temporary;
- PHP_OCI_CALL_RETURN(connection->errcode, OCILobClose, (connection->svc, connection->err, descriptor->descriptor));
+ if (descriptor->is_open) {
+ PHP_OCI_CALL_RETURN(connection->errcode, OCILobClose, (connection->svc, connection->err, descriptor->descriptor));
+ }
if (connection->errcode != OCI_SUCCESS) {
php_oci_error(connection->err, connection->errcode TSRMLS_CC);
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
return 1;
}
+
+ if (php_oci_temp_lob_close(descriptor TSRMLS_CC)) {
+ return 1;
+ }
+ return 0;
+} /* }}} */
+
+/* {{{ php_oci_temp_lob_close()
+ Close Temporary LOB */
+int php_oci_temp_lob_close (php_oci_descriptor *descriptor TSRMLS_DC)
+{
+ php_oci_connection *connection = descriptor->connection;
+ int is_temporary;
+
PHP_OCI_CALL_RETURN(connection->errcode, OCILobIsTemporary, (connection->env,connection->err, descriptor->descriptor, &is_temporary));
if (connection->errcode != OCI_SUCCESS) {
@@ -589,7 +605,6 @@ int php_oci_lob_close (php_oci_descriptor *descriptor TSRMLS_DC)
}
if (is_temporary) {
-
PHP_OCI_CALL_RETURN(connection->errcode, OCILobFreeTemporary, (connection->svc, connection->err, descriptor->descriptor));
if (connection->errcode != OCI_SUCCESS) {
@@ -647,7 +662,6 @@ int php_oci_lob_flush(php_oci_descriptor *descriptor, long flush_flag TSRMLS_DC)
Close LOB descriptor and free associated resources */
void php_oci_lob_free (php_oci_descriptor *descriptor TSRMLS_DC)
{
-
if (!descriptor || !descriptor->connection) {
return;
}
@@ -662,6 +676,12 @@ void php_oci_lob_free (php_oci_descriptor *descriptor TSRMLS_DC)
php_oci_lob_flush(descriptor, OCI_LOB_BUFFER_FREE TSRMLS_CC);
}
+#ifdef HAVE_OCI8_TEMP_LOB
+ if (descriptor->type == OCI_DTYPE_LOB) {
+ php_oci_temp_lob_close(descriptor TSRMLS_CC);
+ }
+#endif
+
PHP_OCI_CALL(OCIDescriptorFree, (descriptor->descriptor, descriptor->type));
zend_list_delete(descriptor->connection->rsrc_id);
@@ -891,6 +911,8 @@ int php_oci_lob_write_tmp (php_oci_descriptor *descriptor, ub1 type, char *data,
return 1;
}
+ descriptor->is_open = 1;
+
return php_oci_lob_write(descriptor, 0, data, data_len, &bytes_written TSRMLS_CC);
} /* }}} */
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index 52e0c3546..603dbe5d9 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_statement.c,v 1.7.2.14.2.28 2007/08/02 19:04:37 sixd Exp $ */
+/* $Id: oci8_statement.c,v 1.7.2.14.2.33 2008/04/02 14:56:43 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
@@ -106,7 +106,7 @@ php_oci_statement *php_oci_statement_create (php_oci_connection *connection, cha
statement->connection = connection;
statement->has_data = 0;
- statement->nested = 0;
+ statement->parent_stmtid = 0;
zend_list_addref(statement->connection->rsrc_id);
if (OCI_G(default_prefetch) > 0) {
@@ -336,6 +336,7 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf
if (!nested_stmt) {
return OCI_ERROR;
}
+ nested_stmt->parent_stmtid = outcol->statement->id;
zend_list_addref(outcol->statement->id);
outcol->nested_statement = nested_stmt;
outcol->stmtid = nested_stmt->id;
@@ -368,7 +369,6 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf
if (!descr) {
return OCI_ERROR;
}
- zend_list_addref(outcol->statement->id);
outcol->descid = descr->id;
descr->charset_form = outcol->charset_form;
@@ -776,7 +776,11 @@ void php_oci_statement_free(php_oci_statement *statement TSRMLS_DC)
zend_hash_destroy(statement->defines);
efree(statement->defines);
}
-
+
+ if (statement->parent_stmtid) {
+ zend_list_delete(statement->parent_stmtid);
+ }
+
zend_list_delete(statement->connection->rsrc_id);
efree(statement);
@@ -1175,6 +1179,14 @@ sb4 php_oci_bind_out_callback(
}
if (Z_TYPE_P(val) == IS_RESOURCE) {
+ /* Processing for ref-cursor out binds */
+ if (phpbind->statement != NULL) {
+ *bufpp = phpbind->statement;
+ *alenpp = &phpbind->dummy_len;
+ *piecep = OCI_ONE_PIECE;
+ *rcodepp = &phpbind->retcode;
+ *indpp = &phpbind->indicator;
+ }
retval = OCI_CONTINUE;
} else if (Z_TYPE_P(val) == IS_OBJECT) {
if (!phpbind->descriptor) {
diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h
index 08bd51fba..f4f332af7 100644
--- a/ext/oci8/php_oci8.h
+++ b/ext/oci8/php_oci8.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_oci8.h,v 1.36.2.2.2.1 2007/01/01 09:36:03 sebastian Exp $ */
+/* $Id: php_oci8.h,v 1.36.2.2.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#if HAVE_OCI8
# ifndef PHP_OCI8_H
diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h
index e849a40c3..6e9ed5e93 100644
--- a/ext/oci8/php_oci8_int.h
+++ b/ext/oci8/php_oci8_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_oci8_int.h,v 1.11.2.6.2.21 2007/08/06 20:32:55 sixd Exp $ */
+/* $Id: php_oci8_int.h,v 1.11.2.6.2.24 2008/02/25 23:52:10 sixd Exp $ */
#if HAVE_OCI8
# ifndef PHP_OCI8_INT_H
@@ -130,6 +130,7 @@ typedef struct { /* php_oci_descriptor {{{ */
ub4 chunk_size; /* chunk size of the LOB. 0 - unknown */
ub1 charset_form; /* charset form, required for NCLOBs */
ub2 charset_id; /* charset ID */
+ unsigned is_open:1; /* helps to determine if LOB is open or not */
} php_oci_descriptor; /* }}} */
typedef struct { /* php_oci_lob_ctx {{{ */
@@ -158,6 +159,7 @@ typedef struct { /* php_oci_define {{{ */
typedef struct { /* php_oci_statement {{{ */
int id;
+ int parent_stmtid; /* parent statement id */
php_oci_connection *connection; /* parent connection handle */
sword errcode; /* last errcode*/
OCIError *err; /* private error handle */
@@ -170,7 +172,6 @@ typedef struct { /* php_oci_statement {{{ */
int ncolumns; /* number of columns in the result */
unsigned executed:1; /* statement executed flag */
unsigned has_data:1; /* statement has more data flag */
- unsigned nested:1; /* statement handle is valid */
ub2 stmttype; /* statement type */
} php_oci_statement; /* }}} */
@@ -342,6 +343,7 @@ int php_oci_lob_get_buffering (php_oci_descriptor *);
int php_oci_lob_copy (php_oci_descriptor *, php_oci_descriptor *, long TSRMLS_DC);
#ifdef HAVE_OCI8_TEMP_LOB
int php_oci_lob_close (php_oci_descriptor * TSRMLS_DC);
+int php_oci_temp_lob_close (php_oci_descriptor * TSRMLS_DC);
int php_oci_lob_write_tmp (php_oci_descriptor *, ub1, char *, int TSRMLS_DC);
#endif
void php_oci_lob_free(php_oci_descriptor * TSRMLS_DC);
diff --git a/ext/oci8/tests/bug27303.phpt b/ext/oci8/tests/bug27303.phpt
index 467dbfe63..6f6d01af4 100644
--- a/ext/oci8/tests/bug27303.phpt
+++ b/ext/oci8/tests/bug27303.phpt
@@ -49,7 +49,7 @@ foreach ($create_st as $statement) {
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
string(1) "1"
string(1) "2"
string(1) "3"
@@ -59,194 +59,194 @@ string(1) "6"
string(1) "7"
string(1) "8"
string(1) "9"
-string(2) "10"
-string(2) "11"
-string(2) "12"
-string(2) "13"
-string(2) "14"
-string(2) "15"
-string(2) "16"
-string(2) "17"
-string(2) "18"
-string(2) "19"
-string(2) "20"
-string(2) "21"
-string(2) "22"
-string(2) "23"
-string(2) "24"
-string(2) "25"
-string(2) "26"
-string(2) "27"
-string(2) "28"
-string(2) "29"
-string(2) "30"
-string(2) "31"
-string(2) "32"
-string(2) "33"
-string(2) "34"
-string(2) "35"
-string(2) "36"
-string(2) "37"
-string(2) "38"
-string(2) "39"
-string(2) "40"
-string(2) "41"
-string(2) "42"
-string(2) "43"
-string(2) "44"
-string(2) "45"
-string(2) "46"
-string(2) "47"
-string(2) "48"
-string(2) "49"
-string(2) "50"
-string(2) "51"
-string(2) "52"
-string(2) "53"
-string(2) "54"
-string(2) "55"
-string(2) "56"
-string(2) "57"
-string(2) "58"
-string(2) "59"
-string(2) "60"
-string(2) "61"
-string(2) "62"
-string(2) "63"
-string(2) "64"
-string(2) "65"
-string(2) "66"
-string(2) "67"
-string(2) "68"
-string(2) "69"
-string(2) "70"
-string(2) "71"
-string(2) "72"
-string(2) "73"
-string(2) "74"
-string(2) "75"
-string(2) "76"
-string(2) "77"
-string(2) "78"
-string(2) "79"
-string(2) "80"
-string(2) "81"
-string(2) "82"
-string(2) "83"
-string(2) "84"
-string(2) "85"
-string(2) "86"
-string(2) "87"
-string(2) "88"
-string(2) "89"
-string(2) "90"
-string(2) "91"
-string(2) "92"
-string(2) "93"
-string(2) "94"
-string(2) "95"
-string(2) "96"
-string(2) "97"
-string(2) "98"
-string(2) "99"
-string(3) "100"
-string(3) "101"
-string(3) "102"
-string(3) "103"
-string(3) "104"
-string(3) "105"
-string(3) "106"
-string(3) "107"
-string(3) "108"
-string(3) "109"
-string(3) "110"
-string(3) "111"
-string(3) "112"
-string(3) "113"
-string(3) "114"
-string(3) "115"
-string(3) "116"
-string(3) "117"
-string(3) "118"
-string(3) "119"
-string(3) "120"
-string(3) "121"
-string(3) "122"
-string(3) "123"
-string(3) "124"
-string(3) "125"
-string(3) "126"
-string(3) "127"
-string(3) "128"
-string(3) "129"
-string(3) "130"
-string(3) "131"
-string(3) "132"
-string(3) "133"
-string(3) "134"
-string(3) "135"
-string(3) "136"
-string(3) "137"
-string(3) "138"
-string(3) "139"
-string(3) "140"
-string(3) "141"
-string(3) "142"
-string(3) "143"
-string(3) "144"
-string(3) "145"
-string(3) "146"
-string(3) "147"
-string(3) "148"
-string(3) "149"
-string(3) "150"
-string(3) "151"
-string(3) "152"
-string(3) "153"
-string(3) "154"
-string(3) "155"
-string(3) "156"
-string(3) "157"
-string(3) "158"
-string(3) "159"
-string(3) "160"
-string(3) "161"
-string(3) "162"
-string(3) "163"
-string(3) "164"
-string(3) "165"
-string(3) "166"
-string(3) "167"
-string(3) "168"
-string(3) "169"
-string(3) "170"
-string(3) "171"
-string(3) "172"
-string(3) "173"
-string(3) "174"
-string(3) "175"
-string(3) "176"
-string(3) "177"
-string(3) "178"
-string(3) "179"
-string(3) "180"
-string(3) "181"
-string(3) "182"
-string(3) "183"
-string(3) "184"
-string(3) "185"
-string(3) "186"
-string(3) "187"
-string(3) "188"
-string(3) "189"
-string(3) "190"
-string(3) "191"
-string(3) "192"
-string(3) "193"
-string(3) "194"
-string(3) "195"
-string(3) "196"
-string(3) "197"
-string(3) "198"
-string(3) "199"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
Done
diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt
index 97acefa30..3ab90a1a6 100644
--- a/ext/oci8/tests/bug27303_2.phpt
+++ b/ext/oci8/tests/bug27303_2.phpt
@@ -49,7 +49,7 @@ foreach ($create_st as $statement) {
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
string(1) "1"
string(1) "2"
string(1) "3"
@@ -149,104 +149,104 @@ string(2) "96"
string(2) "97"
string(2) "98"
string(2) "99"
-string(3) "100"
-string(3) "101"
-string(3) "102"
-string(3) "103"
-string(3) "104"
-string(3) "105"
-string(3) "106"
-string(3) "107"
-string(3) "108"
-string(3) "109"
-string(3) "110"
-string(3) "111"
-string(3) "112"
-string(3) "113"
-string(3) "114"
-string(3) "115"
-string(3) "116"
-string(3) "117"
-string(3) "118"
-string(3) "119"
-string(3) "120"
-string(3) "121"
-string(3) "122"
-string(3) "123"
-string(3) "124"
-string(3) "125"
-string(3) "126"
-string(3) "127"
-string(3) "128"
-string(3) "129"
-string(3) "130"
-string(3) "131"
-string(3) "132"
-string(3) "133"
-string(3) "134"
-string(3) "135"
-string(3) "136"
-string(3) "137"
-string(3) "138"
-string(3) "139"
-string(3) "140"
-string(3) "141"
-string(3) "142"
-string(3) "143"
-string(3) "144"
-string(3) "145"
-string(3) "146"
-string(3) "147"
-string(3) "148"
-string(3) "149"
-string(3) "150"
-string(3) "151"
-string(3) "152"
-string(3) "153"
-string(3) "154"
-string(3) "155"
-string(3) "156"
-string(3) "157"
-string(3) "158"
-string(3) "159"
-string(3) "160"
-string(3) "161"
-string(3) "162"
-string(3) "163"
-string(3) "164"
-string(3) "165"
-string(3) "166"
-string(3) "167"
-string(3) "168"
-string(3) "169"
-string(3) "170"
-string(3) "171"
-string(3) "172"
-string(3) "173"
-string(3) "174"
-string(3) "175"
-string(3) "176"
-string(3) "177"
-string(3) "178"
-string(3) "179"
-string(3) "180"
-string(3) "181"
-string(3) "182"
-string(3) "183"
-string(3) "184"
-string(3) "185"
-string(3) "186"
-string(3) "187"
-string(3) "188"
-string(3) "189"
-string(3) "190"
-string(3) "191"
-string(3) "192"
-string(3) "193"
-string(3) "194"
-string(3) "195"
-string(3) "196"
-string(3) "197"
-string(3) "198"
-string(3) "199"
+string(2) "10"
+string(2) "10"
+string(2) "10"
+string(2) "10"
+string(2) "10"
+string(2) "10"
+string(2) "10"
+string(2) "10"
+string(2) "10"
+string(2) "10"
+string(2) "11"
+string(2) "11"
+string(2) "11"
+string(2) "11"
+string(2) "11"
+string(2) "11"
+string(2) "11"
+string(2) "11"
+string(2) "11"
+string(2) "11"
+string(2) "12"
+string(2) "12"
+string(2) "12"
+string(2) "12"
+string(2) "12"
+string(2) "12"
+string(2) "12"
+string(2) "12"
+string(2) "12"
+string(2) "12"
+string(2) "13"
+string(2) "13"
+string(2) "13"
+string(2) "13"
+string(2) "13"
+string(2) "13"
+string(2) "13"
+string(2) "13"
+string(2) "13"
+string(2) "13"
+string(2) "14"
+string(2) "14"
+string(2) "14"
+string(2) "14"
+string(2) "14"
+string(2) "14"
+string(2) "14"
+string(2) "14"
+string(2) "14"
+string(2) "14"
+string(2) "15"
+string(2) "15"
+string(2) "15"
+string(2) "15"
+string(2) "15"
+string(2) "15"
+string(2) "15"
+string(2) "15"
+string(2) "15"
+string(2) "15"
+string(2) "16"
+string(2) "16"
+string(2) "16"
+string(2) "16"
+string(2) "16"
+string(2) "16"
+string(2) "16"
+string(2) "16"
+string(2) "16"
+string(2) "16"
+string(2) "17"
+string(2) "17"
+string(2) "17"
+string(2) "17"
+string(2) "17"
+string(2) "17"
+string(2) "17"
+string(2) "17"
+string(2) "17"
+string(2) "17"
+string(2) "18"
+string(2) "18"
+string(2) "18"
+string(2) "18"
+string(2) "18"
+string(2) "18"
+string(2) "18"
+string(2) "18"
+string(2) "18"
+string(2) "18"
+string(2) "19"
+string(2) "19"
+string(2) "19"
+string(2) "19"
+string(2) "19"
+string(2) "19"
+string(2) "19"
+string(2) "19"
+string(2) "19"
+string(2) "19"
Done
diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt
index ed178f1a7..70d6b5688 100644
--- a/ext/oci8/tests/bug27303_4.phpt
+++ b/ext/oci8/tests/bug27303_4.phpt
@@ -49,7 +49,7 @@ foreach ($create_st as $statement) {
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
string(1) "1"
string(1) "2"
string(1) "3"
@@ -59,194 +59,194 @@ string(1) "6"
string(1) "7"
string(1) "8"
string(1) "9"
-string(2) "10"
-string(2) "11"
-string(2) "12"
-string(2) "13"
-string(2) "14"
-string(2) "15"
-string(2) "16"
-string(2) "17"
-string(2) "18"
-string(2) "19"
-string(2) "20"
-string(2) "21"
-string(2) "22"
-string(2) "23"
-string(2) "24"
-string(2) "25"
-string(2) "26"
-string(2) "27"
-string(2) "28"
-string(2) "29"
-string(2) "30"
-string(2) "31"
-string(2) "32"
-string(2) "33"
-string(2) "34"
-string(2) "35"
-string(2) "36"
-string(2) "37"
-string(2) "38"
-string(2) "39"
-string(2) "40"
-string(2) "41"
-string(2) "42"
-string(2) "43"
-string(2) "44"
-string(2) "45"
-string(2) "46"
-string(2) "47"
-string(2) "48"
-string(2) "49"
-string(2) "50"
-string(2) "51"
-string(2) "52"
-string(2) "53"
-string(2) "54"
-string(2) "55"
-string(2) "56"
-string(2) "57"
-string(2) "58"
-string(2) "59"
-string(2) "60"
-string(2) "61"
-string(2) "62"
-string(2) "63"
-string(2) "64"
-string(2) "65"
-string(2) "66"
-string(2) "67"
-string(2) "68"
-string(2) "69"
-string(2) "70"
-string(2) "71"
-string(2) "72"
-string(2) "73"
-string(2) "74"
-string(2) "75"
-string(2) "76"
-string(2) "77"
-string(2) "78"
-string(2) "79"
-string(2) "80"
-string(2) "81"
-string(2) "82"
-string(2) "83"
-string(2) "84"
-string(2) "85"
-string(2) "86"
-string(2) "87"
-string(2) "88"
-string(2) "89"
-string(2) "90"
-string(2) "91"
-string(2) "92"
-string(2) "93"
-string(2) "94"
-string(2) "95"
-string(2) "96"
-string(2) "97"
-string(2) "98"
-string(2) "99"
-string(3) "100"
-string(3) "101"
-string(3) "102"
-string(3) "103"
-string(3) "104"
-string(3) "105"
-string(3) "106"
-string(3) "107"
-string(3) "108"
-string(3) "109"
-string(3) "110"
-string(3) "111"
-string(3) "112"
-string(3) "113"
-string(3) "114"
-string(3) "115"
-string(3) "116"
-string(3) "117"
-string(3) "118"
-string(3) "119"
-string(3) "120"
-string(3) "121"
-string(3) "122"
-string(3) "123"
-string(3) "124"
-string(3) "125"
-string(3) "126"
-string(3) "127"
-string(3) "128"
-string(3) "129"
-string(3) "130"
-string(3) "131"
-string(3) "132"
-string(3) "133"
-string(3) "134"
-string(3) "135"
-string(3) "136"
-string(3) "137"
-string(3) "138"
-string(3) "139"
-string(3) "140"
-string(3) "141"
-string(3) "142"
-string(3) "143"
-string(3) "144"
-string(3) "145"
-string(3) "146"
-string(3) "147"
-string(3) "148"
-string(3) "149"
-string(3) "150"
-string(3) "151"
-string(3) "152"
-string(3) "153"
-string(3) "154"
-string(3) "155"
-string(3) "156"
-string(3) "157"
-string(3) "158"
-string(3) "159"
-string(3) "160"
-string(3) "161"
-string(3) "162"
-string(3) "163"
-string(3) "164"
-string(3) "165"
-string(3) "166"
-string(3) "167"
-string(3) "168"
-string(3) "169"
-string(3) "170"
-string(3) "171"
-string(3) "172"
-string(3) "173"
-string(3) "174"
-string(3) "175"
-string(3) "176"
-string(3) "177"
-string(3) "178"
-string(3) "179"
-string(3) "180"
-string(3) "181"
-string(3) "182"
-string(3) "183"
-string(3) "184"
-string(3) "185"
-string(3) "186"
-string(3) "187"
-string(3) "188"
-string(3) "189"
-string(3) "190"
-string(3) "191"
-string(3) "192"
-string(3) "193"
-string(3) "194"
-string(3) "195"
-string(3) "196"
-string(3) "197"
-string(3) "198"
-string(3) "199"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "2"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "3"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "4"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "5"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "6"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "7"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "8"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "9"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
+string(1) "1"
Done
diff --git a/ext/oci8/tests/bug42496_1.phpt b/ext/oci8/tests/bug42496_1.phpt
new file mode 100644
index 000000000..4d7e2c585
--- /dev/null
+++ b/ext/oci8/tests/bug42496_1.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum open cursors reached)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+// Initialization
+
+$stmtarray = array(
+ "DROP table bug42496_tab",
+ "CREATE table bug42496_tab(c1 CLOB, c2 CLOB)",
+ "INSERT INTO bug42496_tab VALUES('test1', 'test1')",
+ "INSERT INTO bug42496_tab VALUES('test2', 'test2')",
+ "INSERT INTO bug42496_tab VALUES('test3', 'test3')"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+// Run Test
+
+echo "Test 1\n";
+
+for ($i = 0; $i < 15000; $i++) {
+ $s = oci_parse($c, "SELECT * from bug42496_tab");
+ oci_define_by_name($s, "C1", $col1);
+ oci_define_by_name($s, "C2", $col2);
+ if (oci_execute($s)) {
+ $arr = array();
+ while ($arr = oci_fetch_assoc($s)) {
+ $arr['C1']->free();
+ $arr['C2']->free();
+ }
+ }
+ oci_free_statement($s);
+}
+
+echo "Done\n";
+
+// Cleanup
+
+$stmtarray = array(
+ "DROP table bug42496_tab"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+oci_close($c);
+
+?>
+--EXPECTF--
+Test 1
+Done
diff --git a/ext/oci8/tests/bug42496_2.phpt b/ext/oci8/tests/bug42496_2.phpt
new file mode 100644
index 000000000..e2800bbd8
--- /dev/null
+++ b/ext/oci8/tests/bug42496_2.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum open cursors reached)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+// Initialization
+
+$stmtarray = array(
+ "DROP table bug42496_tab",
+ "CREATE table bug42496_tab(c1 CLOB, c2 CLOB)",
+ "INSERT INTO bug42496_tab VALUES('test1', 'test1')",
+ "INSERT INTO bug42496_tab VALUES('test2', 'test2')",
+ "INSERT INTO bug42496_tab VALUES('test3', 'test3')"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+// Run Test
+
+echo "Test 2\n";
+
+for ($i = 0; $i < 15000; $i++) {
+ $s = oci_parse($c, "SELECT * from bug42496_tab");
+ if (oci_execute($s)) {
+ $arr = array();
+ while ($arr = oci_fetch_assoc($s)) {
+ $arr['C1']->free();
+ $arr['C2']->free();
+ }
+ }
+ oci_free_statement($s);
+}
+
+echo "Done\n";
+
+// Cleanup
+
+$stmtarray = array(
+ "DROP table bug42496_tab"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+oci_close($c);
+
+?>
+--EXPECTF--
+Test 2
+Done
diff --git a/ext/oci8/tests/bug42841.phpt b/ext/oci8/tests/bug42841.phpt
new file mode 100644
index 000000000..921c8149d
--- /dev/null
+++ b/ext/oci8/tests/bug42841.phpt
@@ -0,0 +1,187 @@
+--TEST--
+Bug #42841 (REF CURSOR and oci_new_cursor PHP crash)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+--INI--
+oci8.statement_cache_size=20
+--FILE--
+<?php
+
+require dirname(__FILE__).'/details.inc';
+
+// note a oci_new_connect() occurs lower in the script
+$c = oci_connect($user, $password, $dbase);
+
+// Initialization
+
+$stmtarray = array(
+ "create or replace procedure bug42841_proc(out_1 out sys_refcursor) is
+ begin
+ open out_1 for select 11 from dual union all select 12 from dual union all select 13 from dual;
+ end bug42841_proc;",
+
+ "create or replace package bug43449_pkg is
+ type cursortype is ref Cursor;
+ function testcursor return cursortype;
+ end bug43449_pkg;",
+
+ "create or replace package body bug43449_pkg is
+ function testcursor return cursortype is
+ retCursor cursorType;
+ begin
+ Open retCursor For 'select * from dual';
+ return retCursor;
+ end;
+ end bug43449_pkg;"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+// Main code
+
+function do_bug42841($c)
+{
+ echo "First attempt\n";
+
+ $sql = "BEGIN bug42841_proc(:cursor); END;";
+ $stmt = oci_parse($c, $sql);
+ $cursor = oci_new_cursor($c);
+ oci_bind_by_name($stmt, ":cursor", $cursor, -1, OCI_B_CURSOR);
+
+ oci_execute($stmt, OCI_DEFAULT);
+ oci_execute($cursor);
+
+ while($row = oci_fetch_array($cursor, OCI_ASSOC + OCI_RETURN_LOBS)) {
+ $data1[] = $row;
+ }
+
+ oci_free_statement($stmt);
+ oci_free_statement($cursor);
+ var_dump($data1);
+
+ echo "Second attempt\n";
+
+ $sql = "BEGIN bug42841_proc(:cursor); END;";
+ $stmt = oci_parse($c, $sql);
+ $cursor = oci_new_cursor($c);
+ oci_bind_by_name($stmt, ":cursor", $cursor, -1, OCI_B_CURSOR);
+
+ oci_execute($stmt, OCI_DEFAULT);
+ oci_execute($cursor);
+
+ while($row = oci_fetch_array($cursor, OCI_ASSOC + OCI_RETURN_LOBS)) {
+ $data2[] = $row;
+ }
+
+ oci_free_statement($stmt);
+ oci_free_statement($cursor);
+ var_dump($data2);
+}
+
+function do_bug43449($c)
+{
+
+ for ($i = 0; $i < 2; $i++) {
+ var_dump(bug43449_getCur($c));
+ }
+}
+
+function bug43449_getCur($c)
+{
+ $cur = oci_new_cursor($c);
+ $stmt = oci_parse($c, 'begin :cur := bug43449_pkg.testcursor; end;');
+ oci_bind_by_name($stmt, ':cur', $cur, -1, OCI_B_CURSOR);
+ oci_execute($stmt, OCI_DEFAULT);
+ oci_execute($cur, OCI_DEFAULT);
+
+ $ret = array();
+
+ while (ocifetchinto($cur, $row, OCI_ASSOC)) {
+ $ret[] = $row;
+ }
+
+ oci_free_statement($cur);
+ oci_free_statement($stmt);
+ return $ret;
+}
+
+echo "Test bug 42841: Procedure with OUT cursor parameter\n";
+do_bug42841($c);
+
+$c = oci_new_connect($user, $password, $dbase);
+
+echo "Test bug 43449: Cursor as function result\n";
+do_bug43449($c);
+
+// Cleanup
+
+$stmtarray = array(
+ "drop procedure bug42841_proc",
+ "drop package bug43449_pkg"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ oci_execute($s);
+}
+
+echo "Done\n";
+
+?>
+--EXPECT--
+Test bug 42841: Procedure with OUT cursor parameter
+First attempt
+array(3) {
+ [0]=>
+ array(1) {
+ [11]=>
+ string(2) "11"
+ }
+ [1]=>
+ array(1) {
+ [11]=>
+ string(2) "12"
+ }
+ [2]=>
+ array(1) {
+ [11]=>
+ string(2) "13"
+ }
+}
+Second attempt
+array(3) {
+ [0]=>
+ array(1) {
+ [11]=>
+ string(2) "11"
+ }
+ [1]=>
+ array(1) {
+ [11]=>
+ string(2) "12"
+ }
+ [2]=>
+ array(1) {
+ [11]=>
+ string(2) "13"
+ }
+}
+Test bug 43449: Cursor as function result
+array(1) {
+ [0]=>
+ array(1) {
+ ["DUMMY"]=>
+ string(1) "X"
+ }
+}
+array(1) {
+ [0]=>
+ array(1) {
+ ["DUMMY"]=>
+ string(1) "X"
+ }
+}
+Done
diff --git a/ext/oci8/tests/bug43492.phpt b/ext/oci8/tests/bug43492.phpt
new file mode 100644
index 000000000..d28aabfce
--- /dev/null
+++ b/ext/oci8/tests/bug43492.phpt
@@ -0,0 +1,378 @@
+--TEST--
+Bug #43492 (Nested cursor leaks)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+$stmtarray = array(
+ "DROP table bug43492_tab",
+ "CREATE TABLE bug43492_tab(col1 VARCHAR2(1))",
+ "INSERT INTO bug43492_tab VALUES ('A')",
+ "INSERT INTO bug43492_tab VALUES ('B')",
+ "INSERT INTO bug43492_tab VALUES ('C')",
+ "INSERT INTO bug43492_tab VALUES ('D')",
+ "INSERT INTO bug43492_tab VALUES ('E')",
+ "INSERT INTO bug43492_tab VALUES ('F')",
+ "INSERT INTO bug43492_tab VALUES ('G')",
+ "INSERT INTO bug43492_tab VALUES ('H')",
+ "INSERT INTO bug43492_tab VALUES ('I')",
+ "INSERT INTO bug43492_tab VALUES ('J')"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+/*
+
+While fetching data from a ref cursor, the parent statement needs to
+be around. Also when the parent statement goes out of scope, it is
+not automatically released which causes a cursor leak.
+
+If either or both of the lines marked (*) are removed, then the script
+will fail with the error "ORA-01000: maximum open cursors exceeded".
+
+*/
+
+function fetch($c, $i) {
+ global $s; // (*) Allow parent statement to be available when child is used
+ $s = ociparse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab');
+ ociexecute($s, OCI_DEFAULT);
+ ocifetchinto($s, $result, OCI_ASSOC);
+ ociexecute($result['C'], OCI_DEFAULT);
+ return $result['C'];
+}
+
+for($i = 0; $i < 300; $i++) {
+ $cur = fetch($c, $i);
+ for($j = 0; $j < 10; $j++) {
+ ocifetchinto($cur, $row, OCI_NUM);
+ echo "$row[0] ";
+ }
+ echo "\n";
+ ocifreestatement($cur);
+ ocifreestatement($s); // (*) Free the parent statement cleanly
+}
+
+echo "Done\n";
+
+// Cleanup
+
+$stmtarray = array(
+ "DROP table bug43492_tab"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+oci_close($c);
+
+?>
+--EXPECT--
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+Done
diff --git a/ext/oci8/tests/bug43492_2.phpt b/ext/oci8/tests/bug43492_2.phpt
new file mode 100644
index 000000000..fcf96e984
--- /dev/null
+++ b/ext/oci8/tests/bug43492_2.phpt
@@ -0,0 +1,369 @@
+--TEST--
+Bug #43492 (Nested cursor leaks after related bug #44206 fixed)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+// This test is similar to bug43492.phpt without the explict free.
+// Now that bug 44206 is fixed an automatic clean up will occur -
+// though it is still recommended in practice.
+
+require dirname(__FILE__).'/connect.inc';
+
+$stmtarray = array(
+ "DROP table bug43492_tab",
+ "CREATE TABLE bug43492_tab(col1 VARCHAR2(1))",
+ "INSERT INTO bug43492_tab VALUES ('A')",
+ "INSERT INTO bug43492_tab VALUES ('B')",
+ "INSERT INTO bug43492_tab VALUES ('C')",
+ "INSERT INTO bug43492_tab VALUES ('D')",
+ "INSERT INTO bug43492_tab VALUES ('E')",
+ "INSERT INTO bug43492_tab VALUES ('F')",
+ "INSERT INTO bug43492_tab VALUES ('G')",
+ "INSERT INTO bug43492_tab VALUES ('H')",
+ "INSERT INTO bug43492_tab VALUES ('I')",
+ "INSERT INTO bug43492_tab VALUES ('J')"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+function fetch($c, $i) {
+ $s = ociparse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab');
+ ociexecute($s, OCI_DEFAULT);
+ ocifetchinto($s, $result, OCI_ASSOC);
+ ociexecute($result['C'], OCI_DEFAULT);
+ return $result['C'];
+}
+
+for($i = 0; $i < 300; $i++) {
+ $cur = fetch($c, $i);
+ for($j = 0; $j < 10; $j++) {
+ ocifetchinto($cur, $row, OCI_NUM);
+ echo "$row[0] ";
+ }
+ echo "\n";
+ ocifreestatement($cur);
+}
+
+echo "Done\n";
+
+// Cleanup
+
+$stmtarray = array(
+ "DROP table bug43492_tab"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+oci_close($c);
+
+?>
+--EXPECT--
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+A B C D E F G H I J
+Done
diff --git a/ext/oci8/tests/bug43497.phpt b/ext/oci8/tests/bug43497.phpt
new file mode 100644
index 000000000..908fe5897
--- /dev/null
+++ b/ext/oci8/tests/bug43497.phpt
@@ -0,0 +1,294 @@
+--TEST--
+Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+function sessionid($c) // determines and returns current session ID
+{
+ $query = "select sid from v\$session where audsid = userenv('sessionid')";
+
+ $stmt = oci_parse($c, $query);
+
+ if (oci_execute($stmt, OCI_DEFAULT)) {
+ $row = oci_fetch($stmt);
+ return oci_result($stmt, 1);
+ }
+
+ return null;
+}
+
+
+function templobs($c, $sid) // returns number of temporary LOBs
+{
+ $query = "select abstract_lobs from v\$temporary_lobs where sid = " . $sid;
+
+ $stmt = oci_parse($c, $query);
+
+ if (oci_execute($stmt, OCI_DEFAULT)) {
+ $row = oci_fetch($stmt);
+ $val = oci_result($stmt, 1);
+ oci_free_statement($stmt);
+ return $val;
+ }
+ return null;
+}
+
+
+// Read all XML data using explicit LOB locator
+function readxmltab_ex($c)
+{
+ $stmt = oci_parse($c, "select extract(xml, '/').getclobval() from bug43497_tab");
+
+ $cntchk = 0;
+ if (oci_execute($stmt)) {
+ while ($result = oci_fetch_array($stmt, OCI_NUM)) {
+ $result[0]->free(); // cleanup properly
+ ++$cntchk;
+ }
+ }
+ echo "Loop count check = $cntchk\n";
+}
+
+// Read all XML data using explicit LOB locator but without freeing the temp lobs
+function readxmltab_ex_nofree($c)
+{
+ $stmt = oci_parse($c, "select extract(xml, '/').getclobval() from bug43497_tab");
+
+ $cntchk = 0;
+ if (oci_execute($stmt)) {
+ while ($result = oci_fetch_array($stmt, OCI_NUM)) {
+ ++$cntchk;
+ }
+ }
+ echo "Loop count check = $cntchk\n";
+}
+
+// Read all XML data using implicit LOB locator
+function readxmltab_im($c)
+{
+ $stmt = oci_parse($c, "select extract(xml, '/').getclobval() from bug43497_tab");
+
+ $cntchk = 0;
+ if (oci_execute($stmt)) {
+ while ($result = oci_fetch_array($stmt, OCI_NUM+OCI_RETURN_LOBS)) {
+ ++$cntchk;
+ }
+ }
+ echo "Loop count check = $cntchk\n";
+}
+
+function createxmltab($c) // create table w/ field of XML type
+{
+ @dropxmltab($c);
+ $stmt = oci_parse($c, "create table bug43497_tab (id number primary key, xml xmltype)");
+ oci_execute($stmt);
+}
+
+function dropxmltab($c) // delete table
+{
+ $stmt = oci_parse($c, "drop table bug43497_tab");
+ oci_execute($stmt);
+}
+
+
+function fillxmltab($c)
+{
+ for ($id = 1; $id <= 100; $id++) {
+
+ // create an XML element string with random data
+ $s = "<data>";
+ for ($j = 0; $j < 128; $j++) {
+ $s .= rand();
+ }
+ $s .= "</data>\n";
+ for ($j = 0; $j < 4; $j++) {
+ $s .= $s;
+ }
+ $data = "<?xml version=\"1.0\"?><records>" . $s . "</records>";
+
+ // insert XML data into database
+
+ $stmt = oci_parse($c, "insert into bug43497_tab(id, xml) values (:id, sys.xmltype.createxml(:xml))");
+ oci_bind_by_name($stmt, ":id", $id);
+ $clob = oci_new_descriptor($c, OCI_D_LOB);
+ oci_bind_by_name($stmt, ":xml", $clob, -1, OCI_B_CLOB);
+ $clob->writetemporary($data);
+ oci_execute($stmt);
+
+ $clob->close();
+ $clob->free();
+ }
+}
+
+
+// Initialize
+
+createxmltab($c);
+fillxmltab($c);
+
+// Run Test
+
+$sid = sessionid($c);
+
+echo "Explicit LOB use\n";
+for ($i = 1; $i <= 10; $i++) {
+ echo "\nRun = " . $i . "\n";
+ echo "Temporary LOBs = " . templobs($c, $sid) . "\n";
+ readxmltab_ex($c);
+}
+
+echo "\nImplicit LOB use\n";
+for ($i = 1; $i <= 10; $i++) {
+ echo "\nRun = " . $i . "\n";
+ echo "Temporary LOBs = " . templobs($c, $sid) . "\n";
+ readxmltab_im($c);
+}
+
+echo "\nExplicit LOB with no free (i.e. a temp lob leak)\n";
+for ($i = 1; $i <= 10; $i++) {
+ echo "\nRun = " . $i . "\n";
+ echo "Temporary LOBs = " . templobs($c, $sid) . "\n";
+ readxmltab_ex_nofree($c);
+}
+
+
+
+// Cleanup
+
+dropxmltab($c);
+
+oci_close($c);
+
+echo "Done\n";
+?>
+--EXPECT--
+Explicit LOB use
+
+Run = 1
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 2
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 3
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 4
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 5
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 6
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 7
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 8
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 9
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 10
+Temporary LOBs = 0
+Loop count check = 100
+
+Implicit LOB use
+
+Run = 1
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 2
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 3
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 4
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 5
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 6
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 7
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 8
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 9
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 10
+Temporary LOBs = 0
+Loop count check = 100
+
+Explicit LOB with no free (i.e. a temp lob leak)
+
+Run = 1
+Temporary LOBs = 0
+Loop count check = 100
+
+Run = 2
+Temporary LOBs = 99
+Loop count check = 100
+
+Run = 3
+Temporary LOBs = 198
+Loop count check = 100
+
+Run = 4
+Temporary LOBs = 297
+Loop count check = 100
+
+Run = 5
+Temporary LOBs = 396
+Loop count check = 100
+
+Run = 6
+Temporary LOBs = 495
+Loop count check = 100
+
+Run = 7
+Temporary LOBs = 594
+Loop count check = 100
+
+Run = 8
+Temporary LOBs = 693
+Loop count check = 100
+
+Run = 9
+Temporary LOBs = 792
+Loop count check = 100
+
+Run = 10
+Temporary LOBs = 891
+Loop count check = 100
+Done
diff --git a/ext/oci8/tests/bug44008.phpt b/ext/oci8/tests/bug44008.phpt
new file mode 100644
index 000000000..fd10b26b8
--- /dev/null
+++ b/ext/oci8/tests/bug44008.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Bug #44008 (Incorrect usage of OCI-Lob->close doesn't crash PHP)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+// Initialization
+
+$stmtarray = array(
+ "create or replace procedure bug44008_proc (p in out clob)
+ as begin p := 'A';
+ end;"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+// Run Test
+
+$s = oci_parse($c, 'begin bug44008_proc(:data); end;');
+$textLob = oci_new_descriptor($c, OCI_D_LOB);
+oci_bind_by_name($s, ":data", $textLob, -1, OCI_B_CLOB);
+oci_execute($s, OCI_DEFAULT);
+$r = $textLob->load();
+echo "$r\n";
+
+// Incorrectly closing the lob doesn't cause a crash.
+// OCI-LOB->close() is documented for use only with OCI-Lob->writeTemporary()
+$textLob->close();
+
+// Cleanup
+
+$stmtarray = array(
+ "drop procedure bug44008_proc"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ oci_execute($s);
+}
+
+oci_close($c);
+
+echo "Done\n";
+
+?>
+--EXPECT--
+A
+Done
diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt
new file mode 100644
index 000000000..646f09b7c
--- /dev/null
+++ b/ext/oci8/tests/bug44113.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Bug #44113 (New collection creation can fail with OCI-22303)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+// Initialization
+
+$stmtarray = array(
+ "create or replace type bug44113_list_t as table of number"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+// Run Test
+// The test can take some time to complete and can exceed PHP's test
+// timout limit on slow networks.
+
+for ($x = 0; $x < 70000; $x++)
+{
+ if (!($var = oci_new_collection($c, 'BUG44113_LIST_T'))) {
+ print "Failed new collection creation on $x\n";
+ break;
+ }
+}
+
+print "Completed $x\n";
+
+// Cleanup
+
+$stmtarray = array(
+ "drop type bug44113_list_t"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ oci_execute($s);
+}
+
+oci_close($c);
+
+echo "Done\n";
+
+?>
+--EXPECT--
+Completed 70000
+Done
diff --git a/ext/oci8/tests/bug44206.phpt b/ext/oci8/tests/bug44206.phpt
new file mode 100644
index 000000000..ebf31f715
--- /dev/null
+++ b/ext/oci8/tests/bug44206.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Bug #44206 (Test if selecting ref cursors leads to ORA-1000 maximum open cursors reached)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require(dirname(__FILE__).'/connect.inc');
+
+// Run Test
+
+for ($x = 0; $x < 400; $x++) {
+ $stmt = "select cursor (select $x from dual) a,
+ cursor (select $x from dual) b
+ from dual";
+ $s = oci_parse($c, $stmt);
+ $r = oci_execute($s);
+ if (!$r) {
+ echo "Exiting $x\n";
+ exit;
+ }
+ $result = oci_fetch_array($s, OCI_ASSOC);
+ oci_execute($result['A']);
+ oci_execute($result['B']);
+ oci_fetch_array($result['A'], OCI_ASSOC);
+ oci_fetch_array($result['B'], OCI_ASSOC);
+ oci_free_statement($result['A']);
+ oci_free_statement($result['B']);
+ oci_free_statement($s);
+}
+
+echo "Completed $x\n";
+
+oci_close($c);
+
+echo "Done\n";
+
+?>
+--EXPECT--
+Completed 400
+Done
diff --git a/ext/oci8/tests/bug6109.phpt b/ext/oci8/tests/bug6109.phpt
new file mode 100644
index 000000000..029c5dddb
--- /dev/null
+++ b/ext/oci8/tests/bug6109.phpt
@@ -0,0 +1,46 @@
+--TEST--
+PECL Bug #6109 (Error messages not kept)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require(dirname(__FILE__).'/connect.inc');
+
+// Run Test
+
+echo "Test 1\n";
+
+echo "Once Oracle has popped the message from its stack, the message is\n";
+echo "no longer available.\n";
+
+
+$s = oci_parse($c, 'delete from table_does_not_exist');
+$r = @oci_execute($s);
+
+if ($r) {
+ echo "whoops - table does exist\n";
+} else {
+ for ($i = 0; $i < 5; $i++) {
+ $err = oci_error($s);
+ echo ($i) .' -> '.$err['message'] ."\n";
+ }
+}
+
+// Cleanup
+
+oci_close($c);
+
+echo "Done\n";
+
+?>
+--EXPECTF--
+Test 1
+Once Oracle has popped the message from its stack, the message is
+no longer available.
+0 -> ORA-00942: %s
+1 ->
+2 ->
+3 ->
+4 ->
+Done
diff --git a/ext/oci8/tests/lob_014.phpt b/ext/oci8/tests/lob_014.phpt
index 60ed94531..1ba29ee64 100644
--- a/ext/oci8/tests/lob_014.phpt
+++ b/ext/oci8/tests/lob_014.phpt
@@ -43,9 +43,7 @@ echo "Done\n";
?>
--EXPECTF--
int(4)
-
-Warning: OCI-Lob::close(): ORA-22289: cannot perform operation on an unopened file or LOB in %slob_014.php on line %d
-bool(false)
+bool(true)
int(4)
bool(true)
diff --git a/ext/oci8/tests/lob_021.phpt b/ext/oci8/tests/lob_021.phpt
index 32ef6f9fe..0ae6b377a 100644
--- a/ext/oci8/tests/lob_021.phpt
+++ b/ext/oci8/tests/lob_021.phpt
@@ -20,8 +20,6 @@ $blob = oci_new_descriptor($c,OCI_D_LOB);
oci_bind_by_name($statement,":v_blob", $blob,-1,OCI_B_BLOB);
oci_execute($statement, OCI_DEFAULT);
-$blob;
-
var_dump($blob->write("test"));
var_dump($blob->close());
var_dump($blob->write("test"));
@@ -50,9 +48,7 @@ echo "Done\n";
?>
--EXPECTF--
int(4)
-
-Warning: OCI-Lob::close(): ORA-22289: cannot perform operation on an unopened file or LOB in %s on line %d
-bool(false)
+bool(true)
int(4)
bool(true)
diff --git a/ext/oci8/tests/lob_039.phpt b/ext/oci8/tests/lob_039.phpt
index 93251c8d8..5675f5a92 100644
--- a/ext/oci8/tests/lob_039.phpt
+++ b/ext/oci8/tests/lob_039.phpt
@@ -57,9 +57,9 @@ array(1) {
[0]=>
string(11) "clob test 1"
[1]=>
- string(11) "clob test 2"
+ string(22) " clob test 2"
[2]=>
- string(11) "clob test 3"
+ string(33) " clob test 3"
}
}
Done
diff --git a/ext/oci8/tests/lob_041.phpt b/ext/oci8/tests/lob_041.phpt
new file mode 100644
index 000000000..d04b43606
--- /dev/null
+++ b/ext/oci8/tests/lob_041.phpt
@@ -0,0 +1,92 @@
+--TEST--
+Check LOBS are valid after statement free
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__).'/connect.inc';
+
+// Initialization
+
+$stmtarray = array(
+ "DROP table lob_041_tab",
+ "CREATE table lob_041_tab(c1 CLOB)",
+ "INSERT INTO lob_041_tab VALUES('test data')"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+echo "Test 1 - explicit statement close\n";
+
+$s = oci_parse($c, "SELECT C1 FROM lob_041_tab");
+$desc = oci_new_descriptor($c, OCI_DTYPE_LOB);
+oci_define_by_name($s, "C1", $desc);
+oci_execute($s);
+$data = oci_fetch_assoc($s);
+oci_free_statement($s);
+echo $data['C1']->load(), "\n";
+oci_free_descriptor($desc);
+
+echo "\nTest 2 - implicit statement close\n";
+
+$s = oci_parse($c, "SELECT C1 FROM lob_041_tab");
+$desc = oci_new_descriptor($c, OCI_DTYPE_LOB);
+oci_define_by_name($s, "C1", $desc);
+oci_execute($s);
+$data = oci_fetch_assoc($s);
+$s = null;
+echo $data['C1']->load(), "\n";
+oci_free_descriptor($desc);
+var_dump($desc);
+
+echo "\nTest 3 - no preallocated descriptor\n";
+
+$s = oci_parse($c, "SELECT C1 FROM lob_041_tab");
+oci_execute($s);
+$data = oci_fetch_assoc($s);
+$s = null;
+echo $data['C1']->load(), "\n";
+var_dump($data);
+
+// Cleanup
+
+echo "Done\n";
+
+$stmtarray = array(
+ "DROP table lob_041_tab"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
+
+oci_close($c);
+
+?>
+
+--EXPECTF--
+Test 1 - explicit statement close
+test data
+
+Test 2 - implicit statement close
+test data
+object(OCI-Lob)#%d (1) {
+ ["descriptor"]=>
+ resource(%d) of type (oci8 descriptor)
+}
+
+Test 3 - no preallocated descriptor
+test data
+array(1) {
+ ["C1"]=>
+ object(OCI-Lob)#%d (1) {
+ ["descriptor"]=>
+ resource(%d) of type (oci8 descriptor)
+ }
+}
+Done
diff --git a/ext/oci8/tests/lob_042.phpt b/ext/oci8/tests/lob_042.phpt
new file mode 100644
index 000000000..d79b4846e
--- /dev/null
+++ b/ext/oci8/tests/lob_042.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Check various LOB error messages
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+// test some LOB error messages
+
+require(dirname(__FILE__).'/connect.inc');
+require(dirname(__FILE__).'/create_table.inc');
+
+$ora_sql = "INSERT INTO
+ ".$schema.$table_name." (blob)
+ VALUES (empty_blob())
+ RETURNING
+ blob
+ INTO :v_blob ";
+
+$statement = oci_parse($c,$ora_sql);
+$blob = oci_new_descriptor($c,OCI_D_LOB);
+oci_bind_by_name($statement,":v_blob", $blob,-1,OCI_B_BLOB);
+oci_execute($statement, OCI_DEFAULT);
+
+var_dump($blob);
+
+var_dump($blob->writeTemporary("test", OCI_D_LOB));
+
+$str = "string";
+var_dump($blob->write($str));
+var_dump($blob->truncate(1));
+var_dump($blob->truncate(1));
+var_dump($blob->truncate(2));
+var_dump($blob->truncate(-1));
+var_dump($blob->read(2));
+
+var_dump($blob->import("does_not_exist"));
+var_dump($blob->saveFile("does_not_exist"));
+
+require(dirname(__FILE__).'/drop_table.inc');
+
+echo "Done\n";
+
+?>
+--EXPECTF--
+object(OCI-Lob)#%d (1) {
+ ["descriptor"]=>
+ resource(%d) of type (oci8 descriptor)
+}
+
+Warning: OCI-Lob::writetemporary(): Invalid temporary lob type: %d in %s on line %d
+bool(false)
+int(6)
+bool(true)
+bool(true)
+
+Warning: OCI-Lob::truncate(): Size must be less than or equal to the current LOB size in %s on line %d
+bool(false)
+
+Warning: OCI-Lob::truncate(): Length must be greater than or equal to zero in %s on line %d
+bool(false)
+
+Warning: OCI-Lob::read(): Offset must be less than size of the LOB in %s on line %d
+bool(false)
+
+Warning: OCI-Lob::import(): Can't open file %s in %s on line %d
+bool(false)
+
+Warning: OCI-Lob::savefile(): Can't open file %s in %s on line %d
+bool(false)
+Done
diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c
index 64a21f368..a7ab2753c 100644
--- a/ext/odbc/birdstep.c
+++ b/ext/odbc/birdstep.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: birdstep.c,v 1.13.2.2.2.2 2007/08/31 07:42:00 jani Exp $ */
+/* $Id: birdstep.c,v 1.13.2.2.2.3 2007/12/31 07:20:09 sebastian Exp $ */
/*
* TODO:
diff --git a/ext/odbc/php_birdstep.h b/ext/odbc/php_birdstep.h
index 9450dc19f..5fbb72ff2 100644
--- a/ext/odbc/php_birdstep.h
+++ b/ext/odbc/php_birdstep.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_birdstep.h,v 1.5.2.1.2.1 2007/01/01 09:36:03 sebastian Exp $ */
+/* $Id: php_birdstep.h,v 1.5.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_BIRDSTEP_H
#define PHP_BIRDSTEP_H
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index c473f7cde..47fcd4514 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.189.2.4.2.7 2007/03/13 00:04:38 stas Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.8 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h
index 88926c20f..5f0b1e1aa 100644
--- a/ext/odbc/php_odbc.h
+++ b/ext/odbc/php_odbc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.h,v 1.60.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_odbc.h,v 1.60.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_ODBC_H
#define PHP_ODBC_H
diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h
index 7c736967b..9ccbd7b76 100644
--- a/ext/odbc/php_odbc_includes.h
+++ b/ext/odbc/php_odbc_includes.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc_includes.h,v 1.12.2.1.2.4 2007/03/13 00:04:38 stas Exp $ */
+/* $Id: php_odbc_includes.h,v 1.12.2.1.2.5 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_ODBC_INCLUDES_H
#define PHP_ODBC_INCLUDES_H
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index ea50d5c41..516ff1748 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.98.2.5.2.42 2007/10/31 13:23:06 jani Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.45 2008/04/07 10:44:03 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1962,7 +1962,7 @@ PHP_FUNCTION(openssl_csr_sign)
X509 * cert = NULL, *new_cert = NULL;
X509_REQ * csr;
EVP_PKEY * key = NULL, *priv_key = NULL;
- long csr_resource, certresource, keyresource;
+ long csr_resource, certresource = 0, keyresource;
int i;
struct php_x509_request req;
@@ -3522,6 +3522,7 @@ PHP_FUNCTION(openssl_sign)
efree(sigbuf);
RETVAL_FALSE;
}
+ EVP_MD_CTX_cleanup(&md_ctx);
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
@@ -3561,6 +3562,7 @@ PHP_FUNCTION(openssl_verify)
EVP_VerifyInit (&md_ctx, mdtype);
EVP_VerifyUpdate (&md_ctx, data, data_len);
err = EVP_VerifyFinal (&md_ctx, (unsigned char *)signature, signature_len, pkey);
+ EVP_MD_CTX_cleanup(&md_ctx);
if (keyresource == -1) {
EVP_PKEY_free(pkey);
diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h
index 15023b233..83a42867e 100644
--- a/ext/openssl/php_openssl.h
+++ b/ext/openssl/php_openssl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_openssl.h,v 1.16.2.1.2.4 2007/04/04 21:24:01 pajoye Exp $ */
+/* $Id: php_openssl.h,v 1.16.2.1.2.5 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_OPENSSL_H
#define PHP_OPENSSL_H
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 940d608ad..fc29a82b6 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xp_ssl.c,v 1.22.2.3.2.9 2007/07/02 16:42:10 iliaa Exp $ */
+/* $Id: xp_ssl.c,v 1.22.2.3.2.11 2008/04/08 14:11:49 jorton Exp $ */
#include "php.h"
#include "ext/standard/file.h"
@@ -728,7 +728,7 @@ static int php_openssl_sockop_cast(php_stream *stream, int castas, void **ret TS
case PHP_STREAM_AS_FD_FOR_SELECT:
if (ret) {
- *ret = (void*)sslsock->s.socket;
+ *(int *)ret = sslsock->s.socket;
}
return SUCCESS;
@@ -738,7 +738,7 @@ static int php_openssl_sockop_cast(php_stream *stream, int castas, void **ret TS
return FAILURE;
}
if (ret) {
- *ret = (void*)sslsock->s.socket;
+ *(int *)ret = sslsock->s.socket;
}
return SUCCESS;
default:
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index fe0f0b4df..153502700 100755
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pcntl.c,v 1.48.2.2.2.4 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: pcntl.c,v 1.48.2.2.2.6 2007/12/31 07:20:09 sebastian Exp $ */
#define PCNTL_DEBUG 0
@@ -225,7 +225,7 @@ PHP_FUNCTION(pcntl_fork)
id = fork();
if (id == -1) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Error %d", errno);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error %d", errno);
}
RETURN_LONG((long) id);
diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h
index 52b239ba7..c7c46bf60 100644
--- a/ext/pcntl/php_pcntl.h
+++ b/ext/pcntl/php_pcntl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcntl.h,v 1.20.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_pcntl.h,v 1.20.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PCNTL_H
#define PHP_PCNTL_H
diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c
index 2b7ef6b0c..c6c5208de 100644
--- a/ext/pcntl/php_signal.c
+++ b/ext/pcntl/php_signal.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_signal.c,v 1.9.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_signal.c,v 1.9.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#include "php_signal.h"
diff --git a/ext/pcntl/php_signal.h b/ext/pcntl/php_signal.h
index 5b1881046..2a2a0556a 100644
--- a/ext/pcntl/php_signal.h
+++ b/ext/pcntl/php_signal.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_signal.h,v 1.9.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_signal.h,v 1.9.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#include <signal.h>
#ifndef PHP_SIGNAL_H
diff --git a/ext/pcre/pcrelib/AUTHORS b/ext/pcre/pcrelib/AUTHORS
index 36e4aafbd..88b993b69 100644
--- a/ext/pcre/pcrelib/AUTHORS
+++ b/ext/pcre/pcrelib/AUTHORS
@@ -8,7 +8,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2007 University of Cambridge
+Copyright (c) 1997-2008 University of Cambridge
All rights reserved
@@ -17,7 +17,7 @@ THE C++ WRAPPER LIBRARY
Written by: Google Inc.
-Copyright (c) 2007 Google Inc
+Copyright (c) 2007-2008 Google Inc
All rights reserved
####
diff --git a/ext/pcre/pcrelib/ChangeLog b/ext/pcre/pcrelib/ChangeLog
index 3b18524fe..3ebbb4522 100644
--- a/ext/pcre/pcrelib/ChangeLog
+++ b/ext/pcre/pcrelib/ChangeLog
@@ -1,6 +1,266 @@
ChangeLog for PCRE
------------------
+Version 7.6 28-Jan-08
+---------------------
+
+1. A character class containing a very large number of characters with
+ codepoints greater than 255 (in UTF-8 mode, of course) caused a buffer
+ overflow.
+
+2. Patch to cut out the "long long" test in pcrecpp_unittest when
+ HAVE_LONG_LONG is not defined.
+
+3. Applied Christian Ehrlicher's patch to update the CMake build files to
+ bring them up to date and include new features. This patch includes:
+
+ - Fixed PH's badly added libz and libbz2 support.
+ - Fixed a problem with static linking.
+ - Added pcredemo. [But later removed - see 7 below.]
+ - Fixed dftables problem and added an option.
+ - Added a number of HAVE_XXX tests, including HAVE_WINDOWS_H and
+ HAVE_LONG_LONG.
+ - Added readline support for pcretest.
+ - Added an listing of the option settings after cmake has run.
+
+4. A user submitted a patch to Makefile that makes it easy to create
+ "pcre.dll" under mingw when using Configure/Make. I added stuff to
+ Makefile.am that cause it to include this special target, without
+ affecting anything else. Note that the same mingw target plus all
+ the other distribution libraries and programs are now supported
+ when configuring with CMake (see 6 below) instead of with
+ Configure/Make.
+
+5. Applied Craig's patch that moves no_arg into the RE class in the C++ code.
+ This is an attempt to solve the reported problem "pcrecpp::no_arg is not
+ exported in the Windows port". It has not yet been confirmed that the patch
+ solves the problem, but it does no harm.
+
+6. Applied Sheri's patch to CMakeLists.txt to add NON_STANDARD_LIB_PREFIX and
+ NON_STANDARD_LIB_SUFFIX for dll names built with mingw when configured
+ with CMake, and also correct the comment about stack recursion.
+
+7. Remove the automatic building of pcredemo from the ./configure system and
+ from CMakeLists.txt. The whole idea of pcredemo.c is that it is an example
+ of a program that users should build themselves after PCRE is installed, so
+ building it automatically is not really right. What is more, it gave
+ trouble in some build environments.
+
+8. Further tidies to CMakeLists.txt from Sheri and Christian.
+
+
+Version 7.5 10-Jan-08
+---------------------
+
+1. Applied a patch from Craig: "This patch makes it possible to 'ignore'
+ values in parens when parsing an RE using the C++ wrapper."
+
+2. Negative specials like \S did not work in character classes in UTF-8 mode.
+ Characters greater than 255 were excluded from the class instead of being
+ included.
+
+3. The same bug as (2) above applied to negated POSIX classes such as
+ [:^space:].
+
+4. PCRECPP_STATIC was referenced in pcrecpp_internal.h, but nowhere was it
+ defined or documented. It seems to have been a typo for PCRE_STATIC, so
+ I have changed it.
+
+5. The construct (?&) was not diagnosed as a syntax error (it referenced the
+ first named subpattern) and a construct such as (?&a) would reference the
+ first named subpattern whose name started with "a" (in other words, the
+ length check was missing). Both these problems are fixed. "Subpattern name
+ expected" is now given for (?&) (a zero-length name), and this patch also
+ makes it give the same error for \k'' (previously it complained that that
+ was a reference to a non-existent subpattern).
+
+6. The erroneous patterns (?+-a) and (?-+a) give different error messages;
+ this is right because (?- can be followed by option settings as well as by
+ digits. I have, however, made the messages clearer.
+
+7. Patterns such as (?(1)a|b) (a pattern that contains fewer subpatterns
+ than the number used in the conditional) now cause a compile-time error.
+ This is actually not compatible with Perl, which accepts such patterns, but
+ treats the conditional as always being FALSE (as PCRE used to), but it
+ seems to me that giving a diagnostic is better.
+
+8. Change "alphameric" to the more common word "alphanumeric" in comments
+ and messages.
+
+9. Fix two occurrences of "backslash" in comments that should have been
+ "backspace".
+
+10. Remove two redundant lines of code that can never be obeyed (their function
+ was moved elsewhere).
+
+11. The program that makes PCRE's Unicode character property table had a bug
+ which caused it to generate incorrect table entries for sequences of
+ characters that have the same character type, but are in different scripts.
+ It amalgamated them into a single range, with the script of the first of
+ them. In other words, some characters were in the wrong script. There were
+ thirteen such cases, affecting characters in the following ranges:
+
+ U+002b0 - U+002c1
+ U+0060c - U+0060d
+ U+0061e - U+00612
+ U+0064b - U+0065e
+ U+0074d - U+0076d
+ U+01800 - U+01805
+ U+01d00 - U+01d77
+ U+01d9b - U+01dbf
+ U+0200b - U+0200f
+ U+030fc - U+030fe
+ U+03260 - U+0327f
+ U+0fb46 - U+0fbb1
+ U+10450 - U+1049d
+
+12. The -o option (show only the matching part of a line) for pcregrep was not
+ compatible with GNU grep in that, if there was more than one match in a
+ line, it showed only the first of them. It now behaves in the same way as
+ GNU grep.
+
+13. If the -o and -v options were combined for pcregrep, it printed a blank
+ line for every non-matching line. GNU grep prints nothing, and pcregrep now
+ does the same. The return code can be used to tell if there were any
+ non-matching lines.
+
+14. Added --file-offsets and --line-offsets to pcregrep.
+
+15. The pattern (?=something)(?R) was not being diagnosed as a potentially
+ infinitely looping recursion. The bug was that positive lookaheads were not
+ being skipped when checking for a possible empty match (negative lookaheads
+ and both kinds of lookbehind were skipped).
+
+16. Fixed two typos in the Windows-only code in pcregrep.c, and moved the
+ inclusion of <windows.h> to before rather than after the definition of
+ INVALID_FILE_ATTRIBUTES (patch from David Byron).
+
+17. Specifying a possessive quantifier with a specific limit for a Unicode
+ character property caused pcre_compile() to compile bad code, which led at
+ runtime to PCRE_ERROR_INTERNAL (-14). Examples of patterns that caused this
+ are: /\p{Zl}{2,3}+/8 and /\p{Cc}{2}+/8. It was the possessive "+" that
+ caused the error; without that there was no problem.
+
+18. Added --enable-pcregrep-libz and --enable-pcregrep-libbz2.
+
+19. Added --enable-pcretest-libreadline.
+
+20. In pcrecpp.cc, the variable 'count' was incremented twice in
+ RE::GlobalReplace(). As a result, the number of replacements returned was
+ double what it should be. I removed one of the increments, but Craig sent a
+ later patch that removed the other one (the right fix) and added unit tests
+ that check the return values (which was not done before).
+
+21. Several CMake things:
+
+ (1) Arranged that, when cmake is used on Unix, the libraries end up with
+ the names libpcre and libpcreposix, not just pcre and pcreposix.
+
+ (2) The above change means that pcretest and pcregrep are now correctly
+ linked with the newly-built libraries, not previously installed ones.
+
+ (3) Added PCRE_SUPPORT_LIBREADLINE, PCRE_SUPPORT_LIBZ, PCRE_SUPPORT_LIBBZ2.
+
+22. In UTF-8 mode, with newline set to "any", a pattern such as .*a.*=.b.*
+ crashed when matching a string such as a\x{2029}b (note that \x{2029} is a
+ UTF-8 newline character). The key issue is that the pattern starts .*;
+ this means that the match must be either at the beginning, or after a
+ newline. The bug was in the code for advancing after a failed match and
+ checking that the new position followed a newline. It was not taking
+ account of UTF-8 characters correctly.
+
+23. PCRE was behaving differently from Perl in the way it recognized POSIX
+ character classes. PCRE was not treating the sequence [:...:] as a
+ character class unless the ... were all letters. Perl, however, seems to
+ allow any characters between [: and :], though of course it rejects as
+ unknown any "names" that contain non-letters, because all the known class
+ names consist only of letters. Thus, Perl gives an error for [[:1234:]],
+ for example, whereas PCRE did not - it did not recognize a POSIX character
+ class. This seemed a bit dangerous, so the code has been changed to be
+ closer to Perl. The behaviour is not identical to Perl, because PCRE will
+ diagnose an unknown class for, for example, [[:l\ower:]] where Perl will
+ treat it as [[:lower:]]. However, PCRE does now give "unknown" errors where
+ Perl does, and where it didn't before.
+
+24. Rewrite so as to remove the single use of %n from pcregrep because in some
+ Windows environments %n is disabled by default.
+
+
+Version 7.4 21-Sep-07
+---------------------
+
+1. Change 7.3/28 was implemented for classes by looking at the bitmap. This
+ means that a class such as [\s] counted as "explicit reference to CR or
+ LF". That isn't really right - the whole point of the change was to try to
+ help when there was an actual mention of one of the two characters. So now
+ the change happens only if \r or \n (or a literal CR or LF) character is
+ encountered.
+
+2. The 32-bit options word was also used for 6 internal flags, but the numbers
+ of both had grown to the point where there were only 3 bits left.
+ Fortunately, there was spare space in the data structure, and so I have
+ moved the internal flags into a new 16-bit field to free up more option
+ bits.
+
+3. The appearance of (?J) at the start of a pattern set the DUPNAMES option,
+ but did not set the internal JCHANGED flag - either of these is enough to
+ control the way the "get" function works - but the PCRE_INFO_JCHANGED
+ facility is supposed to tell if (?J) was ever used, so now (?J) at the
+ start sets both bits.
+
+4. Added options (at build time, compile time, exec time) to change \R from
+ matching any Unicode line ending sequence to just matching CR, LF, or CRLF.
+
+5. doc/pcresyntax.html was missing from the distribution.
+
+6. Put back the definition of PCRE_ERROR_NULLWSLIMIT, for backward
+ compatibility, even though it is no longer used.
+
+7. Added macro for snprintf to pcrecpp_unittest.cc and also for strtoll and
+ strtoull to pcrecpp.cc to select the available functions in WIN32 when the
+ windows.h file is present (where different names are used). [This was
+ reversed later after testing - see 16 below.]
+
+8. Changed all #include <config.h> to #include "config.h". There were also
+ some further <pcre.h> cases that I changed to "pcre.h".
+
+9. When pcregrep was used with the --colour option, it missed the line ending
+ sequence off the lines that it output.
+
+10. It was pointed out to me that arrays of string pointers cause lots of
+ relocations when a shared library is dynamically loaded. A technique of
+ using a single long string with a table of offsets can drastically reduce
+ these. I have refactored PCRE in four places to do this. The result is
+ dramatic:
+
+ Originally: 290
+ After changing UCP table: 187
+ After changing error message table: 43
+ After changing table of "verbs" 36
+ After changing table of Posix names 22
+
+ Thanks to the folks working on Gregex for glib for this insight.
+
+11. --disable-stack-for-recursion caused compiling to fail unless -enable-
+ unicode-properties was also set.
+
+12. Updated the tests so that they work when \R is defaulted to ANYCRLF.
+
+13. Added checks for ANY and ANYCRLF to pcrecpp.cc where it previously
+ checked only for CRLF.
+
+14. Added casts to pcretest.c to avoid compiler warnings.
+
+15. Added Craig's patch to various pcrecpp modules to avoid compiler warnings.
+
+16. Added Craig's patch to remove the WINDOWS_H tests, that were not working,
+ and instead check for _strtoi64 explicitly, and avoid the use of snprintf()
+ entirely. This removes changes made in 7 above.
+
+17. The CMake files have been updated, and there is now more information about
+ building with CMake in the NON-UNIX-USE document.
+
+
Version 7.3 28-Aug-07
---------------------
diff --git a/ext/pcre/pcrelib/LICENCE b/ext/pcre/pcrelib/LICENCE
index 4baa7d83a..03fabc6ae 100644
--- a/ext/pcre/pcrelib/LICENCE
+++ b/ext/pcre/pcrelib/LICENCE
@@ -22,7 +22,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2007 University of Cambridge
+Copyright (c) 1997-2008 University of Cambridge
All rights reserved.
@@ -31,7 +31,7 @@ THE C++ WRAPPER FUNCTIONS
Contributed by: Google Inc.
-Copyright (c) 2007, Google Inc.
+Copyright (c) 2007-2008, Google Inc.
All rights reserved.
diff --git a/ext/pcre/pcrelib/NEWS b/ext/pcre/pcrelib/NEWS
index 6a30805bb..d274541ba 100644
--- a/ext/pcre/pcrelib/NEWS
+++ b/ext/pcre/pcrelib/NEWS
@@ -1,6 +1,33 @@
News about PCRE releases
------------------------
+Release 7.6 28-Jan-08
+---------------------
+
+The main reason for having this release so soon after 7.5 is because it fixes a
+potential buffer overflow problem in pcre_compile() when run in UTF-8 mode. In
+addition, the CMake configuration files have been brought up to date.
+
+
+Release 7.5 10-Jan-08
+---------------------
+
+This is mainly a bug-fix release. However the ability to link pcregrep with
+libz or libbz2 and the ability to link pcretest with libreadline have been
+added. Also the --line-offsets and --file-offsets options were added to
+pcregrep.
+
+
+Release 7.4 21-Sep-07
+---------------------
+
+The only change of specification is the addition of options to control whether
+\R matches any Unicode line ending (the default) or just CR, LF, and CRLF.
+Otherwise, the changes are bug fixes and a refactoring to reduce the number of
+relocations needed in a shared library. There have also been some documentation
+updates, in particular, some more information about using CMake to build PCRE
+has been added to the NON-UNIX-USE file.
+
Release 7.3 28-Aug-07
---------------------
diff --git a/ext/pcre/pcrelib/NON-UNIX-USE b/ext/pcre/pcrelib/NON-UNIX-USE
index f1047baa7..e6726faaa 100644
--- a/ext/pcre/pcrelib/NON-UNIX-USE
+++ b/ext/pcre/pcrelib/NON-UNIX-USE
@@ -8,7 +8,11 @@ This document contains the following sections:
The C++ wrapper functions
Building for virtual Pascal
Stack size in Windows environments
+ Linking programs in Windows environments
Comments about Win32 builds
+ Building PCRE on Windows with CMake
+ Use of relative paths with CMake on Windows
+ Testing with runtest.bat
Building under Windows with BCC5.5
Building PCRE on OpenVMS
@@ -30,9 +34,12 @@ library consists entirely of code written in Standard C, and so should compile
successfully on any system that has a Standard C compiler and library. The C++
wrapper functions are a separate issue (see below).
-The PCRE distribution contains some experimental support for "cmake", but this
-is incomplete and not documented. However if you are a "cmake" user you might
-like to try building with "cmake".
+The PCRE distribution includes a "configure" file for use by the Configure/Make
+build system, as found in many Unix-like environments. There is also support
+support for CMake, which some users prefer, in particular in Windows
+environments. There are some instructions for CMake under Windows in the
+section entitled "Building PCRE with CMake" below. CMake can also be used to
+build PCRE in Unix-like systems.
GENERIC INSTRUCTIONS FOR THE PCRE C LIBRARY
@@ -42,10 +49,13 @@ The following are generic comments about building the PCRE C library "by hand".
(1) Copy or rename the file config.h.generic as config.h, and edit the macro
settings that it contains to whatever is appropriate for your environment.
In particular, if you want to force a specific value for newline, you can
- define the NEWLINE macro.
+ define the NEWLINE macro. When you compile any of the PCRE modules, you
+ must specify -DHAVE_CONFIG_H to your compiler so that config.h is included
+ in the sources.
An alternative approach is not to edit config.h, but to use -D on the
- compiler command line to make any changes that you need.
+ compiler command line to make any changes that you need to the
+ configuration options. In this case -DHAVE_CONFIG_H must not be set.
NOTE: There have been occasions when the way in which certain parameters
in config.h are used has changed between releases. (In the configure/make
@@ -59,13 +69,14 @@ The following are generic comments about building the PCRE C library "by hand".
Copy or rename file pcre_chartables.c.dist as pcre_chartables.c.
OR:
- Compile dftables.c as a stand-alone program, and then run it with the
- single argument "pcre_chartables.c". This generates a set of standard
- character tables and writes them to that file. The tables are generated
- using the default C locale for your system. If you want to use a locale
- that is specified by LC_xxx environment variables, add the -L option to
- the dftables command. You must use this method if you are building on
- a system that uses EBCDIC code.
+ Compile dftables.c as a stand-alone program (using -DHAVE_CONFIG_H if
+ you have set up config.h), and then run it with the single argument
+ "pcre_chartables.c". This generates a set of standard character tables
+ and writes them to that file. The tables are generated using the default
+ C locale for your system. If you want to use a locale that is specified
+ by LC_xxx environment variables, add the -L option to the dftables
+ command. You must use this method if you are building on a system that
+ uses EBCDIC code.
The tables in pcre_chartables.c are defaults. The caller of PCRE can
specify alternative tables at run time.
@@ -78,11 +89,13 @@ The following are generic comments about building the PCRE C library "by hand".
ucptable.h
(5) Also ensure that you have the following file, which is #included as source
- when building a debugging version of PCRE and is also used by pcretest.
+ when building a debugging version of PCRE, and is also used by pcretest.
pcre_printint.src
- (6) Compile the following source files:
+ (6) Compile the following source files, setting -DHAVE_CONFIG_H as a compiler
+ option if you have set up config.h with your configuration, or else use
+ other -D settings to change the configuration as required.
pcre_chartables.c
pcre_compile.c
@@ -115,18 +128,21 @@ The following are generic comments about building the PCRE C library "by hand".
your system has static and shared libraries, you may have to do this once
for each type.
- (8) Similarly, compile pcreposix.c and link the result (on its own) as the
- pcreposix library.
+ (8) Similarly, compile pcreposix.c (remembering -DHAVE_CONFIG_H if necessary)
+ and link the result (on its own) as the pcreposix library.
- (9) Compile the test program pcretest.c. This needs the functions in the
- pcre and pcreposix libraries when linking. It also needs the
- pcre_printint.src source file, which it #includes.
+ (9) Compile the test program pcretest.c (again, don't forget -DHAVE_CONFIG_H).
+ This needs the functions in the pcre and pcreposix libraries when linking.
+ It also needs the pcre_printint.src source file, which it #includes.
(10) Run pcretest on the testinput files in the testdata directory, and check
that the output matches the corresponding testoutput files. Note that the
supplied files are in Unix format, with just LF characters as line
terminators. You may need to edit them to change this if your system uses
- a different convention.
+ a different convention. If you are using Windows, you probably should use
+ the wintestinput3 file instead of testinput3 (and the corresponding output
+ file). This is a locale test; wintestinput3 sets the locale to "french"
+ rather than "fr_FR", and there some minor output differences.
(11) If you want to use the pcregrep command, compile and link pcregrep.c; it
uses only the basic PCRE library (it does not need the pcreposix library).
@@ -158,19 +174,30 @@ fail because of this. Normally, running out of stack causes a crash, but there
have been cases where the test program has just died silently. See your linker
documentation for how to increase stack size if you experience problems. The
Linux default of 8Mb is a reasonable choice for the stack, though even that can
-be too small for some pattern/subject combinations. There is more about stack
-usage in the "pcrestack" documentation.
+be too small for some pattern/subject combinations.
+PCRE has a compile configuration option to disable the use of stack for
+recursion so that heap is used instead. However, pattern matching is
+significantly slower when this is done. There is more about stack usage in the
+"pcrestack" documentation.
-COMMENTS ABOUT WIN32 BUILDS
+
+LINKING PROGRAMS IN WINDOWS ENVIRONMENTS
+
+If you want to statically link a program against a PCRE library in the form of
+a non-dll .a file, you must define PCRE_STATIC before including pcre.h,
+otherwise the pcre_malloc() and pcre_free() exported functions will be declared
+__declspec(dllimport), with unwanted results.
+
+
+COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE WITH CMAKE" below)
There are two ways of building PCRE using the "configure, make, make install"
paradigm on Windows systems: using MinGW or using Cygwin. These are not at all
the same thing; they are completely different from each other. There is also
-some experimental, undocumented support for building using "cmake", which you
-might like to try if you are familiar with "cmake". However, at the present
-time, the "cmake" process builds only a static library (not a dll), and the
-tests are not automatically run.
+support for building using CMake, which some users find a more straightforward
+way of building PCRE under Windows. However, the tests are not run
+automatically when CMake is used.
The MinGW home page (http://www.mingw.org/) says this:
@@ -202,10 +229,13 @@ also link with libpcre, which contains the basic functions. (Some earlier
releases of PCRE included the basic libpcre functions in libpcreposix. This no
longer happens.)
-If you want to statically link your program against a non-dll .a file, you must
-define PCRE_STATIC before including pcre.h, otherwise the pcre_malloc() and
-pcre_free() exported functions will be declared __declspec(dllimport), with
-unwanted results.
+A user submitted a special-purpose patch that makes it easy to create
+"pcre.dll" under mingw32 using the "msys" environment. It provides "pcre.dll"
+as a special target. If you use this target, no other files are built, and in
+particular, the pcretest and pcregrep programs are not built. An example of how
+this might be used is:
+
+ ./configure --enable-utf --disable-cpp CFLAGS="-03 -s"; make pcre.dll
Using Cygwin's compiler generates libraries and executables that depend on
cygwin1.dll. If a library that is generated this way is distributed,
@@ -237,6 +267,89 @@ terminators in order to get some of the tests to work. We hope to improve
things in this area in future.
+BUILDING PCRE ON WINDOWS WITH CMAKE
+
+CMake is an alternative build facility that can be used instead of the
+traditional Unix "configure". CMake version 2.4.7 supports Borland makefiles,
+MinGW makefiles, MSYS makefiles, NMake makefiles, UNIX makefiles, Visual Studio
+6, Visual Studio 7, Visual Studio 8, and Watcom W8. The following instructions
+were contributed by a PCRE user.
+
+1. Download CMake 2.4.7 or above from http://www.cmake.org/, install and ensure
+ that cmake\bin is on your path.
+
+2. Unzip (retaining folder structure) the PCRE source tree into a source
+ directory such as C:\pcre.
+
+3. Create a new, empty build directory: C:\pcre\build\
+
+4. Run CMakeSetup from the Shell envirornment of your build tool, e.g., Msys
+ for Msys/MinGW or Visual Studio Command Prompt for VC/VC++
+
+5. Enter C:\pcre\pcre-xx and C:\pcre\build for the source and build
+ directories, respectively
+
+6. Hit the "Configure" button.
+
+7. Select the particular IDE / build tool that you are using (Visual Studio,
+ MSYS makefiles, MinGW makefiles, etc.)
+
+8. The GUI will then list several configuration options. This is where you can
+ enable UTF-8 support, etc.
+
+9. Hit "Configure" again. The adjacent "OK" button should now be active.
+
+10. Hit "OK".
+
+11. The build directory should now contain a usable build system, be it a
+ solution file for Visual Studio, makefiles for MinGW, etc.
+
+
+USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS
+
+A PCRE user comments as follows:
+
+I thought that others may want to know the current state of
+CMAKE_USE_RELATIVE_PATHS support on Windows.
+
+Here it is:
+-- AdditionalIncludeDirectories is only partially modified (only the
+first path - see below)
+-- Only some of the contained file paths are modified - shown below for
+pcre.vcproj
+-- It properly modifies
+
+I am sure CMake people can fix that if they want to. Until then one will
+need to replace existing absolute paths in project files with relative
+paths manually (e.g. from VS) - relative to project file location. I did
+just that before being told to try CMAKE_USE_RELATIVE_PATHS. Not a big
+deal.
+
+AdditionalIncludeDirectories="E:\builds\pcre\build;E:\builds\pcre\pcre-7.5;"
+AdditionalIncludeDirectories=".;E:\builds\pcre\pcre-7.5;"
+
+RelativePath="pcre.h">
+RelativePath="pcre_chartables.c">
+RelativePath="pcre_chartables.c.rule">
+
+
+TESTING WITH RUNTEST.BAT
+
+1. Copy RunTest.bat into the directory where pcretest.exe has been created.
+
+2. Edit RunTest.bat and insert a line that indentifies the relative location of
+ the pcre source, e.g.:
+
+ set srcdir=..\pcre-7.4-RC3
+
+3. Run RunTest.bat from a command shell environment. Test outputs will
+ automatically be compared to expected results, and discrepancies will
+ identified in the console output.
+
+4. To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and
+ pcre_scanner_unittest.exe.
+
+
BUILDING UNDER WINDOWS WITH BCC5.5
Michael Roy sent these comments about building PCRE under Windows with BCC5.5:
@@ -315,5 +428,5 @@ $! Locale could not be set to fr
$!
=========================
-Last Updated: 01 August 2007
+Last Updated: 25 January 2008
****
diff --git a/ext/pcre/pcrelib/README b/ext/pcre/pcrelib/README
index 2f4d3c577..98d52f13a 100644
--- a/ext/pcre/pcrelib/README
+++ b/ext/pcre/pcrelib/README
@@ -103,7 +103,9 @@ Building PCRE on non-Unix systems
For a non-Unix system, please read the comments in the file NON-UNIX-USE,
though if your system supports the use of "configure" and "make" you may be
-able to build PCRE in the same way as for Unix-like systems.
+able to build PCRE in the same way as for Unix-like systems. PCRE can also be
+configured in many platform environments using the GUI facility of CMake's
+CMakeSetup. It creates Makefiles, solution files, etc.
PCRE has been compiled on many different operating systems. It should be
straightforward to build PCRE on any system that has a Standard C compiler and
@@ -117,9 +119,9 @@ If you are using HP's ANSI C++ compiler (aCC), please see the special note
in the section entitled "Using HP's ANSI C++ compiler (aCC)" below.
The following instructions assume the use of the widely used "configure, make,
-make install" process. There is also some experimental support for "cmake" in
-the PCRE distribution, but it is incomplete and not documented. However, if you
-are a "cmake" user, you might want to try it.
+make install" process. There is also support for CMake in the PCRE
+distribution; there are some comments about using CMake in the NON-UNIX-USE
+file, though it can also be used in Unix-like systems.
To build PCRE on a Unix-like system, first run the "configure" command from the
PCRE distribution directory, with your current directory set to the directory
@@ -184,6 +186,12 @@ library. You can read more about them in the pcrebuild man page.
--enable-newline-is-any, many tests should succeed, but there may be some
failures.
+. By default, the sequence \R in a pattern matches any Unicode line ending
+ sequence. This is independent of the option specifying what PCRE considers to
+ be the end of a line (see above). However, the caller of PCRE can restrict \R
+ to match only CR, LF, or CRLF. You can make this the default by adding
+ --enable-bsr-anycrlf to the "configure" command (bsr = "backslash R").
+
. When called via the POSIX interface, PCRE uses malloc() to get additional
storage for processing capturing parentheses if there are more than 10 of
them in a pattern. You can increase this threshold by setting, for example,
@@ -250,6 +258,24 @@ library. You can read more about them in the pcrebuild man page.
This automatically implies --enable-rebuild-chartables (see above).
+. It is possible to compile pcregrep to use libz and/or libbz2, in order to
+ read .gz and .bz2 files (respectively), by specifying one or both of
+
+ --enable-pcregrep-libz
+ --enable-pcregrep-libbz2
+
+ Of course, the relevant libraries must be installed on your system.
+
+. It is possible to compile pcretest so that it links with the libreadline
+ library, by specifying
+
+ --enable-pcretest-libreadline
+
+ If this is done, when pcretest's input is from a terminal, it reads it using
+ the readline() function. This provides line-editing and history facilities.
+ Note that libreadline is GPL-licenced, so if you distribute a binary of
+ pcretest linked in this way, there may be licensing issues.
+
The "configure" script builds the following files for the basic C library:
. Makefile is the makefile that builds the library
@@ -277,12 +303,12 @@ script that can be run to recreate the configuration, and config.log, which
contains compiler output from tests that "configure" runs.
Once "configure" has run, you can run "make". It builds two libraries, called
-libpcre and libpcreposix, a test program called pcretest, a demonstration
-program called pcredemo, and the pcregrep command. If a C++ compiler was found
-on your system, "make" also builds the C++ wrapper library, which is called
-libpcrecpp, and some test programs called pcrecpp_unittest,
-pcre_scanner_unittest, and pcre_stringpiece_unittest. Building the C++ wrapper
-can be disabled by adding --disable-cpp to the "configure" command.
+libpcre and libpcreposix, a test program called pcretest, and the pcregrep
+command. If a C++ compiler was found on your system, "make" also builds the C++
+wrapper library, which is called libpcrecpp, and some test programs called
+pcrecpp_unittest, pcre_scanner_unittest, and pcre_stringpiece_unittest.
+Building the C++ wrapper can be disabled by adding --disable-cpp to the
+"configure" command.
The command "make check" runs all the appropriate tests. Details of the PCRE
tests are given below in a separate section of this document.
@@ -334,9 +360,6 @@ system. The following are installed (file names are all relative to the
pcretest.txt the pcretest man page
pcregrep.txt the pcregrep man page
-Note that the pcredemo program that is built by "configure" is *not* installed
-anywhere. It is a demonstration for programmers wanting to use PCRE.
-
If you want to remove PCRE from your system, you can run "make uninstall".
This removes all the files that "make install" installed. However, it does not
remove any directories, because these are often shared with other programs.
@@ -500,7 +523,10 @@ in the comparison output, it means that locale is not available on your system,
despite being listed by "locale". This does not mean that PCRE is broken.
[If you are trying to run this test on Windows, you may be able to get it to
-work by changing "fr_FR" to "french" everywhere it occurs.]
+work by changing "fr_FR" to "french" everywhere it occurs. Alternatively, use
+RunTest.bat. The version of RunTest.bat included with PCRE 7.4 and above uses
+Windows versions of test 2. More info on using RunTest.bat is included in the
+document entitled NON-UNIX-USE.]
The fourth test checks the UTF-8 support. It is not run automatically unless
PCRE is built with UTF-8 support. To do this you must set --enable-utf8 when
@@ -714,4 +740,4 @@ The distribution should contain the following files:
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
-Last updated: 24 April 2007
+Last updated: 25 January 2008
diff --git a/ext/pcre/pcrelib/config.h b/ext/pcre/pcrelib/config.h
index b16c6b650..0b753d686 100644
--- a/ext/pcre/pcrelib/config.h
+++ b/ext/pcre/pcrelib/config.h
@@ -20,13 +20,24 @@ it to run on SunOS4 and other "close to standard" systems.
If you are going to build PCRE "by hand" on a system without "configure" you
should copy the distributed config.h.generic to config.h, and then set up the
-macros the way you need them. Alternatively, you can avoid editing by using -D
-on the compiler command line to set the macro values.
+macro definitions the way you need them. You must then add -DHAVE_CONFIG_H to
+all of your compile commands, so that config.h is included at the start of
+every source.
+
+Alternatively, you can avoid editing by using -D on the compiler command line
+to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H.
PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if
HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set
them both to 0; an emulation function will be used. */
+/* By default, the \R escape sequence matches any Unicode line ending
+ character or sequence of characters. If BSR_ANYCRLF is defined, this is
+ changed so that backslash-R matches only CR, LF, or CRLF. The build- time
+ default can be overridden by the user of PCRE at runtime. On systems that
+ support it, "configure" can be used to override the default. */
+/* #undef BSR_ANYCRLF */
+
/* If you are compiling for a system that uses EBCDIC instead of ASCII
character codes, define this macro as 1. On systems that can use
"configure", this can be done via --enable-ebcdic. */
@@ -40,6 +51,11 @@ them both to 0; an emulation function will be used. */
/* Define to 1 if you have the <bits/type_traits.h> header file. */
/* #undef HAVE_BITS_TYPE_TRAITS_H */
+/* Define to 1 if you have the <bzlib.h> header file. */
+#ifndef HAVE_BZLIB_H
+#define HAVE_BZLIB_H 1
+#endif
+
/* Define to 1 if you have the <dirent.h> header file. */
#ifndef HAVE_DIRENT_H
#define HAVE_DIRENT_H 1
@@ -75,6 +91,16 @@ them both to 0; an emulation function will be used. */
#define HAVE_MEMORY_H 1
#endif
+/* Define to 1 if you have the <readline/history.h> header file. */
+#ifndef HAVE_READLINE_HISTORY_H
+#define HAVE_READLINE_HISTORY_H 1
+#endif
+
+/* Define to 1 if you have the <readline/readline.h> header file. */
+#ifndef HAVE_READLINE_READLINE_H
+#define HAVE_READLINE_READLINE_H 1
+#endif
+
/* Define to 1 if you have the <stdint.h> header file. */
#ifndef HAVE_STDINT_H
#define HAVE_STDINT_H 1
@@ -141,6 +167,14 @@ them both to 0; an emulation function will be used. */
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
+/* Define to 1 if you have the <zlib.h> header file. */
+#ifndef HAVE_ZLIB_H
+#define HAVE_ZLIB_H 1
+#endif
+
+/* Define to 1 if you have the `_strtoi64' function. */
+/* #undef HAVE__STRTOI64 */
+
/* The value of LINK_SIZE determines the number of bytes used to store links
as offsets within the compiled regex. The default is 2, which allows for
compiled patterns up to 64K long. This covers the vast majority of cases.
@@ -189,10 +223,10 @@ them both to 0; an emulation function will be used. */
#define MAX_NAME_SIZE 32
#endif
-/* The value of NEWLINE determines the newline character sequence. On
- Unix-like systems, "configure" can be used to override the default, which
- is 10. The possible values are 10 (LF), 13 (CR), 3338 (CRLF), -1 (ANY), or
- -2 (ANYCRLF). */
+/* The value of NEWLINE determines the newline character sequence. On systems
+ that support it, "configure" can be used to override the default, which is
+ 10. The possible values are 10 (LF), 13 (CR), 3338 (CRLF), -1 (ANY), or -2
+ (ANYCRLF). */
#ifndef NEWLINE
#define NEWLINE 10
#endif
@@ -217,13 +251,13 @@ them both to 0; an emulation function will be used. */
#define PACKAGE_NAME "PCRE"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE 7.3"
+#define PACKAGE_STRING "PCRE 7.6"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "7.3"
+#define PACKAGE_VERSION "7.6"
/* If you are compiling for a system other than a Unix-like system or
@@ -257,6 +291,17 @@ them both to 0; an emulation function will be used. */
#define STDC_HEADERS 1
#endif
+/* Define to allow pcregrep to be linked with libbz2, so that it is able to
+ handle .bz2 files. */
+/* #undef SUPPORT_LIBBZ2 */
+
+/* Define to allow pcretest to be linked with libreadline. */
+/* #undef SUPPORT_LIBREADLINE */
+
+/* Define to allow pcregrep to be linked with libz, so that it is able to
+ handle .gz files. */
+/* #undef SUPPORT_LIBZ */
+
/* Define to enable support for Unicode properties */
/* #undef SUPPORT_UCP */
@@ -265,7 +310,7 @@ them both to 0; an emulation function will be used. */
/* Version number of package */
#ifndef VERSION
-#define VERSION "7.3"
+#define VERSION "7.6"
#endif
/* Define to empty if `const' does not conform to ANSI C. */
diff --git a/ext/pcre/pcrelib/dftables.c b/ext/pcre/pcrelib/dftables.c
index cf3b21052..63fc7074e 100644
--- a/ext/pcre/pcrelib/dftables.c
+++ b/ext/pcre/pcrelib/dftables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ character tables for PCRE. The tables are built according to the current
locale. Now that pcre_maketables is a function visible to the outside world, we
make use of its code from here in order to be consistent. */
-#include <config.h>
+#include "config.h"
#include <ctype.h>
#include <stdio.h>
@@ -108,7 +108,7 @@ fprintf(f,
"outside this compilation unit might reference this\" and so it will always\n"
"be supplied to the linker. */\n\n"
"#ifdef HAVE_CONFIG_H\n"
- "#include <config.h>\n"
+ "#include \"config.h\"\n"
"#endif\n\n"
"#include \"pcre_internal.h\"\n\n");
fprintf(f,
diff --git a/ext/pcre/pcrelib/doc/pcre.txt b/ext/pcre/pcrelib/doc/pcre.txt
index f924f6de8..9be2c6f36 100644
--- a/ext/pcre/pcrelib/doc/pcre.txt
+++ b/ext/pcre/pcrelib/doc/pcre.txt
@@ -271,19 +271,24 @@ NAME
PCRE BUILD-TIME OPTIONS
This document describes the optional features of PCRE that can be
- selected when the library is compiled. They are all selected, or dese-
- lected, by providing options to the configure script that is run before
- the make command. The complete list of options for configure (which
- includes the standard ones such as the selection of the installation
- directory) can be obtained by running
+ selected when the library is compiled. It assumes use of the configure
+ script, where the optional features are selected or deselected by pro-
+ viding options to configure before running the make command. However,
+ the same options can be selected in both Unix-like and non-Unix-like
+ environments using the GUI facility of CMakeSetup if you are using
+ CMake instead of configure to build PCRE.
+
+ The complete list of options for configure (which includes the standard
+ ones such as the selection of the installation directory) can be
+ obtained by running
./configure --help
- The following sections include descriptions of options whose names
+ The following sections include descriptions of options whose names
begin with --enable or --disable. These settings specify changes to the
- defaults for the configure command. Because of the way that configure
- works, --enable and --disable always come in pairs, so the complemen-
- tary option always exists as well, but as it specifies the default, it
+ defaults for the configure command. Because of the way that configure
+ works, --enable and --disable always come in pairs, so the complemen-
+ tary option always exists as well, but as it specifies the default, it
is not described.
@@ -304,40 +309,40 @@ UTF-8 SUPPORT
--enable-utf8
- to the configure command. Of itself, this does not make PCRE treat
- strings as UTF-8. As well as compiling PCRE with this option, you also
- have have to set the PCRE_UTF8 option when you call the pcre_compile()
+ to the configure command. Of itself, this does not make PCRE treat
+ strings as UTF-8. As well as compiling PCRE with this option, you also
+ have have to set the PCRE_UTF8 option when you call the pcre_compile()
function.
UNICODE CHARACTER PROPERTY SUPPORT
- UTF-8 support allows PCRE to process character values greater than 255
- in the strings that it handles. On its own, however, it does not pro-
+ UTF-8 support allows PCRE to process character values greater than 255
+ in the strings that it handles. On its own, however, it does not pro-
vide any facilities for accessing the properties of such characters. If
- you want to be able to use the pattern escapes \P, \p, and \X, which
+ you want to be able to use the pattern escapes \P, \p, and \X, which
refer to Unicode character properties, you must add
--enable-unicode-properties
- to the configure command. This implies UTF-8 support, even if you have
+ to the configure command. This implies UTF-8 support, even if you have
not explicitly requested it.
- Including Unicode property support adds around 30K of tables to the
- PCRE library. Only the general category properties such as Lu and Nd
+ Including Unicode property support adds around 30K of tables to the
+ PCRE library. Only the general category properties such as Lu and Nd
are supported. Details are given in the pcrepattern documentation.
CODE VALUE OF NEWLINE
- By default, PCRE interprets character 10 (linefeed, LF) as indicating
- the end of a line. This is the normal newline character on Unix-like
+ By default, PCRE interprets character 10 (linefeed, LF) as indicating
+ the end of a line. This is the normal newline character on Unix-like
systems. You can compile PCRE to use character 13 (carriage return, CR)
instead, by adding
--enable-newline-is-cr
- to the configure command. There is also a --enable-newline-is-lf
+ to the configure command. There is also a --enable-newline-is-lf
option, which explicitly specifies linefeed as the newline character.
Alternatively, you can specify that line endings are to be indicated by
@@ -349,22 +354,35 @@ CODE VALUE OF NEWLINE
--enable-newline-is-anycrlf
- which causes PCRE to recognize any of the three sequences CR, LF, or
+ which causes PCRE to recognize any of the three sequences CR, LF, or
CRLF as indicating a line ending. Finally, a fifth option, specified by
--enable-newline-is-any
causes PCRE to recognize any Unicode newline sequence.
- Whatever line ending convention is selected when PCRE is built can be
- overridden when the library functions are called. At build time it is
+ Whatever line ending convention is selected when PCRE is built can be
+ overridden when the library functions are called. At build time it is
conventional to use the standard for your operating system.
+WHAT \R MATCHES
+
+ By default, the sequence \R in a pattern matches any Unicode newline
+ sequence, whatever has been selected as the line ending sequence. If
+ you specify
+
+ --enable-bsr-anycrlf
+
+ the default is changed so that \R matches only CR, LF, or CRLF. What-
+ ever is selected when PCRE is built can be overridden when the library
+ functions are called.
+
+
BUILDING SHARED AND STATIC LIBRARIES
- The PCRE building process uses libtool to build both shared and static
- Unix libraries by default. You can suppress one of these by adding one
+ The PCRE building process uses libtool to build both shared and static
+ Unix libraries by default. You can suppress one of these by adding one
of
--disable-shared
@@ -376,9 +394,9 @@ BUILDING SHARED AND STATIC LIBRARIES
POSIX MALLOC USAGE
When PCRE is called through the POSIX interface (see the pcreposix doc-
- umentation), additional working storage is required for holding the
- pointers to capturing substrings, because PCRE requires three integers
- per substring, whereas the POSIX interface provides only two. If the
+ umentation), additional working storage is required for holding the
+ pointers to capturing substrings, because PCRE requires three integers
+ per substring, whereas the POSIX interface provides only two. If the
number of expected substrings is small, the wrapper function uses space
on the stack, because this is faster than using malloc() for each call.
The default threshold above which the stack is no longer used is 10; it
@@ -391,114 +409,141 @@ POSIX MALLOC USAGE
HANDLING VERY LARGE PATTERNS
- Within a compiled pattern, offset values are used to point from one
- part to another (for example, from an opening parenthesis to an alter-
- nation metacharacter). By default, two-byte values are used for these
- offsets, leading to a maximum size for a compiled pattern of around
- 64K. This is sufficient to handle all but the most gigantic patterns.
- Nevertheless, some people do want to process enormous patterns, so it
- is possible to compile PCRE to use three-byte or four-byte offsets by
+ Within a compiled pattern, offset values are used to point from one
+ part to another (for example, from an opening parenthesis to an alter-
+ nation metacharacter). By default, two-byte values are used for these
+ offsets, leading to a maximum size for a compiled pattern of around
+ 64K. This is sufficient to handle all but the most gigantic patterns.
+ Nevertheless, some people do want to process enormous patterns, so it
+ is possible to compile PCRE to use three-byte or four-byte offsets by
adding a setting such as
--with-link-size=3
- to the configure command. The value given must be 2, 3, or 4. Using
- longer offsets slows down the operation of PCRE because it has to load
+ to the configure command. The value given must be 2, 3, or 4. Using
+ longer offsets slows down the operation of PCRE because it has to load
additional bytes when handling them.
AVOIDING EXCESSIVE STACK USAGE
When matching with the pcre_exec() function, PCRE implements backtrack-
- ing by making recursive calls to an internal function called match().
- In environments where the size of the stack is limited, this can se-
- verely limit PCRE's operation. (The Unix environment does not usually
+ ing by making recursive calls to an internal function called match().
+ In environments where the size of the stack is limited, this can se-
+ verely limit PCRE's operation. (The Unix environment does not usually
suffer from this problem, but it may sometimes be necessary to increase
- the maximum stack size. There is a discussion in the pcrestack docu-
- mentation.) An alternative approach to recursion that uses memory from
- the heap to remember data, instead of using recursive function calls,
- has been implemented to work round the problem of limited stack size.
+ the maximum stack size. There is a discussion in the pcrestack docu-
+ mentation.) An alternative approach to recursion that uses memory from
+ the heap to remember data, instead of using recursive function calls,
+ has been implemented to work round the problem of limited stack size.
If you want to build a version of PCRE that works this way, add
--disable-stack-for-recursion
- to the configure command. With this configuration, PCRE will use the
- pcre_stack_malloc and pcre_stack_free variables to call memory manage-
- ment functions. By default these point to malloc() and free(), but you
+ to the configure command. With this configuration, PCRE will use the
+ pcre_stack_malloc and pcre_stack_free variables to call memory manage-
+ ment functions. By default these point to malloc() and free(), but you
can replace the pointers so that your own functions are used.
- Separate functions are provided rather than using pcre_malloc and
- pcre_free because the usage is very predictable: the block sizes
- requested are always the same, and the blocks are always freed in
- reverse order. A calling program might be able to implement optimized
- functions that perform better than malloc() and free(). PCRE runs
+ Separate functions are provided rather than using pcre_malloc and
+ pcre_free because the usage is very predictable: the block sizes
+ requested are always the same, and the blocks are always freed in
+ reverse order. A calling program might be able to implement optimized
+ functions that perform better than malloc() and free(). PCRE runs
noticeably more slowly when built in this way. This option affects only
- the pcre_exec() function; it is not relevant for the the
+ the pcre_exec() function; it is not relevant for the the
pcre_dfa_exec() function.
LIMITING PCRE RESOURCE USAGE
- Internally, PCRE has a function called match(), which it calls repeat-
- edly (sometimes recursively) when matching a pattern with the
- pcre_exec() function. By controlling the maximum number of times this
- function may be called during a single matching operation, a limit can
- be placed on the resources used by a single call to pcre_exec(). The
- limit can be changed at run time, as described in the pcreapi documen-
- tation. The default is 10 million, but this can be changed by adding a
+ Internally, PCRE has a function called match(), which it calls repeat-
+ edly (sometimes recursively) when matching a pattern with the
+ pcre_exec() function. By controlling the maximum number of times this
+ function may be called during a single matching operation, a limit can
+ be placed on the resources used by a single call to pcre_exec(). The
+ limit can be changed at run time, as described in the pcreapi documen-
+ tation. The default is 10 million, but this can be changed by adding a
setting such as
--with-match-limit=500000
- to the configure command. This setting has no effect on the
+ to the configure command. This setting has no effect on the
pcre_dfa_exec() matching function.
- In some environments it is desirable to limit the depth of recursive
+ In some environments it is desirable to limit the depth of recursive
calls of match() more strictly than the total number of calls, in order
- to restrict the maximum amount of stack (or heap, if --disable-stack-
+ to restrict the maximum amount of stack (or heap, if --disable-stack-
for-recursion is specified) that is used. A second limit controls this;
- it defaults to the value that is set for --with-match-limit, which
- imposes no additional constraints. However, you can set a lower limit
+ it defaults to the value that is set for --with-match-limit, which
+ imposes no additional constraints. However, you can set a lower limit
by adding, for example,
--with-match-limit-recursion=10000
- to the configure command. This value can also be overridden at run
+ to the configure command. This value can also be overridden at run
time.
CREATING CHARACTER TABLES AT BUILD TIME
- PCRE uses fixed tables for processing characters whose code values are
- less than 256. By default, PCRE is built with a set of tables that are
- distributed in the file pcre_chartables.c.dist. These tables are for
+ PCRE uses fixed tables for processing characters whose code values are
+ less than 256. By default, PCRE is built with a set of tables that are
+ distributed in the file pcre_chartables.c.dist. These tables are for
ASCII codes only. If you add
--enable-rebuild-chartables
- to the configure command, the distributed tables are no longer used.
- Instead, a program called dftables is compiled and run. This outputs
+ to the configure command, the distributed tables are no longer used.
+ Instead, a program called dftables is compiled and run. This outputs
the source for new set of tables, created in the default locale of your
C runtime system. (This method of replacing the tables does not work if
- you are cross compiling, because dftables is run on the local host. If
- you need to create alternative tables when cross compiling, you will
+ you are cross compiling, because dftables is run on the local host. If
+ you need to create alternative tables when cross compiling, you will
have to do so "by hand".)
USING EBCDIC CODE
- PCRE assumes by default that it will run in an environment where the
- character code is ASCII (or Unicode, which is a superset of ASCII).
- This is the case for most computer operating systems. PCRE can, how-
+ PCRE assumes by default that it will run in an environment where the
+ character code is ASCII (or Unicode, which is a superset of ASCII).
+ This is the case for most computer operating systems. PCRE can, how-
ever, be compiled to run in an EBCDIC environment by adding
--enable-ebcdic
to the configure command. This setting implies --enable-rebuild-charta-
- bles. You should only use it if you know that you are in an EBCDIC
+ bles. You should only use it if you know that you are in an EBCDIC
environment (for example, an IBM mainframe operating system).
+PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT
+
+ By default, pcregrep reads all files as plain text. You can build it so
+ that it recognizes files whose names end in .gz or .bz2, and reads them
+ with libz or libbz2, respectively, by adding one or both of
+
+ --enable-pcregrep-libz
+ --enable-pcregrep-libbz2
+
+ to the configure command. These options naturally require that the rel-
+ evant libraries are installed on your system. Configuration will fail
+ if they are not.
+
+
+PCRETEST OPTION FOR LIBREADLINE SUPPORT
+
+ If you add
+
+ --enable-pcretest-libreadline
+
+ to the configure command, pcretest is linked with the libreadline
+ library, and when its input is from a terminal, it reads it using the
+ readline() function. This provides line-editing and history facilities.
+ Note that libreadline is GPL-licenced, so if you distribute a binary of
+ pcretest linked in this way, there may be licensing issues.
+
+
SEE ALSO
pcreapi(3), pcre_config(3).
@@ -513,7 +558,7 @@ AUTHOR
REVISION
- Last updated: 30 July 2007
+ Last updated: 18 December 2007
Copyright (c) 1997-2007 University of Cambridge.
------------------------------------------------------------------------------
@@ -824,7 +869,7 @@ PCRE API OVERVIEW
a Perl-compatible manner. A sample program that demonstrates the sim-
plest way of using them is provided in the file called pcredemo.c in
the source distribution. The pcresample documentation describes how to
- run it.
+ compile and run it.
A second matching function, pcre_dfa_exec(), which is not Perl-compati-
ble, is also provided. This uses a different algorithm for the match-
@@ -919,18 +964,21 @@ NEWLINES
dollar metacharacters, the handling of #-comments in /x mode, and, when
CRLF is a recognized line ending sequence, the match position advance-
ment for a non-anchored pattern. There is more detail about this in the
- section on pcre_exec() options below. The choice of newline convention
- does not affect the interpretation of the \n or \r escape sequences.
+ section on pcre_exec() options below.
+
+ The choice of newline convention does not affect the interpretation of
+ the \n or \r escape sequences, nor does it affect what \R matches,
+ which is controlled in a similar way, but by separate options.
MULTITHREADING
- The PCRE functions can be used in multi-threading applications, with
+ The PCRE functions can be used in multi-threading applications, with
the proviso that the memory management functions pointed to by
pcre_malloc, pcre_free, pcre_stack_malloc, and pcre_stack_free, and the
callout function pointed to by pcre_callout, are shared by all threads.
- The compiled form of a regular expression is not altered during match-
+ The compiled form of a regular expression is not altered during match-
ing, so the same compiled pattern can safely be used by several threads
at once.
@@ -938,10 +986,10 @@ MULTITHREADING
SAVING PRECOMPILED PATTERNS FOR LATER USE
The compiled form of a regular expression can be saved and re-used at a
- later time, possibly by a different program, and even on a host other
- than the one on which it was compiled. Details are given in the
- pcreprecompile documentation. However, compiling a regular expression
- with one version of PCRE for use with a different version is not guar-
+ later time, possibly by a different program, and even on a host other
+ than the one on which it was compiled. Details are given in the
+ pcreprecompile documentation. However, compiling a regular expression
+ with one version of PCRE for use with a different version is not guar-
anteed to work and may cause crashes.
@@ -949,69 +997,77 @@ CHECKING BUILD-TIME OPTIONS
int pcre_config(int what, void *where);
- The function pcre_config() makes it possible for a PCRE client to dis-
+ The function pcre_config() makes it possible for a PCRE client to dis-
cover which optional features have been compiled into the PCRE library.
- The pcrebuild documentation has more details about these optional fea-
+ The pcrebuild documentation has more details about these optional fea-
tures.
- The first argument for pcre_config() is an integer, specifying which
+ The first argument for pcre_config() is an integer, specifying which
information is required; the second argument is a pointer to a variable
- into which the information is placed. The following information is
+ into which the information is placed. The following information is
available:
PCRE_CONFIG_UTF8
- The output is an integer that is set to one if UTF-8 support is avail-
+ The output is an integer that is set to one if UTF-8 support is avail-
able; otherwise it is set to zero.
PCRE_CONFIG_UNICODE_PROPERTIES
- The output is an integer that is set to one if support for Unicode
+ The output is an integer that is set to one if support for Unicode
character properties is available; otherwise it is set to zero.
PCRE_CONFIG_NEWLINE
- The output is an integer whose value specifies the default character
- sequence that is recognized as meaning "newline". The four values that
+ The output is an integer whose value specifies the default character
+ sequence that is recognized as meaning "newline". The four values that
are supported are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF,
- and -1 for ANY. The default should normally be the standard sequence
+ and -1 for ANY. The default should normally be the standard sequence
for your operating system.
+ PCRE_CONFIG_BSR
+
+ The output is an integer whose value indicates what character sequences
+ the \R escape sequence matches by default. A value of 0 means that \R
+ matches any Unicode line ending sequence; a value of 1 means that \R
+ matches only CR, LF, or CRLF. The default can be overridden when a pat-
+ tern is compiled or matched.
+
PCRE_CONFIG_LINK_SIZE
- The output is an integer that contains the number of bytes used for
+ The output is an integer that contains the number of bytes used for
internal linkage in compiled regular expressions. The value is 2, 3, or
- 4. Larger values allow larger regular expressions to be compiled, at
- the expense of slower matching. The default value of 2 is sufficient
- for all but the most massive patterns, since it allows the compiled
+ 4. Larger values allow larger regular expressions to be compiled, at
+ the expense of slower matching. The default value of 2 is sufficient
+ for all but the most massive patterns, since it allows the compiled
pattern to be up to 64K in size.
PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
- The output is an integer that contains the threshold above which the
- POSIX interface uses malloc() for output vectors. Further details are
+ The output is an integer that contains the threshold above which the
+ POSIX interface uses malloc() for output vectors. Further details are
given in the pcreposix documentation.
PCRE_CONFIG_MATCH_LIMIT
The output is an integer that gives the default limit for the number of
- internal matching function calls in a pcre_exec() execution. Further
+ internal matching function calls in a pcre_exec() execution. Further
details are given with pcre_exec() below.
PCRE_CONFIG_MATCH_LIMIT_RECURSION
- The output is an integer that gives the default limit for the depth of
- recursion when calling the internal matching function in a pcre_exec()
+ The output is an integer that gives the default limit for the depth of
+ recursion when calling the internal matching function in a pcre_exec()
execution. Further details are given with pcre_exec() below.
PCRE_CONFIG_STACKRECURSE
- The output is an integer that is set to one if internal recursion when
+ The output is an integer that is set to one if internal recursion when
running pcre_exec() is implemented by recursive function calls that use
- the stack to remember their state. This is the usual way that PCRE is
+ the stack to remember their state. This is the usual way that PCRE is
compiled. The output is zero if PCRE was compiled to use blocks of data
- on the heap instead of recursive function calls. In this case,
- pcre_stack_malloc and pcre_stack_free are called to manage memory
+ on the heap instead of recursive function calls. In this case,
+ pcre_stack_malloc and pcre_stack_free are called to manage memory
blocks on the heap, thus avoiding the use of the stack.
@@ -1028,55 +1084,55 @@ COMPILING A PATTERN
Either of the functions pcre_compile() or pcre_compile2() can be called
to compile a pattern into an internal form. The only difference between
- the two interfaces is that pcre_compile2() has an additional argument,
+ the two interfaces is that pcre_compile2() has an additional argument,
errorcodeptr, via which a numerical error code can be returned.
The pattern is a C string terminated by a binary zero, and is passed in
- the pattern argument. A pointer to a single block of memory that is
- obtained via pcre_malloc is returned. This contains the compiled code
+ the pattern argument. A pointer to a single block of memory that is
+ obtained via pcre_malloc is returned. This contains the compiled code
and related data. The pcre type is defined for the returned block; this
is a typedef for a structure whose contents are not externally defined.
It is up to the caller to free the memory (via pcre_free) when it is no
longer required.
- Although the compiled code of a PCRE regex is relocatable, that is, it
+ Although the compiled code of a PCRE regex is relocatable, that is, it
does not depend on memory location, the complete pcre data block is not
- fully relocatable, because it may contain a copy of the tableptr argu-
+ fully relocatable, because it may contain a copy of the tableptr argu-
ment, which is an address (see below).
The options argument contains various bit settings that affect the com-
- pilation. It should be zero if no options are required. The available
- options are described below. Some of them, in particular, those that
- are compatible with Perl, can also be set and unset from within the
- pattern (see the detailed description in the pcrepattern documenta-
- tion). For these options, the contents of the options argument speci-
- fies their initial settings at the start of compilation and execution.
- The PCRE_ANCHORED and PCRE_NEWLINE_xxx options can be set at the time
+ pilation. It should be zero if no options are required. The available
+ options are described below. Some of them, in particular, those that
+ are compatible with Perl, can also be set and unset from within the
+ pattern (see the detailed description in the pcrepattern documenta-
+ tion). For these options, the contents of the options argument speci-
+ fies their initial settings at the start of compilation and execution.
+ The PCRE_ANCHORED and PCRE_NEWLINE_xxx options can be set at the time
of matching as well as at compile time.
If errptr is NULL, pcre_compile() returns NULL immediately. Otherwise,
- if compilation of a pattern fails, pcre_compile() returns NULL, and
+ if compilation of a pattern fails, pcre_compile() returns NULL, and
sets the variable pointed to by errptr to point to a textual error mes-
sage. This is a static string that is part of the library. You must not
try to free it. The offset from the start of the pattern to the charac-
ter where the error was discovered is placed in the variable pointed to
- by erroffset, which must not be NULL. If it is, an immediate error is
+ by erroffset, which must not be NULL. If it is, an immediate error is
given.
- If pcre_compile2() is used instead of pcre_compile(), and the error-
- codeptr argument is not NULL, a non-zero error code number is returned
- via this argument in the event of an error. This is in addition to the
+ If pcre_compile2() is used instead of pcre_compile(), and the error-
+ codeptr argument is not NULL, a non-zero error code number is returned
+ via this argument in the event of an error. This is in addition to the
textual error message. Error codes and messages are listed below.
- If the final argument, tableptr, is NULL, PCRE uses a default set of
- character tables that are built when PCRE is compiled, using the
- default C locale. Otherwise, tableptr must be an address that is the
- result of a call to pcre_maketables(). This value is stored with the
- compiled pattern, and used again by pcre_exec(), unless another table
+ If the final argument, tableptr, is NULL, PCRE uses a default set of
+ character tables that are built when PCRE is compiled, using the
+ default C locale. Otherwise, tableptr must be an address that is the
+ result of a call to pcre_maketables(). This value is stored with the
+ compiled pattern, and used again by pcre_exec(), unless another table
pointer is passed to it. For more discussion, see the section on locale
support below.
- This code fragment shows a typical straightforward call to pcre_com-
+ This code fragment shows a typical straightforward call to pcre_com-
pile():
pcre *re;
@@ -1089,111 +1145,120 @@ COMPILING A PATTERN
&erroffset, /* for error offset */
NULL); /* use default character tables */
- The following names for option bits are defined in the pcre.h header
+ The following names for option bits are defined in the pcre.h header
file:
PCRE_ANCHORED
If this bit is set, the pattern is forced to be "anchored", that is, it
- is constrained to match only at the first matching point in the string
- that is being searched (the "subject string"). This effect can also be
- achieved by appropriate constructs in the pattern itself, which is the
+ is constrained to match only at the first matching point in the string
+ that is being searched (the "subject string"). This effect can also be
+ achieved by appropriate constructs in the pattern itself, which is the
only way to do it in Perl.
PCRE_AUTO_CALLOUT
If this bit is set, pcre_compile() automatically inserts callout items,
- all with number 255, before each pattern item. For discussion of the
+ all with number 255, before each pattern item. For discussion of the
callout facility, see the pcrecallout documentation.
+ PCRE_BSR_ANYCRLF
+ PCRE_BSR_UNICODE
+
+ These options (which are mutually exclusive) control what the \R escape
+ sequence matches. The choice is either to match only CR, LF, or CRLF,
+ or to match any Unicode newline sequence. The default is specified when
+ PCRE is built. It can be overridden from within the pattern, or by set-
+ ting an option when a compiled pattern is matched.
+
PCRE_CASELESS
- If this bit is set, letters in the pattern match both upper and lower
- case letters. It is equivalent to Perl's /i option, and it can be
- changed within a pattern by a (?i) option setting. In UTF-8 mode, PCRE
- always understands the concept of case for characters whose values are
- less than 128, so caseless matching is always possible. For characters
- with higher values, the concept of case is supported if PCRE is com-
- piled with Unicode property support, but not otherwise. If you want to
- use caseless matching for characters 128 and above, you must ensure
- that PCRE is compiled with Unicode property support as well as with
+ If this bit is set, letters in the pattern match both upper and lower
+ case letters. It is equivalent to Perl's /i option, and it can be
+ changed within a pattern by a (?i) option setting. In UTF-8 mode, PCRE
+ always understands the concept of case for characters whose values are
+ less than 128, so caseless matching is always possible. For characters
+ with higher values, the concept of case is supported if PCRE is com-
+ piled with Unicode property support, but not otherwise. If you want to
+ use caseless matching for characters 128 and above, you must ensure
+ that PCRE is compiled with Unicode property support as well as with
UTF-8 support.
PCRE_DOLLAR_ENDONLY
- If this bit is set, a dollar metacharacter in the pattern matches only
- at the end of the subject string. Without this option, a dollar also
- matches immediately before a newline at the end of the string (but not
- before any other newlines). The PCRE_DOLLAR_ENDONLY option is ignored
- if PCRE_MULTILINE is set. There is no equivalent to this option in
+ If this bit is set, a dollar metacharacter in the pattern matches only
+ at the end of the subject string. Without this option, a dollar also
+ matches immediately before a newline at the end of the string (but not
+ before any other newlines). The PCRE_DOLLAR_ENDONLY option is ignored
+ if PCRE_MULTILINE is set. There is no equivalent to this option in
Perl, and no way to set it within a pattern.
PCRE_DOTALL
If this bit is set, a dot metacharater in the pattern matches all char-
- acters, including those that indicate newline. Without it, a dot does
- not match when the current position is at a newline. This option is
- equivalent to Perl's /s option, and it can be changed within a pattern
- by a (?s) option setting. A negative class such as [^a] always matches
+ acters, including those that indicate newline. Without it, a dot does
+ not match when the current position is at a newline. This option is
+ equivalent to Perl's /s option, and it can be changed within a pattern
+ by a (?s) option setting. A negative class such as [^a] always matches
newline characters, independent of the setting of this option.
PCRE_DUPNAMES
- If this bit is set, names used to identify capturing subpatterns need
+ If this bit is set, names used to identify capturing subpatterns need
not be unique. This can be helpful for certain types of pattern when it
- is known that only one instance of the named subpattern can ever be
- matched. There are more details of named subpatterns below; see also
+ is known that only one instance of the named subpattern can ever be
+ matched. There are more details of named subpatterns below; see also
the pcrepattern documentation.
PCRE_EXTENDED
- If this bit is set, whitespace data characters in the pattern are
+ If this bit is set, whitespace data characters in the pattern are
totally ignored except when escaped or inside a character class. White-
space does not include the VT character (code 11). In addition, charac-
ters between an unescaped # outside a character class and the next new-
- line, inclusive, are also ignored. This is equivalent to Perl's /x
- option, and it can be changed within a pattern by a (?x) option set-
+ line, inclusive, are also ignored. This is equivalent to Perl's /x
+ option, and it can be changed within a pattern by a (?x) option set-
ting.
- This option makes it possible to include comments inside complicated
- patterns. Note, however, that this applies only to data characters.
- Whitespace characters may never appear within special character
- sequences in a pattern, for example within the sequence (?( which
+ This option makes it possible to include comments inside complicated
+ patterns. Note, however, that this applies only to data characters.
+ Whitespace characters may never appear within special character
+ sequences in a pattern, for example within the sequence (?( which
introduces a conditional subpattern.
PCRE_EXTRA
- This option was invented in order to turn on additional functionality
- of PCRE that is incompatible with Perl, but it is currently of very
- little use. When set, any backslash in a pattern that is followed by a
- letter that has no special meaning causes an error, thus reserving
- these combinations for future expansion. By default, as in Perl, a
- backslash followed by a letter with no special meaning is treated as a
- literal. (Perl can, however, be persuaded to give a warning for this.)
- There are at present no other features controlled by this option. It
+ This option was invented in order to turn on additional functionality
+ of PCRE that is incompatible with Perl, but it is currently of very
+ little use. When set, any backslash in a pattern that is followed by a
+ letter that has no special meaning causes an error, thus reserving
+ these combinations for future expansion. By default, as in Perl, a
+ backslash followed by a letter with no special meaning is treated as a
+ literal. (Perl can, however, be persuaded to give a warning for this.)
+ There are at present no other features controlled by this option. It
can also be set by a (?X) option setting within a pattern.
PCRE_FIRSTLINE
- If this option is set, an unanchored pattern is required to match
- before or at the first newline in the subject string, though the
+ If this option is set, an unanchored pattern is required to match
+ before or at the first newline in the subject string, though the
matched text may continue over the newline.
PCRE_MULTILINE
- By default, PCRE treats the subject string as consisting of a single
- line of characters (even if it actually contains newlines). The "start
- of line" metacharacter (^) matches only at the start of the string,
- while the "end of line" metacharacter ($) matches only at the end of
+ By default, PCRE treats the subject string as consisting of a single
+ line of characters (even if it actually contains newlines). The "start
+ of line" metacharacter (^) matches only at the start of the string,
+ while the "end of line" metacharacter ($) matches only at the end of
the string, or before a terminating newline (unless PCRE_DOLLAR_ENDONLY
is set). This is the same as Perl.
- When PCRE_MULTILINE it is set, the "start of line" and "end of line"
- constructs match immediately following or immediately before internal
- newlines in the subject string, respectively, as well as at the very
- start and end. This is equivalent to Perl's /m option, and it can be
+ When PCRE_MULTILINE it is set, the "start of line" and "end of line"
+ constructs match immediately following or immediately before internal
+ newlines in the subject string, respectively, as well as at the very
+ start and end. This is equivalent to Perl's /m option, and it can be
changed within a pattern by a (?m) option setting. If there are no new-
- lines in a subject string, or no occurrences of ^ or $ in a pattern,
+ lines in a subject string, or no occurrences of ^ or $ in a pattern,
setting PCRE_MULTILINE has no effect.
PCRE_NEWLINE_CR
@@ -1202,81 +1267,81 @@ COMPILING A PATTERN
PCRE_NEWLINE_ANYCRLF
PCRE_NEWLINE_ANY
- These options override the default newline definition that was chosen
- when PCRE was built. Setting the first or the second specifies that a
- newline is indicated by a single character (CR or LF, respectively).
- Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the
- two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies
+ These options override the default newline definition that was chosen
+ when PCRE was built. Setting the first or the second specifies that a
+ newline is indicated by a single character (CR or LF, respectively).
+ Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the
+ two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies
that any of the three preceding sequences should be recognized. Setting
- PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be
+ PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be
recognized. The Unicode newline sequences are the three just mentioned,
- plus the single characters VT (vertical tab, U+000B), FF (formfeed,
- U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
- (paragraph separator, U+2029). The last two are recognized only in
+ plus the single characters VT (vertical tab, U+000B), FF (formfeed,
+ U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
+ (paragraph separator, U+2029). The last two are recognized only in
UTF-8 mode.
- The newline setting in the options word uses three bits that are
+ The newline setting in the options word uses three bits that are
treated as a number, giving eight possibilities. Currently only six are
- used (default plus the five values above). This means that if you set
- more than one newline option, the combination may or may not be sensi-
+ used (default plus the five values above). This means that if you set
+ more than one newline option, the combination may or may not be sensi-
ble. For example, PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to
- PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and
+ PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and
cause an error.
- The only time that a line break is specially recognized when compiling
- a pattern is if PCRE_EXTENDED is set, and an unescaped # outside a
- character class is encountered. This indicates a comment that lasts
- until after the next line break sequence. In other circumstances, line
- break sequences are treated as literal data, except that in
+ The only time that a line break is specially recognized when compiling
+ a pattern is if PCRE_EXTENDED is set, and an unescaped # outside a
+ character class is encountered. This indicates a comment that lasts
+ until after the next line break sequence. In other circumstances, line
+ break sequences are treated as literal data, except that in
PCRE_EXTENDED mode, both CR and LF are treated as whitespace characters
and are therefore ignored.
The newline option that is set at compile time becomes the default that
- is used for pcre_exec() and pcre_dfa_exec(), but it can be overridden.
+ is used for pcre_exec() and pcre_dfa_exec(), but it can be overridden.
PCRE_NO_AUTO_CAPTURE
If this option is set, it disables the use of numbered capturing paren-
- theses in the pattern. Any opening parenthesis that is not followed by
- ? behaves as if it were followed by ?: but named parentheses can still
- be used for capturing (and they acquire numbers in the usual way).
+ theses in the pattern. Any opening parenthesis that is not followed by
+ ? behaves as if it were followed by ?: but named parentheses can still
+ be used for capturing (and they acquire numbers in the usual way).
There is no equivalent of this option in Perl.
PCRE_UNGREEDY
- This option inverts the "greediness" of the quantifiers so that they
- are not greedy by default, but become greedy if followed by "?". It is
- not compatible with Perl. It can also be set by a (?U) option setting
+ This option inverts the "greediness" of the quantifiers so that they
+ are not greedy by default, but become greedy if followed by "?". It is
+ not compatible with Perl. It can also be set by a (?U) option setting
within the pattern.
PCRE_UTF8
- This option causes PCRE to regard both the pattern and the subject as
- strings of UTF-8 characters instead of single-byte character strings.
- However, it is available only when PCRE is built to include UTF-8 sup-
- port. If not, the use of this option provokes an error. Details of how
- this option changes the behaviour of PCRE are given in the section on
+ This option causes PCRE to regard both the pattern and the subject as
+ strings of UTF-8 characters instead of single-byte character strings.
+ However, it is available only when PCRE is built to include UTF-8 sup-
+ port. If not, the use of this option provokes an error. Details of how
+ this option changes the behaviour of PCRE are given in the section on
UTF-8 support in the main pcre page.
PCRE_NO_UTF8_CHECK
When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is
- automatically checked. There is a discussion about the validity of
- UTF-8 strings in the main pcre page. If an invalid UTF-8 sequence of
- bytes is found, pcre_compile() returns an error. If you already know
+ automatically checked. There is a discussion about the validity of
+ UTF-8 strings in the main pcre page. If an invalid UTF-8 sequence of
+ bytes is found, pcre_compile() returns an error. If you already know
that your pattern is valid, and you want to skip this check for perfor-
- mance reasons, you can set the PCRE_NO_UTF8_CHECK option. When it is
- set, the effect of passing an invalid UTF-8 string as a pattern is
- undefined. It may cause your program to crash. Note that this option
- can also be passed to pcre_exec() and pcre_dfa_exec(), to suppress the
+ mance reasons, you can set the PCRE_NO_UTF8_CHECK option. When it is
+ set, the effect of passing an invalid UTF-8 string as a pattern is
+ undefined. It may cause your program to crash. Note that this option
+ can also be passed to pcre_exec() and pcre_dfa_exec(), to suppress the
UTF-8 validity checking of subject strings.
COMPILATION ERROR CODES
- The following table lists the error codes than may be returned by
- pcre_compile2(), along with the error messages that may be returned by
- both compiling functions. As PCRE has developed, some error codes have
+ The following table lists the error codes than may be returned by
+ pcre_compile2(), along with the error messages that may be returned by
+ both compiling functions. As PCRE has developed, some error codes have
fallen out of use. To avoid confusion, they have not been re-used.
0 no error
@@ -1291,7 +1356,7 @@ COMPILATION ERROR CODES
9 nothing to repeat
10 [this code is not in use]
11 internal error: unexpected repeat
- 12 unrecognized character after (?
+ 12 unrecognized character after (? or (?-
13 POSIX named classes are supported only within a class
14 missing )
15 reference to non-existent subpattern
@@ -1299,7 +1364,7 @@ COMPILATION ERROR CODES
17 unknown option bit(s) set
18 missing ) after comment
19 [this code is not in use]
- 20 regular expression too large
+ 20 regular expression is too large
21 failed to get memory
22 unmatched parentheses
23 internal error: code overflow
@@ -1328,18 +1393,26 @@ COMPILATION ERROR CODES
46 malformed \P or \p sequence
47 unknown property name after \P or \p
48 subpattern name is too long (maximum 32 characters)
- 49 too many named subpatterns (maximum 10,000)
+ 49 too many named subpatterns (maximum 10000)
50 [this code is not in use]
51 octal value is greater than \377 (not in UTF-8 mode)
52 internal error: overran compiling workspace
- 53 internal error: previously-checked referenced subpattern not
+ 53 internal error: previously-checked referenced subpattern not
found
54 DEFINE group contains more than one branch
55 repeating a DEFINE group is not allowed
- 56 inconsistent NEWLINE options"
+ 56 inconsistent NEWLINE options
57 \g is not followed by a braced name or an optionally braced
non-zero number
58 (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number
+ 59 (*VERB) with an argument is not supported
+ 60 (*VERB) not recognized
+ 61 number is too big
+ 62 subpattern name expected
+ 63 digit expected after (?+
+
+ The numbers 32 and 10000 in errors 48 and 49 are defaults; different
+ values may be used if the limits were changed when PCRE was built.
STUDYING A PATTERN
@@ -1532,21 +1605,22 @@ INFORMATION ABOUT A PATTERN
Return 1 if the pattern contains any explicit matches for CR or LF
characters, otherwise 0. The fourth argument should point to an int
- variable.
+ variable. An explicit match is either a literal CR or LF character, or
+ \r or \n.
PCRE_INFO_JCHANGED
- Return 1 if the (?J) option setting is used in the pattern, otherwise
- 0. The fourth argument should point to an int variable. The (?J) inter-
- nal option setting changes the local PCRE_DUPNAMES option.
+ Return 1 if the (?J) or (?-J) option setting is used in the pattern,
+ otherwise 0. The fourth argument should point to an int variable. (?J)
+ and (?-J) set and unset the local PCRE_DUPNAMES option, respectively.
PCRE_INFO_LASTLITERAL
- Return the value of the rightmost literal byte that must exist in any
- matched string, other than at its start, if such a byte has been
+ Return the value of the rightmost literal byte that must exist in any
+ matched string, other than at its start, if such a byte has been
recorded. The fourth argument should point to an int variable. If there
- is no such byte, -1 is returned. For anchored patterns, a last literal
- byte is recorded only if it follows something of variable length. For
+ is no such byte, -1 is returned. For anchored patterns, a last literal
+ byte is recorded only if it follows something of variable length. For
example, for the pattern /^a\d+z\d+/ the returned value is "z", but for
/^a\dz\d/ the returned value is -1.
@@ -1554,34 +1628,34 @@ INFORMATION ABOUT A PATTERN
PCRE_INFO_NAMEENTRYSIZE
PCRE_INFO_NAMETABLE
- PCRE supports the use of named as well as numbered capturing parenthe-
- ses. The names are just an additional way of identifying the parenthe-
+ PCRE supports the use of named as well as numbered capturing parenthe-
+ ses. The names are just an additional way of identifying the parenthe-
ses, which still acquire numbers. Several convenience functions such as
- pcre_get_named_substring() are provided for extracting captured sub-
- strings by name. It is also possible to extract the data directly, by
- first converting the name to a number in order to access the correct
+ pcre_get_named_substring() are provided for extracting captured sub-
+ strings by name. It is also possible to extract the data directly, by
+ first converting the name to a number in order to access the correct
pointers in the output vector (described with pcre_exec() below). To do
- the conversion, you need to use the name-to-number map, which is
+ the conversion, you need to use the name-to-number map, which is
described by these three values.
The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT
gives the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size
- of each entry; both of these return an int value. The entry size
- depends on the length of the longest name. PCRE_INFO_NAMETABLE returns
- a pointer to the first entry of the table (a pointer to char). The
+ of each entry; both of these return an int value. The entry size
+ depends on the length of the longest name. PCRE_INFO_NAMETABLE returns
+ a pointer to the first entry of the table (a pointer to char). The
first two bytes of each entry are the number of the capturing parenthe-
- sis, most significant byte first. The rest of the entry is the corre-
- sponding name, zero terminated. The names are in alphabetical order.
+ sis, most significant byte first. The rest of the entry is the corre-
+ sponding name, zero terminated. The names are in alphabetical order.
When PCRE_DUPNAMES is set, duplicate names are in order of their paren-
- theses numbers. For example, consider the following pattern (assume
- PCRE_EXTENDED is set, so white space - including newlines - is
+ theses numbers. For example, consider the following pattern (assume
+ PCRE_EXTENDED is set, so white space - including newlines - is
ignored):
(?<date> (?<year>(\d\d)?\d\d) -
(?<month>\d\d) - (?<day>\d\d) )
- There are four named subpatterns, so the table has four entries, and
- each entry in the table is eight bytes long. The table is as follows,
+ There are four named subpatterns, so the table has four entries, and
+ each entry in the table is eight bytes long. The table is as follows,
with non-printing bytes shows in hexadecimal, and undefined bytes shown
as ??:
@@ -1590,29 +1664,29 @@ INFORMATION ABOUT A PATTERN
00 04 m o n t h 00
00 02 y e a r 00 ??
- When writing code to extract data from named subpatterns using the
- name-to-number map, remember that the length of the entries is likely
+ When writing code to extract data from named subpatterns using the
+ name-to-number map, remember that the length of the entries is likely
to be different for each compiled pattern.
PCRE_INFO_OKPARTIAL
- Return 1 if the pattern can be used for partial matching, otherwise 0.
- The fourth argument should point to an int variable. The pcrepartial
- documentation lists the restrictions that apply to patterns when par-
+ Return 1 if the pattern can be used for partial matching, otherwise 0.
+ The fourth argument should point to an int variable. The pcrepartial
+ documentation lists the restrictions that apply to patterns when par-
tial matching is used.
PCRE_INFO_OPTIONS
- Return a copy of the options with which the pattern was compiled. The
- fourth argument should point to an unsigned long int variable. These
+ Return a copy of the options with which the pattern was compiled. The
+ fourth argument should point to an unsigned long int variable. These
option bits are those specified in the call to pcre_compile(), modified
by any top-level option settings at the start of the pattern itself. In
- other words, they are the options that will be in force when matching
- starts. For example, if the pattern /(?im)abc(?-i)d/ is compiled with
- the PCRE_EXTENDED option, the result is PCRE_CASELESS, PCRE_MULTILINE,
+ other words, they are the options that will be in force when matching
+ starts. For example, if the pattern /(?im)abc(?-i)d/ is compiled with
+ the PCRE_EXTENDED option, the result is PCRE_CASELESS, PCRE_MULTILINE,
and PCRE_EXTENDED.
- A pattern is automatically anchored by PCRE if all of its top-level
+ A pattern is automatically anchored by PCRE if all of its top-level
alternatives begin with one of the following:
^ unless PCRE_MULTILINE is set
@@ -1626,7 +1700,7 @@ INFORMATION ABOUT A PATTERN
PCRE_INFO_SIZE
- Return the size of the compiled pattern, that is, the value that was
+ Return the size of the compiled pattern, that is, the value that was
passed as the argument to pcre_malloc() when PCRE was getting memory in
which to place the compiled data. The fourth argument should point to a
size_t variable.
@@ -1634,9 +1708,9 @@ INFORMATION ABOUT A PATTERN
PCRE_INFO_STUDYSIZE
Return the size of the data block pointed to by the study_data field in
- a pcre_extra block. That is, it is the value that was passed to
+ a pcre_extra block. That is, it is the value that was passed to
pcre_malloc() when PCRE was getting memory into which to place the data
- created by pcre_study(). The fourth argument should point to a size_t
+ created by pcre_study(). The fourth argument should point to a size_t
variable.
@@ -1644,21 +1718,21 @@ OBSOLETE INFO FUNCTION
int pcre_info(const pcre *code, int *optptr, int *firstcharptr);
- The pcre_info() function is now obsolete because its interface is too
- restrictive to return all the available data about a compiled pattern.
- New programs should use pcre_fullinfo() instead. The yield of
- pcre_info() is the number of capturing subpatterns, or one of the fol-
+ The pcre_info() function is now obsolete because its interface is too
+ restrictive to return all the available data about a compiled pattern.
+ New programs should use pcre_fullinfo() instead. The yield of
+ pcre_info() is the number of capturing subpatterns, or one of the fol-
lowing negative numbers:
PCRE_ERROR_NULL the argument code was NULL
PCRE_ERROR_BADMAGIC the "magic number" was not found
- If the optptr argument is not NULL, a copy of the options with which
- the pattern was compiled is placed in the integer it points to (see
+ If the optptr argument is not NULL, a copy of the options with which
+ the pattern was compiled is placed in the integer it points to (see
PCRE_INFO_OPTIONS above).
- If the pattern is not anchored and the firstcharptr argument is not
- NULL, it is used to pass back information about the first character of
+ If the pattern is not anchored and the firstcharptr argument is not
+ NULL, it is used to pass back information about the first character of
any matched string (see PCRE_INFO_FIRSTBYTE above).
@@ -1666,21 +1740,21 @@ REFERENCE COUNTS
int pcre_refcount(pcre *code, int adjust);
- The pcre_refcount() function is used to maintain a reference count in
+ The pcre_refcount() function is used to maintain a reference count in
the data block that contains a compiled pattern. It is provided for the
- benefit of applications that operate in an object-oriented manner,
+ benefit of applications that operate in an object-oriented manner,
where different parts of the application may be using the same compiled
pattern, but you want to free the block when they are all done.
When a pattern is compiled, the reference count field is initialized to
- zero. It is changed only by calling this function, whose action is to
- add the adjust value (which may be positive or negative) to it. The
+ zero. It is changed only by calling this function, whose action is to
+ add the adjust value (which may be positive or negative) to it. The
yield of the function is the new value. However, the value of the count
- is constrained to lie between 0 and 65535, inclusive. If the new value
+ is constrained to lie between 0 and 65535, inclusive. If the new value
is outside these limits, it is forced to the appropriate limit value.
- Except when it is zero, the reference count is not correctly preserved
- if a pattern is compiled on one host and then transferred to a host
+ Except when it is zero, the reference count is not correctly preserved
+ if a pattern is compiled on one host and then transferred to a host
whose byte-order is different. (This seems a highly unlikely scenario.)
@@ -1690,18 +1764,18 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
const char *subject, int length, int startoffset,
int options, int *ovector, int ovecsize);
- The function pcre_exec() is called to match a subject string against a
- compiled pattern, which is passed in the code argument. If the pattern
+ The function pcre_exec() is called to match a subject string against a
+ compiled pattern, which is passed in the code argument. If the pattern
has been studied, the result of the study should be passed in the extra
- argument. This function is the main matching facility of the library,
+ argument. This function is the main matching facility of the library,
and it operates in a Perl-like manner. For specialist use there is also
- an alternative matching function, which is described below in the sec-
+ an alternative matching function, which is described below in the sec-
tion about the pcre_dfa_exec() function.
- In most applications, the pattern will have been compiled (and option-
- ally studied) in the same process that calls pcre_exec(). However, it
+ In most applications, the pattern will have been compiled (and option-
+ ally studied) in the same process that calls pcre_exec(). However, it
is possible to save compiled patterns and study data, and then use them
- later in different processes, possibly even on different hosts. For a
+ later in different processes, possibly even on different hosts. For a
discussion about this, see the pcreprecompile documentation.
Here is an example of a simple call to pcre_exec():
@@ -1720,10 +1794,10 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
Extra data for pcre_exec()
- If the extra argument is not NULL, it must point to a pcre_extra data
- block. The pcre_study() function returns such a block (when it doesn't
- return NULL), but you can also create one for yourself, and pass addi-
- tional information in it. The pcre_extra block contains the following
+ If the extra argument is not NULL, it must point to a pcre_extra data
+ block. The pcre_study() function returns such a block (when it doesn't
+ return NULL), but you can also create one for yourself, and pass addi-
+ tional information in it. The pcre_extra block contains the following
fields (not necessarily in this order):
unsigned long int flags;
@@ -1733,7 +1807,7 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
void *callout_data;
const unsigned char *tables;
- The flags field is a bitmap that specifies which of the other fields
+ The flags field is a bitmap that specifies which of the other fields
are set. The flag bits are:
PCRE_EXTRA_STUDY_DATA
@@ -1742,77 +1816,85 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
PCRE_EXTRA_CALLOUT_DATA
PCRE_EXTRA_TABLES
- Other flag bits should be set to zero. The study_data field is set in
- the pcre_extra block that is returned by pcre_study(), together with
+ Other flag bits should be set to zero. The study_data field is set in
+ the pcre_extra block that is returned by pcre_study(), together with
the appropriate flag bit. You should not set this yourself, but you may
- add to the block by setting the other fields and their corresponding
+ add to the block by setting the other fields and their corresponding
flag bits.
The match_limit field provides a means of preventing PCRE from using up
- a vast amount of resources when running patterns that are not going to
- match, but which have a very large number of possibilities in their
- search trees. The classic example is the use of nested unlimited
+ a vast amount of resources when running patterns that are not going to
+ match, but which have a very large number of possibilities in their
+ search trees. The classic example is the use of nested unlimited
repeats.
- Internally, PCRE uses a function called match() which it calls repeat-
- edly (sometimes recursively). The limit set by match_limit is imposed
- on the number of times this function is called during a match, which
- has the effect of limiting the amount of backtracking that can take
+ Internally, PCRE uses a function called match() which it calls repeat-
+ edly (sometimes recursively). The limit set by match_limit is imposed
+ on the number of times this function is called during a match, which
+ has the effect of limiting the amount of backtracking that can take
place. For patterns that are not anchored, the count restarts from zero
for each position in the subject string.
- The default value for the limit can be set when PCRE is built; the
- default default is 10 million, which handles all but the most extreme
- cases. You can override the default by suppling pcre_exec() with a
- pcre_extra block in which match_limit is set, and
- PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is
+ The default value for the limit can be set when PCRE is built; the
+ default default is 10 million, which handles all but the most extreme
+ cases. You can override the default by suppling pcre_exec() with a
+ pcre_extra block in which match_limit is set, and
+ PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is
exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT.
- The match_limit_recursion field is similar to match_limit, but instead
+ The match_limit_recursion field is similar to match_limit, but instead
of limiting the total number of times that match() is called, it limits
- the depth of recursion. The recursion depth is a smaller number than
- the total number of calls, because not all calls to match() are recur-
+ the depth of recursion. The recursion depth is a smaller number than
+ the total number of calls, because not all calls to match() are recur-
sive. This limit is of use only if it is set smaller than match_limit.
- Limiting the recursion depth limits the amount of stack that can be
+ Limiting the recursion depth limits the amount of stack that can be
used, or, when PCRE has been compiled to use memory on the heap instead
of the stack, the amount of heap memory that can be used.
- The default value for match_limit_recursion can be set when PCRE is
- built; the default default is the same value as the default for
- match_limit. You can override the default by suppling pcre_exec() with
- a pcre_extra block in which match_limit_recursion is set, and
- PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the flags field. If the
+ The default value for match_limit_recursion can be set when PCRE is
+ built; the default default is the same value as the default for
+ match_limit. You can override the default by suppling pcre_exec() with
+ a pcre_extra block in which match_limit_recursion is set, and
+ PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the flags field. If the
limit is exceeded, pcre_exec() returns PCRE_ERROR_RECURSIONLIMIT.
- The pcre_callout field is used in conjunction with the "callout" fea-
+ The pcre_callout field is used in conjunction with the "callout" fea-
ture, which is described in the pcrecallout documentation.
- The tables field is used to pass a character tables pointer to
- pcre_exec(); this overrides the value that is stored with the compiled
- pattern. A non-NULL value is stored with the compiled pattern only if
- custom tables were supplied to pcre_compile() via its tableptr argu-
+ The tables field is used to pass a character tables pointer to
+ pcre_exec(); this overrides the value that is stored with the compiled
+ pattern. A non-NULL value is stored with the compiled pattern only if
+ custom tables were supplied to pcre_compile() via its tableptr argu-
ment. If NULL is passed to pcre_exec() using this mechanism, it forces
- PCRE's internal tables to be used. This facility is helpful when re-
- using patterns that have been saved after compiling with an external
- set of tables, because the external tables might be at a different
- address when pcre_exec() is called. See the pcreprecompile documenta-
+ PCRE's internal tables to be used. This facility is helpful when re-
+ using patterns that have been saved after compiling with an external
+ set of tables, because the external tables might be at a different
+ address when pcre_exec() is called. See the pcreprecompile documenta-
tion for a discussion of saving compiled patterns for later use.
Option bits for pcre_exec()
- The unused bits of the options argument for pcre_exec() must be zero.
- The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_xxx,
+ The unused bits of the options argument for pcre_exec() must be zero.
+ The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_xxx,
PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK and
PCRE_PARTIAL.
PCRE_ANCHORED
- The PCRE_ANCHORED option limits pcre_exec() to matching at the first
- matching position. If a pattern was compiled with PCRE_ANCHORED, or
- turned out to be anchored by virtue of its contents, it cannot be made
+ The PCRE_ANCHORED option limits pcre_exec() to matching at the first
+ matching position. If a pattern was compiled with PCRE_ANCHORED, or
+ turned out to be anchored by virtue of its contents, it cannot be made
unachored at matching time.
+ PCRE_BSR_ANYCRLF
+ PCRE_BSR_UNICODE
+
+ These options (which are mutually exclusive) control what the \R escape
+ sequence matches. The choice is either to match only CR, LF, or CRLF,
+ or to match any Unicode newline sequence. These options override the
+ choice that was made or defaulted when the pattern was compiled.
+
PCRE_NEWLINE_CR
PCRE_NEWLINE_LF
PCRE_NEWLINE_CRLF
@@ -1829,7 +1911,7 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is
set, and a match attempt for an unanchored pattern fails when the cur-
rent position is at a CRLF sequence, and the pattern contains no
- explicit matches for CR or NL characters, the match position is
+ explicit matches for CR or LF characters, the match position is
advanced by two characters instead of one, in other words, to after the
CRLF.
@@ -1839,194 +1921,197 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
failing at the start, it skips both the CR and the LF before retrying.
However, the pattern [\r\n]A does match that string, because it con-
tains an explicit CR or LF reference, and so advances only by one char-
- acter after the first failure. Note than an explicit CR or LF refer-
- ence occurs for negated character classes such as [^X] because they can
- match CR or LF characters.
+ acter after the first failure.
+
+ An explicit match for CR of LF is either a literal appearance of one of
+ those characters, or one of the \r or \n escape sequences. Implicit
+ matches such as [^X] do not count, nor does \s (which includes CR and
+ LF in the characters that it matches).
- Notwithstanding the above, anomalous effects may still occur when CRLF
+ Notwithstanding the above, anomalous effects may still occur when CRLF
is a valid newline sequence and explicit \r or \n escapes appear in the
pattern.
PCRE_NOTBOL
This option specifies that first character of the subject string is not
- the beginning of a line, so the circumflex metacharacter should not
- match before it. Setting this without PCRE_MULTILINE (at compile time)
- causes circumflex never to match. This option affects only the behav-
+ the beginning of a line, so the circumflex metacharacter should not
+ match before it. Setting this without PCRE_MULTILINE (at compile time)
+ causes circumflex never to match. This option affects only the behav-
iour of the circumflex metacharacter. It does not affect \A.
PCRE_NOTEOL
This option specifies that the end of the subject string is not the end
- of a line, so the dollar metacharacter should not match it nor (except
- in multiline mode) a newline immediately before it. Setting this with-
+ of a line, so the dollar metacharacter should not match it nor (except
+ in multiline mode) a newline immediately before it. Setting this with-
out PCRE_MULTILINE (at compile time) causes dollar never to match. This
- option affects only the behaviour of the dollar metacharacter. It does
+ option affects only the behaviour of the dollar metacharacter. It does
not affect \Z or \z.
PCRE_NOTEMPTY
An empty string is not considered to be a valid match if this option is
- set. If there are alternatives in the pattern, they are tried. If all
- the alternatives match the empty string, the entire match fails. For
+ set. If there are alternatives in the pattern, they are tried. If all
+ the alternatives match the empty string, the entire match fails. For
example, if the pattern
a?b?
- is applied to a string not beginning with "a" or "b", it matches the
- empty string at the start of the subject. With PCRE_NOTEMPTY set, this
+ is applied to a string not beginning with "a" or "b", it matches the
+ empty string at the start of the subject. With PCRE_NOTEMPTY set, this
match is not valid, so PCRE searches further into the string for occur-
rences of "a" or "b".
Perl has no direct equivalent of PCRE_NOTEMPTY, but it does make a spe-
- cial case of a pattern match of the empty string within its split()
- function, and when using the /g modifier. It is possible to emulate
+ cial case of a pattern match of the empty string within its split()
+ function, and when using the /g modifier. It is possible to emulate
Perl's behaviour after matching a null string by first trying the match
again at the same offset with PCRE_NOTEMPTY and PCRE_ANCHORED, and then
- if that fails by advancing the starting offset (see below) and trying
+ if that fails by advancing the starting offset (see below) and trying
an ordinary match again. There is some code that demonstrates how to do
this in the pcredemo.c sample program.
PCRE_NO_UTF8_CHECK
When PCRE_UTF8 is set at compile time, the validity of the subject as a
- UTF-8 string is automatically checked when pcre_exec() is subsequently
- called. The value of startoffset is also checked to ensure that it
- points to the start of a UTF-8 character. There is a discussion about
- the validity of UTF-8 strings in the section on UTF-8 support in the
- main pcre page. If an invalid UTF-8 sequence of bytes is found,
- pcre_exec() returns the error PCRE_ERROR_BADUTF8. If startoffset con-
+ UTF-8 string is automatically checked when pcre_exec() is subsequently
+ called. The value of startoffset is also checked to ensure that it
+ points to the start of a UTF-8 character. There is a discussion about
+ the validity of UTF-8 strings in the section on UTF-8 support in the
+ main pcre page. If an invalid UTF-8 sequence of bytes is found,
+ pcre_exec() returns the error PCRE_ERROR_BADUTF8. If startoffset con-
tains an invalid value, PCRE_ERROR_BADUTF8_OFFSET is returned.
- If you already know that your subject is valid, and you want to skip
- these checks for performance reasons, you can set the
- PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to
- do this for the second and subsequent calls to pcre_exec() if you are
- making repeated calls to find all the matches in a single subject
- string. However, you should be sure that the value of startoffset
- points to the start of a UTF-8 character. When PCRE_NO_UTF8_CHECK is
- set, the effect of passing an invalid UTF-8 string as a subject, or a
- value of startoffset that does not point to the start of a UTF-8 char-
+ If you already know that your subject is valid, and you want to skip
+ these checks for performance reasons, you can set the
+ PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to
+ do this for the second and subsequent calls to pcre_exec() if you are
+ making repeated calls to find all the matches in a single subject
+ string. However, you should be sure that the value of startoffset
+ points to the start of a UTF-8 character. When PCRE_NO_UTF8_CHECK is
+ set, the effect of passing an invalid UTF-8 string as a subject, or a
+ value of startoffset that does not point to the start of a UTF-8 char-
acter, is undefined. Your program may crash.
PCRE_PARTIAL
- This option turns on the partial matching feature. If the subject
- string fails to match the pattern, but at some point during the match-
- ing process the end of the subject was reached (that is, the subject
- partially matches the pattern and the failure to match occurred only
- because there were not enough subject characters), pcre_exec() returns
- PCRE_ERROR_PARTIAL instead of PCRE_ERROR_NOMATCH. When PCRE_PARTIAL is
- used, there are restrictions on what may appear in the pattern. These
+ This option turns on the partial matching feature. If the subject
+ string fails to match the pattern, but at some point during the match-
+ ing process the end of the subject was reached (that is, the subject
+ partially matches the pattern and the failure to match occurred only
+ because there were not enough subject characters), pcre_exec() returns
+ PCRE_ERROR_PARTIAL instead of PCRE_ERROR_NOMATCH. When PCRE_PARTIAL is
+ used, there are restrictions on what may appear in the pattern. These
are discussed in the pcrepartial documentation.
The string to be matched by pcre_exec()
- The subject string is passed to pcre_exec() as a pointer in subject, a
- length in length, and a starting byte offset in startoffset. In UTF-8
- mode, the byte offset must point to the start of a UTF-8 character.
- Unlike the pattern string, the subject may contain binary zero bytes.
- When the starting offset is zero, the search for a match starts at the
+ The subject string is passed to pcre_exec() as a pointer in subject, a
+ length in length, and a starting byte offset in startoffset. In UTF-8
+ mode, the byte offset must point to the start of a UTF-8 character.
+ Unlike the pattern string, the subject may contain binary zero bytes.
+ When the starting offset is zero, the search for a match starts at the
beginning of the subject, and this is by far the most common case.
- A non-zero starting offset is useful when searching for another match
- in the same subject by calling pcre_exec() again after a previous suc-
- cess. Setting startoffset differs from just passing over a shortened
- string and setting PCRE_NOTBOL in the case of a pattern that begins
+ A non-zero starting offset is useful when searching for another match
+ in the same subject by calling pcre_exec() again after a previous suc-
+ cess. Setting startoffset differs from just passing over a shortened
+ string and setting PCRE_NOTBOL in the case of a pattern that begins
with any kind of lookbehind. For example, consider the pattern
\Biss\B
- which finds occurrences of "iss" in the middle of words. (\B matches
- only if the current position in the subject is not a word boundary.)
- When applied to the string "Mississipi" the first call to pcre_exec()
- finds the first occurrence. If pcre_exec() is called again with just
- the remainder of the subject, namely "issipi", it does not match,
+ which finds occurrences of "iss" in the middle of words. (\B matches
+ only if the current position in the subject is not a word boundary.)
+ When applied to the string "Mississipi" the first call to pcre_exec()
+ finds the first occurrence. If pcre_exec() is called again with just
+ the remainder of the subject, namely "issipi", it does not match,
because \B is always false at the start of the subject, which is deemed
- to be a word boundary. However, if pcre_exec() is passed the entire
+ to be a word boundary. However, if pcre_exec() is passed the entire
string again, but with startoffset set to 4, it finds the second occur-
- rence of "iss" because it is able to look behind the starting point to
+ rence of "iss" because it is able to look behind the starting point to
discover that it is preceded by a letter.
- If a non-zero starting offset is passed when the pattern is anchored,
+ If a non-zero starting offset is passed when the pattern is anchored,
one attempt to match at the given offset is made. This can only succeed
- if the pattern does not require the match to be at the start of the
+ if the pattern does not require the match to be at the start of the
subject.
How pcre_exec() returns captured substrings
- In general, a pattern matches a certain portion of the subject, and in
- addition, further substrings from the subject may be picked out by
- parts of the pattern. Following the usage in Jeffrey Friedl's book,
- this is called "capturing" in what follows, and the phrase "capturing
- subpattern" is used for a fragment of a pattern that picks out a sub-
- string. PCRE supports several other kinds of parenthesized subpattern
+ In general, a pattern matches a certain portion of the subject, and in
+ addition, further substrings from the subject may be picked out by
+ parts of the pattern. Following the usage in Jeffrey Friedl's book,
+ this is called "capturing" in what follows, and the phrase "capturing
+ subpattern" is used for a fragment of a pattern that picks out a sub-
+ string. PCRE supports several other kinds of parenthesized subpattern
that do not cause substrings to be captured.
- Captured substrings are returned to the caller via a vector of integer
- offsets whose address is passed in ovector. The number of elements in
- the vector is passed in ovecsize, which must be a non-negative number.
+ Captured substrings are returned to the caller via a vector of integer
+ offsets whose address is passed in ovector. The number of elements in
+ the vector is passed in ovecsize, which must be a non-negative number.
Note: this argument is NOT the size of ovector in bytes.
- The first two-thirds of the vector is used to pass back captured sub-
- strings, each substring using a pair of integers. The remaining third
- of the vector is used as workspace by pcre_exec() while matching cap-
- turing subpatterns, and is not available for passing back information.
- The length passed in ovecsize should always be a multiple of three. If
+ The first two-thirds of the vector is used to pass back captured sub-
+ strings, each substring using a pair of integers. The remaining third
+ of the vector is used as workspace by pcre_exec() while matching cap-
+ turing subpatterns, and is not available for passing back information.
+ The length passed in ovecsize should always be a multiple of three. If
it is not, it is rounded down.
- When a match is successful, information about captured substrings is
- returned in pairs of integers, starting at the beginning of ovector,
- and continuing up to two-thirds of its length at the most. The first
+ When a match is successful, information about captured substrings is
+ returned in pairs of integers, starting at the beginning of ovector,
+ and continuing up to two-thirds of its length at the most. The first
element of a pair is set to the offset of the first character in a sub-
- string, and the second is set to the offset of the first character
- after the end of a substring. The first pair, ovector[0] and ovec-
- tor[1], identify the portion of the subject string matched by the
- entire pattern. The next pair is used for the first capturing subpat-
+ string, and the second is set to the offset of the first character
+ after the end of a substring. The first pair, ovector[0] and ovec-
+ tor[1], identify the portion of the subject string matched by the
+ entire pattern. The next pair is used for the first capturing subpat-
tern, and so on. The value returned by pcre_exec() is one more than the
highest numbered pair that has been set. For example, if two substrings
- have been captured, the returned value is 3. If there are no capturing
- subpatterns, the return value from a successful match is 1, indicating
+ have been captured, the returned value is 3. If there are no capturing
+ subpatterns, the return value from a successful match is 1, indicating
that just the first pair of offsets has been set.
If a capturing subpattern is matched repeatedly, it is the last portion
of the string that it matched that is returned.
- If the vector is too small to hold all the captured substring offsets,
+ If the vector is too small to hold all the captured substring offsets,
it is used as far as possible (up to two-thirds of its length), and the
- function returns a value of zero. In particular, if the substring off-
+ function returns a value of zero. In particular, if the substring off-
sets are not of interest, pcre_exec() may be called with ovector passed
- as NULL and ovecsize as zero. However, if the pattern contains back
- references and the ovector is not big enough to remember the related
- substrings, PCRE has to get additional memory for use during matching.
+ as NULL and ovecsize as zero. However, if the pattern contains back
+ references and the ovector is not big enough to remember the related
+ substrings, PCRE has to get additional memory for use during matching.
Thus it is usually advisable to supply an ovector.
- The pcre_info() function can be used to find out how many capturing
- subpatterns there are in a compiled pattern. The smallest size for
- ovector that will allow for n captured substrings, in addition to the
+ The pcre_info() function can be used to find out how many capturing
+ subpatterns there are in a compiled pattern. The smallest size for
+ ovector that will allow for n captured substrings, in addition to the
offsets of the substring matched by the whole pattern, is (n+1)*3.
- It is possible for capturing subpattern number n+1 to match some part
+ It is possible for capturing subpattern number n+1 to match some part
of the subject when subpattern n has not been used at all. For example,
- if the string "abc" is matched against the pattern (a|(z))(bc) the
+ if the string "abc" is matched against the pattern (a|(z))(bc) the
return from the function is 4, and subpatterns 1 and 3 are matched, but
- 2 is not. When this happens, both values in the offset pairs corre-
+ 2 is not. When this happens, both values in the offset pairs corre-
sponding to unused subpatterns are set to -1.
- Offset values that correspond to unused subpatterns at the end of the
- expression are also set to -1. For example, if the string "abc" is
- matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not
- matched. The return from the function is 2, because the highest used
+ Offset values that correspond to unused subpatterns at the end of the
+ expression are also set to -1. For example, if the string "abc" is
+ matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not
+ matched. The return from the function is 2, because the highest used
capturing subpattern number is 1. However, you can refer to the offsets
- for the second and third capturing subpatterns if you wish (assuming
+ for the second and third capturing subpatterns if you wish (assuming
the vector is large enough, of course).
- Some convenience functions are provided for extracting the captured
+ Some convenience functions are provided for extracting the captured
substrings as separate strings. These are described below.
Error return values from pcre_exec()
- If pcre_exec() fails, it returns a negative number. The following are
+ If pcre_exec() fails, it returns a negative number. The following are
defined in the header file:
PCRE_ERROR_NOMATCH (-1)
@@ -2035,7 +2120,7 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
PCRE_ERROR_NULL (-2)
- Either code or subject was passed as NULL, or ovector was NULL and
+ Either code or subject was passed as NULL, or ovector was NULL and
ovecsize was not zero.
PCRE_ERROR_BADOPTION (-3)
@@ -2044,79 +2129,79 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
PCRE_ERROR_BADMAGIC (-4)
- PCRE stores a 4-byte "magic number" at the start of the compiled code,
+ PCRE stores a 4-byte "magic number" at the start of the compiled code,
to catch the case when it is passed a junk pointer and to detect when a
pattern that was compiled in an environment of one endianness is run in
- an environment with the other endianness. This is the error that PCRE
+ an environment with the other endianness. This is the error that PCRE
gives when the magic number is not present.
PCRE_ERROR_UNKNOWN_OPCODE (-5)
While running the pattern match, an unknown item was encountered in the
- compiled pattern. This error could be caused by a bug in PCRE or by
+ compiled pattern. This error could be caused by a bug in PCRE or by
overwriting of the compiled pattern.
PCRE_ERROR_NOMEMORY (-6)
- If a pattern contains back references, but the ovector that is passed
+ If a pattern contains back references, but the ovector that is passed
to pcre_exec() is not big enough to remember the referenced substrings,
- PCRE gets a block of memory at the start of matching to use for this
- purpose. If the call via pcre_malloc() fails, this error is given. The
+ PCRE gets a block of memory at the start of matching to use for this
+ purpose. If the call via pcre_malloc() fails, this error is given. The
memory is automatically freed at the end of matching.
PCRE_ERROR_NOSUBSTRING (-7)
- This error is used by the pcre_copy_substring(), pcre_get_substring(),
+ This error is used by the pcre_copy_substring(), pcre_get_substring(),
and pcre_get_substring_list() functions (see below). It is never
returned by pcre_exec().
PCRE_ERROR_MATCHLIMIT (-8)
- The backtracking limit, as specified by the match_limit field in a
- pcre_extra structure (or defaulted) was reached. See the description
+ The backtracking limit, as specified by the match_limit field in a
+ pcre_extra structure (or defaulted) was reached. See the description
above.
PCRE_ERROR_CALLOUT (-9)
This error is never generated by pcre_exec() itself. It is provided for
- use by callout functions that want to yield a distinctive error code.
+ use by callout functions that want to yield a distinctive error code.
See the pcrecallout documentation for details.
PCRE_ERROR_BADUTF8 (-10)
- A string that contains an invalid UTF-8 byte sequence was passed as a
+ A string that contains an invalid UTF-8 byte sequence was passed as a
subject.
PCRE_ERROR_BADUTF8_OFFSET (-11)
The UTF-8 byte sequence that was passed as a subject was valid, but the
- value of startoffset did not point to the beginning of a UTF-8 charac-
+ value of startoffset did not point to the beginning of a UTF-8 charac-
ter.
PCRE_ERROR_PARTIAL (-12)
- The subject string did not match, but it did match partially. See the
+ The subject string did not match, but it did match partially. See the
pcrepartial documentation for details of partial matching.
PCRE_ERROR_BADPARTIAL (-13)
- The PCRE_PARTIAL option was used with a compiled pattern containing
- items that are not supported for partial matching. See the pcrepartial
+ The PCRE_PARTIAL option was used with a compiled pattern containing
+ items that are not supported for partial matching. See the pcrepartial
documentation for details of partial matching.
PCRE_ERROR_INTERNAL (-14)
- An unexpected internal error has occurred. This error could be caused
+ An unexpected internal error has occurred. This error could be caused
by a bug in PCRE or by overwriting of the compiled pattern.
PCRE_ERROR_BADCOUNT (-15)
- This error is given if the value of the ovecsize argument is negative.
+ This error is given if the value of the ovecsize argument is negative.
PCRE_ERROR_RECURSIONLIMIT (-21)
The internal recursion limit, as specified by the match_limit_recursion
- field in a pcre_extra structure (or defaulted) was reached. See the
+ field in a pcre_extra structure (or defaulted) was reached. See the
description above.
PCRE_ERROR_BADNEWLINE (-23)
@@ -2139,78 +2224,78 @@ EXTRACTING CAPTURED SUBSTRINGS BY NUMBER
int pcre_get_substring_list(const char *subject,
int *ovector, int stringcount, const char ***listptr);
- Captured substrings can be accessed directly by using the offsets
- returned by pcre_exec() in ovector. For convenience, the functions
+ Captured substrings can be accessed directly by using the offsets
+ returned by pcre_exec() in ovector. For convenience, the functions
pcre_copy_substring(), pcre_get_substring(), and pcre_get_sub-
- string_list() are provided for extracting captured substrings as new,
- separate, zero-terminated strings. These functions identify substrings
- by number. The next section describes functions for extracting named
+ string_list() are provided for extracting captured substrings as new,
+ separate, zero-terminated strings. These functions identify substrings
+ by number. The next section describes functions for extracting named
substrings.
- A substring that contains a binary zero is correctly extracted and has
- a further zero added on the end, but the result is not, of course, a C
- string. However, you can process such a string by referring to the
- length that is returned by pcre_copy_substring() and pcre_get_sub-
+ A substring that contains a binary zero is correctly extracted and has
+ a further zero added on the end, but the result is not, of course, a C
+ string. However, you can process such a string by referring to the
+ length that is returned by pcre_copy_substring() and pcre_get_sub-
string(). Unfortunately, the interface to pcre_get_substring_list() is
- not adequate for handling strings containing binary zeros, because the
+ not adequate for handling strings containing binary zeros, because the
end of the final string is not independently indicated.
- The first three arguments are the same for all three of these func-
- tions: subject is the subject string that has just been successfully
+ The first three arguments are the same for all three of these func-
+ tions: subject is the subject string that has just been successfully
matched, ovector is a pointer to the vector of integer offsets that was
passed to pcre_exec(), and stringcount is the number of substrings that
- were captured by the match, including the substring that matched the
+ were captured by the match, including the substring that matched the
entire regular expression. This is the value returned by pcre_exec() if
- it is greater than zero. If pcre_exec() returned zero, indicating that
- it ran out of space in ovector, the value passed as stringcount should
+ it is greater than zero. If pcre_exec() returned zero, indicating that
+ it ran out of space in ovector, the value passed as stringcount should
be the number of elements in the vector divided by three.
- The functions pcre_copy_substring() and pcre_get_substring() extract a
- single substring, whose number is given as stringnumber. A value of
- zero extracts the substring that matched the entire pattern, whereas
- higher values extract the captured substrings. For pcre_copy_sub-
- string(), the string is placed in buffer, whose length is given by
- buffersize, while for pcre_get_substring() a new block of memory is
- obtained via pcre_malloc, and its address is returned via stringptr.
- The yield of the function is the length of the string, not including
+ The functions pcre_copy_substring() and pcre_get_substring() extract a
+ single substring, whose number is given as stringnumber. A value of
+ zero extracts the substring that matched the entire pattern, whereas
+ higher values extract the captured substrings. For pcre_copy_sub-
+ string(), the string is placed in buffer, whose length is given by
+ buffersize, while for pcre_get_substring() a new block of memory is
+ obtained via pcre_malloc, and its address is returned via stringptr.
+ The yield of the function is the length of the string, not including
the terminating zero, or one of these error codes:
PCRE_ERROR_NOMEMORY (-6)
- The buffer was too small for pcre_copy_substring(), or the attempt to
+ The buffer was too small for pcre_copy_substring(), or the attempt to
get memory failed for pcre_get_substring().
PCRE_ERROR_NOSUBSTRING (-7)
There is no substring whose number is stringnumber.
- The pcre_get_substring_list() function extracts all available sub-
- strings and builds a list of pointers to them. All this is done in a
+ The pcre_get_substring_list() function extracts all available sub-
+ strings and builds a list of pointers to them. All this is done in a
single block of memory that is obtained via pcre_malloc. The address of
- the memory block is returned via listptr, which is also the start of
- the list of string pointers. The end of the list is marked by a NULL
- pointer. The yield of the function is zero if all went well, or the
+ the memory block is returned via listptr, which is also the start of
+ the list of string pointers. The end of the list is marked by a NULL
+ pointer. The yield of the function is zero if all went well, or the
error code
PCRE_ERROR_NOMEMORY (-6)
if the attempt to get the memory block failed.
- When any of these functions encounter a substring that is unset, which
- can happen when capturing subpattern number n+1 matches some part of
- the subject, but subpattern n has not been used at all, they return an
+ When any of these functions encounter a substring that is unset, which
+ can happen when capturing subpattern number n+1 matches some part of
+ the subject, but subpattern n has not been used at all, they return an
empty string. This can be distinguished from a genuine zero-length sub-
- string by inspecting the appropriate offset in ovector, which is nega-
+ string by inspecting the appropriate offset in ovector, which is nega-
tive for unset substrings.
- The two convenience functions pcre_free_substring() and pcre_free_sub-
- string_list() can be used to free the memory returned by a previous
+ The two convenience functions pcre_free_substring() and pcre_free_sub-
+ string_list() can be used to free the memory returned by a previous
call of pcre_get_substring() or pcre_get_substring_list(), respec-
- tively. They do nothing more than call the function pointed to by
- pcre_free, which of course could be called directly from a C program.
- However, PCRE is used in some situations where it is linked via a spe-
- cial interface to another programming language that cannot use
- pcre_free directly; it is for these cases that the functions are pro-
+ tively. They do nothing more than call the function pointed to by
+ pcre_free, which of course could be called directly from a C program.
+ However, PCRE is used in some situations where it is linked via a spe-
+ cial interface to another programming language that cannot use
+ pcre_free directly; it is for these cases that the functions are pro-
vided.
@@ -2229,7 +2314,7 @@ EXTRACTING CAPTURED SUBSTRINGS BY NAME
int stringcount, const char *stringname,
const char **stringptr);
- To extract a substring by name, you first have to find associated num-
+ To extract a substring by name, you first have to find associated num-
ber. For example, for this pattern
(a+)b(?<xxx>\d+)...
@@ -2238,27 +2323,27 @@ EXTRACTING CAPTURED SUBSTRINGS BY NAME
be unique (PCRE_DUPNAMES was not set), you can find the number from the
name by calling pcre_get_stringnumber(). The first argument is the com-
piled pattern, and the second is the name. The yield of the function is
- the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no
+ the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no
subpattern of that name.
Given the number, you can extract the substring directly, or use one of
the functions described in the previous section. For convenience, there
are also two functions that do the whole job.
- Most of the arguments of pcre_copy_named_substring() and
- pcre_get_named_substring() are the same as those for the similarly
- named functions that extract by number. As these are described in the
- previous section, they are not re-described here. There are just two
+ Most of the arguments of pcre_copy_named_substring() and
+ pcre_get_named_substring() are the same as those for the similarly
+ named functions that extract by number. As these are described in the
+ previous section, they are not re-described here. There are just two
differences:
- First, instead of a substring number, a substring name is given. Sec-
+ First, instead of a substring number, a substring name is given. Sec-
ond, there is an extra argument, given at the start, which is a pointer
- to the compiled pattern. This is needed in order to gain access to the
+ to the compiled pattern. This is needed in order to gain access to the
name-to-number translation table.
- These functions call pcre_get_stringnumber(), and if it succeeds, they
- then call pcre_copy_substring() or pcre_get_substring(), as appropri-
- ate. NOTE: If PCRE_DUPNAMES is set and there are duplicate names, the
+ These functions call pcre_get_stringnumber(), and if it succeeds, they
+ then call pcre_copy_substring() or pcre_get_substring(), as appropri-
+ ate. NOTE: If PCRE_DUPNAMES is set and there are duplicate names, the
behaviour may not be what you want (see the next section).
@@ -2267,47 +2352,47 @@ DUPLICATE SUBPATTERN NAMES
int pcre_get_stringtable_entries(const pcre *code,
const char *name, char **first, char **last);
- When a pattern is compiled with the PCRE_DUPNAMES option, names for
- subpatterns are not required to be unique. Normally, patterns with
- duplicate names are such that in any one match, only one of the named
- subpatterns participates. An example is shown in the pcrepattern docu-
+ When a pattern is compiled with the PCRE_DUPNAMES option, names for
+ subpatterns are not required to be unique. Normally, patterns with
+ duplicate names are such that in any one match, only one of the named
+ subpatterns participates. An example is shown in the pcrepattern docu-
mentation.
- When duplicates are present, pcre_copy_named_substring() and
- pcre_get_named_substring() return the first substring corresponding to
- the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING
- (-7) is returned; no data is returned. The pcre_get_stringnumber()
- function returns one of the numbers that are associated with the name,
+ When duplicates are present, pcre_copy_named_substring() and
+ pcre_get_named_substring() return the first substring corresponding to
+ the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING
+ (-7) is returned; no data is returned. The pcre_get_stringnumber()
+ function returns one of the numbers that are associated with the name,
but it is not defined which it is.
- If you want to get full details of all captured substrings for a given
- name, you must use the pcre_get_stringtable_entries() function. The
+ If you want to get full details of all captured substrings for a given
+ name, you must use the pcre_get_stringtable_entries() function. The
first argument is the compiled pattern, and the second is the name. The
- third and fourth are pointers to variables which are updated by the
+ third and fourth are pointers to variables which are updated by the
function. After it has run, they point to the first and last entries in
- the name-to-number table for the given name. The function itself
- returns the length of each entry, or PCRE_ERROR_NOSUBSTRING (-7) if
- there are none. The format of the table is described above in the sec-
- tion entitled Information about a pattern. Given all the relevant
- entries for the name, you can extract each of their numbers, and hence
+ the name-to-number table for the given name. The function itself
+ returns the length of each entry, or PCRE_ERROR_NOSUBSTRING (-7) if
+ there are none. The format of the table is described above in the sec-
+ tion entitled Information about a pattern. Given all the relevant
+ entries for the name, you can extract each of their numbers, and hence
the captured data, if any.
FINDING ALL POSSIBLE MATCHES
- The traditional matching function uses a similar algorithm to Perl,
+ The traditional matching function uses a similar algorithm to Perl,
which stops when it finds the first match, starting at a given point in
- the subject. If you want to find all possible matches, or the longest
- possible match, consider using the alternative matching function (see
- below) instead. If you cannot use the alternative function, but still
- need to find all possible matches, you can kludge it up by making use
+ the subject. If you want to find all possible matches, or the longest
+ possible match, consider using the alternative matching function (see
+ below) instead. If you cannot use the alternative function, but still
+ need to find all possible matches, you can kludge it up by making use
of the callout facility, which is described in the pcrecallout documen-
tation.
What you have to do is to insert a callout right at the end of the pat-
- tern. When your callout function is called, extract and save the cur-
- rent matched substring. Then return 1, which forces pcre_exec() to
- backtrack and try other alternatives. Ultimately, when it runs out of
+ tern. When your callout function is called, extract and save the cur-
+ rent matched substring. Then return 1, which forces pcre_exec() to
+ backtrack and try other alternatives. Ultimately, when it runs out of
matches, pcre_exec() will yield PCRE_ERROR_NOMATCH.
@@ -2318,25 +2403,25 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
int options, int *ovector, int ovecsize,
int *workspace, int wscount);
- The function pcre_dfa_exec() is called to match a subject string
- against a compiled pattern, using a matching algorithm that scans the
- subject string just once, and does not backtrack. This has different
- characteristics to the normal algorithm, and is not compatible with
- Perl. Some of the features of PCRE patterns are not supported. Never-
- theless, there are times when this kind of matching can be useful. For
+ The function pcre_dfa_exec() is called to match a subject string
+ against a compiled pattern, using a matching algorithm that scans the
+ subject string just once, and does not backtrack. This has different
+ characteristics to the normal algorithm, and is not compatible with
+ Perl. Some of the features of PCRE patterns are not supported. Never-
+ theless, there are times when this kind of matching can be useful. For
a discussion of the two matching algorithms, see the pcrematching docu-
mentation.
- The arguments for the pcre_dfa_exec() function are the same as for
+ The arguments for the pcre_dfa_exec() function are the same as for
pcre_exec(), plus two extras. The ovector argument is used in a differ-
- ent way, and this is described below. The other common arguments are
- used in the same way as for pcre_exec(), so their description is not
+ ent way, and this is described below. The other common arguments are
+ used in the same way as for pcre_exec(), so their description is not
repeated here.
- The two additional arguments provide workspace for the function. The
- workspace vector should contain at least 20 elements. It is used for
+ The two additional arguments provide workspace for the function. The
+ workspace vector should contain at least 20 elements. It is used for
keeping track of multiple paths through the pattern tree. More
- workspace will be needed for patterns and subjects where there are a
+ workspace will be needed for patterns and subjects where there are a
lot of potential matches.
Here is an example of a simple call to pcre_dfa_exec():
@@ -2358,47 +2443,47 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
Option bits for pcre_dfa_exec()
- The unused bits of the options argument for pcre_dfa_exec() must be
- zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEW-
- LINE_xxx, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK,
+ The unused bits of the options argument for pcre_dfa_exec() must be
+ zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEW-
+ LINE_xxx, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK,
PCRE_PARTIAL, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last
three of these are the same as for pcre_exec(), so their description is
not repeated here.
PCRE_PARTIAL
- This has the same general effect as it does for pcre_exec(), but the
- details are slightly different. When PCRE_PARTIAL is set for
- pcre_dfa_exec(), the return code PCRE_ERROR_NOMATCH is converted into
- PCRE_ERROR_PARTIAL if the end of the subject is reached, there have
+ This has the same general effect as it does for pcre_exec(), but the
+ details are slightly different. When PCRE_PARTIAL is set for
+ pcre_dfa_exec(), the return code PCRE_ERROR_NOMATCH is converted into
+ PCRE_ERROR_PARTIAL if the end of the subject is reached, there have
been no complete matches, but there is still at least one matching pos-
- sibility. The portion of the string that provided the partial match is
+ sibility. The portion of the string that provided the partial match is
set as the first matching string.
PCRE_DFA_SHORTEST
- Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to
+ Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to
stop as soon as it has found one match. Because of the way the alterna-
- tive algorithm works, this is necessarily the shortest possible match
+ tive algorithm works, this is necessarily the shortest possible match
at the first possible matching point in the subject string.
PCRE_DFA_RESTART
- When pcre_dfa_exec() is called with the PCRE_PARTIAL option, and
- returns a partial match, it is possible to call it again, with addi-
- tional subject characters, and have it continue with the same match.
- The PCRE_DFA_RESTART option requests this action; when it is set, the
- workspace and wscount options must reference the same vector as before
- because data about the match so far is left in them after a partial
- match. There is more discussion of this facility in the pcrepartial
+ When pcre_dfa_exec() is called with the PCRE_PARTIAL option, and
+ returns a partial match, it is possible to call it again, with addi-
+ tional subject characters, and have it continue with the same match.
+ The PCRE_DFA_RESTART option requests this action; when it is set, the
+ workspace and wscount options must reference the same vector as before
+ because data about the match so far is left in them after a partial
+ match. There is more discussion of this facility in the pcrepartial
documentation.
Successful returns from pcre_dfa_exec()
- When pcre_dfa_exec() succeeds, it may have matched more than one sub-
+ When pcre_dfa_exec() succeeds, it may have matched more than one sub-
string in the subject. Note, however, that all the matches from one run
- of the function start at the same point in the subject. The shorter
- matches are all initial substrings of the longer matches. For example,
+ of the function start at the same point in the subject. The shorter
+ matches are all initial substrings of the longer matches. For example,
if the pattern
<.*>
@@ -2413,62 +2498,62 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
<something> <something else>
<something> <something else> <something further>
- On success, the yield of the function is a number greater than zero,
- which is the number of matched substrings. The substrings themselves
- are returned in ovector. Each string uses two elements; the first is
- the offset to the start, and the second is the offset to the end. In
- fact, all the strings have the same start offset. (Space could have
- been saved by giving this only once, but it was decided to retain some
- compatibility with the way pcre_exec() returns data, even though the
+ On success, the yield of the function is a number greater than zero,
+ which is the number of matched substrings. The substrings themselves
+ are returned in ovector. Each string uses two elements; the first is
+ the offset to the start, and the second is the offset to the end. In
+ fact, all the strings have the same start offset. (Space could have
+ been saved by giving this only once, but it was decided to retain some
+ compatibility with the way pcre_exec() returns data, even though the
meaning of the strings is different.)
The strings are returned in reverse order of length; that is, the long-
- est matching string is given first. If there were too many matches to
- fit into ovector, the yield of the function is zero, and the vector is
+ est matching string is given first. If there were too many matches to
+ fit into ovector, the yield of the function is zero, and the vector is
filled with the longest matches.
Error returns from pcre_dfa_exec()
- The pcre_dfa_exec() function returns a negative number when it fails.
- Many of the errors are the same as for pcre_exec(), and these are
- described above. There are in addition the following errors that are
+ The pcre_dfa_exec() function returns a negative number when it fails.
+ Many of the errors are the same as for pcre_exec(), and these are
+ described above. There are in addition the following errors that are
specific to pcre_dfa_exec():
PCRE_ERROR_DFA_UITEM (-16)
- This return is given if pcre_dfa_exec() encounters an item in the pat-
- tern that it does not support, for instance, the use of \C or a back
+ This return is given if pcre_dfa_exec() encounters an item in the pat-
+ tern that it does not support, for instance, the use of \C or a back
reference.
PCRE_ERROR_DFA_UCOND (-17)
- This return is given if pcre_dfa_exec() encounters a condition item
- that uses a back reference for the condition, or a test for recursion
+ This return is given if pcre_dfa_exec() encounters a condition item
+ that uses a back reference for the condition, or a test for recursion
in a specific group. These are not supported.
PCRE_ERROR_DFA_UMLIMIT (-18)
- This return is given if pcre_dfa_exec() is called with an extra block
+ This return is given if pcre_dfa_exec() is called with an extra block
that contains a setting of the match_limit field. This is not supported
(it is meaningless).
PCRE_ERROR_DFA_WSSIZE (-19)
- This return is given if pcre_dfa_exec() runs out of space in the
+ This return is given if pcre_dfa_exec() runs out of space in the
workspace vector.
PCRE_ERROR_DFA_RECURSE (-20)
- When a recursive subpattern is processed, the matching function calls
- itself recursively, using private vectors for ovector and workspace.
- This error is given if the output vector is not large enough. This
+ When a recursive subpattern is processed, the matching function calls
+ itself recursively, using private vectors for ovector and workspace.
+ This error is given if the output vector is not large enough. This
should be extremely rare, as a vector of size 1000 is used.
SEE ALSO
- pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematching(3), pcrepar-
- tial(3), pcreposix(3), pcreprecompile(3), pcresample(3), pcrestack(3).
+ pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematching(3), pcrepar-
+ tial(3), pcreposix(3), pcreprecompile(3), pcresample(3), pcrestack(3).
AUTHOR
@@ -2480,8 +2565,8 @@ AUTHOR
REVISION
- Last updated: 21 August 2007
- Copyright (c) 1997-2007 University of Cambridge.
+ Last updated: 23 January 2008
+ Copyright (c) 1997-2008 University of Cambridge.
------------------------------------------------------------------------------
@@ -2765,16 +2850,23 @@ DIFFERENCES BETWEEN PCRE AND PERL
(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and PCRE_NO_AUTO_CAP-
TURE options for pcre_exec() have no Perl equivalents.
- (g) The callout facility is PCRE-specific.
+ (g) The \R escape sequence can be restricted to match only CR, LF, or
+ CRLF by the PCRE_BSR_ANYCRLF option.
- (h) The partial matching facility is PCRE-specific.
+ (h) The callout facility is PCRE-specific.
- (i) Patterns compiled by PCRE can be saved and re-used at a later time,
+ (i) The partial matching facility is PCRE-specific.
+
+ (j) Patterns compiled by PCRE can be saved and re-used at a later time,
even on different hosts that have the other endianness.
- (j) The alternative matching function (pcre_dfa_exec()) matches in a
+ (k) The alternative matching function (pcre_dfa_exec()) matches in a
different way and is not Perl-compatible.
+ (l) PCRE recognizes some special sequences such as (*CR) at the start
+ of a pattern that set overall options that cannot be changed within the
+ pattern.
+
AUTHOR
@@ -2785,7 +2877,7 @@ AUTHOR
REVISION
- Last updated: 08 August 2007
+ Last updated: 11 September 2007
Copyright (c) 1997-2007 University of Cambridge.
------------------------------------------------------------------------------
@@ -2853,36 +2945,43 @@ NEWLINE CONVENTIONS
changes the convention to CR. That pattern matches "a\nb" because LF is
no longer a newline. Note that these special settings, which are not
Perl-compatible, are recognized only at the very start of a pattern,
- and that they must be in upper case.
+ and that they must be in upper case. If more than one of them is
+ present, the last one is used.
+
+ The newline convention does not affect what the \R escape sequence
+ matches. By default, this is any Unicode newline sequence, for Perl
+ compatibility. However, this can be changed; see the description of \R
+ in the section entitled "Newline sequences" below. A change of \R set-
+ ting can be combined with a change of newline convention.
CHARACTERS AND METACHARACTERS
- A regular expression is a pattern that is matched against a subject
- string from left to right. Most characters stand for themselves in a
- pattern, and match the corresponding characters in the subject. As a
+ A regular expression is a pattern that is matched against a subject
+ string from left to right. Most characters stand for themselves in a
+ pattern, and match the corresponding characters in the subject. As a
trivial example, the pattern
The quick brown fox
matches a portion of a subject string that is identical to itself. When
- caseless matching is specified (the PCRE_CASELESS option), letters are
- matched independently of case. In UTF-8 mode, PCRE always understands
- the concept of case for characters whose values are less than 128, so
- caseless matching is always possible. For characters with higher val-
- ues, the concept of case is supported if PCRE is compiled with Unicode
- property support, but not otherwise. If you want to use caseless
- matching for characters 128 and above, you must ensure that PCRE is
+ caseless matching is specified (the PCRE_CASELESS option), letters are
+ matched independently of case. In UTF-8 mode, PCRE always understands
+ the concept of case for characters whose values are less than 128, so
+ caseless matching is always possible. For characters with higher val-
+ ues, the concept of case is supported if PCRE is compiled with Unicode
+ property support, but not otherwise. If you want to use caseless
+ matching for characters 128 and above, you must ensure that PCRE is
compiled with Unicode property support as well as with UTF-8 support.
- The power of regular expressions comes from the ability to include
- alternatives and repetitions in the pattern. These are encoded in the
+ The power of regular expressions comes from the ability to include
+ alternatives and repetitions in the pattern. These are encoded in the
pattern by the use of metacharacters, which do not stand for themselves
but instead are interpreted in some special way.
- There are two different sets of metacharacters: those that are recog-
- nized anywhere in the pattern except within square brackets, and those
- that are recognized within square brackets. Outside square brackets,
+ There are two different sets of metacharacters: those that are recog-
+ nized anywhere in the pattern except within square brackets, and those
+ that are recognized within square brackets. Outside square brackets,
the metacharacters are as follows:
\ general escape character with several uses
@@ -2901,7 +3000,7 @@ CHARACTERS AND METACHARACTERS
also "possessive quantifier"
{ start min/max quantifier
- Part of a pattern that is in square brackets is called a "character
+ Part of a pattern that is in square brackets is called a "character
class". In a character class the only metacharacters are:
\ general escape character
@@ -2911,33 +3010,33 @@ CHARACTERS AND METACHARACTERS
syntax)
] terminates the character class
- The following sections describe the use of each of the metacharacters.
+ The following sections describe the use of each of the metacharacters.
BACKSLASH
The backslash character has several uses. Firstly, if it is followed by
- a non-alphanumeric character, it takes away any special meaning that
- character may have. This use of backslash as an escape character
+ a non-alphanumeric character, it takes away any special meaning that
+ character may have. This use of backslash as an escape character
applies both inside and outside character classes.
- For example, if you want to match a * character, you write \* in the
- pattern. This escaping action applies whether or not the following
- character would otherwise be interpreted as a metacharacter, so it is
- always safe to precede a non-alphanumeric with backslash to specify
- that it stands for itself. In particular, if you want to match a back-
+ For example, if you want to match a * character, you write \* in the
+ pattern. This escaping action applies whether or not the following
+ character would otherwise be interpreted as a metacharacter, so it is
+ always safe to precede a non-alphanumeric with backslash to specify
+ that it stands for itself. In particular, if you want to match a back-
slash, you write \\.
- If a pattern is compiled with the PCRE_EXTENDED option, whitespace in
- the pattern (other than in a character class) and characters between a
+ If a pattern is compiled with the PCRE_EXTENDED option, whitespace in
+ the pattern (other than in a character class) and characters between a
# outside a character class and the next newline are ignored. An escap-
- ing backslash can be used to include a whitespace or # character as
+ ing backslash can be used to include a whitespace or # character as
part of the pattern.
- If you want to remove the special meaning from a sequence of charac-
- ters, you can do so by putting them between \Q and \E. This is differ-
- ent from Perl in that $ and @ are handled as literals in \Q...\E
- sequences in PCRE, whereas in Perl, $ and @ cause variable interpola-
+ If you want to remove the special meaning from a sequence of charac-
+ ters, you can do so by putting them between \Q and \E. This is differ-
+ ent from Perl in that $ and @ are handled as literals in \Q...\E
+ sequences in PCRE, whereas in Perl, $ and @ cause variable interpola-
tion. Note the following examples:
Pattern PCRE matches Perl matches
@@ -2947,16 +3046,16 @@ BACKSLASH
\Qabc\$xyz\E abc\$xyz abc\$xyz
\Qabc\E\$\Qxyz\E abc$xyz abc$xyz
- The \Q...\E sequence is recognized both inside and outside character
+ The \Q...\E sequence is recognized both inside and outside character
classes.
Non-printing characters
A second use of backslash provides a way of encoding non-printing char-
- acters in patterns in a visible manner. There is no restriction on the
- appearance of non-printing characters, apart from the binary zero that
- terminates a pattern, but when a pattern is being prepared by text
- editing, it is usually easier to use one of the following escape
+ acters in patterns in a visible manner. There is no restriction on the
+ appearance of non-printing characters, apart from the binary zero that
+ terminates a pattern, but when a pattern is being prepared by text
+ editing, it is usually easier to use one of the following escape
sequences than the binary character it represents:
\a alarm, that is, the BEL character (hex 07)
@@ -2970,48 +3069,48 @@ BACKSLASH
\xhh character with hex code hh
\x{hhh..} character with hex code hhh..
- The precise effect of \cx is as follows: if x is a lower case letter,
- it is converted to upper case. Then bit 6 of the character (hex 40) is
- inverted. Thus \cz becomes hex 1A, but \c{ becomes hex 3B, while \c;
+ The precise effect of \cx is as follows: if x is a lower case letter,
+ it is converted to upper case. Then bit 6 of the character (hex 40) is
+ inverted. Thus \cz becomes hex 1A, but \c{ becomes hex 3B, while \c;
becomes hex 7B.
- After \x, from zero to two hexadecimal digits are read (letters can be
- in upper or lower case). Any number of hexadecimal digits may appear
- between \x{ and }, but the value of the character code must be less
+ After \x, from zero to two hexadecimal digits are read (letters can be
+ in upper or lower case). Any number of hexadecimal digits may appear
+ between \x{ and }, but the value of the character code must be less
than 256 in non-UTF-8 mode, and less than 2**31 in UTF-8 mode. That is,
- the maximum value in hexadecimal is 7FFFFFFF. Note that this is bigger
+ the maximum value in hexadecimal is 7FFFFFFF. Note that this is bigger
than the largest Unicode code point, which is 10FFFF.
- If characters other than hexadecimal digits appear between \x{ and },
+ If characters other than hexadecimal digits appear between \x{ and },
or if there is no terminating }, this form of escape is not recognized.
- Instead, the initial \x will be interpreted as a basic hexadecimal
- escape, with no following digits, giving a character whose value is
+ Instead, the initial \x will be interpreted as a basic hexadecimal
+ escape, with no following digits, giving a character whose value is
zero.
Characters whose value is less than 256 can be defined by either of the
- two syntaxes for \x. There is no difference in the way they are han-
+ two syntaxes for \x. There is no difference in the way they are han-
dled. For example, \xdc is exactly the same as \x{dc}.
- After \0 up to two further octal digits are read. If there are fewer
- than two digits, just those that are present are used. Thus the
+ After \0 up to two further octal digits are read. If there are fewer
+ than two digits, just those that are present are used. Thus the
sequence \0\x\07 specifies two binary zeros followed by a BEL character
- (code value 7). Make sure you supply two digits after the initial zero
+ (code value 7). Make sure you supply two digits after the initial zero
if the pattern character that follows is itself an octal digit.
The handling of a backslash followed by a digit other than 0 is compli-
cated. Outside a character class, PCRE reads it and any following dig-
- its as a decimal number. If the number is less than 10, or if there
+ its as a decimal number. If the number is less than 10, or if there
have been at least that many previous capturing left parentheses in the
- expression, the entire sequence is taken as a back reference. A
- description of how this works is given later, following the discussion
+ expression, the entire sequence is taken as a back reference. A
+ description of how this works is given later, following the discussion
of parenthesized subpatterns.
- Inside a character class, or if the decimal number is greater than 9
- and there have not been that many capturing subpatterns, PCRE re-reads
+ Inside a character class, or if the decimal number is greater than 9
+ and there have not been that many capturing subpatterns, PCRE re-reads
up to three octal digits following the backslash, and uses them to gen-
- erate a data character. Any subsequent digits stand for themselves. In
- non-UTF-8 mode, the value of a character specified in octal must be
- less than \400. In UTF-8 mode, values up to \777 are permitted. For
+ erate a data character. Any subsequent digits stand for themselves. In
+ non-UTF-8 mode, the value of a character specified in octal must be
+ less than \400. In UTF-8 mode, values up to \777 are permitted. For
example:
\040 is another way of writing a space
@@ -3029,20 +3128,20 @@ BACKSLASH
\81 is either a back reference, or a binary zero
followed by the two characters "8" and "1"
- Note that octal values of 100 or greater must not be introduced by a
+ Note that octal values of 100 or greater must not be introduced by a
leading zero, because no more than three octal digits are ever read.
All the sequences that define a single character value can be used both
- inside and outside character classes. In addition, inside a character
- class, the sequence \b is interpreted as the backspace character (hex
- 08), and the sequences \R and \X are interpreted as the characters "R"
- and "X", respectively. Outside a character class, these sequences have
+ inside and outside character classes. In addition, inside a character
+ class, the sequence \b is interpreted as the backspace character (hex
+ 08), and the sequences \R and \X are interpreted as the characters "R"
+ and "X", respectively. Outside a character class, these sequences have
different meanings (see below).
Absolute and relative back references
- The sequence \g followed by an unsigned or a negative number, option-
- ally enclosed in braces, is an absolute or relative back reference. A
+ The sequence \g followed by an unsigned or a negative number, option-
+ ally enclosed in braces, is an absolute or relative back reference. A
named back reference can be coded as \g{name}. Back references are dis-
cussed later, following the discussion of parenthesized subpatterns.
@@ -3063,28 +3162,28 @@ BACKSLASH
\W any "non-word" character
Each pair of escape sequences partitions the complete set of characters
- into two disjoint sets. Any given character matches one, and only one,
+ into two disjoint sets. Any given character matches one, and only one,
of each pair.
These character type sequences can appear both inside and outside char-
- acter classes. They each match one character of the appropriate type.
- If the current matching point is at the end of the subject string, all
+ acter classes. They each match one character of the appropriate type.
+ If the current matching point is at the end of the subject string, all
of them fail, since there is no character to match.
- For compatibility with Perl, \s does not match the VT character (code
- 11). This makes it different from the the POSIX "space" class. The \s
- characters are HT (9), LF (10), FF (12), CR (13), and space (32). If
+ For compatibility with Perl, \s does not match the VT character (code
+ 11). This makes it different from the the POSIX "space" class. The \s
+ characters are HT (9), LF (10), FF (12), CR (13), and space (32). If
"use locale;" is included in a Perl script, \s may match the VT charac-
ter. In PCRE, it never does.
- In UTF-8 mode, characters with values greater than 128 never match \d,
+ In UTF-8 mode, characters with values greater than 128 never match \d,
\s, or \w, and always match \D, \S, and \W. This is true even when Uni-
- code character property support is available. These sequences retain
+ code character property support is available. These sequences retain
their original meanings from before UTF-8 support was available, mainly
for efficiency reasons.
The sequences \h, \H, \v, and \V are Perl 5.10 features. In contrast to
- the other sequences, these do match certain high-valued codepoints in
+ the other sequences, these do match certain high-valued codepoints in
UTF-8 mode. The horizontal space characters are:
U+0009 Horizontal tab
@@ -3118,34 +3217,56 @@ BACKSLASH
U+2029 Paragraph separator
A "word" character is an underscore or any character less than 256 that
- is a letter or digit. The definition of letters and digits is con-
- trolled by PCRE's low-valued character tables, and may vary if locale-
- specific matching is taking place (see "Locale support" in the pcreapi
- page). For example, in a French locale such as "fr_FR" in Unix-like
- systems, or "french" in Windows, some character codes greater than 128
- are used for accented letters, and these are matched by \w. The use of
+ is a letter or digit. The definition of letters and digits is con-
+ trolled by PCRE's low-valued character tables, and may vary if locale-
+ specific matching is taking place (see "Locale support" in the pcreapi
+ page). For example, in a French locale such as "fr_FR" in Unix-like
+ systems, or "french" in Windows, some character codes greater than 128
+ are used for accented letters, and these are matched by \w. The use of
locales with Unicode is discouraged.
Newline sequences
- Outside a character class, the escape sequence \R matches any Unicode
- newline sequence. This is a Perl 5.10 feature. In non-UTF-8 mode \R is
- equivalent to the following:
+ Outside a character class, by default, the escape sequence \R matches
+ any Unicode newline sequence. This is a Perl 5.10 feature. In non-UTF-8
+ mode \R is equivalent to the following:
(?>\r\n|\n|\x0b|\f|\r|\x85)
- This is an example of an "atomic group", details of which are given
+ This is an example of an "atomic group", details of which are given
below. This particular group matches either the two-character sequence
- CR followed by LF, or one of the single characters LF (linefeed,
+ CR followed by LF, or one of the single characters LF (linefeed,
U+000A), VT (vertical tab, U+000B), FF (formfeed, U+000C), CR (carriage
return, U+000D), or NEL (next line, U+0085). The two-character sequence
is treated as a single unit that cannot be split.
- In UTF-8 mode, two additional characters whose codepoints are greater
+ In UTF-8 mode, two additional characters whose codepoints are greater
than 255 are added: LS (line separator, U+2028) and PS (paragraph sepa-
- rator, U+2029). Unicode character property support is not needed for
+ rator, U+2029). Unicode character property support is not needed for
these characters to be recognized.
+ It is possible to restrict \R to match only CR, LF, or CRLF (instead of
+ the complete set of Unicode line endings) by setting the option
+ PCRE_BSR_ANYCRLF either at compile time or when the pattern is matched.
+ (BSR is an abbrevation for "backslash R".) This can be made the default
+ when PCRE is built; if this is the case, the other behaviour can be
+ requested via the PCRE_BSR_UNICODE option. It is also possible to
+ specify these settings by starting a pattern string with one of the
+ following sequences:
+
+ (*BSR_ANYCRLF) CR, LF, or CRLF only
+ (*BSR_UNICODE) any Unicode newline sequence
+
+ These override the default and the options given to pcre_compile(), but
+ they can be overridden by options given to pcre_exec(). Note that these
+ special settings, which are not Perl-compatible, are recognized only at
+ the very start of a pattern, and that they must be in upper case. If
+ more than one of them is present, the last one is used. They can be
+ combined with a change of newline convention, for example, a pattern
+ can start with:
+
+ (*ANY)(*BSR_ANYCRLF)
+
Inside a character class, \R matches the letter "R".
Unicode character properties
@@ -3601,9 +3722,9 @@ VERTICAL BAR
INTERNAL OPTION SETTING
The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
- PCRE_EXTENDED options can be changed from within the pattern by a
- sequence of Perl option letters enclosed between "(?" and ")". The
- option letters are
+ PCRE_EXTENDED options (which are Perl-compatible) can be changed from
+ within the pattern by a sequence of Perl option letters enclosed
+ between "(?" and ")". The option letters are
i for PCRE_CASELESS
m for PCRE_MULTILINE
@@ -3617,6 +3738,10 @@ INTERNAL OPTION SETTING
is also permitted. If a letter appears both before and after the
hyphen, the option is unset.
+ The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA
+ can be changed in the same way as the Perl-compatible options by using
+ the characters J, U and X respectively.
+
When an option change occurs at top level (that is, not inside subpat-
tern parentheses), the change applies to the remainder of the pattern
that follows. If the change is placed right at the start of a pattern,
@@ -3642,9 +3767,11 @@ INTERNAL OPTION SETTING
the effects of option settings happen at compile time. There would be
some very weird behaviour otherwise.
- The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA
- can be changed in the same way as the Perl-compatible options by using
- the characters J, U and X respectively.
+ Note: There are other PCRE-specific options that can be set by the
+ application when the compile or match functions are called. In some
+ cases the pattern can contain special leading sequences to override
+ what the application has set or what has been defaulted. Details are
+ given in the section entitled "Newline sequences" above.
SUBPATTERNS
@@ -4644,7 +4771,7 @@ CALLOUTS
is given in the pcrecallout documentation.
-BACTRACKING CONTROL
+BACKTRACKING CONTROL
Perl 5.10 introduced a number of "Special Backtracking Control Verbs",
which are described in the Perl documentation as "experimental and sub-
@@ -4775,7 +4902,7 @@ AUTHOR
REVISION
- Last updated: 21 August 2007
+ Last updated: 17 September 2007
Copyright (c) 1997-2007 University of Cambridge.
------------------------------------------------------------------------------
@@ -4904,7 +5031,7 @@ CHARACTER CLASSES
[^...] negative character class
[x-y] range (can be used for hex characters)
[[:xxx:]] positive POSIX named set
- [[^:xxx:]] negative POSIX named set
+ [[:^xxx:]] negative POSIX named set
alnum alphanumeric
alpha alphabetic
@@ -5074,7 +5201,8 @@ BACKTRACKING CONTROL
NEWLINE CONVENTIONS
- These are recognized only at the very start of a pattern.
+ These are recognized only at the very start of the pattern or after a
+ (*BSR_...) option.
(*CR)
(*LF)
@@ -5083,6 +5211,15 @@ NEWLINE CONVENTIONS
(*ANY)
+WHAT \R MATCHES
+
+ These are recognized only at the very start of the pattern or after a
+ (*...) option that sets the newline convention.
+
+ (*BSR_ANYCRLF)
+ (*BSR_UNICODE)
+
+
CALLOUTS
(?C) callout
@@ -5103,7 +5240,7 @@ AUTHOR
REVISION
- Last updated: 21 August 2007
+ Last updated: 14 November 2007
Copyright (c) 1997-2007 University of Cambridge.
------------------------------------------------------------------------------
@@ -5907,7 +6044,8 @@ MATCHING INTERFACE
c. The "i"th argument has a suitable type for holding the
string captured as the "i"th sub-pattern. If you pass in
- NULL for the "i"th argument, or pass fewer arguments than
+ void * NULL for the "i"th argument, or a non-void * NULL
+ of the correct type, or pass fewer arguments than the
number of sub-patterns, "i"th captured sub-pattern is
ignored.
@@ -6155,7 +6293,7 @@ AUTHOR
REVISION
- Last updated: 06 March 2007
+ Last updated: 12 November 2007
------------------------------------------------------------------------------
@@ -6183,29 +6321,28 @@ PCRE SAMPLE PROGRAM
bility of matching an empty string. Comments in the code explain what
is going on.
- The demonstration program is automatically built if you use "./config-
- ure;make" to build PCRE. Otherwise, if PCRE is installed in the stan-
- dard include and library directories for your system, you should be
- able to compile the demonstration program using this command:
+ If PCRE is installed in the standard include and library directories
+ for your system, you should be able to compile the demonstration pro-
+ gram using this command:
gcc -o pcredemo pcredemo.c -lpcre
- If PCRE is installed elsewhere, you may need to add additional options
- to the command line. For example, on a Unix-like system that has PCRE
- installed in /usr/local, you can compile the demonstration program
+ If PCRE is installed elsewhere, you may need to add additional options
+ to the command line. For example, on a Unix-like system that has PCRE
+ installed in /usr/local, you can compile the demonstration program
using a command like this:
gcc -o pcredemo -I/usr/local/include pcredemo.c \
-L/usr/local/lib -lpcre
- Once you have compiled the demonstration program, you can run simple
+ Once you have compiled the demonstration program, you can run simple
tests like this:
./pcredemo 'cat|dog' 'the cat sat on the mat'
./pcredemo -g 'cat|dog' 'the dog sat on the cat'
- Note that there is a much more comprehensive test program, called
- pcretest, which supports many more facilities for testing regular
+ Note that there is a much more comprehensive test program, called
+ pcretest, which supports many more facilities for testing regular
expressions and the PCRE library. The pcredemo program is provided as a
simple coding example.
@@ -6213,10 +6350,10 @@ PCRE SAMPLE PROGRAM
the standard library directory, you may get an error like this when you
try to run pcredemo:
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or
+ ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or
directory
- This is caused by the way shared library support works on those sys-
+ This is caused by the way shared library support works on those sys-
tems. You need to add
-R/usr/local/lib
@@ -6233,8 +6370,8 @@ AUTHOR
REVISION
- Last updated: 13 June 2007
- Copyright (c) 1997-2007 University of Cambridge.
+ Last updated: 23 January 2008
+ Copyright (c) 1997-2008 University of Cambridge.
------------------------------------------------------------------------------
PCRESTACK(3) PCRESTACK(3)
diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h
index a002bbd5a..c85c32ea3 100644
--- a/ext/pcre/pcrelib/pcre.h
+++ b/ext/pcre/pcrelib/pcre.h
@@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, to be #included by
applications that call the PCRE functions.
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE_MAJOR 7
-#define PCRE_MINOR 3
+#define PCRE_MINOR 6
#define PCRE_PRERELEASE
-#define PCRE_DATE 2007-08-28
+#define PCRE_DATE 2008-01-28
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
@@ -122,6 +122,8 @@ extern "C" {
#define PCRE_NEWLINE_CRLF 0x00300000
#define PCRE_NEWLINE_ANY 0x00400000
#define PCRE_NEWLINE_ANYCRLF 0x00500000
+#define PCRE_BSR_ANYCRLF 0x00800000
+#define PCRE_BSR_UNICODE 0x01000000
/* Exec-time and get/set-time error codes */
@@ -147,7 +149,7 @@ extern "C" {
#define PCRE_ERROR_DFA_WSSIZE (-19)
#define PCRE_ERROR_DFA_RECURSE (-20)
#define PCRE_ERROR_RECURSIONLIMIT (-21)
-#define PCRE_ERROR_NOTUSED (-22)
+#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
#define PCRE_ERROR_BADNEWLINE (-23)
/* Request types for pcre_fullinfo() */
@@ -180,6 +182,7 @@ compatible. */
#define PCRE_CONFIG_STACKRECURSE 5
#define PCRE_CONFIG_UNICODE_PROPERTIES 6
#define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
+#define PCRE_CONFIG_BSR 8
/* Bit flags for the pcre_extra structure. Do not re-arrange or redefine
these bits, just add new ones on the end, in order to remain compatible. */
diff --git a/ext/pcre/pcrelib/pcre_chartables.c b/ext/pcre/pcrelib/pcre_chartables.c
index bec2d0c04..f1dbaaedf 100644
--- a/ext/pcre/pcrelib/pcre_chartables.c
+++ b/ext/pcre/pcrelib/pcre_chartables.c
@@ -20,7 +20,7 @@ and dead code stripping is activated. This leads to link errors. Pulling in the
header ensures that the array gets flagged as "someone outside this compilation
unit might reference this" and so it will always be supplied to the linker. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
diff --git a/ext/pcre/pcrelib/pcre_compile.c b/ext/pcre/pcrelib/pcre_compile.c
index 77ec51cac..07b6369d6 100644
--- a/ext/pcre/pcrelib/pcre_compile.c
+++ b/ext/pcre/pcrelib/pcre_compile.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
supporting internal functions that are not used by other modules. */
-#include <config.h>
+#include "config.h"
#define NLBLOCK cd /* Block containing newline information */
#define PSSTART start_pattern /* Field containing processed string start */
@@ -138,35 +138,47 @@ static const short int escapes[] = {
#endif
-/* Table of special "verbs" like (*PRUNE) */
+/* Table of special "verbs" like (*PRUNE). This is a short table, so it is
+searched linearly. Put all the names into a single string, in order to reduce
+the number of relocations when a shared library is dynamically linked. */
typedef struct verbitem {
- const char *name;
int len;
int op;
} verbitem;
+static const char verbnames[] =
+ "ACCEPT\0"
+ "COMMIT\0"
+ "F\0"
+ "FAIL\0"
+ "PRUNE\0"
+ "SKIP\0"
+ "THEN";
+
static verbitem verbs[] = {
- { "ACCEPT", 6, OP_ACCEPT },
- { "COMMIT", 6, OP_COMMIT },
- { "F", 1, OP_FAIL },
- { "FAIL", 4, OP_FAIL },
- { "PRUNE", 5, OP_PRUNE },
- { "SKIP", 4, OP_SKIP },
- { "THEN", 4, OP_THEN }
+ { 6, OP_ACCEPT },
+ { 6, OP_COMMIT },
+ { 1, OP_FAIL },
+ { 4, OP_FAIL },
+ { 5, OP_PRUNE },
+ { 4, OP_SKIP },
+ { 4, OP_THEN }
};
static int verbcount = sizeof(verbs)/sizeof(verbitem);
-/* Tables of names of POSIX character classes and their lengths. The list is
-terminated by a zero length entry. The first three must be alpha, lower, upper,
-as this is assumed for handling case independence. */
+/* Tables of names of POSIX character classes and their lengths. The names are
+now all in a single string, to reduce the number of relocations when a shared
+library is dynamically loaded. The list of lengths is terminated by a zero
+length entry. The first three must be alpha, lower, upper, as this is assumed
+for handling case independence. */
-static const char *const posix_names[] = {
- "alpha", "lower", "upper",
- "alnum", "ascii", "blank", "cntrl", "digit", "graph",
- "print", "punct", "space", "word", "xdigit" };
+static const char posix_names[] =
+ "alpha\0" "lower\0" "upper\0" "alnum\0" "ascii\0" "blank\0"
+ "cntrl\0" "digit\0" "graph\0" "print\0" "punct\0" "space\0"
+ "word\0" "xdigit";
static const uschar posix_name_lengths[] = {
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 };
@@ -205,84 +217,90 @@ static const int posix_class_maps[] = {
/* The texts of compile-time error messages. These are "char *" because they
are passed to the outside world. Do not ever re-use any error number, because
they are documented. Always add a new error instead. Messages marked DEAD below
-are no longer used. */
-
-static const char *error_texts[] = {
- "no error",
- "\\ at end of pattern",
- "\\c at end of pattern",
- "unrecognized character follows \\",
- "numbers out of order in {} quantifier",
+are no longer used. This used to be a table of strings, but in order to reduce
+the number of relocations needed when a shared library is loaded dynamically,
+it is now one long string. We cannot use a table of offsets, because the
+lengths of inserts such as XSTRING(MAX_NAME_SIZE) are not known. Instead, we
+simply count through to the one we want - this isn't a performance issue
+because these strings are used only when there is a compilation error. */
+
+static const char error_texts[] =
+ "no error\0"
+ "\\ at end of pattern\0"
+ "\\c at end of pattern\0"
+ "unrecognized character follows \\\0"
+ "numbers out of order in {} quantifier\0"
/* 5 */
- "number too big in {} quantifier",
- "missing terminating ] for character class",
- "invalid escape sequence in character class",
- "range out of order in character class",
- "nothing to repeat",
+ "number too big in {} quantifier\0"
+ "missing terminating ] for character class\0"
+ "invalid escape sequence in character class\0"
+ "range out of order in character class\0"
+ "nothing to repeat\0"
/* 10 */
- "operand of unlimited repeat could match the empty string", /** DEAD **/
- "internal error: unexpected repeat",
- "unrecognized character after (?",
- "POSIX named classes are supported only within a class",
- "missing )",
+ "operand of unlimited repeat could match the empty string\0" /** DEAD **/
+ "internal error: unexpected repeat\0"
+ "unrecognized character after (? or (?-\0"
+ "POSIX named classes are supported only within a class\0"
+ "missing )\0"
/* 15 */
- "reference to non-existent subpattern",
- "erroffset passed as NULL",
- "unknown option bit(s) set",
- "missing ) after comment",
- "parentheses nested too deeply", /** DEAD **/
+ "reference to non-existent subpattern\0"
+ "erroffset passed as NULL\0"
+ "unknown option bit(s) set\0"
+ "missing ) after comment\0"
+ "parentheses nested too deeply\0" /** DEAD **/
/* 20 */
- "regular expression is too large",
- "failed to get memory",
- "unmatched parentheses",
- "internal error: code overflow",
- "unrecognized character after (?<",
+ "regular expression is too large\0"
+ "failed to get memory\0"
+ "unmatched parentheses\0"
+ "internal error: code overflow\0"
+ "unrecognized character after (?<\0"
/* 25 */
- "lookbehind assertion is not fixed length",
- "malformed number or name after (?(",
- "conditional group contains more than two branches",
- "assertion expected after (?(",
- "(?R or (?[+-]digits must be followed by )",
+ "lookbehind assertion is not fixed length\0"
+ "malformed number or name after (?(\0"
+ "conditional group contains more than two branches\0"
+ "assertion expected after (?(\0"
+ "(?R or (?[+-]digits must be followed by )\0"
/* 30 */
- "unknown POSIX class name",
- "POSIX collating elements are not supported",
- "this version of PCRE is not compiled with PCRE_UTF8 support",
- "spare error", /** DEAD **/
- "character value in \\x{...} sequence is too large",
+ "unknown POSIX class name\0"
+ "POSIX collating elements are not supported\0"
+ "this version of PCRE is not compiled with PCRE_UTF8 support\0"
+ "spare error\0" /** DEAD **/
+ "character value in \\x{...} sequence is too large\0"
/* 35 */
- "invalid condition (?(0)",
- "\\C not allowed in lookbehind assertion",
- "PCRE does not support \\L, \\l, \\N, \\U, or \\u",
- "number after (?C is > 255",
- "closing ) for (?C expected",
+ "invalid condition (?(0)\0"
+ "\\C not allowed in lookbehind assertion\0"
+ "PCRE does not support \\L, \\l, \\N, \\U, or \\u\0"
+ "number after (?C is > 255\0"
+ "closing ) for (?C expected\0"
/* 40 */
- "recursive call could loop indefinitely",
- "unrecognized character after (?P",
- "syntax error in subpattern name (missing terminator)",
- "two named subpatterns have the same name",
- "invalid UTF-8 string",
+ "recursive call could loop indefinitely\0"
+ "unrecognized character after (?P\0"
+ "syntax error in subpattern name (missing terminator)\0"
+ "two named subpatterns have the same name\0"
+ "invalid UTF-8 string\0"
/* 45 */
- "support for \\P, \\p, and \\X has not been compiled",
- "malformed \\P or \\p sequence",
- "unknown property name after \\P or \\p",
- "subpattern name is too long (maximum " XSTRING(MAX_NAME_SIZE) " characters)",
- "too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")",
+ "support for \\P, \\p, and \\X has not been compiled\0"
+ "malformed \\P or \\p sequence\0"
+ "unknown property name after \\P or \\p\0"
+ "subpattern name is too long (maximum " XSTRING(MAX_NAME_SIZE) " characters)\0"
+ "too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")\0"
/* 50 */
- "repeated subpattern is too long", /** DEAD **/
- "octal value is greater than \\377 (not in UTF-8 mode)",
- "internal error: overran compiling workspace",
- "internal error: previously-checked referenced subpattern not found",
- "DEFINE group contains more than one branch",
+ "repeated subpattern is too long\0" /** DEAD **/
+ "octal value is greater than \\377 (not in UTF-8 mode)\0"
+ "internal error: overran compiling workspace\0"
+ "internal error: previously-checked referenced subpattern not found\0"
+ "DEFINE group contains more than one branch\0"
/* 55 */
- "repeating a DEFINE group is not allowed",
- "inconsistent NEWLINE options",
- "\\g is not followed by a braced name or an optionally braced non-zero number",
- "(?+ or (?- or (?(+ or (?(- must be followed by a non-zero number",
- "(*VERB) with an argument is not supported",
+ "repeating a DEFINE group is not allowed\0"
+ "inconsistent NEWLINE options\0"
+ "\\g is not followed by a braced name or an optionally braced non-zero number\0"
+ "(?+ or (?- or (?(+ or (?(- must be followed by a non-zero number\0"
+ "(*VERB) with an argument is not supported\0"
/* 60 */
- "(*VERB) not recognized",
- "number is too big"
-};
+ "(*VERB) not recognized\0"
+ "number is too big\0"
+ "subpattern name expected\0"
+ "digit expected after (?+";
/* Table to identify digits and hex digits. This is used when compiling
@@ -418,6 +436,28 @@ static BOOL
/*************************************************
+* Find an error text *
+*************************************************/
+
+/* The error texts are now all in one long string, to save on relocations. As
+some of the text is of unknown length, we can't use a table of offsets.
+Instead, just count through the strings. This is not a performance issue
+because it happens only when there has been a compilation error.
+
+Argument: the error number
+Returns: pointer to the error string
+*/
+
+static const char *
+find_error_text(int n)
+{
+const char *s = error_texts;
+for (; n > 0; n--) while (*s++ != 0);
+return s;
+}
+
+
+/*************************************************
* Handle escapes *
*************************************************/
@@ -456,16 +496,16 @@ ptr--; /* Set pointer back to the last byte */
if (c == 0) *errorcodeptr = ERR1;
-/* Non-alphamerics are literals. For digits or letters, do an initial lookup in
-a table. A non-zero result is something that can be returned immediately.
+/* Non-alphanumerics are literals. For digits or letters, do an initial lookup
+in a table. A non-zero result is something that can be returned immediately.
Otherwise further processing may be required. */
#ifndef EBCDIC /* ASCII coding */
-else if (c < '0' || c > 'z') {} /* Not alphameric */
+else if (c < '0' || c > 'z') {} /* Not alphanumeric */
else if ((i = escapes[c - '0']) != 0) c = i;
#else /* EBCDIC coding */
-else if (c < 'a' || (ebcdic_chartab[c] & 0x0E) == 0) {} /* Not alphameric */
+else if (c < 'a' || (ebcdic_chartab[c] & 0x0E) == 0) {} /* Not alphanumeric */
else if ((i = escapes[c - 0x48]) != 0) c = i;
#endif
@@ -682,10 +722,10 @@ else
break;
/* PCRE_EXTRA enables extensions to Perl in the matter of escapes. Any
- other alphameric following \ is an error if PCRE_EXTRA was set; otherwise,
- for Perl compatibility, it is a literal. This code looks a bit odd, but
- there used to be some cases other than the default, and there may be again
- in future, so I haven't "optimized" it. */
+ other alphanumeric following \ is an error if PCRE_EXTRA was set;
+ otherwise, for Perl compatibility, it is a literal. This code looks a bit
+ odd, but there used to be some cases other than the default, and there may
+ be again in future, so I haven't "optimized" it. */
default:
if ((options & PCRE_EXTRA) != 0) switch(c)
@@ -774,7 +814,7 @@ top = _pcre_utt_size;
while (bot < top)
{
i = (bot + top) >> 1;
- c = strcmp(name, _pcre_utt[i].name);
+ c = strcmp(name, _pcre_utt_names + _pcre_utt[i].name_offset);
if (c == 0)
{
*dptr = _pcre_utt[i].value;
@@ -1466,8 +1506,9 @@ for (;;)
can match the empty string or not. It is called from could_be_empty()
below and from compile_branch() when checking for an unlimited repeat of a
group that can match nothing. Note that first_significant_code() skips over
-assertions. If we hit an unclosed bracket, we return "empty" - this means we've
-struck an inner bracket whose current branch will already have been scanned.
+backward and negative forward assertions when its final argument is TRUE. If we
+hit an unclosed bracket, we return "empty" - this means we've struck an inner
+bracket whose current branch will already have been scanned.
Arguments:
code points to start of search
@@ -1489,6 +1530,16 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
c = *code;
+ /* Skip over forward assertions; the other assertions are skipped by
+ first_significant_code() with a TRUE final argument. */
+
+ if (c == OP_ASSERT)
+ {
+ do code += GET(code, 1); while (*code == OP_ALT);
+ c = *code;
+ continue;
+ }
+
/* Groups with zero repeats can of course be empty; skip them. */
if (c == OP_BRAZERO || c == OP_BRAMINZERO)
@@ -1684,29 +1735,48 @@ return TRUE;
*************************************************/
/* This function is called when the sequence "[:" or "[." or "[=" is
-encountered in a character class. It checks whether this is followed by an
-optional ^ and then a sequence of letters, terminated by a matching ":]" or
-".]" or "=]".
+encountered in a character class. It checks whether this is followed by a
+sequence of characters terminated by a matching ":]" or ".]" or "=]". If we
+reach an unescaped ']' without the special preceding character, return FALSE.
+
+Originally, this function only recognized a sequence of letters between the
+terminators, but it seems that Perl recognizes any sequence of characters,
+though of course unknown POSIX names are subsequently rejected. Perl gives an
+"Unknown POSIX class" error for [:f\oo:] for example, where previously PCRE
+didn't consider this to be a POSIX class. Likewise for [:1234:].
+
+The problem in trying to be exactly like Perl is in the handling of escapes. We
+have to be sure that [abc[:x\]pqr] is *not* treated as containing a POSIX
+class, but [abc[:x\]pqr:]] is (so that an error can be generated). The code
+below handles the special case of \], but does not try to do any other escape
+processing. This makes it different from Perl for cases such as [:l\ower:]
+where Perl recognizes it as the POSIX class "lower" but PCRE does not recognize
+"l\ower". This is a lesser evil that not diagnosing bad classes when Perl does,
+I think.
-Argument:
+Arguments:
ptr pointer to the initial [
endptr where to return the end pointer
- cd pointer to compile data
Returns: TRUE or FALSE
*/
static BOOL
-check_posix_syntax(const uschar *ptr, const uschar **endptr, compile_data *cd)
+check_posix_syntax(const uschar *ptr, const uschar **endptr)
{
int terminator; /* Don't combine these lines; the Solaris cc */
terminator = *(++ptr); /* compiler warns about "non-constant" initializer. */
-if (*(++ptr) == '^') ptr++;
-while ((cd->ctypes[*ptr] & ctype_letter) != 0) ptr++;
-if (*ptr == terminator && ptr[1] == ']')
+for (++ptr; *ptr != 0; ptr++)
{
- *endptr = ptr;
- return TRUE;
+ if (*ptr == '\\' && ptr[1] == ']') ptr++; else
+ {
+ if (*ptr == ']') return FALSE;
+ if (*ptr == terminator && ptr[1] == ']')
+ {
+ *endptr = ptr;
+ return TRUE;
+ }
+ }
}
return FALSE;
}
@@ -1731,11 +1801,13 @@ Returns: a value representing the name, or -1 if unknown
static int
check_posix_name(const uschar *ptr, int len)
{
+const char *pn = posix_names;
register int yield = 0;
while (posix_name_lengths[yield] != 0)
{
if (len == posix_name_lengths[yield] &&
- strncmp((const char *)ptr, posix_names[yield], len) == 0) return yield;
+ strncmp((const char *)ptr, pn, len) == 0) return yield;
+ pn += posix_name_lengths[yield] + 1;
yield++;
}
return -1;
@@ -2302,6 +2374,7 @@ uschar classbits[32];
BOOL class_utf8;
BOOL utf8 = (options & PCRE_UTF8) != 0;
uschar *class_utf8data;
+uschar *class_utf8data_base;
uschar utf8_char[6];
#else
BOOL utf8 = FALSE;
@@ -2341,6 +2414,7 @@ req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;
for (;; ptr++)
{
BOOL negate_class;
+ BOOL should_flip_negation;
BOOL possessive_quantifier;
BOOL is_quantifier;
BOOL is_recurse;
@@ -2564,7 +2638,7 @@ for (;; ptr++)
they are encountered at the top level, so we'll do that too. */
if ((ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') &&
- check_posix_syntax(ptr, &tempptr, cd))
+ check_posix_syntax(ptr, &tempptr))
{
*errorcodeptr = (ptr[1] == ':')? ERR13 : ERR31;
goto FAILED;
@@ -2589,6 +2663,12 @@ for (;; ptr++)
else break;
}
+ /* If a class contains a negative special such as \S, we need to flip the
+ negation flag at the end, so that support for characters > 255 works
+ correctly (they are all included in the class). */
+
+ should_flip_negation = FALSE;
+
/* Keep a count of chars with values < 256 so that we can optimize the case
of just a single character (as long as it's < 256). However, For higher
valued UTF-8 characters, we don't yet do any optimization. */
@@ -2606,6 +2686,7 @@ for (;; ptr++)
#ifdef SUPPORT_UTF8
class_utf8 = FALSE; /* No chars >= 256 */
class_utf8data = code + LINK_SIZE + 2; /* For UTF-8 items */
+ class_utf8data_base = class_utf8data; /* For resetting in pass 1 */
#endif
/* Process characters until ] is reached. By writing this as a "do" it
@@ -2621,6 +2702,18 @@ for (;; ptr++)
{ /* Braces are required because the */
GETCHARLEN(c, ptr, ptr); /* macro generates multiple statements */
}
+
+ /* In the pre-compile phase, accumulate the length of any UTF-8 extra
+ data and reset the pointer. This is so that very large classes that
+ contain a zillion UTF-8 characters no longer overwrite the work space
+ (which is on the stack). */
+
+ if (lengthptr != NULL)
+ {
+ *lengthptr += class_utf8data - class_utf8data_base;
+ class_utf8data = class_utf8data_base;
+ }
+
#endif
/* Inside \Q...\E everything is literal except \E */
@@ -2644,7 +2737,7 @@ for (;; ptr++)
if (c == '[' &&
(ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') &&
- check_posix_syntax(ptr, &tempptr, cd))
+ check_posix_syntax(ptr, &tempptr))
{
BOOL local_negate = FALSE;
int posix_class, taboffset, tabopt;
@@ -2661,6 +2754,7 @@ for (;; ptr++)
if (*ptr == '^')
{
local_negate = TRUE;
+ should_flip_negation = TRUE; /* Note negative special */
ptr++;
}
@@ -2735,7 +2829,7 @@ for (;; ptr++)
c = check_escape(&ptr, errorcodeptr, cd->bracount, options, TRUE);
if (*errorcodeptr != 0) goto FAILED;
- if (-c == ESC_b) c = '\b'; /* \b is backslash in a class */
+ if (-c == ESC_b) c = '\b'; /* \b is backspace in a class */
else if (-c == ESC_X) c = 'X'; /* \X is literal X in a class */
else if (-c == ESC_R) c = 'R'; /* \R is literal R in a class */
else if (-c == ESC_Q) /* Handle start of quoted string */
@@ -2763,6 +2857,7 @@ for (;; ptr++)
continue;
case ESC_D:
+ should_flip_negation = TRUE;
for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_digit];
continue;
@@ -2771,6 +2866,7 @@ for (;; ptr++)
continue;
case ESC_W:
+ should_flip_negation = TRUE;
for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_word];
continue;
@@ -2780,13 +2876,11 @@ for (;; ptr++)
continue;
case ESC_S:
+ should_flip_negation = TRUE;
for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_space];
classbits[1] |= 0x08; /* Perl 5.004 onwards omits VT from \s */
continue;
- case ESC_E: /* Perl ignores an orphan \E */
- continue;
-
default: /* Not recognized; fall through */
break; /* Need "default" setting to stop compiler warning. */
}
@@ -2974,6 +3068,12 @@ for (;; ptr++)
oldptr = ptr;
+ /* Remember \r or \n */
+
+ if (c == '\r' || c == '\n') cd->external_flags |= PCRE_HASCRORLF;
+
+ /* Check for range */
+
if (!inescq && ptr[1] == '-')
{
int d;
@@ -3015,7 +3115,7 @@ for (;; ptr++)
d = check_escape(&ptr, errorcodeptr, cd->bracount, options, TRUE);
if (*errorcodeptr != 0) goto FAILED;
- /* \b is backslash; \X is literal X; \R is literal R; any other
+ /* \b is backspace; \X is literal X; \R is literal R; any other
special means the '-' was literal */
if (d < 0)
@@ -3041,6 +3141,10 @@ for (;; ptr++)
if (d == c) goto LONE_SINGLE_CHARACTER; /* A few lines below */
+ /* Remember \r or \n */
+
+ if (d == '\r' || d == '\n') cd->external_flags |= PCRE_HASCRORLF;
+
/* In UTF-8 mode, if the upper limit is > 255, or > 127 for caseless
matching, we have to use an XCLASS with extra data items. Caseless
matching for characters > 127 is available only if UCP support is
@@ -3194,16 +3298,24 @@ for (;; ptr++)
goto FAILED;
}
+
+/* This code has been disabled because it would mean that \s counts as
+an explicit \r or \n reference, and that's not really what is wanted. Now
+we set the flag only if there is a literal "\r" or "\n" in the class. */
+
+#if 0
/* Remember whether \r or \n are in this class */
if (negate_class)
{
- if ((classbits[1] & 0x24) != 0x24) cd->external_options |= PCRE_HASCRORLF;
+ if ((classbits[1] & 0x24) != 0x24) cd->external_flags |= PCRE_HASCRORLF;
}
else
{
- if ((classbits[1] & 0x24) != 0) cd->external_options |= PCRE_HASCRORLF;
+ if ((classbits[1] & 0x24) != 0) cd->external_flags |= PCRE_HASCRORLF;
}
+#endif
+
/* If class_charcount is 1, we saw precisely one character whose value is
less than 256. As long as there were no characters >= 128 and there was no
@@ -3267,11 +3379,14 @@ for (;; ptr++)
zeroreqbyte = reqbyte;
/* If there are characters with values > 255, we have to compile an
- extended class, with its own opcode. If there are no characters < 256,
- we can omit the bitmap in the actual compiled code. */
+ extended class, with its own opcode, unless there was a negated special
+ such as \S in the class, because in that case all characters > 255 are in
+ the class, so any that were explicitly given as well can be ignored. If
+ (when there are explicit characters > 255 that must be listed) there are no
+ characters < 256, we can omit the bitmap in the actual compiled code. */
#ifdef SUPPORT_UTF8
- if (class_utf8)
+ if (class_utf8 && !should_flip_negation)
{
*class_utf8data++ = XCL_END; /* Marks the end of extra data */
*code++ = OP_XCLASS;
@@ -3297,20 +3412,19 @@ for (;; ptr++)
}
#endif
- /* If there are no characters > 255, negate the 32-byte map if necessary,
- and copy it into the code vector. If this is the first thing in the branch,
- there can be no first char setting, whatever the repeat count. Any reqbyte
- setting must remain unchanged after any kind of repeat. */
+ /* If there are no characters > 255, set the opcode to OP_CLASS or
+ OP_NCLASS, depending on whether the whole class was negated and whether
+ there were negative specials such as \S in the class. Then copy the 32-byte
+ map into the code vector, negating it if necessary. */
+ *code++ = (negate_class == should_flip_negation) ? OP_CLASS : OP_NCLASS;
if (negate_class)
{
- *code++ = OP_NCLASS;
if (lengthptr == NULL) /* Save time in the pre-compile phase */
for (c = 0; c < 32; c++) code[c] = ~classbits[c];
}
else
{
- *code++ = OP_CLASS;
memcpy(code, classbits, 32);
}
code += 32;
@@ -3496,7 +3610,7 @@ for (;; ptr++)
/* All real repeats make it impossible to handle partial matching (maybe
one day we will be able to remove this restriction). */
- if (repeat_max != 1) cd->nopartial = TRUE;
+ if (repeat_max != 1) cd->external_flags |= PCRE_NOPARTIAL;
/* Combine the op_type with the repeat_type */
@@ -3646,7 +3760,7 @@ for (;; ptr++)
/* All real repeats make it impossible to handle partial matching (maybe
one day we will be able to remove this restriction). */
- if (repeat_max != 1) cd->nopartial = TRUE;
+ if (repeat_max != 1) cd->external_flags |= PCRE_NOPARTIAL;
if (repeat_min == 0 && repeat_max == -1)
*code++ = OP_CRSTAR + repeat_type;
@@ -3946,7 +4060,9 @@ for (;; ptr++)
int len;
if (*tempcode == OP_EXACT || *tempcode == OP_TYPEEXACT ||
*tempcode == OP_NOTEXACT)
- tempcode += _pcre_OP_lengths[*tempcode];
+ tempcode += _pcre_OP_lengths[*tempcode] +
+ ((*tempcode == OP_TYPEEXACT &&
+ (tempcode[3] == OP_PROP || tempcode[3] == OP_NOTPROP))? 2:0);
len = code - tempcode;
if (len > 0) switch (*tempcode)
{
@@ -4004,6 +4120,7 @@ for (;; ptr++)
if (*(++ptr) == '*' && (cd->ctypes[ptr[1]] & ctype_letter) != 0)
{
int i, namelen;
+ const char *vn = verbnames;
const uschar *name = ++ptr;
previous = NULL;
while ((cd->ctypes[*++ptr] & ctype_letter) != 0);
@@ -4021,12 +4138,13 @@ for (;; ptr++)
for (i = 0; i < verbcount; i++)
{
if (namelen == verbs[i].len &&
- strncmp((char *)name, verbs[i].name, namelen) == 0)
+ strncmp((char *)name, vn, namelen) == 0)
{
*code = verbs[i].op;
if (*code++ == OP_ACCEPT) cd->had_accept = TRUE;
break;
}
+ vn += verbs[i].len + 1;
}
if (i < verbcount) continue;
*errorcodeptr = ERR60;
@@ -4171,16 +4289,13 @@ for (;; ptr++)
*errorcodeptr = ERR58;
goto FAILED;
}
- if (refsign == '-')
+ recno = (refsign == '-')?
+ cd->bracount - recno + 1 : recno +cd->bracount;
+ if (recno <= 0 || recno > cd->final_bracount)
{
- recno = cd->bracount - recno + 1;
- if (recno <= 0)
- {
- *errorcodeptr = ERR15;
- goto FAILED;
- }
+ *errorcodeptr = ERR15;
+ goto FAILED;
}
- else recno += cd->bracount;
PUT2(code, 2+LINK_SIZE, recno);
break;
}
@@ -4252,9 +4367,10 @@ for (;; ptr++)
skipbytes = 1;
}
- /* Check for the "name" actually being a subpattern number. */
+ /* Check for the "name" actually being a subpattern number. We are
+ in the second pass here, so final_bracount is set. */
- else if (recno > 0)
+ else if (recno > 0 && recno <= cd->final_bracount)
{
PUT2(code, 2+LINK_SIZE, recno);
}
@@ -4448,7 +4564,9 @@ for (;; ptr++)
/* We come here from the Python syntax above that handles both
references (?P=name) and recursion (?P>name), as well as falling
- through from the Perl recursion syntax (?&name). */
+ through from the Perl recursion syntax (?&name). We also come here from
+ the Perl \k<name> or \k'name' back reference syntax and the \k{name}
+ .NET syntax. */
NAMED_REF_OR_RECURSE:
name = ++ptr;
@@ -4460,6 +4578,11 @@ for (;; ptr++)
if (lengthptr != NULL)
{
+ if (namelen == 0)
+ {
+ *errorcodeptr = ERR62;
+ goto FAILED;
+ }
if (*ptr != terminator)
{
*errorcodeptr = ERR42;
@@ -4473,14 +4596,19 @@ for (;; ptr++)
recno = 0;
}
- /* In the real compile, seek the name in the table */
+ /* In the real compile, seek the name in the table. We check the name
+ first, and then check that we have reached the end of the name in the
+ table. That way, if the name that is longer than any in the table,
+ the comparison will fail without reading beyond the table entry. */
else
{
slot = cd->name_table;
for (i = 0; i < cd->names_found; i++)
{
- if (strncmp((char *)name, (char *)slot+2, namelen) == 0) break;
+ if (strncmp((char *)name, (char *)slot+2, namelen) == 0 &&
+ slot[2+namelen] == 0)
+ break;
slot += cd->name_entry_size;
}
@@ -4517,7 +4645,15 @@ for (;; ptr++)
{
const uschar *called;
- if ((refsign = *ptr) == '+') ptr++;
+ if ((refsign = *ptr) == '+')
+ {
+ ptr++;
+ if ((digitab[*ptr] & ctype_digit) == 0)
+ {
+ *errorcodeptr = ERR63;
+ goto FAILED;
+ }
+ }
else if (refsign == '-')
{
if ((digitab[ptr[1]] & ctype_digit) == 0)
@@ -4643,7 +4779,7 @@ for (;; ptr++)
case 'J': /* Record that it changed in the external options */
*optset |= PCRE_DUPNAMES;
- cd->external_options |= PCRE_JCHANGED;
+ cd->external_flags |= PCRE_JCHANGED;
break;
case 'i': *optset |= PCRE_CASELESS; break;
@@ -5063,7 +5199,7 @@ for (;; ptr++)
/* Remember if \r or \n were seen */
if (mcbuffer[0] == '\r' || mcbuffer[0] == '\n')
- cd->external_options |= PCRE_HASCRORLF;
+ cd->external_flags |= PCRE_HASCRORLF;
/* Set the first and required bytes appropriately. If no previous first
byte, set it from this character, but revert to none on a zero repeat.
@@ -5683,7 +5819,6 @@ to fill in forward references to subpatterns. */
uschar cworkspace[COMPILE_WORK_SIZE];
-
/* Set this early so that early errors get offset 0. */
ptr = (const uschar *)pattern;
@@ -5743,24 +5878,46 @@ cd->fcc = tables + fcc_offset;
cd->cbits = tables + cbits_offset;
cd->ctypes = tables + ctypes_offset;
-/* Check for newline settings at the start of the pattern, and remember the
-offset for later. */
+/* Check for global one-time settings at the start of the pattern, and remember
+the offset for later. */
-if (ptr[0] == '(' && ptr[1] == '*')
+while (ptr[skipatstart] == '(' && ptr[skipatstart+1] == '*')
{
int newnl = 0;
- if (strncmp((char *)(ptr+2), "CR)", 3) == 0)
- { skipatstart = 5; newnl = PCRE_NEWLINE_CR; }
- else if (strncmp((char *)(ptr+2), "LF)", 3) == 0)
- { skipatstart = 5; newnl = PCRE_NEWLINE_LF; }
- else if (strncmp((char *)(ptr+2), "CRLF)", 5) == 0)
- { skipatstart = 7; newnl = PCRE_NEWLINE_CR + PCRE_NEWLINE_LF; }
- else if (strncmp((char *)(ptr+2), "ANY)", 4) == 0)
- { skipatstart = 6; newnl = PCRE_NEWLINE_ANY; }
- else if (strncmp((char *)(ptr+2), "ANYCRLF)", 8) == 0)
- { skipatstart = 10; newnl = PCRE_NEWLINE_ANYCRLF; }
- if (skipatstart > 0)
+ int newbsr = 0;
+
+ if (strncmp((char *)(ptr+skipatstart+2), "CR)", 3) == 0)
+ { skipatstart += 5; newnl = PCRE_NEWLINE_CR; }
+ else if (strncmp((char *)(ptr+skipatstart+2), "LF)", 3) == 0)
+ { skipatstart += 5; newnl = PCRE_NEWLINE_LF; }
+ else if (strncmp((char *)(ptr+skipatstart+2), "CRLF)", 5) == 0)
+ { skipatstart += 7; newnl = PCRE_NEWLINE_CR + PCRE_NEWLINE_LF; }
+ else if (strncmp((char *)(ptr+skipatstart+2), "ANY)", 4) == 0)
+ { skipatstart += 6; newnl = PCRE_NEWLINE_ANY; }
+ else if (strncmp((char *)(ptr+skipatstart+2), "ANYCRLF)", 8) == 0)
+ { skipatstart += 10; newnl = PCRE_NEWLINE_ANYCRLF; }
+
+ else if (strncmp((char *)(ptr+skipatstart+2), "BSR_ANYCRLF)", 12) == 0)
+ { skipatstart += 14; newbsr = PCRE_BSR_ANYCRLF; }
+ else if (strncmp((char *)(ptr+skipatstart+2), "BSR_UNICODE)", 12) == 0)
+ { skipatstart += 14; newbsr = PCRE_BSR_UNICODE; }
+
+ if (newnl != 0)
options = (options & ~PCRE_NEWLINE_BITS) | newnl;
+ else if (newbsr != 0)
+ options = (options & ~(PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)) | newbsr;
+ else break;
+ }
+
+/* Check validity of \R options. */
+
+switch (options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
+ {
+ case 0:
+ case PCRE_BSR_ANYCRLF:
+ case PCRE_BSR_UNICODE:
+ break;
+ default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;
}
/* Handle different types of newline. The three bits give seven cases. The
@@ -5822,7 +5979,7 @@ to compile parts of the pattern into; the compiled code is discarded when it is
no longer needed, so hopefully this workspace will never overflow, though there
is a test for its doing so. */
-cd->bracount = 0;
+cd->bracount = cd->final_bracount = 0;
cd->names_found = 0;
cd->name_entry_size = 0;
cd->name_table = NULL;
@@ -5832,8 +5989,8 @@ cd->hwm = cworkspace;
cd->start_pattern = (const uschar *)pattern;
cd->end_pattern = (const uschar *)(pattern + strlen(pattern));
cd->req_varyopt = 0;
-cd->nopartial = FALSE;
cd->external_options = options;
+cd->external_flags = 0;
/* Now do the pre-compile. On error, errorcode will be set non-zero, so we
don't need to look at the result of the function here. The initial options have
@@ -5872,14 +6029,16 @@ if (re == NULL)
goto PCRE_EARLY_ERROR_RETURN;
}
-/* Put in the magic number, and save the sizes, initial options, and character
-table pointer. NULL is used for the default character tables. The nullpad field
-is at the end; it's there to help in the case when a regex compiled on a system
-with 4-byte pointers is run on another with 8-byte pointers. */
+/* Put in the magic number, and save the sizes, initial options, internal
+flags, and character table pointer. NULL is used for the default character
+tables. The nullpad field is at the end; it's there to help in the case when a
+regex compiled on a system with 4-byte pointers is run on another with 8-byte
+pointers. */
re->magic_number = MAGIC_NUMBER;
re->size = size;
re->options = cd->external_options;
+re->flags = cd->external_flags;
re->dummy1 = 0;
re->first_byte = 0;
re->req_byte = 0;
@@ -5897,6 +6056,7 @@ field. Reset the bracket count and the names_found field. Also reset the hwm
field; this time it's used for remembering forward references to subpatterns.
*/
+cd->final_bracount = cd->bracount; /* Save for checking forward references */
cd->bracount = 0;
cd->names_found = 0;
cd->name_table = (uschar *)re + re->name_table_offset;
@@ -5904,7 +6064,6 @@ codestart = cd->name_table + re->name_entry_size * re->name_count;
cd->start_code = codestart;
cd->hwm = cworkspace;
cd->req_varyopt = 0;
-cd->nopartial = FALSE;
cd->had_accept = FALSE;
/* Set up a starting, non-extracting bracket, then compile the expression. On
@@ -5918,8 +6077,8 @@ code = (uschar *)codestart;
&errorcode, FALSE, FALSE, 0, &firstbyte, &reqbyte, NULL, cd, NULL);
re->top_bracket = cd->bracount;
re->top_backref = cd->top_backref;
+re->flags = cd->external_flags;
-if (cd->nopartial) re->options |= PCRE_NOPARTIAL;
if (cd->had_accept) reqbyte = -1; /* Must disable after (*ACCEPT) */
/* If not reached end of pattern on success, there's an excess bracket. */
@@ -5962,7 +6121,7 @@ if (errorcode != 0)
PCRE_EARLY_ERROR_RETURN:
*erroroffset = ptr - (const uschar *)pattern;
PCRE_EARLY_ERROR_RETURN2:
- *errorptr = error_texts[errorcode];
+ *errorptr = find_error_text(errorcode);
if (errorcodeptr != NULL) *errorcodeptr = errorcode;
return NULL;
}
@@ -5991,10 +6150,10 @@ if ((re->options & PCRE_ANCHORED) == 0)
int ch = firstbyte & 255;
re->first_byte = ((firstbyte & REQ_CASELESS) != 0 &&
cd->fcc[ch] == ch)? ch : firstbyte;
- re->options |= PCRE_FIRSTSET;
+ re->flags |= PCRE_FIRSTSET;
}
else if (is_startline(codestart, 0, cd->backref_map))
- re->options |= PCRE_STARTLINE;
+ re->flags |= PCRE_STARTLINE;
}
}
@@ -6008,7 +6167,7 @@ if (reqbyte >= 0 &&
int ch = reqbyte & 255;
re->req_byte = ((reqbyte & REQ_CASELESS) != 0 &&
cd->fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte;
- re->options |= PCRE_REQCHSET;
+ re->flags |= PCRE_REQCHSET;
}
/* Print out the compiled data if debugging is enabled. This is never the
@@ -6021,7 +6180,7 @@ printf("Length = %d top_bracket = %d top_backref = %d\n",
printf("Options=%08x\n", re->options);
-if ((re->options & PCRE_FIRSTSET) != 0)
+if ((re->flags & PCRE_FIRSTSET) != 0)
{
int ch = re->first_byte & 255;
const char *caseless = ((re->first_byte & REQ_CASELESS) == 0)?
@@ -6030,7 +6189,7 @@ if ((re->options & PCRE_FIRSTSET) != 0)
else printf("First char = \\x%02x%s\n", ch, caseless);
}
-if ((re->options & PCRE_REQCHSET) != 0)
+if ((re->flags & PCRE_REQCHSET) != 0)
{
int ch = re->req_byte & 255;
const char *caseless = ((re->req_byte & REQ_CASELESS) == 0)?
@@ -6047,7 +6206,7 @@ was compiled can be seen. */
if (code - codestart > length)
{
(pcre_free)(re);
- *errorptr = error_texts[ERR23];
+ *errorptr = find_error_text(ERR23);
*erroroffset = ptr - (uschar *)pattern;
if (errorcodeptr != NULL) *errorcodeptr = ERR23;
return NULL;
diff --git a/ext/pcre/pcrelib/pcre_config.c b/ext/pcre/pcrelib/pcre_config.c
index 700a5d291..32f9047b0 100644
--- a/ext/pcre/pcrelib/pcre_config.c
+++ b/ext/pcre/pcrelib/pcre_config.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* This module contains the external function pcre_config(). */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
@@ -85,6 +85,14 @@ switch (what)
*((int *)where) = NEWLINE;
break;
+ case PCRE_CONFIG_BSR:
+#ifdef BSR_ANYCRLF
+ *((int *)where) = 1;
+#else
+ *((int *)where) = 0;
+#endif
+ break;
+
case PCRE_CONFIG_LINK_SIZE:
*((int *)where) = LINK_SIZE;
break;
diff --git a/ext/pcre/pcrelib/pcre_exec.c b/ext/pcre/pcrelib/pcre_exec.c
index 1c570a03b..5520d153b 100644
--- a/ext/pcre/pcrelib/pcre_exec.c
+++ b/ext/pcre/pcrelib/pcre_exec.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
pattern matching using an NFA algorithm, trying to mimic Perl as closely as
possible. There are also some static supporting functions. */
-#include <config.h>
+#include "config.h"
#define NLBLOCK md /* Block containing newline information */
#define PSSTART start_subject /* Field containing processed string start */
@@ -1524,12 +1524,16 @@ for (;;)
case 0x000d:
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
+
case 0x000a:
+ break;
+
case 0x000b:
case 0x000c:
case 0x0085:
case 0x2028:
case 0x2029:
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
ecode++;
@@ -2952,12 +2956,16 @@ for (;;)
case 0x000d:
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
+
case 0x000a:
+ break;
+
case 0x000b:
case 0x000c:
case 0x0085:
case 0x2028:
case 0x2029:
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
}
@@ -3170,9 +3178,12 @@ for (;;)
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
case 0x000a:
+ break;
+
case 0x000b:
case 0x000c:
case 0x0085:
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
}
@@ -3424,11 +3435,14 @@ for (;;)
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
case 0x000a:
+ break;
+
case 0x000b:
case 0x000c:
case 0x0085:
case 0x2028:
case 0x2029:
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
break;
@@ -3580,10 +3594,14 @@ for (;;)
case 0x000d:
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
+
case 0x000a:
+ break;
+
case 0x000b:
case 0x000c:
case 0x0085:
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
break;
@@ -3881,8 +3899,10 @@ for (;;)
}
else
{
- if (c != 0x000a && c != 0x000b && c != 0x000c &&
- c != 0x0085 && c != 0x2028 && c != 0x2029)
+ if (c != 0x000a &&
+ (md->bsr_anycrlf ||
+ (c != 0x000b && c != 0x000c &&
+ c != 0x0085 && c != 0x2028 && c != 0x2029)))
break;
eptr += len;
}
@@ -4072,7 +4092,9 @@ for (;;)
}
else
{
- if (c != 0x000a && c != 0x000b && c != 0x000c && c != 0x0085)
+ if (c != 0x000a &&
+ (md->bsr_anycrlf ||
+ (c != 0x000b && c != 0x000c && c != 0x0085)))
break;
eptr++;
}
@@ -4222,12 +4244,17 @@ HEAP_RETURN:
switch (frame->Xwhere)
{
LBL( 1) LBL( 2) LBL( 3) LBL( 4) LBL( 5) LBL( 6) LBL( 7) LBL( 8)
- LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(16)
- LBL(17) LBL(18) LBL(19) LBL(20) LBL(21) LBL(22) LBL(23) LBL(24)
- LBL(25) LBL(26) LBL(27) LBL(28) LBL(29) LBL(30) LBL(31) LBL(32)
- LBL(33) LBL(34) LBL(35) LBL(36) LBL(37) LBL(38) LBL(39) LBL(40)
- LBL(41) LBL(42) LBL(43) LBL(44) LBL(45) LBL(46) LBL(47) LBL(48)
- LBL(49) LBL(50) LBL(51) LBL(52) LBL(53) LBL(54)
+ LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(17)
+ LBL(19) LBL(24) LBL(25) LBL(26) LBL(27) LBL(29) LBL(31) LBL(33)
+ LBL(35) LBL(43) LBL(47) LBL(48) LBL(49) LBL(50) LBL(51) LBL(52)
+ LBL(53) LBL(54)
+#ifdef SUPPORT_UTF8
+ LBL(16) LBL(18) LBL(20) LBL(21) LBL(22) LBL(23) LBL(28) LBL(30)
+ LBL(32) LBL(34) LBL(42) LBL(46)
+#ifdef SUPPORT_UCP
+ LBL(36) LBL(37) LBL(38) LBL(39) LBL(40) LBL(41) LBL(44) LBL(45)
+#endif /* SUPPORT_UCP */
+#endif /* SUPPORT_UTF8 */
default:
DPRINTF(("jump error in pcre match: label %d non-existent\n", frame->Xwhere));
return PCRE_ERROR_INTERNAL;
@@ -4406,7 +4433,7 @@ if (re->magic_number != MAGIC_NUMBER)
/* Set up other data */
anchored = ((re->options | options) & PCRE_ANCHORED) != 0;
-startline = (re->options & PCRE_STARTLINE) != 0;
+startline = (re->flags & PCRE_STARTLINE) != 0;
firstline = (re->options & PCRE_FIRSTLINE) != 0;
/* The code starts after the real_pcre block and the capture name table. */
@@ -4433,11 +4460,37 @@ md->recursive = NULL; /* No recursion at top level */
md->lcc = tables + lcc_offset;
md->ctypes = tables + ctypes_offset;
+/* Handle different \R options. */
+
+switch (options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
+ {
+ case 0:
+ if ((re->options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)) != 0)
+ md->bsr_anycrlf = (re->options & PCRE_BSR_ANYCRLF) != 0;
+ else
+#ifdef BSR_ANYCRLF
+ md->bsr_anycrlf = TRUE;
+#else
+ md->bsr_anycrlf = FALSE;
+#endif
+ break;
+
+ case PCRE_BSR_ANYCRLF:
+ md->bsr_anycrlf = TRUE;
+ break;
+
+ case PCRE_BSR_UNICODE:
+ md->bsr_anycrlf = FALSE;
+ break;
+
+ default: return PCRE_ERROR_BADNEWLINE;
+ }
+
/* Handle different types of newline. The three bits give eight cases. If
nothing is set at run time, whatever was used at compile time applies. */
-switch ((((options & PCRE_NEWLINE_BITS) == 0)? re->options : (pcre_uint32)options) &
- PCRE_NEWLINE_BITS)
+switch ((((options & PCRE_NEWLINE_BITS) == 0)? re->options :
+ (pcre_uint32)options) & PCRE_NEWLINE_BITS)
{
case 0: newline = NEWLINE; break; /* Compile-time default */
case PCRE_NEWLINE_CR: newline = '\r'; break;
@@ -4476,7 +4529,7 @@ else
/* Partial matching is supported only for a restricted set of regexes at the
moment. */
-if (md->partial && (re->options & PCRE_NOPARTIAL) != 0)
+if (md->partial && (re->flags & PCRE_NOPARTIAL) != 0)
return PCRE_ERROR_BADPARTIAL;
/* Check a UTF-8 string if required. Unfortunately there's no way of passing
@@ -4553,7 +4606,7 @@ studied, there may be a bitmap of possible first characters. */
if (!anchored)
{
- if ((re->options & PCRE_FIRSTSET) != 0)
+ if ((re->flags & PCRE_FIRSTSET) != 0)
{
first_byte = re->first_byte & 255;
if ((first_byte_caseless = ((re->first_byte & REQ_CASELESS) != 0)) == TRUE)
@@ -4568,7 +4621,7 @@ if (!anchored)
/* For anchored or unanchored matches, there may be a "last known required
character" set. */
-if ((re->options & PCRE_REQCHSET) != 0)
+if ((re->flags & PCRE_REQCHSET) != 0)
{
req_byte = re->req_byte & 255;
req_byte_caseless = (re->req_byte & REQ_CASELESS) != 0;
@@ -4615,10 +4668,10 @@ for(;;)
if (first_byte_caseless)
while (start_match < end_subject &&
md->lcc[*start_match] != first_byte)
- start_match++;
+ { NEXTCHAR(start_match); }
else
while (start_match < end_subject && *start_match != first_byte)
- start_match++;
+ { NEXTCHAR(start_match); }
}
/* Or to just after a linebreak for a multiline match if possible */
@@ -4628,7 +4681,7 @@ for(;;)
if (start_match > md->start_subject + start_offset)
{
while (start_match <= end_subject && !WAS_NEWLINE(start_match))
- start_match++;
+ { NEXTCHAR(start_match); }
/* If we have just passed a CR and the newline option is ANY or ANYCRLF,
and we are now at a LF, advance the match position by one more character.
@@ -4649,7 +4702,9 @@ for(;;)
while (start_match < end_subject)
{
register unsigned int c = *start_match;
- if ((start_bits[c/8] & (1 << (c&7))) == 0) start_match++; else break;
+ if ((start_bits[c/8] & (1 << (c&7))) == 0)
+ { NEXTCHAR(start_match); }
+ else break;
}
}
@@ -4790,7 +4845,7 @@ for(;;)
if (start_match[-1] == '\r' &&
start_match < end_subject &&
*start_match == '\n' &&
- (re->options & PCRE_HASCRORLF) == 0 &&
+ (re->flags & PCRE_HASCRORLF) == 0 &&
(md->nltype == NLTYPE_ANY ||
md->nltype == NLTYPE_ANYCRLF ||
md->nllen == 2))
diff --git a/ext/pcre/pcrelib/pcre_fullinfo.c b/ext/pcre/pcrelib/pcre_fullinfo.c
index 1554292e6..b91ea035e 100644
--- a/ext/pcre/pcrelib/pcre_fullinfo.c
+++ b/ext/pcre/pcrelib/pcre_fullinfo.c
@@ -2,11 +2,11 @@
* Perl-Compatible Regular Expressions *
*************************************************/
-/*PCRE is a library of functions to support regular expressions whose syntax
+/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
information about a compiled pattern. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
@@ -108,8 +108,8 @@ switch (what)
case PCRE_INFO_FIRSTBYTE:
*((int *)where) =
- ((re->options & PCRE_FIRSTSET) != 0)? re->first_byte :
- ((re->options & PCRE_STARTLINE) != 0)? -1 : -2;
+ ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
+ ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
break;
/* Make sure we pass back the pointer to the bit vector in the external
@@ -123,7 +123,7 @@ switch (what)
case PCRE_INFO_LASTLITERAL:
*((int *)where) =
- ((re->options & PCRE_REQCHSET) != 0)? re->req_byte : -1;
+ ((re->flags & PCRE_REQCHSET) != 0)? re->req_byte : -1;
break;
case PCRE_INFO_NAMEENTRYSIZE:
@@ -143,15 +143,15 @@ switch (what)
break;
case PCRE_INFO_OKPARTIAL:
- *((int *)where) = (re->options & PCRE_NOPARTIAL) == 0;
+ *((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0;
break;
case PCRE_INFO_JCHANGED:
- *((int *)where) = (re->options & PCRE_JCHANGED) != 0;
+ *((int *)where) = (re->flags & PCRE_JCHANGED) != 0;
break;
case PCRE_INFO_HASCRORLF:
- *((int *)where) = (re->options & PCRE_HASCRORLF) != 0;
+ *((int *)where) = (re->flags & PCRE_HASCRORLF) != 0;
break;
default: return PCRE_ERROR_BADOPTION;
diff --git a/ext/pcre/pcrelib/pcre_get.c b/ext/pcre/pcrelib/pcre_get.c
index 898f051e8..c185c331a 100644
--- a/ext/pcre/pcrelib/pcre_get.c
+++ b/ext/pcre/pcrelib/pcre_get.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ from the subject string after a regex match has succeeded. The original idea
for these functions came from Scott Wimer. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
@@ -187,7 +187,7 @@ const real_pcre *re = (const real_pcre *)code;
int entrysize;
char *first, *last;
uschar *entry;
-if ((re->options & (PCRE_DUPNAMES | PCRE_JCHANGED)) == 0)
+if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
return pcre_get_stringnumber(code, stringname);
entrysize = pcre_get_stringtable_entries(code, stringname, &first, &last);
if (entrysize <= 0) return entrysize;
diff --git a/ext/pcre/pcrelib/pcre_globals.c b/ext/pcre/pcrelib/pcre_globals.c
index a56f13aa2..aa3ef90a2 100644
--- a/ext/pcre/pcrelib/pcre_globals.c
+++ b/ext/pcre/pcrelib/pcre_globals.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@ indirection. These values can be changed by the caller, but are shared between
all threads. However, when compiling for Virtual Pascal, things are done
differently, and global variables are not used (see pcre.in). */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
diff --git a/ext/pcre/pcrelib/pcre_info.c b/ext/pcre/pcrelib/pcre_info.c
index 6970e7953..f653d70bd 100644
--- a/ext/pcre/pcrelib/pcre_info.c
+++ b/ext/pcre/pcrelib/pcre_info.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ information about a compiled pattern. However, use of this function is now
deprecated, as it has been superseded by pcre_fullinfo(). */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
@@ -83,8 +83,8 @@ if (re->magic_number != MAGIC_NUMBER)
}
if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_OPTIONS);
if (first_byte != NULL)
- *first_byte = ((re->options & PCRE_FIRSTSET) != 0)? re->first_byte :
- ((re->options & PCRE_STARTLINE) != 0)? -1 : -2;
+ *first_byte = ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
+ ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
return re->top_bracket;
}
diff --git a/ext/pcre/pcrelib/pcre_internal.h b/ext/pcre/pcrelib/pcre_internal.h
index a2409f942..caf7b831d 100644
--- a/ext/pcre/pcrelib/pcre_internal.h
+++ b/ext/pcre/pcrelib/pcre_internal.h
@@ -7,7 +7,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -363,6 +363,7 @@ never be called in byte mode. To make sure it can never even appear when UTF-8
support is omitted, we don't even define it. */
#ifndef SUPPORT_UTF8
+#define NEXTCHAR(p) p++;
#define GETCHAR(c, eptr) c = *eptr;
#define GETCHARTEST(c, eptr) c = *eptr;
#define GETCHARINC(c, eptr) c = *eptr++;
@@ -372,6 +373,13 @@ support is omitted, we don't even define it. */
#else /* SUPPORT_UTF8 */
+/* Advance a character pointer one byte in non-UTF-8 mode and by one character
+in UTF-8 mode. */
+
+#define NEXTCHAR(p) \
+ p++; \
+ if (utf8) { while((*p & 0xc0) == 0x80) p++; }
+
/* Get the next UTF-8 character, not advancing the pointer. This is called when
we know we are in UTF-8 mode. */
@@ -481,18 +489,16 @@ Standard C system should have one. */
#define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)
-/* Private options flags start at the most significant end of the four bytes.
-The public options defined in pcre.h start at the least significant end. Make
-sure they don't overlap! The bits are getting a bit scarce now -- when we run
-out, there is a dummy word in the structure that could be used for the private
-bits. */
+/* Private flags containing information about the compiled regex. They used to
+live at the top end of the options word, but that got almost full, so now they
+are in a 16-bit flags word. */
-#define PCRE_NOPARTIAL 0x80000000 /* can't use partial with this regex */
-#define PCRE_FIRSTSET 0x40000000 /* first_byte is set */
-#define PCRE_REQCHSET 0x20000000 /* req_byte is set */
-#define PCRE_STARTLINE 0x10000000 /* start after \n for multiline */
-#define PCRE_JCHANGED 0x08000000 /* j option changes within regex */
-#define PCRE_HASCRORLF 0x04000000 /* explicit \r or \n in pattern */
+#define PCRE_NOPARTIAL 0x0001 /* can't use partial with this regex */
+#define PCRE_FIRSTSET 0x0002 /* first_byte is set */
+#define PCRE_REQCHSET 0x0004 /* req_byte is set */
+#define PCRE_STARTLINE 0x0008 /* start after \n for multiline */
+#define PCRE_JCHANGED 0x0010 /* j option used in regex */
+#define PCRE_HASCRORLF 0x0020 /* explicit \r or \n in pattern */
/* Options for the "extra" block produced by pcre_study(). */
@@ -508,15 +514,16 @@ time, run time, or study time, respectively. */
(PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \
PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \
PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \
- PCRE_DUPNAMES|PCRE_NEWLINE_BITS)
+ PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
#define PUBLIC_EXEC_OPTIONS \
(PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \
- PCRE_PARTIAL|PCRE_NEWLINE_BITS)
+ PCRE_PARTIAL|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
#define PUBLIC_DFA_EXEC_OPTIONS \
(PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \
- PCRE_PARTIAL|PCRE_DFA_SHORTEST|PCRE_DFA_RESTART|PCRE_NEWLINE_BITS)
+ PCRE_PARTIAL|PCRE_DFA_SHORTEST|PCRE_DFA_RESTART|PCRE_NEWLINE_BITS| \
+ PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
#define PUBLIC_STUDY_OPTIONS 0 /* None defined */
@@ -872,7 +879,7 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9,
ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39,
ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
- ERR60, ERR61 };
+ ERR60, ERR61, ERR62, ERR63 };
/* The real format of the start of the pcre block; the index of names and the
code vector run on as long as necessary after the end. We store an explicit
@@ -894,9 +901,9 @@ NOTE NOTE NOTE:
typedef struct real_pcre {
pcre_uint32 magic_number;
pcre_uint32 size; /* Total that was malloced */
- pcre_uint32 options;
- pcre_uint32 dummy1; /* For future use, maybe */
-
+ pcre_uint32 options; /* Public options */
+ pcre_uint16 flags; /* Private flags */
+ pcre_uint16 dummy1; /* For future use */
pcre_uint16 top_bracket;
pcre_uint16 top_backref;
pcre_uint16 first_byte;
@@ -935,12 +942,13 @@ typedef struct compile_data {
uschar *name_table; /* The name/number table */
int names_found; /* Number of entries so far */
int name_entry_size; /* Size of each entry */
- int bracount; /* Count of capturing parens */
+ int bracount; /* Count of capturing parens as we compile */
+ int final_bracount; /* Saved value after first pass */
int top_backref; /* Maximum back reference */
unsigned int backref_map; /* Bitmap of low back refs */
int external_options; /* External (initial) options */
+ int external_flags; /* External flag bits to be set */
int req_varyopt; /* "After variable item" flag for reqbyte */
- BOOL nopartial; /* Set TRUE if partial won't work */
BOOL had_accept; /* (*ACCEPT) encountered */
int nltype; /* Newline type */
int nllen; /* Newline string length */
@@ -1000,6 +1008,7 @@ typedef struct match_data {
BOOL notempty; /* Empty string match not wanted */
BOOL partial; /* PARTIAL flag */
BOOL hitend; /* Hit the end of the subject at some point */
+ BOOL bsr_anycrlf; /* \R is just any CRLF, not full Unicode */
const uschar *start_code; /* For use when recursing */
USPTR start_subject; /* Start of the subject string */
USPTR end_subject; /* End of the subject string */
@@ -1036,7 +1045,7 @@ typedef struct dfa_match_data {
#define ctype_letter 0x02
#define ctype_digit 0x04
#define ctype_xdigit 0x08
-#define ctype_word 0x10 /* alphameric or '_' */
+#define ctype_word 0x10 /* alphanumeric or '_' */
#define ctype_meta 0x80 /* regexp meta char or zero (end pattern) */
/* Offsets for the bitmap tables in pcre_cbits. Each table contains a set
@@ -1064,10 +1073,12 @@ total length. */
#define tables_length (ctypes_offset + 256)
/* Layout of the UCP type table that translates property names into types and
-codes. */
+codes. Each entry used to point directly to a name, but to reduce the number of
+relocations in shared libraries, it now has an offset into a single string
+instead. */
typedef struct {
- const char *name;
+ pcre_uint16 name_offset;
pcre_uint16 type;
pcre_uint16 value;
} ucp_type_table;
@@ -1085,6 +1096,7 @@ extern const uschar _pcre_utf8_table4[];
extern const int _pcre_utf8_table1_size;
+extern const char _pcre_utt_names[];
extern const ucp_type_table _pcre_utt[];
extern const int _pcre_utt_size;
diff --git a/ext/pcre/pcrelib/pcre_maketables.c b/ext/pcre/pcrelib/pcre_maketables.c
index cba42260c..2ba612cec 100644
--- a/ext/pcre/pcrelib/pcre_maketables.c
+++ b/ext/pcre/pcrelib/pcre_maketables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -45,7 +45,7 @@ compilation of dftables.c, in which case the macro DFTABLES is defined. */
#ifndef DFTABLES
-# include <config.h>
+# include "config.h"
# include "pcre_internal.h"
#endif
diff --git a/ext/pcre/pcrelib/pcre_newline.c b/ext/pcre/pcrelib/pcre_newline.c
index 9725c723d..e4223cbb6 100644
--- a/ext/pcre/pcrelib/pcre_newline.c
+++ b/ext/pcre/pcrelib/pcre_newline.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,7 @@ and NLTYPE_ANY. The full list of Unicode newline characters is taken from
http://unicode.org/unicode/reports/tr18/. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
diff --git a/ext/pcre/pcrelib/pcre_ord2utf8.c b/ext/pcre/pcrelib/pcre_ord2utf8.c
index ebb8a9d48..dfd88bcdb 100644
--- a/ext/pcre/pcrelib/pcre_ord2utf8.c
+++ b/ext/pcre/pcrelib/pcre_ord2utf8.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* This file contains a private PCRE function that converts an ordinal
character value into a UTF8 string. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
diff --git a/ext/pcre/pcrelib/pcre_printint.src b/ext/pcre/pcrelib/pcre_printint.src
index 90381ed96..98b42aa80 100644
--- a/ext/pcre/pcrelib/pcre_printint.src
+++ b/ext/pcre/pcrelib/pcre_printint.src
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -126,7 +126,7 @@ for (i = _pcre_utt_size - 1; i >= 0; i--)
{
if (ptype == _pcre_utt[i].type && pvalue == _pcre_utt[i].value) break;
}
-return (i >= 0)? _pcre_utt[i].name : "??";
+return (i >= 0)? _pcre_utt_names + _pcre_utt[i].name_offset : "??";
#else
/* It gets harder and harder to shut off unwanted compiler warnings. */
ptype = ptype * pvalue;
diff --git a/ext/pcre/pcrelib/pcre_refcount.c b/ext/pcre/pcrelib/pcre_refcount.c
index 7d3b7981c..f31399ea2 100644
--- a/ext/pcre/pcrelib/pcre_refcount.c
+++ b/ext/pcre/pcrelib/pcre_refcount.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@ pattern data block. This might be helpful in applications where the block is
shared by different users. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
diff --git a/ext/pcre/pcrelib/pcre_study.c b/ext/pcre/pcrelib/pcre_study.c
index 8c82d1ce6..b396d7218 100644
--- a/ext/pcre/pcrelib/pcre_study.c
+++ b/ext/pcre/pcrelib/pcre_study.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
supporting functions. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
@@ -525,7 +525,8 @@ code = (uschar *)re + re->name_table_offset +
a multiline pattern that matches only at "line starts", no further processing
at present. */
-if ((re->options & (PCRE_ANCHORED|PCRE_FIRSTSET|PCRE_STARTLINE)) != 0)
+if ((re->options & PCRE_ANCHORED) != 0 ||
+ (re->flags & (PCRE_FIRSTSET|PCRE_STARTLINE)) != 0)
return NULL;
/* Set the character tables in the block that is passed around */
diff --git a/ext/pcre/pcrelib/pcre_tables.c b/ext/pcre/pcrelib/pcre_tables.c
index 95d166975..646ddb568 100644
--- a/ext/pcre/pcrelib/pcre_tables.c
+++ b/ext/pcre/pcrelib/pcre_tables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@ uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
clashes with the library. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
@@ -85,115 +85,228 @@ const uschar _pcre_utf8_table4[] = {
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
-/* This table translates Unicode property names into type and code values. It
-is searched by binary chop, so must be in collating sequence of name. */
+/* The pcre_utt[] table below translates Unicode property names into type and
+code values. It is searched by binary chop, so must be in collating sequence of
+name. Originally, the table contained pointers to the name strings in the first
+field of each entry. However, that leads to a large number of relocations when
+a shared library is dynamically loaded. A significant reduction is made by
+putting all the names into a single, large string and then using offsets in the
+table itself. Maintenance is more error-prone, but frequent changes to this
+data is unlikely. */
+
+const char _pcre_utt_names[] =
+ "Any\0"
+ "Arabic\0"
+ "Armenian\0"
+ "Balinese\0"
+ "Bengali\0"
+ "Bopomofo\0"
+ "Braille\0"
+ "Buginese\0"
+ "Buhid\0"
+ "C\0"
+ "Canadian_Aboriginal\0"
+ "Cc\0"
+ "Cf\0"
+ "Cherokee\0"
+ "Cn\0"
+ "Co\0"
+ "Common\0"
+ "Coptic\0"
+ "Cs\0"
+ "Cuneiform\0"
+ "Cypriot\0"
+ "Cyrillic\0"
+ "Deseret\0"
+ "Devanagari\0"
+ "Ethiopic\0"
+ "Georgian\0"
+ "Glagolitic\0"
+ "Gothic\0"
+ "Greek\0"
+ "Gujarati\0"
+ "Gurmukhi\0"
+ "Han\0"
+ "Hangul\0"
+ "Hanunoo\0"
+ "Hebrew\0"
+ "Hiragana\0"
+ "Inherited\0"
+ "Kannada\0"
+ "Katakana\0"
+ "Kharoshthi\0"
+ "Khmer\0"
+ "L\0"
+ "L&\0"
+ "Lao\0"
+ "Latin\0"
+ "Limbu\0"
+ "Linear_B\0"
+ "Ll\0"
+ "Lm\0"
+ "Lo\0"
+ "Lt\0"
+ "Lu\0"
+ "M\0"
+ "Malayalam\0"
+ "Mc\0"
+ "Me\0"
+ "Mn\0"
+ "Mongolian\0"
+ "Myanmar\0"
+ "N\0"
+ "Nd\0"
+ "New_Tai_Lue\0"
+ "Nko\0"
+ "Nl\0"
+ "No\0"
+ "Ogham\0"
+ "Old_Italic\0"
+ "Old_Persian\0"
+ "Oriya\0"
+ "Osmanya\0"
+ "P\0"
+ "Pc\0"
+ "Pd\0"
+ "Pe\0"
+ "Pf\0"
+ "Phags_Pa\0"
+ "Phoenician\0"
+ "Pi\0"
+ "Po\0"
+ "Ps\0"
+ "Runic\0"
+ "S\0"
+ "Sc\0"
+ "Shavian\0"
+ "Sinhala\0"
+ "Sk\0"
+ "Sm\0"
+ "So\0"
+ "Syloti_Nagri\0"
+ "Syriac\0"
+ "Tagalog\0"
+ "Tagbanwa\0"
+ "Tai_Le\0"
+ "Tamil\0"
+ "Telugu\0"
+ "Thaana\0"
+ "Thai\0"
+ "Tibetan\0"
+ "Tifinagh\0"
+ "Ugaritic\0"
+ "Yi\0"
+ "Z\0"
+ "Zl\0"
+ "Zp\0"
+ "Zs\0";
const ucp_type_table _pcre_utt[] = {
- { "Any", PT_ANY, 0 },
- { "Arabic", PT_SC, ucp_Arabic },
- { "Armenian", PT_SC, ucp_Armenian },
- { "Balinese", PT_SC, ucp_Balinese },
- { "Bengali", PT_SC, ucp_Bengali },
- { "Bopomofo", PT_SC, ucp_Bopomofo },
- { "Braille", PT_SC, ucp_Braille },
- { "Buginese", PT_SC, ucp_Buginese },
- { "Buhid", PT_SC, ucp_Buhid },
- { "C", PT_GC, ucp_C },
- { "Canadian_Aboriginal", PT_SC, ucp_Canadian_Aboriginal },
- { "Cc", PT_PC, ucp_Cc },
- { "Cf", PT_PC, ucp_Cf },
- { "Cherokee", PT_SC, ucp_Cherokee },
- { "Cn", PT_PC, ucp_Cn },
- { "Co", PT_PC, ucp_Co },
- { "Common", PT_SC, ucp_Common },
- { "Coptic", PT_SC, ucp_Coptic },
- { "Cs", PT_PC, ucp_Cs },
- { "Cuneiform", PT_SC, ucp_Cuneiform },
- { "Cypriot", PT_SC, ucp_Cypriot },
- { "Cyrillic", PT_SC, ucp_Cyrillic },
- { "Deseret", PT_SC, ucp_Deseret },
- { "Devanagari", PT_SC, ucp_Devanagari },
- { "Ethiopic", PT_SC, ucp_Ethiopic },
- { "Georgian", PT_SC, ucp_Georgian },
- { "Glagolitic", PT_SC, ucp_Glagolitic },
- { "Gothic", PT_SC, ucp_Gothic },
- { "Greek", PT_SC, ucp_Greek },
- { "Gujarati", PT_SC, ucp_Gujarati },
- { "Gurmukhi", PT_SC, ucp_Gurmukhi },
- { "Han", PT_SC, ucp_Han },
- { "Hangul", PT_SC, ucp_Hangul },
- { "Hanunoo", PT_SC, ucp_Hanunoo },
- { "Hebrew", PT_SC, ucp_Hebrew },
- { "Hiragana", PT_SC, ucp_Hiragana },
- { "Inherited", PT_SC, ucp_Inherited },
- { "Kannada", PT_SC, ucp_Kannada },
- { "Katakana", PT_SC, ucp_Katakana },
- { "Kharoshthi", PT_SC, ucp_Kharoshthi },
- { "Khmer", PT_SC, ucp_Khmer },
- { "L", PT_GC, ucp_L },
- { "L&", PT_LAMP, 0 },
- { "Lao", PT_SC, ucp_Lao },
- { "Latin", PT_SC, ucp_Latin },
- { "Limbu", PT_SC, ucp_Limbu },
- { "Linear_B", PT_SC, ucp_Linear_B },
- { "Ll", PT_PC, ucp_Ll },
- { "Lm", PT_PC, ucp_Lm },
- { "Lo", PT_PC, ucp_Lo },
- { "Lt", PT_PC, ucp_Lt },
- { "Lu", PT_PC, ucp_Lu },
- { "M", PT_GC, ucp_M },
- { "Malayalam", PT_SC, ucp_Malayalam },
- { "Mc", PT_PC, ucp_Mc },
- { "Me", PT_PC, ucp_Me },
- { "Mn", PT_PC, ucp_Mn },
- { "Mongolian", PT_SC, ucp_Mongolian },
- { "Myanmar", PT_SC, ucp_Myanmar },
- { "N", PT_GC, ucp_N },
- { "Nd", PT_PC, ucp_Nd },
- { "New_Tai_Lue", PT_SC, ucp_New_Tai_Lue },
- { "Nko", PT_SC, ucp_Nko },
- { "Nl", PT_PC, ucp_Nl },
- { "No", PT_PC, ucp_No },
- { "Ogham", PT_SC, ucp_Ogham },
- { "Old_Italic", PT_SC, ucp_Old_Italic },
- { "Old_Persian", PT_SC, ucp_Old_Persian },
- { "Oriya", PT_SC, ucp_Oriya },
- { "Osmanya", PT_SC, ucp_Osmanya },
- { "P", PT_GC, ucp_P },
- { "Pc", PT_PC, ucp_Pc },
- { "Pd", PT_PC, ucp_Pd },
- { "Pe", PT_PC, ucp_Pe },
- { "Pf", PT_PC, ucp_Pf },
- { "Phags_Pa", PT_SC, ucp_Phags_Pa },
- { "Phoenician", PT_SC, ucp_Phoenician },
- { "Pi", PT_PC, ucp_Pi },
- { "Po", PT_PC, ucp_Po },
- { "Ps", PT_PC, ucp_Ps },
- { "Runic", PT_SC, ucp_Runic },
- { "S", PT_GC, ucp_S },
- { "Sc", PT_PC, ucp_Sc },
- { "Shavian", PT_SC, ucp_Shavian },
- { "Sinhala", PT_SC, ucp_Sinhala },
- { "Sk", PT_PC, ucp_Sk },
- { "Sm", PT_PC, ucp_Sm },
- { "So", PT_PC, ucp_So },
- { "Syloti_Nagri", PT_SC, ucp_Syloti_Nagri },
- { "Syriac", PT_SC, ucp_Syriac },
- { "Tagalog", PT_SC, ucp_Tagalog },
- { "Tagbanwa", PT_SC, ucp_Tagbanwa },
- { "Tai_Le", PT_SC, ucp_Tai_Le },
- { "Tamil", PT_SC, ucp_Tamil },
- { "Telugu", PT_SC, ucp_Telugu },
- { "Thaana", PT_SC, ucp_Thaana },
- { "Thai", PT_SC, ucp_Thai },
- { "Tibetan", PT_SC, ucp_Tibetan },
- { "Tifinagh", PT_SC, ucp_Tifinagh },
- { "Ugaritic", PT_SC, ucp_Ugaritic },
- { "Yi", PT_SC, ucp_Yi },
- { "Z", PT_GC, ucp_Z },
- { "Zl", PT_PC, ucp_Zl },
- { "Zp", PT_PC, ucp_Zp },
- { "Zs", PT_PC, ucp_Zs }
+ { 0, PT_ANY, 0 },
+ { 4, PT_SC, ucp_Arabic },
+ { 11, PT_SC, ucp_Armenian },
+ { 20, PT_SC, ucp_Balinese },
+ { 29, PT_SC, ucp_Bengali },
+ { 37, PT_SC, ucp_Bopomofo },
+ { 46, PT_SC, ucp_Braille },
+ { 54, PT_SC, ucp_Buginese },
+ { 63, PT_SC, ucp_Buhid },
+ { 69, PT_GC, ucp_C },
+ { 71, PT_SC, ucp_Canadian_Aboriginal },
+ { 91, PT_PC, ucp_Cc },
+ { 94, PT_PC, ucp_Cf },
+ { 97, PT_SC, ucp_Cherokee },
+ { 106, PT_PC, ucp_Cn },
+ { 109, PT_PC, ucp_Co },
+ { 112, PT_SC, ucp_Common },
+ { 119, PT_SC, ucp_Coptic },
+ { 126, PT_PC, ucp_Cs },
+ { 129, PT_SC, ucp_Cuneiform },
+ { 139, PT_SC, ucp_Cypriot },
+ { 147, PT_SC, ucp_Cyrillic },
+ { 156, PT_SC, ucp_Deseret },
+ { 164, PT_SC, ucp_Devanagari },
+ { 175, PT_SC, ucp_Ethiopic },
+ { 184, PT_SC, ucp_Georgian },
+ { 193, PT_SC, ucp_Glagolitic },
+ { 204, PT_SC, ucp_Gothic },
+ { 211, PT_SC, ucp_Greek },
+ { 217, PT_SC, ucp_Gujarati },
+ { 226, PT_SC, ucp_Gurmukhi },
+ { 235, PT_SC, ucp_Han },
+ { 239, PT_SC, ucp_Hangul },
+ { 246, PT_SC, ucp_Hanunoo },
+ { 254, PT_SC, ucp_Hebrew },
+ { 261, PT_SC, ucp_Hiragana },
+ { 270, PT_SC, ucp_Inherited },
+ { 280, PT_SC, ucp_Kannada },
+ { 288, PT_SC, ucp_Katakana },
+ { 297, PT_SC, ucp_Kharoshthi },
+ { 308, PT_SC, ucp_Khmer },
+ { 314, PT_GC, ucp_L },
+ { 316, PT_LAMP, 0 },
+ { 319, PT_SC, ucp_Lao },
+ { 323, PT_SC, ucp_Latin },
+ { 329, PT_SC, ucp_Limbu },
+ { 335, PT_SC, ucp_Linear_B },
+ { 344, PT_PC, ucp_Ll },
+ { 347, PT_PC, ucp_Lm },
+ { 350, PT_PC, ucp_Lo },
+ { 353, PT_PC, ucp_Lt },
+ { 356, PT_PC, ucp_Lu },
+ { 359, PT_GC, ucp_M },
+ { 361, PT_SC, ucp_Malayalam },
+ { 371, PT_PC, ucp_Mc },
+ { 374, PT_PC, ucp_Me },
+ { 377, PT_PC, ucp_Mn },
+ { 380, PT_SC, ucp_Mongolian },
+ { 390, PT_SC, ucp_Myanmar },
+ { 398, PT_GC, ucp_N },
+ { 400, PT_PC, ucp_Nd },
+ { 403, PT_SC, ucp_New_Tai_Lue },
+ { 415, PT_SC, ucp_Nko },
+ { 419, PT_PC, ucp_Nl },
+ { 422, PT_PC, ucp_No },
+ { 425, PT_SC, ucp_Ogham },
+ { 431, PT_SC, ucp_Old_Italic },
+ { 442, PT_SC, ucp_Old_Persian },
+ { 454, PT_SC, ucp_Oriya },
+ { 460, PT_SC, ucp_Osmanya },
+ { 468, PT_GC, ucp_P },
+ { 470, PT_PC, ucp_Pc },
+ { 473, PT_PC, ucp_Pd },
+ { 476, PT_PC, ucp_Pe },
+ { 479, PT_PC, ucp_Pf },
+ { 482, PT_SC, ucp_Phags_Pa },
+ { 491, PT_SC, ucp_Phoenician },
+ { 502, PT_PC, ucp_Pi },
+ { 505, PT_PC, ucp_Po },
+ { 508, PT_PC, ucp_Ps },
+ { 511, PT_SC, ucp_Runic },
+ { 517, PT_GC, ucp_S },
+ { 519, PT_PC, ucp_Sc },
+ { 522, PT_SC, ucp_Shavian },
+ { 530, PT_SC, ucp_Sinhala },
+ { 538, PT_PC, ucp_Sk },
+ { 541, PT_PC, ucp_Sm },
+ { 544, PT_PC, ucp_So },
+ { 547, PT_SC, ucp_Syloti_Nagri },
+ { 560, PT_SC, ucp_Syriac },
+ { 567, PT_SC, ucp_Tagalog },
+ { 575, PT_SC, ucp_Tagbanwa },
+ { 584, PT_SC, ucp_Tai_Le },
+ { 591, PT_SC, ucp_Tamil },
+ { 597, PT_SC, ucp_Telugu },
+ { 604, PT_SC, ucp_Thaana },
+ { 611, PT_SC, ucp_Thai },
+ { 616, PT_SC, ucp_Tibetan },
+ { 624, PT_SC, ucp_Tifinagh },
+ { 633, PT_SC, ucp_Ugaritic },
+ { 642, PT_SC, ucp_Yi },
+ { 645, PT_GC, ucp_Z },
+ { 647, PT_PC, ucp_Zl },
+ { 650, PT_PC, ucp_Zp },
+ { 653, PT_PC, ucp_Zs }
};
const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table);
diff --git a/ext/pcre/pcrelib/pcre_try_flipped.c b/ext/pcre/pcrelib/pcre_try_flipped.c
index cd7d21ecc..5e67943cc 100644
--- a/ext/pcre/pcrelib/pcre_try_flipped.c
+++ b/ext/pcre/pcrelib/pcre_try_flipped.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ see if it was compiled with the opposite endianness. If so, it uses an
auxiliary local function to flip the appropriate bytes. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
@@ -106,6 +106,7 @@ if (byteflip(re->magic_number, sizeof(re->magic_number)) != MAGIC_NUMBER)
*internal_re = *re; /* To copy other fields */
internal_re->size = byteflip(re->size, sizeof(re->size));
internal_re->options = byteflip(re->options, sizeof(re->options));
+internal_re->flags = (pcre_uint16)byteflip(re->flags, sizeof(re->flags));
internal_re->top_bracket =
(pcre_uint16)byteflip(re->top_bracket, sizeof(re->top_bracket));
internal_re->top_backref =
diff --git a/ext/pcre/pcrelib/pcre_ucp_searchfuncs.c b/ext/pcre/pcrelib/pcre_ucp_searchfuncs.c
index 95d42cf7c..668ae154d 100644
--- a/ext/pcre/pcrelib/pcre_ucp_searchfuncs.c
+++ b/ext/pcre/pcrelib/pcre_ucp_searchfuncs.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* This module contains code for searching the table of Unicode character
properties. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
diff --git a/ext/pcre/pcrelib/pcre_valid_utf8.c b/ext/pcre/pcrelib/pcre_valid_utf8.c
index 223e74085..6b341c195 100644
--- a/ext/pcre/pcrelib/pcre_valid_utf8.c
+++ b/ext/pcre/pcrelib/pcre_valid_utf8.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
strings. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
@@ -60,7 +60,7 @@ an invalid string are then undefined.
Originally, this function checked according to RFC 2279, allowing for values in
the range 0 to 0x7fffffff, up to 6 bytes long, but ensuring that they were in
the canonical format. Once somebody had pointed out RFC 3629 to me (it
-obsoletes 2279), additional restrictions were applies. The values are now
+obsoletes 2279), additional restrictions were applied. The values are now
limited to be between 0 and 0x0010ffff, no more than 4 bytes long, and the
subrange 0xd000 to 0xdfff is excluded.
diff --git a/ext/pcre/pcrelib/pcre_version.c b/ext/pcre/pcrelib/pcre_version.c
index 865453d9b..36ee93e71 100644
--- a/ext/pcre/pcrelib/pcre_version.c
+++ b/ext/pcre/pcrelib/pcre_version.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
string that identifies the PCRE version that is in use. */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
diff --git a/ext/pcre/pcrelib/pcre_xclass.c b/ext/pcre/pcrelib/pcre_xclass.c
index db5331b63..d22d9e648 100644
--- a/ext/pcre/pcrelib/pcre_xclass.c
+++ b/ext/pcre/pcrelib/pcre_xclass.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ class (one that contains characters whose values are > 255). It is used by both
pcre_exec() and pcre_def_exec(). */
-#include <config.h>
+#include "config.h"
#include "pcre_internal.h"
diff --git a/ext/pcre/pcrelib/pcredemo.c b/ext/pcre/pcrelib/pcredemo.c
index 4068e3e04..364756876 100644
--- a/ext/pcre/pcrelib/pcredemo.c
+++ b/ext/pcre/pcrelib/pcredemo.c
@@ -4,9 +4,11 @@
/* This is a demonstration program to illustrate the most straightforward ways
of calling the PCRE regular expression library from a C program. See the
-pcresample documentation for a short discussion.
+pcresample documentation for a short discussion ("man pcresample" if you have
+the PCRE man pages installed).
+
+In Unix-like environments, compile this program thuswise:
-Compile thuswise:
gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
-R/usr/local/lib -lpcre
@@ -14,8 +16,15 @@ Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
library files for PCRE are installed on your system. You don't need -I and -L
if PCRE is installed in the standard system libraries. Only some operating
systems (e.g. Solaris) use the -R option.
-*/
+Building under Windows:
+
+If you want to statically link this program against a non-dll .a file, you must
+define PCRE_STATIC before including pcre.h, otherwise the pcre_malloc() and
+pcre_free() exported functions will be declared __declspec(dllimport), with
+unwanted results. So in this environment, uncomment the following line. */
+
+/* #define PCRE_STATIC */
#include <stdio.h>
#include <string.h>
@@ -129,8 +138,8 @@ printf("\nMatch succeeded at offset %d\n", ovector[0]);
/*************************************************************************
* We have found the first match within the subject string. If the output *
-* vector wasn't big enough, set its size to the maximum. Then output any *
-* substrings that were captured. *
+* vector wasn't big enough, say so. Then output any substrings that were *
+* captured. *
*************************************************************************/
/* The output vector wasn't big enough */
@@ -155,7 +164,7 @@ for (i = 0; i < rc; i++)
/**************************************************************************
* That concludes the basic part of this demonstration program. We have *
* compiled a pattern, and performed a single match. The code that follows *
-* first shows how to access named substrings, and then how to code for *
+* shows first how to access named substrings, and then how to code for *
* repeated matches on the same subject. *
**************************************************************************/
diff --git a/ext/pcre/pcrelib/pcregrep.c b/ext/pcre/pcrelib/pcregrep.c
index 29338d159..f192f0c0c 100644
--- a/ext/pcre/pcrelib/pcregrep.c
+++ b/ext/pcre/pcrelib/pcregrep.c
@@ -6,7 +6,7 @@
its pattern matching. On a Unix or Win32 system it can recurse into
directories.
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
-#include <config.h>
+#include "config.h"
#include <ctype.h>
#include <locale.h>
@@ -53,7 +53,15 @@ POSSIBILITY OF SUCH DAMAGE.
#include <unistd.h>
#endif
-#include <pcre.h>
+#ifdef SUPPORT_LIBZ
+#include <zlib.h>
+#endif
+
+#ifdef SUPPORT_LIBBZ2
+#include <bzlib.h>
+#endif
+
+#include "pcre.h"
#define FALSE 0
#define TRUE 1
@@ -74,6 +82,10 @@ all values greater than FN_DEFAULT. */
enum { FN_NONE, FN_DEFAULT, FN_ONLY, FN_NOMATCH_ONLY, FN_FORCE };
+/* File reading styles */
+
+enum { FR_PLAIN, FR_LIBZ, FR_LIBBZ2 };
+
/* Actions for the -d and -D options */
enum { dee_READ, dee_SKIP, dee_RECURSE };
@@ -140,8 +152,10 @@ static int process_options = 0;
static BOOL count_only = FALSE;
static BOOL do_colour = FALSE;
+static BOOL file_offsets = FALSE;
static BOOL hyphenpending = FALSE;
static BOOL invert = FALSE;
+static BOOL line_offsets = FALSE;
static BOOL multiline = FALSE;
static BOOL number = FALSE;
static BOOL only_matching = FALSE;
@@ -172,6 +186,8 @@ used to identify them. */
#define N_LABEL (-5)
#define N_LOCALE (-6)
#define N_NULL (-7)
+#define N_LOFFSETS (-8)
+#define N_FOFFSETS (-9)
static option_item optionlist[] = {
{ OP_NODATA, N_NULL, NULL, "", " terminate options" },
@@ -187,15 +203,17 @@ static option_item optionlist[] = {
{ OP_PATLIST, 'e', NULL, "regex(p)", "specify pattern (may be used more than once)" },
{ OP_NODATA, 'F', NULL, "fixed_strings", "patterns are sets of newline-separated strings" },
{ OP_STRING, 'f', &pattern_filename, "file=path", "read patterns from file" },
+ { OP_NODATA, N_FOFFSETS, NULL, "file-offsets", "output file offsets, not text" },
{ OP_NODATA, 'H', NULL, "with-filename", "force the prefixing filename on output" },
{ OP_NODATA, 'h', NULL, "no-filename", "suppress the prefixing filename on output" },
{ OP_NODATA, 'i', NULL, "ignore-case", "ignore case distinctions" },
{ OP_NODATA, 'l', NULL, "files-with-matches", "print only FILE names containing matches" },
{ OP_NODATA, 'L', NULL, "files-without-match","print only FILE names not containing matches" },
{ OP_STRING, N_LABEL, &stdin_name, "label=name", "set name for standard input" },
+ { OP_NODATA, N_LOFFSETS, NULL, "line-offsets", "output line numbers and offsets, not text" },
{ OP_STRING, N_LOCALE, &locale, "locale=locale", "use the named locale" },
{ OP_NODATA, 'M', NULL, "multiline", "run in multiline mode" },
- { OP_STRING, 'N', &newline, "newline=type", "specify newline type (CR, LF, CRLF, ANYCRLF or ANY)" },
+ { OP_STRING, 'N', &newline, "newline=type", "set newline type (CR, LF, CRLF, ANYCRLF or ANY)" },
{ OP_NODATA, 'n', NULL, "line-number", "print line number with output lines" },
{ OP_NODATA, 'o', NULL, "only-matching", "show only the part of the line that matched" },
{ OP_NODATA, 'q', NULL, "quiet", "suppress output, just set return code" },
@@ -314,8 +332,9 @@ return isatty(fileno(stdout));
/* I (Philip Hazel) have no means of testing this code. It was contributed by
Lionel Fourquaux. David Burgess added a patch to define INVALID_FILE_ATTRIBUTES
-when it did not exist. */
-
+when it did not exist. David Byron added a patch that moved the #include of
+<windows.h> to before the INVALID_FILE_ATTRIBUTES definition rather than after.
+*/
#elif HAVE_WINDOWS_H
@@ -325,12 +344,13 @@ when it did not exist. */
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
+
+#include <windows.h>
+
#ifndef INVALID_FILE_ATTRIBUTES
#define INVALID_FILE_ATTRIBUTES 0xFFFFFFFF
#endif
-#include <windows.h>
-
typedef struct directory_type
{
HANDLE handle;
@@ -415,7 +435,7 @@ regular if they are not directories. */
int isregfile(char *filename)
{
-return !isdirectory(filename)
+return !isdirectory(filename);
}
@@ -426,7 +446,7 @@ return !isdirectory(filename)
static BOOL
is_stdout_tty(void)
{
-FALSE;
+return FALSE;
}
@@ -802,22 +822,27 @@ be in the middle third most of the time, so the bottom third is available for
"before" context printing.
Arguments:
- in the fopened FILE stream
+ handle the fopened FILE stream for a normal file
+ the gzFile pointer when reading is via libz
+ the BZFILE pointer when reading is via libbz2
+ frtype FR_PLAIN, FR_LIBZ, or FR_LIBBZ2
printname the file name if it is to be printed for each match
or NULL if the file name is not to be printed
it cannot be NULL if filenames[_nomatch]_only is set
Returns: 0 if there was at least one match
1 otherwise (no matches)
+ 2 if there is a read error on a .bz2 file
*/
static int
-pcregrep(FILE *in, char *printname)
+pcregrep(void *handle, int frtype, char *printname)
{
int rc = 1;
int linenumber = 1;
int lastmatchnumber = 0;
int count = 0;
+int filepos = 0;
int offsets[99];
char *lastmatchrestart = NULL;
char buffer[3*MBUFTHIRD];
@@ -825,11 +850,46 @@ char *ptr = buffer;
char *endptr;
size_t bufflength;
BOOL endhyphenpending = FALSE;
+FILE *in = NULL; /* Ensure initialized */
+
+#ifdef SUPPORT_LIBZ
+gzFile ingz = NULL;
+#endif
+
+#ifdef SUPPORT_LIBBZ2
+BZFILE *inbz2 = NULL;
+#endif
-/* Do the first read into the start of the buffer and set up the pointer to
-end of what we have. */
-bufflength = fread(buffer, 1, 3*MBUFTHIRD, in);
+/* Do the first read into the start of the buffer and set up the pointer to end
+of what we have. In the case of libz, a non-zipped .gz file will be read as a
+plain file. However, if a .bz2 file isn't actually bzipped, the first read will
+fail. */
+
+#ifdef SUPPORT_LIBZ
+if (frtype == FR_LIBZ)
+ {
+ ingz = (gzFile)handle;
+ bufflength = gzread (ingz, buffer, 3*MBUFTHIRD);
+ }
+else
+#endif
+
+#ifdef SUPPORT_LIBBZ2
+if (frtype == FR_LIBBZ2)
+ {
+ inbz2 = (BZFILE *)handle;
+ bufflength = BZ2_bzread(inbz2, buffer, 3*MBUFTHIRD);
+ if ((int)bufflength < 0) return 2; /* Gotcha: bufflength is size_t; */
+ } /* without the cast it is unsigned. */
+else
+#endif
+
+ {
+ in = (FILE *)handle;
+ bufflength = fread(buffer, 1, 3*MBUFTHIRD, in);
+ }
+
endptr = buffer + bufflength;
/* Loop while the current pointer is not at the end of the file. For large
@@ -842,6 +902,7 @@ while (ptr < endptr)
int i, endlinelength;
int mrc = 0;
BOOL match = FALSE;
+ char *matchptr = ptr;
char *t = ptr;
size_t length, linelength;
@@ -904,13 +965,17 @@ while (ptr < endptr)
}
#endif
+ /* We come back here after a match when the -o option (only_matching) is set,
+ in order to find any further matches in the same line. */
+
+ ONLY_MATCHING_RESTART:
/* Run through all the patterns until one matches. Note that we don't include
the final newline in the subject string. */
for (i = 0; i < pattern_count; i++)
{
- mrc = pcre_exec(pattern_list[i], hints_list[i], ptr, length, 0, 0,
+ mrc = pcre_exec(pattern_list[i], hints_list[i], matchptr, length, 0, 0,
offsets, 99);
if (mrc >= 0) { match = TRUE; break; }
if (mrc != PCRE_ERROR_NOMATCH)
@@ -918,7 +983,7 @@ while (ptr < endptr)
fprintf(stderr, "pcregrep: pcre_exec() error %d while matching ", mrc);
if (pattern_count > 1) fprintf(stderr, "pattern number %d to ", i+1);
fprintf(stderr, "this line:\n");
- fwrite(ptr, 1, linelength, stderr); /* In case binary zero included */
+ fwrite(matchptr, 1, linelength, stderr); /* In case binary zero included */
fprintf(stderr, "\n");
if (error_count == 0 &&
(mrc == PCRE_ERROR_MATCHLIMIT || mrc == PCRE_ERROR_RECURSIONLIMIT))
@@ -965,14 +1030,33 @@ while (ptr < endptr)
else if (quiet) return 0;
/* The --only-matching option prints just the substring that matched, and
- does not pring any context. */
+ the --file-offsets and --line-offsets options output offsets for the
+ matching substring (they both force --only-matching). None of these options
+ prints any context. Afterwards, adjust the start and length, and then jump
+ back to look for further matches in the same line. If we are in invert
+ mode, however, nothing is printed - this could be still useful because the
+ return code is set. */
else if (only_matching)
{
- if (printname != NULL) fprintf(stdout, "%s:", printname);
- if (number) fprintf(stdout, "%d:", linenumber);
- fwrite(ptr + offsets[0], 1, offsets[1] - offsets[0], stdout);
- fprintf(stdout, "\n");
+ if (!invert)
+ {
+ if (printname != NULL) fprintf(stdout, "%s:", printname);
+ if (number) fprintf(stdout, "%d:", linenumber);
+ if (line_offsets)
+ fprintf(stdout, "%d,%d", matchptr + offsets[0] - ptr,
+ offsets[1] - offsets[0]);
+ else if (file_offsets)
+ fprintf(stdout, "%d,%d", filepos + matchptr + offsets[0] - ptr,
+ offsets[1] - offsets[0]);
+ else
+ fwrite(matchptr + offsets[0], 1, offsets[1] - offsets[0], stdout);
+ fprintf(stdout, "\n");
+ matchptr += offsets[1];
+ length -= offsets[1];
+ match = FALSE;
+ goto ONLY_MATCHING_RESTART;
+ }
}
/* This is the default case when none of the above options is set. We print
@@ -1111,7 +1195,8 @@ while (ptr < endptr)
fprintf(stdout, "%c[%sm", 0x1b, colour_string);
fwrite(ptr + offsets[0], 1, offsets[1] - offsets[0], stdout);
fprintf(stdout, "%c[00m", 0x1b);
- fwrite(ptr + offsets[1], 1, linelength - offsets[1], stdout);
+ fwrite(ptr + offsets[1], 1, (linelength + endlinelength) - offsets[1],
+ stdout);
}
else fwrite(ptr, 1, linelength + endlinelength, stdout);
}
@@ -1145,9 +1230,11 @@ while (ptr < endptr)
linelength = endmatch - ptr - ellength;
}
- /* Advance to after the newline and increment the line number. */
+ /* Advance to after the newline and increment the line number. The file
+ offset to the current line is maintained in filepos. */
ptr += linelength + endlinelength;
+ filepos += linelength + endlinelength;
linenumber++;
/* If we haven't yet reached the end of the file (the buffer is full), and
@@ -1169,7 +1256,23 @@ while (ptr < endptr)
memmove(buffer, buffer + MBUFTHIRD, 2*MBUFTHIRD);
ptr -= MBUFTHIRD;
+
+#ifdef SUPPORT_LIBZ
+ if (frtype == FR_LIBZ)
+ bufflength = 2*MBUFTHIRD +
+ gzread (ingz, buffer + 2*MBUFTHIRD, MBUFTHIRD);
+ else
+#endif
+
+#ifdef SUPPORT_LIBBZ2
+ if (frtype == FR_LIBBZ2)
+ bufflength = 2*MBUFTHIRD +
+ BZ2_bzread(inbz2, buffer + 2*MBUFTHIRD, MBUFTHIRD);
+ else
+#endif
+
bufflength = 2*MBUFTHIRD + fread(buffer + 2*MBUFTHIRD, 1, MBUFTHIRD, in);
+
endptr = buffer + bufflength;
/* Adjust any last match point */
@@ -1233,18 +1336,28 @@ grep_or_recurse(char *pathname, BOOL dir_recurse, BOOL only_one_at_top)
{
int rc = 1;
int sep;
-FILE *in;
+int frtype;
+int pathlen;
+void *handle;
+FILE *in = NULL; /* Ensure initialized */
+
+#ifdef SUPPORT_LIBZ
+gzFile ingz = NULL;
+#endif
+
+#ifdef SUPPORT_LIBBZ2
+BZFILE *inbz2 = NULL;
+#endif
/* If the file name is "-" we scan stdin */
if (strcmp(pathname, "-") == 0)
{
- return pcregrep(stdin,
+ return pcregrep(stdin, FR_PLAIN,
(filenames > FN_DEFAULT || (filenames == FN_DEFAULT && !only_one_at_top))?
stdin_name : NULL);
}
-
/* If the file is a directory, skip if skipping or if we are recursing, scan
each file within it, subject to any include or exclude patterns that were set.
The scanning code is localized so it can be made system-specific. */
@@ -1301,8 +1414,54 @@ skipping was not requested. The scan proceeds. If this is the first and only
argument at top level, we don't show the file name, unless we are only showing
the file name, or the filename was forced (-H). */
-in = fopen(pathname, "r");
-if (in == NULL)
+pathlen = strlen(pathname);
+
+/* Open using zlib if it is supported and the file name ends with .gz. */
+
+#ifdef SUPPORT_LIBZ
+if (pathlen > 3 && strcmp(pathname + pathlen - 3, ".gz") == 0)
+ {
+ ingz = gzopen(pathname, "rb");
+ if (ingz == NULL)
+ {
+ if (!silent)
+ fprintf(stderr, "pcregrep: Failed to open %s: %s\n", pathname,
+ strerror(errno));
+ return 2;
+ }
+ handle = (void *)ingz;
+ frtype = FR_LIBZ;
+ }
+else
+#endif
+
+/* Otherwise open with bz2lib if it is supported and the name ends with .bz2. */
+
+#ifdef SUPPORT_LIBBZ2
+if (pathlen > 4 && strcmp(pathname + pathlen - 4, ".bz2") == 0)
+ {
+ inbz2 = BZ2_bzopen(pathname, "rb");
+ handle = (void *)inbz2;
+ frtype = FR_LIBBZ2;
+ }
+else
+#endif
+
+/* Otherwise use plain fopen(). The label is so that we can come back here if
+an attempt to read a .bz2 file indicates that it really is a plain file. */
+
+#ifdef SUPPORT_LIBBZ2
+PLAIN_FILE:
+#endif
+ {
+ in = fopen(pathname, "r");
+ handle = (void *)in;
+ frtype = FR_PLAIN;
+ }
+
+/* All the opening methods return errno when they fail. */
+
+if (handle == NULL)
{
if (!silent)
fprintf(stderr, "pcregrep: Failed to open %s: %s\n", pathname,
@@ -1310,10 +1469,50 @@ if (in == NULL)
return 2;
}
-rc = pcregrep(in, (filenames > FN_DEFAULT ||
+/* Now grep the file */
+
+rc = pcregrep(handle, frtype, (filenames > FN_DEFAULT ||
(filenames == FN_DEFAULT && !only_one_at_top))? pathname : NULL);
+/* Close in an appropriate manner. */
+
+#ifdef SUPPORT_LIBZ
+if (frtype == FR_LIBZ)
+ gzclose(ingz);
+else
+#endif
+
+/* If it is a .bz2 file and the result is 2, it means that the first attempt to
+read failed. If the error indicates that the file isn't in fact bzipped, try
+again as a normal file. */
+
+#ifdef SUPPORT_LIBBZ2
+if (frtype == FR_LIBBZ2)
+ {
+ if (rc == 2)
+ {
+ int errnum;
+ const char *err = BZ2_bzerror(inbz2, &errnum);
+ if (errnum == BZ_DATA_ERROR_MAGIC)
+ {
+ BZ2_bzclose(inbz2);
+ goto PLAIN_FILE;
+ }
+ else if (!silent)
+ fprintf(stderr, "pcregrep: Failed to read %s using bzlib: %s\n",
+ pathname, err);
+ }
+ BZ2_bzclose(inbz2);
+ }
+else
+#endif
+
+/* Normal file close */
+
fclose(in);
+
+/* Pass back the yield from pcregrep(). */
+
return rc;
}
@@ -1334,7 +1533,8 @@ for (op = optionlist; op->one_char != 0; op++)
if (op->one_char > 0) fprintf(stderr, "%c", op->one_char);
}
fprintf(stderr, "] [long options] [pattern] [files]\n");
-fprintf(stderr, "Type `pcregrep --help' for more information.\n");
+fprintf(stderr, "Type `pcregrep --help' for more information and the long "
+ "options.\n");
return rc;
}
@@ -1353,9 +1553,23 @@ option_item *op;
printf("Usage: pcregrep [OPTION]... [PATTERN] [FILE1 FILE2 ...]\n");
printf("Search for PATTERN in each FILE or standard input.\n");
printf("PATTERN must be present if neither -e nor -f is used.\n");
-printf("\"-\" can be used as a file name to mean STDIN.\n\n");
-printf("Example: pcregrep -i 'hello.*world' menu.h main.c\n\n");
+printf("\"-\" can be used as a file name to mean STDIN.\n");
+
+#ifdef SUPPORT_LIBZ
+printf("Files whose names end in .gz are read using zlib.\n");
+#endif
+
+#ifdef SUPPORT_LIBBZ2
+printf("Files whose names end in .bz2 are read using bzlib2.\n");
+#endif
+#if defined SUPPORT_LIBZ || defined SUPPORT_LIBBZ2
+printf("Other files and the standard input are read as plain files.\n\n");
+#else
+printf("All files are read as plain files, without any interpretation.\n\n");
+#endif
+
+printf("Example: pcregrep -i 'hello.*world' menu.h main.c\n\n");
printf("Options:\n");
for (op = optionlist; op->one_char != 0; op++)
@@ -1363,8 +1577,7 @@ for (op = optionlist; op->one_char != 0; op++)
int n;
char s[4];
if (op->one_char > 0) sprintf(s, "-%c,", op->one_char); else strcpy(s, " ");
- printf(" %s --%s%n", s, op->long_name, &n);
- n = 30 - n;
+ n = 30 - printf(" %s --%s", s, op->long_name);
if (n < 1) n = 1;
printf("%.*s%s\n", n, " ", op->help_text);
}
@@ -1389,7 +1602,9 @@ handle_option(int letter, int options)
{
switch(letter)
{
+ case N_FOFFSETS: file_offsets = TRUE; break;
case N_HELP: help(); exit(0);
+ case N_LOFFSETS: line_offsets = number = TRUE; break;
case 'c': count_only = TRUE; break;
case 'F': process_options |= PO_FIXED_STRINGS; break;
case 'H': filenames = FN_FORCE; break;
@@ -1826,6 +2041,19 @@ if (both_context > 0)
if (before_context == 0) before_context = both_context;
}
+/* Only one of --only-matching, --file-offsets, or --line-offsets is permitted.
+However, the latter two set the only_matching flag. */
+
+if ((only_matching && (file_offsets || line_offsets)) ||
+ (file_offsets && line_offsets))
+ {
+ fprintf(stderr, "pcregrep: Cannot mix --only-matching, --file-offsets "
+ "and/or --line-offsets\n");
+ exit(usage(2));
+ }
+
+if (file_offsets || line_offsets) only_matching = TRUE;
+
/* If a locale has not been provided as an option, see if the LC_CTYPE or
LC_ALL environment variable is set, and if so, use it. */
@@ -2063,7 +2291,7 @@ if (include_pattern != NULL)
if (i >= argc)
{
- rc = pcregrep(stdin, (filenames > FN_DEFAULT)? stdin_name : NULL);
+ rc = pcregrep(stdin, FR_PLAIN, (filenames > FN_DEFAULT)? stdin_name : NULL);
goto EXIT;
}
diff --git a/ext/pcre/pcrelib/pcreposix.c b/ext/pcre/pcrelib/pcreposix.c
index 9c0adebb9..4cb5e12a1 100644
--- a/ext/pcre/pcrelib/pcreposix.c
+++ b/ext/pcre/pcrelib/pcreposix.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
functions. */
-#include <config.h>
+#include "config.h"
/* Ensure that the PCREPOSIX_EXP_xxx macros are set appropriately for
@@ -55,12 +55,11 @@ previously been set. */
# define PCREPOSIX_EXP_DEFN __declspec(dllexport)
#endif
-#include <pcre.h>
+#include "pcre.h"
#include "pcre_internal.h"
#include "pcreposix.h"
-
/* Table to translate PCRE compile time error codes into POSIX error codes. */
static const int eint[] = {
@@ -123,7 +122,9 @@ static const int eint[] = {
REG_INVARG, /* inconsistent NEWLINE options */
REG_BADPAT, /* \g is not followed followed by an (optionally braced) non-zero number */
REG_BADPAT, /* (?+ or (?- must be followed by a non-zero number */
- REG_BADPAT /* number is too big */
+ REG_BADPAT, /* number is too big */
+ REG_BADPAT, /* subpattern name expected */
+ REG_BADPAT /* digit expected after (?+ */
};
/* Table of texts corresponding to POSIX error codes */
diff --git a/ext/pcre/pcrelib/pcreposix.h b/ext/pcre/pcrelib/pcreposix.h
index 875e1ff18..109376d90 100644
--- a/ext/pcre/pcrelib/pcreposix.h
+++ b/ext/pcre/pcrelib/pcreposix.h
@@ -9,7 +9,7 @@
Compatible Regular Expression library. It defines the things POSIX says should
be there. I hope.
- Copyright (c) 1997-2007 University of Cambridge
+ Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/ext/pcre/pcrelib/testdata/grepoutput b/ext/pcre/pcrelib/testdata/grepoutput
index d5506a109..3241984c1 100644
--- a/ext/pcre/pcrelib/testdata/grepoutput
+++ b/ext/pcre/pcrelib/testdata/grepoutput
@@ -358,10 +358,13 @@ after the binary zero
./testdata/grepinput:597:after the binary zero
---------------------------- Test 42 ------------------------------
595:before
+595:zero
596:zero
597:after
+597:zero
---------------------------- Test 43 ------------------------------
595:before
+595:zero
596:zero
597:zero
---------------------------- Test 44 ------------------------------
@@ -385,3 +388,17 @@ PUT NEW DATA ABOVE THIS LINE.
---------------------------- Test 49 ------------------------------
---------------------------- Test 50 ------------------------------
over the lazy dog.
+---------------------------- Test 51 ------------------------------
+fox jumps
+---------------------------- Test 52 ------------------------------
+36972,6
+36990,4
+37024,4
+37066,5
+37083,4
+---------------------------- Test 53 ------------------------------
+595:15,6
+595:33,4
+596:28,4
+597:15,5
+597:32,4
diff --git a/ext/pcre/pcrelib/testdata/testinput1 b/ext/pcre/pcrelib/testdata/testinput1
index 79c98fa7b..91554ffc4 100644
--- a/ext/pcre/pcrelib/testdata/testinput1
+++ b/ext/pcre/pcrelib/testdata/testinput1
@@ -3421,11 +3421,6 @@
/((?m)^b)/
a\nb\nc\n
-/(?(1)a|b)/
-
-/(?(1)b|a)/
- a
-
/(x)?(?(1)a|b)/
*** Failers
a
@@ -4030,4 +4025,15 @@
/( (?(1)0|)* )/x
abcd
+/[[:abcd:xyz]]/
+ a]
+ :]
+
+/[abc[:x\]pqr]/
+ a
+ [
+ :
+ ]
+ p
+
/ End of testinput1 /
diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2
index c9f1018a9..1a13fa8dd 100644
--- a/ext/pcre/pcrelib/testdata/testinput2
+++ b/ext/pcre/pcrelib/testdata/testinput2
@@ -398,8 +398,6 @@
/(?(1?)a|b)/
-/(?(1)a|b|c)/
-
/[a[:xyz:/
/(?<=x+)y/
@@ -568,15 +566,15 @@
/ab\d+/I
-/a(?(1)b)/I
+/a(?(1)b)(.)/I
-/a(?(1)bag|big)/I
+/a(?(1)bag|big)(.)/I
-/a(?(1)bag|big)*/I
+/a(?(1)bag|big)*(.)/I
-/a(?(1)bag|big)+/I
+/a(?(1)bag|big)+(.)/I
-/a(?(1)b..|b..)/I
+/a(?(1)b..|b..)(.)/I
/ab\d{0}e/I
@@ -977,13 +975,13 @@
/()a/I
-/(?(1)ab|ac)/I
+/(?(1)ab|ac)(.)/I
-/(?(1)abz|acz)/I
+/(?(1)abz|acz)(.)/I
-/(?(1)abz)/I
+/(?(1)abz)(.)/I
-/(?(1)abz)123/I
+/(?(1)abz)(1)23/I
/(a)+/I
@@ -1999,7 +1997,7 @@ a random value. /Ix
/a/<any><crlf>
-/^a\Rb/
+/^a\Rb/<bsr_unicode>
a\nb
a\rb
a\r\nb
@@ -2009,7 +2007,7 @@ a random value. /Ix
** Failers
a\n\rb
-/^a\R*b/
+/^a\R*b/<bsr_unicode>
ab
a\nb
a\rb
@@ -2020,7 +2018,7 @@ a random value. /Ix
a\n\rb
a\n\r\x85\x0cb
-/^a\R+b/
+/^a\R+b/<bsr_unicode>
a\nb
a\rb
a\r\nb
@@ -2032,7 +2030,7 @@ a random value. /Ix
** Failers
ab
-/^a\R{1,3}b/
+/^a\R{1,3}b/<bsr_unicode>
a\nb
a\n\rb
a\n\r\x85b
@@ -2044,7 +2042,7 @@ a random value. /Ix
a\n\n\n\rb
a\r
-/^a[\R]b/
+/^a[\R]b/<bsr_unicode>
aRb
** Failers
a\nb
@@ -2190,8 +2188,8 @@ a random value. /Ix
/((?(-2)a))/BZ
-/^(?(+1)X|Y)/BZ
- Y
+/^(?(+1)X|Y)(.)/BZ
+ Y!
/(foo)\Kbar/
foobar
@@ -2464,4 +2462,131 @@ a random value. /Ix
a\r\nb
a\x85b
+/a\Rb/I<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x85b
+ a\x0bb
+
+/a\Rb/I<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x85b
+ a\x0bb
+ ** Failers
+ a\x85b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/a\R?b/I<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x85b
+ a\x0bb
+
+/a\R?b/I<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x85b
+ a\x0bb
+ ** Failers
+ a\x85b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/a\R{2,4}b/I<bsr_anycrlf>
+ a\r\n\nb
+ a\n\r\rb
+ a\r\n\r\n\r\n\r\nb
+ ** Failers
+ a\x85\85b
+ a\x0b\0bb
+
+/a\R{2,4}b/I<bsr_unicode>
+ a\r\rb
+ a\n\n\nb
+ a\r\n\n\r\rb
+ a\x85\85b
+ a\x0b\0bb
+ ** Failers
+ a\r\r\r\r\rb
+ a\x85\85b\<bsr_anycrlf>
+ a\x0b\0bb\<bsr_anycrlf>
+
+/(*BSR_ANYCRLF)a\Rb/I
+ a\nb
+ a\rb
+
+/(*BSR_UNICODE)a\Rb/I
+ a\x85b
+
+/(*BSR_ANYCRLF)(*CRLF)a\Rb/I
+ a\nb
+ a\rb
+
+/(*CRLF)(*BSR_UNICODE)a\Rb/I
+ a\x85b
+
+/(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
+
+/(?<a>)(?&)/
+
+/(?<abc>)(?&a)/
+
+/(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
+
+/(?+-a)/
+
+/(?-+a)/
+
+/(?(-1))/
+
+/(?(+10))/
+
+/(?(10))/
+
+/(?(+2))()()/
+
+/(?(2))()()/
+
+/\k''/
+
+/\k<>/
+
+/\k{}/
+
+/(?P=)/
+
+/(?P>)/
+
+/(?!\w)(?R)/
+
+/(?=\w)(?R)/
+
+/(?<!\w)(?R)/
+
+/(?<=\w)(?R)/
+
+/[[:foo:]]/
+
+/[[:1234:]]/
+
+/[[:f\oo:]]/
+
+/[[: :]]/
+
+/[[:...:]]/
+
+/[[:l\ower:]]/
+
+/[[:abc\:]]/
+
+/[abc[:x\]pqr:]]/
+
+/[[:a\dz:]]/
+
/ End of testinput2 /
diff --git a/ext/pcre/pcrelib/testdata/testinput4 b/ext/pcre/pcrelib/testdata/testinput4
index 630fb1d53..c98c08520 100644
--- a/ext/pcre/pcrelib/testdata/testinput4
+++ b/ext/pcre/pcrelib/testdata/testinput4
@@ -535,4 +535,78 @@
/\W{2}/8g
+\x{a3}==
+/\S/8g
+ \x{442}\x{435}\x{441}\x{442}
+
+/[\S]/8g
+ \x{442}\x{435}\x{441}\x{442}
+
+/\D/8g
+ \x{442}\x{435}\x{441}\x{442}
+
+/[\D]/8g
+ \x{442}\x{435}\x{441}\x{442}
+
+/\W/8g
+ \x{2442}\x{2435}\x{2441}\x{2442}
+
+/[\W]/8g
+ \x{2442}\x{2435}\x{2441}\x{2442}
+
+/[\S\s]*/8
+ abc\n\r\x{442}\x{435}\x{441}\x{442}xyz
+
+/[\x{41f}\S]/8g
+ \x{442}\x{435}\x{441}\x{442}
+
+/.[^\S]./8g
+ abc def\x{442}\x{443}xyz\npqr
+
+/.[^\S\n]./8g
+ abc def\x{442}\x{443}xyz\npqr
+
+/[[:^alnum:]]/8g
+ +\x{2442}
+
+/[[:^alpha:]]/8g
+ +\x{2442}
+
+/[[:^ascii:]]/8g
+ A\x{442}
+
+/[[:^blank:]]/8g
+ A\x{442}
+
+/[[:^cntrl:]]/8g
+ A\x{442}
+
+/[[:^digit:]]/8g
+ A\x{442}
+
+/[[:^graph:]]/8g
+ \x19\x{e01ff}
+
+/[[:^lower:]]/8g
+ A\x{422}
+
+/[[:^print:]]/8g
+ \x{19}\x{e01ff}
+
+/[[:^punct:]]/8g
+ A\x{442}
+
+/[[:^space:]]/8g
+ A\x{442}
+
+/[[:^upper:]]/8g
+ a\x{442}
+
+/[[:^word:]]/8g
+ +\x{2442}
+
+/[[:^xdigit:]]/8g
+ M\x{442}
+
+/[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖØÙÚÛÜÃÞĀĂĄĆĈĊČĎÄĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿÅŃŅŇŊŌŎÅÅ’Å”Å–Å˜ÅšÅœÅžÅ Å¢Å¤Å¦Å¨ÅªÅ¬Å®Å°Å²Å´Å¶Å¸Å¹Å»Å½ÆÆ‚Æ„Æ†Æ‡Æ‰ÆŠÆ‹ÆŽÆÆÆ‘Æ“Æ”Æ–Æ—Æ˜ÆœÆÆŸÆ Æ¢Æ¤Æ¦Æ§Æ©Æ¬Æ®Æ¯Æ±Æ²Æ³ÆµÆ·Æ¸Æ¼Ç„LJNJÇÇǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎÈȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾÉΆΈΉΊΌΎÎΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀÐЂЃЄЅІЇЈЉЊЋЌÐÐŽÐÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎÒҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀÓÓƒÓ…Ó‡Ó‰Ó‹ÓÓӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀÕÕ‚ÕƒÕ„Õ…Õ†Õ‡ÕˆÕ‰ÕŠÕ‹ÕŒÕÕŽÕÕՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀáƒáƒ‚ჃჄჅḀḂḄḆḈḊḌḎá¸á¸’ḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎá¹á¹’ṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎáºáº’ẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎá»á»’ỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌá¼á¼Žá¼á¼˜á¼™á¼šá¼›á¼œá¼á¼¨á¼©á¼ªá¼«á¼¬á¼­á¼®á¼¯á¼¸á¼¹á¼ºá¼»á¼¼á¼½á¼¾á¼¿á½ˆá½‰á½Šá½‹á½Œá½á½™á½›á½á½Ÿá½¨á½©á½ªá½«á½¬á½­á½®á½¯á¾¸á¾¹á¾ºá¾»á¿ˆá¿‰á¿Šá¿‹á¿˜á¿™á¿šá¿›á¿¨á¿©á¿ªá¿«á¿¬á¿¸á¿¹á¿ºá¿»abcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÄăąćĉċÄÄđēĕėęěÄğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋÅÅőœŕŗřśÅÅŸÅ¡Å£Å¥Å§Å©Å«Å­Å¯Å±Å³ÅµÅ·ÅºÅ¼Å¾Å¿Æ€ÆƒÆ…ÆˆÆŒÆÆ’ƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎÇǒǔǖǘǚǜÇǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿÈȃȅȇȉȋÈÈȑȓȕȗșțÈȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀÉɑɒɓɔɕɖɗɘəɚɛɜÉɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀÊʂʃʄʅʆʇʈʉʊʋʌÊÊŽÊÊʑʒʓʔʕʖʗʘʙʚʛʜÊʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯÎάέήίΰαβγδεζηθικλμνξοπÏςστυφχψωϊϋόÏÏŽÏϑϕϖϗϙϛÏϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑÑёђѓєѕіїјљњћќÑўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿÒÒ‹ÒÒÒ‘Ò“Ò•Ò—Ò™Ò›ÒҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛÓÓŸÓ¡Ó£Ó¥Ó§Ó©Ó«Ó­Ó¯Ó±Ó³ÓµÓ·Ó¹ÔÔƒÔ…Ô‡Ô‰Ô‹ÔÔÕ¡Õ¢Õ£Õ¤Õ¥Õ¦Õ§Õ¨Õ©ÕªÕ«Õ¬Õ­Õ®Õ¯Õ°Õ±Õ²Õ³Õ´ÕµÕ¶Õ·Õ¸Õ¹ÕºÕ»Õ¼Õ½Õ¾Õ¿Ö€Öւփքօֆևᴀá´á´‚ᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌá´á´Žá´á´á´‘ᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜá´á´žá´Ÿá´ á´¡á´¢á´£á´¤á´¥á´¦á´§á´¨á´©á´ªá´«áµ¢áµ£áµ¤áµ¥áµ¦áµ§áµ¨áµ©áµªáµ«áµ¬áµ­áµ®áµ¯áµ°áµ±áµ²áµ³áµ´áµµáµ¶áµ·áµ¹áµºáµ»áµ¼áµ½áµ¾áµ¿á¶€á¶á¶‚ᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌá¶á¶Žá¶á¶á¶‘ᶒᶓᶔᶕᶖᶗᶘᶙᶚá¸á¸ƒá¸…ḇḉḋá¸á¸á¸‘ḓḕḗḙḛá¸á¸Ÿá¸¡á¸£á¸¥á¸§á¸©á¸«á¸­á¸¯á¸±á¸³á¸µá¸·á¸¹á¸»á¸½á¸¿á¹á¹ƒá¹…ṇṉṋá¹á¹á¹‘ṓṕṗṙṛá¹á¹Ÿá¹¡á¹£á¹¥á¹§á¹©á¹«á¹­á¹¯á¹±á¹³á¹µá¹·á¹¹á¹»á¹½á¹¿áºáºƒáº…ẇẉẋáºáºáº‘ẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếá»á»ƒá»…ệỉịá»á»á»‘ồổỗộớá»á»Ÿá»¡á»£á»¥á»§á»©á»«á»­á»¯á»±á»³á»µá»·á»¹á¼€á¼á¼‚ἃἄἅἆἇá¼á¼‘ἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀá½á½‚ὃὄὅá½á½‘ὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀá¾á¾‚ᾃᾄᾅᾆᾇá¾á¾‘ᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇá¿á¿‘ῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷâ²â²ƒâ²…ⲇⲉⲋâ²â²â²‘ⲓⲕⲗⲙⲛâ²â²Ÿâ²¡â²£â²¥â²§â²©â²«â²­â²¯â²±â²³â²µâ²·â²¹â²»â²½â²¿â³â³ƒâ³…ⳇⳉⳋâ³â³â³‘ⳓⳕⳗⳙⳛâ³â³Ÿâ³¡â³£â³¤â´€â´â´‚ⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌâ´â´Žâ´â´â´‘ⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜâ´â´žâ´Ÿâ´ â´¡â´¢â´£â´¤â´¥ï¬€ï¬ï¬‚ffifflſtstﬓﬔﬕﬖﬗ\d-_^]/8
+
/ End of testinput4 /
diff --git a/ext/pcre/pcrelib/testdata/testinput5 b/ext/pcre/pcrelib/testdata/testinput5
index aa0123b3e..75a4857b4 100644
--- a/ext/pcre/pcrelib/testdata/testinput5
+++ b/ext/pcre/pcrelib/testdata/testinput5
@@ -312,7 +312,7 @@ can't tell the difference.) --/
/abc.$/mgx8<any>
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
-/^a\Rb/8
+/^a\Rb/8<bsr_unicode>
a\nb
a\rb
a\r\nb
@@ -324,7 +324,7 @@ can't tell the difference.) --/
** Failers
a\n\rb
-/^a\R*b/8
+/^a\R*b/8<bsr_unicode>
ab
a\nb
a\rb
@@ -335,7 +335,7 @@ can't tell the difference.) --/
a\n\rb
a\n\r\x{85}\x0cb
-/^a\R+b/8
+/^a\R+b/8<bsr_unicode>
a\nb
a\rb
a\r\nb
@@ -347,7 +347,7 @@ can't tell the difference.) --/
** Failers
ab
-/^a\R{1,3}b/8
+/^a\R{1,3}b/8<bsr_unicode>
a\nb
a\n\rb
a\n\r\x{85}b
@@ -417,4 +417,48 @@ can't tell the difference.) --/
\x{7fffffff}
\x{7fffffff}\?
+/a\Rb/I8<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x{85}b
+ a\x0bb
+
+/a\Rb/I8<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x{85}b
+ a\x0bb
+ ** Failers
+ a\x{85}b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/a\R?b/I8<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x{85}b
+ a\x0bb
+
+/a\R?b/I8<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x{85}b
+ a\x0bb
+ ** Failers
+ a\x{85}b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/.*a.*=.b.*/8<ANY>
+ QQQ\x{2029}ABCaXYZ=!bPQR
+ ** Failers
+ a\x{2029}b
+ \x61\xe2\x80\xa9\x62
+
+/[[:a\x{100}b:]]/8
+
/ End of testinput5 /
diff --git a/ext/pcre/pcrelib/testdata/testinput6 b/ext/pcre/pcrelib/testdata/testinput6
index 53d2b328f..0204a7aca 100644
--- a/ext/pcre/pcrelib/testdata/testinput6
+++ b/ext/pcre/pcrelib/testdata/testinput6
@@ -832,4 +832,79 @@ was broken in all cases./
/(\p{Yi}{0,3}+\277)*/
+/^[\p{Arabic}]/8
+ \x{60e}
+ \x{656}
+ \x{657}
+ \x{658}
+ \x{659}
+ \x{65a}
+ \x{65b}
+ \x{65c}
+ \x{65d}
+ \x{65e}
+ \x{66a}
+ \x{6e9}
+ \x{6ef}
+ \x{6fa}
+ ** Failers
+ \x{600}
+ \x{650}
+ \x{651}
+ \x{652}
+ \x{653}
+ \x{654}
+ \x{655}
+ \x{65f}
+
+/^\p{Cyrillic}/8
+ \x{1d2b}
+
+/^\p{Common}/8
+ \x{589}
+ \x{60c}
+ \x{61f}
+ \x{964}
+ \x{965}
+ \x{970}
+
+/^\p{Inherited}/8
+ \x{64b}
+ \x{654}
+ \x{655}
+ \x{200c}
+ ** Failers
+ \x{64a}
+ \x{656}
+
+/^\p{Shavian}/8
+ \x{10450}
+ \x{1047f}
+
+/^\p{Deseret}/8
+ \x{10400}
+ \x{1044f}
+
+/^\p{Osmanya}/8
+ \x{10480}
+ \x{1049d}
+ \x{104a0}
+ \x{104a9}
+ ** Failers
+ \x{1049e}
+ \x{1049f}
+ \x{104aa}
+
+/\p{Zl}{2,3}+/8BZ
+ \xe2\x80\xa8\xe2\x80\xa8
+ \x{2028}\x{2028}\x{2028}
+
+/\p{Zl}/8BZ
+
+/\p{Lu}{3}+/8BZ
+
+/\pL{2}+/8BZ
+
+/\p{Cc}{2}+/8BZ
+
/ End of testinput6 /
diff --git a/ext/pcre/pcrelib/testdata/testinput7 b/ext/pcre/pcrelib/testdata/testinput7
index 76524b725..221bc938b 100644
--- a/ext/pcre/pcrelib/testdata/testinput7
+++ b/ext/pcre/pcrelib/testdata/testinput7
@@ -4156,7 +4156,7 @@
/abc.$/mgx<any>
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
-/^a\Rb/
+/^a\Rb/<bsr_unicode>
a\nb
a\rb
a\r\nb
@@ -4166,7 +4166,7 @@
** Failers
a\n\rb
-/^a\R*b/
+/^a\R*b/<bsr_unicode>
ab
a\nb
a\rb
@@ -4177,7 +4177,7 @@
a\n\rb
a\n\r\x85\x0cb
-/^a\R+b/
+/^a\R+b/<bsr_unicode>
a\nb
a\rb
a\r\nb
@@ -4189,7 +4189,7 @@
** Failers
ab
-/^a\R{1,3}b/
+/^a\R{1,3}b/<bsr_unicode>
a\nb
a\n\rb
a\n\r\x85b
@@ -4201,7 +4201,7 @@
a\n\n\n\rb
a\r
-/^a[\R]b/
+/^a[\R]b/<bsr_unicode>
aRb
** Failers
a\nb
@@ -4310,4 +4310,59 @@
/(\r|\n)A/<crlf>
\r\nA
+/a\Rb/I<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x85b
+ a\x0bb
+
+/a\Rb/I<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x85b
+ a\x0bb
+ ** Failers
+ a\x85b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/a\R?b/I<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x85b
+ a\x0bb
+
+/a\R?b/I<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x85b
+ a\x0bb
+ ** Failers
+ a\x85b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/a\R{2,4}b/I<bsr_anycrlf>
+ a\r\n\nb
+ a\n\r\rb
+ a\r\n\r\n\r\n\r\nb
+ ** Failers
+ a\x85\85b
+ a\x0b\0bb
+
+/a\R{2,4}b/I<bsr_unicode>
+ a\r\rb
+ a\n\n\nb
+ a\r\n\n\r\rb
+ a\x85\85b
+ a\x0b\0bb
+ ** Failers
+ a\r\r\r\r\rb
+ a\x85\85b\<bsr_anycrlf>
+ a\x0b\0bb\<bsr_anycrlf>
+
/ End of testinput7 /
diff --git a/ext/pcre/pcrelib/testdata/testinput8 b/ext/pcre/pcrelib/testdata/testinput8
index 61e70e55a..5bcfab5c0 100644
--- a/ext/pcre/pcrelib/testdata/testinput8
+++ b/ext/pcre/pcrelib/testdata/testinput8
@@ -543,7 +543,7 @@
/abc.$/mgx8<any>
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
-/^a\Rb/8
+/^a\Rb/8<bsr_unicode>
a\nb
a\rb
a\r\nb
@@ -555,7 +555,7 @@
** Failers
a\n\rb
-/^a\R*b/8
+/^a\R*b/8<bsr_unicode>
ab
a\nb
a\rb
@@ -566,7 +566,7 @@
a\n\rb
a\n\r\x{85}\x0cb
-/^a\R+b/8
+/^a\R+b/8<bsr_unicode>
a\nb
a\rb
a\r\nb
@@ -578,7 +578,7 @@
** Failers
ab
-/^a\R{1,3}b/8
+/^a\R{1,3}b/8<bsr_unicode>
a\nb
a\n\rb
a\n\r\x{85}b
@@ -628,4 +628,40 @@
** Failers
\x09\x{200a}\x{a0}\x{2028}\x0b
+/a\Rb/I8<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x{85}b
+ a\x0bb
+
+/a\Rb/I8<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x{85}b
+ a\x0bb
+ ** Failers
+ a\x{85}b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/a\R?b/I8<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x{85}b
+ a\x0bb
+
+/a\R?b/I8<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x{85}b
+ a\x0bb
+ ** Failers
+ a\x{85}b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
/ End of testinput 8 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput1 b/ext/pcre/pcrelib/testdata/testoutput1
index 4c0e680d1..9b8b268ed 100644
--- a/ext/pcre/pcrelib/testdata/testoutput1
+++ b/ext/pcre/pcrelib/testdata/testoutput1
@@ -5551,12 +5551,6 @@ No match
0: b
1: b
-/(?(1)a|b)/
-
-/(?(1)b|a)/
- a
- 0: a
-
/(x)?(?(1)a|b)/
*** Failers
No match
@@ -6593,4 +6587,22 @@ No match
0:
1:
+/[[:abcd:xyz]]/
+ a]
+ 0: a]
+ :]
+ 0: :]
+
+/[abc[:x\]pqr]/
+ a
+ 0: a
+ [
+ 0: [
+ :
+ 0: :
+ ]
+ 0: ]
+ p
+ 0: p
+
/ End of testinput1 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput2 b/ext/pcre/pcrelib/testdata/testoutput2
index a1c071d8b..dba227f50 100644
--- a/ext/pcre/pcrelib/testdata/testoutput2
+++ b/ext/pcre/pcrelib/testdata/testoutput2
@@ -109,7 +109,7 @@ Failed: missing ) at offset 4
Failed: missing ) after comment at offset 7
/(?z)abc/
-Failed: unrecognized character after (? at offset 2
+Failed: unrecognized character after (? or (?- at offset 2
/.*b/I
Capturing subpattern count = 0
@@ -166,7 +166,6 @@ Starting byte set: a b c d
/(a|[^\dZ])/IS
Capturing subpattern count = 1
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -311,7 +310,7 @@ No match
No match
/ab(?z)cd/
-Failed: unrecognized character after (? at offset 4
+Failed: unrecognized character after (? or (?- at offset 4
/^abc|def/I
Capturing subpattern count = 0
@@ -403,7 +402,6 @@ Failed: missing terminating ] for character class at offset 4
/[^aeiou ]{3,}/I
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -948,26 +946,23 @@ Failed: missing ) at offset 4
Failed: unrecognized character after (?< at offset 3
/a(?{)b/
-Failed: unrecognized character after (? at offset 3
+Failed: unrecognized character after (? or (?- at offset 3
/a(?{{})b/
-Failed: unrecognized character after (? at offset 3
+Failed: unrecognized character after (? or (?- at offset 3
/a(?{}})b/
-Failed: unrecognized character after (? at offset 3
+Failed: unrecognized character after (? or (?- at offset 3
/a(?{"{"})b/
-Failed: unrecognized character after (? at offset 3
+Failed: unrecognized character after (? or (?- at offset 3
/a(?{"{"}})b/
-Failed: unrecognized character after (? at offset 3
+Failed: unrecognized character after (? or (?- at offset 3
/(?(1?)a|b)/
Failed: malformed number or name after (?( at offset 4
-/(?(1)a|b|c)/
-Failed: conditional group contains more than two branches at offset 10
-
/[a[:xyz:/
Failed: missing terminating ] for character class at offset 8
@@ -1440,7 +1435,6 @@ Need char = 'a'
/"([^\\"]+|\\.)*"/I
Capturing subpattern count = 1
Partial matching not supported
-Contains explicit CR or LF match
No options
First char = '"'
Need char = '"'
@@ -1602,32 +1596,32 @@ No options
First char = 'a'
Need char = 'b'
-/a(?(1)b)/I
-Capturing subpattern count = 0
+/a(?(1)b)(.)/I
+Capturing subpattern count = 1
No options
First char = 'a'
No need char
-/a(?(1)bag|big)/I
-Capturing subpattern count = 0
+/a(?(1)bag|big)(.)/I
+Capturing subpattern count = 1
No options
First char = 'a'
Need char = 'g'
-/a(?(1)bag|big)*/I
-Capturing subpattern count = 0
+/a(?(1)bag|big)*(.)/I
+Capturing subpattern count = 1
No options
First char = 'a'
No need char
-/a(?(1)bag|big)+/I
-Capturing subpattern count = 0
+/a(?(1)bag|big)+(.)/I
+Capturing subpattern count = 1
No options
First char = 'a'
Need char = 'g'
-/a(?(1)b..|b..)/I
-Capturing subpattern count = 0
+/a(?(1)b..|b..)(.)/I
+Capturing subpattern count = 1
No options
First char = 'a'
Need char = 'b'
@@ -1716,7 +1710,6 @@ Study returned NULL
/Ix
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1746,7 +1739,6 @@ No match
/\( ( (?>[^()]+) | (?R) )* \) /Ixg
Capturing subpattern count = 1
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1762,7 +1754,6 @@ Need char = ')'
/\( (?: (?>[^()]+) | (?R) ) \) /Ix
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1782,7 +1773,6 @@ No match
/\( (?: (?>[^()]+) | (?R) )? \) /Ix
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1794,7 +1784,6 @@ Need char = ')'
/\( ( (?>[^()]+) | (?R) )* \) /Ix
Capturing subpattern count = 1
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1805,7 +1794,6 @@ Need char = ')'
/\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
Capturing subpattern count = 2
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1817,7 +1805,6 @@ Need char = ')'
/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
Capturing subpattern count = 3
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1835,7 +1822,6 @@ Need char = ')'
/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
Capturing subpattern count = 3
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1853,7 +1839,6 @@ Need char = ')'
/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
Capturing subpattern count = 11
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1874,7 +1859,6 @@ Need char = ')'
/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
Capturing subpattern count = 3
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1887,7 +1871,6 @@ Need char = ')'
/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
Capturing subpattern count = 3
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '('
Need char = ')'
@@ -1919,12 +1902,11 @@ No need char
------------------------------------------------------------------
Bra
^
- [\x00-/:-@[-`{-\xff]
+ [\x00-/:-@[-`{-\xff] (neg)
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -1946,12 +1928,11 @@ No need char
------------------------------------------------------------------
Bra
^
- [\x00-@[-`{-\xff]
+ [\x00-@[-`{-\xff] (neg)
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -1973,7 +1954,6 @@ Starting byte set: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -1982,7 +1962,7 @@ No need char
------------------------------------------------------------------
Bra
^
- [\x80-\xff]
+ [\x80-\xff] (neg)
Ket
End
------------------------------------------------------------------
@@ -2008,12 +1988,11 @@ No need char
------------------------------------------------------------------
Bra
^
- [\x00-\x08\x0a-\x1f!-\xff]
+ [\x00-\x08\x0a-\x1f!-\xff] (neg)
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -2035,7 +2014,6 @@ Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -2114,7 +2092,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -2162,7 +2139,7 @@ No need char
------------------------------------------------------------------
Bra
^
- [ -~\x80-\xff]
+ [ -~\x80-\xff] (neg)
Ket
End
------------------------------------------------------------------
@@ -2175,12 +2152,11 @@ No need char
------------------------------------------------------------------
Bra
^
- [\x00-/12:-\xff]
+ [\x00-/12:-\xff] (neg)
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -2189,12 +2165,11 @@ No need char
------------------------------------------------------------------
Bra
^
- [\x00-\x08\x0a-\x1f!-\xff]
+ [\x00-\x08\x0a-\x1f!-\xff] (neg)
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -2758,7 +2733,7 @@ No need char
/[\S]/DZ
------------------------------------------------------------------
Bra
- [\x00-\x08\x0b\x0e-\x1f!-\xff]
+ [\x00-\x08\x0b\x0e-\x1f!-\xff] (neg)
Ket
End
------------------------------------------------------------------
@@ -3083,7 +3058,6 @@ Need char = 'b'
/([^()]++|\([^()]*\))+/I
Capturing subpattern count = 1
Partial matching not supported
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -3094,7 +3068,6 @@ No need char
/\(([^()]++|\([^()]+\))+\)/I
Capturing subpattern count = 1
Partial matching not supported
-Contains explicit CR or LF match
No options
First char = '('
Need char = ')'
@@ -3295,7 +3268,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -3308,7 +3280,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -3316,7 +3287,6 @@ No need char
/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '<'
Need char = '>'
@@ -3468,26 +3438,26 @@ No options
No first char
Need char = 'a'
-/(?(1)ab|ac)/I
-Capturing subpattern count = 0
+/(?(1)ab|ac)(.)/I
+Capturing subpattern count = 1
No options
First char = 'a'
No need char
-/(?(1)abz|acz)/I
-Capturing subpattern count = 0
+/(?(1)abz|acz)(.)/I
+Capturing subpattern count = 1
No options
First char = 'a'
Need char = 'z'
-/(?(1)abz)/I
-Capturing subpattern count = 0
+/(?(1)abz)(.)/I
+Capturing subpattern count = 1
No options
No first char
No need char
-/(?(1)abz)123/I
-Capturing subpattern count = 0
+/(?(1)abz)(1)23/I
+Capturing subpattern count = 1
No options
No first char
Need char = '3'
@@ -3531,7 +3501,6 @@ Starting byte set: a b
/[^a]/I
Capturing subpattern count = 0
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -3991,7 +3960,6 @@ Failed: recursive call could loop indefinitely at offset 16
/^([^()]|\((?1)*\))*$/I
Capturing subpattern count = 1
-Contains explicit CR or LF match
Options: anchored
No first char
No need char
@@ -4011,7 +3979,6 @@ No match
/^>abc>([^()]|\((?1)*\))*<xyz<$/I
Capturing subpattern count = 1
-Contains explicit CR or LF match
Options: anchored
No first char
Need char = '<'
@@ -4139,7 +4106,6 @@ No match
/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
Capturing subpattern count = 2
Partial matching not supported
-Contains explicit CR or LF match
Options: extended
First char = '<'
Need char = '>'
@@ -5958,7 +5924,6 @@ Matched, but too many substrings
/[^()]*(?:\((?R)\)[^()]*)*/I
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -5972,7 +5937,6 @@ No need char
/[^()]*(?:\((?>(?R))\)[^()]*)*/I
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -5984,7 +5948,6 @@ No need char
/[^()]*(?:\((?R)\))*[^()]*/I
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -5996,7 +5959,6 @@ No need char
/(?:\((?R)\))*[^()]*/I
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -6010,7 +5972,6 @@ No need char
/(?:\((?R)\))|[^()]*/I
Capturing subpattern count = 0
Partial matching not supported
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -6205,6 +6166,7 @@ Named capturing subpatterns:
A 2
A 3
Options: anchored dupnames
+Duplicate name status changes
No first char
No need char
a1b\CA
@@ -7913,7 +7875,7 @@ No match
/a/<any><crlf>
Failed: inconsistent NEWLINE options at offset 0
-/^a\Rb/
+/^a\Rb/<bsr_unicode>
a\nb
0: a\x0ab
a\rb
@@ -7931,7 +7893,7 @@ No match
a\n\rb
No match
-/^a\R*b/
+/^a\R*b/<bsr_unicode>
ab
0: ab
a\nb
@@ -7951,7 +7913,7 @@ No match
a\n\r\x85\x0cb
0: a\x0a\x0d\x85\x0cb
-/^a\R+b/
+/^a\R+b/<bsr_unicode>
a\nb
0: a\x0ab
a\rb
@@ -7973,7 +7935,7 @@ No match
ab
No match
-/^a\R{1,3}b/
+/^a\R{1,3}b/<bsr_unicode>
a\nb
0: a\x0ab
a\n\rb
@@ -7995,7 +7957,7 @@ No match
a\r
No match
-/^a[\R]b/
+/^a[\R]b/<bsr_unicode>
aRb
0: aRb
** Failers
@@ -8343,7 +8305,7 @@ Failed: reference to non-existent subpattern at offset 6
/((?(-2)a))/BZ
Failed: reference to non-existent subpattern at offset 7
-/^(?(+1)X|Y)/BZ
+/^(?(+1)X|Y)(.)/BZ
------------------------------------------------------------------
Bra
^
@@ -8353,11 +8315,15 @@ Failed: reference to non-existent subpattern at offset 7
Alt
Y
Ket
+ CBra 1
+ Any
+ Ket
Ket
End
------------------------------------------------------------------
- Y
- 0: Y
+ Y!
+ 0: Y!
+ 1: !
/(foo)\Kbar/
foobar
@@ -9168,4 +9134,255 @@ No match
a\x85b
No match
+/a\Rb/I<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x0db
+ a\nb
+ 0: a\x0ab
+ a\r\nb
+ 0: a\x0d\x0ab
+ ** Failers
+No match
+ a\x85b
+No match
+ a\x0bb
+No match
+
+/a\Rb/I<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x0db
+ a\nb
+ 0: a\x0ab
+ a\r\nb
+ 0: a\x0d\x0ab
+ a\x85b
+ 0: a\x85b
+ a\x0bb
+ 0: a\x0bb
+ ** Failers
+No match
+ a\x85b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/a\R?b/I<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x0db
+ a\nb
+ 0: a\x0ab
+ a\r\nb
+ 0: a\x0d\x0ab
+ ** Failers
+No match
+ a\x85b
+No match
+ a\x0bb
+No match
+
+/a\R?b/I<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x0db
+ a\nb
+ 0: a\x0ab
+ a\r\nb
+ 0: a\x0d\x0ab
+ a\x85b
+ 0: a\x85b
+ a\x0bb
+ 0: a\x0bb
+ ** Failers
+No match
+ a\x85b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/a\R{2,4}b/I<bsr_anycrlf>
+Capturing subpattern count = 0
+Partial matching not supported
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\r\n\nb
+ 0: a\x0d\x0a\x0ab
+ a\n\r\rb
+ 0: a\x0a\x0d\x0db
+ a\r\n\r\n\r\n\r\nb
+ 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
+ ** Failers
+No match
+ a\x85\85b
+No match
+ a\x0b\0bb
+No match
+
+/a\R{2,4}b/I<bsr_unicode>
+Capturing subpattern count = 0
+Partial matching not supported
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\r\rb
+ 0: a\x0d\x0db
+ a\n\n\nb
+ 0: a\x0a\x0a\x0ab
+ a\r\n\n\r\rb
+ 0: a\x0d\x0a\x0a\x0d\x0db
+ a\x85\85b
+No match
+ a\x0b\0bb
+No match
+ ** Failers
+No match
+ a\r\r\r\r\rb
+No match
+ a\x85\85b\<bsr_anycrlf>
+No match
+ a\x0b\0bb\<bsr_anycrlf>
+No match
+
+/(*BSR_ANYCRLF)a\Rb/I
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\nb
+ 0: a\x0ab
+ a\rb
+ 0: a\x0db
+
+/(*BSR_UNICODE)a\Rb/I
+Capturing subpattern count = 0
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\x85b
+ 0: a\x85b
+
+/(*BSR_ANYCRLF)(*CRLF)a\Rb/I
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+Forced newline sequence: CRLF
+First char = 'a'
+Need char = 'b'
+ a\nb
+ 0: a\x0ab
+ a\rb
+ 0: a\x0db
+
+/(*CRLF)(*BSR_UNICODE)a\Rb/I
+Capturing subpattern count = 0
+Options: bsr_unicode
+Forced newline sequence: CRLF
+First char = 'a'
+Need char = 'b'
+ a\x85b
+ 0: a\x85b
+
+/(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+Forced newline sequence: CR
+First char = 'a'
+Need char = 'b'
+
+/(?<a>)(?&)/
+Failed: subpattern name expected at offset 9
+
+/(?<abc>)(?&a)/
+Failed: reference to non-existent subpattern at offset 12
+
+/(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
+Failed: reference to non-existent subpattern at offset 32
+
+/(?+-a)/
+Failed: digit expected after (?+ at offset 3
+
+/(?-+a)/
+Failed: unrecognized character after (? or (?- at offset 3
+
+/(?(-1))/
+Failed: reference to non-existent subpattern at offset 6
+
+/(?(+10))/
+Failed: reference to non-existent subpattern at offset 7
+
+/(?(10))/
+Failed: reference to non-existent subpattern at offset 6
+
+/(?(+2))()()/
+
+/(?(2))()()/
+
+/\k''/
+Failed: subpattern name expected at offset 3
+
+/\k<>/
+Failed: subpattern name expected at offset 3
+
+/\k{}/
+Failed: subpattern name expected at offset 3
+
+/(?P=)/
+Failed: subpattern name expected at offset 4
+
+/(?P>)/
+Failed: subpattern name expected at offset 4
+
+/(?!\w)(?R)/
+Failed: recursive call could loop indefinitely at offset 9
+
+/(?=\w)(?R)/
+Failed: recursive call could loop indefinitely at offset 9
+
+/(?<!\w)(?R)/
+Failed: recursive call could loop indefinitely at offset 10
+
+/(?<=\w)(?R)/
+Failed: recursive call could loop indefinitely at offset 10
+
+/[[:foo:]]/
+Failed: unknown POSIX class name at offset 3
+
+/[[:1234:]]/
+Failed: unknown POSIX class name at offset 3
+
+/[[:f\oo:]]/
+Failed: unknown POSIX class name at offset 3
+
+/[[: :]]/
+Failed: unknown POSIX class name at offset 3
+
+/[[:...:]]/
+Failed: unknown POSIX class name at offset 3
+
+/[[:l\ower:]]/
+Failed: unknown POSIX class name at offset 3
+
+/[[:abc\:]]/
+Failed: unknown POSIX class name at offset 3
+
+/[abc[:x\]pqr:]]/
+Failed: unknown POSIX class name at offset 6
+
+/[[:a\dz:]]/
+Failed: unknown POSIX class name at offset 3
+
/ End of testinput2 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput4 b/ext/pcre/pcrelib/testdata/testoutput4
index b49d4f98a..d87ea4bcc 100644
--- a/ext/pcre/pcrelib/testdata/testoutput4
+++ b/ext/pcre/pcrelib/testdata/testoutput4
@@ -938,4 +938,137 @@ No match
0: +\x{a3}
0: ==
+/\S/8g
+ \x{442}\x{435}\x{441}\x{442}
+ 0: \x{442}
+ 0: \x{435}
+ 0: \x{441}
+ 0: \x{442}
+
+/[\S]/8g
+ \x{442}\x{435}\x{441}\x{442}
+ 0: \x{442}
+ 0: \x{435}
+ 0: \x{441}
+ 0: \x{442}
+
+/\D/8g
+ \x{442}\x{435}\x{441}\x{442}
+ 0: \x{442}
+ 0: \x{435}
+ 0: \x{441}
+ 0: \x{442}
+
+/[\D]/8g
+ \x{442}\x{435}\x{441}\x{442}
+ 0: \x{442}
+ 0: \x{435}
+ 0: \x{441}
+ 0: \x{442}
+
+/\W/8g
+ \x{2442}\x{2435}\x{2441}\x{2442}
+ 0: \x{2442}
+ 0: \x{2435}
+ 0: \x{2441}
+ 0: \x{2442}
+
+/[\W]/8g
+ \x{2442}\x{2435}\x{2441}\x{2442}
+ 0: \x{2442}
+ 0: \x{2435}
+ 0: \x{2441}
+ 0: \x{2442}
+
+/[\S\s]*/8
+ abc\n\r\x{442}\x{435}\x{441}\x{442}xyz
+ 0: abc\x{0a}\x{0d}\x{442}\x{435}\x{441}\x{442}xyz
+
+/[\x{41f}\S]/8g
+ \x{442}\x{435}\x{441}\x{442}
+ 0: \x{442}
+ 0: \x{435}
+ 0: \x{441}
+ 0: \x{442}
+
+/.[^\S]./8g
+ abc def\x{442}\x{443}xyz\npqr
+ 0: c d
+ 0: z\x{0a}p
+
+/.[^\S\n]./8g
+ abc def\x{442}\x{443}xyz\npqr
+ 0: c d
+
+/[[:^alnum:]]/8g
+ +\x{2442}
+ 0: +
+ 0: \x{2442}
+
+/[[:^alpha:]]/8g
+ +\x{2442}
+ 0: +
+ 0: \x{2442}
+
+/[[:^ascii:]]/8g
+ A\x{442}
+ 0: \x{442}
+
+/[[:^blank:]]/8g
+ A\x{442}
+ 0: A
+ 0: \x{442}
+
+/[[:^cntrl:]]/8g
+ A\x{442}
+ 0: A
+ 0: \x{442}
+
+/[[:^digit:]]/8g
+ A\x{442}
+ 0: A
+ 0: \x{442}
+
+/[[:^graph:]]/8g
+ \x19\x{e01ff}
+ 0: \x{19}
+ 0: \x{e01ff}
+
+/[[:^lower:]]/8g
+ A\x{422}
+ 0: A
+ 0: \x{422}
+
+/[[:^print:]]/8g
+ \x{19}\x{e01ff}
+ 0: \x{19}
+ 0: \x{e01ff}
+
+/[[:^punct:]]/8g
+ A\x{442}
+ 0: A
+ 0: \x{442}
+
+/[[:^space:]]/8g
+ A\x{442}
+ 0: A
+ 0: \x{442}
+
+/[[:^upper:]]/8g
+ a\x{442}
+ 0: a
+ 0: \x{442}
+
+/[[:^word:]]/8g
+ +\x{2442}
+ 0: +
+ 0: \x{2442}
+
+/[[:^xdigit:]]/8g
+ M\x{442}
+ 0: M
+ 0: \x{442}
+
+/[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖØÙÚÛÜÃÞĀĂĄĆĈĊČĎÄĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿÅŃŅŇŊŌŎÅÅ’Å”Å–Å˜ÅšÅœÅžÅ Å¢Å¤Å¦Å¨ÅªÅ¬Å®Å°Å²Å´Å¶Å¸Å¹Å»Å½ÆÆ‚Æ„Æ†Æ‡Æ‰ÆŠÆ‹ÆŽÆÆÆ‘Æ“Æ”Æ–Æ—Æ˜ÆœÆÆŸÆ Æ¢Æ¤Æ¦Æ§Æ©Æ¬Æ®Æ¯Æ±Æ²Æ³ÆµÆ·Æ¸Æ¼Ç„LJNJÇÇǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎÈȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾÉΆΈΉΊΌΎÎΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀÐЂЃЄЅІЇЈЉЊЋЌÐÐŽÐÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎÒҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀÓÓƒÓ…Ó‡Ó‰Ó‹ÓÓӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀÕÕ‚ÕƒÕ„Õ…Õ†Õ‡ÕˆÕ‰ÕŠÕ‹ÕŒÕÕŽÕÕՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀáƒáƒ‚ჃჄჅḀḂḄḆḈḊḌḎá¸á¸’ḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎá¹á¹’ṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎáºáº’ẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎá»á»’ỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌá¼á¼Žá¼á¼˜á¼™á¼šá¼›á¼œá¼á¼¨á¼©á¼ªá¼«á¼¬á¼­á¼®á¼¯á¼¸á¼¹á¼ºá¼»á¼¼á¼½á¼¾á¼¿á½ˆá½‰á½Šá½‹á½Œá½á½™á½›á½á½Ÿá½¨á½©á½ªá½«á½¬á½­á½®á½¯á¾¸á¾¹á¾ºá¾»á¿ˆá¿‰á¿Šá¿‹á¿˜á¿™á¿šá¿›á¿¨á¿©á¿ªá¿«á¿¬á¿¸á¿¹á¿ºá¿»abcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÄăąćĉċÄÄđēĕėęěÄğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋÅÅőœŕŗřśÅÅŸÅ¡Å£Å¥Å§Å©Å«Å­Å¯Å±Å³ÅµÅ·ÅºÅ¼Å¾Å¿Æ€ÆƒÆ…ÆˆÆŒÆÆ’ƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎÇǒǔǖǘǚǜÇǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿÈȃȅȇȉȋÈÈȑȓȕȗșțÈȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀÉɑɒɓɔɕɖɗɘəɚɛɜÉɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀÊʂʃʄʅʆʇʈʉʊʋʌÊÊŽÊÊʑʒʓʔʕʖʗʘʙʚʛʜÊʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯÎάέήίΰαβγδεζηθικλμνξοπÏςστυφχψωϊϋόÏÏŽÏϑϕϖϗϙϛÏϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑÑёђѓєѕіїјљњћќÑўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿÒÒ‹ÒÒÒ‘Ò“Ò•Ò—Ò™Ò›ÒҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛÓÓŸÓ¡Ó£Ó¥Ó§Ó©Ó«Ó­Ó¯Ó±Ó³ÓµÓ·Ó¹ÔÔƒÔ…Ô‡Ô‰Ô‹ÔÔÕ¡Õ¢Õ£Õ¤Õ¥Õ¦Õ§Õ¨Õ©ÕªÕ«Õ¬Õ­Õ®Õ¯Õ°Õ±Õ²Õ³Õ´ÕµÕ¶Õ·Õ¸Õ¹ÕºÕ»Õ¼Õ½Õ¾Õ¿Ö€Öւփքօֆևᴀá´á´‚ᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌá´á´Žá´á´á´‘ᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜá´á´žá´Ÿá´ á´¡á´¢á´£á´¤á´¥á´¦á´§á´¨á´©á´ªá´«áµ¢áµ£áµ¤áµ¥áµ¦áµ§áµ¨áµ©áµªáµ«áµ¬áµ­áµ®áµ¯áµ°áµ±áµ²áµ³áµ´áµµáµ¶áµ·áµ¹áµºáµ»áµ¼áµ½áµ¾áµ¿á¶€á¶á¶‚ᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌá¶á¶Žá¶á¶á¶‘ᶒᶓᶔᶕᶖᶗᶘᶙᶚá¸á¸ƒá¸…ḇḉḋá¸á¸á¸‘ḓḕḗḙḛá¸á¸Ÿá¸¡á¸£á¸¥á¸§á¸©á¸«á¸­á¸¯á¸±á¸³á¸µá¸·á¸¹á¸»á¸½á¸¿á¹á¹ƒá¹…ṇṉṋá¹á¹á¹‘ṓṕṗṙṛá¹á¹Ÿá¹¡á¹£á¹¥á¹§á¹©á¹«á¹­á¹¯á¹±á¹³á¹µá¹·á¹¹á¹»á¹½á¹¿áºáºƒáº…ẇẉẋáºáºáº‘ẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếá»á»ƒá»…ệỉịá»á»á»‘ồổỗộớá»á»Ÿá»¡á»£á»¥á»§á»©á»«á»­á»¯á»±á»³á»µá»·á»¹á¼€á¼á¼‚ἃἄἅἆἇá¼á¼‘ἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀá½á½‚ὃὄὅá½á½‘ὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀá¾á¾‚ᾃᾄᾅᾆᾇá¾á¾‘ᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇá¿á¿‘ῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷâ²â²ƒâ²…ⲇⲉⲋâ²â²â²‘ⲓⲕⲗⲙⲛâ²â²Ÿâ²¡â²£â²¥â²§â²©â²«â²­â²¯â²±â²³â²µâ²·â²¹â²»â²½â²¿â³â³ƒâ³…ⳇⳉⳋâ³â³â³‘ⳓⳕⳗⳙⳛâ³â³Ÿâ³¡â³£â³¤â´€â´â´‚ⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌâ´â´Žâ´â´â´‘ⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜâ´â´žâ´Ÿâ´ â´¡â´¢â´£â´¤â´¥ï¬€ï¬ï¬‚ffifflſtstﬓﬔﬕﬖﬗ\d-_^]/8
+
/ End of testinput4 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput5 b/ext/pcre/pcrelib/testdata/testoutput5
index 2d9ee6949..abbe1c87d 100644
--- a/ext/pcre/pcrelib/testdata/testoutput5
+++ b/ext/pcre/pcrelib/testdata/testoutput5
@@ -364,7 +364,6 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: anchored utf8
No first char
No need char
@@ -387,7 +386,6 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: utf8
No first char
No need char
@@ -655,7 +653,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -668,7 +665,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: utf8
No first char
No need char
@@ -792,7 +788,6 @@ Need char = 191
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
No options
No first char
No need char
@@ -805,7 +800,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Contains explicit CR or LF match
Options: utf8
No first char
No need char
@@ -942,7 +936,6 @@ Need char = 'z'
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Contains explicit CR or LF match
Options: utf8
No first char
Need char = 'z'
@@ -1314,7 +1307,7 @@ Failed: missing terminating ] for character class at offset 15
0: abc8
0: abc9
-/^a\Rb/8
+/^a\Rb/8<bsr_unicode>
a\nb
0: a\x{0a}b
a\rb
@@ -1336,7 +1329,7 @@ No match
a\n\rb
No match
-/^a\R*b/8
+/^a\R*b/8<bsr_unicode>
ab
0: ab
a\nb
@@ -1356,7 +1349,7 @@ No match
a\n\r\x{85}\x0cb
0: a\x{0a}\x{0d}\x{85}\x{0c}b
-/^a\R+b/8
+/^a\R+b/8<bsr_unicode>
a\nb
0: a\x{0a}b
a\rb
@@ -1378,7 +1371,7 @@ No match
ab
No match
-/^a\R{1,3}b/8
+/^a\R{1,3}b/8<bsr_unicode>
a\nb
0: a\x{0a}b
a\n\rb
@@ -1522,4 +1515,97 @@ Error -10
\x{7fffffff}\?
No match
+/a\Rb/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\Rb/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
+No match
+ a\x{85}b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/a\R?b/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\R?b/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
+No match
+ a\x{85}b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/.*a.*=.b.*/8<ANY>
+ QQQ\x{2029}ABCaXYZ=!bPQR
+ 0: ABCaXYZ=!bPQR
+ ** Failers
+No match
+ a\x{2029}b
+No match
+ \x61\xe2\x80\xa9\x62
+No match
+
+/[[:a\x{100}b:]]/8
+Failed: unknown POSIX class name at offset 3
+
/ End of testinput5 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput6 b/ext/pcre/pcrelib/testdata/testoutput6
index 0a58b844f..db825b08c 100644
--- a/ext/pcre/pcrelib/testdata/testoutput6
+++ b/ext/pcre/pcrelib/testdata/testoutput6
@@ -1522,4 +1522,161 @@ No match
/(\p{Yi}{0,3}+\277)*/
+/^[\p{Arabic}]/8
+ \x{60e}
+ 0: \x{60e}
+ \x{656}
+ 0: \x{656}
+ \x{657}
+ 0: \x{657}
+ \x{658}
+ 0: \x{658}
+ \x{659}
+ 0: \x{659}
+ \x{65a}
+ 0: \x{65a}
+ \x{65b}
+ 0: \x{65b}
+ \x{65c}
+ 0: \x{65c}
+ \x{65d}
+ 0: \x{65d}
+ \x{65e}
+ 0: \x{65e}
+ \x{66a}
+ 0: \x{66a}
+ \x{6e9}
+ 0: \x{6e9}
+ \x{6ef}
+ 0: \x{6ef}
+ \x{6fa}
+ 0: \x{6fa}
+ ** Failers
+No match
+ \x{600}
+No match
+ \x{650}
+No match
+ \x{651}
+No match
+ \x{652}
+No match
+ \x{653}
+No match
+ \x{654}
+No match
+ \x{655}
+No match
+ \x{65f}
+No match
+
+/^\p{Cyrillic}/8
+ \x{1d2b}
+ 0: \x{1d2b}
+
+/^\p{Common}/8
+ \x{589}
+ 0: \x{589}
+ \x{60c}
+ 0: \x{60c}
+ \x{61f}
+ 0: \x{61f}
+ \x{964}
+ 0: \x{964}
+ \x{965}
+ 0: \x{965}
+ \x{970}
+ 0: \x{970}
+
+/^\p{Inherited}/8
+ \x{64b}
+ 0: \x{64b}
+ \x{654}
+ 0: \x{654}
+ \x{655}
+ 0: \x{655}
+ \x{200c}
+ 0: \x{200c}
+ ** Failers
+No match
+ \x{64a}
+No match
+ \x{656}
+No match
+
+/^\p{Shavian}/8
+ \x{10450}
+ 0: \x{10450}
+ \x{1047f}
+ 0: \x{1047f}
+
+/^\p{Deseret}/8
+ \x{10400}
+ 0: \x{10400}
+ \x{1044f}
+ 0: \x{1044f}
+
+/^\p{Osmanya}/8
+ \x{10480}
+ 0: \x{10480}
+ \x{1049d}
+ 0: \x{1049d}
+ \x{104a0}
+ 0: \x{104a0}
+ \x{104a9}
+ 0: \x{104a9}
+ ** Failers
+No match
+ \x{1049e}
+No match
+ \x{1049f}
+No match
+ \x{104aa}
+No match
+
+/\p{Zl}{2,3}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Zl {2}
+ prop Zl ?+
+ Ket
+ End
+------------------------------------------------------------------
+ \xe2\x80\xa8\xe2\x80\xa8
+ 0: \x{2028}\x{2028}
+ \x{2028}\x{2028}\x{2028}
+ 0: \x{2028}\x{2028}\x{2028}
+
+/\p{Zl}/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Zl
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Lu}{3}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Lu {3}
+ Ket
+ End
+------------------------------------------------------------------
+
+/\pL{2}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop L {2}
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Cc}{2}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Cc {2}
+ Ket
+ End
+------------------------------------------------------------------
+
/ End of testinput6 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput7 b/ext/pcre/pcrelib/testdata/testoutput7
index 39c50750e..d8e3833f3 100644
--- a/ext/pcre/pcrelib/testdata/testoutput7
+++ b/ext/pcre/pcrelib/testdata/testoutput7
@@ -6824,7 +6824,7 @@ No match
0: abc6
0: abc9
-/^a\Rb/
+/^a\Rb/<bsr_unicode>
a\nb
0: a\x0ab
a\rb
@@ -6842,7 +6842,7 @@ No match
a\n\rb
No match
-/^a\R*b/
+/^a\R*b/<bsr_unicode>
ab
0: ab
a\nb
@@ -6862,7 +6862,7 @@ No match
a\n\r\x85\x0cb
0: a\x0a\x0d\x85\x0cb
-/^a\R+b/
+/^a\R+b/<bsr_unicode>
a\nb
0: a\x0ab
a\rb
@@ -6884,7 +6884,7 @@ No match
ab
No match
-/^a\R{1,3}b/
+/^a\R{1,3}b/<bsr_unicode>
a\nb
0: a\x0ab
a\n\rb
@@ -6906,7 +6906,7 @@ No match
a\r
No match
-/^a[\R]b/
+/^a[\R]b/<bsr_unicode>
aRb
0: aRb
** Failers
@@ -7088,4 +7088,128 @@ No match
\r\nA
0: \x0aA
+/a\Rb/I<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x0db
+ a\nb
+ 0: a\x0ab
+ a\r\nb
+ 0: a\x0d\x0ab
+ ** Failers
+No match
+ a\x85b
+No match
+ a\x0bb
+No match
+
+/a\Rb/I<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x0db
+ a\nb
+ 0: a\x0ab
+ a\r\nb
+ 0: a\x0d\x0ab
+ a\x85b
+ 0: a\x85b
+ a\x0bb
+ 0: a\x0bb
+ ** Failers
+No match
+ a\x85b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/a\R?b/I<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x0db
+ a\nb
+ 0: a\x0ab
+ a\r\nb
+ 0: a\x0d\x0ab
+ ** Failers
+No match
+ a\x85b
+No match
+ a\x0bb
+No match
+
+/a\R?b/I<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x0db
+ a\nb
+ 0: a\x0ab
+ a\r\nb
+ 0: a\x0d\x0ab
+ a\x85b
+ 0: a\x85b
+ a\x0bb
+ 0: a\x0bb
+ ** Failers
+No match
+ a\x85b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/a\R{2,4}b/I<bsr_anycrlf>
+Capturing subpattern count = 0
+Partial matching not supported
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\r\n\nb
+ 0: a\x0d\x0a\x0ab
+ a\n\r\rb
+ 0: a\x0a\x0d\x0db
+ a\r\n\r\n\r\n\r\nb
+ 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
+ ** Failers
+No match
+ a\x85\85b
+No match
+ a\x0b\0bb
+No match
+
+/a\R{2,4}b/I<bsr_unicode>
+Capturing subpattern count = 0
+Partial matching not supported
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\r\rb
+ 0: a\x0d\x0db
+ a\n\n\nb
+ 0: a\x0a\x0a\x0ab
+ a\r\n\n\r\rb
+ 0: a\x0d\x0a\x0a\x0d\x0db
+ a\x85\85b
+No match
+ a\x0b\0bb
+No match
+ ** Failers
+No match
+ a\r\r\r\r\rb
+No match
+ a\x85\85b\<bsr_anycrlf>
+No match
+ a\x0b\0bb\<bsr_anycrlf>
+No match
+
/ End of testinput7 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput8 b/ext/pcre/pcrelib/testdata/testoutput8
index db0f4ade3..631e5b82f 100644
--- a/ext/pcre/pcrelib/testdata/testoutput8
+++ b/ext/pcre/pcrelib/testdata/testoutput8
@@ -1052,7 +1052,7 @@ No match
0: abc8
0: abc9
-/^a\Rb/8
+/^a\Rb/8<bsr_unicode>
a\nb
0: a\x{0a}b
a\rb
@@ -1074,7 +1074,7 @@ No match
a\n\rb
No match
-/^a\R*b/8
+/^a\R*b/8<bsr_unicode>
ab
0: ab
a\nb
@@ -1094,7 +1094,7 @@ No match
a\n\r\x{85}\x0cb
0: a\x{0a}\x{0d}\x{85}\x{0c}b
-/^a\R+b/8
+/^a\R+b/8<bsr_unicode>
a\nb
0: a\x{0a}b
a\rb
@@ -1116,7 +1116,7 @@ No match
ab
No match
-/^a\R{1,3}b/8
+/^a\R{1,3}b/8<bsr_unicode>
a\nb
0: a\x{0a}b
a\n\rb
@@ -1204,4 +1204,84 @@ No match
\x09\x{200a}\x{a0}\x{2028}\x0b
No match
+/a\Rb/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\Rb/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
+No match
+ a\x{85}b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
+/a\R?b/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\R?b/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf8
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
+No match
+ a\x{85}b\<bsr_anycrlf>
+No match
+ a\x0bb\<bsr_anycrlf>
+No match
+
/ End of testinput 8 /
diff --git a/ext/pcre/pcrelib/ucptable.h b/ext/pcre/pcrelib/ucptable.h
index 07eaced8f..a274d443e 100644
--- a/ext/pcre/pcrelib/ucptable.h
+++ b/ext/pcre/pcrelib/ucptable.h
@@ -539,7 +539,8 @@ static const cnode ucp_table[] = {
{ 0x21000293, 0x14000000 },
{ 0x21000294, 0x1c000000 },
{ 0x21800295, 0x1400001a },
- { 0x218002b0, 0x18000011 },
+ { 0x218002b0, 0x18000008 },
+ { 0x098002b9, 0x18000008 },
{ 0x098002c2, 0x60000003 },
{ 0x098002c6, 0x1800000b },
{ 0x098002d2, 0x6000000d },
@@ -1039,15 +1040,18 @@ static const cnode ucp_table[] = {
{ 0x198005f3, 0x54000001 },
{ 0x09800600, 0x04000003 },
{ 0x0000060b, 0x5c000000 },
- { 0x0980060c, 0x54000001 },
+ { 0x0900060c, 0x54000000 },
+ { 0x0000060d, 0x54000000 },
{ 0x0080060e, 0x68000001 },
{ 0x00800610, 0x30000005 },
{ 0x0900061b, 0x54000000 },
- { 0x0080061e, 0x54000001 },
+ { 0x0000061e, 0x54000000 },
+ { 0x0900061f, 0x54000000 },
{ 0x00800621, 0x1c000019 },
{ 0x09000640, 0x18000000 },
{ 0x00800641, 0x1c000009 },
- { 0x1b80064b, 0x30000013 },
+ { 0x1b80064b, 0x3000000a },
+ { 0x00800656, 0x30000008 },
{ 0x09800660, 0x34000009 },
{ 0x0080066a, 0x54000003 },
{ 0x0080066e, 0x1c000001 },
@@ -1074,7 +1078,8 @@ static const cnode ucp_table[] = {
{ 0x31000711, 0x30000000 },
{ 0x31800712, 0x1c00001d },
{ 0x31800730, 0x3000001a },
- { 0x3180074d, 0x1c000020 },
+ { 0x3180074d, 0x1c000002 },
+ { 0x00800750, 0x1c00001d },
{ 0x37800780, 0x1c000025 },
{ 0x378007a6, 0x3000000a },
{ 0x370007b1, 0x1c000000 },
@@ -1460,7 +1465,10 @@ static const cnode ucp_table[] = {
{ 0x1f0017dd, 0x30000000 },
{ 0x1f8017e0, 0x34000009 },
{ 0x1f8017f0, 0x3c000009 },
- { 0x25801800, 0x54000005 },
+ { 0x25801800, 0x54000001 },
+ { 0x09801802, 0x54000001 },
+ { 0x25001804, 0x54000000 },
+ { 0x09001805, 0x54000000 },
{ 0x25001806, 0x44000000 },
{ 0x25801807, 0x54000003 },
{ 0x2580180b, 0x30000002 },
@@ -1513,14 +1521,20 @@ static const cnode ucp_table[] = {
{ 0x3d801b61, 0x68000009 },
{ 0x3d801b6b, 0x30000008 },
{ 0x3d801b74, 0x68000008 },
- { 0x21801d00, 0x1400002b },
- { 0x21801d2c, 0x18000035 },
- { 0x21801d62, 0x14000015 },
+ { 0x21801d00, 0x14000025 },
+ { 0x13801d26, 0x14000004 },
+ { 0x0c001d2b, 0x14000000 },
+ { 0x21801d2c, 0x18000030 },
+ { 0x13801d5d, 0x18000004 },
+ { 0x21801d62, 0x14000003 },
+ { 0x13801d66, 0x14000004 },
+ { 0x21801d6b, 0x1400000c },
{ 0x0c001d78, 0x18000000 },
{ 0x21801d79, 0x14000003 },
{ 0x21001d7d, 0x14000ee6 },
{ 0x21801d7e, 0x1400001c },
- { 0x21801d9b, 0x18000024 },
+ { 0x21801d9b, 0x18000023 },
+ { 0x13001dbf, 0x18000000 },
{ 0x1b801dc0, 0x3000000a },
{ 0x1b801dfe, 0x30000001 },
{ 0x21001e00, 0x24000001 },
@@ -1982,7 +1996,9 @@ static const cnode ucp_table[] = {
{ 0x13001ffc, 0x2000fff7 },
{ 0x13801ffd, 0x60000001 },
{ 0x09802000, 0x7400000a },
- { 0x0980200b, 0x04000004 },
+ { 0x0900200b, 0x04000000 },
+ { 0x1b80200c, 0x04000001 },
+ { 0x0980200e, 0x04000001 },
{ 0x09802010, 0x44000005 },
{ 0x09802016, 0x54000001 },
{ 0x09002018, 0x50000000 },
@@ -2615,7 +2631,8 @@ static const cnode ucp_table[] = {
{ 0x090030a0, 0x44000000 },
{ 0x1d8030a1, 0x1c000059 },
{ 0x090030fb, 0x54000000 },
- { 0x098030fc, 0x18000002 },
+ { 0x090030fc, 0x18000000 },
+ { 0x1d8030fd, 0x18000001 },
{ 0x1d0030ff, 0x1c000000 },
{ 0x03803105, 0x1c000027 },
{ 0x17803131, 0x1c00005d },
@@ -2630,7 +2647,8 @@ static const cnode ucp_table[] = {
{ 0x0980322a, 0x68000019 },
{ 0x09003250, 0x68000000 },
{ 0x09803251, 0x3c00000e },
- { 0x17803260, 0x6800001f },
+ { 0x17803260, 0x6800001d },
+ { 0x0980327e, 0x68000001 },
{ 0x09803280, 0x3c000009 },
{ 0x0980328a, 0x68000026 },
{ 0x098032b1, 0x3c00000e },
@@ -2678,7 +2696,8 @@ static const cnode ucp_table[] = {
{ 0x1900fb3e, 0x1c000000 },
{ 0x1980fb40, 0x1c000001 },
{ 0x1980fb43, 0x1c000001 },
- { 0x1980fb46, 0x1c00006b },
+ { 0x1980fb46, 0x1c000009 },
+ { 0x0080fb50, 0x1c000061 },
{ 0x0080fbd3, 0x1c00016a },
{ 0x0900fd3e, 0x58000000 },
{ 0x0900fd3f, 0x48000000 },
@@ -2944,7 +2963,8 @@ static const cnode ucp_table[] = {
{ 0x0d01044d, 0x1400ffd8 },
{ 0x0d01044e, 0x1400ffd8 },
{ 0x0d01044f, 0x1400ffd8 },
- { 0x2e810450, 0x1c00004d },
+ { 0x2e810450, 0x1c00002f },
+ { 0x2c810480, 0x1c00001d },
{ 0x2c8104a0, 0x34000009 },
{ 0x0b810800, 0x1c000005 },
{ 0x0b010808, 0x1c000000 },
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 2cf8ed3a1..e728c7354 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.168.2.9.2.21 2007/09/20 08:10:44 tony2001 Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.25 2008/02/20 22:08:18 felipe Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -48,7 +48,7 @@ enum {
PHP_PCRE_INTERNAL_ERROR,
PHP_PCRE_BACKTRACK_LIMIT_ERROR,
PHP_PCRE_RECURSION_LIMIT_ERROR,
- PHP_PCRE_BAD_UTF8_ERROR,
+ PHP_PCRE_BAD_UTF8_ERROR
};
@@ -1535,7 +1535,9 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec
}
- if (!no_empty || start_offset != subject_len)
+ start_offset = last_match - subject; /* the offset might have been incremented, but without further successful matches */
+
+ if (!no_empty || start_offset < subject_len)
{
if (offset_capture) {
/* Add the last (match, offset) pair to the return value */
@@ -1742,7 +1744,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return
zend_hash_move_forward(Z_ARRVAL_P(input));
}
-
+ zend_hash_internal_pointer_reset(Z_ARRVAL_P(input));
/* Clean up */
efree(offsets);
}
diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h
index 394311afd..9fe3f541d 100644
--- a/ext/pcre/php_pcre.h
+++ b/ext/pcre/php_pcre.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.h,v 1.41.2.1.2.5 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_pcre.h,v 1.41.2.1.2.6 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PCRE_H
#define PHP_PCRE_H
diff --git a/ext/pcre/tests/bug42945.phpt b/ext/pcre/tests/bug42945.phpt
new file mode 100644
index 000000000..c6d2b8249
--- /dev/null
+++ b/ext/pcre/tests/bug42945.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Bug #42945 (preg_split() swallows part of the string)
+--FILE--
+<?php
+
+var_dump(preg_match_all('/\b/', "a'", $m, PREG_OFFSET_CAPTURE));
+var_dump($m);
+
+var_dump(preg_split('/\b/', "a'"));
+var_dump(preg_split('/\b/', "a'", -1, PREG_SPLIT_OFFSET_CAPTURE));
+var_dump(preg_split('/\b/', "a'", -1, PREG_SPLIT_NO_EMPTY));
+var_dump(preg_split('/\b/', "a'", -1, PREG_SPLIT_NO_EMPTY|PREG_SPLIT_OFFSET_CAPTURE));
+
+?>
+--EXPECT--
+int(2)
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ int(0)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ int(1)
+ }
+ }
+}
+array(3) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(1) "a"
+ [2]=>
+ string(1) "'"
+}
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ int(0)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ int(0)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ string(1) "'"
+ [1]=>
+ int(1)
+ }
+}
+array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "'"
+}
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ int(0)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(1) "'"
+ [1]=>
+ int(1)
+ }
+}
diff --git a/ext/pcre/tests/bug44191.phpt b/ext/pcre/tests/bug44191.phpt
new file mode 100644
index 000000000..52b449091
--- /dev/null
+++ b/ext/pcre/tests/bug44191.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #44191 (preg_grep messes up array index)
+--FILE--
+<?php
+
+$array = range(1, 10);
+
+preg_grep('/asdf/', $array);
+
+while (list($x) = each($array)) {
+ print $x;
+}
+
+?>
+--EXPECT--
+0123456789
diff --git a/ext/pcre/tests/preg_grep_basic.phpt b/ext/pcre/tests/preg_grep_basic.phpt
new file mode 100644
index 000000000..fe9d7ceaa
--- /dev/null
+++ b/ext/pcre/tests/preg_grep_basic.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test preg_grep() function : basic functionality
+--FILE--
+<?php
+/*
+* proto array preg_grep(string regex, array input [, int flags])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+$array = array('HTTP://WWW.EXAMPLE.COM', '/index.html', '/info/stat/', 'http://test.uk.com/index/html', '/display/dept.php');
+var_dump($array);
+var_dump(preg_grep('@^HTTP(.*?)\w{2,}$@i', $array)); //finds a string starting with http (regardless of case) (matches two)
+var_dump(preg_grep('@(/\w+\.*/*)+@', $array)); //finds / followed by one or more of a-z, A-Z and 0-9, followed by zero or more . followed by zero or more / all more than once. (matches all)
+var_dump(preg_grep('@^http://[^w]{3}.*$@i', $array)); //finds http:// (at the beginning of a string) not followed by 3 characters that aren't w's then anything to the end of the sttring (matches one)
+var_dump(preg_grep('@.*?\.co\.uk$@i', $array)); //finds any address ending in .co.uk (matches none)
+var_dump(preg_grep('@^HTTP(.*?)\w{2,}$@i', $array, PREG_GREP_INVERT)); //same as first example but the array created contains everything that is NOT matched but the regex (matches three)
+
+?>
+--EXPECT--
+array(5) {
+ [0]=>
+ string(22) "HTTP://WWW.EXAMPLE.COM"
+ [1]=>
+ string(11) "/index.html"
+ [2]=>
+ string(11) "/info/stat/"
+ [3]=>
+ string(29) "http://test.uk.com/index/html"
+ [4]=>
+ string(17) "/display/dept.php"
+}
+array(2) {
+ [0]=>
+ string(22) "HTTP://WWW.EXAMPLE.COM"
+ [3]=>
+ string(29) "http://test.uk.com/index/html"
+}
+array(5) {
+ [0]=>
+ string(22) "HTTP://WWW.EXAMPLE.COM"
+ [1]=>
+ string(11) "/index.html"
+ [2]=>
+ string(11) "/info/stat/"
+ [3]=>
+ string(29) "http://test.uk.com/index/html"
+ [4]=>
+ string(17) "/display/dept.php"
+}
+array(1) {
+ [3]=>
+ string(29) "http://test.uk.com/index/html"
+}
+array(0) {
+}
+array(3) {
+ [1]=>
+ string(11) "/index.html"
+ [2]=>
+ string(11) "/info/stat/"
+ [4]=>
+ string(17) "/display/dept.php"
+}
diff --git a/ext/pcre/tests/preg_grep_error.phpt b/ext/pcre/tests/preg_grep_error.phpt
new file mode 100644
index 000000000..f2afdb9d2
--- /dev/null
+++ b/ext/pcre/tests/preg_grep_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test preg_grep() function : error conditions - wrong numbers of parameters
+--FILE--
+<?php
+/*
+* proto array preg_grep(string regex, array input [, int flags])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+echo "*** Testing preg_grep() : error conditions ***\n";
+// Zero arguments
+echo "\n-- Testing preg_grep() function with Zero arguments --\n";
+var_dump(preg_grep());
+//Test preg_grep with one more than the expected number of arguments
+echo "\n-- Testing preg_grep() function with more than expected no. of arguments --\n";
+$regex = '/\d/';
+$input = array(1, 2);
+$flags = 0;
+$extra_arg = 10;
+var_dump(preg_grep($regex, $input, $flags, $extra_arg));
+// Testing preg_grep withone less than the expected number of arguments
+echo "\n-- Testing preg_grep() function with less than expected no. of arguments --\n";
+$regex = 'string_val';
+var_dump(preg_grep($regex));
+echo "Done"
+?>
+--EXPECTF--
+*** Testing preg_grep() : error conditions ***
+
+-- Testing preg_grep() function with Zero arguments --
+
+Warning: preg_grep() expects at least 2 parameters, 0 given in %spreg_grep_error.php on line %d
+NULL
+
+-- Testing preg_grep() function with more than expected no. of arguments --
+
+Warning: preg_grep() expects at most 3 parameters, 4 given in %spreg_grep_error.php on line %d
+NULL
+
+-- Testing preg_grep() function with less than expected no. of arguments --
+
+Warning: preg_grep() expects at least 2 parameters, 1 given in %spreg_grep_error.php on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/pcre/tests/preg_grep_error1.phpt b/ext/pcre/tests/preg_grep_error1.phpt
new file mode 100644
index 000000000..29dfc5af1
--- /dev/null
+++ b/ext/pcre/tests/preg_grep_error1.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Test preg_grep() function : error conditions - bad regular expressions
+--FILE--
+<?php
+/*
+* proto array preg_grep(string regex, array input [, int flags])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_grep reacts to being passed bad regexes
+*/
+echo "*** Testing preg_grep() : error conditions ***\n";
+$values = array('abcdef', //Regex without delimeter
+'/[a-zA-Z]', //Regex without closing delimeter
+'[a-zA-Z]/', //Regex without opening delimeter
+'/[a-zA-Z]/F', array('[a-z]', //Array of Regexes
+'[A-Z]', '[0-9]'), '/[a-zA-Z]/', //Regex string
+);
+$array = array(123, 'abc', 'test');
+foreach($values as $value) {
+ print "\nArg value is $value\n";
+ var_dump(preg_grep($value, $array));
+}
+$value = new stdclass(); //Object
+var_dump(preg_grep($value, $array));
+echo "Done"
+?>
+--EXPECTF--
+
+*** Testing preg_grep() : error conditions ***
+
+Arg value is abcdef
+
+Warning: preg_grep(): Delimiter must not be alphanumeric or backslash in %spreg_grep_error1.php on line %d
+bool(false)
+
+Arg value is /[a-zA-Z]
+
+Warning: preg_grep(): No ending delimiter '/' found in %spreg_grep_error1.php on line %d
+bool(false)
+
+Arg value is [a-zA-Z]/
+
+Warning: preg_grep(): Unknown modifier '/' in %spreg_grep_error1.php on line %d
+bool(false)
+
+Arg value is /[a-zA-Z]/F
+
+Warning: preg_grep(): Unknown modifier 'F' in %spreg_grep_error1.php on line %d
+bool(false)
+
+Arg value is Array
+
+Warning: preg_grep() expects parameter 1 to be string, array given in %spreg_grep_error1.php on line %d
+NULL
+
+Arg value is /[a-zA-Z]/
+array(2) {
+ [1]=>
+ string(3) "abc"
+ [2]=>
+ string(4) "test"
+}
+
+Warning: preg_grep() expects parameter 1 to be string, object given in %spreg_grep_error1.php on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/pcre/tests/preg_grep_error2.phpt b/ext/pcre/tests/preg_grep_error2.phpt
new file mode 100644
index 000000000..aa4dae98a
--- /dev/null
+++ b/ext/pcre/tests/preg_grep_error2.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test preg_grep() function : error conditions - wrong arg types
+--FILE--
+<?php
+/*
+* proto array preg_grep(string regex, array input [, int flags])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_grep reacts to being passed the wrong type of input argument
+*/
+echo "*** Testing preg_grep() : error conditions ***\n";
+$regex = '/[a-zA-Z]/';
+$input = array('this is a string', array('this is', 'a subarray'),);
+foreach($input as $value) {
+ print "\nArg value is: $value\n";
+ var_dump(preg_grep($regex, $value));
+}
+$value = new stdclass(); //Object
+var_dump(preg_grep($regex, $value));
+echo "Done";
+?>
+--EXPECTF--
+*** Testing preg_grep() : error conditions ***
+
+Arg value is: this is a string
+
+Warning: preg_grep() expects parameter 2 to be array, string given in %spreg_grep_error2.php on line %d
+NULL
+
+Arg value is: Array
+array(2) {
+ [0]=>
+ string(7) "this is"
+ [1]=>
+ string(10) "a subarray"
+}
+
+Warning: preg_grep() expects parameter 2 to be array, object given in %spreg_grep_error2.php on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/pcre/tests/preg_match_all_basic.phpt b/ext/pcre/tests/preg_match_all_basic.phpt
new file mode 100644
index 000000000..06dec1cb4
--- /dev/null
+++ b/ext/pcre/tests/preg_match_all_basic.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Test preg_match_all() function : basic functionality
+--FILE--
+<?php
+/*
+* proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+$string = 'Hello, world! This is a test. This is another test. \[4]. 34534 string.';
+var_dump(preg_match_all('/[0-35-9]/', $string, $match1, PREG_OFFSET_CAPTURE|PREG_PATTERN_ORDER, -10)); //finds any digit that's not 4 10 digits from the end(1 match)
+var_dump($match1);
+var_dump(preg_match_all('/[tT]his is a(.*?)\./', $string, $match2, PREG_SET_ORDER)); //finds "This is a test." and "This is another test." (non-greedy) (2 matches)
+var_dump($match2);
+var_dump(preg_match_all('@\. \\\(.*).@', $string, $match3, PREG_PATTERN_ORDER)); //finds ".\ [...]" and everything else to the end of the string. (greedy) (1 match)
+var_dump($match3);
+var_dump(preg_match_all('/\d{2}$/', $string, $match4)); //tries to find 2 digits at the end of a string (0 matches)
+var_dump($match4);
+var_dump(preg_match_all('/(This is a ){2}(.*)\stest/', $string, $match5)); //tries to find "This is aThis is a [...] test" (0 matches)
+var_dump($match5);
+?>
+--EXPECTF--
+int(1)
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(1) "3"
+ [1]=>
+ int(61)
+ }
+ }
+}
+int(2)
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(15) "This is a test."
+ [1]=>
+ string(5) " test"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(21) "This is another test."
+ [1]=>
+ string(11) "nother test"
+ }
+}
+int(1)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ string(21) ". \[4]. 34534 string."
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(17) "[4]. 34534 string"
+ }
+}
+int(0)
+array(1) {
+ [0]=>
+ array(0) {
+ }
+}
+int(0)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
diff --git a/ext/pcre/tests/preg_match_all_error.phpt b/ext/pcre/tests/preg_match_all_error.phpt
new file mode 100644
index 000000000..2371ccfef
--- /dev/null
+++ b/ext/pcre/tests/preg_match_all_error.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test preg_match_all() function : error conditions - incorrect number of parameters
+--FILE--
+<?php
+/*
+* proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+echo "*** Testing preg_match_all() : error conditions ***\n";
+// Zero arguments
+echo "\n-- Testing preg_match_all() function with Zero arguments --\n";
+var_dump(preg_match_all());
+//Test preg_match_all with one more than the expected number of arguments
+echo "\n-- Testing preg_match_all() function with more than expected no. of arguments --\n";
+$pattern = '/\w/';
+$subject = 'string_val';
+$flags = PREG_OFFSET_CAPTURE;
+$offset = 10;
+$extra_arg = 10;
+var_dump(preg_match_all($pattern, $subject, $matches, $flags, $offset, $extra_arg));
+// Testing preg_match_all withone less than the expected number of arguments
+echo "\n-- Testing preg_match_all() function with less than expected no. of arguments --\n";
+$pattern = '/\w/';
+$subject = 'string_val';
+var_dump(preg_match_all($pattern, $subject));
+echo "Done"
+?>
+--EXPECTF--
+*** Testing preg_match_all() : error conditions ***
+
+-- Testing preg_match_all() function with Zero arguments --
+
+Warning: preg_match_all() expects at least 3 parameters, 0 given in %spreg_match_all_error.php on line %d
+bool(false)
+
+-- Testing preg_match_all() function with more than expected no. of arguments --
+
+Warning: preg_match_all() expects at most 5 parameters, 6 given in %spreg_match_all_error.php on line %d
+bool(false)
+
+-- Testing preg_match_all() function with less than expected no. of arguments --
+
+Warning: preg_match_all() expects at least 3 parameters, 2 given in %spreg_match_all_error.php on line %d
+bool(false)
+Done
diff --git a/ext/pcre/tests/preg_match_all_error1.phpt b/ext/pcre/tests/preg_match_all_error1.phpt
new file mode 100644
index 000000000..a3cb68404
--- /dev/null
+++ b/ext/pcre/tests/preg_match_all_error1.phpt
@@ -0,0 +1,81 @@
+--TEST--
+Test preg_match_all() function : error conditions - bad regular expressions
+--FILE--
+<?php
+/*
+* proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_match_all reacts to being passed the wrong type of regex argument
+*/
+echo "*** Testing preg_match_all() : error conditions ***\n";
+$regex_array = array('abcdef', //Regex without delimeter
+'/[a-zA-Z]', //Regex without closing delimeter
+'[a-zA-Z]/', //Regex without opening delimeter
+'/[a-zA-Z]/F', array('[a-z]', //Array of Regexes
+'[A-Z]', '[0-9]'), '/[a-zA-Z]/', //Regex string
+);
+$subject = 'test';
+foreach($regex_array as $regex_value) {
+ print "\nArg value is $regex_value\n";
+ var_dump(preg_match_all($regex_value, $subject, $matches1));
+ var_dump($matches1);
+}
+$regex_value = new stdclass(); //Object
+var_dump(preg_match_all($regex_value, $subject, $matches));
+var_dump($matches);
+?>
+--EXPECTF--
+*** Testing preg_match_all() : error conditions ***
+
+Arg value is abcdef
+
+Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in %spreg_match_all_error1.php on line %d
+bool(false)
+NULL
+
+Arg value is /[a-zA-Z]
+
+Warning: preg_match_all(): No ending delimiter '/' found in %spreg_match_all_error1.php on line %d
+bool(false)
+NULL
+
+Arg value is [a-zA-Z]/
+
+Warning: preg_match_all(): Unknown modifier '/' in %spreg_match_all_error1.php on line %d
+bool(false)
+NULL
+
+Arg value is /[a-zA-Z]/F
+
+Warning: preg_match_all(): Unknown modifier 'F' in %spreg_match_all_error1.php on line %d
+bool(false)
+NULL
+
+Arg value is Array
+
+Warning: preg_match_all() expects parameter 1 to be string, array given in %spreg_match_all_error1.php on line %d
+bool(false)
+NULL
+
+Arg value is /[a-zA-Z]/
+int(4)
+array(1) {
+ [0]=>
+ array(4) {
+ [0]=>
+ string(1) "t"
+ [1]=>
+ string(1) "e"
+ [2]=>
+ string(1) "s"
+ [3]=>
+ string(1) "t"
+ }
+}
+
+Warning: preg_match_all() expects parameter 1 to be string, object given in %spreg_match_all_error1.php on line %d
+bool(false)
+NULL
diff --git a/ext/pcre/tests/preg_match_all_error2.phpt b/ext/pcre/tests/preg_match_all_error2.phpt
new file mode 100644
index 000000000..1c55cce64
--- /dev/null
+++ b/ext/pcre/tests/preg_match_all_error2.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Test preg_match_all() function : error conditions - wrong arg types
+--FILE--
+<?php
+/*
+* proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_match_all reacts to being passed the wrong type of input argument
+*/
+echo "*** Testing preg_match_all() : error conditions ***\n";
+$regex = '/[a-zA-Z]/';
+$value = new stdclass(); //Object
+var_dump(preg_match_all($regex, $value, $matches));
+var_dump($matches);
+$input = array(array('this is', 'a subarray'), 'test',);
+foreach($input as $value) {
+ print "\nArg value is: $value\n";
+ var_dump(preg_match_all($regex, $value, $matches));
+ var_dump($matches);
+}
+echo "Done";
+?>
+--EXPECTF--
+*** Testing preg_match_all() : error conditions ***
+
+Warning: preg_match_all() expects parameter 2 to be string, object given in %spreg_match_all_error2.php on line %d
+bool(false)
+NULL
+
+Arg value is: Array
+
+Warning: preg_match_all() expects parameter 2 to be string, array given in %spreg_match_all_error2.php on line %d
+bool(false)
+NULL
+
+Arg value is: test
+int(4)
+array(1) {
+ [0]=>
+ array(4) {
+ [0]=>
+ string(1) "t"
+ [1]=>
+ string(1) "e"
+ [2]=>
+ string(1) "s"
+ [3]=>
+ string(1) "t"
+ }
+}
+Done
diff --git a/ext/pcre/tests/preg_match_all_error3.phpt b/ext/pcre/tests/preg_match_all_error3.phpt
new file mode 100644
index 000000000..b8b2ea211
--- /dev/null
+++ b/ext/pcre/tests/preg_match_all_error3.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Test preg_match_all() function : error conditions
+--FILE--
+<?php
+/*
+* proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+/*
+* Testing how preg_match_all reacts to being passed the wrong type of subpatterns array argument
+*/
+echo "*** Testing preg_match_all() : error conditions ***\n";
+$regex = '/[a-z]/';
+$subject = 'string';
+var_dump(preg_match_all($regex, $subject, test));
+echo "Done";
+?>
+--EXPECTF--
+
+Fatal error: Only variables can be passed by reference in %spreg_match_all_error3.php on line %d
diff --git a/ext/pcre/tests/preg_match_basic.phpt b/ext/pcre/tests/preg_match_basic.phpt
new file mode 100644
index 000000000..ddf54a0aa
--- /dev/null
+++ b/ext/pcre/tests/preg_match_basic.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test preg_match() function : basic functionality
+--FILE--
+<?php
+/*
+ * proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
+ * Function is implemented in ext/pcre/php_pcre.c
+*/
+$string = 'Hello, world. [*], this is \ a string';
+var_dump(preg_match('/^[hH]ello,\s/', $string, $match1)); //finds "Hello, "
+var_dump($match1);
+var_dump(preg_match('/l^o,\s\w{5}/', $string, $match2, PREG_OFFSET_CAPTURE)); // tries to find "lo, world" at start of string
+var_dump($match2);
+var_dump(preg_match('/\[\*\],\s(.*)/', $string, $match3)); //finds "[*], this is \ a string";
+var_dump($match3);
+var_dump(preg_match('@\w{4}\s\w{2}\s\\\(?:\s.*)@', $string, $match4, PREG_OFFSET_CAPTURE, 14)); //finds "this is \ a string" (with non-capturing parentheses)
+var_dump($match4);
+var_dump(preg_match('/hello world/', $string, $match5)); //tries to find "hello world" (should be Hello, world)
+var_dump($match5);
+?>
+
+--EXPECTF--
+
+int(1)
+array(1) {
+ [0]=>
+ string(7) "Hello, "
+}
+int(0)
+array(0) {
+}
+int(1)
+array(2) {
+ [0]=>
+ string(23) "[*], this is \ a string"
+ [1]=>
+ string(18) "this is \ a string"
+}
+int(1)
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(18) "this is \ a string"
+ [1]=>
+ int(19)
+ }
+}
+int(0)
+array(0) {
+}
+
diff --git a/ext/pcre/tests/preg_match_error.phpt b/ext/pcre/tests/preg_match_error.phpt
new file mode 100644
index 000000000..ca1f128ad
--- /dev/null
+++ b/ext/pcre/tests/preg_match_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test preg_match() function : error conditions - wrong numbers of parameters
+--FILE--
+<?php
+/*
+ * proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
+ * Function is implemented in ext/pcre/php_pcre.c
+*/
+echo "*** Testing preg_match() : error conditions ***\n";
+// Zero arguments
+echo "\n-- Testing preg_match() function with Zero arguments --\n";
+var_dump(preg_match());
+//Test preg_match with one more than the expected number of arguments
+echo "\n-- Testing preg_match() function with more than expected no. of arguments --\n";
+$pattern = '/\w/';
+$subject = 'string_val';
+$flags = PREG_OFFSET_CAPTURE;
+$offset = 10;
+$extra_arg = 10;
+var_dump(preg_match($pattern, $subject, $matches, $flags, $offset, $extra_arg));
+// Testing preg_match withone less than the expected number of arguments
+echo "\n-- Testing preg_match() function with less than expected no. of arguments --\n";
+$pattern = '/\w/';
+var_dump(preg_match($pattern));
+echo "Done"
+?>
+--EXPECTF--
+*** Testing preg_match() : error conditions ***
+
+-- Testing preg_match() function with Zero arguments --
+
+Warning: preg_match() expects at least 2 parameters, 0 given in %spreg_match_error.php on line %d
+bool(false)
+
+-- Testing preg_match() function with more than expected no. of arguments --
+
+Warning: preg_match() expects at most 5 parameters, 6 given in %spreg_match_error.php on line %d
+bool(false)
+
+-- Testing preg_match() function with less than expected no. of arguments --
+
+Warning: preg_match() expects at least 2 parameters, 1 given in %spreg_match_error.php on line %d
+bool(false)
+Done
diff --git a/ext/pcre/tests/preg_match_error1.phpt b/ext/pcre/tests/preg_match_error1.phpt
new file mode 100644
index 000000000..763048151
--- /dev/null
+++ b/ext/pcre/tests/preg_match_error1.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test preg_match() function : error conditions - bad regular expressions
+--FILE--
+<?php
+/*
+ * proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
+ * Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_match reacts to being passed the wrong type of regex argument
+*/
+echo "*** Testing preg_match() : error conditions ***\n";
+$regex_array = array('abcdef', //Regex without delimeter
+'/[a-zA-Z]', //Regex without closing delimeter
+'[a-zA-Z]/', //Regex without opening delimeter
+'/[a-zA-Z]/F', array('[a-z]', //Array of Regexes
+'[A-Z]', '[0-9]'), '/[a-zA-Z]/', //Regex string
+);
+$subject = 'this is a test';
+foreach($regex_array as $regex_value) {
+ print "\nArg value is $regex_value\n";
+ var_dump(preg_match($regex_value, $subject));
+}
+$regex_value = new stdclass(); //Object
+var_dump(preg_match($regex_value, $subject));
+?>
+--EXPECTF--
+
+*** Testing preg_match() : error conditions ***
+
+Arg value is abcdef
+
+Warning: preg_match(): Delimiter must not be alphanumeric or backslash in %spreg_match_error1.php on line %d
+bool(false)
+
+Arg value is /[a-zA-Z]
+
+Warning: preg_match(): No ending delimiter '/' found in %spreg_match_error1.php on line %d
+bool(false)
+
+Arg value is [a-zA-Z]/
+
+Warning: preg_match(): Unknown modifier '/' in %spreg_match_error1.php on line %d
+bool(false)
+
+Arg value is /[a-zA-Z]/F
+
+Warning: preg_match(): Unknown modifier 'F' in %spreg_match_error1.php on line %d
+bool(false)
+
+Arg value is Array
+
+Warning: preg_match() expects parameter 1 to be string, array given in %spreg_match_error1.php on line %d
+bool(false)
+
+Arg value is /[a-zA-Z]/
+int(1)
+
+Warning: preg_match() expects parameter 1 to be string, object given in %spreg_match_error1.php on line %d
+bool(false)
diff --git a/ext/pcre/tests/preg_match_error2.phpt b/ext/pcre/tests/preg_match_error2.phpt
new file mode 100644
index 000000000..f30fb4803
--- /dev/null
+++ b/ext/pcre/tests/preg_match_error2.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test preg_match() function : error conditions - wrong arg types
+--FILE--
+<?php
+/*
+ * proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
+ * Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_match reacts to being passed the wrong type of subject argument
+*/
+echo "*** Testing preg_match() : error conditions ***\n";
+$regex = '/[a-zA-Z]/';
+$input = array('this is a string', array('this is', 'a subarray'),);
+foreach($input as $value) {
+ print "\nArg value is: $value\n";
+ var_dump(preg_match($regex, $value));
+}
+$value = new stdclass(); //Object
+var_dump(preg_match($regex, $value));
+echo "Done";
+?>
+--EXPECTF--
+
+*** Testing preg_match() : error conditions ***
+
+Arg value is: this is a string
+int(1)
+
+Arg value is: Array
+
+Warning: preg_match() expects parameter 2 to be string, array given in %spreg_match_error2.php on line %d
+bool(false)
+
+Warning: preg_match() expects parameter 2 to be string, object given in %spreg_match_error2.php on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/pcre/tests/preg_quote_basic.phpt b/ext/pcre/tests/preg_quote_basic.phpt
new file mode 100644
index 000000000..d4bbe9661
--- /dev/null
+++ b/ext/pcre/tests/preg_quote_basic.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test preg_quote() function : basic functionality
+--FILE--
+<?php
+/*
+* proto string preg_quote(string str [, string delim_char])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+$string_before = '/this *-has \ metacharacters^ in $';
+print "\$string_before looks like: $string_before\n"; //$string_before is printed as is written
+$string_after = preg_quote($string_before, '/');
+print "\$string_after looks like: $string_after, with metacharacters and / (set as delimiter) escaped\n"; //$string_after is printed with metacharacters escaped.
+$string1 = 'testing - /this *-has \ metacharacters^ in $ should work';
+var_dump(preg_match('/^[tT]\w{6} - ' . preg_quote($string_before, '/') . ' [a-z]*\s*work$/', $string1, $matches1));
+var_dump($matches1);
+?>
+--EXPECT--
+
+$string_before looks like: /this *-has \ metacharacters^ in $
+$string_after looks like: \/this \*-has \\ metacharacters\^ in \$, with metacharacters and / (set as delimiter) escaped
+int(1)
+array(1) {
+ [0]=>
+ string(58) "testing - /this *-has \ metacharacters^ in $ should work"
+} \ No newline at end of file
diff --git a/ext/pcre/tests/preg_quote_error.phpt b/ext/pcre/tests/preg_quote_error.phpt
new file mode 100644
index 000000000..30b832dbf
--- /dev/null
+++ b/ext/pcre/tests/preg_quote_error.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test preg_quote() function : error conditions - wrong numbers of parameters
+--FILE--
+<?php
+/*
+* proto string preg_quote(string str [, string delim_char])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+echo "*** Testing preg_quote() : error conditions ***\n";
+// Zero arguments
+echo "\n-- Testing preg_quote() function with Zero arguments --\n";
+var_dump(preg_quote());
+//Test preg_quote with one more than the expected number of arguments
+echo "\n-- Testing preg_quote() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$delim_char = '/';
+$extra_arg = 10;
+var_dump(preg_quote($str, $delim_char, $extra_arg));
+echo "Done"
+?>
+--EXPECTF--
+*** Testing preg_quote() : error conditions ***
+
+-- Testing preg_quote() function with Zero arguments --
+
+Warning: preg_quote() expects at least 1 parameter, 0 given in %spreg_quote_error.php on line %d
+NULL
+
+-- Testing preg_quote() function with more than expected no. of arguments --
+
+Warning: preg_quote() expects at most 2 parameters, 3 given in %spreg_quote_error.php on line %d
+NULL
+Done
diff --git a/ext/pcre/tests/preg_quote_error1.phpt b/ext/pcre/tests/preg_quote_error1.phpt
new file mode 100644
index 000000000..a02c83670
--- /dev/null
+++ b/ext/pcre/tests/preg_quote_error1.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test preg_quote() function : error conditions - wrong arg types
+--FILE--
+<?php
+/*
+* proto string preg_quote(string str [, string delim_char])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_quote reacts to being passed the wrong type of input argument
+*/
+echo "*** Testing preg_quote() : error conditions ***\n";
+$input = array('this is a string', array('this is', 'a subarray'),);
+foreach($input as $value) {
+ print "\nArg value is: $value\n";
+ var_dump(preg_quote($value));
+}
+$value = new stdclass(); //Object
+var_dump(preg_quote($value));
+echo "Done";
+?>
+--EXPECTF--
+*** Testing preg_quote() : error conditions ***
+
+Arg value is: this is a string
+string(16) "this is a string"
+
+Arg value is: Array
+
+Warning: preg_quote() expects parameter 1 to be string, array given in %spreg_quote_error1.php on line %d
+NULL
+
+Warning: preg_quote() expects parameter 1 to be string, object given in %spreg_quote_error1.php on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/pcre/tests/preg_replace_basic.phpt b/ext/pcre/tests/preg_replace_basic.phpt
new file mode 100644
index 000000000..33fb2d4a8
--- /dev/null
+++ b/ext/pcre/tests/preg_replace_basic.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test preg_replace() function : basic functionality
+--FILE--
+<?php
+/*
+* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+$string = '123456789 - Hello, world - This is a string.';
+var_dump($string);
+var_dump(preg_replace('<- This is a string$>', 'This shouldn\'t work', $string)); //tries to find '- This is a string' at the end of a string but can't so replaces nothing and prints the unchanged $string.
+var_dump(preg_replace('<[0-35-9]>', '4', $string)); //finds any number that's not 4 and replaces it with a 4 ('444444444')
+var_dump(preg_replace('<\b[hH]\w{2,4}>', 'Bonjour', $string)); //finds h or H at the beginning of a word followed by 2-4 characters and replaces it with Bonjour (i.e. Hello -> Bonjour) (was finding the 'his' in This and replacing it)
+var_dump(preg_replace('<(\w)\s*-\s*(\w)>', '\\1. \\2', $string)); //finds dashes with an indefinate amount of whitespace around them and replaces them with a full stop precedeby no spaces and followed by one space
+var_dump(preg_replace('<(^[a-z]\w+)@(\w+)\.(\w+)\.([a-z]{2,}$)>', '\\1 at \\2 dot \\3 dot \\4', 'josmessa@uk.ibm.com')); //finds the e-mail address and replaces the @ and . with "at" and "dot" (uses backreferences) ('josmessa at uk dot ibm dot com')
+
+?>
+--EXPECT--
+
+string(54) "123456789 - Hello, world - This is a string."
+string(54) "123456789 - Hello, world - This is a string."
+string(54) "444444444 - Hello, world - This is a string."
+string(56) "123456789 - Bonjour, world - This is a string."
+string(42) "123456789. Hello, world. This is a string."
+string(30) "josmessa at uk dot ibm dot com"
diff --git a/ext/pcre/tests/preg_replace_callback_basic.phpt b/ext/pcre/tests/preg_replace_callback_basic.phpt
new file mode 100644
index 000000000..01d290a1b
--- /dev/null
+++ b/ext/pcre/tests/preg_replace_callback_basic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test preg_replace_callback() function : basic functionality
+--FILE--
+<?php
+/*
+* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+/*
+* Basic test for preg_replace_callback
+*/
+$replacement = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'); //array will have the default key values (0-9) and each value is the corresponding key written in words.
+function integer_word($matches) {
+ global $replacement;
+ return $replacement[$matches[0]]; //all examples will be looking for an integer value, if one is found it will be stored in $matches[0] which corresponds to a key in the $replacements array
+
+}
+$subject1 = 'there are 7 words in this sentence.';
+$new_subject1 = preg_replace_callback('/\d/', "integer_word", $subject1);
+print "$new_subject1 \n";
+$subject2 = '1 2 3 4 is now written in words';
+$new_subject2 = preg_replace_callback('/\d/', "integer_word", $subject2, 3); //limits to three replacements
+print "$new_subject2 \n";
+$subject3 = 'there are no numbers in this string';
+$new_subject3 = preg_replace_callback('/\d/', "integer_word", $subject3, 5, $count); //limites to five replacements and counts the number of replacements made ands stores in $count variable
+print "$new_subject3 \n";
+print $count;
+?>
+--EXPECTF--
+there are seven words in this sentence.
+one two three 4 is now written in words
+there are no numbers in this string
+0
diff --git a/ext/pcre/tests/preg_replace_callback_error.phpt b/ext/pcre/tests/preg_replace_callback_error.phpt
new file mode 100644
index 000000000..8d96446d4
--- /dev/null
+++ b/ext/pcre/tests/preg_replace_callback_error.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test preg_replace_callback() function : error
+--FILE--
+<?php
+/*
+* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+echo "***Testing preg_replace_callback() : error conditions***\n";
+//Zero arguments
+echo "\n-- Testing preg_replace_callback() function with Zero arguments --\n";
+var_dump(preg_replace_callback());
+//Test preg_replace_callback() with one more than the expected number of arguments
+echo "\n-- Testing preg_replace_callback() function with more than expected no. of arguments --\n";
+$replacement = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine');
+function integer_word($matches) {
+ global $replacement;
+ return $replacement[$matches[0]];
+}
+$regex = '/\d/';
+$subject = 'there are 7 words in this sentence.';
+$limit = 10;
+$extra_arg = 10;
+var_dump(preg_replace_callback($regex, 'integer_word', $subject, $limit, $count, $extra_arg));
+//Testing preg_replace_callback() with one less than the expected number of arguments
+echo "\n-- Testing preg_replace_callback() function with less than expected no. of arguments --\n";
+$regex = '/\d/';
+var_dump(preg_replace_callback($regex, 'integer word'));
+echo "Done";
+?>
+--EXPECTF--
+***Testing preg_replace_callback() : error conditions***
+
+-- Testing preg_replace_callback() function with Zero arguments --
+
+Warning: Wrong parameter count for preg_replace_callback() in %spreg_replace_callback_error.php on line %d
+NULL
+
+-- Testing preg_replace_callback() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for preg_replace_callback() in %spreg_replace_callback_error.php on line %d
+NULL
+
+-- Testing preg_replace_callback() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for preg_replace_callback() in %spreg_replace_callback_error.php on line %d
+NULL
+Done
diff --git a/ext/pcre/tests/preg_replace_error.phpt b/ext/pcre/tests/preg_replace_error.phpt
new file mode 100644
index 000000000..c91f500f7
--- /dev/null
+++ b/ext/pcre/tests/preg_replace_error.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test preg_replace() function : error - incorrect number of parameters
+--FILE--
+<?php
+/*
+* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+echo "*** Testing preg_replace() : error conditions ***\n";
+//Zero arguments
+echo "\n-- Testing preg_replace() function with zero arguments --\n";
+var_dump(preg_replace());
+//Test preg_replace() with one more than the expected number of arguments
+echo "\n-- Testing preg_replace() function with more than expected no. of arguments --\n";
+$regex = '/\w/';
+$replace = '1';
+$subject = 'string_val';
+$limit = 10;
+$extra_arg = 10;
+var_dump(preg_replace($regex, $replace, $subject, $limit, $count, $extra_arg));
+//Testing preg_replace() with one less than the expected number of arguments
+echo "\n-- Testing preg_replace() function with less than expected no. of arguments --\n";
+$regex = '/\w/';
+$replace = '1';
+var_dump(preg_replace($regex, $replace));
+echo "Done"
+?>
+--EXPECTF--
+*** Testing preg_replace() : error conditions ***
+
+-- Testing preg_replace() function with zero arguments --
+
+Warning: Wrong parameter count for preg_replace() in %spreg_replace_error.php on line %d
+NULL
+
+-- Testing preg_replace() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for preg_replace() in %spreg_replace_error.php on line %d
+NULL
+
+-- Testing preg_replace() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for preg_replace() in %spreg_replace_error.php on line %d
+NULL
+Done
diff --git a/ext/pcre/tests/preg_replace_error1.phpt b/ext/pcre/tests/preg_replace_error1.phpt
new file mode 100644
index 000000000..7ddfcfdef
--- /dev/null
+++ b/ext/pcre/tests/preg_replace_error1.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test preg_replace() function : error - bad regular expressions
+--FILE--
+<?php
+/*
+* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_replace reacts to being passed the wrong type of regex argument
+*/
+echo "*** Testing preg_replace() : error conditions***\n";
+$regex_array = array('abcdef', //Regex without delimeter
+'/[a-zA-Z]', //Regex without closing delimeter
+'[a-zA-Z]/', //Regex without opening delimeter
+'/[a-zA-Z]/F', array('[a-z]', //Array of Regexes
+'[A-Z]', '[0-9]'), '/[a-zA-Z]/', //Regex string
+);
+$replace = 1;
+$subject = 'a';
+foreach($regex_array as $regex_value) {
+ print "\nArg value is $regex_value\n";
+ var_dump(preg_replace($regex_value, $replace, $subject));
+}
+$regex_value = new stdclass(); //Object
+var_dump(preg_replace($regex_value, $replace, $subject));
+?>
+--EXPECTF--
+*** Testing preg_replace() : error conditions***
+
+Arg value is abcdef
+
+Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in %spreg_replace_error1.php on line %d
+NULL
+
+Arg value is /[a-zA-Z]
+
+Warning: preg_replace(): No ending delimiter '/' found in %spreg_replace_error1.php on line %d
+NULL
+
+Arg value is [a-zA-Z]/
+
+Warning: preg_replace(): Unknown modifier '/' in %spreg_replace_error1.php on line %d
+NULL
+
+Arg value is /[a-zA-Z]/F
+
+Warning: preg_replace(): Unknown modifier 'F' in %spreg_replace_error1.php on line %d
+NULL
+
+Arg value is Array
+string(1) "a"
+
+Arg value is /[a-zA-Z]/
+string(1) "1"
+
+Catchable fatal error: Object of class stdClass could not be converted to string in %spreg_replace_error1.php on line %d
+
diff --git a/ext/pcre/tests/preg_replace_error2.phpt b/ext/pcre/tests/preg_replace_error2.phpt
new file mode 100644
index 000000000..bf5d3e072
--- /dev/null
+++ b/ext/pcre/tests/preg_replace_error2.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test preg_replace() function : error conditions - wrong arg types
+--FILE--
+<?php
+/*
+* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_replace reacts to being passed the wrong type of replacement argument
+*/
+echo "*** Testing preg_replace() : error conditions ***\n";
+$regex = '/[a-zA-Z]/';
+$replace = array('this is a string', array('this is', 'a subarray'),);
+$subject = 'test';
+foreach($replace as $value) {
+ print "\nArg value is: $value\n";
+ var_dump(preg_replace($regex, $value, $subject));
+}
+$value = new stdclass(); //Object
+var_dump(preg_replace($regex, $value, $subject));
+echo "Done";
+?>
+--EXPECTF--
+*** Testing preg_replace() : error conditions ***
+
+Arg value is: this is a string
+string(64) "this is a stringthis is a stringthis is a stringthis is a string"
+
+Arg value is: Array
+
+Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement is an array in %spreg_replace_error2.php on line %d
+bool(false)
+
+Catchable fatal error: Object of class stdClass could not be converted to string in %spreg_replace_error2.php on line %d
+
diff --git a/ext/pcre/tests/preg_replace_variation1.phpt b/ext/pcre/tests/preg_replace_variation1.phpt
new file mode 100644
index 000000000..ac79e0bfa
--- /dev/null
+++ b/ext/pcre/tests/preg_replace_variation1.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test preg_replace() function : variation both arguments are arrays
+--FILE--
+<?php
+/*
+* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+/*
+* Testing preg_replace when the regex and the replacement are both arrays.
+*/
+$string = 'This is a string. It contains numbers (0-9) as well as parentheses and some other things!';
+$new_string = preg_replace(array('/\b\w{1}s/', '/(\d{1})-(\d{1})/', '/[\(!\)]/'), array('test', '$1 to $2', '*'), $string);
+print $new_string;
+?>
+--EXPECTF--
+This test a string. It contains numbers *0 to 9* test well test parentheses and some other things*
diff --git a/ext/pcre/tests/preg_split_basic.phpt b/ext/pcre/tests/preg_split_basic.phpt
new file mode 100644
index 000000000..324270ac3
--- /dev/null
+++ b/ext/pcre/tests/preg_split_basic.phpt
@@ -0,0 +1,76 @@
+--TEST--
+Test preg_split() function : basic functionality
+--INI--
+--FILE--
+<?php
+/*
+* proto array preg_split(string pattern, string subject [, int limit [, int flags]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+$string = 'this is a_list: value1, Test__, string; Hello, world!_(parentheses)';
+var_dump(preg_split('/[:,;\(\)]/', $string, -1, PREG_SPLIT_NO_EMPTY)); //parts of $string seperated by : , ; ( or ) are put into an array.
+var_dump(preg_split('/:\s*(\w*,*\s*)+;/', $string)); //all text between : and ; is removed
+var_dump(preg_split('/(\(|\))/', $string, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY)); //all text before (parentheses) is put into first element, ( into second, "parentheses" into third and ) into fourth.
+var_dump(preg_split('/NAME/i', $string)); //tries to find NAME regardless of case in $string (can't split it so just returns how string as first element)
+var_dump(preg_split('/\w/', $string, -1, PREG_SPLIT_NO_EMPTY)); //every character (including whitespace) is put into an array element
+
+?>
+--EXPECT--
+array(7) {
+ [0]=>
+ string(14) "this is a_list"
+ [1]=>
+ string(7) " value1"
+ [2]=>
+ string(7) " Test__"
+ [3]=>
+ string(7) " string"
+ [4]=>
+ string(6) " Hello"
+ [5]=>
+ string(8) " world!_"
+ [6]=>
+ string(11) "parentheses"
+}
+array(2) {
+ [0]=>
+ string(14) "this is a_list"
+ [1]=>
+ string(28) " Hello, world!_(parentheses)"
+}
+array(4) {
+ [0]=>
+ string(54) "this is a_list: value1, Test__, string; Hello, world!_"
+ [1]=>
+ string(1) "("
+ [2]=>
+ string(11) "parentheses"
+ [3]=>
+ string(1) ")"
+}
+array(1) {
+ [0]=>
+ string(67) "this is a_list: value1, Test__, string; Hello, world!_(parentheses)"
+}
+array(10) {
+ [0]=>
+ string(1) " "
+ [1]=>
+ string(1) " "
+ [2]=>
+ string(2) ": "
+ [3]=>
+ string(2) ", "
+ [4]=>
+ string(2) ", "
+ [5]=>
+ string(2) "; "
+ [6]=>
+ string(2) ", "
+ [7]=>
+ string(1) "!"
+ [8]=>
+ string(1) "("
+ [9]=>
+ string(1) ")"
+} \ No newline at end of file
diff --git a/ext/pcre/tests/preg_split_error.phpt b/ext/pcre/tests/preg_split_error.phpt
new file mode 100644
index 000000000..960b286c9
--- /dev/null
+++ b/ext/pcre/tests/preg_split_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test preg_split() function : error conditions - incorrect number of parameters
+--FILE--
+<?php
+/*
+* proto array preg_split(string pattern, string subject [, int limit [, int flags]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+echo "*** Testing preg_split() : error conditions ***\n";
+// Zero arguments
+echo "\n-- Testing preg_split() function with Zero arguments --\n";
+var_dump(preg_split());
+//Test preg_split with one more than the expected number of arguments
+echo "\n-- Testing preg_split() function with more than expected no. of arguments --\n";
+$pattern = '/_/';
+$subject = 'string_val';
+$limit = 10;
+$flags = PREG_SPLIT_NO_EMPTY;
+$extra_arg = 10;
+var_dump(preg_split($pattern, $subject, $limit, $flags, $extra_arg));
+// Testing preg_split withone less than the expected number of arguments
+echo "\n-- Testing preg_split() function with less than expected no. of arguments --\n";
+$pattern = '/\./';
+var_dump(preg_split($pattern));
+echo "Done"
+?>
+--EXPECTF--
+*** Testing preg_split() : error conditions ***
+
+-- Testing preg_split() function with Zero arguments --
+
+Warning: preg_split() expects at least 2 parameters, 0 given in %spreg_split_error.php on line %d
+bool(false)
+
+-- Testing preg_split() function with more than expected no. of arguments --
+
+Warning: preg_split() expects at most 4 parameters, 5 given in %spreg_split_error.php on line %d
+bool(false)
+
+-- Testing preg_split() function with less than expected no. of arguments --
+
+Warning: preg_split() expects at least 2 parameters, 1 given in %spreg_split_error.php on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/pcre/tests/preg_split_error1.phpt b/ext/pcre/tests/preg_split_error1.phpt
new file mode 100644
index 000000000..79942a948
--- /dev/null
+++ b/ext/pcre/tests/preg_split_error1.phpt
@@ -0,0 +1,67 @@
+--TEST--
+Test preg_split() function : error conditions - bad regular expressions
+--FILE--
+<?php
+/*
+* proto array preg_split(string pattern, string subject [, int limit [, int flags]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_split reacts to being passed the wrong type of regex argument
+*/
+echo "*** Testing preg_split() : error conditions ***\n";
+$regex_array = array('abcdef', //Regex without delimiter
+'/[a-zA-Z]', //Regex without closing delimiter
+'[a-zA-Z]/', //Regex without opening delimiter
+'/[a-zA-Z]/F', array('[a-z]', //Array of Regexes
+'[A-Z]', '[0-9]'), '/[a-zA-Z]/', //Regex string
+);
+$subject = '1 2 a 3 4 b 5 6';
+foreach($regex_array as $regex_value) {
+ print "\nArg value is $regex_value\n";
+ var_dump(preg_split($regex_value, $subject));
+}
+$regex_value = new stdclass(); //Object
+var_dump(preg_split($regex_value, $subject));
+?>
+--EXPECTF--
+*** Testing preg_split() : error conditions ***
+
+Arg value is abcdef
+
+Warning: preg_split(): Delimiter must not be alphanumeric or backslash in %spreg_split_error1.php on line %d
+bool(false)
+
+Arg value is /[a-zA-Z]
+
+Warning: preg_split(): No ending delimiter '/' found in %spreg_split_error1.php on line %d
+bool(false)
+
+Arg value is [a-zA-Z]/
+
+Warning: preg_split(): Unknown modifier '/' in %spreg_split_error1.php on line %d
+bool(false)
+
+Arg value is /[a-zA-Z]/F
+
+Warning: preg_split(): Unknown modifier 'F' in %spreg_split_error1.php on line %d
+bool(false)
+
+Arg value is Array
+
+Warning: preg_split() expects parameter 1 to be string, array given in %spreg_split_error1.php on line %d
+bool(false)
+
+Arg value is /[a-zA-Z]/
+array(3) {
+ [0]=>
+ string(4) "1 2 "
+ [1]=>
+ string(5) " 3 4 "
+ [2]=>
+ string(4) " 5 6"
+}
+
+Warning: preg_split() expects parameter 1 to be string, object given in %spreg_split_error1.php on line %d
+bool(false)
diff --git a/ext/pcre/tests/preg_split_error2.phpt b/ext/pcre/tests/preg_split_error2.phpt
new file mode 100644
index 000000000..e08182177
--- /dev/null
+++ b/ext/pcre/tests/preg_split_error2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test preg_split() function : error conditions - wrong arg types
+--FILE--
+<?php
+/*
+* proto array preg_split(string pattern, string subject [, int limit [, int flags]])
+* Function is implemented in ext/pcre/php_pcre.c
+*/
+error_reporting(E_ALL&~E_NOTICE);
+/*
+* Testing how preg_split reacts to being passed the wrong type of input argument
+*/
+echo "*** Testing preg_split() : error conditions ***\n";
+$regex = '/[a-zA-Z]/';
+$input = array(array('this is', 'a subarray'),);
+foreach($input as $value) {
+ print "\nArg value is: $value\n";
+ var_dump(preg_split($regex, $value));
+}
+$value = new stdclass(); //Object
+var_dump(preg_split($regex, $value));
+echo "Done";
+?>
+--EXPECTF--
+*** Testing preg_split() : error conditions ***
+
+Arg value is: Array
+
+Warning: preg_split() expects parameter 2 to be string, array given in %spreg_split_error2.php on line %d
+bool(false)
+
+Warning: preg_split() expects parameter 2 to be string, object given in %spreg_split_error2.php on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/pcre/upgrade-pcre.php b/ext/pcre/upgrade-pcre.php
index dd0a8a783..43a98c94b 100644
--- a/ext/pcre/upgrade-pcre.php
+++ b/ext/pcre/upgrade-pcre.php
@@ -37,9 +37,9 @@ function recurse($path)
if ($file[0] === '.' ||
$file === 'CVS' ||
- substr_compare($file, '.lo', -3, 3) == 0 ||
- substr_compare($file, '.loT', -4, 4) == 0 ||
- substr_compare($file, '.o', -2, 2) == 0) continue;
+ @substr_compare($file, '.lo', -3, 3) === 0 ||
+ @substr_compare($file, '.loT', -4, 4) === 0 ||
+ @substr_compare($file, '.o', -2, 2) === 0) continue;
$file = "$path/$file";
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index c19620115..2a55bf9a8 100755
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo.c,v 1.57.2.17.2.9 2007/07/23 11:53:58 jani Exp $ */
+/* $Id: pdo.c,v 1.57.2.17.2.10 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index e3d49f3c9..5d567741e 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_dbh.c,v 1.82.2.31.2.17 2007/09/12 18:26:49 iliaa Exp $ */
+/* $Id: pdo_dbh.c,v 1.82.2.31.2.22 2008/03/03 21:14:33 iliaa Exp $ */
/* The PDO Database Handle Class */
@@ -669,8 +669,17 @@ static PHP_METHOD(PDO, rollBack)
static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, long attr, zval *value TSRMLS_DC) /* {{{ */
{
+
+#define PDO_LONG_PARAM_CHECK \
+ if (Z_TYPE_P(value) != IS_LONG && Z_TYPE_P(value) != IS_STRING && Z_TYPE_P(value) != IS_BOOL) { \
+ pdo_raise_impl_error(dbh, NULL, "HY000", "attribute value must be an integer" TSRMLS_CC); \
+ PDO_HANDLE_DBH_ERR(); \
+ return FAILURE; \
+ } \
+
switch (attr) {
case PDO_ATTR_ERRMODE:
+ PDO_LONG_PARAM_CHECK;
convert_to_long(value);
switch (Z_LVAL_P(value)) {
case PDO_ERRMODE_SILENT:
@@ -686,6 +695,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, long attr, zval *value TSRMLS_D
return FAILURE;
case PDO_ATTR_CASE:
+ PDO_LONG_PARAM_CHECK;
convert_to_long(value);
switch (Z_LVAL_P(value)) {
case PDO_CASE_NATURAL:
@@ -701,6 +711,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, long attr, zval *value TSRMLS_D
return FAILURE;
case PDO_ATTR_ORACLE_NULLS:
+ PDO_LONG_PARAM_CHECK;
convert_to_long(value);
dbh->oracle_nulls = Z_LVAL_P(value);
return SUCCESS;
@@ -714,6 +725,8 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, long attr, zval *value TSRMLS_D
return FAILURE;
}
}
+ } else {
+ PDO_LONG_PARAM_CHECK;
}
convert_to_long(value);
if (Z_LVAL_P(value) == PDO_FETCH_USE_DEFAULT) {
@@ -724,6 +737,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, long attr, zval *value TSRMLS_D
return SUCCESS;
case PDO_ATTR_STRINGIFY_FETCHES:
+ PDO_LONG_PARAM_CHECK;
convert_to_long(value);
dbh->stringify = Z_LVAL_P(value) ? 1 : 0;
return SUCCESS;
@@ -815,9 +829,9 @@ static PHP_METHOD(PDO, setAttribute)
{
pdo_dbh_t *dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
long attr;
- zval *value = NULL;
+ zval *value;
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz!", &attr, &value)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz", &attr, &value)) {
RETURN_FALSE;
}
@@ -978,7 +992,7 @@ static PHP_METHOD(PDO, errorInfo)
pdo_dbh_t *dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
if (ZEND_NUM_ARGS()) {
- RETURN_FALSE;
+ WRONG_PARAM_COUNT;
}
PDO_CONSTRUCT_CHECK;
@@ -1119,6 +1133,10 @@ static PHP_METHOD(PDO, getAvailableDrivers)
{
HashPosition pos;
pdo_driver_t **pdriver;
+
+ if (ZEND_NUM_ARGS()) {
+ WRONG_PARAM_COUNT;
+ }
array_init(return_value);
@@ -1273,12 +1291,18 @@ static union _zend_function *dbh_method_get(
if (zend_hash_find(dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH],
lc_method_name, method_len+1, (void**)&fbc) == FAILURE) {
- fbc = NULL;
+ if (std_object_handlers.get_method) {
+ fbc = std_object_handlers.get_method(object_pp, lc_method_name, method_len TSRMLS_CC);
+ }
+ if (!fbc) {
+ fbc = NULL;
+ }
+
goto out;
}
/* got it */
}
-
+
out:
efree(lc_method_name);
return fbc;
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
index 4aaa8973a..1913f0dc7 100644
--- a/ext/pdo/pdo_sql_parser.c
+++ b/ext/pdo/pdo_sql_parser.c
@@ -1,9 +1,9 @@
-/* Generated by re2c 0.11.0 on Mon Oct 29 18:36:37 2007 */
+/* Generated by re2c 0.11.0 on Mon Nov 26 16:10:28 2007 */
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_sql_parser.c,v 1.35.2.6.2.13 2007/10/29 22:37:25 iliaa Exp $ */
+/* $Id: pdo_sql_parser.c,v 1.35.2.6.2.15 2007/12/31 07:20:09 sebastian Exp $ */
#include "php.h"
#include "php_pdo_driver.h"
@@ -73,7 +73,6 @@ yy4:
yy5:
yych = *++YYCURSOR;
switch(yych) {
- case '-':
case '0':
case '1':
case '2':
@@ -183,7 +182,6 @@ yy16:
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych) {
- case '-':
case '0':
case '1':
case '2':
diff --git a/ext/pdo/pdo_sql_parser.c.orig b/ext/pdo/pdo_sql_parser.c.orig
index 9b537680c..d507f7d9c 100644
--- a/ext/pdo/pdo_sql_parser.c.orig
+++ b/ext/pdo/pdo_sql_parser.c.orig
@@ -1,10 +1,10 @@
-/* Generated by re2c 0.11.0 on Mon Oct 29 18:36:37 2007 */
+/* Generated by re2c 0.11.0 on Mon Nov 26 16:10:28 2007 */
#line 1 "ext/pdo/pdo_sql_parser.re"
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_sql_parser.c,v 1.35.2.6.2.13 2007/10/29 22:37:25 iliaa Exp $ */
+/* $Id: pdo_sql_parser.c,v 1.35.2.6.2.15 2007/12/31 07:20:09 sebastian Exp $ */
#include "php.h"
#include "php_pdo_driver.h"
@@ -78,7 +78,6 @@ yy4:
yy5:
yych = *++YYCURSOR;
switch(yych) {
- case '-':
case '0':
case '1':
case '2':
@@ -156,7 +155,7 @@ yy6:
yy7:
#line 62 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_BIND_POS); }
-#line 160 "ext/pdo/pdo_sql_parser.c"
+#line 159 "ext/pdo/pdo_sql_parser.c"
yy8:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -172,12 +171,12 @@ yy8:
yy10:
#line 64 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 176 "ext/pdo/pdo_sql_parser.c"
+#line 175 "ext/pdo/pdo_sql_parser.c"
yy11:
++YYCURSOR;
#line 65 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_EOI); }
-#line 181 "ext/pdo/pdo_sql_parser.c"
+#line 180 "ext/pdo/pdo_sql_parser.c"
yy13:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -190,13 +189,12 @@ yy13:
yy15:
#line 60 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 194 "ext/pdo/pdo_sql_parser.c"
+#line 193 "ext/pdo/pdo_sql_parser.c"
yy16:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych) {
- case '-':
case '0':
case '1':
case '2':
@@ -265,7 +263,7 @@ yy16:
yy18:
#line 61 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_BIND); }
-#line 269 "ext/pdo/pdo_sql_parser.c"
+#line 267 "ext/pdo/pdo_sql_parser.c"
yy19:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -279,7 +277,7 @@ yy21:
++YYCURSOR;
#line 59 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 283 "ext/pdo/pdo_sql_parser.c"
+#line 281 "ext/pdo/pdo_sql_parser.c"
yy23:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -293,7 +291,7 @@ yy25:
++YYCURSOR;
#line 58 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 297 "ext/pdo/pdo_sql_parser.c"
+#line 295 "ext/pdo/pdo_sql_parser.c"
}
#line 66 "ext/pdo/pdo_sql_parser.re"
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re
index 5f957bc24..3b89d14d0 100644
--- a/ext/pdo/pdo_sql_parser.re
+++ b/ext/pdo/pdo_sql_parser.re
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_sql_parser.re,v 1.28.2.4.2.10 2007/10/29 22:37:25 iliaa Exp $ */
+/* $Id: pdo_sql_parser.re,v 1.28.2.4.2.12 2007/12/31 07:17:40 sebastian Exp $ */
#include "php.h"
#include "php_pdo_driver.h"
@@ -46,7 +46,7 @@ static int scan(Scanner *s)
s->tok = cursor;
/*!re2c
- BINDCHR = [:][a-zA-Z0-9_-]+;
+ BINDCHR = [:][a-zA-Z0-9_]+;
QUESTION = [?];
SPECIALS = [:?"'];
MULTICHAR = [:?];
diff --git a/ext/pdo/pdo_sqlstate.c b/ext/pdo/pdo_sqlstate.c
index c92ea4b4e..181415459 100644
--- a/ext/pdo/pdo_sqlstate.c
+++ b/ext/pdo/pdo_sqlstate.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_sqlstate.c,v 1.7.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: pdo_sqlstate.c,v 1.7.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 3e85321b7..2e1621672 100755
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.26 2007/10/31 12:58:24 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.34 2008/02/26 00:14:04 iliaa Exp $ */
/* The PDO Statement Handle Class */
@@ -894,6 +894,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
int flags = how & PDO_FETCH_FLAGS, idx, old_arg_count = 0;
zend_class_entry *ce = NULL, *old_ce = NULL;
zval grp_val, *grp, **pgrp, *retval, *old_ctor_args = NULL;
+ int colno;
if (how == PDO_FETCH_USE_DEFAULT) {
how = stmt->default_fetch_type;
@@ -909,6 +910,12 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
return 1;
}
+ if (flags & PDO_FETCH_GROUP && stmt->fetch.column == -1) {
+ colno = 1;
+ } else {
+ colno = stmt->fetch.column;
+ }
+
if (return_value) {
int i = 0;
@@ -945,13 +952,21 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
break;
case PDO_FETCH_COLUMN:
- if (stmt->fetch.column >= 0 && stmt->fetch.column < stmt->column_count) {
- fetch_value(stmt, return_value, stmt->fetch.column, NULL TSRMLS_CC);
+ if (colno >= 0 && colno < stmt->column_count) {
+ if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) {
+ fetch_value(stmt, return_value, 1, NULL TSRMLS_CC);
+ } else if (flags == PDO_FETCH_GROUP && colno) {
+ fetch_value(stmt, return_value, 0, NULL TSRMLS_CC);
+ } else {
+ fetch_value(stmt, return_value, colno, NULL TSRMLS_CC);
+ }
if (!return_all) {
return 1;
} else {
break;
}
+ } else {
+ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid column index" TSRMLS_CC);
}
return 0;
@@ -1049,7 +1064,11 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
if (return_all && how != PDO_FETCH_KEY_PAIR) {
INIT_PZVAL(&grp_val);
- fetch_value(stmt, &grp_val, i, NULL TSRMLS_CC);
+ if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) {
+ fetch_value(stmt, &grp_val, colno, NULL TSRMLS_CC);
+ } else {
+ fetch_value(stmt, &grp_val, i, NULL TSRMLS_CC);
+ }
convert_to_string(&grp_val);
if (how == PDO_FETCH_COLUMN) {
i = stmt->column_count; /* no more data to fetch */
@@ -1527,7 +1546,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
switch(ZEND_NUM_ARGS()) {
case 0:
case 1:
- stmt->fetch.column = how & PDO_FETCH_GROUP ? 1 : 0;
+ stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0;
break;
case 2:
convert_to_long(arg2);
diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h
index 52ecbd3d0..4812a6d48 100755
--- a/ext/pdo/php_pdo.h
+++ b/ext/pdo/php_pdo.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo.h,v 1.7.2.5.2.3 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_pdo.h,v 1.7.2.5.2.4 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PDO_H
#define PHP_PDO_H
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h
index 4bb2efc9d..eec8f2137 100755
--- a/ext/pdo/php_pdo_driver.h
+++ b/ext/pdo/php_pdo_driver.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_driver.h,v 1.66.2.11.2.6 2007/07/23 11:53:58 jani Exp $ */
+/* $Id: php_pdo_driver.h,v 1.66.2.11.2.8 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PDO_DRIVER_H
#define PHP_PDO_DRIVER_H
@@ -67,7 +67,7 @@ enum pdo_param_type {
PDO_PARAM_STMT, /* hierarchical result set */
/* get_col ptr should point to a zend_bool */
- PDO_PARAM_BOOL,
+ PDO_PARAM_BOOL
};
/* magic flag to denote a parameter as being input/output */
diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h
index 3f8f76888..dd2218b3d 100755
--- a/ext/pdo/php_pdo_int.h
+++ b/ext/pdo/php_pdo_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_int.h,v 1.17.2.6.2.2 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_pdo_int.h,v 1.17.2.6.2.3 2007/12/31 07:20:09 sebastian Exp $ */
/* Stuff private to the PDO extension and not for consumption by PDO drivers
* */
diff --git a/ext/pdo/tests/bug_43130.phpt b/ext/pdo/tests/bug_43130.phpt
index 5082895cb..dd956299e 100644
--- a/ext/pdo/tests/bug_43130.phpt
+++ b/ext/pdo/tests/bug_43130.phpt
@@ -6,6 +6,7 @@ if (!extension_loaded('pdo')) die('skip');
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
if (!strncasecmp(getenv('PDOTEST_DSN'), 'sqlite', strlen('sqlite'))) die('skip not relevant for sqlite driver');
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'pgsql', strlen('pgsql'))) die('skip not relevant for pgsql driver');
require_once $dir . 'pdo_test.inc';
PDOTest::skip();
?>
@@ -27,5 +28,8 @@ $id = '1';
$stmt->execute();
var_dump($stmt->fetch(PDO::FETCH_COLUMN));
?>
---EXPECT--
-string(5) "test1"
+--EXPECTF--
+Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in %s on line %d
+
+Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d
+bool(false)
diff --git a/ext/pdo/tests/bug_43663.phpt b/ext/pdo/tests/bug_43663.phpt
new file mode 100644
index 000000000..2e903d788
--- /dev/null
+++ b/ext/pdo/tests/bug_43663.phpt
@@ -0,0 +1,22 @@
+--TEST--
+PDO Common: Bug #43663 (__call on classes derived from PDO)
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded('pdo_sqlite')) die('skip no pdo_sqlite');
+?>
+--FILE--
+<?php
+class test extends PDO{
+ function __call($name, array $args) {
+ echo "Called $name in ".__CLASS__."\n";
+ }
+ function foo() {
+ echo "Called foo in ".__CLASS__."\n";
+ }
+}
+$a = new test('sqlite::memory:');
+$a->foo();
+$a->bar();
+--EXPECT--
+Called foo in test
+Called bar in test
diff --git a/ext/pdo/tests/bug_44159.phpt b/ext/pdo/tests/bug_44159.phpt
new file mode 100644
index 000000000..db4da4013
--- /dev/null
+++ b/ext/pdo/tests/bug_44159.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL))
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_sqlite')) die('skip no pdo_sqlite');
+?>
+--FILE--
+<?php
+
+$pdo = new PDO("sqlite:/tmp/foo.db");
+
+$attrs = array(PDO::ATTR_STATEMENT_CLASS, PDO::ATTR_STRINGIFY_FETCHES, PDO::NULL_TO_STRING);
+
+foreach ($attrs as $attr) {
+ var_dump($pdo->setAttribute($attr, NULL));
+ var_dump($pdo->setAttribute($attr, 1));
+ var_dump($pdo->setAttribute($attr, 'nonsense'));
+}
+
+?>
+--EXPECTF--
+Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d
+bool(false)
+
+Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d
+bool(false)
+
+Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d
+bool(false)
+
+Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: attribute value must be an integer in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 7e80a19d0..1d7a826e7 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dblib_driver.c,v 1.9.2.2.2.2 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: dblib_driver.c,v 1.9.2.2.2.3 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c
index f183c63ef..6302fc3ae 100644
--- a/ext/pdo_dblib/dblib_stmt.c
+++ b/ext/pdo_dblib/dblib_stmt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dblib_stmt.c,v 1.6.2.2.2.4 2007/01/15 01:56:09 fmk Exp $ */
+/* $Id: dblib_stmt.c,v 1.6.2.2.2.5 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/ext/pdo_dblib/pdo_dblib.c b/ext/pdo_dblib/pdo_dblib.c
index 67e48985f..5203da769 100644
--- a/ext/pdo_dblib/pdo_dblib.c
+++ b/ext/pdo_dblib/pdo_dblib.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_dblib.c,v 1.9.2.6.2.3 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: pdo_dblib.c,v 1.9.2.6.2.4 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/ext/pdo_dblib/php_pdo_dblib.h b/ext/pdo_dblib/php_pdo_dblib.h
index 8c08d8936..6c546e1b2 100644
--- a/ext/pdo_dblib/php_pdo_dblib.h
+++ b/ext/pdo_dblib/php_pdo_dblib.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_dblib.h,v 1.2.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_pdo_dblib.h,v 1.2.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PDO_DBLIB_H
#define PHP_PDO_DBLIB_H
diff --git a/ext/pdo_dblib/php_pdo_dblib_int.h b/ext/pdo_dblib/php_pdo_dblib_int.h
index af861731d..8f3096522 100644
--- a/ext/pdo_dblib/php_pdo_dblib_int.h
+++ b/ext/pdo_dblib/php_pdo_dblib_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_dblib_int.h,v 1.4.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_pdo_dblib_int.h,v 1.4.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PDO_DBLIB_INT_H
#define PHP_PDO_DBLIB_INT_H
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c
index af9861f96..e3d777be6 100644
--- a/ext/pdo_firebird/firebird_driver.c
+++ b/ext/pdo_firebird/firebird_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: firebird_driver.c,v 1.17.2.2.2.4 2007/02/27 03:28:16 iliaa Exp $ */
+/* $Id: firebird_driver.c,v 1.17.2.2.2.5 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c
index 0a72bc151..b58ea1b17 100644
--- a/ext/pdo_firebird/firebird_statement.c
+++ b/ext/pdo_firebird/firebird_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: firebird_statement.c,v 1.18.2.1.2.5 2007/02/27 03:04:40 iliaa Exp $ */
+/* $Id: firebird_statement.c,v 1.18.2.1.2.6 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_firebird/pdo_firebird.c b/ext/pdo_firebird/pdo_firebird.c
index f778cc71a..a5b8156e8 100644
--- a/ext/pdo_firebird/pdo_firebird.c
+++ b/ext/pdo_firebird/pdo_firebird.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_firebird.c,v 1.4.2.3.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: pdo_firebird.c,v 1.4.2.3.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_firebird/php_pdo_firebird.h b/ext/pdo_firebird/php_pdo_firebird.h
index 1ce59778d..0711450a5 100644
--- a/ext/pdo_firebird/php_pdo_firebird.h
+++ b/ext/pdo_firebird/php_pdo_firebird.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_firebird.h,v 1.3.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_pdo_firebird.h,v 1.3.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PDO_FIREBIRD_H
#define PHP_PDO_FIREBIRD_H
diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h
index ed9f9dc01..c49a31095 100644
--- a/ext/pdo_firebird/php_pdo_firebird_int.h
+++ b/ext/pdo_firebird/php_pdo_firebird_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_firebird_int.h,v 1.10.2.1.2.1 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: php_pdo_firebird_int.h,v 1.10.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PDO_FIREBIRD_INT_H
#define PHP_PDO_FIREBIRD_INT_H
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index bd487dedc..3073c4bf4 100755
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysql_driver.c,v 1.59.2.13.2.5 2007/06/18 21:51:32 stas Exp $ */
+/* $Id: mysql_driver.c,v 1.59.2.13.2.6 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 39e10530c..0a1a66e87 100755
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysql_statement.c,v 1.48.2.14.2.6 2007/05/17 15:12:23 tony2001 Exp $ */
+/* $Id: mysql_statement.c,v 1.48.2.14.2.7 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c
index d0bb2f79b..315770b12 100755
--- a/ext/pdo_mysql/pdo_mysql.c
+++ b/ext/pdo_mysql/pdo_mysql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_mysql.c,v 1.8.2.13.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: pdo_mysql.c,v 1.8.2.13.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_mysql/php_pdo_mysql.h b/ext/pdo_mysql/php_pdo_mysql.h
index cef81f992..3a5ee2b8f 100755
--- a/ext/pdo_mysql/php_pdo_mysql.h
+++ b/ext/pdo_mysql/php_pdo_mysql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_mysql.h,v 1.3.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pdo_mysql.h,v 1.3.2.1.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PDO_MYSQL_H
#define PHP_PDO_MYSQL_H
diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h
index a41a727ad..c6e60bd35 100755
--- a/ext/pdo_mysql/php_pdo_mysql_int.h
+++ b/ext/pdo_mysql/php_pdo_mysql_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_mysql_int.h,v 1.16.2.4.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pdo_mysql_int.h,v 1.16.2.4.2.2 2007/12/31 07:20:09 sebastian Exp $ */
#ifndef PHP_PDO_MYSQL_INT_H
#define PHP_PDO_MYSQL_INT_H
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c
index 6dcbf5989..7ed6d83fc 100755
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci_driver.c,v 1.24.2.4.2.7 2007/08/31 21:08:48 sixd Exp $ */
+/* $Id: oci_driver.c,v 1.24.2.4.2.10 2008/03/08 14:01:49 felipe Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -494,9 +494,12 @@ static int oci_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *return_valu
OCIClientVersion(&major, &minor, &update, &patch, &port_update);
slprintf(verstr, sizeof(verstr), "%d.%d.%d.%d.%d", major, minor, update, patch, port_update);
ZVAL_STRING(return_value, verstr, 1);
-#else
+#elif defined(PHP_PDO_OCI_CLIENT_VERSION)
/* Compile time client version */
ZVAL_STRING(return_value, PHP_PDO_OCI_CLIENT_VERSION, 1);
+#else
+ return FALSE;
+
#endif /* Check for OCIClientVersion() support */
return TRUE;
diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c
index a2aa0c4d5..9b453e460 100755
--- a/ext/pdo_oci/oci_statement.c
+++ b/ext/pdo_oci/oci_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci_statement.c,v 1.16.2.10.2.7 2007/08/31 21:08:48 sixd Exp $ */
+/* $Id: oci_statement.c,v 1.16.2.10.2.8 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_oci/pdo_oci.c b/ext/pdo_oci/pdo_oci.c
index 3f8c83198..68d1d8385 100755
--- a/ext/pdo_oci/pdo_oci.c
+++ b/ext/pdo_oci/pdo_oci.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_oci.c,v 1.5.2.6.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: pdo_oci.c,v 1.5.2.6.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_oci/php_pdo_oci.h b/ext/pdo_oci/php_pdo_oci.h
index da54ec3ea..74ecee076 100755
--- a/ext/pdo_oci/php_pdo_oci.h
+++ b/ext/pdo_oci/php_pdo_oci.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_oci.h,v 1.2.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pdo_oci.h,v 1.2.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_PDO_OCI_H
#define PHP_PDO_OCI_H
diff --git a/ext/pdo_oci/php_pdo_oci_int.h b/ext/pdo_oci/php_pdo_oci_int.h
index 079cc5465..33bf1ccf8 100755
--- a/ext/pdo_oci/php_pdo_oci_int.h
+++ b/ext/pdo_oci/php_pdo_oci_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_oci_int.h,v 1.4.2.2.2.4 2007/08/31 21:08:48 sixd Exp $ */
+/* $Id: php_pdo_oci_int.h,v 1.4.2.2.2.5 2007/12/31 07:20:10 sebastian Exp $ */
#include <oci.h>
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index b338947dc..da45d5836 100755
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: odbc_driver.c,v 1.27.2.4.2.3 2007/02/24 02:17:25 helly Exp $ */
+/* $Id: odbc_driver.c,v 1.27.2.4.2.4 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index 9f0840b63..83909dab2 100755
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: odbc_stmt.c,v 1.26.2.2.2.3 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: odbc_stmt.c,v 1.26.2.2.2.4 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c
index 00a36fc7a..1eeed26d3 100755
--- a/ext/pdo_odbc/pdo_odbc.c
+++ b/ext/pdo_odbc/pdo_odbc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_odbc.c,v 1.14.2.7.2.2 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: pdo_odbc.c,v 1.14.2.7.2.3 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_odbc/php_pdo_odbc.h b/ext/pdo_odbc/php_pdo_odbc.h
index fab288d9d..9fc026e99 100644
--- a/ext/pdo_odbc/php_pdo_odbc.h
+++ b/ext/pdo_odbc/php_pdo_odbc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_odbc.h,v 1.2.4.3 2007/05/28 12:19:41 bjori Exp $ */
+/* $Id: php_pdo_odbc.h,v 1.2.4.4 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_PDO_ODBC_H
#define PHP_PDO_ODBC_H
diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h
index 8b855b929..89e91b5a1 100755
--- a/ext/pdo_odbc/php_pdo_odbc_int.h
+++ b/ext/pdo_odbc/php_pdo_odbc_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_odbc_int.h,v 1.9.2.1.2.2 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pdo_odbc_int.h,v 1.9.2.1.2.3 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef PHP_WIN32
# define PDO_ODBC_TYPE "Win32"
diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c
index 1f4b443b9..000e4a859 100644
--- a/ext/pdo_pgsql/pdo_pgsql.c
+++ b/ext/pdo_pgsql/pdo_pgsql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_pgsql.c,v 1.7.2.11.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: pdo_pgsql.c,v 1.7.2.11.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -123,7 +123,7 @@ PHP_MINFO_FUNCTION(pdo_pgsql)
php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION);
#endif
php_info_print_table_row(2, "Module version", pdo_pgsql_module_entry.version);
- php_info_print_table_row(2, "Revision", " $Id: pdo_pgsql.c,v 1.7.2.11.2.1 2007/01/01 09:36:05 sebastian Exp $ ");
+ php_info_print_table_row(2, "Revision", " $Id: pdo_pgsql.c,v 1.7.2.11.2.2 2007/12/31 07:20:10 sebastian Exp $ ");
php_info_print_table_end();
}
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index bcd510558..82d141522 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql_driver.c,v 1.53.2.14.2.9 2007/06/28 03:13:29 iliaa Exp $ */
+/* $Id: pgsql_driver.c,v 1.53.2.14.2.11 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -692,14 +692,14 @@ static int pdo_pgsql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
}
/* support both full connection string & connection string + login and/or password */
- if (!dbh->username || !dbh->password) {
- spprintf(&conn_str, 0, "%s connect_timeout=%ld", (char *) dbh->data_source, connect_timeout);
- } else if (dbh->username && dbh->password) {
+ if (dbh->username && dbh->password) {
spprintf(&conn_str, 0, "%s user=%s password=%s connect_timeout=%ld", dbh->data_source, dbh->username, dbh->password, connect_timeout);
} else if (dbh->username) {
spprintf(&conn_str, 0, "%s user=%s connect_timeout=%ld", dbh->data_source, dbh->username, connect_timeout);
- } else {
+ } else if (dbh->password) {
spprintf(&conn_str, 0, "%s password=%s connect_timeout=%ld", dbh->data_source, dbh->password, connect_timeout);
+ } else {
+ spprintf(&conn_str, 0, "%s connect_timeout=%ld", (char *) dbh->data_source, connect_timeout);
}
H->server = PQconnectdb(conn_str);
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index c0cbccd9b..33aea2335 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql_statement.c,v 1.31.2.12.2.7 2007/04/17 15:29:13 iliaa Exp $ */
+/* $Id: pgsql_statement.c,v 1.31.2.12.2.11 2008/02/26 00:14:04 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -238,7 +238,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
param->name, param->namelen + 1, (void**)&nameptr)) {
param->paramno = atoi(nameptr + 1) - 1;
} else {
- pdo_pgsql_error_stmt(stmt, PGRES_FATAL_ERROR, "HY093");
+ pdo_raise_impl_error(stmt->dbh, stmt, "HY093", param->name TSRMLS_CC);
return 0;
}
}
@@ -250,6 +250,9 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
return 1;
case PDO_PARAM_EVT_EXEC_PRE:
+ if (!stmt->bound_param_map) {
+ return 0;
+ }
if (!S->param_values) {
S->param_values = ecalloc(
zend_hash_num_elements(stmt->bound_param_map),
@@ -265,6 +268,11 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
sizeof(Oid));
}
if (param->paramno >= 0) {
+ if (param->paramno > zend_hash_num_elements(stmt->bound_param_map)) {
+ pdo_pgsql_error_stmt(stmt, PGRES_FATAL_ERROR, "HY105");
+ return 0;
+ }
+
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB &&
Z_TYPE_P(param->parameter) == IS_RESOURCE) {
php_stream *stm;
diff --git a/ext/pdo_pgsql/php_pdo_pgsql.h b/ext/pdo_pgsql/php_pdo_pgsql.h
index 2cd992647..4a6e2d6cc 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_pgsql.h,v 1.3.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pdo_pgsql.h,v 1.3.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_PDO_PGSQL_H
#define PHP_PDO_PGSQL_H
diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h
index e988eccc8..87b56dcb1 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql_int.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_pgsql_int.h,v 1.13.2.4.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pdo_pgsql_int.h,v 1.13.2.4.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_PDO_PGSQL_INT_H
#define PHP_PDO_PGSQL_INT_H
diff --git a/ext/pdo_pgsql/tests/bug36727.phpt b/ext/pdo_pgsql/tests/bug36727.phpt
index c6f7c8a80..f1b906bd6 100644
--- a/ext/pdo_pgsql/tests/bug36727.phpt
+++ b/ext/pdo_pgsql/tests/bug36727.phpt
@@ -18,6 +18,7 @@ var_dump($stmt->bindValue(':test', 1, PDO::PARAM_INT));
echo "Done\n";
?>
---EXPECT--
+--EXPECTF--
+Warning: PDOStatement::bindValue(): SQLSTATE[HY093]: Invalid parameter number: :test in %s/bug36727.php on line %d
bool(false)
-Done
+Done \ No newline at end of file
diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c
index 25ac02a36..3b266039a 100644
--- a/ext/pdo_sqlite/pdo_sqlite.c
+++ b/ext/pdo_sqlite/pdo_sqlite.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_sqlite.c,v 1.10.2.6.2.2 2007/03/23 14:30:00 wez Exp $ */
+/* $Id: pdo_sqlite.c,v 1.10.2.6.2.3 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -100,7 +100,7 @@ PHP_MINFO_FUNCTION(pdo_sqlite)
"(bundled) "
#endif
PHP_PDO_SQLITE_MODULE_VERSION
- " $Id: pdo_sqlite.c,v 1.10.2.6.2.2 2007/03/23 14:30:00 wez Exp $");
+ " $Id: pdo_sqlite.c,v 1.10.2.6.2.3 2007/12/31 07:20:10 sebastian Exp $");
php_info_print_table_row(2, "SQLite Library", sqlite3_libversion());
php_info_print_table_end();
}
diff --git a/ext/pdo_sqlite/php_pdo_sqlite.h b/ext/pdo_sqlite/php_pdo_sqlite.h
index 3bf8c2fdf..3e912c518 100644
--- a/ext/pdo_sqlite/php_pdo_sqlite.h
+++ b/ext/pdo_sqlite/php_pdo_sqlite.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_sqlite.h,v 1.2.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pdo_sqlite.h,v 1.2.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_PDO_SQLITE_H
diff --git a/ext/pdo_sqlite/php_pdo_sqlite_int.h b/ext/pdo_sqlite/php_pdo_sqlite_int.h
index 483fdc9f4..0269e9c6a 100644
--- a/ext/pdo_sqlite/php_pdo_sqlite_int.h
+++ b/ext/pdo_sqlite/php_pdo_sqlite_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_sqlite_int.h,v 1.3.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pdo_sqlite_int.h,v 1.3.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_PDO_SQLITE_INT_H
#define PHP_PDO_SQLITE_INT_H
diff --git a/ext/pdo_sqlite/sqlite/VERSION b/ext/pdo_sqlite/sqlite/VERSION
index e9f0bde54..86fb65044 100644
--- a/ext/pdo_sqlite/sqlite/VERSION
+++ b/ext/pdo_sqlite/sqlite/VERSION
@@ -1 +1 @@
-3.3.17
+3.3.7
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 820372555..f65cc9320 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sqlite_driver.c,v 1.20.2.5.2.2 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: sqlite_driver.c,v 1.20.2.5.2.3 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c
index 96b4ef58c..339f47143 100644
--- a/ext/pdo_sqlite/sqlite_statement.c
+++ b/ext/pdo_sqlite/sqlite_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sqlite_statement.c,v 1.18.2.4.2.3 2007/08/01 22:45:31 iliaa Exp $ */
+/* $Id: sqlite_statement.c,v 1.18.2.4.2.4 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 968eda3f1..15371e01c 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.331.2.13.2.25 2007/10/03 23:31:58 iliaa Exp $ */
+/* $Id: pgsql.c,v 1.331.2.13.2.27 2007/12/31 07:20:10 sebastian Exp $ */
#include <stdlib.h>
@@ -4083,6 +4083,7 @@ PHP_FUNCTION(pg_send_query_params)
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "There are results on this connection. Call pg_get_result() until it returns FALSE");
}
+ SEPARATE_ZVAL(pv_param_arr);
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(pv_param_arr));
num_params = zend_hash_num_elements(Z_ARRVAL_PP(pv_param_arr));
if (num_params > 0) {
@@ -4097,7 +4098,8 @@ PHP_FUNCTION(pg_send_query_params)
}
otype = (*tmp)->type;
- convert_to_string(*tmp);
+ SEPARATE_ZVAL(tmp);
+ convert_to_string_ex(tmp);
if (Z_TYPE_PP(tmp) != IS_STRING) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Error converting parameter");
_php_pgsql_free_params(params, num_params);
diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h
index 128f762f4..08b2a394d 100644
--- a/ext/pgsql/php_pgsql.h
+++ b/ext/pgsql/php_pgsql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pgsql.h,v 1.73.2.1.2.2 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pgsql.h,v 1.73.2.1.2.3 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_PGSQL_H
#define PHP_PGSQL_H
diff --git a/ext/posix/php_posix.h b/ext/posix/php_posix.h
index 2f1729877..a966b490f 100644
--- a/ext/posix/php_posix.h
+++ b/ext/posix/php_posix.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
*/
-/* $Id: php_posix.h,v 1.18.2.1.2.2 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_posix.h,v 1.18.2.1.2.3 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_POSIX_H
#define PHP_POSIX_H
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 7182d56bf..ba9d09aa4 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.70.2.3.2.16 2007/07/25 09:06:22 bjori Exp $ */
+/* $Id: posix.c,v 1.70.2.3.2.18 2008/04/11 11:00:24 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -147,7 +147,7 @@ zend_function_entry posix_functions[] = {
static PHP_MINFO_FUNCTION(posix)
{
php_info_print_table_start();
- php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.16 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.18 $");
php_info_print_table_end();
}
/* }}} */
@@ -875,7 +875,7 @@ PHP_FUNCTION(posix_getgrgid)
#if defined(ZTS) && defined(HAVE_GETGRGID_R) && defined(_SC_GETGR_R_SIZE_MAX)
int ret;
struct group _g;
- struct group *retgrptr;
+ struct group *retgrptr = NULL;
long grbuflen;
char *grbuf;
#endif
@@ -894,7 +894,7 @@ PHP_FUNCTION(posix_getgrgid)
grbuf = emalloc(grbuflen);
ret = getgrgid_r(gid, &_g, grbuf, grbuflen, &retgrptr);
- if (ret) {
+ if (ret || retgrptr == NULL) {
POSIX_G(last_error) = ret;
efree(grbuf);
RETURN_FALSE;
@@ -1009,7 +1009,7 @@ PHP_FUNCTION(posix_getpwuid)
pwbuf = emalloc(pwbuflen);
ret = getpwuid_r(uid, &_pw, pwbuf, pwbuflen, &retpwptr);
- if (ret) {
+ if (ret || retpwptr == NULL) {
POSIX_G(last_error) = ret;
efree(pwbuf);
RETURN_FALSE;
diff --git a/ext/posix/tests/posix_get_last_error_error.phpt b/ext/posix/tests/posix_get_last_error_error.phpt
new file mode 100644
index 000000000..1089b440a
--- /dev/null
+++ b/ext/posix/tests/posix_get_last_error_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test posix_get_last_error() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto int posix_get_last_error(void)
+ * Description: Retrieve the error number set by the last posix function which failed.
+ * Source code: ext/posix/posix.c
+ * Alias to functions: posix_errno
+ */
+
+echo "*** Testing posix_get_last_error() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing posix_get_last_error() function with one argument --\n";
+$extra_arg = 10;
+var_dump( posix_get_last_error($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_get_last_error() : error conditions ***
+
+-- Testing posix_get_last_error() function with one argument --
+
+Warning: Wrong parameter count for posix_get_last_error() in %s on line %d
+NULL
+Done
diff --git a/ext/posix/tests/posix_getgid_error.phpt b/ext/posix/tests/posix_getgid_error.phpt
new file mode 100644
index 000000000..8c1a4ec1e
--- /dev/null
+++ b/ext/posix/tests/posix_getgid_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test posix_getgid() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto int posix_getgid(void)
+ * Description: Get the current group id (POSIX.1, 4.2.1)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getgid() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing posix_getgid() function with one argument --\n";
+$extra_arg = 10;
+var_dump( posix_getgid($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getgid() : error conditions ***
+
+-- Testing posix_getgid() function with one argument --
+
+Warning: Wrong parameter count for posix_getgid() in %s on line %d
+NULL
+Done
diff --git a/ext/posix/tests/posix_getgrgid_error.phpt b/ext/posix/tests/posix_getgrgid_error.phpt
new file mode 100644
index 000000000..bce624f45
--- /dev/null
+++ b/ext/posix/tests/posix_getgrgid_error.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test posix_getgrgid() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto array posix_getgrgid(long gid)
+ * Description: Group database access (POSIX.1, 9.2.1)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+/*
+ * add a comment here to say what the test is supposed to do
+ */
+
+echo "*** Testing posix_getgrgid() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing posix_getgrgid() function with Zero arguments --\n";
+var_dump( posix_getgrgid() );
+
+//Test posix_getgrgid with one more than the expected number of arguments
+echo "\n-- Testing posix_getgrgid() function with more than expected no. of arguments --\n";
+
+$extra_arg = 10;
+$gid = 0;
+var_dump( posix_getgrgid($gid, $extra_arg) );
+
+echo "\n-- Testing posix_getgrgid() function with a negative group id --\n";
+$gid = -999;
+var_dump( posix_getgrgid($gid));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getgrgid() : error conditions ***
+
+-- Testing posix_getgrgid() function with Zero arguments --
+
+Warning: posix_getgrgid() expects exactly 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing posix_getgrgid() function with more than expected no. of arguments --
+
+Warning: posix_getgrgid() expects exactly 1 parameter, 2 given in %s on line %d
+bool(false)
+
+-- Testing posix_getgrgid() function with a negative group id --
+bool(false)
+Done
diff --git a/ext/posix/tests/posix_getgrgid_variation.phpt b/ext/posix/tests/posix_getgrgid_variation.phpt
new file mode 100644
index 000000000..13db73b79
--- /dev/null
+++ b/ext/posix/tests/posix_getgrgid_variation.phpt
@@ -0,0 +1,175 @@
+--TEST--
+Test posix_getgrgid() function : usage variations - parameter types
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto array posix_getgrgid(long gid)
+ * Description: Group database access (POSIX.1, 9.2.1)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getgrgid() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // object data
+ new stdclass(),
+);
+
+// loop through each element of the array for gid
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ $result = posix_getgrgid($value);
+ if ((is_array($result) && (count($result) == 4))
+ ||
+ ($result === false)) {
+ echo "valid output\n";
+ } else {
+ var_dump($result);
+ }
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getgrgid() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+Arg value 10.5
+valid output
+
+Arg value -10.5
+valid output
+
+Arg value 101234567000
+valid output
+
+Arg value 1.07654321E-9
+valid output
+
+Arg value 0.5
+valid output
+
+Arg value Array
+
+Warning: posix_getgrgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getgrgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getgrgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getgrgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getgrgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value
+valid output
+
+Arg value
+valid output
+
+Arg value 1
+valid output
+
+Arg value
+valid output
+
+Arg value 1
+valid output
+
+Arg value
+valid output
+
+Arg value
+
+Warning: posix_getgrgid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value
+
+Warning: posix_getgrgid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value string
+
+Warning: posix_getgrgid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value string
+
+Warning: posix_getgrgid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value
+valid output
+
+Arg value
+valid output
+
+Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_getpgid_error.phpt b/ext/posix/tests/posix_getpgid_error.phpt
new file mode 100644
index 000000000..e703b8fdc
--- /dev/null
+++ b/ext/posix/tests/posix_getpgid_error.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test posix_getpgid() function : error conditions
+--SKIPIF--
+<?php
+if((!extension_loaded("posix")) || (!function_exists(posix_getpgid))) {
+ print "skip - POSIX extension not loaded or posix_getpgid() does not exist";
+}
+?>
+--FILE--
+<?php
+/* Prototype : proto int posix_getpgid(void)
+ * Description: Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getpgid() : error conditions ***\n";
+
+echo "\n-- Testing posix_getpgid() function no arguments --\n";
+var_dump( posix_getpgid() );
+
+echo "\n-- Testing posix_getpgid() with one extra argument --\n";
+$pid = 10;
+$extra_arg = 20;
+var_dump( posix_getpgid($pid, $extra_arg) );
+
+echo "\n-- Testing posix_getpgid() with negative pid --\n";
+$pid = -99;
+var_dump( posix_getpgid($pid) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getpgid() : error conditions ***
+
+-- Testing posix_getpgid() function no arguments --
+
+Warning: posix_getpgid() expects exactly 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing posix_getpgid() with one extra argument --
+
+Warning: posix_getpgid() expects exactly 1 parameter, 2 given in %s on line %d
+bool(false)
+
+-- Testing posix_getpgid() with negative pid --
+bool(false)
+Done
diff --git a/ext/posix/tests/posix_getpgid_variation.phpt b/ext/posix/tests/posix_getpgid_variation.phpt
new file mode 100644
index 000000000..34a4beb0a
--- /dev/null
+++ b/ext/posix/tests/posix_getpgid_variation.phpt
@@ -0,0 +1,175 @@
+--TEST--
+Test posix_getpgid() function : variation
+--SKIPIF--
+<?php
+if((!extension_loaded("posix")) || (!function_exists(posix_getpgid))) {
+ print "skip - POSIX extension not loaded or posix_getpgid() does not exist";
+}
+?>
+--FILE--
+<?php
+/* Prototype : proto int posix_getpgid(void)
+ * Description: Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getpgid() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // object data
+ new stdclass(),
+);
+
+// loop through each element of the array for gid
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ $result = posix_getpgid($value);
+ if (is_int($result) || $result === false) {
+ echo "valid output\n";
+ } else {
+ var_dump($result);
+ }
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getpgid() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+Arg value 10.5
+valid output
+
+Arg value -10.5
+valid output
+
+Arg value 101234567000
+valid output
+
+Arg value 1.07654321E-9
+valid output
+
+Arg value 0.5
+valid output
+
+Arg value Array
+
+Warning: posix_getpgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getpgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getpgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getpgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getpgid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value
+valid output
+
+Arg value
+valid output
+
+Arg value 1
+valid output
+
+Arg value
+valid output
+
+Arg value 1
+valid output
+
+Arg value
+valid output
+
+Arg value
+
+Warning: posix_getpgid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value
+
+Warning: posix_getpgid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value string
+
+Warning: posix_getpgid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value string
+
+Warning: posix_getpgid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value
+valid output
+
+Arg value
+valid output
+
+Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_getpgrp_error.phpt b/ext/posix/tests/posix_getpgrp_error.phpt
new file mode 100644
index 000000000..e3c071dd6
--- /dev/null
+++ b/ext/posix/tests/posix_getpgrp_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test posix_getpgrp() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto int posix_getpgrp(void)
+ * Description: Get current process group id (POSIX.1, 4.3.1)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getpgrp() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing posix_getpgrp() function with one argument --\n";
+$extra_arg = 10;
+var_dump( posix_getpgrp($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getpgrp() : error conditions ***
+
+-- Testing posix_getpgrp() function with one argument --
+
+Warning: Wrong parameter count for posix_getpgrp() in %s on line %d
+NULL
+Done
diff --git a/ext/posix/tests/posix_getpid_error.phpt b/ext/posix/tests/posix_getpid_error.phpt
new file mode 100644
index 000000000..460cc4254
--- /dev/null
+++ b/ext/posix/tests/posix_getpid_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test posix_getpid() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto int posix_getpid(void)
+ * Description: Get the current process id (POSIX.1, 4.1.1)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getpid() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing posix_getpid() function with one argument --\n";
+$extra_arg = 10;
+var_dump( posix_getpid($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getpid() : error conditions ***
+
+-- Testing posix_getpid() function with one argument --
+
+Warning: Wrong parameter count for posix_getpid() in %s on line %d
+NULL
+Done
diff --git a/ext/posix/tests/posix_getppid_error.phpt b/ext/posix/tests/posix_getppid_error.phpt
new file mode 100644
index 000000000..26426ac6a
--- /dev/null
+++ b/ext/posix/tests/posix_getppid_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test posix_getppid() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto int posix_getppid(void)
+ * Description: Get the parent process id (POSIX.1, 4.1.1)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getppid() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing posix_getppid() function with one argument --\n";
+$extra_arg = 10;
+var_dump( posix_getppid($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getppid() : error conditions ***
+
+-- Testing posix_getppid() function with one argument --
+
+Warning: Wrong parameter count for posix_getppid() in %s on line %d
+NULL
+Done
diff --git a/ext/posix/tests/posix_getpwuid_error.phpt b/ext/posix/tests/posix_getpwuid_error.phpt
new file mode 100644
index 000000000..4920e4e9d
--- /dev/null
+++ b/ext/posix/tests/posix_getpwuid_error.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test posix_getpwuid() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto array posix_getpwuid(long uid)
+ * Description: User database access (POSIX.1, 9.2.2)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getpwuid() : error conditions ***\n";
+
+echo "\n-- Testing posix_getpwuid() function with Zero arguments --\n";
+var_dump( posix_getpwuid() );
+
+echo "\n-- Testing posix_getpwuid() function with more than expected no. of arguments --\n";
+$uid = posix_getuid();
+$extra_arg = 10;
+var_dump( posix_getpwuid($uid, $extra_arg) );
+
+echo "\n-- Testing posix_getpwuid() function negative uid --\n";
+$uid = -99;
+var_dump( posix_getpwuid($uid) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getpwuid() : error conditions ***
+
+-- Testing posix_getpwuid() function with Zero arguments --
+
+Warning: posix_getpwuid() expects exactly 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing posix_getpwuid() function with more than expected no. of arguments --
+
+Warning: posix_getpwuid() expects exactly 1 parameter, 2 given in %s on line %d
+bool(false)
+
+-- Testing posix_getpwuid() function negative uid --
+bool(false)
+Done
diff --git a/ext/posix/tests/posix_getpwuid_variation.phpt b/ext/posix/tests/posix_getpwuid_variation.phpt
new file mode 100644
index 000000000..8e91d6c31
--- /dev/null
+++ b/ext/posix/tests/posix_getpwuid_variation.phpt
@@ -0,0 +1,175 @@
+--TEST--
+Test posix_getpwuid() function : usage variations - parameter types
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto array posix_getpwuid(long uid)
+ * Description: User database access (POSIX.1, 9.2.2)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getpwuid() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // object data
+ new stdclass(),
+);
+
+// loop through each element of the array for uid
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ $result = posix_getpwuid($value);
+ if ((is_array($result) && (count($result) == 7))
+ ||
+ ($result === false)) {
+ echo "valid output\n";
+ } else {
+ var_dump($result);
+ }
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getpwuid() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+Arg value 10.5
+valid output
+
+Arg value -10.5
+valid output
+
+Arg value 101234567000
+valid output
+
+Arg value 1.07654321E-9
+valid output
+
+Arg value 0.5
+valid output
+
+Arg value Array
+
+Warning: posix_getpwuid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getpwuid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getpwuid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getpwuid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value Array
+
+Warning: posix_getpwuid() expects parameter 1 to be long, array given in %s on line %d
+valid output
+
+Arg value
+valid output
+
+Arg value
+valid output
+
+Arg value 1
+valid output
+
+Arg value
+valid output
+
+Arg value 1
+valid output
+
+Arg value
+valid output
+
+Arg value
+
+Warning: posix_getpwuid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value
+
+Warning: posix_getpwuid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value string
+
+Warning: posix_getpwuid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value string
+
+Warning: posix_getpwuid() expects parameter 1 to be long, string given in %s on line %d
+valid output
+
+Arg value
+valid output
+
+Arg value
+valid output
+
+Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_getuid_error.phpt b/ext/posix/tests/posix_getuid_error.phpt
new file mode 100644
index 000000000..44c0b945b
--- /dev/null
+++ b/ext/posix/tests/posix_getuid_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test posix_getuid() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto int posix_getuid(void)
+ * Description: Get the current user id (POSIX.1, 4.2.1)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_getuid() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing posix_getuid() function with one argument --\n";
+$extra_arg = 10;;
+var_dump( posix_getuid($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_getuid() : error conditions ***
+
+-- Testing posix_getuid() function with one argument --
+
+Warning: Wrong parameter count for posix_getuid() in %s on line %d
+NULL
+Done
diff --git a/ext/posix/tests/posix_kill_error.phpt b/ext/posix/tests/posix_kill_error.phpt
new file mode 100644
index 000000000..082b21d6a
--- /dev/null
+++ b/ext/posix/tests/posix_kill_error.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test posix_kill() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto bool posix_kill(int pid, int sig)
+ * Description: Send a signal to a process (POSIX.1, 3.3.2)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+
+echo "*** Testing posix_kill() : error conditions ***\n";
+
+
+echo "\n-- Testing posix_kill() function with more than expected no. of arguments --\n";
+$pid = posix_getpid();
+$sig = 9;
+$extra_arg = 10;
+var_dump( posix_kill($pid, $sig, $extra_arg) );
+
+echo "\n-- Testing posix_kill() function with less than expected no. of arguments --\n";
+$pid = posix_getpid();
+var_dump( posix_kill($pid) );
+
+echo "\n-- Testing posix_kill() function with invalid signal --\n";
+$pid = posix_getpid();
+$sig = 999;
+var_dump( posix_kill($pid, 999) );
+
+echo "\n-- Testing posix_kill() function with negative pid --\n";
+$pid = -999;
+$sig = 9;
+var_dump( posix_kill($pid, 999) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_kill() : error conditions ***
+
+-- Testing posix_kill() function with more than expected no. of arguments --
+
+Warning: posix_kill() expects exactly 2 parameters, 3 given in %s on line %d
+bool(false)
+
+-- Testing posix_kill() function with less than expected no. of arguments --
+
+Warning: posix_kill() expects exactly 2 parameters, 1 given in %s on line %d
+bool(false)
+
+-- Testing posix_kill() function with invalid signal --
+bool(false)
+
+-- Testing posix_kill() function with negative pid --
+bool(false)
+Done
diff --git a/ext/posix/tests/posix_kill_variation1.phpt b/ext/posix/tests/posix_kill_variation1.phpt
new file mode 100644
index 000000000..46268f241
--- /dev/null
+++ b/ext/posix/tests/posix_kill_variation1.phpt
@@ -0,0 +1,173 @@
+--TEST--
+Test posix_kill() function : usage variations - first parameter type
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto bool posix_kill(int pid, int sig)
+ * Description: Send a signal to a process (POSIX.1, 3.3.2)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+/*
+ * add a comment here to say what the test is supposed to do
+ */
+
+echo "*** Testing posix_kill() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$sig = -999;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // object data
+ new stdclass(),
+);
+
+// loop through each element of the array for pid
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( posix_kill($value, $sig) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_kill() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+
+Warning: posix_kill() expects parameter 1 to be long, string given in %s on line %d
+bool(false)
+
+Arg value
+
+Warning: posix_kill() expects parameter 1 to be long, string given in %s on line %d
+bool(false)
+
+Arg value string
+
+Warning: posix_kill() expects parameter 1 to be long, string given in %s on line %d
+bool(false)
+
+Arg value string
+
+Warning: posix_kill() expects parameter 1 to be long, string given in %s on line %d
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_kill_variation2.phpt b/ext/posix/tests/posix_kill_variation2.phpt
new file mode 100644
index 000000000..aef9acd04
--- /dev/null
+++ b/ext/posix/tests/posix_kill_variation2.phpt
@@ -0,0 +1,173 @@
+--TEST--
+Test posix_kill() function : usage variations - second parameter type
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto bool posix_kill(int pid, int sig)
+ * Description: Send a signal to a process (POSIX.1, 3.3.2)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+/*
+ * add a comment here to say what the test is supposed to do
+ */
+
+echo "*** Testing posix_kill() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pid = -999;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // object data
+ new stdclass(),
+);
+
+// loop through each element of the array for sig
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( posix_kill($pid, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_kill() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 2 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 2 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 2 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 2 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_kill() expects parameter 2 to be long, array given in %s on line %d
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+
+Warning: posix_kill() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+
+Arg value
+
+Warning: posix_kill() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+
+Arg value string
+
+Warning: posix_kill() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+
+Arg value string
+
+Warning: posix_kill() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_strerror_error.phpt b/ext/posix/tests/posix_strerror_error.phpt
new file mode 100644
index 000000000..6fc17ec0c
--- /dev/null
+++ b/ext/posix/tests/posix_strerror_error.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test posix_strerror() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto string posix_strerror(int errno)
+ * Description: Retrieve the system error message associated with the given errno.
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_strerror() : error conditions ***\n";
+
+echo "\n-- Testing posix_strerror() function with Zero arguments --\n";
+var_dump( posix_strerror() );
+
+echo "\n-- Testing posix_strerror() function with more than expected no. of arguments --\n";
+$errno = posix_get_last_error();
+$extra_arg = 10;
+var_dump( posix_strerror($errno, $extra_arg) );
+
+echo "\n-- Testing posix_strerror() function with invalid error number --\n";
+$errno = -999;
+var_dump( posix_strerror($errno) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_strerror() : error conditions ***
+
+-- Testing posix_strerror() function with Zero arguments --
+
+Warning: posix_strerror() expects exactly 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing posix_strerror() function with more than expected no. of arguments --
+
+Warning: posix_strerror() expects exactly 1 parameter, 2 given in %s on line %d
+bool(false)
+
+-- Testing posix_strerror() function with invalid error number --
+string(%d) "Unknown error %d"
+Done
diff --git a/ext/posix/tests/posix_strerror_variation1.phpt b/ext/posix/tests/posix_strerror_variation1.phpt
new file mode 100644
index 000000000..40cfab2aa
--- /dev/null
+++ b/ext/posix/tests/posix_strerror_variation1.phpt
@@ -0,0 +1,172 @@
+--TEST--
+Test posix_strerror() function : usage variations
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto string posix_strerror(int errno)
+ * Description: Retrieve the system error message associated with the given errno.
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+/*
+ * add a comment here to say what the test is supposed to do
+ */
+
+echo "*** Testing posix_strerror() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // object data
+ new stdclass(),
+);
+
+// loop through each element of the array for errno
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( posix_strerror($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_strerror() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+Arg value 10.5
+string(18) "No child processes"
+
+Arg value -10.5
+string(%d) "Unknown error %d"
+
+Arg value 101234567000
+string(%d) "Unknown error %d"
+
+Arg value 1.07654321E-9
+string(7) "Success"
+
+Arg value 0.5
+string(7) "Success"
+
+Arg value Array
+
+Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value Array
+
+Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d
+bool(false)
+
+Arg value
+string(7) "Success"
+
+Arg value
+string(7) "Success"
+
+Arg value 1
+string(23) "Operation not permitted"
+
+Arg value
+string(7) "Success"
+
+Arg value 1
+string(23) "Operation not permitted"
+
+Arg value
+string(7) "Success"
+
+Arg value
+
+Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d
+bool(false)
+
+Arg value
+
+Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d
+bool(false)
+
+Arg value string
+
+Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d
+bool(false)
+
+Arg value string
+
+Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d
+bool(false)
+
+Arg value
+string(7) "Success"
+
+Arg value
+string(7) "Success"
+
+Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_times_error.phpt b/ext/posix/tests/posix_times_error.phpt
new file mode 100644
index 000000000..79b1f797c
--- /dev/null
+++ b/ext/posix/tests/posix_times_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test posix_times() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto array posix_times(void)
+ * Description: Get process times (POSIX.1, 4.5.2)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_times() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing posix_times() function with one argument --\n";
+$extra_arg = 10;;
+var_dump( posix_times($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_times() : error conditions ***
+
+-- Testing posix_times() function with one argument --
+
+Warning: Wrong parameter count for posix_times() in %s on line %d
+NULL
+Done
diff --git a/ext/posix/tests/posix_uname_error.phpt b/ext/posix/tests/posix_uname_error.phpt
new file mode 100644
index 000000000..df531734f
--- /dev/null
+++ b/ext/posix/tests/posix_uname_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test posix_uname() function : error conditions
+--SKIPIF--
+<?php
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+?>
+--FILE--
+<?php
+/* Prototype : proto array posix_uname(void)
+ * Description: Get system name (POSIX.1, 4.4.1)
+ * Source code: ext/posix/posix.c
+ * Alias to functions:
+ */
+
+echo "*** Testing posix_uname() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing posix_uname() function with one argument --\n";
+$extra_arg = 10;;
+var_dump( posix_uname($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing posix_uname() : error conditions ***
+
+-- Testing posix_uname() function with one argument --
+
+Warning: Wrong parameter count for posix_uname() in %s on line %d
+NULL
+Done
diff --git a/ext/pspell/php_pspell.h b/ext/pspell/php_pspell.h
index 416507486..30fabb8d3 100644
--- a/ext/pspell/php_pspell.h
+++ b/ext/pspell/php_pspell.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pspell.h,v 1.15.2.1.2.3 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_pspell.h,v 1.15.2.1.2.4 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef _PSPELL_H
#define _PSPELL_H
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c
index 921bf26aa..693e3919a 100644
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pspell.c,v 1.45.2.4.2.7 2007/02/24 02:17:25 helly Exp $ */
+/* $Id: pspell.c,v 1.45.2.4.2.8 2007/12/31 07:20:10 sebastian Exp $ */
#define IS_EXT_MODULE
diff --git a/ext/readline/php_readline.h b/ext/readline/php_readline.h
index 29543471e..726236187 100644
--- a/ext/readline/php_readline.h
+++ b/ext/readline/php_readline.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_readline.h,v 1.17.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_readline.h,v 1.17.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_READLINE_H
#define PHP_READLINE_H
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index e1f36f329..e2131f500 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: readline.c,v 1.42.2.3.2.3 2007/02/12 01:23:17 iliaa Exp $ */
+/* $Id: readline.c,v 1.42.2.3.2.4 2007/12/31 07:20:10 sebastian Exp $ */
/* {{{ includes & prototypes */
diff --git a/ext/recode/php_recode.h b/ext/recode/php_recode.h
index b7054ea05..d1027882c 100644
--- a/ext/recode/php_recode.h
+++ b/ext/recode/php_recode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_recode.h,v 1.17.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_recode.h,v 1.17.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_RECODE_H
#define PHP_RECODE_H
diff --git a/ext/recode/recode.c b/ext/recode/recode.c
index c29b123b0..c6598e7c9 100644
--- a/ext/recode/recode.c
+++ b/ext/recode/recode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: recode.c,v 1.37.2.1.2.3 2007/06/22 00:02:15 stas Exp $ */
+/* $Id: recode.c,v 1.37.2.1.2.4 2007/12/31 07:20:10 sebastian Exp $ */
/* {{{ includes & prototypes */
@@ -122,7 +122,7 @@ PHP_MINFO_FUNCTION(recode)
{
php_info_print_table_start();
php_info_print_table_row(2, "Recode Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.37.2.1.2.3 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.37.2.1.2.4 $");
php_info_print_table_end();
}
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 3e3e4b67a..88791a3fe 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_reflection.c,v 1.164.2.33.2.47 2007/10/28 13:47:14 iliaa Exp $ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.50 2008/03/13 15:56:21 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -836,7 +836,7 @@ static int _extension_ini_string(zend_ini_entry *ini_entry, int num_args, va_lis
if (number == ini_entry->module_number) {
string_printf(str, " %sEntry [ %s <", indent, ini_entry->name);
- if (ini_entry->modifiable == ZEND_INI_ALL) {
+ if (ini_entry->modifiable & ZEND_INI_ALL) {
string_printf(str, "ALL");
} else {
if (ini_entry->modifiable & ZEND_INI_USER) {
@@ -2144,7 +2144,6 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
reflection_object *intern;
parameter_reference *param;
zend_op *precv;
- zval *zv, zv_copy;
METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
GET_REFLECTION_OBJECT_PTR(param);
@@ -2164,10 +2163,12 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
return;
}
- zv_copy = precv->op2.u.constant;
- zv = &zv_copy;
- zval_update_constant_ex(&zv, (void*)0, param->fptr->common.scope TSRMLS_CC);
- RETURN_ZVAL(zv, 1, 1);
+ *return_value = precv->op2.u.constant;
+ INIT_PZVAL(return_value);
+ if (Z_TYPE_P(return_value) != IS_CONSTANT) {
+ zval_copy_ctor(return_value);
+ }
+ zval_update_constant_ex(&return_value, (void*)0, param->fptr->common.scope TSRMLS_CC);
}
/* }}} */
@@ -4907,7 +4908,7 @@ PHP_MINFO_FUNCTION(reflection) /* {{{ */
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
- php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.164.2.33.2.47 2007/10/28 13:47:14 iliaa Exp $");
+ php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.164.2.33.2.50 2008/03/13 15:56:21 iliaa Exp $");
php_info_print_table_end();
} /* }}} */
diff --git a/ext/reflection/php_reflection.h b/ext/reflection/php_reflection.h
index 8ebeffb63..f7ff5fe4c 100644
--- a/ext/reflection/php_reflection.h
+++ b/ext/reflection/php_reflection.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_reflection.h,v 1.4.2.3.2.2 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: php_reflection.h,v 1.4.2.3.2.3 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_REFLECTION_H
#define PHP_REFLECTION_H
diff --git a/ext/reflection/tests/ReflectionMethod_basic1.phpt b/ext/reflection/tests/ReflectionMethod_basic1.phpt
new file mode 100644
index 000000000..8671c5acb
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_basic1.phpt
@@ -0,0 +1,300 @@
+--TEST--
+ReflectionMethod class - various methods
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function reflectMethod($class, $method) {
+ $methodInfo = new ReflectionMethod($class, $method);
+ echo "**********************************\n";
+ echo "Reflecting on method $class::$method()\n\n";
+ echo "\nisFinal():\n";
+ var_dump($methodInfo->isFinal());
+ echo "\nisAbstract():\n";
+ var_dump($methodInfo->isAbstract());
+ echo "\nisPublic():\n";
+ var_dump($methodInfo->isPublic());
+ echo "\nisPrivate():\n";
+ var_dump($methodInfo->isPrivate());
+ echo "\nisProtected():\n";
+ var_dump($methodInfo->isProtected());
+ echo "\nisStatic():\n";
+ var_dump($methodInfo->isStatic());
+ echo "\nisConstructor():\n";
+ var_dump($methodInfo->isConstructor());
+ echo "\nisDestructor():\n";
+ var_dump($methodInfo->isDestructor());
+ echo "\n**********************************\n";
+}
+
+class TestClass
+{
+ public function foo() {
+ echo "Called foo()\n";
+ }
+
+ static function stat() {
+ echo "Called stat()\n";
+ }
+
+ private function priv() {
+ echo "Called priv()\n";
+ }
+
+ protected function prot() {}
+
+ public function __destruct() {}
+}
+
+class DerivedClass extends TestClass {}
+
+interface TestInterface {
+ public function int();
+}
+
+reflectMethod("DerivedClass", "foo");
+reflectMethod("TestClass", "stat");
+reflectMethod("TestClass", "priv");
+reflectMethod("TestClass", "prot");
+reflectMethod("DerivedClass", "prot");
+reflectMethod("TestInterface", "int");
+reflectMethod("ReflectionProperty", "__construct");
+reflectMethod("TestClass", "__destruct");
+
+?>
+--EXPECT--
+**********************************
+Reflecting on method DerivedClass::foo()
+
+
+isFinal():
+bool(false)
+
+isAbstract():
+bool(false)
+
+isPublic():
+bool(true)
+
+isPrivate():
+bool(false)
+
+isProtected():
+bool(false)
+
+isStatic():
+bool(false)
+
+isConstructor():
+bool(false)
+
+isDestructor():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method TestClass::stat()
+
+
+isFinal():
+bool(false)
+
+isAbstract():
+bool(false)
+
+isPublic():
+bool(true)
+
+isPrivate():
+bool(false)
+
+isProtected():
+bool(false)
+
+isStatic():
+bool(true)
+
+isConstructor():
+bool(false)
+
+isDestructor():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method TestClass::priv()
+
+
+isFinal():
+bool(false)
+
+isAbstract():
+bool(false)
+
+isPublic():
+bool(false)
+
+isPrivate():
+bool(true)
+
+isProtected():
+bool(false)
+
+isStatic():
+bool(false)
+
+isConstructor():
+bool(false)
+
+isDestructor():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method TestClass::prot()
+
+
+isFinal():
+bool(false)
+
+isAbstract():
+bool(false)
+
+isPublic():
+bool(false)
+
+isPrivate():
+bool(false)
+
+isProtected():
+bool(true)
+
+isStatic():
+bool(false)
+
+isConstructor():
+bool(false)
+
+isDestructor():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method DerivedClass::prot()
+
+
+isFinal():
+bool(false)
+
+isAbstract():
+bool(false)
+
+isPublic():
+bool(false)
+
+isPrivate():
+bool(false)
+
+isProtected():
+bool(true)
+
+isStatic():
+bool(false)
+
+isConstructor():
+bool(false)
+
+isDestructor():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method TestInterface::int()
+
+
+isFinal():
+bool(false)
+
+isAbstract():
+bool(true)
+
+isPublic():
+bool(true)
+
+isPrivate():
+bool(false)
+
+isProtected():
+bool(false)
+
+isStatic():
+bool(false)
+
+isConstructor():
+bool(false)
+
+isDestructor():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method ReflectionProperty::__construct()
+
+
+isFinal():
+bool(false)
+
+isAbstract():
+bool(false)
+
+isPublic():
+bool(true)
+
+isPrivate():
+bool(false)
+
+isProtected():
+bool(false)
+
+isStatic():
+bool(false)
+
+isConstructor():
+bool(true)
+
+isDestructor():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method TestClass::__destruct()
+
+
+isFinal():
+bool(false)
+
+isAbstract():
+bool(false)
+
+isPublic():
+bool(true)
+
+isPrivate():
+bool(false)
+
+isProtected():
+bool(false)
+
+isStatic():
+bool(false)
+
+isConstructor():
+bool(false)
+
+isDestructor():
+bool(true)
+
+**********************************
+
+
diff --git a/ext/reflection/tests/ReflectionMethod_basic2.phpt b/ext/reflection/tests/ReflectionMethod_basic2.phpt
new file mode 100644
index 000000000..56ddb7fce
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_basic2.phpt
@@ -0,0 +1,188 @@
+--TEST--
+ReflectionMethod class __toString() and export() methods
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function reflectMethod($class, $method) {
+ $methodInfo = new ReflectionMethod($class, $method);
+ echo "**********************************\n";
+ echo "Reflecting on method $class::$method()\n\n";
+ echo "__toString():\n";
+ var_dump($methodInfo->__toString());
+ echo "\nexport():\n";
+ var_dump(ReflectionMethod::export($class, $method, true));
+ echo "\n**********************************\n";
+}
+
+class TestClass
+{
+ public function foo() {
+ echo "Called foo()\n";
+ }
+
+ static function stat() {
+ echo "Called stat()\n";
+ }
+
+ private function priv() {
+ echo "Called priv()\n";
+ }
+
+ protected function prot() {}
+
+ public function __destruct() {}
+}
+
+class DerivedClass extends TestClass {}
+
+interface TestInterface {
+ public function int();
+}
+
+reflectMethod("DerivedClass", "foo");
+reflectMethod("TestClass", "stat");
+reflectMethod("TestClass", "priv");
+reflectMethod("TestClass", "prot");
+reflectMethod("DerivedClass", "prot");
+reflectMethod("TestInterface", "int");
+reflectMethod("ReflectionProperty", "__construct");
+reflectMethod("TestClass", "__destruct");
+
+?>
+--EXPECTF--
+**********************************
+Reflecting on method DerivedClass::foo()
+
+__toString():
+string(%d) "Method [ <user, inherits TestClass> public method foo ] {
+ @@ %s 16 - 18
+}
+"
+
+export():
+string(%d) "Method [ <user, inherits TestClass> public method foo ] {
+ @@ %s 16 - 18
+}
+"
+
+**********************************
+**********************************
+Reflecting on method TestClass::stat()
+
+__toString():
+string(%d) "Method [ <user> static public method stat ] {
+ @@ %s 20 - 22
+}
+"
+
+export():
+string(%d) "Method [ <user> static public method stat ] {
+ @@ %s 20 - 22
+}
+"
+
+**********************************
+**********************************
+Reflecting on method TestClass::priv()
+
+__toString():
+string(%d) "Method [ <user> private method priv ] {
+ @@ %s 24 - 26
+}
+"
+
+export():
+string(%d) "Method [ <user> private method priv ] {
+ @@ %s 24 - 26
+}
+"
+
+**********************************
+**********************************
+Reflecting on method TestClass::prot()
+
+__toString():
+string(%d) "Method [ <user> protected method prot ] {
+ @@ %s 28 - 28
+}
+"
+
+export():
+string(%d) "Method [ <user> protected method prot ] {
+ @@ %s 28 - 28
+}
+"
+
+**********************************
+**********************************
+Reflecting on method DerivedClass::prot()
+
+__toString():
+string(%d) "Method [ <user, inherits TestClass> protected method prot ] {
+ @@ %s 28 - 28
+}
+"
+
+export():
+string(%d) "Method [ <user, inherits TestClass> protected method prot ] {
+ @@ %s 28 - 28
+}
+"
+
+**********************************
+**********************************
+Reflecting on method TestInterface::int()
+
+__toString():
+string(%d) "Method [ <user> abstract public method int ] {
+ @@ %s 36 - 36
+}
+"
+
+export():
+string(%d) "Method [ <user> abstract public method int ] {
+ @@ %s 36 - 36
+}
+"
+
+**********************************
+**********************************
+Reflecting on method ReflectionProperty::__construct()
+
+__toString():
+string(%d) "Method [ <internal:Reflection, ctor> public method __construct ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $argument ]
+ }
+}
+"
+
+export():
+string(%d) "Method [ <internal:Reflection, ctor> public method __construct ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $argument ]
+ }
+}
+"
+
+**********************************
+**********************************
+Reflecting on method TestClass::__destruct()
+
+__toString():
+string(%d) "Method [ <user, dtor> public method __destruct ] {
+ @@ %s 30 - 30
+}
+"
+
+export():
+string(%d) "Method [ <user, dtor> public method __destruct ] {
+ @@ %s 30 - 30
+}
+"
+
+**********************************
diff --git a/ext/reflection/tests/ReflectionMethod_basic3.phpt b/ext/reflection/tests/ReflectionMethod_basic3.phpt
new file mode 100644
index 000000000..3bc517138
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_basic3.phpt
@@ -0,0 +1,169 @@
+--TEST--
+ReflectionMethod class getName(), isInternal() and isUserDefined() methods
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function reflectMethod($class, $method) {
+ $methodInfo = new ReflectionMethod($class, $method);
+ echo "**********************************\n";
+ echo "Reflecting on method $class::$method()\n\n";
+ echo "\ngetName():\n";
+ var_dump($methodInfo->getName());
+ echo "\nisInternal():\n";
+ var_dump($methodInfo->isInternal());
+ echo "\nisUserDefined():\n";
+ var_dump($methodInfo->isUserDefined());
+ echo "\n**********************************\n";
+}
+
+class TestClass
+{
+ public function foo() {
+ echo "Called foo()\n";
+ }
+
+ static function stat() {
+ echo "Called stat()\n";
+ }
+
+ private function priv() {
+ echo "Called priv()\n";
+ }
+
+ protected function prot() {}
+
+ public function __destruct() {}
+}
+
+class DerivedClass extends TestClass {}
+
+interface TestInterface {
+ public function int();
+}
+
+reflectMethod("DerivedClass", "foo");
+reflectMethod("TestClass", "stat");
+reflectMethod("TestClass", "priv");
+reflectMethod("TestClass", "prot");
+reflectMethod("DerivedClass", "prot");
+reflectMethod("TestInterface", "int");
+reflectMethod("ReflectionProperty", "__construct");
+reflectMethod("TestClass", "__destruct");
+
+
+?>
+--EXPECT--
+**********************************
+Reflecting on method DerivedClass::foo()
+
+
+getName():
+string(3) "foo"
+
+isInternal():
+bool(false)
+
+isUserDefined():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on method TestClass::stat()
+
+
+getName():
+string(4) "stat"
+
+isInternal():
+bool(false)
+
+isUserDefined():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on method TestClass::priv()
+
+
+getName():
+string(4) "priv"
+
+isInternal():
+bool(false)
+
+isUserDefined():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on method TestClass::prot()
+
+
+getName():
+string(4) "prot"
+
+isInternal():
+bool(false)
+
+isUserDefined():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on method DerivedClass::prot()
+
+
+getName():
+string(4) "prot"
+
+isInternal():
+bool(false)
+
+isUserDefined():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on method TestInterface::int()
+
+
+getName():
+string(3) "int"
+
+isInternal():
+bool(false)
+
+isUserDefined():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on method ReflectionProperty::__construct()
+
+
+getName():
+string(11) "__construct"
+
+isInternal():
+bool(true)
+
+isUserDefined():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method TestClass::__destruct()
+
+
+getName():
+string(10) "__destruct"
+
+isInternal():
+bool(false)
+
+isUserDefined():
+bool(true)
+
+**********************************
diff --git a/ext/reflection/tests/ReflectionMethod_basic4.phpt b/ext/reflection/tests/ReflectionMethod_basic4.phpt
new file mode 100644
index 000000000..9aac8c67f
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_basic4.phpt
@@ -0,0 +1,172 @@
+--TEST--
+ReflectionMethod class getFileName(), getStartLine() and getEndLine() methods
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function reflectMethod($class, $method) {
+ $methodInfo = new ReflectionMethod($class, $method);
+ echo "**********************************\n";
+ echo "Reflecting on method $class::$method()\n\n";
+ echo "\ngetFileName():\n";
+ var_dump($methodInfo->getFileName());
+ echo "\ngetStartLine():\n";
+ var_dump($methodInfo->getStartLine());
+ echo "\ngetEndLine():\n";
+ var_dump($methodInfo->getEndLine());
+ echo "\n**********************************\n";
+}
+
+class TestClass
+{
+ public function foo() {
+
+
+ echo "Called foo()\n";
+
+
+ }
+
+ static function stat() {
+ echo "Called stat()\n";
+ }
+
+ private function priv() {
+ echo "Called priv()\n";
+ }
+
+ protected function prot() {}
+
+ public function __destruct() {}
+}
+
+class DerivedClass extends TestClass {}
+
+interface TestInterface {
+ public function int();
+}
+
+reflectMethod("DerivedClass", "foo");
+reflectMethod("TestClass", "stat");
+reflectMethod("TestClass", "priv");
+reflectMethod("TestClass", "prot");
+reflectMethod("DerivedClass", "prot");
+reflectMethod("TestInterface", "int");
+reflectMethod("ReflectionProperty", "__construct");
+reflectMethod("TestClass", "__destruct");
+
+?>
+--EXPECTF--
+**********************************
+Reflecting on method DerivedClass::foo()
+
+
+getFileName():
+string(%d) "%sReflectionMethod_basic4.php"
+
+getStartLine():
+int(18)
+
+getEndLine():
+int(24)
+
+**********************************
+**********************************
+Reflecting on method TestClass::stat()
+
+
+getFileName():
+string(%d) "%sReflectionMethod_basic4.php"
+
+getStartLine():
+int(26)
+
+getEndLine():
+int(28)
+
+**********************************
+**********************************
+Reflecting on method TestClass::priv()
+
+
+getFileName():
+string(%d) "%sReflectionMethod_basic4.php"
+
+getStartLine():
+int(30)
+
+getEndLine():
+int(32)
+
+**********************************
+**********************************
+Reflecting on method TestClass::prot()
+
+
+getFileName():
+string(%d) "%sReflectionMethod_basic4.php"
+
+getStartLine():
+int(34)
+
+getEndLine():
+int(34)
+
+**********************************
+**********************************
+Reflecting on method DerivedClass::prot()
+
+
+getFileName():
+string(%d) "%sReflectionMethod_basic4.php"
+
+getStartLine():
+int(34)
+
+getEndLine():
+int(34)
+
+**********************************
+**********************************
+Reflecting on method TestInterface::int()
+
+
+getFileName():
+string(%d) "%sReflectionMethod_basic4.php"
+
+getStartLine():
+int(42)
+
+getEndLine():
+int(42)
+
+**********************************
+**********************************
+Reflecting on method ReflectionProperty::__construct()
+
+
+getFileName():
+bool(false)
+
+getStartLine():
+bool(false)
+
+getEndLine():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on method TestClass::__destruct()
+
+
+getFileName():
+string(%d) "%sReflectionMethod_basic4.php"
+
+getStartLine():
+int(36)
+
+getEndLine():
+int(36)
+
+**********************************
diff --git a/ext/reflection/tests/ReflectionMethod_constructor_basic.phpt b/ext/reflection/tests/ReflectionMethod_constructor_basic.phpt
new file mode 100644
index 000000000..5655b0eea
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_constructor_basic.phpt
@@ -0,0 +1,121 @@
+--TEST--
+ReflectionMethod::isConstructor()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class NewCtor {
+ function __construct() {
+ echo "In " . __METHOD__ . "\n";
+ }
+
+}
+echo "New-style constructor:\n";
+$methodInfo = new ReflectionMethod("NewCtor::__construct");
+var_dump($methodInfo->isConstructor());
+
+class ExtendsNewCtor extends NewCtor {
+}
+echo "\nInherited new-style constructor\n";
+$methodInfo = new ReflectionMethod("ExtendsNewCtor::__construct");
+var_dump($methodInfo->isConstructor());
+
+class OldCtor {
+ function OldCtor() {
+ echo "In " . __METHOD__ . "\n";
+ }
+}
+echo "\nOld-style constructor:\n";
+$methodInfo = new ReflectionMethod("OldCtor::OldCtor");
+var_dump($methodInfo->isConstructor());
+
+class ExtendsOldCtor extends OldCtor {
+}
+echo "\nInherited old-style constructor:\n";
+$methodInfo = new ReflectionMethod("ExtendsOldCtor::OldCtor");
+var_dump($methodInfo->isConstructor());
+
+class X {
+ function Y() {
+ echo "In " . __METHOD__ . "\n";
+ }
+}
+echo "\nNot a constructor:\n";
+$methodInfo = new ReflectionMethod("X::Y");
+var_dump($methodInfo->isConstructor());
+
+class Y extends X {
+}
+echo "\nInherited method of the same name as the class:\n";
+$methodInfo = new ReflectionMethod("Y::Y");
+var_dump($methodInfo->isConstructor());
+
+class OldAndNewCtor {
+ function OldAndNewCtor() {
+ echo "In " . __METHOD__ . "\n";
+ }
+
+ function __construct() {
+ echo "In " . __METHOD__ . "\n";
+ }
+}
+echo "\nOld-style constructor:\n";
+$methodInfo = new ReflectionMethod("OldAndNewCtor::OldAndNewCtor");
+var_dump($methodInfo->isConstructor());
+
+echo "\nRedefined constructor:\n";
+$methodInfo = new ReflectionMethod("OldAndNewCtor::__construct");
+var_dump($methodInfo->isConstructor());
+
+class NewAndOldCtor {
+ function __construct() {
+ echo "In " . __METHOD__ . "\n";
+ }
+
+ function NewAndOldCtor() {
+ echo "In " . __METHOD__ . "\n";
+ }
+}
+echo "\nNew-style constructor:\n";
+$methodInfo = new ReflectionMethod("NewAndOldCtor::__construct");
+var_dump($methodInfo->isConstructor());
+
+echo "\nRedefined old-style constructor:\n";
+$methodInfo = new ReflectionMethod("NewAndOldCtor::NewAndOldCtor");
+var_dump($methodInfo->isConstructor());
+
+?>
+--EXPECTF--
+Strict Standards: Redefining already defined constructor for class OldAndNewCtor in %s on line %d
+
+Strict Standards: %s for class NewAndOldCtor in %s on line %d
+New-style constructor:
+bool(true)
+
+Inherited new-style constructor
+bool(true)
+
+Old-style constructor:
+bool(true)
+
+Inherited old-style constructor:
+bool(true)
+
+Not a constructor:
+bool(false)
+
+Inherited method of the same name as the class:
+bool(false)
+
+Old-style constructor:
+bool(false)
+
+Redefined constructor:
+bool(true)
+
+New-style constructor:
+bool(true)
+
+Redefined old-style constructor:
+bool(false)
diff --git a/ext/reflection/tests/ReflectionMethod_getDeclaringClass_basic.phpt b/ext/reflection/tests/ReflectionMethod_getDeclaringClass_basic.phpt
new file mode 100644
index 000000000..f043e5247
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getDeclaringClass_basic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+ReflectionMethod::getDeclaringClass()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class A {
+ function foo() {}
+}
+
+class B extends A {
+ function bar() {}
+}
+
+$methodInfo = new ReflectionMethod('B', 'foo');
+var_dump($methodInfo->getDeclaringClass());
+
+$methodInfo = new ReflectionMethod('B', 'bar');
+var_dump($methodInfo->getDeclaringClass());
+
+?>
+--EXPECTF--
+object(ReflectionClass)#%d (1) {
+ ["name"]=>
+ string(1) "A"
+}
+object(ReflectionClass)#%d (1) {
+ ["name"]=>
+ string(1) "B"
+}
+
diff --git a/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt b/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
new file mode 100644
index 000000000..542ddf014
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
@@ -0,0 +1,115 @@
+--TEST--
+ReflectionMethod::getDocComment()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+/**
+ * My Doc Comment for A
+ */
+class A {
+ /**
+ * My Doc Comment for A::f
+ */
+ function f() {}
+
+ /**
+ * My Doc Comment for A::privf
+ */
+ private function privf() {}
+
+ /** My Doc Comment for A::protStatf */
+ protected static function protStatf() {}
+
+ /**
+
+ * My Doc Comment for A::finalStatPubf
+ */
+ final static public function finalStatPubf() {}
+
+}
+
+
+class B extends A {
+ /*** Not a doc comment */
+ function f() {}
+
+ /** *
+ * My Doc Comment for B::privf
+ */
+
+
+
+
+ private function privf() {}
+
+
+ /** My Doc Comment for B::protStatf
+
+
+
+
+ */
+ protected static function protStatf() {}
+
+}
+
+foreach (array('A', 'B') as $class) {
+ $rc = new ReflectionClass($class);
+ $rms = $rc->getMethods();
+ foreach ($rms as $rm) {
+ echo "\n\n---> Doc comment for $class::" . $rm->getName() . "():\n";
+ var_dump($rm->getDocComment());
+ }
+}
+?>
+--EXPECTF--
+
+
+---> Doc comment for A::f():
+string(%d) "/**
+ * My Doc Comment for A::f
+ */"
+
+
+---> Doc comment for A::privf():
+string(%d) "/**
+ * My Doc Comment for A::privf
+ */"
+
+
+---> Doc comment for A::protStatf():
+string(%d) "/** My Doc Comment for A::protStatf */"
+
+
+---> Doc comment for A::finalStatPubf():
+string(%d) "/**
+
+ * My Doc Comment for A::finalStatPubf
+ */"
+
+
+---> Doc comment for B::f():
+bool(false)
+
+
+---> Doc comment for B::privf():
+string(%d) "/** *
+ * My Doc Comment for B::privf
+ */"
+
+
+---> Doc comment for B::protStatf():
+string(%d) "/** My Doc Comment for B::protStatf
+
+
+
+
+ */"
+
+
+---> Doc comment for B::finalStatPubf():
+string(%d) "/**
+
+ * My Doc Comment for A::finalStatPubf
+ */" \ No newline at end of file
diff --git a/ext/reflection/tests/ReflectionMethod_getDocComment_error.phpt b/ext/reflection/tests/ReflectionMethod_getDocComment_error.phpt
new file mode 100644
index 000000000..041d17ef3
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getDocComment_error.phpt
@@ -0,0 +1,19 @@
+--TEST--
+ReflectionMethod::getDocComment() errors
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+class C { function f() {} }
+$rc = new ReflectionMethod('C::f');
+var_dump($rc->getDocComment(null));
+var_dump($rc->getDocComment('X'));
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for ReflectionFunctionAbstract::getDocComment() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionFunctionAbstract::getDocComment() in %s on line %d
+NULL
+
diff --git a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
new file mode 100644
index 000000000..74b96f8ee
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt
@@ -0,0 +1,244 @@
+--TEST--
+ReflectionMethod::getModifiers()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function reflectMethodModifiers($class) {
+ $classInfo = new reflectionClass($class);
+ $methodArray = $classInfo->getMethods();
+
+ foreach ($methodArray as $method) {
+ echo "Modifiers for method $method->class::$method->name():\n";
+ var_dump($method->getModifiers());
+ echo "\n\n";
+ }
+}
+
+class TestClass
+{
+ public function foo() {
+ echo "Called foo()\n";
+ }
+
+ static function stat() {
+ echo "Called stat()\n";
+ }
+
+ private function priv() {
+ echo "Called priv()\n";
+ }
+
+ protected function prot() {}
+
+ public final function fin() {}
+
+ public function __destruct() {}
+
+ public function __call($a, $b) {}
+
+ public function __clone() {}
+
+ public function __get($a) {}
+
+ public function __set($a, $b) {}
+
+ public function __unset($a) {}
+
+ public function __isset($a) {}
+
+ public function __tostring() {}
+
+ public function __sleep() {}
+
+ public function __wakeup() {}
+
+ public function __set_state() {}
+
+ public function __autoload() {}
+}
+
+class DerivedClass extends TestClass {}
+
+interface TestInterface {
+ public function int();
+ public function __clone();
+}
+
+abstract class AbstractClass {
+ public abstract function foo();
+}
+
+
+
+reflectMethodModifiers("TestClass");
+reflectMethodModifiers("DerivedClass");
+reflectMethodModifiers("TestInterface");
+reflectMethodModifiers("AbstractClass");
+
+echo "Wrong number of params:\n";
+$a = new ReflectionMethod('TestClass::foo');
+$a->getModifiers(1);
+
+$a = new ReflectionMethod('ReflectionMethod::getModifiers');
+
+echo "\nReflectionMethod::getModifiers() modifiers:\n";
+var_dump($a->getModifiers());
+
+?>
+--EXPECTF--
+Modifiers for method TestClass::foo():
+int(65792)
+
+
+Modifiers for method TestClass::stat():
+int(257)
+
+
+Modifiers for method TestClass::priv():
+int(66560)
+
+
+Modifiers for method TestClass::prot():
+int(66048)
+
+
+Modifiers for method TestClass::fin():
+int(65796)
+
+
+Modifiers for method TestClass::__destruct():
+int(16640)
+
+
+Modifiers for method TestClass::__call():
+int(256)
+
+
+Modifiers for method TestClass::__clone():
+int(33024)
+
+
+Modifiers for method TestClass::__get():
+int(256)
+
+
+Modifiers for method TestClass::__set():
+int(256)
+
+
+Modifiers for method TestClass::__unset():
+int(256)
+
+
+Modifiers for method TestClass::__isset():
+int(256)
+
+
+Modifiers for method TestClass::__tostring():
+int(256)
+
+
+Modifiers for method TestClass::__sleep():
+int(65792)
+
+
+Modifiers for method TestClass::__wakeup():
+int(65792)
+
+
+Modifiers for method TestClass::__set_state():
+int(65792)
+
+
+Modifiers for method TestClass::__autoload():
+int(65792)
+
+
+Modifiers for method DerivedClass::foo():
+int(65792)
+
+
+Modifiers for method DerivedClass::stat():
+int(257)
+
+
+Modifiers for method DerivedClass::priv():
+int(66560)
+
+
+Modifiers for method DerivedClass::prot():
+int(66048)
+
+
+Modifiers for method DerivedClass::fin():
+int(65796)
+
+
+Modifiers for method DerivedClass::__destruct():
+int(16640)
+
+
+Modifiers for method DerivedClass::__call():
+int(256)
+
+
+Modifiers for method DerivedClass::__clone():
+int(33024)
+
+
+Modifiers for method DerivedClass::__get():
+int(256)
+
+
+Modifiers for method DerivedClass::__set():
+int(256)
+
+
+Modifiers for method DerivedClass::__unset():
+int(256)
+
+
+Modifiers for method DerivedClass::__isset():
+int(256)
+
+
+Modifiers for method DerivedClass::__tostring():
+int(256)
+
+
+Modifiers for method DerivedClass::__sleep():
+int(65792)
+
+
+Modifiers for method DerivedClass::__wakeup():
+int(65792)
+
+
+Modifiers for method DerivedClass::__set_state():
+int(65792)
+
+
+Modifiers for method DerivedClass::__autoload():
+int(65792)
+
+
+Modifiers for method TestInterface::int():
+int(258)
+
+
+Modifiers for method TestInterface::__clone():
+int(258)
+
+
+Modifiers for method AbstractClass::foo():
+int(65794)
+
+
+Wrong number of params:
+
+Warning: Wrong parameter count for ReflectionMethod::getModifiers() in %s on line %d
+
+ReflectionMethod::getModifiers() modifiers:
+int(256)
diff --git a/ext/reflection/tests/ReflectionMethod_getStaticVariables_basic.phpt b/ext/reflection/tests/ReflectionMethod_getStaticVariables_basic.phpt
new file mode 100644
index 000000000..1a3d7c8ea
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getStaticVariables_basic.phpt
@@ -0,0 +1,65 @@
+--TEST--
+ReflectionMethod::getStaticVariables()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public function foo() {
+ static $c;
+ static $a = 1;
+ static $b = "hello";
+ $d = 5;
+ }
+
+ private function bar() {
+ static $a = 1;
+ }
+
+ public function noStatics() {
+ $a = 54;
+ }
+}
+
+echo "Public method:\n";
+$methodInfo = new ReflectionMethod('TestClass::foo');
+var_dump($methodInfo->getStaticVariables());
+
+echo "\nPrivate method:\n";
+$methodInfo = new ReflectionMethod('TestClass::bar');
+var_dump($methodInfo->getStaticVariables());
+
+echo "\nMethod with no static variables:\n";
+$methodInfo = new ReflectionMethod('TestClass::noStatics');
+var_dump($methodInfo->getStaticVariables());
+
+echo "\nInternal Method:\n";
+$methodInfo = new ReflectionMethod('ReflectionClass::getName');
+var_dump($methodInfo->getStaticVariables());
+
+?>
+--EXPECT--
+Public method:
+array(3) {
+ ["c"]=>
+ NULL
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ string(5) "hello"
+}
+
+Private method:
+array(1) {
+ ["a"]=>
+ int(1)
+}
+
+Method with no static variables:
+array(0) {
+}
+
+Internal Method:
+array(0) {
+} \ No newline at end of file
diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt
new file mode 100644
index 000000000..b6dd1c90f
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt
@@ -0,0 +1,75 @@
+--TEST--
+ReflectionMethod::invokeArgs()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public $prop = 2;
+
+ public function foo() {
+ echo "Called foo(), property = $this->prop\n";
+ var_dump($this);
+ return "Return Val";
+ }
+
+ public function willThrow() {
+ throw new Exception("Called willThrow()");
+ }
+
+ public function methodWithArgs($a, $b) {
+ echo "Called methodWithArgs($a, $b)\n";
+ }
+}
+
+
+$testClassInstance = new TestClass();
+$testClassInstance->prop = "Hello";
+
+$foo = new ReflectionMethod($testClassInstance, 'foo');
+$methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs');
+$methodThatThrows = new ReflectionMethod("TestClass::willThrow");
+
+
+echo "Public method:\n";
+
+var_dump($foo->invokeArgs($testClassInstance, array()));
+var_dump($foo->invokeArgs($testClassInstance, array(true)));
+
+echo "\nMethod with args:\n";
+
+var_dump($methodWithArgs->invokeArgs($testClassInstance, array(1, "arg2")));
+var_dump($methodWithArgs->invokeArgs($testClassInstance, array(1, "arg2", 3)));
+
+echo "\nMethod that throws an exception:\n";
+try {
+ $methodThatThrows->invokeArgs($testClassInstance, array());
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+?>
+--EXPECTF--
+Public method:
+Called foo(), property = Hello
+object(TestClass)#%d (1) {
+ ["prop"]=>
+ string(5) "Hello"
+}
+string(10) "Return Val"
+Called foo(), property = Hello
+object(TestClass)#%d (1) {
+ ["prop"]=>
+ string(5) "Hello"
+}
+string(10) "Return Val"
+
+Method with args:
+Called methodWithArgs(1, arg2)
+NULL
+Called methodWithArgs(1, arg2)
+NULL
+
+Method that throws an exception:
+string(18) "Called willThrow()"
diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error1.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error1.phpt
new file mode 100644
index 000000000..19b7fe288
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error1.phpt
@@ -0,0 +1,38 @@
+--TEST--
+ReflectionMethod:invokeArgs() errors
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+
+ public function methodWithArgs($a, $b) {
+ echo "Called methodWithArgs($a, $b)\n";
+ }
+}
+
+abstract class AbstractClass {
+ abstract function foo();
+}
+
+$methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs');
+
+$testClassInstance = new TestClass();
+
+echo "\nMethod with args:\n";
+var_dump($methodWithArgs->invokeArgs($testClassInstance, array()));
+
+?>
+--EXPECTF--
+Method with args:
+
+Warning: Missing argument 1 for TestClass::methodWithArgs() in %s on line %d
+
+Warning: Missing argument 2 for TestClass::methodWithArgs() in %s on line %d
+
+Notice: Undefined variable: a in %s on line %d
+
+Notice: Undefined variable: b in %s on line %d
+Called methodWithArgs(, )
+NULL
diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt
new file mode 100644
index 000000000..ebdf9730b
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt
@@ -0,0 +1,29 @@
+--TEST--
+ReflectionMethod::invokeArgs() further errors
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+
+ public function foo() {
+ echo "Called foo()\n";
+ var_dump($this);
+ return "Return Val";
+ }
+}
+
+$foo = new ReflectionMethod('TestClass', 'foo');
+
+$testClassInstance = new TestClass();
+
+try {
+ var_dump($foo->invokeArgs($testClassInstance, true));
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+?>
+--EXPECTF--
+Catchable fatal error: Argument 2 passed to ReflectionMethod::invokeArgs() must be an array, boolean given in %s on line %d
diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
new file mode 100644
index 000000000..834f35d66
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt
@@ -0,0 +1,119 @@
+--TEST--
+ReflectionMethod::invokeArgs() further errors
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public $prop = 2;
+
+ public function foo() {
+ echo "Called foo(), property = $this->prop\n";
+ var_dump($this);
+ return "Return Val";
+ }
+
+ public static function staticMethod() {
+ echo "Called staticMethod()\n";
+ var_dump($this);
+ }
+
+ private static function privateMethod() {
+ echo "Called privateMethod()\n";
+ }
+}
+
+abstract class AbstractClass {
+ abstract function foo();
+}
+
+$testClassInstance = new TestClass();
+$testClassInstance->prop = "Hello";
+
+$foo = new ReflectionMethod($testClassInstance, 'foo');
+$staticMethod = new ReflectionMethod('TestClass::staticMethod');
+$privateMethod = new ReflectionMethod("TestClass::privateMethod");
+
+echo "Wrong number of parameters:\n";
+var_dump($foo->invokeArgs());
+var_dump($foo->invokeArgs(true));
+
+echo "\nNon-instance:\n";
+try {
+ var_dump($foo->invokeArgs(new stdClass(), array()));
+} catch (ReflectionException $e) {
+ var_dump($e->getMessage());
+}
+
+echo "\nNon-object:\n";
+var_dump($foo->invokeArgs(true, array()));
+
+echo "\nStatic method:\n";
+
+var_dump($staticMethod->invokeArgs());
+var_dump($staticMethod->invokeArgs(true));
+var_dump($staticMethod->invokeArgs(true, array()));
+var_dump($staticMethod->invokeArgs(null, array()));
+
+echo "\nPrivate method:\n";
+try {
+ var_dump($privateMethod->invokeArgs($testClassInstance, array()));
+} catch (ReflectionException $e) {
+ var_dump($e->getMessage());
+}
+
+echo "\nAbstract method:\n";
+$abstractMethod = new ReflectionMethod("AbstractClass::foo");
+try {
+ $abstractMethod->invokeArgs($testClassInstance, array());
+} catch (ReflectionException $e) {
+ var_dump($e->getMessage());
+}
+try {
+ $abstractMethod->invokeArgs(true);
+} catch (ReflectionException $e) {
+ var_dump($e->getMessage());
+}
+
+?>
+--EXPECTF--
+Wrong number of parameters:
+
+Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Non-instance:
+string(72) "Given object is not an instance of the class this method was declared in"
+
+Non-object:
+
+Warning: ReflectionMethod::invokeArgs() expects parameter 1 to be object, boolean given in %s on line %d
+NULL
+
+Static method:
+
+Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: ReflectionMethod::invokeArgs() expects parameter 1 to be object, boolean given in %s on line %d
+NULL
+Called staticMethod()
+
+Notice: Undefined variable: this in %s on line %d
+NULL
+NULL
+
+Private method:
+string(84) "Trying to invoke private method TestClass::privateMethod from scope ReflectionMethod"
+
+Abstract method:
+string(51) "Trying to invoke abstract method AbstractClass::foo"
+
+Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 1 given in %s on line %d
diff --git a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
new file mode 100644
index 000000000..c08b915e8
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt
@@ -0,0 +1,110 @@
+--TEST--
+ReflectionMethod::invoke()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public $prop = 2;
+
+ public function foo() {
+ echo "Called foo(), property = $this->prop\n";
+ var_dump($this);
+ return "Return Val";
+ }
+
+ public function willThrow() {
+ throw new Exception("Called willThrow()");
+ }
+
+ public function methodWithArgs($a, $b) {
+ echo "Called methodWithArgs($a, $b)\n";
+ }
+
+ public static function staticMethod() {
+ echo "Called staticMethod()\n";
+ var_dump($this);
+ }
+
+ private static function privateMethod() {
+ echo "Called privateMethod()\n";
+ }
+}
+
+abstract class AbstractClass {
+ abstract function foo();
+}
+
+$foo = new ReflectionMethod('TestClass', 'foo');
+$methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs');
+$staticMethod = new ReflectionMethod('TestClass::staticMethod');
+$privateMethod = new ReflectionMethod("TestClass::privateMethod");
+$methodThatThrows = new ReflectionMethod("TestClass::willThrow");
+
+$testClassInstance = new TestClass();
+$testClassInstance->prop = "Hello";
+
+echo "Public method:\n";
+
+var_dump($foo->invoke($testClassInstance));
+
+var_dump($foo->invoke($testClassInstance, true));
+
+echo "\nMethod with args:\n";
+
+var_dump($methodWithArgs->invoke($testClassInstance, 1, "arg2"));
+var_dump($methodWithArgs->invoke($testClassInstance, 1, "arg2", 3));
+
+echo "\nStatic method:\n";
+
+var_dump($staticMethod->invoke());
+var_dump($staticMethod->invoke(true));
+var_dump($staticMethod->invoke(new stdClass()));
+
+echo "\nMethod that throws an exception:\n";
+try {
+ var_dump($methodThatThrows->invoke($testClassInstance));
+} catch (Exception $exc) {
+ var_dump($exc->getMessage());
+}
+
+?>
+--EXPECTF--
+Public method:
+Called foo(), property = Hello
+object(TestClass)#%d (1) {
+ ["prop"]=>
+ string(5) "Hello"
+}
+string(10) "Return Val"
+Called foo(), property = Hello
+object(TestClass)#%d (1) {
+ ["prop"]=>
+ string(5) "Hello"
+}
+string(10) "Return Val"
+
+Method with args:
+Called methodWithArgs(1, arg2)
+NULL
+Called methodWithArgs(1, arg2)
+NULL
+
+Static method:
+
+Warning: Invoke() expects at least one parameter, none given in %s on line %d
+bool(false)
+Called staticMethod()
+
+Notice: Undefined variable: this in %s on line %d
+NULL
+NULL
+Called staticMethod()
+
+Notice: Undefined variable: this in %s on line %d
+NULL
+NULL
+
+Method that throws an exception:
+string(18) "Called willThrow()"
diff --git a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt
new file mode 100644
index 000000000..2846a13c6
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt
@@ -0,0 +1,73 @@
+--TEST--
+ReflectionMethod::invoke() errors
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public $prop = 2;
+
+ public function foo() {
+ echo "Called foo(), property = $this->prop\n";
+ var_dump($this);
+ return "Return Val";
+ }
+
+ private static function privateMethod() {
+ echo "Called privateMethod()\n";
+ }
+}
+
+abstract class AbstractClass {
+ abstract function foo();
+}
+
+$foo = new ReflectionMethod('TestClass', 'foo');
+$privateMethod = new ReflectionMethod("TestClass::privateMethod");
+
+$testClassInstance = new TestClass();
+$testClassInstance->prop = "Hello";
+
+echo "invoke() on a non-object:\n";
+try {
+ var_dump($foo->invoke(true));
+} catch (ReflectionException $e) {
+ var_dump($e->getMessage());
+}
+
+echo "\ninvoke() on a non-instance:\n";
+try {
+ var_dump($foo->invoke(new stdClass()));
+} catch (ReflectionException $e) {
+ var_dump($e->getMessage());
+}
+
+echo "\nPrivate method:\n";
+try {
+ var_dump($privateMethod->invoke($testClassInstance));
+} catch (ReflectionException $e) {
+ var_dump($e->getMessage());
+}
+
+echo "\nAbstract method:\n";
+$abstractMethod = new ReflectionMethod("AbstractClass::foo");
+try {
+ $abstractMethod->invoke(true);
+} catch (ReflectionException $e) {
+ var_dump($e->getMessage());
+}
+
+?>
+--EXPECTF--
+invoke() on a non-object:
+string(29) "Non-object passed to Invoke()"
+
+invoke() on a non-instance:
+string(72) "Given object is not an instance of the class this method was declared in"
+
+Private method:
+string(86) "Trying to invoke private method TestClass::privateMethod() from scope ReflectionMethod"
+
+Abstract method:
+string(53) "Trying to invoke abstract method AbstractClass::foo()"
diff --git a/ext/reflection/tests/ReflectionMethod_invoke_error2.phpt b/ext/reflection/tests/ReflectionMethod_invoke_error2.phpt
new file mode 100644
index 000000000..cb3b1c2d2
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_invoke_error2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+ReflectionMethod::invoke() further errors
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+
+ public function methodWithArgs($a, $b) {
+ echo "Called methodWithArgs($a, $b)\n";
+ }
+}
+
+$methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs');
+
+$testClassInstance = new TestClass();
+
+echo "\nMethod with args:\n";
+var_dump($methodWithArgs->invoke($testClassInstance));
+
+?>
+--EXPECTF--
+Method with args:
+
+Warning: Missing argument 1 for TestClass::methodWithArgs() in %s on line %d
+
+Warning: Missing argument 2 for TestClass::methodWithArgs() in %s on line %d
+
+Notice: Undefined variable: a in %s on line %d
+
+Notice: Undefined variable: b in %s on line %d
+Called methodWithArgs(, )
+NULL
diff --git a/ext/reflection/tests/ReflectionMethod_returnsReference_basic.phpt b/ext/reflection/tests/ReflectionMethod_returnsReference_basic.phpt
new file mode 100644
index 000000000..b3a1f8c00
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_returnsReference_basic.phpt
@@ -0,0 +1,25 @@
+--TEST--
+ReflectionMethod::returnsReference()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public function &foo() {
+ }
+
+ private function bar() {
+ }
+}
+
+$methodInfo = new ReflectionMethod('TestClass::foo');
+var_dump($methodInfo->returnsReference());
+
+$methodInfo = new ReflectionMethod('TestClass::bar');
+var_dump($methodInfo->returnsReference());
+
+?>
+--EXPECT--
+bool(true)
+bool(false)
diff --git a/ext/reflection/tests/reflectionProperty_basic1.phpt b/ext/reflection/tests/reflectionProperty_basic1.phpt
new file mode 100644
index 000000000..f7c1c8f10
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_basic1.phpt
@@ -0,0 +1,162 @@
+--TEST--
+Test usage of ReflectionProperty methods __toString(), export(), getName(), isPublic(), isPrivate(), isProtected(), isStatic(), getValue() and setValue().
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function reflectProperty($class, $property) {
+ $propInfo = new ReflectionProperty($class, $property);
+ echo "**********************************\n";
+ echo "Reflecting on property $class::$property\n\n";
+ echo "__toString():\n";
+ var_dump($propInfo->__toString());
+ echo "export():\n";
+ var_dump(ReflectionProperty::export($class, $property, true));
+ echo "export():\n";
+ var_dump(ReflectionProperty::export($class, $property, false));
+ echo "getName():\n";
+ var_dump($propInfo->getName());
+ echo "isPublic():\n";
+ var_dump($propInfo->isPublic());
+ echo "isPrivate():\n";
+ var_dump($propInfo->isPrivate());
+ echo "isProtected():\n";
+ var_dump($propInfo->isProtected());
+ echo "isStatic():\n";
+ var_dump($propInfo->isStatic());
+ $instance = new $class();
+ if ($propInfo->isPublic()) {
+ echo "getValue():\n";
+ var_dump($propInfo->getValue($instance));
+ $propInfo->setValue($instance, "NewValue");
+ echo "getValue() after a setValue():\n";
+ var_dump($propInfo->getValue($instance));
+ }
+ echo "\n**********************************\n";
+}
+
+class TestClass {
+ public $pub;
+ static public $stat = "static property";
+ protected $prot = 4;
+ private $priv = "keepOut";
+}
+
+reflectProperty("TestClass", "pub");
+reflectProperty("TestClass", "stat");
+reflectProperty("TestClass", "prot");
+reflectProperty("TestClass", "priv");
+
+?>
+--EXPECT--
+**********************************
+Reflecting on property TestClass::pub
+
+__toString():
+string(35) "Property [ <default> public $pub ]
+"
+export():
+string(35) "Property [ <default> public $pub ]
+"
+export():
+Property [ <default> public $pub ]
+
+NULL
+getName():
+string(3) "pub"
+isPublic():
+bool(true)
+isPrivate():
+bool(false)
+isProtected():
+bool(false)
+isStatic():
+bool(false)
+getValue():
+NULL
+getValue() after a setValue():
+string(8) "NewValue"
+
+**********************************
+**********************************
+Reflecting on property TestClass::stat
+
+__toString():
+string(33) "Property [ public static $stat ]
+"
+export():
+string(33) "Property [ public static $stat ]
+"
+export():
+Property [ public static $stat ]
+
+NULL
+getName():
+string(4) "stat"
+isPublic():
+bool(true)
+isPrivate():
+bool(false)
+isProtected():
+bool(false)
+isStatic():
+bool(true)
+getValue():
+string(15) "static property"
+getValue() after a setValue():
+string(8) "NewValue"
+
+**********************************
+**********************************
+Reflecting on property TestClass::prot
+
+__toString():
+string(39) "Property [ <default> protected $prot ]
+"
+export():
+string(39) "Property [ <default> protected $prot ]
+"
+export():
+Property [ <default> protected $prot ]
+
+NULL
+getName():
+string(4) "prot"
+isPublic():
+bool(false)
+isPrivate():
+bool(false)
+isProtected():
+bool(true)
+isStatic():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on property TestClass::priv
+
+__toString():
+string(37) "Property [ <default> private $priv ]
+"
+export():
+string(37) "Property [ <default> private $priv ]
+"
+export():
+Property [ <default> private $priv ]
+
+NULL
+getName():
+string(4) "priv"
+isPublic():
+bool(false)
+isPrivate():
+bool(true)
+isProtected():
+bool(false)
+isStatic():
+bool(false)
+
+**********************************
+
+
diff --git a/ext/reflection/tests/reflectionProperty_basic2.phpt b/ext/reflection/tests/reflectionProperty_basic2.phpt
new file mode 100644
index 000000000..f2b5ff4fb
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_basic2.phpt
@@ -0,0 +1,105 @@
+--TEST--
+Test usage of ReflectionProperty methods isDefault(), getModifiers(), getDeclaringClass() and getDocComment().
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function reflectProperty($class, $property) {
+ $propInfo = new ReflectionProperty($class, $property);
+ echo "**********************************\n";
+ echo "Reflecting on property $class::$property\n\n";
+ echo "isDefault():\n";
+ var_dump($propInfo->isDefault());
+ echo "getModifiers():\n";
+ var_dump($propInfo->getModifiers());
+ echo "getDeclaringClass():\n";
+ var_dump($propInfo->getDeclaringClass());
+ echo "getDocComment():\n";
+ var_dump($propInfo->getDocComment());
+ echo "\n**********************************\n";
+}
+
+class TestClass {
+ public $pub;
+ static public $stat = "static property";
+ /**
+ * This property has a comment.
+ */
+ protected $prot = 4;
+ private $priv = "keepOut";
+}
+
+reflectProperty("TestClass", "pub");
+reflectProperty("TestClass", "stat");
+reflectProperty("TestClass", "prot");
+reflectProperty("TestClass", "priv");
+
+?>
+--EXPECTF--
+**********************************
+Reflecting on property TestClass::pub
+
+isDefault():
+bool(true)
+getModifiers():
+int(256)
+getDeclaringClass():
+object(ReflectionClass)#%d (1) {
+ ["name"]=>
+ string(9) "TestClass"
+}
+getDocComment():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on property TestClass::stat
+
+isDefault():
+bool(true)
+getModifiers():
+int(257)
+getDeclaringClass():
+object(ReflectionClass)#%d (1) {
+ ["name"]=>
+ string(9) "TestClass"
+}
+getDocComment():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on property TestClass::prot
+
+isDefault():
+bool(true)
+getModifiers():
+int(512)
+getDeclaringClass():
+object(ReflectionClass)#%d (1) {
+ ["name"]=>
+ string(9) "TestClass"
+}
+getDocComment():
+string(%d) "/**
+ * This property has a comment.
+ */"
+
+**********************************
+**********************************
+Reflecting on property TestClass::priv
+
+isDefault():
+bool(true)
+getModifiers():
+int(1024)
+getDeclaringClass():
+object(ReflectionClass)#%d (1) {
+ ["name"]=>
+ string(9) "TestClass"
+}
+getDocComment():
+bool(false)
+
+**********************************
diff --git a/ext/reflection/tests/reflectionProperty_constructor_error.phpt b/ext/reflection/tests/reflectionProperty_constructor_error.phpt
new file mode 100644
index 000000000..46cdc87ea
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_constructor_error.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test ReflectionProperty class constructor errors.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+}
+
+$a = 5;
+
+echo "Non-existent class:\n";
+try {
+ $propInfo = new ReflectionProperty("NonExistentClass", "prop");
+}
+catch(Exception $e) {
+ echo $e->getMessage();
+}
+
+echo "\n\nWrong property parameter type:\n";
+try {
+ $propInfo = new ReflectionProperty($a, 'TestClass');
+}
+catch(ReflectionException $e) {
+ echo $e->getMessage();
+}
+
+echo "\n\nNon-existent property:\n";
+try {
+ $propInfo = new ReflectionProperty('TestClass', "nonExistentProperty");
+}
+catch(Exception $e) {
+ echo $e->getMessage();
+}
+
+?>
+--EXPECT--
+Non-existent class:
+Class NonExistentClass does not exist
+
+Wrong property parameter type:
+The parameter class is expected to be either a string or an object
+
+Non-existent property:
+Property TestClass::$nonExistentProperty does not exist
diff --git a/ext/reflection/tests/reflectionProperty_error.phpt b/ext/reflection/tests/reflectionProperty_error.phpt
new file mode 100644
index 000000000..bae255c23
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_error.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test ReflectionProperty class errors.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class C {
+ public static $p;
+}
+
+var_dump(new ReflectionProperty());
+var_dump(new ReflectionProperty('C::p'));
+var_dump(new ReflectionProperty('C', 'p', 'x'));
+$rp = new ReflectionProperty('C', 'p');
+var_dump($rp->getName(1));
+var_dump($rp->isPrivate(1));
+var_dump($rp->isProtected(1));
+var_dump($rp->isPublic(1));
+var_dump($rp->isStatic(1));
+var_dump($rp->getModifiers(1));
+var_dump($rp->isDefault(1));
+
+?>
+--EXPECTF--
+
+Warning: ReflectionProperty::__construct() expects exactly 2 parameters, 0 given in %s on line %d
+object(ReflectionProperty)#%d (2) {
+ ["name"]=>
+ string(0) ""
+ ["class"]=>
+ string(0) ""
+}
+
+Warning: ReflectionProperty::__construct() expects exactly 2 parameters, 1 given in %s on line %d
+object(ReflectionProperty)#%d (2) {
+ ["name"]=>
+ string(0) ""
+ ["class"]=>
+ string(0) ""
+}
+
+Warning: ReflectionProperty::__construct() expects exactly 2 parameters, 3 given in %s on line %d
+object(ReflectionProperty)#%d (2) {
+ ["name"]=>
+ string(0) ""
+ ["class"]=>
+ string(0) ""
+}
+
+Warning: Wrong parameter count for ReflectionProperty::getName() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::isPrivate() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::isProtected() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::isPublic() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::isStatic() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::getModifiers() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::isDefault() in %s on line %d
+NULL
diff --git a/ext/reflection/tests/reflectionProperty_export_basic.phpt b/ext/reflection/tests/reflectionProperty_export_basic.phpt
new file mode 100644
index 000000000..331fdb6a2
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_export_basic.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test ReflectionProperty::export() usage.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public $proper = 5;
+}
+
+var_dump(ReflectionProperty::export('TestClass', 'proper'));
+
+?>
+--EXPECT--
+Property [ <default> public $proper ]
+
+NULL
diff --git a/ext/reflection/tests/reflectionProperty_export_error.phpt b/ext/reflection/tests/reflectionProperty_export_error.phpt
new file mode 100644
index 000000000..9351846f6
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_export_error.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test ReflectionProperty::export() errors.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+}
+
+$a = 5;
+
+echo "Non-existent class:\n";
+try {
+ ReflectionProperty::export("NonExistentClass", "prop", true);
+}
+catch(Exception $e) {
+ echo $e->getMessage();
+}
+
+echo "\n\nWrong property parameter type:\n";
+try {
+ ReflectionProperty::export($a, 'TestClass', false);
+}
+catch(ReflectionException $e) {
+ echo $e->getMessage();
+}
+
+echo "\n\nNon-existent property:\n";
+try {
+ ReflectionProperty::export('TestClass', "nonExistentProperty", true);
+}
+catch(Exception $e) {
+ echo $e->getMessage();
+}
+
+echo "\n\nIncorrect number of args:\n";
+ReflectionProperty::export();
+ReflectionProperty::export('TestClass', "nonExistentProperty", true, false);
+
+?>
+--EXPECTF--
+Non-existent class:
+Class NonExistentClass does not exist
+
+Wrong property parameter type:
+The parameter class is expected to be either a string or an object
+
+Non-existent property:
+Property TestClass::$nonExistentProperty does not exist
+
+Incorrect number of args:
+
+Warning: ReflectionProperty::export() expects at least 2 parameters, 0 given in %s on line %d
+
+Warning: ReflectionProperty::export() expects at most 3 parameters, 4 given in %s on line %d
diff --git a/ext/reflection/tests/reflectionProperty_getDeclaringClass_variation1.phpt b/ext/reflection/tests/reflectionProperty_getDeclaringClass_variation1.phpt
new file mode 100644
index 000000000..3df3b2605
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_getDeclaringClass_variation1.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Test ReflectionProperty::getDeclaringClass() with inherited properties.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class A {
+ public $prop;
+}
+
+class B extends A {
+}
+
+$propInfo = new ReflectionProperty('B', 'prop');
+var_dump($propInfo->getDeclaringClass());
+
+echo "Wrong number of params:\n";
+$propInfo->getDeclaringClass(1);
+
+?>
+--EXPECTF--
+object(ReflectionClass)#%d (1) {
+ ["name"]=>
+ string(1) "A"
+}
+Wrong number of params:
+
+Warning: Wrong parameter count for ReflectionProperty::getDeclaringClass() in %s on line %d
diff --git a/ext/reflection/tests/reflectionProperty_getDocComment_basic.phpt b/ext/reflection/tests/reflectionProperty_getDocComment_basic.phpt
new file mode 100644
index 000000000..44416b7fc
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_getDocComment_basic.phpt
@@ -0,0 +1,102 @@
+--TEST--
+Test ReflectionProperty::getDocComment() usage.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class A {
+ /**
+ * My Doc Comment for $a
+ *
+ */
+ public $a = 2, $b, $c = 1;
+ /**
+ * My Doc Comment for $d
+ */
+ var $d;
+ /**Not a doc comment */
+ private $e;
+ /**
+ * Doc comment for $f
+ */
+ static protected $f;
+}
+
+class B extends A {
+ public $a = 2;
+ /** A doc comment for $b */
+ var $b, $c = 1;
+ /** A doc comment for $e */
+ var $e;
+}
+
+foreach(array('A', 'B') as $class) {
+ $rc = new ReflectionClass($class);
+ $rps = $rc->getProperties();
+ foreach($rps as $rp) {
+ echo "\n\n---> Doc comment for $class::$" . $rp->getName() . ":\n";
+ var_dump($rp->getDocComment());
+ }
+}
+
+?>
+--EXPECTF--
+
+---> Doc comment for A::$a:
+string(%d) "/**
+ * My Doc Comment for $a
+ *
+ */"
+
+
+---> Doc comment for A::$b:
+bool(false)
+
+
+---> Doc comment for A::$c:
+bool(false)
+
+
+---> Doc comment for A::$d:
+string(%d) "/**
+ * My Doc Comment for $d
+ */"
+
+
+---> Doc comment for A::$e:
+bool(false)
+
+
+---> Doc comment for A::$f:
+string(%d) "/**
+ * Doc comment for $f
+ */"
+
+
+---> Doc comment for B::$a:
+bool(false)
+
+
+---> Doc comment for B::$b:
+string(%d) "/** A doc comment for $b */"
+
+
+---> Doc comment for B::$c:
+bool(false)
+
+
+---> Doc comment for B::$e:
+string(%d) "/** A doc comment for $e */"
+
+
+---> Doc comment for B::$d:
+string(%d) "/**
+ * My Doc Comment for $d
+ */"
+
+
+---> Doc comment for B::$f:
+string(%d) "/**
+ * Doc comment for $f
+ */"
diff --git a/ext/reflection/tests/reflectionProperty_getDocComment_error.phpt b/ext/reflection/tests/reflectionProperty_getDocComment_error.phpt
new file mode 100644
index 000000000..8c1b68e81
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_getDocComment_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test ReflectionProperty::getDocComment() errors.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class C {
+ public $a;
+}
+
+$rc = new ReflectionProperty('C', 'a');
+var_dump($rc->getDocComment(null));
+var_dump($rc->getDocComment('X'));
+var_dump($rc->getDocComment(true));
+var_dump($rc->getDocComment(array(1, 2, 3)));
+
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for ReflectionProperty::getDocComment() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::getDocComment() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::getDocComment() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for ReflectionProperty::getDocComment() in %s on line %d
+NULL
diff --git a/ext/reflection/tests/reflectionProperty_getModifiers_basic.phpt b/ext/reflection/tests/reflectionProperty_getModifiers_basic.phpt
new file mode 100644
index 000000000..907a7e7be
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_getModifiers_basic.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test ReflectionProperty::getModifiers() usage.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class C {
+ public $a1;
+ protected $a2;
+ private $a3;
+ static public $a4;
+ static protected $a5;
+ static private $a6;
+}
+
+class D extends C {
+ public $a1;
+ protected $a2;
+ private $a3;
+ static public $a4;
+ static protected $a5;
+ static private $a6;
+}
+
+for ($i = 1;$i <= 6;$i++) {
+ $rp = new ReflectionProperty("C", "a$i");
+ echo "C::a$i: ";
+ var_dump($rp->getModifiers());
+ $rp = new ReflectionProperty("D", "a$i");
+ echo "D::a$i: ";
+ var_dump($rp->getModifiers());
+}
+
+?>
+--EXPECTF--
+C::a1: int(256)
+D::a1: int(256)
+C::a2: int(512)
+D::a2: int(512)
+C::a3: int(1024)
+D::a3: int(3072)
+C::a4: int(257)
+D::a4: int(257)
+C::a5: int(513)
+D::a5: int(513)
+C::a6: int(1025)
+D::a6: int(3073) \ No newline at end of file
diff --git a/ext/reflection/tests/reflectionProperty_getValue_error.phpt b/ext/reflection/tests/reflectionProperty_getValue_error.phpt
new file mode 100644
index 000000000..acfc3b0a0
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_getValue_error.phpt
@@ -0,0 +1,83 @@
+--TEST--
+Test ReflectionProperty::getValue() errors.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public $pub;
+ public $pub2 = 5;
+ static public $stat = "static property";
+ protected $prot = 4;
+ private $priv = "keepOut";
+}
+
+class AnotherClass {
+}
+
+$instance = new TestClass();
+$instanceWithNoProperties = new AnotherClass();
+$propInfo = new ReflectionProperty('TestClass', 'pub2');
+
+echo "Too few args:\n";
+var_dump($propInfo->getValue());
+
+echo "\nToo many args:\n";
+var_dump($propInfo->getValue($instance, true));
+
+echo "\nWrong type of arg:\n";
+var_dump($propInfo->getValue(true));
+
+echo "\nInstance without property:\n";
+$propInfo = new ReflectionProperty('TestClass', 'stat');
+
+echo "\nStatic property / too many args:\n";
+var_dump($propInfo->getValue($instance, true));
+
+echo "\nStatic property / wrong type of arg:\n";
+var_dump($propInfo->getValue(true));
+
+echo "\nProtected property:\n";
+try {
+ $propInfo = new ReflectionProperty('TestClass', 'prot');
+ var_dump($propInfo->getValue($instance));
+}
+catch(Exception $exc) {
+ echo $exc->getMessage();
+}
+
+echo "\n\nInstance without property:\n";
+$propInfo = new ReflectionProperty('TestClass', 'pub2');
+var_dump($propInfo->getValue($instanceWithNoProperties));
+
+?>
+--EXPECTF--
+Too few args:
+
+Warning: ReflectionProperty::getValue() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Too many args:
+
+Warning: ReflectionProperty::getValue() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+
+Wrong type of arg:
+
+Warning: ReflectionProperty::getValue() expects parameter 1 to be object, boolean given in %s on line %d
+NULL
+
+Instance without property:
+
+Static property / too many args:
+string(15) "static property"
+
+Static property / wrong type of arg:
+string(15) "static property"
+
+Protected property:
+Cannot access non-public member TestClass::prot
+
+Instance without property:
+NULL
diff --git a/ext/reflection/tests/reflectionProperty_isDefault_basic.phpt b/ext/reflection/tests/reflectionProperty_isDefault_basic.phpt
new file mode 100644
index 000000000..57c3d0f3c
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_isDefault_basic.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Test ReflectionProperty::isDefault() usage.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function reflectProperty($class, $property) {
+ $propInfo = new ReflectionProperty($class, $property);
+ echo "**********************************\n";
+ echo "Reflecting on property $class::$property\n\n";
+ echo "isDefault():\n";
+ var_dump($propInfo->isDefault());
+ echo "\n**********************************\n";
+}
+
+class TestClass {
+ public $pub;
+ static public $stat = "static property";
+ protected $prot = 4;
+ private $priv = "keepOut";
+}
+
+reflectProperty("TestClass", "pub");
+reflectProperty("TestClass", "stat");
+reflectProperty("TestClass", "prot");
+reflectProperty("TestClass", "priv");
+
+echo "Wrong number of params:\n";
+$propInfo = new ReflectionProperty('TestClass', 'pub');
+$propInfo->isDefault(1);
+
+?>
+--EXPECTF--
+**********************************
+Reflecting on property TestClass::pub
+
+isDefault():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on property TestClass::stat
+
+isDefault():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on property TestClass::prot
+
+isDefault():
+bool(true)
+
+**********************************
+**********************************
+Reflecting on property TestClass::priv
+
+isDefault():
+bool(true)
+
+**********************************
+Wrong number of params:
+
+Warning: Wrong parameter count for ReflectionProperty::isDefault() in %s on line %d
diff --git a/ext/reflection/tests/reflectionProperty_setValue_error.phpt b/ext/reflection/tests/reflectionProperty_setValue_error.phpt
new file mode 100644
index 000000000..960778235
--- /dev/null
+++ b/ext/reflection/tests/reflectionProperty_setValue_error.phpt
@@ -0,0 +1,102 @@
+--TEST--
+Test ReflectionProperty::setValue() error cases.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+class TestClass {
+ public $pub;
+ public $pub2 = 5;
+ static public $stat = "static property";
+ protected $prot = 4;
+ private $priv = "keepOut";
+}
+
+class AnotherClass {
+}
+
+$instance = new TestClass();
+$instanceWithNoProperties = new AnotherClass();
+$propInfo = new ReflectionProperty('TestClass', 'pub2');
+
+echo "Too few args:\n";
+var_dump($propInfo->setValue());
+var_dump($propInfo->setValue($instance));
+
+echo "\nToo many args:\n";
+var_dump($propInfo->setValue($instance, "NewValue", true));
+
+echo "\nWrong type of arg:\n";
+var_dump($propInfo->setValue(true, "NewValue"));
+$propInfo = new ReflectionProperty('TestClass', 'stat');
+
+echo "\nStatic property / too many args:\n";
+var_dump($propInfo->setValue($instance, "NewValue", true));
+
+echo "\nStatic property / too few args:\n";
+var_dump($propInfo->setValue("A new value"));
+var_dump(TestClass::$stat);
+var_dump($propInfo->setValue());
+var_dump(TestClass::$stat);
+
+echo "\nStatic property / wrong type of arg:\n";
+var_dump($propInfo->setValue(true, "Another new value"));
+var_dump(TestClass::$stat);
+
+echo "\nProtected property:\n";
+try {
+ $propInfo = new ReflectionProperty('TestClass', 'prot');
+ var_dump($propInfo->setValue($instance, "NewValue"));
+}
+catch(Exception $exc) {
+ echo $exc->getMessage();
+}
+
+echo "\n\nInstance without property:\n";
+$propInfo = new ReflectionProperty('TestClass', 'pub2');
+var_dump($propInfo->setValue($instanceWithNoProperties, "NewValue"));
+var_dump($instanceWithNoProperties->pub2);
+?>
+--EXPECTF--
+Too few args:
+
+Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Too many args:
+
+Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 3 given in %s on line %d
+NULL
+
+Wrong type of arg:
+
+Warning: ReflectionProperty::setValue() expects parameter 1 to be object, boolean given in %s on line %d
+NULL
+
+Static property / too many args:
+
+Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 3 given in %s on line %d
+NULL
+
+Static property / too few args:
+NULL
+string(11) "A new value"
+
+Warning: ReflectionProperty::setValue() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+string(11) "A new value"
+
+Static property / wrong type of arg:
+NULL
+string(17) "Another new value"
+
+Protected property:
+Cannot access non-public member TestClass::prot
+
+Instance without property:
+NULL
+string(8) "NewValue"
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 3166b1577..290c0e286 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_files.c,v 1.100.2.3.2.10 2007/09/10 23:42:54 iliaa Exp $ */
+/* $Id: mod_files.c,v 1.100.2.3.2.11 2007/12/31 07:20:10 sebastian Exp $ */
#include "php.h"
diff --git a/ext/session/mod_files.h b/ext/session/mod_files.h
index 99ade933e..3fc0a3a01 100644
--- a/ext/session/mod_files.h
+++ b/ext/session/mod_files.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_files.h,v 1.11.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: mod_files.h,v 1.11.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef MOD_FILES_H
#define MOD_FILES_H
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index a8859cad4..b3f593d7f 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_mm.c,v 1.46.2.1.2.5 2007/02/27 03:28:16 iliaa Exp $ */
+/* $Id: mod_mm.c,v 1.46.2.1.2.6 2007/12/31 07:20:10 sebastian Exp $ */
#include "php.h"
diff --git a/ext/session/mod_mm.h b/ext/session/mod_mm.h
index 77ead68fb..98c44c18c 100644
--- a/ext/session/mod_mm.h
+++ b/ext/session/mod_mm.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_mm.h,v 1.12.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: mod_mm.h,v 1.12.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef MOD_MM_H
#define MOD_MM_H
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index 4c28a9cec..d344feef7 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_user.c,v 1.29.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: mod_user.c,v 1.29.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#include "php.h"
#include "php_session.h"
diff --git a/ext/session/mod_user.h b/ext/session/mod_user.h
index e535cc848..c7709c787 100644
--- a/ext/session/mod_user.h
+++ b/ext/session/mod_user.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_user.h,v 1.14.2.1.2.1 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: mod_user.h,v 1.14.2.1.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef MOD_USER_H
#define MOD_USER_H
diff --git a/ext/session/php_session.h b/ext/session/php_session.h
index 5ae237e74..8ff826036 100644
--- a/ext/session/php_session.h
+++ b/ext/session/php_session.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_session.h,v 1.101.2.2.2.5 2007/02/06 00:01:18 iliaa Exp $ */
+/* $Id: php_session.h,v 1.101.2.2.2.6 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_SESSION_H
#define PHP_SESSION_H
diff --git a/ext/session/session.c b/ext/session/session.c
index 9ec40f6e2..520c820f3 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.417.2.8.2.40 2007/08/03 01:16:40 stas Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.42 2008/04/29 14:42:38 scottmac Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -78,7 +78,7 @@ zend_function_entry session_functions[] = {
PHP_FE(session_get_cookie_params, NULL)
PHP_FE(session_write_close, NULL)
PHP_FALIAS(session_commit, session_write_close, NULL)
- {NULL, NULL, NULL}
+ {NULL, NULL, NULL}
};
/* }}} */
@@ -232,7 +232,7 @@ static ps_module *ps_modules[MAX_MODULES + 1] = {
#define IF_SESSION_VARS() \
if (PS(http_session_vars) && PS(http_session_vars)->type == IS_ARRAY)
-PHPAPI int php_session_register_serializer(const char *name,
+PHPAPI int php_session_register_serializer(const char *name,
int (*encode)(PS_SERIALIZER_ENCODE_ARGS),
int (*decode)(PS_SERIALIZER_DECODE_ARGS))
{
@@ -263,9 +263,9 @@ PHPAPI int php_session_register_module(ps_module *ptr)
ps_modules[i] = ptr;
ret = 0;
break;
- }
+ }
}
-
+
return ret;
}
@@ -316,7 +316,7 @@ PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
zval **sym_track = NULL;
IF_SESSION_VARS() {
- zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen + 1,
+ zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen + 1,
(void *) &sym_track);
} else {
return;
@@ -328,8 +328,8 @@ PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
if (PG(register_globals)) {
zval **sym_global = NULL;
-
- if (zend_hash_find(&EG(symbol_table), name, namelen + 1, (void *) &sym_global) == SUCCESS) {
+
+ if (zend_hash_find(&EG(symbol_table), name, namelen + 1, (void *) &sym_global) == SUCCESS) {
if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) {
return;
}
@@ -352,7 +352,7 @@ PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
} else {
if (sym_track == NULL) {
zval *empty_var;
-
+
ALLOC_INIT_ZVAL(empty_var);
ZEND_SET_SYMBOL_WITH_LENGTH(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1, empty_var, 1, 0);
}
@@ -363,12 +363,12 @@ PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, php
{
if (PG(register_globals)) {
zval **old_symbol;
- if (zend_hash_find(&EG(symbol_table),name,namelen+1,(void *)&old_symbol) == SUCCESS) {
+ if (zend_hash_find(&EG(symbol_table),name,namelen+1,(void *)&old_symbol) == SUCCESS) {
if ((Z_TYPE_PP(old_symbol) == IS_ARRAY && Z_ARRVAL_PP(old_symbol) == &EG(symbol_table)) || *old_symbol == PS(http_session_vars)) {
return;
}
- /*
+ /*
* A global symbol with the same name exists already. That
* symbol might have been created by other means (e.g. $_GET).
*
@@ -380,12 +380,12 @@ PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, php
* session-vars won't work because of this very reason!
*/
-
+
REPLACE_ZVAL_VALUE(old_symbol,state_val,1);
/*
* The following line will update the reference table used for
- * unserialization. It is optional, because some storage
+ * unserialization. It is optional, because some storage
* formats may not be able to represent references.
*/
@@ -407,7 +407,7 @@ PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var TSR
int ret = FAILURE;
IF_SESSION_VARS() {
- ret = zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name,
+ ret = zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name,
namelen+1, (void **) state_var);
/*
@@ -417,8 +417,8 @@ PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var TSR
* if the global var exists, then
* we prefer the same key in the global sym table
*/
-
- if (PG(register_globals) && ret == SUCCESS
+
+ if (PG(register_globals) && ret == SUCCESS
&& Z_TYPE_PP(*state_var) == IS_NULL) {
zval **tmp;
@@ -428,7 +428,7 @@ PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var TSR
}
}
}
-
+
return ret;
}
@@ -448,14 +448,14 @@ PS_SERIALIZER_ENCODE_FUNC(php_binary)
if (key_length > PS_BIN_MAX) continue;
smart_str_appendc(&buf, (unsigned char) key_length);
smart_str_appendl(&buf, key, key_length);
-
+
php_var_serialize(&buf, struc, &var_hash TSRMLS_CC);
} else {
if (key_length > PS_BIN_MAX) continue;
smart_str_appendc(&buf, (unsigned char) (key_length & PS_BIN_UNDEF));
smart_str_appendl(&buf, key, key_length);
);
-
+
if (newlen) *newlen = buf.len;
*newstr = buf.c;
PHP_VAR_SERIALIZE_DESTROY(var_hash);
@@ -527,18 +527,18 @@ PS_SERIALIZER_ENCODE_FUNC(php)
smart_str_appendl(&buf, key, key_length);
if (memchr(key, PS_DELIMITER, key_length)) {
PHP_VAR_SERIALIZE_DESTROY(var_hash);
- smart_str_free(&buf);
+ smart_str_free(&buf);
return FAILURE;
}
smart_str_appendc(&buf, PS_DELIMITER);
-
+
php_var_serialize(&buf, struc, &var_hash TSRMLS_CC);
} else {
smart_str_appendc(&buf, PS_UNDEF_MARKER);
smart_str_appendl(&buf, key, key_length);
smart_str_appendc(&buf, PS_DELIMITER);
);
-
+
if (newlen) *newlen = buf.len;
*newstr = buf.c;
@@ -546,7 +546,7 @@ PS_SERIALIZER_ENCODE_FUNC(php)
return SUCCESS;
}
-PS_SERIALIZER_DECODE_FUNC(php)
+PS_SERIALIZER_DECODE_FUNC(php)
{
const char *p, *q;
char *name;
@@ -565,14 +565,14 @@ PS_SERIALIZER_DECODE_FUNC(php)
q = p;
while (*q != PS_DELIMITER)
if (++q >= endptr) goto break_outer_loop;
-
+
if (p[0] == PS_UNDEF_MARKER) {
p++;
has_value = 0;
} else {
has_value = 1;
}
-
+
namelen = q - p;
name = estrndup(p, namelen);
q++;
@@ -596,7 +596,7 @@ skip:
p = q;
}
break_outer_loop:
-
+
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
return SUCCESS;
@@ -605,7 +605,7 @@ break_outer_loop:
static void php_session_track_init(TSRMLS_D)
{
zval *session_vars = NULL;
-
+
/* Unconditionally destroy existing arrays -- possible dirty data */
zend_delete_global_variable("HTTP_SESSION_VARS", sizeof("HTTP_SESSION_VARS")-1 TSRMLS_CC);
zend_delete_global_variable("_SESSION", sizeof("_SESSION")-1 TSRMLS_CC);
@@ -617,7 +617,7 @@ static void php_session_track_init(TSRMLS_D)
MAKE_STD_ZVAL(session_vars);
array_init(session_vars);
PS(http_session_vars) = session_vars;
-
+
if (PG(register_long_arrays)) {
ZEND_SET_GLOBAL_VAR_WITH_LENGTH("HTTP_SESSION_VARS", sizeof("HTTP_SESSION_VARS"), PS(http_session_vars), 3, 1);
ZEND_SET_GLOBAL_VAR_WITH_LENGTH("_SESSION", sizeof("_SESSION"), PS(http_session_vars), 3, 1);
@@ -678,14 +678,14 @@ static char *bin_to_readable(char *in, size_t inlen, char *out, char nbits)
unsigned short w;
int mask;
int have;
-
+
p = (unsigned char *) in;
q = (unsigned char *)in + inlen;
w = 0;
have = 0;
mask = (1 << nbits) - 1;
-
+
while (1) {
if (have < nbits) {
if (p < q) {
@@ -704,7 +704,7 @@ static char *bin_to_readable(char *in, size_t inlen, char *out, char nbits)
w >>= nbits;
have -= nbits;
}
-
+
*out = '\0';
return out;
}
@@ -723,7 +723,7 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS)
char *remote_addr = NULL;
gettimeofday(&tv, NULL);
-
+
if (zend_hash_find(&EG(symbol_table), "_SERVER",
sizeof("_SERVER"), (void **) &array) == SUCCESS &&
Z_TYPE_PP(array) == IS_ARRAY &&
@@ -732,8 +732,8 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS)
remote_addr = Z_STRVAL_PP(token);
}
- /* maximum 15+19+19+10 bytes */
- spprintf(&buf, 0, "%.15s%ld%ld%0.8F", remote_addr ? remote_addr : "",
+ /* maximum 15+19+19+10 bytes */
+ spprintf(&buf, 0, "%.15s%ld%ld%0.8F", remote_addr ? remote_addr : "",
tv.tv_sec, (long int)tv.tv_usec, php_combined_lcg(TSRMLS_C) * 10);
switch (PS(hash_func)) {
@@ -761,11 +761,11 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS)
unsigned char rbuf[2048];
int n;
int to_read = PS(entropy_length);
-
+
while (to_read > 0) {
n = read(fd, rbuf, MIN(to_read, sizeof(rbuf)));
if (n <= 0) break;
-
+
switch (PS(hash_func)) {
case PS_HASH_FUNC_MD5:
PHP_MD5Update(&md5_context, rbuf, n);
@@ -796,8 +796,8 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The ini setting hash_bits_per_character is out of range (should be 4, 5, or 6) - using 4 for now");
}
j = (int) (bin_to_readable((char *)digest, digest_len, buf, PS(hash_bits_per_character)) - buf);
-
- if (newlen)
+
+ if (newlen)
*newlen = j;
return buf;
}
@@ -823,7 +823,7 @@ static void php_session_initialize(TSRMLS_D)
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path));
return;
}
-
+
/* If there is no ID, use session module to create one */
if (!PS(id)) {
new_session:
@@ -832,7 +832,7 @@ new_session:
PS(send_cookie) = 1;
}
}
-
+
/* Read data */
/* Question: if you create a SID here, should you also try to read data?
* I'm not sure, but while not doing so will remove one session operation
@@ -860,15 +860,15 @@ static int migrate_global(HashTable *ht, HashPosition *pos TSRMLS_DC)
int n;
zval **val;
int ret = 0;
-
+
n = zend_hash_get_current_key_ex(ht, &str, &str_len, &num_key, 0, pos);
switch (n) {
case HASH_KEY_IS_STRING:
- if (zend_hash_find(&EG(symbol_table), str, str_len,
- (void **) &val) == SUCCESS
+ if (zend_hash_find(&EG(symbol_table), str, str_len,
+ (void **) &val) == SUCCESS
&& val && Z_TYPE_PP(val) != IS_NULL) {
- ZEND_SET_SYMBOL_WITH_LENGTH(ht, str, str_len, *val,
+ ZEND_SET_SYMBOL_WITH_LENGTH(ht, str, str_len, *val,
(*val)->refcount + 1 , 1);
ret = 1;
}
@@ -879,14 +879,14 @@ static int migrate_global(HashTable *ht, HashPosition *pos TSRMLS_DC)
"numeric nature.", num_key);
break;
}
-
+
return ret;
}
static void php_session_save_current_state(TSRMLS_D)
{
int ret = FAILURE;
-
+
IF_SESSION_VARS() {
if (PS(bug_compat) && !PG(register_globals)) {
HashTable *ht = Z_ARRVAL_P(PS(http_session_vars));
@@ -896,7 +896,7 @@ static void php_session_save_current_state(TSRMLS_D)
zend_hash_internal_pointer_reset_ex(ht, &pos);
- while (zend_hash_get_current_data_ex(ht,
+ while (zend_hash_get_current_data_ex(ht,
(void **) &val, &pos) != FAILURE) {
if (Z_TYPE_PP(val) == IS_NULL) {
if (migrate_global(ht, &pos TSRMLS_CC))
@@ -930,7 +930,7 @@ static void php_session_save_current_state(TSRMLS_D)
PS(mod)->s_name,
PS(save_path));
}
-
+
if (PS(mod_data))
PS(mod)->s_close(&PS(mod_data) TSRMLS_CC);
}
@@ -949,18 +949,18 @@ static void strcpy_gmt(char *ubuf, time_t *when)
char buf[MAX_STR];
struct tm tm, *res;
int n;
-
+
res = php_gmtime_r(when, &tm);
if (!res) {
buf[0] = '\0';
return;
}
-
+
n = slprintf(buf, sizeof(buf), "%s, %02d %s %d %02d:%02d:%02d GMT", /* SAFE */
- week_days[tm.tm_wday], tm.tm_mday,
- month_names[tm.tm_mon], tm.tm_year + 1900,
- tm.tm_hour, tm.tm_min,
+ week_days[tm.tm_wday], tm.tm_mday,
+ month_names[tm.tm_mon], tm.tm_year + 1900,
+ tm.tm_hour, tm.tm_min,
tm.tm_sec);
memcpy(ubuf, buf, n);
ubuf[n] = '\0';
@@ -971,7 +971,7 @@ static void last_modified(TSRMLS_D)
const char *path;
struct stat sb;
char buf[MAX_STR + 1];
-
+
path = SG(request_info).path_translated;
if (path) {
if (VCWD_STAT(path, &sb) == -1) {
@@ -994,24 +994,24 @@ CACHE_LIMITER_FUNC(public)
char buf[MAX_STR + 1];
struct timeval tv;
time_t now;
-
+
gettimeofday(&tv, NULL);
now = tv.tv_sec + PS(cache_expire) * 60;
#define EXPIRES "Expires: "
memcpy(buf, EXPIRES, sizeof(EXPIRES) - 1);
strcpy_gmt(buf + sizeof(EXPIRES) - 1, &now);
ADD_HEADER(buf);
-
+
snprintf(buf, sizeof(buf) , "Cache-Control: public, max-age=%ld", PS(cache_expire) * 60); /* SAFE */
ADD_HEADER(buf);
-
+
last_modified(TSRMLS_C);
}
CACHE_LIMITER_FUNC(private_no_expire)
{
char buf[MAX_STR + 1];
-
+
snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=%ld, pre-check=%ld", PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */
ADD_HEADER(buf);
@@ -1046,7 +1046,7 @@ static int php_session_cache_limiter(TSRMLS_D)
php_session_cache_limiter_t *lim;
if (PS(cache_limiter)[0] == '\0') return 0;
-
+
if (SG(headers_sent)) {
char *output_start_filename = php_get_output_start_filename(TSRMLS_C);
int output_start_lineno = php_get_output_start_lineno(TSRMLS_C);
@@ -1056,10 +1056,10 @@ static int php_session_cache_limiter(TSRMLS_D)
output_start_filename, output_start_lineno);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot send session cache limiter - headers already sent");
- }
+ }
return -2;
}
-
+
for (lim = php_session_cache_limiters; lim->name; lim++) {
if (!strcasecmp(lim->name, PS(cache_limiter))) {
lim->func(TSRMLS_C);
@@ -1092,10 +1092,10 @@ static void php_session_send_cookie(TSRMLS_D)
output_start_filename, output_start_lineno);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot send session cookie - headers already sent");
- }
+ }
return;
}
-
+
/* URL encode session_name and id because they might be user supplied */
e_session_name = php_url_encode(PS(session_name), strlen(PS(session_name)), NULL);
e_id = php_url_encode(PS(id), strlen(PS(id)), NULL);
@@ -1104,17 +1104,17 @@ static void php_session_send_cookie(TSRMLS_D)
smart_str_appends(&ncookie, e_session_name);
smart_str_appendc(&ncookie, '=');
smart_str_appends(&ncookie, e_id);
-
+
efree(e_session_name);
efree(e_id);
-
+
if (PS(cookie_lifetime) > 0) {
struct timeval tv;
time_t t;
-
+
gettimeofday(&tv, NULL);
t = tv.tv_sec + PS(cookie_lifetime);
-
+
if (t > 0) {
date_fmt = php_std_date(t TSRMLS_CC);
smart_str_appends(&ncookie, COOKIE_EXPIRES);
@@ -1127,7 +1127,7 @@ static void php_session_send_cookie(TSRMLS_D)
smart_str_appends(&ncookie, COOKIE_PATH);
smart_str_appends(&ncookie, PS(cookie_path));
}
-
+
if (PS(cookie_domain)[0]) {
smart_str_appends(&ncookie, COOKIE_DOMAIN);
smart_str_appends(&ncookie, PS(cookie_domain));
@@ -1142,7 +1142,7 @@ static void php_session_send_cookie(TSRMLS_D)
}
smart_str_0(&ncookie);
-
+
/* 'replace' must be 0 here, else a previous Set-Cookie
header, probably sent with setcookie() will be replaced! */
sapi_add_header_ex(ncookie.c, ncookie.len, 0, 0 TSRMLS_CC);
@@ -1159,7 +1159,7 @@ PHPAPI ps_module *_php_find_ps_module(char *name TSRMLS_DC)
ret = *mod;
break;
}
-
+
return ret;
}
@@ -1184,7 +1184,7 @@ PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC)
static void php_session_reset_id(TSRMLS_D)
{
int module_number = PS(module_number);
-
+
if (PS(use_cookies) && PS(send_cookie)) {
php_session_send_cookie(TSRMLS_C);
PS(send_cookie) = 0;
@@ -1192,7 +1192,7 @@ static void php_session_reset_id(TSRMLS_D)
/* if the SID constant exists, destroy it. */
zend_hash_del(EG(zend_constants), "sid", sizeof("sid"));
-
+
if (PS(define_sid)) {
smart_str var = {0};
@@ -1210,7 +1210,7 @@ static void php_session_reset_id(TSRMLS_D)
php_url_scanner_add_var(PS(session_name), strlen(PS(session_name)), PS(id), strlen(PS(id)), 1 TSRMLS_CC);
}
}
-
+
PHPAPI void php_session_start(TSRMLS_D)
{
zval **ppid;
@@ -1226,8 +1226,8 @@ PHPAPI void php_session_start(TSRMLS_D)
char *value;
value = zend_ini_string("session.save_handler", sizeof("session.save_handler"), 0);
-
- if (value) {
+
+ if (value) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot find save handler %s", value);
}
else {
@@ -1235,7 +1235,7 @@ PHPAPI void php_session_start(TSRMLS_D)
}
return;
}
-
+
php_error(E_NOTICE, "A session had already been started - ignoring session_start()");
return;
} else {
@@ -1244,11 +1244,11 @@ PHPAPI void php_session_start(TSRMLS_D)
}
lensess = strlen(PS(session_name));
-
+
/*
* Cookies are preferred, because initially
- * cookie and get variables will be available.
+ * cookie and get variables will be available.
*/
if (!PS(id)) {
@@ -1306,7 +1306,7 @@ PHPAPI void php_session_start(TSRMLS_D)
/* check whether the current request was referred to by
an external site which invalidates the previously found id */
-
+
if (PS(id) &&
PS(extern_referer_chk)[0] != '\0' &&
PG(http_globals)[TRACK_VARS_SERVER] &&
@@ -1321,9 +1321,9 @@ PHPAPI void php_session_start(TSRMLS_D)
if (PS(use_trans_sid))
PS(apply_trans_sid) = 1;
}
-
+
php_session_initialize(TSRMLS_C);
-
+
if (!PS(use_cookies) && PS(send_cookie)) {
if (PS(use_trans_sid))
PS(apply_trans_sid) = 1;
@@ -1331,7 +1331,7 @@ PHPAPI void php_session_start(TSRMLS_D)
}
php_session_reset_id(TSRMLS_C);
-
+
PS(session_status) = php_session_active;
php_session_cache_limiter(TSRMLS_C);
@@ -1363,7 +1363,7 @@ static int php_session_destroy(TSRMLS_D)
retval = FAILURE;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Session object destruction failed");
}
-
+
php_rshutdown_session_globals(TSRMLS_C);
php_rinit_session_globals(TSRMLS_C);
@@ -1408,7 +1408,7 @@ PHP_FUNCTION(session_set_cookie_params)
/* }}} */
/* {{{ proto array session_get_cookie_params(void)
- Return the session cookie parameters */
+ Return the session cookie parameters */
PHP_FUNCTION(session_get_cookie_params)
{
if (ZEND_NUM_ARGS() != 0) {
@@ -1435,14 +1435,14 @@ PHP_FUNCTION(session_name)
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
WRONG_PARAM_COUNT;
-
+
old = estrdup(PS(session_name));
if (ac == 1) {
convert_to_string_ex(p_name);
zend_alter_ini_entry("session.name", sizeof("session.name"), Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name), PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
}
-
+
RETVAL_STRING(old, 0);
}
/* }}} */
@@ -1464,7 +1464,7 @@ PHP_FUNCTION(session_module_name)
} else {
RETVAL_EMPTY_STRING();
}
-
+
if (ac == 1) {
convert_to_string_ex(p_name);
if (!_php_find_ps_module(Z_STRVAL_PP(p_name) TSRMLS_CC)) {
@@ -1494,10 +1494,10 @@ PHP_FUNCTION(session_set_save_handler)
if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) == FAILURE)
WRONG_PARAM_COUNT;
-
- if (PS(session_status) != php_session_none)
+
+ if (PS(session_status) != php_session_none)
RETURN_FALSE;
-
+
for (i = 0; i < 6; i++) {
if (!zend_is_callable(*args[i], 0, &name)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument %d is not a valid callback", i+1);
@@ -1506,18 +1506,18 @@ PHP_FUNCTION(session_set_save_handler)
}
efree(name);
}
-
+
zend_alter_ini_entry("session.save_handler", sizeof("session.save_handler"), "user", sizeof("user")-1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
mdata = emalloc(sizeof(*mdata));
-
+
for (i = 0; i < 6; i++) {
ZVAL_ADDREF(*args[i]);
mdata->names[i] = *args[i];
}
PS(mod_data) = (void *) mdata;
-
+
RETURN_TRUE;
}
/* }}} */
@@ -1532,14 +1532,14 @@ PHP_FUNCTION(session_save_path)
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
WRONG_PARAM_COUNT;
-
+
old = estrdup(PS(save_path));
if (ac == 1) {
convert_to_string_ex(p_name);
zend_alter_ini_entry("session.save_path", sizeof("session.save_path"), Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name), PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
}
-
+
RETVAL_STRING(old, 0);
}
/* }}} */
@@ -1566,7 +1566,7 @@ PHP_FUNCTION(session_id)
if (PS(id)) efree(PS(id));
PS(id) = estrndup(Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name));
}
-
+
RETVAL_STRING(old, 0);
}
/* }}} */
@@ -1595,12 +1595,12 @@ PHP_FUNCTION(session_regenerate_id)
efree(PS(id));
PS(id) = NULL;
}
-
+
PS(id) = PS(mod)->s_create_sid(&PS(mod_data), NULL TSRMLS_CC);
PS(send_cookie) = 1;
php_session_reset_id(TSRMLS_C);
-
+
RETURN_TRUE;
}
RETURN_FALSE;
@@ -1617,14 +1617,14 @@ PHP_FUNCTION(session_cache_limiter)
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_cache_limiter) == FAILURE)
WRONG_PARAM_COUNT;
-
+
old = estrdup(PS(cache_limiter));
if (ac == 1) {
convert_to_string_ex(p_cache_limiter);
zend_alter_ini_entry("session.cache_limiter", sizeof("session.cache_limiter"), Z_STRVAL_PP(p_cache_limiter), Z_STRLEN_PP(p_cache_limiter), PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
}
-
+
RETVAL_STRING(old, 0);
}
/* }}} */
@@ -1655,14 +1655,21 @@ PHP_FUNCTION(session_cache_expire)
static void php_register_var(zval** entry TSRMLS_DC)
{
zval **value;
-
+
if (Z_TYPE_PP(entry) == IS_ARRAY) {
+ if (Z_ARRVAL_PP(entry)->nApplyCount > 1) {
+ return;
+ }
+
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(entry));
+ Z_ARRVAL_PP(entry)->nApplyCount++;
while (zend_hash_get_current_data(Z_ARRVAL_PP(entry), (void**)&value) == SUCCESS) {
php_register_var(value TSRMLS_CC);
zend_hash_move_forward(Z_ARRVAL_PP(entry));
}
+
+ Z_ARRVAL_PP(entry)->nApplyCount--;
} else {
convert_to_string_ex(entry);
@@ -1686,7 +1693,7 @@ PHP_FUNCTION(session_register)
RETURN_FALSE
else
args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
-
+
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
@@ -1695,20 +1702,20 @@ PHP_FUNCTION(session_register)
if (PS(session_status) == php_session_none || PS(session_status) == php_session_disabled) {
php_session_start(TSRMLS_C);
}
-
+
if (PS(session_status) == php_session_disabled) {
efree(args);
RETURN_FALSE;
}
-
+
for (i = 0; i < argc; i++) {
if (Z_TYPE_PP(args[i]) == IS_ARRAY)
SEPARATE_ZVAL(args[i]);
php_register_var(args[i] TSRMLS_CC);
- }
-
+ }
+
efree(args);
-
+
RETURN_TRUE;
}
/* }}} */
@@ -1722,9 +1729,9 @@ PHP_FUNCTION(session_unregister)
if (ac != 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
WRONG_PARAM_COUNT;
-
+
convert_to_string_ex(p_name);
-
+
PS_DEL_VARL(Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name));
RETURN_TRUE;
@@ -1741,15 +1748,15 @@ PHP_FUNCTION(session_is_registered)
if (ac != 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
WRONG_PARAM_COUNT;
-
+
convert_to_string_ex(p_name);
-
+
if (PS(session_status) == php_session_none)
RETURN_FALSE;
IF_SESSION_VARS() {
- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)),
- Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name)+1,
+ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)),
+ Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name)+1,
(void **)&p_var) == SUCCESS) {
RETURN_TRUE;
}
@@ -1773,7 +1780,7 @@ PHP_FUNCTION(session_encode)
if (enc == NULL) {
RETURN_FALSE;
}
-
+
RETVAL_STRINGL(enc, len, 0);
}
/* }}} */
@@ -1795,7 +1802,7 @@ PHP_FUNCTION(session_decode)
convert_to_string_ex(str);
php_session_decode(Z_STRVAL_PP(str), Z_STRLEN_PP(str) TSRMLS_CC);
-
+
RETURN_TRUE;
}
/* }}} */
@@ -1842,16 +1849,16 @@ PHP_FUNCTION(session_unset)
char *str;
ulong num_key;
HashPosition pos;
-
+
zend_hash_internal_pointer_reset_ex(ht, &pos);
- while (zend_hash_get_current_key_ex(ht, &str, &str_len, &num_key,
+ while (zend_hash_get_current_key_ex(ht, &str, &str_len, &num_key,
0, &pos) == HASH_KEY_IS_STRING) {
zend_delete_global_variable(str, str_len-1 TSRMLS_CC);
zend_hash_move_forward_ex(ht, &pos);
}
}
-
+
/* Clean $_SESSION. */
zend_hash_clean(ht);
}
@@ -1866,7 +1873,7 @@ PHPAPI void session_adapt_url(const char *url, size_t urllen, char **new, size_t
}
static void php_rinit_session_globals(TSRMLS_D)
-{
+{
PS(id) = NULL;
PS(session_status) = php_session_none;
PS(mod_data) = NULL;
@@ -1990,7 +1997,7 @@ PHP_MINFO_FUNCTION(session)
smart_str save_handlers = {0};
smart_str ser_handlers = {0};
int i;
-
+
/* Get save handlers */
for (i = 0, mod = ps_modules; i < MAX_MODULES; i++, mod++) {
if (*mod && (*mod)->s_name) {
@@ -2006,7 +2013,7 @@ PHP_MINFO_FUNCTION(session)
smart_str_appendc(&ser_handlers, ' ');
}
}
-
+
php_info_print_table_start();
php_info_print_table_row(2, "Session Support", "enabled" );
diff --git a/ext/session/tests/023.phpt b/ext/session/tests/023.phpt
new file mode 100644
index 000000000..42b1e5b1b
--- /dev/null
+++ b/ext/session/tests/023.phpt
@@ -0,0 +1,46 @@
+--TEST--
+session object deserialization
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+session.serialize_handler=php
+session.save_handler=files
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+class foo {
+ public $bar = "ok";
+ function method() { $this->yes++; }
+}
+
+session_id("abtest");
+session_start();
+session_decode('baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}');
+$baz = $_SESSION['baz'];
+$arr = $_SESSION['arr'];
+
+$baz->method();
+$arr[3]->method();
+
+var_dump($baz);
+var_dump($arr);
+session_destroy();
+--EXPECT--
+object(foo)#1 (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(2)
+}
+array(1) {
+ [3]=>
+ object(foo)#2 (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(2)
+ }
+}
diff --git a/ext/session/tests/024.phpt b/ext/session/tests/024.phpt
new file mode 100644
index 000000000..2ad26067a
--- /dev/null
+++ b/ext/session/tests/024.phpt
@@ -0,0 +1,114 @@
+--TEST--
+session_set_save_handler test
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+session.name=PHPSESSID
+session.serialize_handler=php
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+class handler {
+ public $data = 'baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}';
+
+ function open($save_path, $session_name)
+ {
+ print "OPEN: $session_name\n";
+ return true;
+ }
+ function close()
+ {
+ return true;
+ }
+ function read($key)
+ {
+ print "READ: $key\n";
+ return $GLOBALS["hnd"]->data;
+ }
+
+ function write($key, $val)
+ {
+ print "WRITE: $key, $val\n";
+ $GLOBALS["hnd"]->data = $val;
+ return true;
+ }
+
+ function destroy($key)
+ {
+ print "DESTROY: $key\n";
+ return true;
+ }
+
+ function gc() { return true; }
+}
+
+$hnd = new handler;
+
+class foo {
+ public $bar = "ok";
+ function method() { $this->yes++; }
+}
+
+session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc"));
+
+session_id("abtest");
+session_start();
+
+$baz = $_SESSION['baz'];
+$arr = $_SESSION['arr'];
+$baz->method();
+$arr[3]->method();
+
+var_dump($baz);
+var_dump($arr);
+
+session_write_close();
+
+session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc"));
+session_start();
+
+var_dump($baz);
+var_dump($arr);
+
+session_destroy();
+?>
+--EXPECTF--
+OPEN: PHPSESSID
+READ: abtest
+object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(2)
+}
+array(1) {
+ [3]=>
+ object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(2)
+ }
+}
+WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}}
+OPEN: PHPSESSID
+READ: abtest
+object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(2)
+}
+array(1) {
+ [3]=>
+ object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(2)
+ }
+}
+DESTROY: abtest
diff --git a/ext/session/tests/025.phpt b/ext/session/tests/025.phpt
new file mode 100644
index 000000000..4fd095f81
--- /dev/null
+++ b/ext/session/tests/025.phpt
@@ -0,0 +1,159 @@
+--TEST--
+custom save handler, multiple session_start()s, complex data structure test.
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+session.name=PHPSESSID
+session.serialize_handler=php
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class handler {
+ public $data = 'baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}';
+
+ function open($save_path, $session_name)
+ {
+ print "OPEN: $session_name\n";
+ return true;
+ }
+ function close()
+ {
+ print "CLOSE\n";
+ return true;
+ }
+ function read($key)
+ {
+ print "READ: $key\n";
+ return $GLOBALS["hnd"]->data;
+ }
+
+ function write($key, $val)
+ {
+ print "WRITE: $key, $val\n";
+ $GLOBALS["hnd"]->data = $val;
+ return true;
+ }
+
+ function destroy($key)
+ {
+ print "DESTROY: $key\n";
+ return true;
+ }
+
+ function gc() { return true; }
+
+ function __construct()
+ {
+ if (ini_get("unicode.semantics")) {
+ $this->data = str_replace('s:', 'U:', $this->data);
+ }
+ }
+}
+
+$hnd = new handler;
+
+class foo {
+ public $bar = "ok";
+ function method() { $this->yes++; }
+}
+
+session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc"));
+
+session_id("abtest");
+session_start();
+$baz = $_SESSION['baz'];
+$arr = $_SESSION['arr'];
+$baz->method();
+$arr[3]->method();
+
+var_dump($baz);
+var_dump($arr);
+
+session_write_close();
+
+session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc"));
+session_start();
+$baz = $_SESSION['baz'];
+$arr = $_SESSION['arr'];
+
+
+$baz->method();
+$arr[3]->method();
+
+
+$c = 123;
+$_SESSION['c'] = $c;
+var_dump($baz); var_dump($arr); var_dump($c);
+
+session_write_close();
+
+session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc"));
+session_start();
+var_dump($baz); var_dump($arr); var_dump($c);
+
+session_destroy();
+?>
+--EXPECTF--
+OPEN: PHPSESSID
+READ: abtest
+object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(2)
+}
+array(1) {
+ [3]=>
+ object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(2)
+ }
+}
+WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}}
+CLOSE
+OPEN: PHPSESSID
+READ: abtest
+object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(3)
+}
+array(1) {
+ [3]=>
+ object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(3)
+ }
+}
+int(123)
+WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123;
+CLOSE
+OPEN: PHPSESSID
+READ: abtest
+object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(3)
+}
+array(1) {
+ [3]=>
+ object(foo)#%d (2) {
+ ["bar"]=>
+ string(2) "ok"
+ ["yes"]=>
+ int(3)
+ }
+}
+int(123)
+DESTROY: abtest
+CLOSE
diff --git a/ext/session/tests/026.phpt b/ext/session/tests/026.phpt
new file mode 100644
index 000000000..06c135d04
--- /dev/null
+++ b/ext/session/tests/026.phpt
@@ -0,0 +1,71 @@
+--TEST--
+correct instantiation of references between variables in sessions
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+session.serialize_handler=php
+session.save_handler=files
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+session_id("abtest");
+session_start();
+
+class a {
+ public $test = "hallo";
+}
+
+class b {
+ public $a;
+ function b(&$a) {
+ $this->a = &$a;
+ }
+}
+
+$a = new a();
+$b = new b($a);
+
+echo "original values:\n";
+var_dump($a,$b);
+
+$_SESSION['a'] = $a;
+$_SESSION['b'] = $b;
+
+session_write_close();
+unset($_SESSION['a']);
+unset($_SESSION['b']);
+
+session_start();
+$a = $_SESSION['a'];
+$b = $_SESSION['b'];
+echo "values after session:\n";
+var_dump($a,$b);
+?>
+--EXPECTF--
+original values:
+object(a)#%d (1) {
+ ["test"]=>
+ string(5) "hallo"
+}
+object(b)#%d (1) {
+ ["a"]=>
+ &object(a)#%d (1) {
+ ["test"]=>
+ string(5) "hallo"
+ }
+}
+values after session:
+object(a)#%d (1) {
+ ["test"]=>
+ string(5) "hallo"
+}
+object(b)#%d (1) {
+ ["a"]=>
+ &object(a)#%d (1) {
+ ["test"]=>
+ string(5) "hallo"
+ }
+}
diff --git a/ext/session/tests/027.phpt b/ext/session/tests/027.phpt
new file mode 100644
index 000000000..600a992f7
--- /dev/null
+++ b/ext/session/tests/027.phpt
@@ -0,0 +1,55 @@
+--TEST--
+unset($_SESSION["name"]); should work
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+session.serialize_handler=php
+session.save_handler=files
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+session_id("abtest");
+
+### Phase 1 cleanup
+session_start();
+session_destroy();
+
+### Phase 2 $_SESSION["c"] does not contain any value
+session_id("abtest");
+session_start();
+var_dump($_SESSION);
+$_SESSION["name"] = "foo";
+var_dump($_SESSION);
+session_write_close();
+
+### Phase 3 $_SESSION["c"] is set
+session_start();
+var_dump($_SESSION);
+unset($_SESSION["name"]);
+var_dump($_SESSION);
+session_write_close();
+
+### Phase 4 final
+
+session_start();
+var_dump($_SESSION);
+session_destroy();
+?>
+--EXPECT--
+array(0) {
+}
+array(1) {
+ ["name"]=>
+ string(3) "foo"
+}
+array(1) {
+ ["name"]=>
+ string(3) "foo"
+}
+array(0) {
+}
+array(0) {
+}
diff --git a/ext/session/tests/028.phpt b/ext/session/tests/028.phpt
new file mode 100644
index 000000000..79638d283
--- /dev/null
+++ b/ext/session/tests/028.phpt
@@ -0,0 +1,16 @@
+--TEST--
+$session_array = explode(";", session_encode()); should not segfault
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+$session_array = explode(";", @session_encode());
+print "I live\n";
+?>
+--EXPECT--
+I live
diff --git a/ext/session/tests/029.phpt b/ext/session/tests/029.phpt
new file mode 100644
index 000000000..ff1adbaec
--- /dev/null
+++ b/ext/session/tests/029.phpt
@@ -0,0 +1,17 @@
+--TEST--
+session_decode(); should not segfault
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+@session_decode("garbage data and no session started");
+@session_decode("userid|s:5:\"mazen\";chatRoom|s:1:\"1\";");
+print "I live\n";
+?>
+--EXPECT--
+I live
diff --git a/ext/session/tests/030.phpt b/ext/session/tests/030.phpt
new file mode 100644
index 000000000..8d0f284b1
--- /dev/null
+++ b/ext/session/tests/030.phpt
@@ -0,0 +1,24 @@
+--TEST--
+redefining SID should not cause warnings
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+session.serialize_handler=php
+session.save_handler=files
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+session_id("abtest");
+session_start();
+session_destroy();
+session_id("abtest2");
+session_start();
+session_destroy();
+
+print "I live\n";
+?>
+--EXPECT--
+I live
diff --git a/ext/session/tests/save_handler.inc b/ext/session/tests/save_handler.inc
new file mode 100644
index 000000000..ebe9cac56
--- /dev/null
+++ b/ext/session/tests/save_handler.inc
@@ -0,0 +1,63 @@
+<?php
+
+DEFINE("SESSION_FILE_PREFIX" ,"session_test_");
+function open($save_path, $session_name) {
+ global $session_save_path, $name;
+ $session_save_path = $save_path;
+ $name = $session_name;
+ echo "Open [${session_save_path},${session_name}]\n";
+ return true;
+}
+
+function close() {
+ global $session_save_path, $name;
+ echo "Close [${session_save_path},${name}]\n";
+ return true;
+}
+
+function read($id) {
+ global $session_save_path, $name, $session_id;
+ $session_id = $id;
+ echo "Read [${session_save_path},${id}]\n";
+ $session_file = "$session_save_path/".SESSION_FILE_PREFIX.$id;
+ return (string) @file_get_contents($session_file);
+}
+
+function write($id, $session_data) {
+ global $session_save_path, $name, $session_id;
+ $session_id = $id;
+ echo "Write [${session_save_path},${id},${session_data}]\n";
+ $session_file = "$session_save_path/".SESSION_FILE_PREFIX.$id;
+ if ($fp = fopen($session_file, "w")) {
+ $return = fwrite($fp, $session_data);
+ fclose($fp);
+ return $return;
+ }
+ return false;
+}
+
+function destroy($id) {
+ global $session_save_path, $name;
+ echo "Destroy [${session_save_path},${id}]\n";
+ $session_file = "$session_save_path/".SESSION_FILE_PREFIX.$id;
+ return unlink($session_file);
+}
+
+function gc($maxlifetime) {
+ global $session_save_path, $name;
+ $directory = opendir($session_save_path."/");
+ $length = strlen(SESSION_FILE_PREFIX);
+ while (($file = readdir($directory)) !== FALSE) {
+ $qualified = ($session_save_path."/".$file);
+ if (is_file($qualified) === TRUE) {
+ if (substr($file, 0, $length) === SESSION_FILE_PREFIX) {
+ unlink($qualified);
+ }
+ }
+ }
+ closedir($directory);
+ return true;
+}
+
+?>
+
diff --git a/ext/session/tests/session_cache_expire_basic.phpt b/ext/session/tests/session_cache_expire_basic.phpt
new file mode 100644
index 000000000..716648593
--- /dev/null
+++ b/ext/session/tests/session_cache_expire_basic.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test session_cache_expire() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : int session_cache_expire([int $new_cache_expire])
+ * Description : Return current cache expire
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_expire() : basic functionality ***\n";
+
+var_dump(session_cache_expire());
+var_dump(session_cache_expire(1234567890));
+var_dump(session_cache_expire(180));
+var_dump(session_start());
+var_dump(session_cache_expire());
+var_dump(session_destroy());
+var_dump(session_cache_expire());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_expire() : basic functionality ***
+int(180)
+int(180)
+int(1234567890)
+bool(true)
+int(180)
+bool(true)
+int(180)
+Done
+
diff --git a/ext/session/tests/session_cache_expire_error.phpt b/ext/session/tests/session_cache_expire_error.phpt
new file mode 100644
index 000000000..486ba787e
--- /dev/null
+++ b/ext/session/tests/session_cache_expire_error.phpt
@@ -0,0 +1,170 @@
+--TEST--
+Test session_cache_expire() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : int session_cache_expire([int $new_cache_expire])
+ * Description : Return current cache expire
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_expire() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_cache_expire($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_expire() : error functionality ***
+
+-- Iteration 1 --
+int(180)
+
+-- Iteration 2 --
+int(0)
+
+-- Iteration 3 --
+int(1)
+
+-- Iteration 4 --
+int(12345)
+
+-- Iteration 5 --
+int(-2345)
+
+-- Iteration 6 --
+int(10)
+
+-- Iteration 7 --
+int(-10)
+
+-- Iteration 8 --
+int(%s)
+
+-- Iteration 9 --
+int(1)
+
+-- Iteration 10 --
+int(0)
+
+-- Iteration 11 --
+int(0)
+
+-- Iteration 12 --
+int(0)
+
+-- Iteration 13 --
+int(1)
+
+-- Iteration 14 --
+int(0)
+
+-- Iteration 15 --
+int(1)
+
+-- Iteration 16 --
+int(0)
+
+-- Iteration 17 --
+int(0)
+
+-- Iteration 18 --
+int(0)
+
+-- Iteration 19 --
+int(0)
+
+-- Iteration 20 --
+int(0)
+
+-- Iteration 21 --
+int(0)
+
+-- Iteration 22 --
+int(0)
+
+-- Iteration 23 --
+int(0)
+
+-- Iteration 24 --
+int(0)
+Done
+
diff --git a/ext/session/tests/session_cache_expire_variation1.phpt b/ext/session/tests/session_cache_expire_variation1.phpt
new file mode 100644
index 000000000..9d0ba27fe
--- /dev/null
+++ b/ext/session/tests/session_cache_expire_variation1.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test session_cache_expire() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.cache_expire=360
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : int session_cache_expire([int $new_cache_expire])
+ * Description : Return current cache expire
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_expire() : variation ***\n";
+
+var_dump(session_cache_expire());
+var_dump(session_cache_expire(1234567890));
+var_dump(session_cache_expire(180));
+var_dump(session_start());
+var_dump(session_cache_expire());
+var_dump(session_destroy());
+var_dump(session_cache_expire());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_expire() : variation ***
+int(360)
+int(360)
+int(1234567890)
+bool(true)
+int(180)
+bool(true)
+int(180)
+Done
+
diff --git a/ext/session/tests/session_cache_expire_variation2.phpt b/ext/session/tests/session_cache_expire_variation2.phpt
new file mode 100644
index 000000000..f17f4711a
--- /dev/null
+++ b/ext/session/tests/session_cache_expire_variation2.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test session_cache_expire() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : int session_cache_expire([int $new_cache_expire])
+ * Description : Return current cache expire
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_expire() : variation ***\n";
+
+ini_set("session.cache_expire", 360);
+var_dump(session_cache_expire());
+var_dump(session_cache_expire(1234567890));
+var_dump(session_cache_expire(180));
+var_dump(session_start());
+var_dump(session_cache_expire());
+var_dump(session_destroy());
+var_dump(session_cache_expire());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_expire() : variation ***
+int(360)
+int(360)
+int(1234567890)
+bool(true)
+int(180)
+bool(true)
+int(180)
+Done
+
+
diff --git a/ext/session/tests/session_cache_expire_variation3.phpt b/ext/session/tests/session_cache_expire_variation3.phpt
new file mode 100644
index 000000000..c243c1f11
--- /dev/null
+++ b/ext/session/tests/session_cache_expire_variation3.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test session_cache_expire() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : int session_cache_expire([int $new_cache_expire])
+ * Description : Return current cache expire
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_expire() : variation ***\n";
+
+var_dump(ini_get("session.cache_expire"));
+var_dump(session_cache_expire());
+var_dump(ini_get("session.cache_expire"));
+var_dump(session_cache_expire(1234567890));
+var_dump(ini_get("session.cache_expire"));
+var_dump(session_start());
+var_dump(session_cache_expire());
+var_dump(ini_get("session.cache_expire"));
+var_dump(session_destroy());
+var_dump(session_cache_expire());
+var_dump(ini_get("session.cache_expire"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_expire() : variation ***
+string(3) "180"
+int(180)
+string(3) "180"
+int(180)
+string(10) "1234567890"
+bool(true)
+int(1234567890)
+string(10) "1234567890"
+bool(true)
+int(1234567890)
+string(10) "1234567890"
+Done
+
diff --git a/ext/session/tests/session_cache_limiter_basic.phpt b/ext/session/tests/session_cache_limiter_basic.phpt
new file mode 100644
index 000000000..d0531878f
--- /dev/null
+++ b/ext/session/tests/session_cache_limiter_basic.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Test session_cache_limiter() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_cache_limiter([string $cache_limiter])
+ * Description : Get and/or set the current cache limiter
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_limiter() : basic functionality ***\n";
+
+var_dump(session_start());
+var_dump(session_cache_limiter());
+var_dump(session_cache_limiter("public"));
+var_dump(session_cache_limiter());
+var_dump(session_destroy());
+
+var_dump(session_start());
+var_dump(session_cache_limiter());
+var_dump(session_cache_limiter("private"));
+var_dump(session_cache_limiter());
+var_dump(session_destroy());
+
+var_dump(session_start());
+var_dump(session_cache_limiter());
+var_dump(session_cache_limiter("nocache"));
+var_dump(session_cache_limiter());
+var_dump(session_destroy());
+
+var_dump(session_start());
+var_dump(session_cache_limiter());
+var_dump(session_cache_limiter("private_no_expire"));
+var_dump(session_cache_limiter());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_limiter() : basic functionality ***
+bool(true)
+string(7) "nocache"
+string(7) "nocache"
+string(6) "public"
+bool(true)
+bool(true)
+string(6) "public"
+string(6) "public"
+string(7) "private"
+bool(true)
+bool(true)
+string(7) "private"
+string(7) "private"
+string(7) "nocache"
+bool(true)
+bool(true)
+string(7) "nocache"
+string(7) "nocache"
+string(17) "private_no_expire"
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_cache_limiter_error.phpt b/ext/session/tests/session_cache_limiter_error.phpt
new file mode 100644
index 000000000..98bbbac6d
--- /dev/null
+++ b/ext/session/tests/session_cache_limiter_error.phpt
@@ -0,0 +1,170 @@
+--TEST--
+Test session_cache_limiter() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_cache_limiter([string $cache_limiter])
+ * Description : Get and/or set the current cache limiter
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_limiter() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_cache_limiter($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_limiter() : error functionality ***
+
+-- Iteration 1 --
+string(7) "nocache"
+
+-- Iteration 2 --
+string(1) "0"
+
+-- Iteration 3 --
+string(1) "1"
+
+-- Iteration 4 --
+string(5) "12345"
+
+-- Iteration 5 --
+string(5) "-2345"
+
+-- Iteration 6 --
+string(4) "10.5"
+
+-- Iteration 7 --
+string(5) "-10.5"
+
+-- Iteration 8 --
+string(12) "123456789000"
+
+-- Iteration 9 --
+string(13) "1.23456789E-9"
+
+-- Iteration 10 --
+string(3) "0.5"
+
+-- Iteration 11 --
+string(0) ""
+
+-- Iteration 12 --
+string(0) ""
+
+-- Iteration 13 --
+string(1) "1"
+
+-- Iteration 14 --
+string(0) ""
+
+-- Iteration 15 --
+string(1) "1"
+
+-- Iteration 16 --
+string(0) ""
+
+-- Iteration 17 --
+string(0) ""
+
+-- Iteration 18 --
+string(0) ""
+
+-- Iteration 19 --
+string(7) "Nothing"
+
+-- Iteration 20 --
+string(7) "Nothing"
+
+-- Iteration 21 --
+string(12) "Hello World!"
+
+-- Iteration 22 --
+string(12) "Hello World!"
+
+-- Iteration 23 --
+string(0) ""
+
+-- Iteration 24 --
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_cache_limiter_variation1.phpt b/ext/session/tests/session_cache_limiter_variation1.phpt
new file mode 100644
index 000000000..7c6e71eb8
--- /dev/null
+++ b/ext/session/tests/session_cache_limiter_variation1.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test session_cache_limiter() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.cache_limiter=nocache
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_cache_limiter([string $cache_limiter])
+ * Description : Get and/or set the current cache limiter
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_limiter() : variation ***\n";
+
+var_dump(session_cache_limiter());
+var_dump(session_start());
+var_dump(session_cache_limiter());
+var_dump(session_cache_limiter("public"));
+var_dump(session_cache_limiter());
+var_dump(session_destroy());
+var_dump(session_cache_limiter());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_limiter() : variation ***
+string(7) "nocache"
+bool(true)
+string(7) "nocache"
+string(7) "nocache"
+string(6) "public"
+bool(true)
+string(6) "public"
+Done
+
diff --git a/ext/session/tests/session_cache_limiter_variation2.phpt b/ext/session/tests/session_cache_limiter_variation2.phpt
new file mode 100644
index 000000000..b6d97a3dd
--- /dev/null
+++ b/ext/session/tests/session_cache_limiter_variation2.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test session_cache_limiter() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_cache_limiter([string $cache_limiter])
+ * Description : Get and/or set the current cache limiter
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_limiter() : variation ***\n";
+
+ini_set("session.cache_limiter", "nocache");
+var_dump(session_cache_limiter());
+var_dump(session_start());
+var_dump(session_cache_limiter());
+var_dump(session_cache_limiter("public"));
+var_dump(session_cache_limiter());
+var_dump(session_destroy());
+var_dump(session_cache_limiter());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_limiter() : variation ***
+string(7) "nocache"
+bool(true)
+string(7) "nocache"
+string(7) "nocache"
+string(6) "public"
+bool(true)
+string(6) "public"
+Done
+
diff --git a/ext/session/tests/session_cache_limiter_variation3.phpt b/ext/session/tests/session_cache_limiter_variation3.phpt
new file mode 100644
index 000000000..7aab95b24
--- /dev/null
+++ b/ext/session/tests/session_cache_limiter_variation3.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test session_cache_limiter() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_cache_limiter([string $cache_limiter])
+ * Description : Get and/or set the current cache limiter
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_cache_limiter() : variation ***\n";
+
+var_dump(ini_get("session.cache_limiter"));
+var_dump(session_start());
+var_dump(ini_get("session.cache_limiter"));
+var_dump(session_cache_limiter("public"));
+var_dump(ini_get("session.cache_limiter"));
+var_dump(session_destroy());
+var_dump(ini_get("session.cache_limiter"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_cache_limiter() : variation ***
+string(7) "nocache"
+bool(true)
+string(7) "nocache"
+string(7) "nocache"
+string(6) "public"
+bool(true)
+string(6) "public"
+Done
+
diff --git a/ext/session/tests/session_commit_basic.phpt b/ext/session/tests/session_commit_basic.phpt
new file mode 100644
index 000000000..c20db1093
--- /dev/null
+++ b/ext/session/tests/session_commit_basic.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test session_commit() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_commit(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_commit() : basic functionality ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_commit());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_commit() : basic functionality ***
+bool(true)
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+array(0) {
+}
+bool(true)
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_commit_error.phpt b/ext/session/tests/session_commit_error.phpt
new file mode 100644
index 000000000..b867572eb
--- /dev/null
+++ b/ext/session/tests/session_commit_error.phpt
@@ -0,0 +1,170 @@
+--TEST--
+Test session_commit() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_commit(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_commit() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_commit($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_commit() : error functionality ***
+
+-- Iteration 1 --
+NULL
+
+-- Iteration 2 --
+NULL
+
+-- Iteration 3 --
+NULL
+
+-- Iteration 4 --
+NULL
+
+-- Iteration 5 --
+NULL
+
+-- Iteration 6 --
+NULL
+
+-- Iteration 7 --
+NULL
+
+-- Iteration 8 --
+NULL
+
+-- Iteration 9 --
+NULL
+
+-- Iteration 10 --
+NULL
+
+-- Iteration 11 --
+NULL
+
+-- Iteration 12 --
+NULL
+
+-- Iteration 13 --
+NULL
+
+-- Iteration 14 --
+NULL
+
+-- Iteration 15 --
+NULL
+
+-- Iteration 16 --
+NULL
+
+-- Iteration 17 --
+NULL
+
+-- Iteration 18 --
+NULL
+
+-- Iteration 19 --
+NULL
+
+-- Iteration 20 --
+NULL
+
+-- Iteration 21 --
+NULL
+
+-- Iteration 22 --
+NULL
+
+-- Iteration 23 --
+NULL
+
+-- Iteration 24 --
+NULL
+Done
+
diff --git a/ext/session/tests/session_commit_variation1.phpt b/ext/session/tests/session_commit_variation1.phpt
new file mode 100644
index 000000000..81240dac8
--- /dev/null
+++ b/ext/session/tests/session_commit_variation1.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test session_commit() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_commit(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_commit() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_commit());
+var_dump(session_commit());
+var_dump(session_commit());
+var_dump(session_commit());
+var_dump(session_commit());
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_commit() : variation ***
+bool(true)
+NULL
+NULL
+NULL
+NULL
+NULL
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_commit_variation2.phpt b/ext/session/tests/session_commit_variation2.phpt
new file mode 100644
index 000000000..b38885a8d
--- /dev/null
+++ b/ext/session/tests/session_commit_variation2.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test session_commit() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_commit(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_commit() : variation ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_commit());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_commit());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_commit());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_commit() : variation ***
+bool(true)
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_commit_variation3.phpt b/ext/session/tests/session_commit_variation3.phpt
new file mode 100644
index 000000000..4cee2f4d5
--- /dev/null
+++ b/ext/session/tests/session_commit_variation3.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.auto_start=1
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_commit(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_commit() : variation ***\n";
+
+var_dump($_SESSION);
+var_dump(session_commit());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_commit() : variation ***
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_commit_variation4.phpt b/ext/session/tests/session_commit_variation4.phpt
new file mode 100644
index 000000000..57f42539d
--- /dev/null
+++ b/ext/session/tests/session_commit_variation4.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test session_commit() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_commit(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_commit() : variation ***\n";
+
+var_dump(session_id("test"));
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_commit());
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_commit());
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_commit());
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_commit() : variation ***
+string(0) ""
+bool(true)
+string(4) "test"
+NULL
+string(4) "test"
+bool(true)
+string(4) "test"
+NULL
+string(4) "test"
+bool(true)
+string(4) "test"
+NULL
+string(4) "test"
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_decode_basic.phpt b/ext/session/tests/session_decode_basic.phpt
new file mode 100644
index 000000000..f8aa24305
--- /dev/null
+++ b/ext/session/tests/session_decode_basic.phpt
@@ -0,0 +1,273 @@
+--TEST--
+Test session_decode() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_decode(void)
+ * Description : Decodes session data from a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_decode() : basic functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+var_dump(session_start());
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ $_SESSION["data"] = $input;
+ $encoded = session_encode();
+ var_dump(session_decode($encoded));
+ var_dump($_SESSION);
+ $iterator++;
+};
+
+var_dump(session_destroy());
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_decode() : basic functionality ***
+bool(true)
+
+-- Iteration 1 --
+bool(true)
+array(1) {
+ ["data"]=>
+ int(0)
+}
+
+-- Iteration 2 --
+bool(true)
+array(1) {
+ ["data"]=>
+ int(1)
+}
+
+-- Iteration 3 --
+bool(true)
+array(1) {
+ ["data"]=>
+ int(12345)
+}
+
+-- Iteration 4 --
+bool(true)
+array(1) {
+ ["data"]=>
+ int(-2345)
+}
+
+-- Iteration 5 --
+bool(true)
+array(1) {
+ ["data"]=>
+ float(10.5)
+}
+
+-- Iteration 6 --
+bool(true)
+array(1) {
+ ["data"]=>
+ float(-10.5)
+}
+
+-- Iteration 7 --
+bool(true)
+array(1) {
+ ["data"]=>
+ float(123456789000)
+}
+
+-- Iteration 8 --
+bool(true)
+array(1) {
+ ["data"]=>
+ float(1.23456789E-9)
+}
+
+-- Iteration 9 --
+bool(true)
+array(1) {
+ ["data"]=>
+ float(0.5)
+}
+
+-- Iteration 10 --
+bool(true)
+array(1) {
+ ["data"]=>
+ NULL
+}
+
+-- Iteration 11 --
+bool(true)
+array(1) {
+ ["data"]=>
+ NULL
+}
+
+-- Iteration 12 --
+bool(true)
+array(1) {
+ ["data"]=>
+ bool(true)
+}
+
+-- Iteration 13 --
+bool(true)
+array(1) {
+ ["data"]=>
+ bool(false)
+}
+
+-- Iteration 14 --
+bool(true)
+array(1) {
+ ["data"]=>
+ bool(true)
+}
+
+-- Iteration 15 --
+bool(true)
+array(1) {
+ ["data"]=>
+ bool(false)
+}
+
+-- Iteration 16 --
+bool(true)
+array(1) {
+ ["data"]=>
+ string(0) ""
+}
+
+-- Iteration 17 --
+bool(true)
+array(1) {
+ ["data"]=>
+ string(0) ""
+}
+
+-- Iteration 18 --
+bool(true)
+array(1) {
+ ["data"]=>
+ string(7) "Nothing"
+}
+
+-- Iteration 19 --
+bool(true)
+array(1) {
+ ["data"]=>
+ string(7) "Nothing"
+}
+
+-- Iteration 20 --
+bool(true)
+array(1) {
+ ["data"]=>
+ string(12) "Hello World!"
+}
+
+-- Iteration 21 --
+bool(true)
+array(1) {
+ ["data"]=>
+ object(classA)#2 (0) {
+ }
+}
+
+-- Iteration 22 --
+bool(true)
+array(1) {
+ ["data"]=>
+ NULL
+}
+
+-- Iteration 23 --
+bool(true)
+array(1) {
+ ["data"]=>
+ NULL
+}
+
+-- Iteration 24 --
+bool(true)
+array(1) {
+ ["data"]=>
+ int(0)
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_decode_error.phpt b/ext/session/tests/session_decode_error.phpt
new file mode 100644
index 000000000..416d74116
--- /dev/null
+++ b/ext/session/tests/session_decode_error.phpt
@@ -0,0 +1,222 @@
+--TEST--
+Test session_decode() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_decode(void)
+ * Description : Decodes session data from a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_decode() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+var_dump(session_start());
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_decode($input));
+ var_dump($_SESSION);
+ $iterator++;
+};
+
+var_dump(session_destroy());
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_decode() : error functionality ***
+bool(true)
+
+-- Iteration 1 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 2 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 3 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 4 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 5 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 6 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 7 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 8 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 9 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 10 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 11 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 12 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 13 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 14 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 15 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 16 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 17 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 18 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 19 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 20 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 21 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 22 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 23 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 24 --
+bool(true)
+array(0) {
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_decode_error2.phpt b/ext/session/tests/session_decode_error2.phpt
new file mode 100644
index 000000000..4160f8785
--- /dev/null
+++ b/ext/session/tests/session_decode_error2.phpt
@@ -0,0 +1,615 @@
+--TEST--
+Test session_decode() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_decode(void)
+ * Description : Decodes session data from a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_decode() : error functionality ***\n";
+$data = "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;";
+
+var_dump(session_start());
+for($index = 0; $index < strlen($data); $index++) {
+ echo "\n-- Iteration $index --\n";
+ $encoded = substr($data, 0, $index);
+ var_dump(session_decode($encoded));
+ var_dump($_SESSION);
+};
+
+var_dump(session_destroy());
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_decode() : error functionality ***
+bool(true)
+
+-- Iteration 0 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 1 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 2 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 3 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 4 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 5 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 6 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 7 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 8 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 9 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 10 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 11 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 12 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 13 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 14 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 15 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 16 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 17 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 18 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 19 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 20 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 21 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 22 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 23 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 24 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 25 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 26 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 27 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 28 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 29 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 30 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 31 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 32 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 33 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+
+-- Iteration 34 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 35 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 36 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 37 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 38 --
+bool(true)
+array(1) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 39 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ NULL
+}
+
+-- Iteration 40 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ NULL
+}
+
+-- Iteration 41 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ NULL
+}
+
+-- Iteration 42 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ NULL
+}
+
+-- Iteration 43 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 44 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 45 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 46 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 47 --
+bool(true)
+array(2) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Iteration 48 --
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ NULL
+}
+
+-- Iteration 49 --
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ NULL
+}
+
+-- Iteration 50 --
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ NULL
+}
+
+-- Iteration 51 --
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ NULL
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_decode_variation1.phpt b/ext/session/tests/session_decode_variation1.phpt
new file mode 100644
index 000000000..b2d06b1ab
--- /dev/null
+++ b/ext/session/tests/session_decode_variation1.phpt
@@ -0,0 +1,189 @@
+--TEST--
+Test session_decode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_decode(void)
+ * Description : Decodes session data from a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_decode() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
+var_dump($_SESSION);
+var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
+var_dump($_SESSION);
+var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
+var_dump($_SESSION);
+var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
+var_dump($_SESSION);
+var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
+var_dump($_SESSION);
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_decode() : variation ***
+bool(true)
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+bool(true)
+array(3) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_decode_variation2.phpt b/ext/session/tests/session_decode_variation2.phpt
new file mode 100644
index 000000000..1a9b68790
--- /dev/null
+++ b/ext/session/tests/session_decode_variation2.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Test session_decode() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_decode(void)
+ * Description : Decodes session data from a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_decode() : variation ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+$_SESSION["foo"] = 1234567890;
+$_SESSION["bar"] = "Hello World!";
+$_SESSION["guff"] = 123.456;
+var_dump($_SESSION);
+var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
+var_dump($_SESSION);
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_decode() : variation ***
+bool(true)
+array(0) {
+}
+array(3) {
+ ["foo"]=>
+ int(1234567890)
+ ["bar"]=>
+ string(12) "Hello World!"
+ ["guff"]=>
+ float(123.456)
+}
+bool(true)
+array(4) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["bar"]=>
+ string(12) "Hello World!"
+ ["guff"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["blah"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_decode_variation3.phpt b/ext/session/tests/session_decode_variation3.phpt
new file mode 100644
index 000000000..b7e13cc40
--- /dev/null
+++ b/ext/session/tests/session_decode_variation3.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test session_decode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.serialize_handler=blah
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_decode(void)
+ * Description : Decodes session data from a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_decode() : variation ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+$_SESSION["foo"] = 1234567890;
+$_SESSION["bar"] = "Blah!";
+$_SESSION["guff"] = 123.456;
+var_dump($_SESSION);
+$encoded = "A2Zvb2k6MTIzNDU2Nzg5MDs=";
+var_dump(session_decode(base64_decode($encoded)));
+var_dump($_SESSION);
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_decode() : variation ***
+
+Warning: session_start(): Unknown session.serialize_handler. Failed to decode session object. in %s on line %d
+bool(true)
+array(0) {
+}
+array(3) {
+ ["foo"]=>
+ int(1234567890)
+ ["bar"]=>
+ string(5) "Blah!"
+ ["guff"]=>
+ float(123.456)
+}
+
+Warning: session_decode(): Unknown session.serialize_handler. Failed to decode session object. in %s on line %d
+bool(true)
+array(3) {
+ ["foo"]=>
+ int(1234567890)
+ ["bar"]=>
+ string(5) "Blah!"
+ ["guff"]=>
+ float(123.456)
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_decode_variation4.phpt b/ext/session/tests/session_decode_variation4.phpt
new file mode 100644
index 000000000..81642754f
--- /dev/null
+++ b/ext/session/tests/session_decode_variation4.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test session_decode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_decode(void)
+ * Description : Decodes session data from a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_decode() : variation ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+$_SESSION["foo"] = 1234567890;
+$_SESSION["bar"] = "Blah!";
+$_SESSION["guff"] = 123.456;
+var_dump($_SESSION);
+$encoded = "A2Zvb2k6MTIzNDU2Nzg5MDs=";
+var_dump(session_decode(base64_decode($encoded)));
+var_dump($_SESSION);
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_decode() : variation ***
+bool(true)
+array(0) {
+}
+array(3) {
+ ["foo"]=>
+ int(1234567890)
+ ["bar"]=>
+ string(5) "Blah!"
+ ["guff"]=>
+ float(123.456)
+}
+bool(true)
+array(3) {
+ ["foo"]=>
+ int(1234567890)
+ ["bar"]=>
+ string(5) "Blah!"
+ ["guff"]=>
+ float(123.456)
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_destroy_error.phpt b/ext/session/tests/session_destroy_error.phpt
new file mode 100644
index 000000000..c68d33ebd
--- /dev/null
+++ b/ext/session/tests/session_destroy_error.phpt
@@ -0,0 +1,218 @@
+--TEST--
+Test session_destroy() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_destroy(void)
+ * Description : Destroys all data registered to a session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_destroy() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_destroy($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_destroy() : error functionality ***
+
+-- Iteration 1 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: Wrong parameter count for session_destroy() in %s on line %d
+NULL
+Done
+
diff --git a/ext/session/tests/session_destroy_variation1.phpt b/ext/session/tests/session_destroy_variation1.phpt
new file mode 100644
index 000000000..fdbdf08c5
--- /dev/null
+++ b/ext/session/tests/session_destroy_variation1.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test session_destroy() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_destroy(void)
+ * Description : Destroys all data registered to a session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_destroy() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_destroy());
+var_dump(session_destroy());
+var_dump(session_destroy());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_destroy() : variation ***
+bool(true)
+bool(true)
+
+Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
+bool(false)
+
+Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
+bool(false)
+
+Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
+bool(false)
+
+Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
+bool(false)
+Done
+
diff --git a/ext/session/tests/session_destroy_variation2.phpt b/ext/session/tests/session_destroy_variation2.phpt
new file mode 100644
index 000000000..c72c65bac
--- /dev/null
+++ b/ext/session/tests/session_destroy_variation2.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test session_destroy() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_destroy(void)
+ * Description : Destroys all data registered to a session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_destroy() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_destroy() : variation ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_destroy_variation3.phpt b/ext/session/tests/session_destroy_variation3.phpt
new file mode 100644
index 000000000..b63c17e39
--- /dev/null
+++ b/ext/session/tests/session_destroy_variation3.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test session_destroy() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_destroy(void)
+ * Description : Destroys all data registered to a session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_destroy() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(session_id());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_destroy() : variation ***
+bool(true)
+string(%d) "%s"
+bool(true)
+string(0) ""
+bool(true)
+string(%d) "%s"
+bool(true)
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_encode_basic.phpt b/ext/session/tests/session_encode_basic.phpt
new file mode 100644
index 000000000..f74bddd9c
--- /dev/null
+++ b/ext/session/tests/session_encode_basic.phpt
@@ -0,0 +1,174 @@
+--TEST--
+Test session_encode() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : basic functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+var_dump(session_start());
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ $_SESSION["data"] = $input;
+ var_dump(session_encode());
+ $iterator++;
+};
+
+var_dump(session_destroy());
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : basic functionality ***
+bool(true)
+
+-- Iteration 1 --
+string(9) "data|i:0;"
+
+-- Iteration 2 --
+string(9) "data|i:1;"
+
+-- Iteration 3 --
+string(13) "data|i:12345;"
+
+-- Iteration 4 --
+string(13) "data|i:-2345;"
+
+-- Iteration 5 --
+string(12) "data|d:10.5;"
+
+-- Iteration 6 --
+string(13) "data|d:-10.5;"
+
+-- Iteration 7 --
+string(20) "data|d:123456789000;"
+
+-- Iteration 8 --
+string(86) "data|d:1.2345678899999999145113427164344339914681114578343112953007221221923828125E-9;"
+
+-- Iteration 9 --
+string(11) "data|d:0.5;"
+
+-- Iteration 10 --
+string(7) "data|N;"
+
+-- Iteration 11 --
+string(7) "data|N;"
+
+-- Iteration 12 --
+string(9) "data|b:1;"
+
+-- Iteration 13 --
+string(9) "data|b:0;"
+
+-- Iteration 14 --
+string(9) "data|b:1;"
+
+-- Iteration 15 --
+string(9) "data|b:0;"
+
+-- Iteration 16 --
+string(12) "data|s:0:"";"
+
+-- Iteration 17 --
+string(12) "data|s:0:"";"
+
+-- Iteration 18 --
+string(19) "data|s:7:"Nothing";"
+
+-- Iteration 19 --
+string(19) "data|s:7:"Nothing";"
+
+-- Iteration 20 --
+string(25) "data|s:12:"Hello World!";"
+
+-- Iteration 21 --
+string(22) "data|O:6:"classA":0:{}"
+
+-- Iteration 22 --
+string(7) "data|N;"
+
+-- Iteration 23 --
+string(7) "data|N;"
+
+-- Iteration 24 --
+string(9) "data|i:0;"
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_encode_error.phpt b/ext/session/tests/session_encode_error.phpt
new file mode 100644
index 000000000..ce4fd383b
--- /dev/null
+++ b/ext/session/tests/session_encode_error.phpt
@@ -0,0 +1,220 @@
+--TEST--
+Test session_encode() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : basic functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+session_start();
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_encode($input));
+ $iterator++;
+};
+
+session_destroy();
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : basic functionality ***
+
+-- Iteration 1 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: Wrong parameter count for session_encode() in %s on line %d
+NULL
+Done
+
diff --git a/ext/session/tests/session_encode_error2.phpt b/ext/session/tests/session_encode_error2.phpt
new file mode 100644
index 000000000..6a019b203
--- /dev/null
+++ b/ext/session/tests/session_encode_error2.phpt
@@ -0,0 +1,251 @@
+--TEST--
+Test session_encode() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_start());
+ $_SESSION[$input] = "Hello World!";
+ var_dump(session_encode());
+ var_dump(session_destroy());
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : error functionality ***
+
+-- Iteration 1 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 0. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 2 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 1. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 3 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 12345. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 4 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key -2345. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 5 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 10. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key -10. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key %s. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 8 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 0. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 9 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 0. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 10 --
+bool(true)
+string(21) "|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 11 --
+bool(true)
+string(21) "|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 1. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 13 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 0. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 14 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 1. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 15 --
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 0. in %s on line %d
+bool(false)
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+string(21) "|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+string(21) "|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+string(28) "Nothing|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 19 --
+bool(true)
+string(28) "Nothing|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+string(33) "Hello World!|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+Warning: Illegal offset type in %s on line 82
+bool(false)
+bool(true)
+
+-- Iteration 22 --
+bool(true)
+string(21) "|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 23 --
+bool(true)
+string(21) "|s:12:"Hello World!";"
+bool(true)
+
+-- Iteration 24 --
+bool(true)
+
+Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
+
+Notice: session_encode(): Skipping numeric key %d. in %s on line %d
+bool(false)
+bool(true)
+Done
diff --git a/ext/session/tests/session_encode_variation1.phpt b/ext/session/tests/session_encode_variation1.phpt
new file mode 100644
index 000000000..9c9f64b43
--- /dev/null
+++ b/ext/session/tests/session_encode_variation1.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_encode());
+var_dump(session_start());
+var_dump(session_encode());
+var_dump(session_write_close());
+var_dump(session_encode());
+var_dump(session_start());
+var_dump(session_encode());
+var_dump(session_destroy());
+var_dump(session_encode());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+
+Warning: session_encode(): Cannot encode non-existent session. in %s on line %d
+bool(false)
+bool(true)
+bool(false)
+NULL
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+
+Warning: session_encode(): Cannot encode non-existent session. in %s on line %d
+bool(false)
+Done
+
diff --git a/ext/session/tests/session_encode_variation2.phpt b/ext/session/tests/session_encode_variation2.phpt
new file mode 100644
index 000000000..7ec8a63af
--- /dev/null
+++ b/ext/session/tests/session_encode_variation2.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.auto_start=1
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_encode());
+var_dump(session_destroy());
+var_dump(session_encode());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+bool(false)
+bool(true)
+
+Warning: session_encode(): Cannot encode non-existent session. in %s on line %d
+bool(false)
+Done
+
diff --git a/ext/session/tests/session_encode_variation3.phpt b/ext/session/tests/session_encode_variation3.phpt
new file mode 100644
index 000000000..40bb44de5
--- /dev/null
+++ b/ext/session/tests/session_encode_variation3.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_start());
+
+$array = array(1,2,3);
+$_SESSION["foo"] = &$array;
+var_dump(session_encode());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+bool(true)
+string(34) "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}"
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_encode_variation4.phpt b/ext/session/tests/session_encode_variation4.phpt
new file mode 100644
index 000000000..d85b9a48a
--- /dev/null
+++ b/ext/session/tests/session_encode_variation4.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_start());
+
+$array = array(1,2,3);
+$_SESSION["foo"] = &$array;
+$_SESSION["guff"] = &$array;
+$_SESSION["blah"] = &$array;
+var_dump(session_encode());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+bool(true)
+string(52) "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_encode_variation5.phpt b/ext/session/tests/session_encode_variation5.phpt
new file mode 100644
index 000000000..fc408847b
--- /dev/null
+++ b/ext/session/tests/session_encode_variation5.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_start());
+
+$array = array(1,2,3);
+$array["foo"] = &$array;
+$array["blah"] = &$array;
+$_SESSION["data"] = &$array;
+var_dump(session_encode());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+bool(true)
+string(64) "data|a:5:{i:0;i:1;i:1;i:2;i:2;i:3;s:3:"foo";R:1;s:4:"blah";R:1;}"
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_encode_variation6.phpt b/ext/session/tests/session_encode_variation6.phpt
new file mode 100644
index 000000000..428047382
--- /dev/null
+++ b/ext/session/tests/session_encode_variation6.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_start());
+$_SESSION[] = 1234567890;
+var_dump(session_encode());
+var_dump(session_destroy());
+var_dump(session_start());
+$_SESSION[1234567890] = "Hello World!";
+var_dump(session_encode());
+var_dump(session_destroy());
+var_dump(session_start());
+$_SESSION[-1234567890] = 1234567890;
+var_dump(session_encode());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 0. in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+
+Notice: session_encode(): Skipping numeric key 1234567890. in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+
+Notice: session_encode(): Skipping numeric key -1234567890. in %s on line %d
+bool(false)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_encode_variation7.phpt b/ext/session/tests/session_encode_variation7.phpt
new file mode 100644
index 000000000..b3de3c68a
--- /dev/null
+++ b/ext/session/tests/session_encode_variation7.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.serialize_handler=php_binary
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_start());
+$_SESSION["foo"] = 1234567890;
+$encoded = session_encode();
+var_dump(base64_encode($encoded));
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+bool(true)
+string(24) "A2Zvb2k6MTIzNDU2Nzg5MDs="
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_encode_variation8.phpt b/ext/session/tests/session_encode_variation8.phpt
new file mode 100644
index 000000000..57c9e17bd
--- /dev/null
+++ b/ext/session/tests/session_encode_variation8.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.serialize_handler=blah
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_start());
+$_SESSION["foo"] = 1234567890;
+$encoded = session_encode();
+var_dump(base64_encode($encoded));
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+
+Warning: session_start(): Unknown session.serialize_handler. Failed to decode session object. in %s on line %d
+bool(true)
+
+Warning: session_encode(): Unknown session.serialize_handler. Failed to encode session object. in %s on line %d
+string(0) ""
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_get_cookie_params_basic.phpt b/ext/session/tests/session_get_cookie_params_basic.phpt
new file mode 100644
index 000000000..5cadc7947
--- /dev/null
+++ b/ext/session/tests/session_get_cookie_params_basic.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Test session_get_cookie_params() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : array session_get_cookie_params(void)
+ * Description : Get the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_get_cookie_params() : basic functionality ***\n";
+
+var_dump(session_get_cookie_params());
+var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, FALSE));
+var_dump(session_get_cookie_params());
+var_dump(session_set_cookie_params(1234567890, "/guff", "foo", TRUE, TRUE));
+var_dump(session_get_cookie_params());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_get_cookie_params() : basic functionality ***
+array(5) {
+ ["lifetime"]=>
+ int(0)
+ ["path"]=>
+ string(1) "/"
+ ["domain"]=>
+ string(0) ""
+ ["secure"]=>
+ bool(false)
+ ["httponly"]=>
+ bool(false)
+}
+NULL
+array(5) {
+ ["lifetime"]=>
+ int(3600)
+ ["path"]=>
+ string(5) "/path"
+ ["domain"]=>
+ string(4) "blah"
+ ["secure"]=>
+ bool(false)
+ ["httponly"]=>
+ bool(false)
+}
+NULL
+array(5) {
+ ["lifetime"]=>
+ int(1234567890)
+ ["path"]=>
+ string(5) "/guff"
+ ["domain"]=>
+ string(3) "foo"
+ ["secure"]=>
+ bool(true)
+ ["httponly"]=>
+ bool(true)
+}
+Done
+
diff --git a/ext/session/tests/session_get_cookie_params_error.phpt b/ext/session/tests/session_get_cookie_params_error.phpt
new file mode 100644
index 000000000..529ea6b11
--- /dev/null
+++ b/ext/session/tests/session_get_cookie_params_error.phpt
@@ -0,0 +1,217 @@
+--TEST--
+Test session_get_cookie_params() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : array session_get_cookie_params(void)
+ * Description : Get the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_get_cookie_params() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_get_cookie_params($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_get_cookie_params() : error functionality ***
+
+-- Iteration 1 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: Wrong parameter count for session_get_cookie_params() in %s on line %d
+NULL
+Done
+
diff --git a/ext/session/tests/session_get_cookie_params_variation1.phpt b/ext/session/tests/session_get_cookie_params_variation1.phpt
new file mode 100644
index 000000000..0ab4eec88
--- /dev/null
+++ b/ext/session/tests/session_get_cookie_params_variation1.phpt
@@ -0,0 +1,108 @@
+--TEST--
+Test session_get_cookie_params() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : array session_get_cookie_params(void)
+ * Description : Get the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_get_cookie_params() : variation ***\n";
+
+var_dump(session_get_cookie_params());
+ini_set("session.cookie_lifetime", 3600);
+var_dump(session_get_cookie_params());
+ini_set("session.cookie_path", "/path");
+var_dump(session_get_cookie_params());
+ini_set("session.cookie_domain", "foo");
+var_dump(session_get_cookie_params());
+ini_set("session.cookie_secure", TRUE);
+var_dump(session_get_cookie_params());
+ini_set("session.cookie_httponly", TRUE);
+var_dump(session_get_cookie_params());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_get_cookie_params() : variation ***
+array(5) {
+ ["lifetime"]=>
+ int(0)
+ ["path"]=>
+ string(1) "/"
+ ["domain"]=>
+ string(0) ""
+ ["secure"]=>
+ bool(false)
+ ["httponly"]=>
+ bool(false)
+}
+array(5) {
+ ["lifetime"]=>
+ int(3600)
+ ["path"]=>
+ string(1) "/"
+ ["domain"]=>
+ string(0) ""
+ ["secure"]=>
+ bool(false)
+ ["httponly"]=>
+ bool(false)
+}
+array(5) {
+ ["lifetime"]=>
+ int(3600)
+ ["path"]=>
+ string(5) "/path"
+ ["domain"]=>
+ string(0) ""
+ ["secure"]=>
+ bool(false)
+ ["httponly"]=>
+ bool(false)
+}
+array(5) {
+ ["lifetime"]=>
+ int(3600)
+ ["path"]=>
+ string(5) "/path"
+ ["domain"]=>
+ string(3) "foo"
+ ["secure"]=>
+ bool(false)
+ ["httponly"]=>
+ bool(false)
+}
+array(5) {
+ ["lifetime"]=>
+ int(3600)
+ ["path"]=>
+ string(5) "/path"
+ ["domain"]=>
+ string(3) "foo"
+ ["secure"]=>
+ bool(true)
+ ["httponly"]=>
+ bool(false)
+}
+array(5) {
+ ["lifetime"]=>
+ int(3600)
+ ["path"]=>
+ string(5) "/path"
+ ["domain"]=>
+ string(3) "foo"
+ ["secure"]=>
+ bool(true)
+ ["httponly"]=>
+ bool(true)
+}
+Done
+
diff --git a/ext/session/tests/session_id_basic.phpt b/ext/session/tests/session_id_basic.phpt
new file mode 100644
index 000000000..5cb13c25e
--- /dev/null
+++ b/ext/session/tests/session_id_basic.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test session_id() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_id([string $id])
+ * Description : Get and/or set the current session id
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_id() : basic functionality ***\n";
+
+var_dump(session_id());
+var_dump(session_id("test"));
+var_dump(session_id());
+var_dump(session_id("1234567890"));
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(session_id());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_id() : basic functionality ***
+string(0) ""
+string(0) ""
+string(4) "test"
+string(4) "test"
+string(10) "1234567890"
+bool(true)
+string(10) "1234567890"
+bool(true)
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_id_error.phpt b/ext/session/tests/session_id_error.phpt
new file mode 100644
index 000000000..07c4ed702
--- /dev/null
+++ b/ext/session/tests/session_id_error.phpt
@@ -0,0 +1,170 @@
+--TEST--
+Test session_id() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_id([string $id])
+ * Description : Get and/or set the current session id
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_id() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_id($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_id() : error functionality ***
+
+-- Iteration 1 --
+string(0) ""
+
+-- Iteration 2 --
+string(1) "0"
+
+-- Iteration 3 --
+string(1) "1"
+
+-- Iteration 4 --
+string(5) "12345"
+
+-- Iteration 5 --
+string(5) "-2345"
+
+-- Iteration 6 --
+string(4) "10.5"
+
+-- Iteration 7 --
+string(5) "-10.5"
+
+-- Iteration 8 --
+string(12) "123456789000"
+
+-- Iteration 9 --
+string(13) "1.23456789E-9"
+
+-- Iteration 10 --
+string(3) "0.5"
+
+-- Iteration 11 --
+string(0) ""
+
+-- Iteration 12 --
+string(0) ""
+
+-- Iteration 13 --
+string(1) "1"
+
+-- Iteration 14 --
+string(0) ""
+
+-- Iteration 15 --
+string(1) "1"
+
+-- Iteration 16 --
+string(0) ""
+
+-- Iteration 17 --
+string(0) ""
+
+-- Iteration 18 --
+string(0) ""
+
+-- Iteration 19 --
+string(7) "Nothing"
+
+-- Iteration 20 --
+string(7) "Nothing"
+
+-- Iteration 21 --
+string(12) "Hello World!"
+
+-- Iteration 22 --
+string(12) "Hello World!"
+
+-- Iteration 23 --
+string(0) ""
+
+-- Iteration 24 --
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_id_error2.phpt b/ext/session/tests/session_id_error2.phpt
new file mode 100644
index 000000000..05284e797
--- /dev/null
+++ b/ext/session/tests/session_id_error2.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test session_id() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_id([string $id])
+ * Description : Get and/or set the current session id
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_id() : error functionality ***\n";
+
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id("test"));
+var_dump(session_id());
+var_dump(session_id("1234567890"));
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(session_id());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_id() : error functionality ***
+string(0) ""
+bool(true)
+string(%d) "%s"
+string(4) "test"
+string(4) "test"
+string(10) "1234567890"
+bool(true)
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_id_error3.phpt b/ext/session/tests/session_id_error3.phpt
new file mode 100644
index 000000000..fc291389d
--- /dev/null
+++ b/ext/session/tests/session_id_error3.phpt
@@ -0,0 +1,79 @@
+--TEST--
+Test session_id() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_id([string $id])
+ * Description : Get and/or set the current session id
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_id() : error functionality ***\n";
+
+@session_start();
+var_dump(session_id());
+var_dump(session_id("!"));
+var_dump(session_id());
+@session_destroy();
+
+@session_start();
+var_dump(session_id());
+var_dump(session_id("?><"));
+var_dump(session_id());
+@session_destroy();
+
+@session_start();
+var_dump(session_id());
+var_dump(session_id("£$%^&*()"));
+var_dump(session_id());
+@session_destroy();
+
+@session_start();
+var_dump(session_id());
+var_dump(session_id("\r\n"));
+var_dump(session_id());
+@session_destroy();
+
+@session_start();
+var_dump(session_id());
+var_dump(session_id("\0"));
+var_dump(session_id());
+@session_destroy();
+
+@session_start();
+var_dump(session_id());
+var_dump(session_id("¬``@~:{>?><,./[]+--"));
+var_dump(session_id());
+@session_destroy();
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_id() : error functionality ***
+string(%d) "%s"
+string(%d) "%s"
+string(1) "!"
+string(%d) "%s"
+string(%d) "%s"
+string(3) "?><"
+string(%d) "%s"
+string(%d) "%s"
+string(8) "£$%^&*()"
+string(%d) "%s"
+string(%d) "%s"
+string(2) "
+"
+string(%d) "%s"
+string(%d) "%s"
+string(0) ""
+string(%d) "%s"
+string(%d) "%s"
+string(19) "¬``@~:{>?><,./[]+--"
+Done
+
diff --git a/ext/session/tests/session_id_error4.phpt b/ext/session/tests/session_id_error4.phpt
new file mode 100644
index 000000000..cc23578ae
--- /dev/null
+++ b/ext/session/tests/session_id_error4.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test session_id() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_id([string $id])
+ * Description : Get and/or set the current session id
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_id() : error functionality ***\n";
+
+var_dump(ini_set("session.hash_function", -1));
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_id() : error functionality ***
+string(1) "0"
+string(0) ""
+
+Fatal error: session_start(): Invalid session hash function in %s on line %d
+
diff --git a/ext/session/tests/session_id_variation1.phpt b/ext/session/tests/session_id_variation1.phpt
new file mode 100644
index 000000000..54d980f3a
--- /dev/null
+++ b/ext/session/tests/session_id_variation1.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test session_id() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_id([string $id])
+ * Description : Get and/or set the current session id
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_id() : variation ***\n";
+
+var_dump(ini_set("session.hash_function", 0));
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+
+var_dump(ini_set("session.hash_function", 1));
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_id() : variation ***
+string(1) "0"
+string(0) ""
+bool(true)
+string(%d) "%s"
+bool(true)
+string(1) "0"
+string(0) ""
+bool(true)
+string(%d) "%s"
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_id_variation2.phpt b/ext/session/tests/session_id_variation2.phpt
new file mode 100644
index 000000000..7b09adafc
--- /dev/null
+++ b/ext/session/tests/session_id_variation2.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test session_id() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_id([string $id])
+ * Description : Get and/or set the current session id
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_id() : variation ***\n";
+
+$directory = dirname(__FILE__);
+$filename = ($directory."/entropy.txt");
+var_dump(ini_set("session.entropy_file", $filename));
+var_dump(file_put_contents($filename, "Hello World!"));
+var_dump(ini_set("session.entropy_length", filesize($filename)));
+
+var_dump(ini_set("session.hash_function", 0));
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+
+var_dump(ini_set("session.hash_function", 1));
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(unlink($filename));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_id() : variation ***
+string(0) ""
+int(12)
+string(1) "0"
+string(1) "0"
+string(0) ""
+bool(true)
+string(%d) "%s"
+bool(true)
+string(1) "0"
+string(0) ""
+bool(true)
+string(%d) "%s"
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_is_registered_basic.phpt b/ext/session/tests/session_is_registered_basic.phpt
new file mode 100644
index 000000000..080dd0bcc
--- /dev/null
+++ b/ext/session/tests/session_is_registered_basic.phpt
@@ -0,0 +1,269 @@
+--TEST--
+Test session_unregister() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_is_registered(string $name)
+ * Description : Find out whether a global variable is registered in a session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_is_registered() : basic functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_start());
+ var_dump(session_is_registered($input));
+ var_dump($_SESSION);
+ var_dump(session_destroy());
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_is_registered() : basic functionality ***
+
+-- Iteration 1 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 2 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 3 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 4 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 5 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 8 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 9 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 10 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 11 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 13 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 14 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 15 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 19 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 22 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 23 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+
+-- Iteration 24 --
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_is_registered_variation1.phpt b/ext/session/tests/session_is_registered_variation1.phpt
new file mode 100644
index 000000000..f92de8297
--- /dev/null
+++ b/ext/session/tests/session_is_registered_variation1.phpt
@@ -0,0 +1,108 @@
+--TEST--
+Test session_unregister() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_is_registered(string $name)
+ * Description : Find out whether a global variable is registered in a session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_is_registered() : variation ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_is_registered($inputs));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_is_registered() : variation ***
+bool(true)
+array(0) {
+}
+
+Notice: Array to string conversion in %s on line %d
+bool(false)
+array(0) {
+}
+bool(true)
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_is_registered_variation2.phpt b/ext/session/tests/session_is_registered_variation2.phpt
new file mode 100644
index 000000000..582b947af
--- /dev/null
+++ b/ext/session/tests/session_is_registered_variation2.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test session_unregister() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_is_registered(string $name)
+ * Description : Find out whether a global variable is registered in a session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_is_registered() : variation ***\n";
+
+var_dump(session_is_registered("foo"));
+var_dump(session_start());
+var_dump(session_is_registered("foo"));
+var_dump($_SESSION);
+$_SESSION["foo"] = "Hello World!";
+var_dump(session_is_registered("foo"));
+var_dump($_SESSION);
+var_dump(session_is_registered("foo"));
+var_dump(session_unregister("foo"));
+var_dump(session_is_registered("foo"));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump(session_is_registered("foo"));
+var_dump($_SESSION);
+var_dump(session_is_registered("foo"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_is_registered() : variation ***
+bool(false)
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+array(1) {
+ ["foo"]=>
+ string(12) "Hello World!"
+}
+bool(true)
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+bool(false)
+array(0) {
+}
+bool(false)
+Done
+
diff --git a/ext/session/tests/session_is_registered_variation3.phpt b/ext/session/tests/session_is_registered_variation3.phpt
new file mode 100644
index 000000000..10f7ffe49
--- /dev/null
+++ b/ext/session/tests/session_is_registered_variation3.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test session_unregister() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_is_registered(string $name)
+ * Description : Find out whether a global variable is registered in a session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_is_registered() : variation ***\n";
+
+var_dump(session_is_registered("foo"));
+var_dump(session_start());
+var_dump(session_is_registered("foo"));
+var_dump($_SESSION);
+$blah = "Hello World!";
+var_dump(session_is_registered("foo"));
+$_SESSION["foo"] = &$blah;
+var_dump($_SESSION);
+var_dump(session_is_registered("foo"));
+var_dump(session_unregister("foo"));
+var_dump(session_is_registered("foo"));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump(session_is_registered("foo"));
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_is_registered() : variation ***
+bool(false)
+bool(true)
+bool(false)
+array(0) {
+}
+bool(false)
+array(1) {
+ ["foo"]=>
+ &string(12) "Hello World!"
+}
+bool(true)
+bool(true)
+bool(false)
+array(0) {
+}
+bool(true)
+bool(false)
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_module_name_basic.phpt b/ext/session/tests/session_module_name_basic.phpt
new file mode 100644
index 000000000..2daf6fc62
--- /dev/null
+++ b/ext/session/tests/session_module_name_basic.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test session_module_name() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_module_name([string $module])
+ * Description : Get and/or set the current session module
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_module_name() : basic functionality ***\n";
+var_dump(session_module_name("files"));
+var_dump(session_module_name());
+var_dump(session_start());
+var_dump(session_module_name());
+var_dump(session_destroy());
+var_dump(session_module_name());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_module_name() : basic functionality ***
+string(%d) "%s"
+string(5) "files"
+bool(true)
+string(5) "files"
+bool(true)
+string(5) "files"
+Done
diff --git a/ext/session/tests/session_module_name_error.phpt b/ext/session/tests/session_module_name_error.phpt
new file mode 100644
index 000000000..84cfde499
--- /dev/null
+++ b/ext/session/tests/session_module_name_error.phpt
@@ -0,0 +1,216 @@
+--TEST--
+Test session_module_name() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_module_name([string $module])
+ * Description : Get and/or set the current session module
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_module_name() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_module_name($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_module_name() : error functionality ***
+
+-- Iteration 1 --
+
+Warning: session_module_name(): Cannot find named PHP session module (0) in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: session_module_name(): Cannot find named PHP session module (12345) in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: session_module_name(): Cannot find named PHP session module (-2345) in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: session_module_name(): Cannot find named PHP session module (10.5) in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: session_module_name(): Cannot find named PHP session module (-10.5) in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: session_module_name(): Cannot find named PHP session module (123456789000) in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: session_module_name(): Cannot find named PHP session module (1.23456789E-9) in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: session_module_name(): Cannot find named PHP session module (0.5) in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: session_module_name(): Cannot find named PHP session module (Nothing) in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+
+Warning: session_module_name(): Cannot find named PHP session module (Nothing) in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: session_module_name(): Cannot find named PHP session module (Hello World!) in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: session_module_name(): Cannot find named PHP session module (Hello World!) in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: session_module_name(): Cannot find named PHP session module (Resource id #%d) in %s on line %d
+bool(false)
+Done
diff --git a/ext/session/tests/session_module_name_variation1.phpt b/ext/session/tests/session_module_name_variation1.phpt
new file mode 100644
index 000000000..2034b7eff
--- /dev/null
+++ b/ext/session/tests/session_module_name_variation1.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test session_module_name() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_module_name([string $module])
+ * Description : Get and/or set the current session module
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_module_name() : variation ***\n";
+var_dump(session_module_name("blah"));
+var_dump(session_start());
+var_dump(session_module_name());
+var_dump(session_destroy());
+var_dump(session_module_name());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_module_name() : variation ***
+
+Warning: session_module_name(): Cannot find named PHP session module (blah) in %s on line %d
+bool(false)
+bool(true)
+string(%d) "%s"
+bool(true)
+string(%d) "%s"
+Done
diff --git a/ext/session/tests/session_module_name_variation2.phpt b/ext/session/tests/session_module_name_variation2.phpt
new file mode 100644
index 000000000..aa7b33c76
--- /dev/null
+++ b/ext/session/tests/session_module_name_variation2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test session_module_name() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_module_name([string $module])
+ * Description : Get and/or set the current session module
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_module_name() : variation ***\n";
+
+function open($save_path, $session_name) { }
+function close() { }
+function read($id) { }
+function write($id, $session_data) { }
+function destroy($id) { }
+function gc($maxlifetime) { }
+
+var_dump(session_module_name("files"));
+session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
+var_dump(session_module_name());
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_module_name() : variation ***
+string(%d) "%s"
+string(4) "user"
diff --git a/ext/session/tests/session_module_name_variation3.phpt b/ext/session/tests/session_module_name_variation3.phpt
new file mode 100644
index 000000000..dc1c6ba5e
--- /dev/null
+++ b/ext/session/tests/session_module_name_variation3.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test session_module_name() function : variation
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_module_name([string $module])
+ * Description : Get and/or set the current session module
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_module_name() : variation ***\n";
+function open($save_path, $session_name) {
+ throw new Exception("Stop...!");
+}
+
+function close() { }
+function read($id) { }
+function write($id, $session_data) { }
+function destroy($id) { }
+function gc($maxlifetime) { }
+
+var_dump(session_module_name("files"));
+session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
+var_dump(session_module_name());
+var_dump(session_start());
+var_dump(session_module_name());
+var_dump(session_destroy());
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_module_name() : variation ***
+string(%d) "%s"
+string(4) "user"
+
+Fatal error: Uncaught exception 'Exception' with message 'Stop...!' in %s:%d
+Stack trace:
+#0 [internal function]: open('', 'PHPSESSID')
+#1 %s(%d): session_start()
+#2 {main}
+ thrown in %s on line %d
diff --git a/ext/session/tests/session_module_name_variation4.phpt b/ext/session/tests/session_module_name_variation4.phpt
new file mode 100644
index 000000000..0748b3db2
--- /dev/null
+++ b/ext/session/tests/session_module_name_variation4.phpt
@@ -0,0 +1,67 @@
+--TEST--
+Test session_module_name() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.gc_probability=1
+session.gc_divisor=1
+session.gc_maxlifetime=0
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_module_name([string $module])
+ * Description : Get and/or set the current session module
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_module_name() : variation ***\n";
+
+require_once "save_handler.inc";
+$path = dirname(__FILE__);
+session_save_path($path);
+session_module_name("files");
+
+session_start();
+$_SESSION["Blah"] = "Hello World!";
+$_SESSION["Foo"] = FALSE;
+$_SESSION["Guff"] = 1234567890;
+var_dump($_SESSION);
+
+var_dump(session_write_close());
+session_start();
+var_dump($_SESSION);
+var_dump(session_destroy());
+session_start();
+var_dump($_SESSION);
+var_dump(session_destroy());
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_module_name() : variation ***
+
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+NULL
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+bool(true)
+array(0) {
+}
+bool(true)
+
diff --git a/ext/session/tests/session_name_basic.phpt b/ext/session/tests/session_name_basic.phpt
new file mode 100644
index 000000000..959f40666
--- /dev/null
+++ b/ext/session/tests/session_name_basic.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test session_name() function : error functionality
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_name([string $name])
+ * Description : Get and/or set the current session name
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_name() : error functionality ***\n";
+
+var_dump(session_name());
+var_dump(session_name("blah"));
+var_dump(session_start());
+var_dump(session_name());
+var_dump(session_destroy());
+var_dump(session_name());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_name() : error functionality ***
+string(9) "PHPSESSID"
+string(9) "PHPSESSID"
+bool(true)
+string(4) "blah"
+bool(true)
+string(4) "blah"
+Done
+
diff --git a/ext/session/tests/session_name_error.phpt b/ext/session/tests/session_name_error.phpt
new file mode 100644
index 000000000..a2dc01b51
--- /dev/null
+++ b/ext/session/tests/session_name_error.phpt
@@ -0,0 +1,172 @@
+--TEST--
+Test session_name() function : error functionality
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_name([string $name])
+ * Description : Get and/or set the current session name
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_name() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_name($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_name() : error functionality ***
+
+-- Iteration 1 --
+string(9) "PHPSESSID"
+
+-- Iteration 2 --
+string(1) "0"
+
+-- Iteration 3 --
+string(1) "1"
+
+-- Iteration 4 --
+string(5) "12345"
+
+-- Iteration 5 --
+string(5) "-2345"
+
+-- Iteration 6 --
+string(4) "10.5"
+
+-- Iteration 7 --
+string(5) "-10.5"
+
+-- Iteration 8 --
+string(12) "123456789000"
+
+-- Iteration 9 --
+string(13) "1.23456789E-9"
+
+-- Iteration 10 --
+string(3) "0.5"
+
+-- Iteration 11 --
+string(0) ""
+
+-- Iteration 12 --
+string(0) ""
+
+-- Iteration 13 --
+string(1) "1"
+
+-- Iteration 14 --
+string(0) ""
+
+-- Iteration 15 --
+string(1) "1"
+
+-- Iteration 16 --
+string(0) ""
+
+-- Iteration 17 --
+string(0) ""
+
+-- Iteration 18 --
+string(0) ""
+
+-- Iteration 19 --
+string(7) "Nothing"
+
+-- Iteration 20 --
+string(7) "Nothing"
+
+-- Iteration 21 --
+string(12) "Hello World!"
+
+-- Iteration 22 --
+string(12) "Hello World!"
+
+-- Iteration 23 --
+string(0) ""
+
+-- Iteration 24 --
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_name_variation1.phpt b/ext/session/tests/session_name_variation1.phpt
new file mode 100644
index 000000000..16d6ad462
--- /dev/null
+++ b/ext/session/tests/session_name_variation1.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test session_name() function : variation
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_name([string $name])
+ * Description : Get and/or set the current session name
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_name() : variation ***\n";
+
+var_dump(session_name("\0"));
+var_dump(session_start());
+var_dump(session_name());
+var_dump(session_destroy());
+var_dump(session_name());
+
+var_dump(session_name("\t"));
+var_dump(session_start());
+var_dump(session_name());
+var_dump(session_destroy());
+var_dump(session_name());
+
+var_dump(session_name(""));
+var_dump(session_start());
+var_dump(session_name());
+var_dump(session_destroy());
+var_dump(session_name());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_name() : variation ***
+string(9) "PHPSESSID"
+bool(true)
+string(0) ""
+bool(true)
+string(0) ""
+string(0) ""
+bool(true)
+string(1) " "
+bool(true)
+string(1) " "
+string(1) " "
+bool(true)
+string(0) ""
+bool(true)
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_name_variation2.phpt b/ext/session/tests/session_name_variation2.phpt
new file mode 100644
index 000000000..84bfeba74
--- /dev/null
+++ b/ext/session/tests/session_name_variation2.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test session_name() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.name=blah
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_name([string $name])
+ * Description : Get and/or set the current session name
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_name() : variation ***\n";
+
+var_dump(session_name());
+var_dump(session_name("blah"));
+var_dump(session_start());
+var_dump(session_name());
+var_dump(session_destroy());
+var_dump(session_name());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_name() : variation ***
+string(4) "blah"
+string(4) "blah"
+bool(true)
+string(4) "blah"
+bool(true)
+string(4) "blah"
+Done
+
diff --git a/ext/session/tests/session_regenerate_id_basic.phpt b/ext/session/tests/session_regenerate_id_basic.phpt
new file mode 100644
index 000000000..910620a66
--- /dev/null
+++ b/ext/session/tests/session_regenerate_id_basic.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test session_regenerate_id() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_regenerate_id([bool $delete_old_session])
+ * Description : Update the current session id with a newly generated one
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_regenerate_id() : basic functionality ***\n";
+
+var_dump(session_id());
+var_dump(session_regenerate_id());
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_regenerate_id());
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(session_regenerate_id());
+var_dump(session_id());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_regenerate_id() : basic functionality ***
+string(0) ""
+bool(false)
+string(0) ""
+bool(true)
+bool(true)
+string(%d) "%s"
+bool(true)
+bool(false)
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_regenerate_id_error.phpt b/ext/session/tests/session_regenerate_id_error.phpt
new file mode 100644
index 000000000..9e119f17f
--- /dev/null
+++ b/ext/session/tests/session_regenerate_id_error.phpt
@@ -0,0 +1,174 @@
+--TEST--
+Test session_regenerate_id() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_regenerate_id([bool $delete_old_session])
+ * Description : Update the current session id with a newly generated one
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_regenerate_id() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_regenerate_id($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_regenerate_id() : error functionality ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+
+Warning: session_regenerate_id() expects parameter 1 to be boolean, object given in %s on line %d
+NULL
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+
+Warning: session_regenerate_id() expects parameter 1 to be boolean, resource given in %s on line %d
+NULL
+Done
+
diff --git a/ext/session/tests/session_regenerate_id_variation1.phpt b/ext/session/tests/session_regenerate_id_variation1.phpt
new file mode 100644
index 000000000..95d4a77c8
--- /dev/null
+++ b/ext/session/tests/session_regenerate_id_variation1.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test session_regenerate_id() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_regenerate_id([bool $delete_old_session])
+ * Description : Update the current session id with a newly generated one
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_regenerate_id() : variation ***\n";
+
+var_dump(session_id());
+var_dump(session_regenerate_id(TRUE));
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_regenerate_id(TRUE));
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(session_regenerate_id(TRUE));
+var_dump(session_id());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_regenerate_id() : variation ***
+string(0) ""
+bool(false)
+string(0) ""
+bool(true)
+bool(true)
+string(%d) "%s"
+bool(true)
+bool(false)
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_register_basic.phpt b/ext/session/tests/session_register_basic.phpt
new file mode 100644
index 000000000..75ae97286
--- /dev/null
+++ b/ext/session/tests/session_register_basic.phpt
@@ -0,0 +1,317 @@
+--TEST--
+Test session_register() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_register(mixed $name [,mixed $...])
+ * Description : Register one or more global variables with the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_register() : basic functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_start());
+ var_dump(session_register($input));
+ var_dump($_SESSION);
+ var_dump(session_destroy());
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_register() : basic functionality ***
+
+-- Iteration 1 --
+bool(true)
+bool(true)
+array(1) {
+ ["0"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 2 --
+bool(true)
+bool(true)
+array(1) {
+ ["1"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 3 --
+bool(true)
+bool(true)
+array(1) {
+ ["12345"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 4 --
+bool(true)
+bool(true)
+array(1) {
+ ["-2345"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 5 --
+bool(true)
+bool(true)
+array(1) {
+ ["10.5"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+bool(true)
+array(1) {
+ ["-10.5"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+bool(true)
+array(1) {
+ ["123456789000"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 8 --
+bool(true)
+bool(true)
+array(1) {
+ ["1.23456789E-9"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 9 --
+bool(true)
+bool(true)
+array(1) {
+ ["0.5"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 10 --
+bool(true)
+bool(true)
+array(1) {
+ [""]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 11 --
+bool(true)
+bool(true)
+array(1) {
+ [""]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+bool(true)
+array(1) {
+ ["1"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 13 --
+bool(true)
+bool(true)
+array(1) {
+ [""]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 14 --
+bool(true)
+bool(true)
+array(1) {
+ ["1"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 15 --
+bool(true)
+bool(true)
+array(1) {
+ [""]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+bool(true)
+array(1) {
+ [""]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+bool(true)
+array(1) {
+ [""]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+bool(true)
+array(1) {
+ ["Nothing"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 19 --
+bool(true)
+bool(true)
+array(1) {
+ ["Nothing"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+bool(true)
+array(1) {
+ ["Hello World!"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+bool(true)
+array(1) {
+ ["Hello World!"]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 22 --
+bool(true)
+bool(true)
+array(1) {
+ [""]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 23 --
+bool(true)
+bool(true)
+array(1) {
+ [""]=>
+ NULL
+}
+bool(true)
+
+-- Iteration 24 --
+bool(true)
+bool(true)
+array(1) {
+ ["Resource id #%d"]=>
+ NULL
+}
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_register_variation1.phpt b/ext/session/tests/session_register_variation1.phpt
new file mode 100644
index 000000000..4f40a095b
--- /dev/null
+++ b/ext/session/tests/session_register_variation1.phpt
@@ -0,0 +1,158 @@
+--TEST--
+Test session_register() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_register(mixed $name [,mixed $...])
+ * Description : Register one or more global variables with the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_register() : variation ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_register($inputs));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_register() : variation ***
+bool(true)
+array(0) {
+}
+bool(true)
+array(13) {
+ ["0"]=>
+ NULL
+ ["1"]=>
+ NULL
+ ["12345"]=>
+ NULL
+ ["-2345"]=>
+ NULL
+ ["10.5"]=>
+ NULL
+ ["-10.5"]=>
+ NULL
+ ["123456789000"]=>
+ NULL
+ ["1.23456789E-9"]=>
+ NULL
+ ["0.5"]=>
+ NULL
+ [""]=>
+ NULL
+ ["Nothing"]=>
+ NULL
+ ["Hello World!"]=>
+ NULL
+ ["Resource id #%d"]=>
+ NULL
+}
+bool(true)
+array(13) {
+ ["0"]=>
+ NULL
+ ["1"]=>
+ NULL
+ ["12345"]=>
+ NULL
+ ["-2345"]=>
+ NULL
+ ["10.5"]=>
+ NULL
+ ["-10.5"]=>
+ NULL
+ ["123456789000"]=>
+ NULL
+ ["1.23456789E-9"]=>
+ NULL
+ ["0.5"]=>
+ NULL
+ [""]=>
+ NULL
+ ["Nothing"]=>
+ NULL
+ ["Hello World!"]=>
+ NULL
+ ["Resource id #%d"]=>
+ NULL
+}
+Done
+
diff --git a/ext/session/tests/session_register_variation2.phpt b/ext/session/tests/session_register_variation2.phpt
new file mode 100644
index 000000000..11189c597
--- /dev/null
+++ b/ext/session/tests/session_register_variation2.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test session_register() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_register(mixed $name [,mixed $...])
+ * Description : Register one or more global variables with the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_register() : variation ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_register());
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_register() : variation ***
+bool(true)
+array(0) {
+}
+bool(false)
+array(0) {
+}
+bool(true)
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_register_variation3.phpt b/ext/session/tests/session_register_variation3.phpt
new file mode 100644
index 000000000..7051dea93
--- /dev/null
+++ b/ext/session/tests/session_register_variation3.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test session_register() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_register(mixed $name [,mixed $...])
+ * Description : Register one or more global variables with the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_register() : variation ***\n";
+
+$blah = "Hello World!";
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_register("blah"));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_register() : variation ***
+bool(true)
+array(0) {
+}
+bool(true)
+array(1) {
+ ["blah"]=>
+ NULL
+}
+bool(true)
+array(1) {
+ ["blah"]=>
+ NULL
+}
+Done
+
diff --git a/ext/session/tests/session_register_variation4.phpt b/ext/session/tests/session_register_variation4.phpt
new file mode 100644
index 000000000..384133ee6
--- /dev/null
+++ b/ext/session/tests/session_register_variation4.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test session_register() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_register(mixed $name [,mixed $...])
+ * Description : Register one or more global variables with the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_register() : variation ***\n";
+
+$blah = "Hello World!";
+$foo = &$blah;
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_register("foo"));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_register() : variation ***
+bool(true)
+array(0) {
+}
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+bool(true)
+array(1) {
+ ["foo"]=>
+ NULL
+}
+Done
+
diff --git a/ext/session/tests/session_save_path_basic.phpt b/ext/session/tests/session_save_path_basic.phpt
new file mode 100644
index 000000000..2895f46c0
--- /dev/null
+++ b/ext/session/tests/session_save_path_basic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test session_save_path() function : basic functionality
+--INI--
+session.gc_probability=0
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_save_path([string $path])
+ * Description : Get and/or set the current session save path
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_save_path() : error functionality ***\n";
+
+$directory = dirname(__FILE__);
+var_dump(session_save_path());
+var_dump(session_save_path($directory));
+var_dump(session_save_path());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_save_path() : error functionality ***
+string(0) ""
+string(0) ""
+string(%d) "%s"
+Done
+
diff --git a/ext/session/tests/session_save_path_error.phpt b/ext/session/tests/session_save_path_error.phpt
new file mode 100644
index 000000000..b58e73133
--- /dev/null
+++ b/ext/session/tests/session_save_path_error.phpt
@@ -0,0 +1,176 @@
+--TEST--
+Test session_save_path() function : error functionality
+--INI--
+session.gc_probability=0
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_save_path([string $path])
+ * Description : Get and/or set the current session save path
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_save_path() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+session_start();
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_save_path($input));
+ $iterator++;
+};
+
+session_destroy();
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_save_path() : error functionality ***
+
+-- Iteration 1 --
+string(0) ""
+
+-- Iteration 2 --
+string(1) "0"
+
+-- Iteration 3 --
+string(1) "1"
+
+-- Iteration 4 --
+string(5) "12345"
+
+-- Iteration 5 --
+string(5) "-2345"
+
+-- Iteration 6 --
+string(4) "10.5"
+
+-- Iteration 7 --
+string(5) "-10.5"
+
+-- Iteration 8 --
+string(12) "123456789000"
+
+-- Iteration 9 --
+string(13) "1.23456789E-9"
+
+-- Iteration 10 --
+string(3) "0.5"
+
+-- Iteration 11 --
+string(0) ""
+
+-- Iteration 12 --
+string(0) ""
+
+-- Iteration 13 --
+string(1) "1"
+
+-- Iteration 14 --
+string(0) ""
+
+-- Iteration 15 --
+string(1) "1"
+
+-- Iteration 16 --
+string(0) ""
+
+-- Iteration 17 --
+string(0) ""
+
+-- Iteration 18 --
+string(0) ""
+
+-- Iteration 19 --
+string(7) "Nothing"
+
+-- Iteration 20 --
+string(7) "Nothing"
+
+-- Iteration 21 --
+string(12) "Hello World!"
+
+-- Iteration 22 --
+string(12) "Hello World!"
+
+-- Iteration 23 --
+string(0) ""
+
+-- Iteration 24 --
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_save_path_variation1.phpt b/ext/session/tests/session_save_path_variation1.phpt
new file mode 100644
index 000000000..d5f64d985
--- /dev/null
+++ b/ext/session/tests/session_save_path_variation1.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test session_save_path() function : variation
+--INI--
+session.gc_probability=0
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_save_path([string $path])
+ * Description : Get and/or set the current session save path
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_save_path() : variation ***\n";
+
+$directory = dirname(__FILE__);
+var_dump(session_save_path());
+var_dump(session_start());
+var_dump(session_save_path());
+var_dump(session_save_path($directory));
+var_dump(session_save_path());
+var_dump(session_destroy());
+var_dump(session_save_path());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_save_path() : variation ***
+string(0) ""
+bool(true)
+string(0) ""
+string(0) ""
+string(%d) "%s"
+bool(true)
+string(%d) "%s"
+Done
+
diff --git a/ext/session/tests/session_save_path_variation2.phpt b/ext/session/tests/session_save_path_variation2.phpt
new file mode 100644
index 000000000..6b0848031
--- /dev/null
+++ b/ext/session/tests/session_save_path_variation2.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test session_save_path() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=files
+session.gc_probability=0
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_save_path([string $path])
+ * Description : Get and/or set the current session save path
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_save_path() : variation ***\n";
+
+ini_set("session.save_path", "/blah");
+var_dump(ini_get("session.save_path"));
+var_dump(session_start());
+var_dump(ini_get("session.save_path"));
+var_dump(session_destroy());
+var_dump(ini_get("session.save_path"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_save_path() : variation ***
+string(5) "/blah"
+
+Warning: session_start(): open(%s, O_RDWR) failed: No such file or directory (2) in %s on line %d
+bool(true)
+string(5) "/blah"
+bool(true)
+string(5) "/blah"
+Done
diff --git a/ext/session/tests/session_save_path_variation3.phpt b/ext/session/tests/session_save_path_variation3.phpt
new file mode 100644
index 000000000..b064f3018
--- /dev/null
+++ b/ext/session/tests/session_save_path_variation3.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test session_save_path() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=files
+session.gc_probability=0
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_save_path([string $path])
+ * Description : Get and/or set the current session save path
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_save_path() : variation ***\n";
+
+ini_set("session.save_path", "/blah");
+var_dump(session_save_path());
+var_dump(session_start());
+var_dump(session_save_path());
+var_dump(session_destroy());
+var_dump(session_save_path());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_save_path() : variation ***
+string(5) "/blah"
+
+Warning: session_start(): open(%s, O_RDWR) failed: No such file or directory (2) in %s on line %d
+bool(true)
+string(5) "/blah"
+bool(true)
+string(5) "/blah"
+Done
diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt
new file mode 100644
index 000000000..453645d31
--- /dev/null
+++ b/ext/session/tests/session_save_path_variation4.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Test session_save_path() function : variation
+--SKIPIF--
+<?php include('skipif.inc');
+if(substr(PHP_OS, 0, 3) != "WIN")
+ die("skip Only for Windows");
+?>
+--INI--
+open_basedir=.
+session.save_handler=files
+session.save_path=
+session.name=PHPSESSID
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_save_path([string $path])
+ * Description : Get and/or set the current session save path
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_save_path() : variation ***\n";
+$directory = dirname(__FILE__);
+$sessions = ($directory."/sessions");
+
+chdir($directory);
+
+// Delete the existing directory
+if (file_exists($sessions) === TRUE) {
+ @rmdir($sessions);
+}
+
+var_dump(mkdir($sessions));
+var_dump(chdir($sessions));
+ini_set("session.save_path", $directory);
+var_dump(session_save_path());
+var_dump(session_start());
+var_dump(session_save_path());
+var_dump(session_destroy());
+var_dump(session_save_path());
+var_dump(rmdir($sessions));
+
+echo "Done";
+ob_end_flush();
+?>
+--CLEAN--
+$directory = dirname(__FILE__);
+$sessions = ($directory."/sessions");
+var_dump(rmdir($sessions));
+--EXPECTF--
+*** Testing session_save_path() : variation ***
+bool(true)
+bool(true)
+
+Warning: ini_set(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d
+string(0) ""
+
+Warning: session_start(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d
+
+Fatal error: session_start(): Failed to initialize storage module: files (path: ) in %s on line %d
+
diff --git a/ext/session/tests/session_save_path_variation5.phpt b/ext/session/tests/session_save_path_variation5.phpt
new file mode 100644
index 000000000..4f1f98892
--- /dev/null
+++ b/ext/session/tests/session_save_path_variation5.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Test session_save_path() function : variation
+--SKIPIF--
+<?php include('skipif.inc');
+if(substr(PHP_OS, 0, 3) == "WIN")
+ die("skip Not for Windows");
+?>
+--INI--
+open_basedir=.
+session.save_handler=files
+session.save_path=
+session.name=PHPSESSID
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_save_path([string $path])
+ * Description : Get and/or set the current session save path
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_save_path() : variation ***\n";
+$directory = dirname(__FILE__);
+$sessions = ($directory."/sessions");
+
+chdir($directory);
+
+// Delete the existing directory
+if (file_exists($sessions) === TRUE) {
+ @rmdir($sessions);
+}
+
+var_dump(mkdir($sessions));
+var_dump(chdir($sessions));
+ini_set("session.save_path", $directory);
+var_dump(session_save_path());
+var_dump(session_start());
+var_dump(session_save_path());
+var_dump(session_destroy());
+var_dump(session_save_path());
+var_dump(rmdir($sessions));
+
+echo "Done";
+ob_end_flush();
+?>
+--CLEAN--
+$directory = dirname(__FILE__);
+$sessions = ($directory."/sessions");
+var_dump(rmdir($sessions));
+--EXPECTF--
+*** Testing session_save_path() : variation ***
+bool(true)
+bool(true)
+
+Warning: ini_set(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d
+string(0) ""
+bool(true)
+string(0) ""
+bool(true)
+string(0) ""
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_set_cookie_params_basic.phpt b/ext/session/tests/session_set_cookie_params_basic.phpt
new file mode 100644
index 000000000..5055d1c69
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_basic.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test session_set_cookie_params() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : basic functionality ***\n";
+
+var_dump(session_set_cookie_params(3600));
+var_dump(session_start());
+var_dump(session_set_cookie_params(1800));
+var_dump(session_destroy());
+var_dump(session_set_cookie_params(1234567890));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : basic functionality ***
+NULL
+bool(true)
+NULL
+bool(true)
+NULL
+Done
+
diff --git a/ext/session/tests/session_set_cookie_params_error.phpt b/ext/session/tests/session_set_cookie_params_error.phpt
new file mode 100644
index 000000000..389387f6a
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_error.phpt
@@ -0,0 +1,298 @@
+--TEST--
+Test session_set_cookie_params() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_set_cookie_params($input));
+ var_dump(session_set_cookie_params(1234567890, $input));
+ var_dump(session_set_cookie_params(1234567890, "blah", $input));
+ var_dump(session_set_cookie_params(1234567890, "blah", "foo", $input));
+ var_dump(session_set_cookie_params(1234567890, "blah", "foo", TRUE, $input));
+ var_dump(session_set_cookie_params(1234567890, "blah", "foo", TRUE, FALSE));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : error functionality ***
+
+-- Iteration 1 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 2 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 3 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 4 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 5 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 6 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 7 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 8 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 9 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 10 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 11 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 12 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 13 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 14 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 15 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 16 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 17 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 18 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 19 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 20 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 21 --
+NULL
+NULL
+NULL
+
+Notice: Object of class classA could not be converted to int in %s on line %d
+NULL
+
+Notice: Object of class classA could not be converted to int in %s on line %d
+NULL
+NULL
+
+-- Iteration 22 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 23 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+
+-- Iteration 24 --
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+Done
+
diff --git a/ext/session/tests/session_set_cookie_params_variation1.phpt b/ext/session/tests/session_set_cookie_params_variation1.phpt
new file mode 100644
index 000000000..02b901f3c
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_variation1.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test session_set_cookie_params() function : variation
+--INI--
+session.cookie_lifetime=3600
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : variation ***\n";
+
+var_dump(ini_get("session.cookie_lifetime"));
+var_dump(session_set_cookie_params(3600));
+var_dump(ini_get("session.cookie_lifetime"));
+var_dump(session_start());
+var_dump(ini_get("session.cookie_lifetime"));
+var_dump(session_set_cookie_params(1800));
+var_dump(ini_get("session.cookie_lifetime"));
+var_dump(session_destroy());
+var_dump(ini_get("session.cookie_lifetime"));
+var_dump(session_set_cookie_params(1234567890));
+var_dump(ini_get("session.cookie_lifetime"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : variation ***
+string(4) "3600"
+NULL
+string(4) "3600"
+bool(true)
+string(4) "3600"
+NULL
+string(4) "1800"
+bool(true)
+string(4) "1800"
+NULL
+string(10) "1234567890"
+Done
+
diff --git a/ext/session/tests/session_set_cookie_params_variation2.phpt b/ext/session/tests/session_set_cookie_params_variation2.phpt
new file mode 100644
index 000000000..5d7a01096
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_variation2.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test session_set_cookie_params() function : variation
+--INI--
+session.cookie_path=/path
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : variation ***\n";
+
+var_dump(ini_get("session.cookie_path"));
+var_dump(session_set_cookie_params(3600, "/foo"));
+var_dump(ini_get("session.cookie_path"));
+var_dump(session_start());
+var_dump(ini_get("session.cookie_path"));
+var_dump(session_set_cookie_params(3600, "/blah"));
+var_dump(ini_get("session.cookie_path"));
+var_dump(session_destroy());
+var_dump(ini_get("session.cookie_path"));
+var_dump(session_set_cookie_params(3600, "/guff"));
+var_dump(ini_get("session.cookie_path"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : variation ***
+string(5) "/path"
+NULL
+string(4) "/foo"
+bool(true)
+string(4) "/foo"
+NULL
+string(5) "/blah"
+bool(true)
+string(5) "/blah"
+NULL
+string(5) "/guff"
+Done
+
diff --git a/ext/session/tests/session_set_cookie_params_variation3.phpt b/ext/session/tests/session_set_cookie_params_variation3.phpt
new file mode 100644
index 000000000..5e8f0ff57
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_variation3.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test session_set_cookie_params() function : variation
+--INI--
+session.cookie_domain=foo
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : variation ***\n";
+
+var_dump(ini_get("session.cookie_domain"));
+var_dump(session_set_cookie_params(3600, "/path", "blah"));
+var_dump(ini_get("session.cookie_domain"));
+var_dump(session_start());
+var_dump(ini_get("session.cookie_domain"));
+var_dump(session_set_cookie_params(3600, "/path", "guff"));
+var_dump(ini_get("session.cookie_domain"));
+var_dump(session_destroy());
+var_dump(ini_get("session.cookie_domain"));
+var_dump(session_set_cookie_params(3600, "/path", "foo"));
+var_dump(ini_get("session.cookie_domain"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : variation ***
+string(3) "foo"
+NULL
+string(4) "blah"
+bool(true)
+string(4) "blah"
+NULL
+string(4) "guff"
+bool(true)
+string(4) "guff"
+NULL
+string(3) "foo"
+Done
+
diff --git a/ext/session/tests/session_set_cookie_params_variation4.phpt b/ext/session/tests/session_set_cookie_params_variation4.phpt
new file mode 100644
index 000000000..7b825968f
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_variation4.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test session_set_cookie_params() function : variation
+--INI--
+session.cookie_secure=TRUE
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : variation ***\n";
+
+var_dump(ini_get("session.cookie_secure"));
+var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE));
+var_dump(ini_get("session.cookie_secure"));
+var_dump(session_start());
+var_dump(ini_get("session.cookie_secure"));
+var_dump(session_set_cookie_params(3600, "/path", "blah", TRUE));
+var_dump(ini_get("session.cookie_secure"));
+var_dump(session_destroy());
+var_dump(ini_get("session.cookie_secure"));
+var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE));
+var_dump(ini_get("session.cookie_secure"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : variation ***
+string(1) "1"
+NULL
+string(1) "0"
+bool(true)
+string(1) "0"
+NULL
+string(1) "1"
+bool(true)
+string(1) "1"
+NULL
+string(1) "0"
+Done
+
diff --git a/ext/session/tests/session_set_cookie_params_variation5.phpt b/ext/session/tests/session_set_cookie_params_variation5.phpt
new file mode 100644
index 000000000..29559f7fd
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_variation5.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test session_set_cookie_params() function : variation
+--INI--
+session.cookie_httponly=TRUE
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : variation ***\n";
+
+var_dump(ini_get("session.cookie_httponly"));
+var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, FALSE));
+var_dump(ini_get("session.cookie_httponly"));
+var_dump(session_start());
+var_dump(ini_get("session.cookie_httponly"));
+var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, TRUE));
+var_dump(ini_get("session.cookie_httponly"));
+var_dump(session_destroy());
+var_dump(ini_get("session.cookie_httponly"));
+var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, FALSE));
+var_dump(ini_get("session.cookie_httponly"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : variation ***
+string(1) "1"
+NULL
+string(1) "0"
+bool(true)
+string(1) "0"
+NULL
+string(1) "1"
+bool(true)
+string(1) "1"
+NULL
+string(1) "0"
+Done
+
diff --git a/ext/session/tests/session_set_save_handler_basic.phpt b/ext/session/tests/session_set_save_handler_basic.phpt
new file mode 100644
index 000000000..3897ba9a9
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_basic.phpt
@@ -0,0 +1,95 @@
+--TEST--
+Test session_set_save_handler() function : basic functionality
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : basic functionality ***\n";
+
+require_once "save_handler.inc";
+var_dump(session_module_name());
+var_dump(session_module_name(FALSE));
+var_dump(session_module_name("blah"));
+var_dump(session_module_name("foo"));
+
+$path = dirname(__FILE__);
+session_save_path($path);
+session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
+
+session_start();
+$_SESSION["Blah"] = "Hello World!";
+$_SESSION["Foo"] = FALSE;
+$_SESSION["Guff"] = 1234567890;
+var_dump($_SESSION);
+
+session_write_close();
+session_unset();
+var_dump($_SESSION);
+
+echo "Starting session again..!\n";
+session_id($session_id);
+session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
+session_start();
+var_dump($_SESSION);
+session_write_close();
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : basic functionality ***
+
+string(%d) "%s"
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+
+Warning: session_module_name(): Cannot find named PHP session module (blah) in %s on line %d
+bool(false)
+
+Warning: session_module_name(): Cannot find named PHP session module (foo) in %s on line %d
+bool(false)
+Open [%s,PHPSESSID]
+Read [%s,%s]
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+Write [%s,%s,Blah|s:12:"Hello World!";Foo|b:0;Guff|i:1234567890;]
+Close [%s,PHPSESSID]
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+Starting session again..!
+Open [%s,PHPSESSID]
+Read [%s,%s]
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+Write [%s,%s,Blah|s:12:"Hello World!";Foo|b:0;Guff|i:1234567890;]
+Close [%s,PHPSESSID]
diff --git a/ext/session/tests/session_set_save_handler_error.phpt b/ext/session/tests/session_set_save_handler_error.phpt
new file mode 100644
index 000000000..bf9d25de5
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_error.phpt
@@ -0,0 +1,218 @@
+--TEST--
+Test session_set_save_handler() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_set_save_handler($input, NULL, NULL, NULL, NULL, NULL));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : error functionality ***
+
+-- Iteration 1 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
+bool(false)
+Done
+
diff --git a/ext/session/tests/session_set_save_handler_error2.phpt b/ext/session/tests/session_set_save_handler_error2.phpt
new file mode 100644
index 000000000..03ba3b04d
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_error2.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test session_set_save_handler() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : error functionality ***\n";
+
+function open($save_path, $session_name) { return true; }
+function close() { return true; }
+function read($id) { return false; }
+function write($id, $session_data) { }
+function destroy($id) { return true; }
+function gc($maxlifetime) { return true; }
+
+session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
+
+session_start();
+$_SESSION["Blah"] = "Hello World!";
+$_SESSION["Foo"] = FALSE;
+$_SESSION["Guff"] = 1234567890;
+var_dump($_SESSION);
+
+session_write_close();
+var_dump($_SESSION);
+session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
+session_start();
+var_dump($_SESSION);
+session_destroy();
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : error functionality ***
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+array(0) {
+}
+
diff --git a/ext/session/tests/session_set_save_handler_error3.phpt b/ext/session/tests/session_set_save_handler_error3.phpt
new file mode 100644
index 000000000..446ef7b75
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_error3.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test session_set_save_handler() function : error functionality
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : error functionality ***\n";
+function open($save_path, $session_name) {
+ throw new Exception("Do something bad..!");
+}
+
+function close() { return true; }
+function read($id) { return false; }
+function write($id, $session_data) { }
+function destroy($id) { return true; }
+function gc($maxlifetime) { return true; }
+
+session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
+session_start();
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : error functionality ***
+
+Fatal error: Uncaught exception 'Exception' with message 'Do something bad..!' in %s:%d
+Stack trace:
+#0 [internal function]: open('', 'PHPSESSID')
+#1 %s(%d): session_start()
+#2 {main}
+ thrown in %s on line %d
+
diff --git a/ext/session/tests/session_set_save_handler_error4.phpt b/ext/session/tests/session_set_save_handler_error4.phpt
new file mode 100644
index 000000000..4debde5b0
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_error4.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test session_set_save_handler() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : error functionality ***\n";
+
+function callback() { }
+
+session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
+session_set_save_handler("callback", "echo", "callback", "callback", "callback", "callback");
+session_set_save_handler("callback", "callback", "echo", "callback", "callback", "callback");
+session_set_save_handler("callback", "callback", "callback", "echo", "callback", "callback");
+session_set_save_handler("callback", "callback", "callback", "callback", "echo", "callback");
+session_set_save_handler("callback", "callback", "callback", "callback", "callback", "echo");
+session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
+session_start();
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : error functionality ***
+
+Warning: session_set_save_handler(): Argument 2 is not a valid callback in %s on line %d
+
+Warning: session_set_save_handler(): Argument 3 is not a valid callback in %s on line %d
+
+Warning: session_set_save_handler(): Argument 4 is not a valid callback in %s on line %d
+
+Warning: session_set_save_handler(): Argument 5 is not a valid callback in %s on line %d
+
+Warning: session_set_save_handler(): Argument 6 is not a valid callback in %s on line %d
+
diff --git a/ext/session/tests/session_set_save_handler_variation1.phpt b/ext/session/tests/session_set_save_handler_variation1.phpt
new file mode 100644
index 000000000..fe1d2b0b5
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_variation1.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test session_set_save_handler() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : variation ***\n";
+
+var_dump(session_module_name());
+var_dump(session_module_name(FALSE));
+var_dump(session_module_name());
+var_dump(session_module_name("blah"));
+var_dump(session_module_name());
+var_dump(session_module_name("files"));
+var_dump(session_module_name());
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : variation ***
+string(%d) "%s"
+
+Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
+bool(false)
+string(%d) "%s"
+
+Warning: session_module_name(): Cannot find named PHP session module (blah) in %s on line %d
+bool(false)
+string(%d) "%s"
+string(%d) "%s"
+string(5) "files"
diff --git a/ext/session/tests/session_set_save_handler_variation2.phpt b/ext/session/tests/session_set_save_handler_variation2.phpt
new file mode 100644
index 000000000..1c019bb5a
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_variation2.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test session_set_save_handler() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : variation ***\n";
+
+require_once "save_handler.inc";
+$path = dirname(__FILE__);
+session_save_path($path);
+var_dump(session_start());
+var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc"));
+var_dump(session_destroy());
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : variation ***
+
+bool(true)
+bool(false)
+bool(true)
+
diff --git a/ext/session/tests/session_set_save_handler_variation3.phpt b/ext/session/tests/session_set_save_handler_variation3.phpt
new file mode 100644
index 000000000..774d0db48
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_variation3.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test session_set_save_handler() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.auto_start=1
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : variation ***\n";
+
+require_once "save_handler.inc";
+$path = dirname(__FILE__);
+session_save_path($path);
+var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc"));
+var_dump(session_destroy());
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : variation ***
+
+bool(false)
+bool(true)
+
diff --git a/ext/session/tests/session_set_save_handler_variation4.phpt b/ext/session/tests/session_set_save_handler_variation4.phpt
new file mode 100644
index 000000000..3485f2373
--- /dev/null
+++ b/ext/session/tests/session_set_save_handler_variation4.phpt
@@ -0,0 +1,83 @@
+--TEST--
+Test session_set_save_handler() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.gc_probability=1
+session.gc_divisor=1
+session.gc_maxlifetime=0
+session.save_path=
+session.name=PHPSESSID
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
+ * Description : Sets user-level session storage functions
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_save_handler() : variation ***\n";
+
+function noisy_gc($maxlifetime) {
+ echo("GC [".$maxlifetime."]\n");
+ gc($maxlifetime);
+}
+
+require_once "save_handler.inc";
+$path = dirname(__FILE__);
+session_save_path($path);
+session_set_save_handler("open", "close", "read", "write", "destroy", "noisy_gc");
+
+session_start();
+$_SESSION["Blah"] = "Hello World!";
+$_SESSION["Foo"] = FALSE;
+$_SESSION["Guff"] = 1234567890;
+var_dump($_SESSION);
+$session_id = session_id();
+var_dump(session_write_close());
+
+session_set_save_handler("open", "close", "read", "write", "destroy", "noisy_gc");
+session_id($session_id);
+session_start();
+var_dump($_SESSION);
+var_dump(session_destroy());
+
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_save_handler() : variation ***
+
+Open [%s,PHPSESSID]
+Read [%s,%s]
+GC [0]
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+Write [%s,%s,Blah|s:12:"Hello World!";Foo|b:0;Guff|i:1234567890;]
+Close [%s,PHPSESSID]
+NULL
+Open [%s,PHPSESSID]
+Read [%s,%s]
+GC [0]
+array(3) {
+ ["Blah"]=>
+ string(12) "Hello World!"
+ ["Foo"]=>
+ bool(false)
+ ["Guff"]=>
+ int(1234567890)
+}
+Destroy [%s,%s]
+
+Warning: unlink(%s): No such file or directory in %s on line %d
+Close [%s,PHPSESSID]
+bool(true)
+
diff --git a/ext/session/tests/session_start_error.phpt b/ext/session/tests/session_start_error.phpt
new file mode 100644
index 000000000..8cbf42c86
--- /dev/null
+++ b/ext/session/tests/session_start_error.phpt
@@ -0,0 +1,195 @@
+--TEST--
+Test session_start() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_start($input));
+ var_dump(session_destroy());
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : error functionality ***
+
+-- Iteration 1 --
+bool(true)
+bool(true)
+
+-- Iteration 2 --
+bool(true)
+bool(true)
+
+-- Iteration 3 --
+bool(true)
+bool(true)
+
+-- Iteration 4 --
+bool(true)
+bool(true)
+
+-- Iteration 5 --
+bool(true)
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+bool(true)
+
+-- Iteration 8 --
+bool(true)
+bool(true)
+
+-- Iteration 9 --
+bool(true)
+bool(true)
+
+-- Iteration 10 --
+bool(true)
+bool(true)
+
+-- Iteration 11 --
+bool(true)
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+bool(true)
+
+-- Iteration 13 --
+bool(true)
+bool(true)
+
+-- Iteration 14 --
+bool(true)
+bool(true)
+
+-- Iteration 15 --
+bool(true)
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+bool(true)
+
+-- Iteration 19 --
+bool(true)
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+bool(true)
+
+-- Iteration 22 --
+bool(true)
+bool(true)
+
+-- Iteration 23 --
+bool(true)
+bool(true)
+
+-- Iteration 24 --
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_start_variation1.phpt b/ext/session/tests/session_start_variation1.phpt
new file mode 100644
index 000000000..1c8f3eb3b
--- /dev/null
+++ b/ext/session/tests/session_start_variation1.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_start());
+var_dump(session_start());
+var_dump(session_start());
+var_dump(session_start());
+
+session_destroy();
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+bool(true)
+
+Notice: A session had already been started - ignoring session_start() in %s on line %d
+bool(true)
+
+Notice: A session had already been started - ignoring session_start() in %s on line %d
+bool(true)
+
+Notice: A session had already been started - ignoring session_start() in %s on line %d
+bool(true)
+
+Notice: A session had already been started - ignoring session_start() in %s on line %d
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_start_variation2.phpt b/ext/session/tests/session_start_variation2.phpt
new file mode 100644
index 000000000..6c9b29e3e
--- /dev/null
+++ b/ext/session/tests/session_start_variation2.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_start());
+var_dump(session_destroy());
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_start_variation3.phpt b/ext/session/tests/session_start_variation3.phpt
new file mode 100644
index 000000000..e87f84bce
--- /dev/null
+++ b/ext/session/tests/session_start_variation3.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_write_close());
+var_dump(session_start());
+var_dump(session_write_close());
+var_dump(session_start());
+var_dump(session_write_close());
+var_dump(session_start());
+var_dump(session_write_close());
+var_dump(session_start());
+var_dump(session_write_close());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+bool(true)
+NULL
+bool(true)
+NULL
+bool(true)
+NULL
+bool(true)
+NULL
+bool(true)
+NULL
+
+Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
+bool(false)
+Done
+
diff --git a/ext/session/tests/session_start_variation4.phpt b/ext/session/tests/session_start_variation4.phpt
new file mode 100644
index 000000000..42895493a
--- /dev/null
+++ b/ext/session/tests/session_start_variation4.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+$_SESSION['blah'] = 'foo';
+var_dump($_SESSION);
+session_start();
+var_dump($_SESSION);
+
+session_destroy();
+echo "Done";
+ob_end_flush();
+
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+array(1) {
+ ["blah"]=>
+ string(3) "foo"
+}
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_start_variation5.phpt b/ext/session/tests/session_start_variation5.phpt
new file mode 100644
index 000000000..4dcafac33
--- /dev/null
+++ b/ext/session/tests/session_start_variation5.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+session_start();
+
+$_SESSION['colour'] = 'green';
+$_SESSION['animal'] = 'cat';
+$_SESSION['person'] = 'julia';
+$_SESSION['age'] = 6;
+
+var_dump($_SESSION);
+var_dump(session_write_close());
+var_dump($_SESSION);
+
+session_start();
+session_destroy();
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+array(4) {
+ ["colour"]=>
+ string(5) "green"
+ ["animal"]=>
+ string(3) "cat"
+ ["person"]=>
+ string(5) "julia"
+ ["age"]=>
+ int(6)
+}
+NULL
+array(4) {
+ ["colour"]=>
+ string(5) "green"
+ ["animal"]=>
+ string(3) "cat"
+ ["person"]=>
+ string(5) "julia"
+ ["age"]=>
+ int(6)
+}
+Done
+
diff --git a/ext/session/tests/session_start_variation6.phpt b/ext/session/tests/session_start_variation6.phpt
new file mode 100644
index 000000000..378554bbe
--- /dev/null
+++ b/ext/session/tests/session_start_variation6.phpt
@@ -0,0 +1,69 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+session_start();
+
+$_SESSION['colour'] = 'green';
+$_SESSION['animal'] = 'cat';
+$_SESSION['person'] = 'julia';
+$_SESSION['age'] = 6;
+
+var_dump($_SESSION);
+var_dump(session_write_close());
+var_dump($_SESSION);
+session_start();
+var_dump($_SESSION);
+
+session_destroy();
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+array(4) {
+ ["colour"]=>
+ string(5) "green"
+ ["animal"]=>
+ string(3) "cat"
+ ["person"]=>
+ string(5) "julia"
+ ["age"]=>
+ int(6)
+}
+NULL
+array(4) {
+ ["colour"]=>
+ string(5) "green"
+ ["animal"]=>
+ string(3) "cat"
+ ["person"]=>
+ string(5) "julia"
+ ["age"]=>
+ int(6)
+}
+array(4) {
+ ["colour"]=>
+ string(5) "green"
+ ["animal"]=>
+ string(3) "cat"
+ ["person"]=>
+ string(5) "julia"
+ ["age"]=>
+ int(6)
+}
+Done
+
diff --git a/ext/session/tests/session_start_variation7.phpt b/ext/session/tests/session_start_variation7.phpt
new file mode 100644
index 000000000..be079f335
--- /dev/null
+++ b/ext/session/tests/session_start_variation7.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+session_start();
+
+$_SESSION['colour'] = 'green';
+$_SESSION['animal'] = 'cat';
+$_SESSION['person'] = 'julia';
+$_SESSION['age'] = 6;
+
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+session_start();
+var_dump($_SESSION);
+
+session_destroy();
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+array(4) {
+ ["colour"]=>
+ string(5) "green"
+ ["animal"]=>
+ string(3) "cat"
+ ["person"]=>
+ string(5) "julia"
+ ["age"]=>
+ int(6)
+}
+bool(true)
+array(4) {
+ ["colour"]=>
+ string(5) "green"
+ ["animal"]=>
+ string(3) "cat"
+ ["person"]=>
+ string(5) "julia"
+ ["age"]=>
+ int(6)
+}
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_start_variation8.phpt b/ext/session/tests/session_start_variation8.phpt
new file mode 100644
index 000000000..936547527
--- /dev/null
+++ b/ext/session/tests/session_start_variation8.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(session_id());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+string(0) ""
+bool(true)
+string(%d) "%s"
+bool(true)
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_start_variation9.phpt b/ext/session/tests/session_start_variation9.phpt
new file mode 100644
index 000000000..21523e065
--- /dev/null
+++ b/ext/session/tests/session_start_variation9.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.auto_start=1
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_start(void)
+ * Description : Initialize session data
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_start() : variation ***\n";
+
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_destroy());
+var_dump(session_id());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_start() : variation ***
+string(%d) "%s"
+
+Notice: A session had already been started - ignoring session_start() in %s on line %d
+bool(true)
+string(%d) "%s"
+bool(true)
+string(0) ""
+Done
+
diff --git a/ext/session/tests/session_unregister_basic.phpt b/ext/session/tests/session_unregister_basic.phpt
new file mode 100644
index 000000000..8ce512693
--- /dev/null
+++ b/ext/session/tests/session_unregister_basic.phpt
@@ -0,0 +1,176 @@
+--TEST--
+Test session_unregister() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_unregister(string $name)
+ * Description : Unregister a global variable from the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_unregister() : basic functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+var_dump(session_start());
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_unregister($input));
+ $iterator++;
+};
+
+var_dump(session_destroy());
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_unregister() : basic functionality ***
+bool(true)
+
+-- Iteration 1 --
+bool(true)
+
+-- Iteration 2 --
+bool(true)
+
+-- Iteration 3 --
+bool(true)
+
+-- Iteration 4 --
+bool(true)
+
+-- Iteration 5 --
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+
+-- Iteration 7 --
+bool(true)
+
+-- Iteration 8 --
+bool(true)
+
+-- Iteration 9 --
+bool(true)
+
+-- Iteration 10 --
+bool(true)
+
+-- Iteration 11 --
+bool(true)
+
+-- Iteration 12 --
+bool(true)
+
+-- Iteration 13 --
+bool(true)
+
+-- Iteration 14 --
+bool(true)
+
+-- Iteration 15 --
+bool(true)
+
+-- Iteration 16 --
+bool(true)
+
+-- Iteration 17 --
+bool(true)
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(true)
+
+-- Iteration 23 --
+bool(true)
+
+-- Iteration 24 --
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_unregister_variation1.phpt b/ext/session/tests/session_unregister_variation1.phpt
new file mode 100644
index 000000000..f6de13ed9
--- /dev/null
+++ b/ext/session/tests/session_unregister_variation1.phpt
@@ -0,0 +1,158 @@
+--TEST--
+Test session_unregister() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_unregister(string $name)
+ * Description : Unregister a global variable from the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_unregister() : variation ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_register($inputs));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_unregister() : variation ***
+bool(true)
+array(0) {
+}
+bool(true)
+array(13) {
+ ["0"]=>
+ NULL
+ ["1"]=>
+ NULL
+ ["12345"]=>
+ NULL
+ ["-2345"]=>
+ NULL
+ ["10.5"]=>
+ NULL
+ ["-10.5"]=>
+ NULL
+ ["123456789000"]=>
+ NULL
+ ["1.23456789E-9"]=>
+ NULL
+ ["0.5"]=>
+ NULL
+ [""]=>
+ NULL
+ ["Nothing"]=>
+ NULL
+ ["Hello World!"]=>
+ NULL
+ ["Resource id #%d"]=>
+ NULL
+}
+bool(true)
+array(13) {
+ ["0"]=>
+ NULL
+ ["1"]=>
+ NULL
+ ["12345"]=>
+ NULL
+ ["-2345"]=>
+ NULL
+ ["10.5"]=>
+ NULL
+ ["-10.5"]=>
+ NULL
+ ["123456789000"]=>
+ NULL
+ ["1.23456789E-9"]=>
+ NULL
+ ["0.5"]=>
+ NULL
+ [""]=>
+ NULL
+ ["Nothing"]=>
+ NULL
+ ["Hello World!"]=>
+ NULL
+ ["Resource id #%d"]=>
+ NULL
+}
+Done
+
diff --git a/ext/session/tests/session_unregister_variation2.phpt b/ext/session/tests/session_unregister_variation2.phpt
new file mode 100644
index 000000000..cd5778877
--- /dev/null
+++ b/ext/session/tests/session_unregister_variation2.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test session_unregister() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_unregister(string $name)
+ * Description : Unregister a global variable from the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_unregister() : variation ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+$_SESSION["foo"] = "Hello World!";
+var_dump($_SESSION);
+var_dump(session_unregister("foo"));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_unregister() : variation ***
+bool(true)
+array(0) {
+}
+array(1) {
+ ["foo"]=>
+ string(12) "Hello World!"
+}
+bool(true)
+array(0) {
+}
+bool(true)
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_unregister_variation3.phpt b/ext/session/tests/session_unregister_variation3.phpt
new file mode 100644
index 000000000..97609266d
--- /dev/null
+++ b/ext/session/tests/session_unregister_variation3.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test session_unregister() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_unregister(string $name)
+ * Description : Unregister a global variable from the current session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_unregister() : variation ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+$blah = "Hello World!";
+$_SESSION["foo"] = &$blah;
+var_dump($_SESSION);
+var_dump(session_unregister("foo"));
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_unregister() : variation ***
+bool(true)
+array(0) {
+}
+array(1) {
+ ["foo"]=>
+ &string(12) "Hello World!"
+}
+bool(true)
+array(0) {
+}
+bool(true)
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_unset_basic.phpt b/ext/session/tests/session_unset_basic.phpt
new file mode 100644
index 000000000..21b12c4dd
--- /dev/null
+++ b/ext/session/tests/session_unset_basic.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test session_unset() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_unset(void)
+ * Description : Free all session variables
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_unset() : basic functionality ***\n";
+
+var_dump(session_start());
+$_SESSION["foo"] = "Hello World!";
+var_dump($_SESSION);
+var_dump(session_unset());
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_unset() : basic functionality ***
+bool(true)
+array(1) {
+ ["foo"]=>
+ string(12) "Hello World!"
+}
+NULL
+array(0) {
+}
+bool(true)
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_unset_error.phpt b/ext/session/tests/session_unset_error.phpt
new file mode 100644
index 000000000..947834550
--- /dev/null
+++ b/ext/session/tests/session_unset_error.phpt
@@ -0,0 +1,170 @@
+--TEST--
+Test session_unset() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_unset(void)
+ * Description : Free all session variables
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_unset() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_unset($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_unset() : error functionality ***
+
+-- Iteration 1 --
+bool(false)
+
+-- Iteration 2 --
+bool(false)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+bool(false)
+
+-- Iteration 20 --
+bool(false)
+
+-- Iteration 21 --
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+Done
+
diff --git a/ext/session/tests/session_unset_variation1.phpt b/ext/session/tests/session_unset_variation1.phpt
new file mode 100644
index 000000000..17ab283a1
--- /dev/null
+++ b/ext/session/tests/session_unset_variation1.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test session_unset() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_unset(void)
+ * Description : Free all session variables
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_unset() : variation ***\n";
+
+var_dump(session_unset());
+var_dump(session_start());
+var_dump(session_unset());
+$_SESSION["foo"] = "Hello World!";
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump(session_unset());
+var_dump($_SESSION);
+var_dump(session_unset());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_unset() : variation ***
+bool(false)
+bool(true)
+NULL
+array(1) {
+ ["foo"]=>
+ string(12) "Hello World!"
+}
+bool(true)
+bool(false)
+array(1) {
+ ["foo"]=>
+ string(12) "Hello World!"
+}
+bool(false)
+Done
+
diff --git a/ext/session/tests/session_write_close_basic.phpt b/ext/session/tests/session_write_close_basic.phpt
new file mode 100644
index 000000000..0841afed9
--- /dev/null
+++ b/ext/session/tests/session_write_close_basic.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test session_write_close() function : basic functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_write_close(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_write_close() : basic functionality ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_write_close());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_destroy());
+var_dump($_SESSION);
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_write_close() : basic functionality ***
+bool(true)
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+array(0) {
+}
+bool(true)
+array(0) {
+}
+Done
+
diff --git a/ext/session/tests/session_write_close_error.phpt b/ext/session/tests/session_write_close_error.phpt
new file mode 100644
index 000000000..cbdb55f26
--- /dev/null
+++ b/ext/session/tests/session_write_close_error.phpt
@@ -0,0 +1,170 @@
+--TEST--
+Test session_write_close() function : error functionality
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_write_close(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_write_close() : error functionality ***\n";
+
+// Get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class classA
+{
+ public function __toString() {
+ return "Hello World!";
+ }
+}
+
+$heredoc = <<<EOT
+Hello World!
+EOT;
+
+$fp = fopen(__FILE__, "r");
+
+// Unexpected values to be passed as arguments
+$inputs = array(
+
+ // Integer data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // Float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // Null data
+/*10*/ NULL,
+ null,
+
+ // Boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // Empty strings
+/*16*/ "",
+ '',
+
+ // Invalid string data
+/*18*/ "Nothing",
+ 'Nothing',
+ $heredoc,
+
+ // Object data
+/*21*/ new classA(),
+
+ // Undefined data
+/*22*/ @$undefined_var,
+
+ // Unset data
+/*23*/ @$unset_var,
+
+ // Resource variable
+/*24*/ $fp
+);
+
+
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(session_write_close($input));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_write_close() : error functionality ***
+
+-- Iteration 1 --
+NULL
+
+-- Iteration 2 --
+NULL
+
+-- Iteration 3 --
+NULL
+
+-- Iteration 4 --
+NULL
+
+-- Iteration 5 --
+NULL
+
+-- Iteration 6 --
+NULL
+
+-- Iteration 7 --
+NULL
+
+-- Iteration 8 --
+NULL
+
+-- Iteration 9 --
+NULL
+
+-- Iteration 10 --
+NULL
+
+-- Iteration 11 --
+NULL
+
+-- Iteration 12 --
+NULL
+
+-- Iteration 13 --
+NULL
+
+-- Iteration 14 --
+NULL
+
+-- Iteration 15 --
+NULL
+
+-- Iteration 16 --
+NULL
+
+-- Iteration 17 --
+NULL
+
+-- Iteration 18 --
+NULL
+
+-- Iteration 19 --
+NULL
+
+-- Iteration 20 --
+NULL
+
+-- Iteration 21 --
+NULL
+
+-- Iteration 22 --
+NULL
+
+-- Iteration 23 --
+NULL
+
+-- Iteration 24 --
+NULL
+Done
+
diff --git a/ext/session/tests/session_write_close_variation1.phpt b/ext/session/tests/session_write_close_variation1.phpt
new file mode 100644
index 000000000..595796dbe
--- /dev/null
+++ b/ext/session/tests/session_write_close_variation1.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test session_write_close() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_write_close(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_write_close() : variation ***\n";
+
+var_dump(session_start());
+var_dump(session_write_close());
+var_dump(session_write_close());
+var_dump(session_write_close());
+var_dump(session_write_close());
+var_dump(session_write_close());
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_write_close() : variation ***
+bool(true)
+NULL
+NULL
+NULL
+NULL
+NULL
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_write_close_variation2.phpt b/ext/session/tests/session_write_close_variation2.phpt
new file mode 100644
index 000000000..40871c5cd
--- /dev/null
+++ b/ext/session/tests/session_write_close_variation2.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test session_write_close() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_write_close(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_write_close() : variation ***\n";
+
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_write_close());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_write_close());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump($_SESSION);
+var_dump(session_write_close());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_write_close() : variation ***
+bool(true)
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_write_close_variation3.phpt b/ext/session/tests/session_write_close_variation3.phpt
new file mode 100644
index 000000000..0f8061662
--- /dev/null
+++ b/ext/session/tests/session_write_close_variation3.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test session_start() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.auto_start=1
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_write_close(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_write_close() : variation ***\n";
+
+var_dump($_SESSION);
+var_dump(session_write_close());
+var_dump($_SESSION);
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_write_close() : variation ***
+array(0) {
+}
+NULL
+array(0) {
+}
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/session/tests/session_write_close_variation4.phpt b/ext/session/tests/session_write_close_variation4.phpt
new file mode 100644
index 000000000..249c1555c
--- /dev/null
+++ b/ext/session/tests/session_write_close_variation4.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test session_write_close() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : bool session_write_close(void)
+ * Description : Write session data and end session
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_write_close() : variation ***\n";
+
+var_dump(session_id("test"));
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_write_close());
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_write_close());
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id());
+var_dump(session_write_close());
+var_dump(session_id());
+var_dump(session_start());
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_write_close() : variation ***
+string(0) ""
+bool(true)
+string(4) "test"
+NULL
+string(4) "test"
+bool(true)
+string(4) "test"
+NULL
+string(4) "test"
+bool(true)
+string(4) "test"
+NULL
+string(4) "test"
+bool(true)
+bool(true)
+Done
+
diff --git a/ext/shmop/php_shmop.h b/ext/shmop/php_shmop.h
index 73c9da6bc..53b27d5c3 100644
--- a/ext/shmop/php_shmop.h
+++ b/ext/shmop/php_shmop.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index c3e60199f..85bd89968 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP version 4 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
| Ilia Alshanetsky <ilia@prohost.org> |
+----------------------------------------------------------------------+
*/
-/* $Id: shmop.c,v 1.31.2.2.2.5 2007/02/24 16:36:56 iliaa Exp $ */
+/* $Id: shmop.c,v 1.31.2.2.2.6 2007/12/31 07:20:10 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h
index 52411cb19..34d371c35 100644
--- a/ext/simplexml/php_simplexml.h
+++ b/ext/simplexml/php_simplexml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_simplexml.h,v 1.20.2.2.2.3 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_simplexml.h,v 1.20.2.2.2.4 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_SIMPLEXML_H
#define PHP_SIMPLEXML_H
diff --git a/ext/simplexml/php_simplexml_exports.h b/ext/simplexml/php_simplexml_exports.h
index 20766b910..9f01afb31 100755
--- a/ext/simplexml/php_simplexml_exports.h
+++ b/ext/simplexml/php_simplexml_exports.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_simplexml_exports.h,v 1.3.2.3.2.1 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_simplexml_exports.h,v 1.3.2.3.2.2 2007/12/31 07:20:10 sebastian Exp $ */
#ifndef PHP_SIMPLEXML_EXPORTS_H
#define PHP_SIMPLEXML_EXPORTS_H
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index a4c7b138e..42020aa9e 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c,v 1.151.2.22.2.35 2007/07/31 15:40:49 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.39 2008/03/20 16:48:45 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -422,19 +422,12 @@ static void change_node_zval(xmlNodePtr node, zval *value TSRMLS_DC)
convert_to_string(value);
/* break missing intentionally */
case IS_STRING:
- if (node->type == XML_ATTRIBUTE_NODE) {
- buffer = xmlEncodeEntitiesReentrant(node->doc, (xmlChar *)Z_STRVAL_P(value));
- buffer_len = xmlStrlen(buffer);
- } else {
- buffer = (xmlChar *)Z_STRVAL_P(value);
- buffer_len = Z_STRLEN_P(value);
- }
+ buffer = xmlEncodeEntitiesReentrant(node->doc, (xmlChar *)Z_STRVAL_P(value));
+ buffer_len = xmlStrlen(buffer);
/* check for NULL buffer in case of memory error in xmlEncodeEntitiesReentrant */
if (buffer) {
xmlNodeSetContentLen(node, buffer, buffer_len);
- if (node->type == XML_ATTRIBUTE_NODE) {
- xmlFree(buffer);
- }
+ xmlFree(buffer);
}
if (value == &value_copy) {
zval_dtor(value);
@@ -1635,6 +1628,13 @@ SXE_METHOD(addAttribute)
localname = xmlSplitQName2((xmlChar *)qname, &prefix);
if (localname == NULL) {
+ if (nsuri_len > 0) {
+ if (prefix != NULL) {
+ xmlFree(prefix);
+ }
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attribute requires prefix for namespace");
+ return;
+ }
localname = xmlStrdup((xmlChar *)qname);
}
@@ -1733,6 +1733,11 @@ static int sxe_object_cast(zval *readobj, zval *writeobj, int type TSRMLS_DC)
}
}
+ if (readobj == writeobj) {
+ INIT_PZVAL(writeobj);
+ zval_dtor(readobj);
+ }
+
rv = cast_object(writeobj, type, (char *)contents TSRMLS_CC);
if (contents) {
@@ -2440,7 +2445,7 @@ PHP_MINFO_FUNCTION(simplexml)
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.35 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.39 $");
php_info_print_table_row(2, "Schema support",
#ifdef LIBXML_SCHEMAS_ENABLED
"enabled");
diff --git a/ext/simplexml/tests/bug42369.phpt b/ext/simplexml/tests/bug42369.phpt
new file mode 100644
index 000000000..e5df81460
--- /dev/null
+++ b/ext/simplexml/tests/bug42369.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #42369 (Implicit conversion to string leaks memory)
+--SKIPIF--
+<?php if (!extension_loaded('simplexml')) echo 'skip simplexml extension is not loaded'; >
+--FILE--
+<?php
+ $xml = '<?xml version="1.0" encoding="utf-8"?>';
+ $x = simplexml_load_string($xml . "<q><x>foo</x></q>");
+
+ echo 'explicit conversion' . PHP_EOL;
+ for ($i = 0; $i < 100000; $i++) {
+ md5(strval($x->x));
+ }
+
+ echo 'no conversion' . PHP_EOL;
+ for ($i = 0; $i < 100000; $i++) {
+ md5($x->x);
+ }
+
+ echo 'done' . PHP_EOL;
+?>
+--EXPECT--
+explicit conversion
+no conversion
+done \ No newline at end of file
diff --git a/ext/simplexml/tests/bug43221.phpt b/ext/simplexml/tests/bug43221.phpt
new file mode 100644
index 000000000..6973d091c
--- /dev/null
+++ b/ext/simplexml/tests/bug43221.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #43221 (SimpleXML adding default namespace in addAttribute)
+--FILE--
+<?php
+$xml = simplexml_load_string('<?xml version="1.0" encoding="utf-8"?><root />');
+$n = $xml->addChild("node", "value");
+$n->addAttribute("a", "b");
+$n->addAttribute("c", "d", "http://bar.com");
+$n->addAttribute("foo:e", "f", "http://bar.com");
+print_r($xml->asXml());
+?>
+--EXPECTF--
+Warning: SimpleXMLElement::addAttribute(): Attribute requires prefix for namespace in %sbug43221.php on line %d
+<?xml version="1.0" encoding="utf-8"?>
+<root><node xmlns:foo="http://bar.com" a="b" foo:e="f">value</node></root> \ No newline at end of file
diff --git a/ext/simplexml/tests/bug44478.phpt b/ext/simplexml/tests/bug44478.phpt
new file mode 100644
index 000000000..5c21d75c8
--- /dev/null
+++ b/ext/simplexml/tests/bug44478.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #44478 (Inconsistent behaviour when assigning new nodes)
+--FILE--
+<?php
+$xml_element = new simpleXMLElement('<root></root>');
+$xml_element->node1 = 'a &#38; b';
+print $xml_element->node1."\n";
+$xml_element->node1 = 'a &#38; b';
+print $xml_element->node1."\n";
+$xml_element->addChild('node2','a &#38; b');
+print $xml_element->node2."\n";
+$xml_element->node2 = 'a & b';
+print $xml_element->node2."\n";
+
+print $xml_element->asXML();
+
+?>
+--EXPECTF--
+a &#38; b
+a &#38; b
+a & b
+a & b
+<?xml version="1.0"?>
+<root><node1>a &amp;#38; b</node1><node2>a &amp; b</node2></root>
diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h
index 68ac1fd05..b4a4757f0 100644
--- a/ext/snmp/php_snmp.h
+++ b/ext/snmp/php_snmp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_snmp.h,v 1.25.2.1.2.2 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_snmp.h,v 1.25.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef PHP_SNMP_H
#define PHP_SNMP_H
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 302f009ab..7bbe8f0cb 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snmp.c,v 1.106.2.2.2.5 2007/07/09 13:42:05 jani Exp $ */
+/* $Id: snmp.c,v 1.106.2.2.2.6 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index d7a8b347c..eac079ac4 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_encoding.c,v 1.103.2.21.2.38 2007/10/17 12:08:45 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.103.2.21.2.39 2007/12/31 07:20:11 sebastian Exp $ */
#include <time.h>
diff --git a/ext/soap/php_encoding.h b/ext/soap/php_encoding.h
index f894ffa68..48ae6992d 100644
--- a/ext/soap/php_encoding.h
+++ b/ext/soap/php_encoding.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_encoding.h,v 1.38.2.3.2.4 2007/04/02 13:43:08 dmitry Exp $ */
+/* $Id: php_encoding.h,v 1.38.2.3.2.5 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef PHP_ENCODING_H
#define PHP_ENCODING_H
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index 2776a8e26..19aaa53a5 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.c,v 1.77.2.11.2.13 2007/10/17 11:17:46 dmitry Exp $ */
+/* $Id: php_http.c,v 1.77.2.11.2.15 2008/04/08 14:11:49 jorton Exp $ */
#include "php_soap.h"
#include "ext/standard/base64.h"
@@ -33,7 +33,7 @@ static int get_http_headers(php_stream *socketd,char **response, int *out_size T
static int stream_alive(php_stream *stream TSRMLS_DC)
{
- long socket;
+ int socket;
char buf;
/* maybe better to use:
diff --git a/ext/soap/php_http.h b/ext/soap/php_http.h
index f4125b85a..5dec5a344 100644
--- a/ext/soap/php_http.h
+++ b/ext/soap/php_http.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.h,v 1.16.2.1.2.1 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_http.h,v 1.16.2.1.2.2 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef PHP_HTTP_H
#define PHP_HTTP_H
diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c
index de7dbd14c..18e9698c4 100644
--- a/ext/soap/php_packet_soap.c
+++ b/ext/soap/php_packet_soap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_packet_soap.c,v 1.42.2.1.2.4 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_packet_soap.c,v 1.42.2.1.2.5 2007/12/31 07:20:11 sebastian Exp $ */
#include "php_soap.h"
diff --git a/ext/soap/php_packet_soap.h b/ext/soap/php_packet_soap.h
index 47167fb61..2a9712eb2 100644
--- a/ext/soap/php_packet_soap.h
+++ b/ext/soap/php_packet_soap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_packet_soap.h,v 1.10.2.1.2.1 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_packet_soap.h,v 1.10.2.1.2.2 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef PHP_PACKET_SOAP_H
#define PHP_PACKET_SOAP_H
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index fb60b08ac..55bc9e66b 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_schema.c,v 1.58.2.6.2.6 2007/08/31 10:48:45 dmitry Exp $ */
+/* $Id: php_schema.c,v 1.58.2.6.2.7 2007/12/31 07:20:11 sebastian Exp $ */
#include "php_soap.h"
#include "libxml/uri.h"
diff --git a/ext/soap/php_schema.h b/ext/soap/php_schema.h
index 6acf476ee..17cab24c7 100644
--- a/ext/soap/php_schema.h
+++ b/ext/soap/php_schema.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_schema.h,v 1.13.2.2.2.1 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_schema.h,v 1.13.2.2.2.2 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef PHP_SCHEMA_H
#define PHP_SCHEMA_H
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index ba53cdc6e..8e2475898 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_sdl.c,v 1.88.2.12.2.9 2007/05/21 13:13:50 dmitry Exp $ */
+/* $Id: php_sdl.c,v 1.88.2.12.2.10 2007/12/31 07:20:11 sebastian Exp $ */
#include "php_soap.h"
#include "ext/libxml/php_libxml.h"
diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h
index d8e098368..8a9eb7c57 100644
--- a/ext/soap/php_sdl.h
+++ b/ext/soap/php_sdl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_sdl.h,v 1.37.2.3.2.2 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_sdl.h,v 1.37.2.3.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef PHP_SDL_H
#define PHP_SDL_H
diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h
index 9229dcef1..95758a612 100644
--- a/ext/soap/php_soap.h
+++ b/ext/soap/php_soap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_soap.h,v 1.38.2.6.2.6 2007/09/05 11:20:45 dmitry Exp $ */
+/* $Id: php_soap.h,v 1.38.2.6.2.8 2008/01/09 16:45:28 dmitry Exp $ */
#ifndef PHP_SOAP_H
#define PHP_SOAP_H
@@ -160,7 +160,9 @@ ZEND_BEGIN_MODULE_GLOBALS(soap)
zend_bool use_soap_error_handler;
char* error_code;
zval* error_object;
- long cache;
+ char cache;
+ char cache_mode;
+ char cache_enabled;
char* cache_dir;
long cache_ttl;
long cache_limit;
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 1912e36b0..4da4738f0 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_xml.c,v 1.25.2.1.2.2 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_xml.c,v 1.25.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#include "php_soap.h"
#include "libxml/parser.h"
diff --git a/ext/soap/php_xml.h b/ext/soap/php_xml.h
index 4a1da587b..24e4480c4 100644
--- a/ext/soap/php_xml.h
+++ b/ext/soap/php_xml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_xml.h,v 1.17.2.1.2.2 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_xml.h,v 1.17.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef PHP_SOAP_XML_H
#define PHP_SOAP_XML_H
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index d11e8e7e4..a20c7860e 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.156.2.28.2.33 2007/11/01 15:41:13 dmitry Exp $ */
+/* $Id: soap.c,v 1.156.2.28.2.39 2008/03/04 12:23:10 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -384,41 +384,47 @@ ZEND_GET_MODULE(soap)
ZEND_INI_MH(OnUpdateCacheEnabled)
{
- long *p;
+ if (OnUpdateBool(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) {
+ return FAILURE;
+ }
+ if (SOAP_GLOBAL(cache_enabled)) {
+ SOAP_GLOBAL(cache) = SOAP_GLOBAL(cache_mode);
+ } else {
+ SOAP_GLOBAL(cache) = 0;
+ }
+ return SUCCESS;
+}
+
+ZEND_INI_MH(OnUpdateCacheMode)
+{
+ char *p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
- char *base;
-
- base = (char *) ts_resource(*((int *) mh_arg2));
+ char *base = (char *) ts_resource(*((int *) mh_arg2));
#endif
- p = (long*) (base+(size_t) mh_arg1);
+ p = (char*) (base+(size_t) mh_arg1);
+
+ *p = (char)atoi(new_value);
- if (new_value_length==2 && strcasecmp("on", new_value)==0) {
- *p = 1;
- }
- else if (new_value_length==3 && strcasecmp("yes", new_value)==0) {
- *p = 1;
- }
- else if (new_value_length==4 && strcasecmp("true", new_value)==0) {
- *p = 1;
- }
- else {
- *p = (long) (atoi(new_value) != 0);
+ if (SOAP_GLOBAL(cache_enabled)) {
+ SOAP_GLOBAL(cache) = SOAP_GLOBAL(cache_mode);
+ } else {
+ SOAP_GLOBAL(cache) = 0;
}
return SUCCESS;
}
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("soap.wsdl_cache_enabled", "1", PHP_INI_ALL, OnUpdateCacheEnabled,
- cache, zend_soap_globals, soap_globals)
+ cache_enabled, zend_soap_globals, soap_globals)
STD_PHP_INI_ENTRY("soap.wsdl_cache_dir", "/tmp", PHP_INI_ALL, OnUpdateString,
cache_dir, zend_soap_globals, soap_globals)
STD_PHP_INI_ENTRY("soap.wsdl_cache_ttl", "86400", PHP_INI_ALL, OnUpdateLong,
cache_ttl, zend_soap_globals, soap_globals)
-STD_PHP_INI_ENTRY("soap.wsdl_cache", "1", PHP_INI_ALL, OnUpdateLong,
- cache, zend_soap_globals, soap_globals)
+STD_PHP_INI_ENTRY("soap.wsdl_cache", "1", PHP_INI_ALL, OnUpdateCacheMode,
+ cache_mode, zend_soap_globals, soap_globals)
STD_PHP_INI_ENTRY("soap.wsdl_cache_limit", "5", PHP_INI_ALL, OnUpdateLong,
cache_limit, zend_soap_globals, soap_globals)
PHP_INI_END()
@@ -505,6 +511,7 @@ PHP_RINIT_FUNCTION(soap)
SOAP_GLOBAL(encoding) = NULL;
SOAP_GLOBAL(class_map) = NULL;
SOAP_GLOBAL(features) = 0;
+ SOAP_GLOBAL(ref_map) = NULL;
return SUCCESS;
}
@@ -2001,6 +2008,8 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
char cont_len[30];
int size;
xmlDocPtr doc_return;
+ zval **agent_name;
+ int use_http_error_status = 1;
soap_version = SOAP_GLOBAL(soap_version);
@@ -2008,11 +2017,21 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
xmlDocDumpMemory(doc_return, &buf, &size);
+ zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC);
+ if (PG(http_globals)[TRACK_VARS_SERVER] &&
+ zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name) == SUCCESS &&
+ Z_TYPE_PP(agent_name) == IS_STRING) {
+ if (strncmp(Z_STRVAL_PP(agent_name), "Shockwave Flash", sizeof("Shockwave Flash")-1) == 0) {
+ use_http_error_status = 0;
+ }
+ }
/*
Want to return HTTP 500 but apache wants to over write
our fault code with their own handling... Figure this out later
*/
- sapi_add_header("HTTP/1.1 500 Internal Service Error", sizeof("HTTP/1.1 500 Internal Service Error")-1, 1);
+ if (use_http_error_status) {
+ sapi_add_header("HTTP/1.1 500 Internal Service Error", sizeof("HTTP/1.1 500 Internal Service Error")-1, 1);
+ }
if (soap_version == SOAP_1_2) {
sapi_add_header("Content-Type: application/soap+xml; charset=utf-8", sizeof("Content-Type: application/soap+xml; charset=utf-8")-1, 1);
} else {
@@ -4486,6 +4505,7 @@ static sdlFunctionPtr get_doc_function(sdlPtr sdl, xmlNodePtr params)
break;
}
zend_hash_move_forward((*tmp)->requestParameters);
+ node = node->next;
}
if (ok /*&& node == NULL*/) {
return (*tmp);
diff --git a/ext/soap/tests/any.phpt b/ext/soap/tests/any.phpt
index 3805f3f3a..369e6a221 100755
--- a/ext/soap/tests/any.phpt
+++ b/ext/soap/tests/any.phpt
@@ -4,6 +4,7 @@ SOAP handling of <any>
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/bugs/bug27722.phpt b/ext/soap/tests/bugs/bug27722.phpt
index c06fd5e75..4720bd890 100644
--- a/ext/soap/tests/bugs/bug27722.phpt
+++ b/ext/soap/tests/bugs/bug27722.phpt
@@ -4,6 +4,8 @@ Bug #27722 (Segfault on schema without targetNamespace)
<?php require_once('skipif.inc'); ?>
--GET--
wsdl
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$x = new SoapClient(dirname(__FILE__)."/bug27722.wsdl");
diff --git a/ext/soap/tests/bugs/bug27742.phpt b/ext/soap/tests/bugs/bug27742.phpt
index 1e24fbc2f..66cdf6533 100644
--- a/ext/soap/tests/bugs/bug27742.phpt
+++ b/ext/soap/tests/bugs/bug27742.phpt
@@ -4,6 +4,8 @@ Bug #27742 (WDSL SOAP Parsing Schema bug)
<?php require_once('skipif.inc'); ?>
--GET--
wsdl
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$x = new SoapClient(dirname(__FILE__)."/bug27742.wsdl");
diff --git a/ext/soap/tests/bugs/bug28985.phpt b/ext/soap/tests/bugs/bug28985.phpt
index 795fc3c92..3e1126983 100644
--- a/ext/soap/tests/bugs/bug28985.phpt
+++ b/ext/soap/tests/bugs/bug28985.phpt
@@ -2,6 +2,8 @@
Bug #28985 (__getTypes() returning nothing on complex WSDL)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SOAPClient(dirname(__FILE__).'/bug28985.wsdl', array('trace'=>1));
diff --git a/ext/soap/tests/bugs/bug29061.phpt b/ext/soap/tests/bugs/bug29061.phpt
index 2fe1ebdd0..abede320a 100644
--- a/ext/soap/tests/bugs/bug29061.phpt
+++ b/ext/soap/tests/bugs/bug29061.phpt
@@ -2,6 +2,8 @@
Bug #29061 (soap extension segfaults)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/bug29061.wsdl", array("exceptions"=>0));
diff --git a/ext/soap/tests/bugs/bug29109.phpt b/ext/soap/tests/bugs/bug29109.phpt
index 9b63278dc..a69674ece 100644
--- a/ext/soap/tests/bugs/bug29109.phpt
+++ b/ext/soap/tests/bugs/bug29109.phpt
@@ -2,6 +2,8 @@
Bug #29109 (Uncaught SoapFault exception: [WSDL] Out of memory)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/bug29109.wsdl");
diff --git a/ext/soap/tests/bugs/bug29236.phpt b/ext/soap/tests/bugs/bug29236.phpt
index 674235f8e..d8003e2b6 100644
--- a/ext/soap/tests/bugs/bug29236.phpt
+++ b/ext/soap/tests/bugs/bug29236.phpt
@@ -2,6 +2,8 @@
Bug #29236 (memory error when wsdl-cache is enabled)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=1
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl");
diff --git a/ext/soap/tests/bugs/bug29795.phpt b/ext/soap/tests/bugs/bug29795.phpt
index a99f06c60..db7e6e49f 100644
--- a/ext/soap/tests/bugs/bug29795.phpt
+++ b/ext/soap/tests/bugs/bug29795.phpt
@@ -2,6 +2,8 @@
Bug #29795 (SegFault with Soap and Amazon's Web Services)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=1
--FILE--
<?php
class LocalSoapClient extends SoapClient {
diff --git a/ext/soap/tests/bugs/bug29839.phpt b/ext/soap/tests/bugs/bug29839.phpt
index f14866954..26d63c817 100644
--- a/ext/soap/tests/bugs/bug29839.phpt
+++ b/ext/soap/tests/bugs/bug29839.phpt
@@ -2,6 +2,8 @@
Bug #29839 (incorrect convert (xml:lang to lang))
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
diff --git a/ext/soap/tests/bugs/bug29844.phpt b/ext/soap/tests/bugs/bug29844.phpt
index 86a7cc4d4..d65327a45 100644
--- a/ext/soap/tests/bugs/bug29844.phpt
+++ b/ext/soap/tests/bugs/bug29844.phpt
@@ -2,6 +2,8 @@
Bug #29844 (SOAP doesn't return the result of a valid SOAP request)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
diff --git a/ext/soap/tests/bugs/bug30045.phpt b/ext/soap/tests/bugs/bug30045.phpt
index e51921e99..ab142efe6 100644
--- a/ext/soap/tests/bugs/bug30045.phpt
+++ b/ext/soap/tests/bugs/bug30045.phpt
@@ -5,6 +5,8 @@ Bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests)
if (!extension_loaded('soap')) die('skip soap extension not available');
if (!extension_loaded('simplexml')) die('skip simplexml extension not available');
?>
+--INI--
+soap.wsdl_cache_enabled=1
--FILE--
<?php
diff --git a/ext/soap/tests/bugs/bug32776.phpt b/ext/soap/tests/bugs/bug32776.phpt
index 6736fb4be..10941e670 100644
--- a/ext/soap/tests/bugs/bug32776.phpt
+++ b/ext/soap/tests/bugs/bug32776.phpt
@@ -2,6 +2,8 @@
Bug #32776 (SOAP doesn't support one-way operations)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
diff --git a/ext/soap/tests/bugs/bug34453.phpt b/ext/soap/tests/bugs/bug34453.phpt
index 8e2501761..f186f69d4 100755
--- a/ext/soap/tests/bugs/bug34453.phpt
+++ b/ext/soap/tests/bugs/bug34453.phpt
@@ -2,6 +2,8 @@
Bug #29839 (incorrect convert (xml:lang to lang))
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
diff --git a/ext/soap/tests/bugs/bug35273.phpt b/ext/soap/tests/bugs/bug35273.phpt
index cd238bad1..cc313e1c6 100755
--- a/ext/soap/tests/bugs/bug35273.phpt
+++ b/ext/soap/tests/bugs/bug35273.phpt
@@ -2,6 +2,8 @@
Bug #35273 (Error in mapping soap - java types)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestSoapClient extends SoapClient {
diff --git a/ext/soap/tests/bugs/bug37083.phpt b/ext/soap/tests/bugs/bug37083.phpt
index 471b5e49a..8737a22df 100755
--- a/ext/soap/tests/bugs/bug37083.phpt
+++ b/ext/soap/tests/bugs/bug37083.phpt
@@ -3,7 +3,7 @@ Bug #37083 (Frequent crashs in SOAP extension with new WSDL caching code in mult
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--
-soap.wsdl_cache_enabled=3
+soap.wsdl_cache=3
--FILE--
<?php
class TestSoapClient extends SoapClient {
diff --git a/ext/soap/tests/bugs/bug38004.phpt b/ext/soap/tests/bugs/bug38004.phpt
index 508ccf19d..295d335bf 100755
--- a/ext/soap/tests/bugs/bug38004.phpt
+++ b/ext/soap/tests/bugs/bug38004.phpt
@@ -2,6 +2,8 @@
Bug #38004 (Parameters in SoapServer are decoded twice)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
function Test($param) {
diff --git a/ext/soap/tests/bugs/bug38005.phpt b/ext/soap/tests/bugs/bug38005.phpt
index 5e9e8b81c..2095d0de6 100755
--- a/ext/soap/tests/bugs/bug38005.phpt
+++ b/ext/soap/tests/bugs/bug38005.phpt
@@ -2,6 +2,8 @@
Bug #38005 (SoapFault faultstring doesn't follow encoding rules)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
function Test($param) {
diff --git a/ext/soap/tests/bugs/bug38055.phpt b/ext/soap/tests/bugs/bug38055.phpt
index cec990c86..870490671 100755
--- a/ext/soap/tests/bugs/bug38055.phpt
+++ b/ext/soap/tests/bugs/bug38055.phpt
@@ -2,6 +2,8 @@
Bug #38055 (Wrong interpretation of boolean parameters)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
function Test($param) {
diff --git a/ext/soap/tests/bugs/bug38067.phpt b/ext/soap/tests/bugs/bug38067.phpt
index accea047f..3ab191127 100755
--- a/ext/soap/tests/bugs/bug38067.phpt
+++ b/ext/soap/tests/bugs/bug38067.phpt
@@ -2,6 +2,8 @@
Bug #38067 (Parameters are not decoded from utf-8 when using encoding option)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
function Test($param) {
diff --git a/ext/soap/tests/bugs/bug39815.phpt b/ext/soap/tests/bugs/bug39815.phpt
index 1bc49b1f9..25715bf22 100755
--- a/ext/soap/tests/bugs/bug39815.phpt
+++ b/ext/soap/tests/bugs/bug39815.phpt
@@ -9,6 +9,7 @@ if (!@setlocale(LC_ALL, 'en_US', 'en_US.ISO8859-1')) die('skip en_US locale not
?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
function test(){
diff --git a/ext/soap/tests/bugs/bug42692.phpt b/ext/soap/tests/bugs/bug42692.phpt
new file mode 100755
index 000000000..6511556b5
--- /dev/null
+++ b/ext/soap/tests/bugs/bug42692.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #42692 (Procedure 'int1' not present with doc/lit SoapServer)
+--FILE--
+<?php
+ini_set('soap.wsdl_cache_enabled','0');
+
+function checkAuth($peid,$auth) {
+ return $peid;
+}
+
+class TestSoap extends SoapClient {
+
+ function __construct($wsdl, $options) {
+ parent::__construct($wsdl, $options);
+ $this->server = new SoapServer($wsdl, $options);
+ $this->server->addFunction("checkAuth");
+ }
+
+ function __doRequest($request, $location, $action, $version) {
+ ob_start();
+ $this->server->handle($request);
+ $response = ob_get_contents();
+ ob_end_clean();
+ return $response;
+ }
+}
+
+$client = new TestSoap(dirname(__FILE__) . "/bug42692.wsdl", array("trace"=>1));
+try {
+ $result = $client->checkAuth(1,"two");
+ echo "Auth for 1 is $result\n";
+} catch (Exception $e) {
+ echo $e->getMessage();
+}
+?>
+--EXPECT--
+Auth for 1 is 1
diff --git a/ext/soap/tests/bugs/bug42692.wsdl b/ext/soap/tests/bugs/bug42692.wsdl
new file mode 100755
index 000000000..c8928e30d
--- /dev/null
+++ b/ext/soap/tests/bugs/bug42692.wsdl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="netDB"
+ targetNamespace="urn:netDB"
+ xmlns:typens="urn:netDB"
+ 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:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <message name="checkAuthIN">
+ <part name="peid" type="xsd:integer" />
+ <part name="auth" type="xsd:string" />
+ </message>
+ <message name="checkAuthOUT">
+ <part name="peidx" type="xsd:integer" />
+ </message>
+ <portType name="netDB">
+ <operation name="checkAuth">
+ <input message="typens:checkAuthIN" />
+ <output message="typens:checkAuthOUT" />
+ </operation>
+ </portType>
+ <binding name="netDB" type="typens:netDB">
+ <soap:binding type="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="checkAuth">
+ <soap:operation soapAction="urn:checkAuth" />
+ <input>
+ <soap:body use="encoded" namespace="urn:netDB" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="urn:netDB" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </output>
+ </operation>
+ </binding>
+ <service name="netDB">
+ <port name="netDBPort" binding="typens:netDB">
+ <soap:address location="http://netdb.alphawest.com.au/xml/soap/server.php"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/classmap001.phpt b/ext/soap/tests/classmap001.phpt
index 6ac81aae3..247a1ded7 100644
--- a/ext/soap/tests/classmap001.phpt
+++ b/ext/soap/tests/classmap001.phpt
@@ -2,6 +2,8 @@
SOAP Classmap 1: SoapServer support for classmap
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$GLOBALS['HTTP_RAW_POST_DATA']="
diff --git a/ext/soap/tests/classmap002.phpt b/ext/soap/tests/classmap002.phpt
index e6f5af991..69675a5a2 100644
--- a/ext/soap/tests/classmap002.phpt
+++ b/ext/soap/tests/classmap002.phpt
@@ -2,6 +2,8 @@
SOAP Classmap 2: SoapClient support for classmap
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestSoapClient extends SoapClient{
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt
index 49bcc131e..6c7351864 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt
index 4741ab758..e320d9ab7 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 002 (php/wsdl): echoString(empty)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt
index cf1592ab5..2b8fb5ae2 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 003 (php/wsdl): echoString(NULL)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt
index c1410058c..c13609063 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 004 (php/wsdl): echoString(entities)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
index 7dd127cfb..5746503dc 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 005 (php/wsdl): echoString(utf-8)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt
index e93325a53..c1e06fa51 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 006 (php/wsdl): echoStringArray
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt
index db79df02d..4ce57b6b9 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 007 (php/wsdl): echoStringArray(one)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt
index d545ec1ab..d10752b0f 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 008 (php/wsdl): echoStringArray(empty)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt
index bfe211438..3a0d18e37 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 009 (php/wsdl): echoStringArray(NULL)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt
index 045a4db43..41f45d043 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 010 (php/wsdl): echoInteger
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt
index 2596182ff..c56f2a4f6 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 011 (php/wsdl): echoIntegerArray
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt
index a48ac7b23..f4e8b3f3c 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round2 base 012 (php/wsdl): echoFloat
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt
index 8481de447..31f2a9a32 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round2 base 013 (php/wsdl): echoFloatArray
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt
index 104f244e3..d70ee79de 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round2 base 014 (php/wsdl): echoStruct
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt
index 51d344f24..e8cb17d56 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round2 base 015 (php/wsdl): echoStructArray
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt
index 9b7f95e35..f71d65f46 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 016 (php/wsdl): echoVoid
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt
index c2e836d74..a6f77e323 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 017 (php/wsdl): echoBase64
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt
index e7dce5430..4dcf3e55e 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 018 (php/wsdl): echoHexBinary
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt
index 5cc7c47ee..8ae7e7e0e 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 019 (php/wsdl): echoDecimal
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt
index ac8222157..c3b85352f 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 020 (php/wsdl): echoDate
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt
index 03f8ad5e8..54f825435 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 021 (php/wsdl): echoBoolean
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt
index a516b9dcc..88722dcc6 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 022 (php/wsdl): echoBoolean
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt
index 90d831cb1..f8a6b8766 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 023 (php/wsdl): echoBoolean
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt
index 99dab0b4f..4fefba432 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 base 024 (php/wsdl): echoBoolean
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/round2_base.inc b/ext/soap/tests/interop/Round2/Base/round2_base.inc
index 29879547d..48eaf40f8 100644
--- a/ext/soap/tests/interop/Round2/Base/round2_base.inc
+++ b/ext/soap/tests/interop/Round2/Base/round2_base.inc
@@ -74,6 +74,7 @@ class SOAP_Interop_Base {
}
+ini_set("soap.wsdl_cache_enabled",0);
$server = new SoapServer(dirname(__FILE__)."/round2_base.wsdl");
$server->setClass("SOAP_Interop_Base");
$server->handle($HTTP_RAW_POST_DATA);
diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt
index b47df6a68..8f9f82248 100644
--- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt
+++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round2 groupB 001 (php/wsdl): echoStructAsSimpleTypes
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt
index 610d866be..d04a3aa4c 100644
--- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt
+++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round2 groupB 002 (php/wsdl): echoSimpleTypesAsStruct
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt
index a0c1b21ee..cc5af03e9 100644
--- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt
+++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round2 groupB 003 (php/wsdl): echo2DStringArray
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$param = array(
diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt
index 4393ad9bb..8dd3ae706 100644
--- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt
+++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round2 groupB 004 (php/wsdl): echoNestedStruct
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$param = (object)array(
diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt
index f38866b37..7f76ff38a 100644
--- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt
+++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round2 groupB 005 (php/wsdl): echoNestedArray
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$param = (object)array(
diff --git a/ext/soap/tests/interop/Round2/GroupB/round2_groupB.inc b/ext/soap/tests/interop/Round2/GroupB/round2_groupB.inc
index a40f09cc4..77b81271c 100644
--- a/ext/soap/tests/interop/Round2/GroupB/round2_groupB.inc
+++ b/ext/soap/tests/interop/Round2/GroupB/round2_groupB.inc
@@ -31,6 +31,7 @@ class SOAP_Interop_GroupB {
}
}
+ini_set("soap.wsdl_cache_enabled",0);
$server = new SoapServer(dirname(__FILE__)."/round2_groupB.wsdl");
$server->setClass("SOAP_Interop_GroupB");
$server->handle($HTTP_RAW_POST_DATA);
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt
index 1fef6bae4..632d0a24f 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round3 GroupD Compound1 001 (php/wsdl): echoPerson
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class Person {
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt
index a2b08d801..2d8f91b42 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Compound1 002 (php/wsdl): echoDocument
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt
index a961d118e..a5f818ce9 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Compound1 003 (php/wsdl): echoDocument
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt
index 6534047ad..b5c00bd96 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round3 GroupD Compound2 001 (php/wsdl): echoEmployee
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class Person {
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt
index bacad8691..f3f2ca244 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Doc Lit 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt
index 17301bf7b..03c6b98d3 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Doc Lit 002 (php/wsdl): echoStringArray
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt
index 8529cbd73..32879310f 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round3 GroupD Doc Lit 003 (php/wsdl): echoStruct
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt
index 7193bf85a..cf7098072 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Doc Lit 004 (php/wsdl): echoVoid
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt
index 3b1f17633..7c4403d00 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Doc Lit Parameters 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt
index d44409bf6..a73efd2c7 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Doc Lit Parameters 002 (php/wsdl): echoStringArray
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt
index 0531daf40..118ea91cf 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round3 GroupD Doc Lit Parameters 003 (php/wsdl): echoStruct
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt
index 7ee4aa29a..b3857d338 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Doc Lit Parameters 004 (php/wsdl): echoVoid
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt
index 9c2e756fb..e79a9549f 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD EmptySA 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_emptysa.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt
index 181fc8ad7..eefac74c7 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD Import1 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import1.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt
index 06e403679..00b21a58e 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round3 GroupD Import2 001 (php/wsdl): echoStruct
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt
index 2f7721ab1..d111ad852 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round3 GroupD Import3 001 (php/wsdl): echoStruct
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt
index 29fb6f3e5..47a5a6c01 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round3 GroupD Import3 002 (php/wsdl): echoStructArray
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt
index 26612d0c5..af546c325 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD RPC Encoded 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt
index 5a97eb2fd..4e61a9280 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD RPC Encoded 002 (php/wsdl): echoStringArray
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt
index f8d6cef1d..02f6c907f 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round3 GroupD RPC Encoded 003 (php/wsdl): echoStruct
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt
index 47849f9e0..272a40957 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupD RPC Encoded 004 (php/wsdl): echoVoid
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt
index caa7a9f83..48d7615a2 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupE List 001 (php/wsdl): echoLinkedList
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPList {
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt
index 850052cc1..fe4a6781e 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupE List 002 (php/wsdl): echoLinkedList
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPList {
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt
index db874c48d..803de6335 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupE List 003 (php/wsdl): echoLinkedList
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPList {
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt
index 100492275..03981417f 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupE List 004 (php/wsdl): echoLinkedList
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPList {
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
index 922d7ea2e..a0c068ce0 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupE List 005 (php/wsdl): echoLinkedList (cyclic)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPList {
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
index f51c4afa1..590b6ee3b 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupE List 006 (php/wsdl): echoLinkedList (cyclic)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPList {
diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt
index e9c52e2a7..847bfe08a 100644
--- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupF Extensibility 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupF_ext.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt
index ed6f860f4..29680c654 100644
--- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupF Extensibility Required 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupF_extreq.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt
index cd54939c2..578bfadb4 100644
--- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupF Headers 001 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt
index 5edc550fe..4cee3e1bb 100644
--- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupF Headers 002 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/xsd","Header1", array("int"=>34,"string"=>"arg"));
diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt
index ef7002c63..6a4db2c4e 100644
--- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupF Headers 003 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/xsd","Header2", array("int"=>34,"string"=>"arg"));
diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt
index 60b027ff1..3abe1604c 100644
--- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round3 GroupF Headers 004 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = array(
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt
index 25ddc3af7..dccf40d51 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex Doc Lit 001 (php/wsdl): echoSOAPStructFault
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt
index cbb58ae72..6f3fe53cb 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex Doc Lit 002 (php/wsdl): echoBaseStructFault
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt
index 621574c3d..4b67bc873 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex Doc Lit 003 (php/wsdl): echoExtendedStructFau
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt
index 5309fab21..4838d974c 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex Doc Lit 004 (php/wsdl): echoMultipleFaults1(1
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt
index 24498004f..923f04db4 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex Doc Lit 005 (php/wsdl): echoMultipleFaults1(2
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt
index fd799b666..549218745 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex Doc Lit 006 (php/wsdl): echoMultipleFaults1(3
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt
index 73da00e8e..f79027870 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Complex Doc Lit 007 (php/wsdl): echoMultipleFaults2(1)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt
index 3fa3e6d77..95c79ed19 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Complex Doc Lit 008 (php/wsdl): echoMultipleFaults2(2)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt
index 340c25a8c..c33bc217c 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Complex Doc Lit 009 (php/wsdl): echoMultipleFaults2(3)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt
index c89ac264d..0d6c8c5cb 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Complex Doc Lit 010 (php/wsdl): echoMultipleFaults2(4)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt
index 29998414f..3c3a620cb 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 001 (php/wsdl): echoSOAPStructFault
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt
index a91410586..a4f11975f 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 002 (php/wsdl): echoBaseStructFault
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class BaseStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt
index baf1f13db..7b33e7adb 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 003 (php/wsdl): echoExtendedStructFau
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class BaseStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt
index eb0fc3e73..3e04b180a 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 004 (php/wsdl): echoMultipleFaults1(1
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt
index 45c89a654..7e935dcd1 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 005 (php/wsdl): echoMultipleFaults1(2
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt
index b7e3debaa..9d147c8e8 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 006 (php/wsdl): echoMultipleFaults1(3
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt
index 7b74828d4..3a938c112 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 007 (php/wsdl): echoMultipleFaults2(1
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class BaseStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt
index 6dda13aaa..72fc9468f 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 008 (php/wsdl): echoMultipleFaults2(2
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class BaseStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt
index 1b512166c..429575d9d 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 009 (php/wsdl): echoMultipleFaults2(3
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class BaseStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt
index 7f8ebbe2e..2036992df 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Complex RPC Enc 010 (php/wsdl): echoMultipleFaults2(4
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class BaseStruct {
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt
index ee719f17c..80caaee58 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 001 (php/wsdl): echoEmptyFault
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt
index 7ea0f6f13..943936434 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 002 (php/wsdl): echoStringFault
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt
index 937e49f3a..af589610f 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 003 (php/wsdl): echoIntArrayFault
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt
index 1d2068ada..2f51b54f2 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 004 (php/wsdl): echoMultipleFaults1(1)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt
index 9179233f2..c2fcf8127 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 005 (php/wsdl): echoMultipleFaults1(2)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt
index 7d85cafd8..a25d0563d 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 006 (php/wsdl): echoMultipleFaults1(3)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt
index 023f4d595..55dff3a03 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 007 (php/wsdl): echoMultipleFaults1(4)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt
index b34ed31a8..f4132565e 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 008 (php/wsdl): echoMultipleFaults2(1)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt
index f184f51c7..93d80f5e5 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 009 (php/wsdl): echoMultipleFaults2(2)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt
index dc8416c5b..815cd0070 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 010 (php/wsdl): echoMultipleFaults2(3)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt
index 0992c3574..d73b8f4ad 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 011 (php/wsdl): echoMultipleFaults2(4)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt
index 86a86f4d9..2cacbec5e 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 012 (php/wsdl): echoMultipleFaults3(1)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt
index 7718a4722..894546bd2 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 013 (php/wsdl): echoMultipleFaults3(2)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt
index d35a075f5..982d654cc 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 014 (php/wsdl): echoMultipleFaults3(3)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt
index 2a652e719..08250b0dd 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 015 (php/wsdl): echoMultipleFaults4(1)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt
index 81eb3e98e..75f612aa7 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 016 (php/wsdl): echoMultipleFaults4(2)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt
index 08ca44adc..dcb257b32 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple Doc Lit 017 (php/wsdl): echoMultipleFaults4(3)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt
index 8b9a7d0c3..741b319b1 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 001 (php/wsdl): echoEmptyFault
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt
index 922c7cc9c..a86d9693d 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 002 (php/wsdl): echoStringFault
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt
index 87dd01fa8..ee1287c64 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 003 (php/wsdl): echoIntArrayFault
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt
index abe697f27..b68f97dab 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 004 (php/wsdl): echoMultipleFaults1(1)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt
index b4da77e7a..08cf59efd 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 005 (php/wsdl): echoMultipleFaults1(2)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt
index f49d6fdef..ea555ce00 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 006 (php/wsdl): echoMultipleFaults1(3)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt
index 8decba9bf..62747e96e 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 007 (php/wsdl): echoMultipleFaults1(4)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt
index 7b743bddf..24299a614 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 008 (php/wsdl): echoMultipleFaults2(1)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt
index 792542a63..eb3babd94 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 009 (php/wsdl): echoMultipleFaults2(2)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt
index 784648cda..be57a233b 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 010 (php/wsdl): echoMultipleFaults2(3)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt
index 892638022..00552ab52 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 011 (php/wsdl): echoMultipleFaults2(4)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt
index 5a229348f..05a7cfafe 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 012 (php/wsdl): echoMultipleFaults3(1)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt
index 77b87e64f..a28203231 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 013 (php/wsdl): echoMultipleFaults3(2)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt
index 12e1491ab..aec5a3900 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 014 (php/wsdl): echoMultipleFaults3(3)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt
index 5b79e1d0a..2027f23a6 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 015 (php/wsdl): echoMultipleFaults4(1)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt
index 0d8a9520d..89bc04c91 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 016 (php/wsdl): echoMultipleFaults4(2)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt
index 69471fdde..ad8c875a5 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH Simple RPC Enc 017 (php/wsdl): echoMultipleFaults4(3)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt
index b89bdec4e..9c82d2f60 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH SoapFault 001 (php/wsdl): echoVersionMismatchFault(SOAP 1.1)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt
index 697b514d9..49e78bea3 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH SoapFault 002 (php/wsdl): echoVersionMismatchFault(SOAP 1.2)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0,"soap_version"=>SOAP_1_2));
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_003w.phpt
index 586cc69e2..800283833 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_003w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_003w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH SoapFault 003 (php/wsdl): echoVersionMismatchFault(unknown version)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$HTTP_RAW_POST_DATA = <<<EOF
diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt
index bf8f4f243..117a51e8c 100644
--- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupH SoapFault 004 (php/wsdl): echoMustUnderstandFault
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/wsdl", "UnknownHeaderRequest", "Hello World", 1);
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt
index a6ede9bbb..476b54157 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 001 (php/wsdl): echoVoid
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt
index d72497175..a1921d15d 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 002 (php/wsdl): echoInteger
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt
index d12ecd4d0..01916d2cf 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 003 (php/wsdl): echoFloat
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt
index db71f87e1..528b5d176 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 004 (php/wsdl): echoString
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt
index e741e000a..d51596c1a 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 005 (php/wsdl): echoString(empty)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt
index 566461451..0935a07e1 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt
Binary files differ
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt
index 917419eea..a6f52c943 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 007 (php/wsdl): echoDate
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt
index f8e65cf00..8da2ec096 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 008 (php/wsdl): echoComplexType
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt
index 7388a874c..5a66f12ad 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 009 (php/wsdl): echoComplexType(minOccur=0)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt
index 9a8ea0365..34ea9be96 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 010 (php/wsdl): echoIntegerMultiOccurs
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt
index f0d3c8712..d2051a777 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 011 (php/wsdl): echoFloatMultiOccurs
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt
index 231583dd2..7775a06dc 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 012 (php/wsdl): echoStringMultiOccurs
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt
index 199f91f4f..9f413218c 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 013 (php/wsdl): echoStringMultiOccurs(nil)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt
index 97e816419..dc443c3c3 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 014 (php/wsdl): echoComplexTypeMultiOccurs(1)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt
index 87542911d..0e8d9e2c0 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 015 (php/wsdl): echoComplexTypeMultiOccurs(nil)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt
index 5cffa8c08..796747b5c 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 016 (php/wsdl): echoDecimal
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt
index 843f73dad..5dd607d47 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 017 (php/wsdl): echoBoolean
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt
index 6a02c0483..57b2c631c 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 018 (php/wsdl): echoHexBinary
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt
index 5c605bcc8..a3a17e053 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 019 (php/wsdl): echoComplexTypeAsSimpleTypes
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt
index 3faaaf111..7b55ca5fa 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 020 (php/wsdl): echoComplexTypeAsSimpleTypes(minO
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt
index 98da2702d..824d35b88 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 021 (php/wsdl): echoSimpleTypesAsComplexType
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt
index 4f294c54e..8e0bd3e17 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 022 (php/wsdl): echoSimpleTypesAsComplexType(minO
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt
index 0d6832eec..652843bf0 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 023 (php/wsdl): echoNestedComplexType
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt
index faf8041c0..07bd60f4c 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 024 (php/wsdl): echoNestedComplexType(minOccurs=0
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexTypeComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt
index a9813aa7b..169085666 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 025 (php/wsdl): echoNestedMultiOccurs
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPMultiOccursComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt
index 6d1c06238..53fb9777a 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 026 (php/wsdl): echoChoice
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt
index 575e7bed3..974e5791a 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 027 (php/wsdl): echoEnum
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt
index 723870dd8..21c16a0a6 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 028 (php/wsdl): echoAnyType
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class SOAPComplexType {
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt
index 926edd16f..a7db2ed9f 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 029 (php/wsdl): echoAnyElement
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt
index 5081cddbb..aeb3369ef 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 030 (php/wsdl): echoVoidSoapHeader(1)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array("varString"=>"Hello World"), 1);
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt
index c09f2b28b..412fdcf1d 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 031 (php/wsdl): echoVoidSoapHeader(2)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array(), 1);
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt
index 5068b5f3a..e27b50038 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 032 (php/wsdl): echoVoidSoapHeader(3)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varString"=>"arg","varFloat"=>12.345), 1);
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt
index dc03cda72..a88be26e6 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 033 (php/wsdl): echoVoidSoapHeader(4)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varFloat"=>12.345), 1);
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt
index e90fe5c9d..08dab5c3d 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt
@@ -2,6 +2,8 @@
SOAP Interop Round4 GroupI XSD 034 (php/wsdl): echoVoidSoapHeader(5)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array("varString"=>"Hello World"), 1, SOAP_ACTOR_NEXT);
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt
index 19c0e23f9..1126062bd 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt
@@ -4,6 +4,7 @@ SOAP Interop Round4 GroupI XSD 035 (php/wsdl): echoVoidSoapHeader(6)
<?php require_once('skipif.inc'); ?>
--INI--
precision=14
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varString"=>"arg","varFloat"=>12.345), 1, SOAP_ACTOR_NEXT);
diff --git a/ext/soap/tests/server011.phpt b/ext/soap/tests/server011.phpt
index fb9aabe89..5b76a8129 100644
--- a/ext/soap/tests/server011.phpt
+++ b/ext/soap/tests/server011.phpt
@@ -4,6 +4,8 @@ SOAP Server 11: bind
<?php require_once('skipif.inc'); ?>
--GET--
wsdl
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
function Add($x,$y) {
diff --git a/ext/soap/tests/server021.phpt b/ext/soap/tests/server021.phpt
index d9913060b..245c46443 100644
--- a/ext/soap/tests/server021.phpt
+++ b/ext/soap/tests/server021.phpt
@@ -9,7 +9,7 @@ class Foo {
if ($name == "test") {
return "Hello World";
} else {
- return SoapFault("Server","Function $name doesn't exist");
+ return new SoapFault("Server","Function $name doesn't exist");
}
}
}
diff --git a/ext/soap/tests/server025.phpt b/ext/soap/tests/server025.phpt
index 975ad0065..ed56750a0 100755
--- a/ext/soap/tests/server025.phpt
+++ b/ext/soap/tests/server025.phpt
@@ -2,6 +2,8 @@
SOAP Server 25: One-way SOAP headers encoding using WSDL
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestHeader1 extends SoapHeader {
diff --git a/ext/soap/tests/soap12/soap12-test.inc b/ext/soap/tests/soap12/soap12-test.inc
index 576fb2e42..7b2e2efea 100644
--- a/ext/soap/tests/soap12/soap12-test.inc
+++ b/ext/soap/tests/soap12/soap12-test.inc
@@ -122,6 +122,7 @@ class Soap12test {
}
+ini_set("soap.wsdl_cache_enabled",0);
$server = new soapserver(dirname(__FILE__)."/soap12-test.wsdl", array('soap_version'=>SOAP_1_2,'actor'=>"http://example.org/ts-tests/C"));
$server->setClass("Soap12test");
diff --git a/ext/soap/tests/typemap001.phpt b/ext/soap/tests/typemap001.phpt
index c3b5b8444..9a75bef07 100755
--- a/ext/soap/tests/typemap001.phpt
+++ b/ext/soap/tests/typemap001.phpt
@@ -2,6 +2,8 @@
SOAP typemap 1: SoapServer support for typemap's from_xml()
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$GLOBALS['HTTP_RAW_POST_DATA']="
diff --git a/ext/soap/tests/typemap002.phpt b/ext/soap/tests/typemap002.phpt
index 478e1ee4e..ceb00f1a1 100755
--- a/ext/soap/tests/typemap002.phpt
+++ b/ext/soap/tests/typemap002.phpt
@@ -2,6 +2,8 @@
SOAP typemap 2: SoapServer support for typemap's to_xml()
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$GLOBALS['HTTP_RAW_POST_DATA']="
diff --git a/ext/soap/tests/typemap003.phpt b/ext/soap/tests/typemap003.phpt
index 17bd6c16e..cfe1a6d44 100755
--- a/ext/soap/tests/typemap003.phpt
+++ b/ext/soap/tests/typemap003.phpt
@@ -2,6 +2,8 @@
SOAP Typemap 3: SoapClient support for typemap's from_xml()
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestSoapClient extends SoapClient{
diff --git a/ext/soap/tests/typemap004.phpt b/ext/soap/tests/typemap004.phpt
index f94af4990..768cdcacd 100755
--- a/ext/soap/tests/typemap004.phpt
+++ b/ext/soap/tests/typemap004.phpt
@@ -2,6 +2,8 @@
SOAP Typemap 4: SoapClient support for typemap's to_xml()
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestSoapClient extends SoapClient{
diff --git a/ext/soap/tests/typemap005.phpt b/ext/soap/tests/typemap005.phpt
index 6e3001d0b..1a08d1145 100755
--- a/ext/soap/tests/typemap005.phpt
+++ b/ext/soap/tests/typemap005.phpt
@@ -2,6 +2,8 @@
SOAP typemap 5: SoapServer support for typemap's from_xml() (without WSDL)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$GLOBALS['HTTP_RAW_POST_DATA']="
diff --git a/ext/soap/tests/typemap006.phpt b/ext/soap/tests/typemap006.phpt
index 7b1fc4df2..7ecf410ad 100755
--- a/ext/soap/tests/typemap006.phpt
+++ b/ext/soap/tests/typemap006.phpt
@@ -2,6 +2,8 @@
SOAP typemap 6: SoapServer support for typemap's to_xml() (without WSDL, using SoapVar)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$GLOBALS['HTTP_RAW_POST_DATA']="
diff --git a/ext/soap/tests/typemap007.phpt b/ext/soap/tests/typemap007.phpt
index 8e2880b58..e8523287f 100755
--- a/ext/soap/tests/typemap007.phpt
+++ b/ext/soap/tests/typemap007.phpt
@@ -2,6 +2,8 @@
SOAP Typemap 7: SoapClient support for typemap's from_xml() (without WSDL)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestSoapClient extends SoapClient{
diff --git a/ext/soap/tests/typemap008.phpt b/ext/soap/tests/typemap008.phpt
index aaaa715d6..eebefeeca 100755
--- a/ext/soap/tests/typemap008.phpt
+++ b/ext/soap/tests/typemap008.phpt
@@ -2,6 +2,8 @@
SOAP Typemap 8: SoapClient support for typemap's to_xml() (without WSDL, using SoapVar)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestSoapClient extends SoapClient{
diff --git a/ext/soap/tests/typemap009.phpt b/ext/soap/tests/typemap009.phpt
index 208fb43db..ec5c38da2 100755
--- a/ext/soap/tests/typemap009.phpt
+++ b/ext/soap/tests/typemap009.phpt
@@ -2,6 +2,8 @@
SOAP typemap 9: SoapServer support for typemap's from_xml() (SoapFault)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$GLOBALS['HTTP_RAW_POST_DATA']="
diff --git a/ext/soap/tests/typemap010.phpt b/ext/soap/tests/typemap010.phpt
index b6ec26803..4eba6345c 100755
--- a/ext/soap/tests/typemap010.phpt
+++ b/ext/soap/tests/typemap010.phpt
@@ -2,6 +2,8 @@
SOAP typemap 10: SoapServer support for typemap's to_xml() (SoapFault)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$GLOBALS['HTTP_RAW_POST_DATA']="
diff --git a/ext/soap/tests/typemap011.phpt b/ext/soap/tests/typemap011.phpt
index 52acde28d..65a0666f2 100755
--- a/ext/soap/tests/typemap011.phpt
+++ b/ext/soap/tests/typemap011.phpt
@@ -2,6 +2,8 @@
SOAP Typemap 11: SoapClient support for typemap's from_xml() (SoapFault)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestSoapClient extends SoapClient{
diff --git a/ext/soap/tests/typemap012.phpt b/ext/soap/tests/typemap012.phpt
index aa06215fe..9855f8059 100755
--- a/ext/soap/tests/typemap012.phpt
+++ b/ext/soap/tests/typemap012.phpt
@@ -2,6 +2,8 @@
SOAP Typemap 12: SoapClient support for typemap's to_xml() (SoapFault)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
class TestSoapClient extends SoapClient{
diff --git a/ext/soap/tests/typemap013.phpt b/ext/soap/tests/typemap013.phpt
index 9ad02cb5e..d873eb4d1 100755
--- a/ext/soap/tests/typemap013.phpt
+++ b/ext/soap/tests/typemap013.phpt
@@ -2,6 +2,8 @@
SOAP typemap 13: SoapServer support for typemap's to_xml() with default ns
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
--FILE--
<?php
$GLOBALS['HTTP_RAW_POST_DATA']="
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index 9a060c70d..01e1a2d8d 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,7 +22,7 @@
#ifndef PHP_SOCKETS_H
#define PHP_SOCKETS_H
-/* $Id: php_sockets.h,v 1.36.2.1.2.4 2007/07/22 23:01:20 jani Exp $ */
+/* $Id: php_sockets.h,v 1.36.2.1.2.5 2007/12/31 07:20:11 sebastian Exp $ */
#if HAVE_SOCKETS
diff --git a/ext/sockets/php_sockets_win.c b/ext/sockets/php_sockets_win.c
index 44f8011a9..f1a7e2a69 100644
--- a/ext/sockets/php_sockets_win.c
+++ b/ext/sockets/php_sockets_win.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sockets_win.c,v 1.12.2.1.2.2 2007/07/22 23:01:20 jani Exp $ */
+/* $Id: php_sockets_win.c,v 1.12.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef PHP_WIN32
diff --git a/ext/sockets/php_sockets_win.h b/ext/sockets/php_sockets_win.h
index 75269c408..b5638de13 100644
--- a/ext/sockets/php_sockets_win.h
+++ b/ext/sockets/php_sockets_win.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sockets_win.h,v 1.12.2.1.2.2 2007/07/22 23:01:20 jani Exp $ */
+/* $Id: php_sockets_win.h,v 1.12.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef PHP_WIN32
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index 3ae93adcc..b73a25a7b 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sockets.c,v 1.171.2.9.2.14 2007/09/26 10:55:07 tony2001 Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.17 2008/02/21 02:39:43 felipe Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -584,7 +584,10 @@ static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds TSRMLS_DC) /
zval **dest_element;
php_socket *php_sock;
HashTable *new_hash;
+ char *key;
int num = 0;
+ ulong num_key;
+ uint key_len;
if (Z_TYPE_P(sock_array) != IS_ARRAY) return 0;
@@ -599,7 +602,14 @@ static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds TSRMLS_DC) /
if (PHP_SAFE_FD_ISSET(php_sock->bsd_socket, fds)) {
/* Add fd to new array */
- zend_hash_next_index_insert(new_hash, (void *)element, sizeof(zval *), (void **)&dest_element);
+ switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(sock_array), &key, &key_len, &num_key, 0, NULL)) {
+ case HASH_KEY_IS_STRING:
+ zend_hash_add(new_hash, key, key_len, (void *)element, sizeof(zval *), (void **)&dest_element);
+ break;
+ case HASH_KEY_IS_LONG:
+ zend_hash_index_update(new_hash, num_key, (void *)element, sizeof(zval *), (void **)&dest_element);
+ break;
+ }
if (dest_element) zval_add_ref(dest_element);
}
num++;
diff --git a/ext/sockets/unix_socket_constants.h b/ext/sockets/unix_socket_constants.h
index 4ffd17af6..fd40f8605 100644
--- a/ext/sockets/unix_socket_constants.h
+++ b/ext/sockets/unix_socket_constants.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: unix_socket_constants.h,v 1.5.2.1.2.1 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: unix_socket_constants.h,v 1.5.2.1.2.2 2007/12/31 07:20:11 sebastian Exp $ */
/* This file is to be included by sockets.c */
diff --git a/ext/sockets/win32_socket_constants.h b/ext/sockets/win32_socket_constants.h
index bcb648704..5528d24c8 100644
--- a/ext/sockets/win32_socket_constants.h
+++ b/ext/sockets/win32_socket_constants.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: win32_socket_constants.h,v 1.5.2.1.2.1 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: win32_socket_constants.h,v 1.5.2.1.2.2 2007/12/31 07:20:11 sebastian Exp $ */
/* This file is to be included by sockets.c */
diff --git a/ext/spl/examples/findfile.inc b/ext/spl/examples/findfile.inc
index 05d525a3f..02ab79243 100755
--- a/ext/spl/examples/findfile.inc
+++ b/ext/spl/examples/findfile.inc
@@ -33,7 +33,7 @@ class FindFile extends FilterIterator
function __construct($path, $file)
{
$this->file = $file;
- $list = split(';', $path);
+ $list = split(PATH_SEPARATOR, $path);
if (count($list) <= 1) {
parent::__construct(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)));
} else {
diff --git a/ext/spl/examples/tree.php b/ext/spl/examples/tree.php
index 6005263cc..7c630e823 100755
--- a/ext/spl/examples/tree.php
+++ b/ext/spl/examples/tree.php
@@ -37,4 +37,4 @@ foreach(new DirectoryGraphIterator($argv[1]) as $file)
echo $file . "\n";
}
-?> \ No newline at end of file
+?>
diff --git a/ext/spl/internal/splobjectstorage.inc b/ext/spl/internal/splobjectstorage.inc
index b01a85096..a6adafb67 100755
--- a/ext/spl/internal/splobjectstorage.inc
+++ b/ext/spl/internal/splobjectstorage.inc
@@ -13,7 +13,7 @@
* @brief Object storage
* @author Marcus Boerger
* @version 1.0
- * @since PHP 6.0
+ * @since PHP 5.1.2
*
* This container allows to store objects uniquly without the need to compare
* them one by one. This is only possible internally. The code represenation
@@ -115,4 +115,4 @@ class SplObjectStorage implements Iterator, Countable
}
}
-?> \ No newline at end of file
+?>
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index 3f1ed7995..e4a09684a 100755
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_spl.c,v 1.52.2.28.2.17 2007/05/19 18:40:27 iliaa Exp $ */
+/* $Id: php_spl.c,v 1.52.2.28.2.18 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h
index 7c44f5855..09bd521f1 100755
--- a/ext/spl/php_spl.h
+++ b/ext/spl/php_spl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl.php b/ext/spl/spl.php
index bb6af7e05..43c29e987 100755
--- a/ext/spl/spl.php
+++ b/ext/spl/spl.php
@@ -13,25 +13,25 @@
*
* SPL - Standard PHP Library
*
- * SPL is a collection of interfaces and classes that are meant to solve
- * standard problems and implements some efficient data access interfaces
- * and classes. You'll find the classes documented using php code in the
- * file spl.php or in corresponding .inc files in subdirectories examples
- * and internal. Based on the internal implementations or the files in the
+ * SPL is a collection of interfaces and classes that are meant to solve
+ * standard problems and implements some efficient data access interfaces
+ * and classes. You'll find the classes documented using php code in the
+ * file spl.php or in corresponding .inc files in subdirectories examples
+ * and internal. Based on the internal implementations or the files in the
* examples subdirectory there are also some .php files to experiment with.
- *
- * The .inc files are not included automatically because they are sooner or
- * later integrated into the extension. That means that you either need to
- * put the code of examples/autoload.inc into your autoprepend file or that
+ *
+ * The .inc files are not included automatically because they are sooner or
+ * later integrated into the extension. That means that you either need to
+ * put the code of examples/autoload.inc into your autoprepend file or that
* you have to point your ini setting auto_prepend_file to that file.
- *
+ *
* Below is a list of interfaces/classes already availabel natively through
* the SPL extension grouped by category.
- *
+ *
* 1) Iterators
- *
+ *
* SPL offers some advanced iterator algorithms:
- *
+ *
* - interface RecursiveIterator extends Iterator
* - interface OuterIterator extends Iterator
* - class RecursiveIteratorIterator implements OuterIterator
@@ -48,32 +48,32 @@
* - class AppendIterator implements OuterIterator
* - class RegexIterator extends FilterIterator
* - class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator
- *
+ *
* 2) Directories and Files
- *
+ *
* SPL offers two advanced directory and file handling classes:
- *
+ *
* - class SplFileInfo
* - class DirectoryIterator extends SplFileInfo implements Iterator
* - class RecursiveDirectoryIterator extends DirectoryIterator implements RecursiveIterator
* - class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator
- *
+ *
* 3) XML
- *
+ *
* SPL offers an advanced XML handling class:
- *
+ *
* - class SimpleXMLIterator extends simplexml_element implements RecursiveIterator
- *
+ *
* 4) Array Overloading
- *
+ *
* SPL offers advanced Array overloading:
- *
+ *
* - class ArrayObject implements IteratorAggregate, ArrayAccess, Countable
* - class ArrayIterator implements Iterator, ArrayAccess, Countable, SeekableIterator
* - class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator
- *
+ *
* As the above suggest an ArrayObject creates an ArrayIterator when it comes to
- * iteration (e.g. ArrayObject instance used inside foreach).
+ * iteration (e.g. ArrayObject instance used inside foreach).
*
* 5) Counting
*
@@ -81,7 +81,7 @@
*
* 6) Exception%s
*
- * SPL provides a set of standard Exception classes each meant to indicate a
+ * SPL provides a set of standard Exception classes each meant to indicate a
* certain problem type.
*
* - class LogicException extends Exception
@@ -107,10 +107,10 @@
*
* 8) @ref Examples
*
- * The classes and interfaces in this group are contained as PHP code in the
+ * The classes and interfaces in this group are contained as PHP code in the
* examples subdirectory of ext/SPL. Sooner or later they will be moved to
* c-code.
- *
+ *
* 9) Some articles about SPL:
* - <a href="http://www.phpro.org/tutorials/Introduction-to-SPL.html">Introduction to Standard PHP Library (SPL)</a>
* - <a href="http://www.sitepoint.com/article/php5-standard-library/1">Introducing PHP 5's Standard Library</a>
@@ -131,7 +131,7 @@
* - Debug session 2 <a href="http://talks.somabo.de/200509_toronto_iterator_debug_session_1.pps">[pps]</a>, <a href="http://talks.somabo.de/200509_toronto_iterator_debug_session_1.pdf">[pdf]</a>, <a href="http://taks.somabo.de/200411_php_conference_frankfrurt_iterator_debug_session.swf">[swf]</a>
* - Debug session 3 <a href="http://talks.somabo.de/200509_toronto_iterator_debug_session_2.pps">[pps]</a>, <a href="http://talks.somabo.de/200509_toronto_iterator_debug_session_2.pdf">[pdf]</a>
*
- * You can download this documentation as a chm file
+ * You can download this documentation as a chm file
* <a href="http://php.net/~helly/php/ext/spl/spl.chm">here</a>.
*
* (c) Marcus Boerger, 2003 - 2007
@@ -139,19 +139,19 @@
/** @defgroup ZendEngine Zend engine classes
*
- * The classes and interfaces in this group are contained in the c-code of
+ * The classes and interfaces in this group are contained in the c-code of
* PHP's Zend engine.
*/
/** @defgroup SPL Internal classes
*
- * The classes and interfaces in this group are contained in the c-code of
+ * The classes and interfaces in this group are contained in the c-code of
* ext/SPL.
*/
/** @defgroup Examples Example classes
*
- * The classes and interfaces in this group are contained as PHP code in the
+ * The classes and interfaces in this group are contained as PHP code in the
* examples subdirectory of ext/SPL. Sooner or later they will be moved to
* c-code.
*/
@@ -173,13 +173,13 @@ function spl_autoload(string $class_name, string $file_extensions = NULL) {/**/}
*/
function spl_autoload_call(string $class_name) {/**/};
-/** @ingroup SPL
+/** @ingroup SPL
* @brief Register and return default file extensions for spl_autoload
* @since PHP 5.1
*
- * @param file_extensions optional comma separated list of extensions to use in
+ * @param file_extensions optional comma separated list of extensions to use in
* default autoload function. If not given just return the current list.
- * @return comma separated list of file extensions to use in default autoload
+ * @return comma separated list of file extensions to use in default autoload
* function.
*/
function spl_autoload_extensions($file_extensions) {/**/};
@@ -196,7 +196,7 @@ function spl_autoload_functions() {/**/};
* @brief Register given function as autoload implementation
* @since PHP 5.1
*
- * @param autoload_function name of function or array of object/class and
+ * @param autoload_function name of function or array of object/class and
* function name to register as autoload function.
* @param throw whether to throw or issue an error on failure.
*/
@@ -206,7 +206,7 @@ function spl_autoload_register(string $autoload_function = "spl_autoload", $thro
* @brief Unregister given function as autoload implementation
* @since PHP 5.1
*
- * @param autoload_function name of function or array of object/class and
+ * @param autoload_function name of function or array of object/class and
* function name to unregister as autoload function.
*/
function spl_autoload_unregister(string $autoload_function = "spl_autoload") {/**/};
@@ -214,7 +214,7 @@ function spl_autoload_unregister(string $autoload_function = "spl_autoload") {/*
/** @ingroup SPL
* @brief Return an array of classes and interfaces in SPL
*
- * @return array containing the names of all clsses and interfaces defined in
+ * @return array containing the names of all clsses and interfaces defined in
* extension SPL
*/
function spl_classes() {/**/};
@@ -244,26 +244,26 @@ function iterator_to_array(Traversable $it, $use_keys = true) {/**/};
class Exception
{
/** The exception message */
- protected $message;
-
- /** The string represenations as generated during construction */
- private $string;
-
- /** The code passed to the constructor */
- protected $code;
-
- /** The file name where the exception was instantiated */
- protected $file;
-
- /** The line number where the exception was instantiated */
- protected $line;
-
- /** The stack trace */
- private $trace;
+ protected $message;
+
+ /** The string represenations as generated during construction */
+ private $string;
+
+ /** The code passed to the constructor */
+ protected $code;
+
+ /** The file name where the exception was instantiated */
+ protected $file;
+
+ /** The line number where the exception was instantiated */
+ protected $line;
+
+ /** The stack trace */
+ private $trace;
/** Prevent clone
*/
- final private function __clone() {}
+ final private function __clone() {}
/** Construct an exception
*
@@ -279,55 +279,55 @@ class Exception
$this->line = __LINE__; // of throw clause
$this->trace = debug_backtrace();
$this->string = StringFormat($this);
- }
+ }
/** @return the message passed to the constructor
*/
- final public function getMessage()
- {
- return $this->message;
- }
+ final public function getMessage()
+ {
+ return $this->message;
+ }
/** @return the code passed to the constructor
*/
- final public function getCode()
- {
- return $this->code;
- }
+ final public function getCode()
+ {
+ return $this->code;
+ }
/** @return the name of the file where the exception was thrown
*/
- final public function getFile()
- {
- return $this->file;
- }
+ final public function getFile()
+ {
+ return $this->file;
+ }
/** @return the line number where the exception was thrown
*/
- final public function getLine()
- {
- return $this->line;
- }
+ final public function getLine()
+ {
+ return $this->line;
+ }
/** @return the stack trace as array
*/
- final public function getTrace()
- {
- return $this->trace;
- }
+ final public function getTrace()
+ {
+ return $this->trace;
+ }
/** @return the stack trace as string
*/
- final public function getTraceAsString()
- {
- }
+ final public function getTraceAsString()
+ {
+ }
/** @return string represenation of exception
*/
- public function __toString()
- {
- return $this->string;
- }
+ public function __toString()
+ {
+ return $this->string;
+ }
}
/** @ingroup SPL
@@ -360,7 +360,7 @@ class BadMethodCallException extends BadFunctionCallException
* @brief Exception that denotes a value not in the valid domain was used.
* @since PHP 5.1
*
- * This kind of exception should be used to inform about domain erors in
+ * This kind of exception should be used to inform about domain erors in
* mathematical sense.
*
* @see RangeException
@@ -383,7 +383,7 @@ class InvalidArgumentException extends LogicException
* @brief Exception thrown when a parameter exceeds the allowed length.
* @since PHP 5.1
*
- * This can be used for strings length, array size, file size, number of
+ * This can be used for strings length, array size, file size, number of
* elements read from an Iterator and so on.
*/
class LengthException extends LogicException
@@ -403,7 +403,7 @@ class OutOfRangeException extends LogicException
}
/** @ingroup SPL
- * @brief Exception thrown for errors that are only detectable at runtime.
+ * @brief Exception thrown for errors that are only detectable at runtime.
* @since PHP 5.1
*/
class RuntimeException extends Exception
@@ -457,7 +457,7 @@ class UnderflowException extends RuntimeException
*
* Typically this happens when a function calls another function and espects
* the return value to be of a certain type or value not including arithmetic
- * or buffer related errors.
+ * or buffer related errors.
*
* @see InvalidArgumentException
*/
@@ -496,14 +496,14 @@ interface ArrayAccess
* @since PHP 5.0
*
* Abstract base interface that cannot be implemented alone. Instead it
- * must be implemented by either IteratorAggregate or Iterator.
+ * must be implemented by either IteratorAggregate or Iterator.
*
- * @note Internal classes that implement this interface can be used in a
+ * @note Internal classes that implement this interface can be used in a
* foreach construct and do not need to implement IteratorAggregate or
* Iterator.
*
* @note This is an engine internal interface which cannot be implemented
- * in PHP scripts. Either IteratorAggregate or Iterator must be used
+ * in PHP scripts. Either IteratorAggregate or Iterator must be used
* instead.
*/
interface Traversable
@@ -515,7 +515,7 @@ interface Traversable
* @since PHP 5.0
*
* @note This is an engine internal interface.
- */
+ */
interface IteratorAggregate extends Traversable
{
/** @return an Iterator for the implementing object.
@@ -527,7 +527,7 @@ interface IteratorAggregate extends Traversable
* @brief Basic iterator
* @since PHP 5.0
*
- * Interface for external iterators or objects that can be iterated
+ * Interface for external iterators or objects that can be iterated
* themselves internally.
*
* @note This is an engine internal interface.
@@ -569,8 +569,8 @@ interface Countable
/** @ingroup ZendEngine
* @brief Interface for customized serializing
* @since 5.1
- *
- * Classes that implement this interface no longer support __sleep() and
+ *
+ * Classes that implement this interface no longer support __sleep() and
* __wakeup(). The method serialized is called whenever an instance needs to
* be serialized. This does not invoke __destruct() or has any other side
* effect unless programmed inside the method. When the data is unserialized
@@ -584,10 +584,10 @@ interface Serializable
* @return string representation of the instance
*/
function serialize();
-
+
/**
* @note This is a constructor
- *
+ *
* @param $serialized data read from stream to construct the instance
*/
function unserialize($serialized);
@@ -598,7 +598,7 @@ interface Serializable
* @since PHP 5.0
* @version 1.2
*
- * This array wrapper allows to recursively iterate over Arrays and public
+ * This array wrapper allows to recursively iterate over Arrays and public
* Object properties.
*
* @see ArrayIterator
@@ -621,14 +621,14 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Countable
function __construct($array, $flags = 0, $iterator_class = "ArrayIterator") {/**/}
/** Set behavior flags.
- *
+ *
* @param $flags bitmask as follows:
* 0 set: properties of the object have their normal functionality
* when accessed as list (var_dump, foreach, etc.)
* 1 set: array indices can be accessed as properties in read/write
*/
function setFlags($flags) {/**/}
-
+
/** @return current flags
*/
function getFlags() {/**/}
@@ -636,27 +636,27 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Countable
/** Sort the entries by values.
*/
function asort() {/**/}
-
+
/** Sort the entries by key.
*/
function ksort() {/**/}
-
+
/** Sort the entries by values using user defined function.
*/
function uasort(mixed cmp_function) {/**/}
-
+
/** Sort the entries by key using user defined function.
*/
function uksort(mixed cmp_function) {/**/}
-
+
/** Sort the entries by values using "natural order" algorithm.
*/
function natsort() {/**/}
-
+
/** Sort the entries by values using case insensitive "natural order" algorithm.
*/
function natcasesort() {/**/}
-
+
/** @param $array new array or object
*/
function exchangeArray($array) {/**/}
@@ -668,44 +668,44 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Countable
/** @param $index offset to inspect
* @return whetehr offset $index esists
- */
+ */
function offsetExists($index) {/**/}
/** @param $index offset to return value for
* @return value at offset $index
- */
+ */
function offsetGet($index) {/**/}
/** @param $index index to set
* @param $newval new value to store at offset $index
- */
+ */
function offsetSet($index, $newval) {/**/}
/** @param $index offset to unset
- */
+ */
function offsetUnset($index) {/**/}
/** @param $value is appended as last element
- * @warning this method cannot be called when the ArrayObject refers to
+ * @warning this method cannot be called when the ArrayObject refers to
* an object.
- */
+ */
function append($value) {/**/}
/** @return a \b copy of the array
- * @note when the ArrayObject refers to an object then this method
+ * @note when the ArrayObject refers to an object then this method
* returns an array of the public properties.
- */
+ */
function getArrayCopy() {/**/}
/** @return the number of elements in the array or the number of public
* properties in the object.
*/
function count() {/**/}
-
+
/* @param $iterator_class new class used in getIterator()
*/
function setIteratorClass($itertor_class) {/**/}
-
+
/* @return class used in getIterator()
*/
function getIteratorClass() {/**/}
@@ -719,9 +719,9 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Countable
* This iterator allows to unset and modify values and keys while iterating
* over Arrays and Objects.
*
- * When you want to iterate over the same array multiple times you need to
- * instanciate ArrayObject and let it create ArrayIterator instances that
- * refer to it either by using foreach or by calling its getIterator()
+ * When you want to iterate over the same array multiple times you need to
+ * instanciate ArrayObject and let it create ArrayIterator instances that
+ * refer to it either by using foreach or by calling its getIterator()
* method manually.
*/
class ArrayIterator implements SeekableIterator, ArrayAccess, Countable
@@ -741,7 +741,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Countable
function __construct($array, $flags = 0) {/**/}
/** Set behavior flags.
- *
+ *
* @param $flags bitmask as follows:
* 0 set: properties of the object have their normal functionality
* when accessed as list (var_dump, foreach, etc.)
@@ -757,56 +757,56 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Countable
/** Sort the entries by values.
*/
function asort() {/**/}
-
+
/** Sort the entries by key.
*/
function ksort() {/**/}
-
+
/** Sort the entries by values using user defined function.
*/
function uasort(mixed cmp_function) {/**/}
-
+
/** Sort the entries by key using user defined function.
*/
function uksort(mixed cmp_function) {/**/}
-
+
/** Sort the entries by values using "natural order" algorithm.
*/
function natsort() {/**/}
-
+
/** Sort the entries by values using case insensitive "natural order" algorithm.
*/
function natcasesort() {/**/}
-
+
/** @param $index offset to inspect
* @return whetehr offset $index esists
- */
+ */
function offsetExists($index) {/**/}
/** @param $index offset to return value for
* @return value at offset $index
- */
+ */
function offsetGet($index) {/**/}
/** @param $index index to set
* @param $newval new value to store at offset $index
- */
+ */
function offsetSet($index, $newval) {/**/}
/** @param $index offset to unset
- */
+ */
function offsetUnset($index) {/**/}
/** @param $value is appended as last element
- * @warning this method cannot be called when the ArrayIterator refers to
+ * @warning this method cannot be called when the ArrayIterator refers to
* an object.
- */
+ */
function append($value) {/**/}
/** @return a \b copy of the array
- * @note when the ArrayIterator refers to an object then this method
+ * @note when the ArrayIterator refers to an object then this method
* returns an array of the public properties.
- */
+ */
function getArrayCopy() {/**/}
/** @param $position offset to seek to
@@ -821,16 +821,16 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Countable
/** @copydoc Iterator::rewind */
function rewind() {/**/}
-
+
/** @copydoc Iterator::valid */
function valid() {/**/}
-
+
/** @copydoc Iterator::current */
function current() {/**/}
-
+
/** @copydoc Iterator::key */
function key() {/**/}
-
+
/** @copydoc Iterator::next */
function next() {/**/}
}
@@ -839,7 +839,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Countable
* @brief File info class
* @since PHP 5.1.3
*/
-class SplFileInfo
+class SplFileInfo
{
/** Construct a file info object
*
@@ -849,11 +849,11 @@ class SplFileInfo
/** @return the path part only.
*/
- function getPath() {/**/}
+ function getPath() {/**/}
/** @return the filename only.
*/
- function getFilename() {/**/}
+ function getFilename() {/**/}
/** @return SplFileInfo created for the file
* @param class_name name of class to instantiate
@@ -863,7 +863,7 @@ class SplFileInfo
/** @return The current entries path and file name.
*/
- function getPathname() {/**/}
+ function getPathname() {/**/}
/** @return SplFileInfo created for the path
* @param class_name name of class to instantiate
@@ -925,7 +925,7 @@ class SplFileInfo
/** @return Whether the current entry is a directory.
*/
- function isDir() {/**/}
+ function isDir() {/**/}
/** @return whether the current entry is a link.
*/
@@ -938,7 +938,7 @@ class SplFileInfo
/** @return The resolved path
*/
function getRealPath() {/**/}
-
+
/** @return getPathname()
*/
function __toString() {/**/}
@@ -948,7 +948,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
- * @throw RuntimeException if file cannot be opened (e.g. insufficient
+ * @throw RuntimeException if file cannot be opened (e.g. insufficient
* access rights).
* @return The opened file as a SplFileObject instance
*
@@ -958,7 +958,7 @@ class SplFileInfo
*/
function openFile($mode = 'r', $use_include_path = false, $context = NULL) {/**/}
- /** @param class_name name of class used with openFile(). Must be derived
+ /** @param class_name name of class used with openFile(). Must be derived
* from SPLFileObject.
*/
function setFileClass(string class_name = "SplFileObject") {/**/}
@@ -984,10 +984,10 @@ class DirectoryIterator extends SplFileInfo implements Iterator
/** @copydoc Iterator::rewind */
function rewind() {/**/}
-
+
/** @copydoc Iterator::valid */
function valid() {/**/}
-
+
/** @return index of entry
*/
function key() {/**/}
@@ -1001,7 +1001,7 @@ class DirectoryIterator extends SplFileInfo implements Iterator
/** @return Whether the current entry is either '.' or '..'.
*/
- function isDot() {/**/}
+ function isDot() {/**/}
/** @return whether the current entry is a link.
*/
@@ -1019,17 +1019,25 @@ class DirectoryIterator extends SplFileInfo implements Iterator
*/
class RecursiveDirectoryIterator extends DirectoryIterator implements RecursiveIterator
{
- const CURRENT_AS_FILEINFO 0x00000010; /* make RecursiveDirectoryTree::current() return SplFileInfo */
- const KEY_AS_FILENAME 0x00000020; /* make RecursiveDirectoryTree::key() return getFilename() */
- const NEW_CURRENT_AND_KEY 0x00000030; /* CURRENT_AS_FILEINFO + KEY_AS_FILENAME */
+ const CURRENT_AS_FILEINFO 0x00000000; /* make RecursiveDirectoryTree::current() return SplFileInfo */
+ const CURRENT_AS_SELF 0x00000010; /* make RecursiveDirectoryTree::current() return getSelf() */
+ const CURRENT_AS_PATHNAME 0x00000020; /* make RecursiveDirectoryTree::current() return getPathname() */
+
+ const KEY_AS_PATHNAME 0x00000000; /* make RecursiveDirectoryTree::key() return getPathname() */
+ const KEY_AS_FILENAME 0x00000100; /* make RecursiveDirectoryTree::key() return getFilename() */
+
+ const NEW_CURRENT_AND_KEY 0x00000100; /* CURRENT_AS_FILEINFO + KEY_AS_FILENAME */
/** Construct a directory iterator from a path-string.
*
* @param $path directory to iterate.
* @param $flags open flags
* - CURRENT_AS_FILEINFO
+ * - CURRENT_AS_SELF
+ * - CURRENT_AS_PATHNAME
+ * - KEY_AS_PATHNAME
* - KEY_AS_FILENAME
- * - NEW_CURRENT_AND_KEY
+ * - NEW_CURRENT_AND_KEY
*/
function __construct($path, $flags = 0) {/**/}
@@ -1043,11 +1051,11 @@ class RecursiveDirectoryIterator extends DirectoryIterator implements RecursiveI
/** @return whether the current is a directory (not '.' or '..').
*/
- function hasChildren() {/**/}
+ function hasChildren() {/**/}
/** @return a RecursiveDirectoryIterator for the current entry.
*/
- function getChildren() {/**/}
+ function getChildren() {/**/}
/** @return sub path only (without main path)
*/
@@ -1062,7 +1070,7 @@ class RecursiveDirectoryIterator extends DirectoryIterator implements RecursiveI
* @brief recursive SimpleXML_Element iterator
* @since PHP 5.0
*
- * The SimpleXMLIterator implements the RecursiveIterator interface. This
+ * The SimpleXMLIterator implements the RecursiveIterator interface. This
* allows iteration over all elements using foreach or an appropriate while
* construct, just like SimpleXMLElement does. When using the foreach construct,
* you will also iterate over the subelements. For every element which
@@ -1073,11 +1081,11 @@ class SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator, C
{
/** @return whether the current node has sub nodes.
*/
- function hasChildren() {/**/}
+ function hasChildren() {/**/}
/** @return a SimpleXMLIterator for the current node.
*/
- function getChildren() {/**/}
+ function getChildren() {/**/}
/** @return number of elements/attributes seen with foreach()
*/
@@ -1085,16 +1093,16 @@ class SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator, C
/** @copydoc Iterator::rewind */
function rewind() {/**/}
-
+
/** @copydoc Iterator::valid */
function valid() {/**/}
-
+
/** @copydoc Iterator::current */
function current() {/**/}
-
+
/** @copydoc Iterator::key */
function key() {/**/}
-
+
/** @copydoc Iterator::next */
function next() {/**/}
}
@@ -1126,16 +1134,16 @@ interface SplSubject
{
/** @param $observer new observer to attach
*/
- function attach(SplObserver $observer);
+ function attach(SplObserver $observer);
/** @param $observer existing observer to detach
* @note a non attached observer shouldn't result in a warning or similar
*/
- function detach(SplObserver $observer);
+ function detach(SplObserver $observer);
/** Notify all observers
*/
- function notify();
+ function notify();
}
?>
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 4f409a0f7..e6d89019d 100755
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_array.c,v 1.71.2.17.2.14 2007/10/18 05:26:55 helly Exp $ */
+/* $Id: spl_array.c,v 1.71.2.17.2.15 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/ext/spl/spl_array.h b/ext/spl/spl_array.h
index 0dc6d0073..4c6e49b97 100755
--- a/ext/spl/spl_array.h
+++ b/ext/spl/spl_array.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_array.h,v 1.13.2.2.2.4 2007/02/08 22:54:34 helly Exp $ */
+/* $Id: spl_array.h,v 1.13.2.2.2.5 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef SPL_ARRAY_H
#define SPL_ARRAY_H
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 930b83385..f62b261b9 100755
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_directory.c,v 1.45.2.27.2.23 2007/09/22 15:55:35 iliaa Exp $ */
+/* $Id: spl_directory.c,v 1.45.2.27.2.26 2008/02/13 12:23:26 helly Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -484,7 +484,7 @@ SPL_METHOD(DirectoryIterator, __construct)
intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
spl_filesystem_dir_open(intern, path TSRMLS_CC);
intern->u.dir.is_recursive = instanceof_function(intern->std.ce, spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0;
- intern->flags = 0;
+ intern->flags = SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_SELF;
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
}
@@ -661,7 +661,7 @@ SPL_METHOD(RecursiveDirectoryIterator, key)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
- if (intern->flags & SPL_FILE_DIR_KEY_AS_FILENAME) {
+ if (SPL_FILE_DIR_KEY(intern, SPL_FILE_DIR_KEY_AS_FILENAME)) {
RETURN_STRING(intern->u.dir.entry.d_name, 1);
} else {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
@@ -676,10 +676,10 @@ SPL_METHOD(RecursiveDirectoryIterator, current)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
- if (intern->flags & SPL_FILE_DIR_CURRENT_AS_PATHNAME) {
+ if (SPL_FILE_DIR_CURRENT(intern, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
RETURN_STRINGL(intern->file_name, intern->file_name_len, 1);
- } else if (intern->flags & SPL_FILE_DIR_CURRENT_AS_FILEINFO) {
+ } else if (SPL_FILE_DIR_CURRENT(intern, SPL_FILE_DIR_CURRENT_AS_FILEINFO)) {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
spl_filesystem_object_create_type(0, intern, SPL_FS_INFO, NULL, return_value TSRMLS_CC);
} else {
@@ -962,7 +962,7 @@ SPL_METHOD(RecursiveDirectoryIterator, __construct)
spl_filesystem_object *intern;
char *path;
int len;
- long flags = SPL_FILE_DIR_CURRENT_AS_FILEINFO;
+ long flags = SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO;
php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException TSRMLS_CC);
@@ -1104,7 +1104,7 @@ SPL_METHOD(RecursiveDirectoryIterator, getSubPathname)
}
/* }}} */
-/* define an overloaded iterator structure */
+/* {{{ define an overloaded iterator structure */
typedef struct {
zend_object_iterator intern;
zval *current;
@@ -1128,6 +1128,7 @@ zend_object_iterator_funcs spl_filesystem_dir_it_funcs = {
spl_filesystem_dir_it_move_forward,
spl_filesystem_dir_it_rewind
};
+/* }}} */
/* {{{ spl_ce_dir_get_iterator */
zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
@@ -1162,7 +1163,7 @@ static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC)
efree(iterator);
}
/* }}} */
-
+
/* {{{ spl_filesystem_dir_it_valid */
static int spl_filesystem_dir_it_valid(zend_object_iterator *iter TSRMLS_DC)
{
@@ -1173,7 +1174,6 @@ static int spl_filesystem_dir_it_valid(zend_object_iterator *iter TSRMLS_DC)
}
/* }}} */
-
/* {{{ spl_filesystem_dir_it_current_data */
static void spl_filesystem_dir_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC)
{
@@ -1240,21 +1240,21 @@ static void spl_filesystem_tree_it_dtor(zend_object_iterator *iter TSRMLS_DC)
efree(iterator);
}
/* }}} */
-
+
/* {{{ spl_filesystem_tree_it_current_data */
static void spl_filesystem_tree_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC)
{
spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter;
spl_filesystem_object *object = iterator->object;
- if (object->flags & SPL_FILE_DIR_CURRENT_AS_PATHNAME) {
+ if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
if (!iterator->current) {
ALLOC_INIT_ZVAL(iterator->current);
spl_filesystem_object_get_file_name(object TSRMLS_CC);
ZVAL_STRINGL(iterator->current, object->file_name, object->file_name_len, 1);
}
*data = &iterator->current;
- } else if (object->flags & SPL_FILE_DIR_CURRENT_AS_FILEINFO) {
+ } else if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_FILEINFO)) {
if (!iterator->current) {
ALLOC_INIT_ZVAL(iterator->current);
spl_filesystem_object_get_file_name(object TSRMLS_CC);
@@ -1273,7 +1273,7 @@ static int spl_filesystem_tree_it_current_key(zend_object_iterator *iter, char *
spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter;
spl_filesystem_object *object = iterator->object;
- if (object->flags & SPL_FILE_DIR_KEY_AS_FILENAME) {
+ if (SPL_FILE_DIR_KEY(object, SPL_FILE_DIR_KEY_AS_FILENAME)) {
*str_key_len = strlen(object->u.dir.entry.d_name) + 1;
*str_key = estrndup(object->u.dir.entry.d_name, *str_key_len - 1);
} else {
@@ -1330,7 +1330,7 @@ static void spl_filesystem_tree_it_rewind(zend_object_iterator *iter TSRMLS_DC)
}
/* }}} */
-/* iterator handler table */
+/* {{{ iterator handler table */
zend_object_iterator_funcs spl_filesystem_tree_it_funcs = {
spl_filesystem_tree_it_dtor,
spl_filesystem_dir_it_valid,
@@ -1339,6 +1339,7 @@ zend_object_iterator_funcs spl_filesystem_tree_it_funcs = {
spl_filesystem_tree_it_move_forward,
spl_filesystem_tree_it_rewind
};
+/* }}} */
/* {{{ spl_ce_dir_get_iterator */
zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
@@ -1383,7 +1384,7 @@ static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type TS
}
/* }}} */
-/* declare method parameters */
+/* {{{ declare method parameters */
/* supply a name and default to call by parameter */
static
ZEND_BEGIN_ARG_INFO(arginfo_info___construct, 0)
@@ -1444,7 +1445,7 @@ static zend_function_entry spl_SplFileInfo_functions[] = {
};
static
-ZEND_BEGIN_ARG_INFO(arginfo_dir___construct, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_dir___construct, 0)
ZEND_ARG_INFO(0, path)
ZEND_END_ARG_INFO()
@@ -1487,6 +1488,7 @@ static zend_function_entry spl_RecursiveDirectoryIterator_functions[] = {
SPL_ME(RecursiveDirectoryIterator, getSubPathname,NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
+/* }}} */
static int spl_filesystem_file_read(spl_filesystem_object *intern, int silent TSRMLS_DC) /* {{{ */
{
@@ -1582,12 +1584,12 @@ static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function
return result;
} /* }}} */
-#define FileFunctionCall(func_name, pass_num_args, arg2) \
+#define FileFunctionCall(func_name, pass_num_args, arg2) /* {{{ */ \
{ \
zend_function *func_ptr; \
zend_hash_find(EG(function_table), #func_name, sizeof(#func_name), (void **) &func_ptr); \
spl_filesystem_file_call(intern, func_ptr, pass_num_args, return_value, arg2 TSRMLS_CC); \
-}
+} /* }}} */
static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char delimiter, char enclosure, zval *return_value TSRMLS_DC) /* {{{ */
{
@@ -1667,7 +1669,7 @@ static int spl_filesystem_file_is_empty_line(spl_filesystem_object *intern TSRML
case IS_STRING:
return Z_STRLEN_P(intern->u.file.current_zval) == 0;
case IS_ARRAY:
- if ((intern->flags & SPL_FILE_OBJECT_READ_CSV)
+ if ((intern->flags & SPL_FILE_OBJECT_READ_CSV)
&& zend_hash_num_elements(Z_ARRVAL_P(intern->u.file.current_zval)) == 1) {
zval ** first = Z_ARRVAL_P(intern->u.file.current_zval)->pListHead->pData;
@@ -2045,7 +2047,6 @@ SPL_METHOD(SplFileObject, fflush)
RETURN_BOOL(!php_stream_flush(intern->u.file.stream));
} /* }}} */
-
/* {{{ proto int SplFileObject::ftell()
Return current file position */
SPL_METHOD(SplFileObject, ftell)
@@ -2227,17 +2228,17 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object___construct, 0, 0, 1)
ZEND_END_ARG_INFO()
static
-ZEND_BEGIN_ARG_INFO(arginfo_file_object_setFlags, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_file_object_setFlags, 0)
ZEND_ARG_INFO(0, flags)
ZEND_END_ARG_INFO()
static
-ZEND_BEGIN_ARG_INFO(arginfo_file_object_setMaxLineLen, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_file_object_setMaxLineLen, 0)
ZEND_ARG_INFO(0, max_len)
ZEND_END_ARG_INFO()
static
-ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetcsv, 0, 0, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetcsv, 0, 0, 0)
ZEND_ARG_INFO(0, delimiter)
ZEND_ARG_INFO(0, enclosure)
ZEND_END_ARG_INFO()
@@ -2347,9 +2348,9 @@ PHP_MINIT_FUNCTION(spl_directory)
REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_MODE_MASK", SPL_FILE_DIR_CURRENT_MODE_MASK);
REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_AS_PATHNAME", SPL_FILE_DIR_CURRENT_AS_PATHNAME);
REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_AS_FILEINFO", SPL_FILE_DIR_CURRENT_AS_FILEINFO);
- REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_AS_SELF", 0);
+ REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_AS_SELF", SPL_FILE_DIR_CURRENT_AS_SELF);
REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "KEY_MODE_MASK", SPL_FILE_DIR_KEY_MODE_MASK);
- REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "KEY_AS_PATHNAME", 0);
+ REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "KEY_AS_PATHNAME", SPL_FILE_DIR_KEY_AS_PATHNAME);
REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "KEY_AS_FILENAME", SPL_FILE_DIR_KEY_AS_FILENAME);
REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "NEW_CURRENT_AND_KEY", SPL_FILE_DIR_KEY_AS_FILENAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO);
@@ -2369,7 +2370,6 @@ PHP_MINIT_FUNCTION(spl_directory)
}
/* }}} */
-
/*
* Local variables:
* tab-width: 4
diff --git a/ext/spl/spl_directory.h b/ext/spl/spl_directory.h
index 222ac5b59..cce07fd93 100755
--- a/ext/spl/spl_directory.h
+++ b/ext/spl/spl_directory.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_directory.h,v 1.12.2.5.2.4 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_directory.h,v 1.12.2.5.2.10 2008/02/13 12:23:26 helly Exp $ */
#ifndef SPL_DIRECTORY_H
#define SPL_DIRECTORY_H
@@ -35,7 +35,7 @@ PHP_MINIT_FUNCTION(spl_directory);
typedef enum {
SPL_FS_INFO, /* must be 0 */
SPL_FS_DIR,
- SPL_FS_FILE,
+ SPL_FS_FILE
} SPL_FS_OBJ_TYPE;
typedef struct _spl_filesystem_object spl_filesystem_object;
@@ -55,7 +55,7 @@ struct _spl_filesystem_object {
char *path;
int path_len;
char *file_name;
- int file_name_len;
+ int file_name_len;
SPL_FS_OBJ_TYPE type;
long flags;
zend_class_entry *file_class;
@@ -93,12 +93,16 @@ struct _spl_filesystem_object {
#define SPL_FILE_OBJECT_SKIP_EMPTY 0x00000006 /* skip empty lines */
#define SPL_FILE_OBJECT_READ_CSV 0x00000008 /* read via fgetcsv */
-#define SPL_FILE_DIR_CURRENT_AS_FILEINFO 0x00000010 /* make RecursiveDirectoryTree::current() return SplFileInfo */
+#define SPL_FILE_DIR_CURRENT_AS_FILEINFO 0x00000000 /* make RecursiveDirectoryTree::current() return SplFileInfo */
+#define SPL_FILE_DIR_CURRENT_AS_SELF 0x00000010 /* make RecursiveDirectoryTree::current() return getSelf() */
#define SPL_FILE_DIR_CURRENT_AS_PATHNAME 0x00000020 /* make RecursiveDirectoryTree::current() return getPathname() */
#define SPL_FILE_DIR_CURRENT_MODE_MASK 0x000000F0 /* mask RecursiveDirectoryTree::current() */
+#define SPL_FILE_DIR_CURRENT(intern,mode) ((intern->flags&SPL_FILE_DIR_CURRENT_MODE_MASK)==mode)
+#define SPL_FILE_DIR_KEY_AS_PATHNAME 0x00000000 /* make RecursiveDirectoryTree::key() return getPathname() */
#define SPL_FILE_DIR_KEY_AS_FILENAME 0x00000100 /* make RecursiveDirectoryTree::key() return getFilename() */
#define SPL_FILE_DIR_KEY_MODE_MASK 0x00000F00 /* mask RecursiveDirectoryTree::key() */
+#define SPL_FILE_DIR_KEY(intern,mode) ((intern->flags&SPL_FILE_DIR_KEY_MODE_MASK)==mode)
#endif /* SPL_DIRECTORY_H */
diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c
index 9404e8e24..00bacdf3a 100755
--- a/ext/spl/spl_engine.c
+++ b/ext/spl/spl_engine.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h
index ecb42d304..d4a9ef47e 100755
--- a/ext/spl/spl_engine.h
+++ b/ext/spl/spl_engine.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_engine.h,v 1.19.2.3.2.1 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_engine.h,v 1.19.2.3.2.2 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef SPL_ENGINE_H
#define SPL_ENGINE_H
diff --git a/ext/spl/spl_exceptions.c b/ext/spl/spl_exceptions.c
index 081341312..fdbfb0069 100755
--- a/ext/spl/spl_exceptions.c
+++ b/ext/spl/spl_exceptions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_exceptions.c,v 1.6.2.1.2.2 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_exceptions.c,v 1.6.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/ext/spl/spl_exceptions.h b/ext/spl/spl_exceptions.h
index 34811f876..9133b7076 100755
--- a/ext/spl/spl_exceptions.h
+++ b/ext/spl/spl_exceptions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_exceptions.h,v 1.5.2.1.2.1 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_exceptions.h,v 1.5.2.1.2.2 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef SPL_EXCEPTIONS_H
#define SPL_EXCEPTIONS_H
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c
index e1fedcb0f..b7bb476ab 100755
--- a/ext/spl/spl_functions.c
+++ b/ext/spl/spl_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_functions.c,v 1.28.2.3.2.3 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_functions.c,v 1.28.2.3.2.4 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/spl/spl_functions.h b/ext/spl/spl_functions.h
index 0a82a74da..19529a4c9 100755
--- a/ext/spl/spl_functions.h
+++ b/ext/spl/spl_functions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_functions.h,v 1.19.2.3.2.2 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_functions.h,v 1.19.2.3.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef PHP_FUNCTIONS_H
#define PHP_FUNCTIONS_H
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 8bd107bbf..0160b5042 100755
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_iterators.c,v 1.73.2.30.2.29 2007/10/18 05:26:55 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.73.2.30.2.31 2008/03/12 13:24:24 colder Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -693,8 +693,13 @@ static union _zend_function *spl_recursive_it_get_method(zval **object_ptr, char
union _zend_function *function_handler;
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(*object_ptr TSRMLS_CC);
long level = object->level;
- zval *zobj = object->iterators[level].zobject;
-
+ zval *zobj;
+
+ if (!object->iterators) {
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "The %s instance wasn't initialized properly", Z_OBJCE_PP(object_ptr)->name);
+ }
+ zobj = object->iterators[level].zobject;
+
function_handler = std_object_handlers.get_method(object_ptr, method, method_len TSRMLS_CC);
if (!function_handler) {
if (zend_hash_find(&Z_OBJCE_P(zobj)->function_table, method, method_len+1, (void **) &function_handler) == FAILURE) {
diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h
index 26c21693d..104676911 100755
--- a/ext/spl/spl_iterators.h
+++ b/ext/spl/spl_iterators.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_iterators.h,v 1.18.2.7.2.12 2007/05/11 00:15:25 helly Exp $ */
+/* $Id: spl_iterators.h,v 1.18.2.7.2.14 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef SPL_ITERATORS_H
#define SPL_ITERATORS_H
@@ -94,7 +94,7 @@ enum {
enum {
/* public */
REGIT_USE_KEY = 0x00000001,
- REGIT_INVERTED = 0x00000002,
+ REGIT_INVERTED = 0x00000002
};
typedef enum {
@@ -103,7 +103,7 @@ typedef enum {
REGIT_MODE_ALL_MATCHES,
REGIT_MODE_SPLIT,
REGIT_MODE_REPLACE,
- REGIT_MODE_MAX,
+ REGIT_MODE_MAX
} regex_mode;
typedef struct _spl_dual_it_object {
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 27903e504..39a293b0f 100755
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is SplSubject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_observer.c,v 1.2.2.6.2.3 2007/02/08 22:14:25 helly Exp $ */
+/* $Id: spl_observer.c,v 1.2.2.6.2.4 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/ext/spl/spl_observer.h b/ext/spl/spl_observer.h
index b6924ebd8..a1d7d5621 100755
--- a/ext/spl/spl_observer.h
+++ b/ext/spl/spl_observer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_observer.h,v 1.2.2.2.2.1 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_observer.h,v 1.2.2.2.2.2 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef SPL_OBSERVER_H
#define SPL_OBSERVER_H
diff --git a/ext/spl/spl_sxe.c b/ext/spl/spl_sxe.c
index b7a5eac99..e5fda429f 100755
--- a/ext/spl/spl_sxe.c
+++ b/ext/spl/spl_sxe.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_sxe.c,v 1.8.2.5.2.2 2007/08/14 12:10:46 rrichards Exp $ */
+/* $Id: spl_sxe.c,v 1.8.2.5.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/ext/spl/spl_sxe.h b/ext/spl/spl_sxe.h
index c7c77392e..64ff2d225 100755
--- a/ext/spl/spl_sxe.h
+++ b/ext/spl/spl_sxe.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_sxe.h,v 1.4.2.1.2.1 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: spl_sxe.h,v 1.4.2.1.2.2 2007/12/31 07:20:11 sebastian Exp $ */
#ifndef SPL_SXE_H
#define SPL_SXE_H
diff --git a/ext/spl/tests/bug41828.phpt b/ext/spl/tests/bug41828.phpt
new file mode 100644
index 000000000..6053e0e44
--- /dev/null
+++ b/ext/spl/tests/bug41828.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #41828 (Segfault if extended constructor of RecursiveIterator doesn't call its parent)
+--FILE--
+<?php
+class foo extends RecursiveIteratorIterator {
+
+ public function __construct($str) {
+ }
+
+ public function bar() {
+ }
+}
+
+$foo = new foo("This is bar");
+echo $foo->bar();
+
+?>
+==DONE==
+<?php exit(0); ?>
+--EXPECTF--
+Fatal error: main(): The foo instance wasn't initialized properly in %s on line %d
diff --git a/ext/spl/tests/dit_002.phpt b/ext/spl/tests/dit_002.phpt
new file mode 100755
index 000000000..f18d1198d
--- /dev/null
+++ b/ext/spl/tests/dit_002.phpt
@@ -0,0 +1,50 @@
+--TEST--
+SPL: DirectoryIterator defaults
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
+--FILE--
+<?php
+
+$classes = array(
+ 'DirectoryIterator' => 0,
+ 'RecursiveDirectoryIterator' => 1,
+);
+
+foreach ($classes as $class => $flags) {
+ echo "===$class===\n";
+ $ref = new ReflectionClass($class);
+ $obj = $ref->newInstance('.');
+ echo get_class($obj->current()) . "\n";
+ if ($flags)
+ {
+ $flags = array(
+ RecursiveDirectoryIterator::CURRENT_AS_FILEINFO => 0,
+ RecursiveDirectoryIterator::CURRENT_AS_SELF => 0,
+ RecursiveDirectoryIterator::CURRENT_AS_PATHNAME => 1,
+ );
+ foreach($flags as $flag => $isstring) {
+ $obj = $ref->newInstance('.', $flag);
+ if ($isstring) {
+ $val = $obj->current();
+ if (is_string($val)) {
+ var_dump(true);
+ } else {
+ var_dump($val);
+ }
+ } else {
+ echo get_class($obj->current()) . "\n";
+ }
+ }
+ }
+}
+?>
+===DONE===
+--EXPECT--
+===DirectoryIterator===
+DirectoryIterator
+===RecursiveDirectoryIterator===
+SplFileInfo
+SplFileInfo
+RecursiveDirectoryIterator
+bool(true)
+===DONE===
diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c
index 2064e2d70..5a6f7f5c2 100644
--- a/ext/sqlite/pdo_sqlite2.c
+++ b/ext/sqlite/pdo_sqlite2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_sqlite2.c,v 1.6.2.3.2.2 2007/01/01 09:36:07 sebastian Exp $ */
+/* $Id: pdo_sqlite2.c,v 1.6.2.3.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/ext/sqlite/php_sqlite.h b/ext/sqlite/php_sqlite.h
index a2288aa77..83e420097 100644
--- a/ext/sqlite/php_sqlite.h
+++ b/ext/sqlite/php_sqlite.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Marcus Boerger <helly@php.net> |
+----------------------------------------------------------------------+
- $Id: php_sqlite.h,v 1.32.2.2.2.2 2007/05/19 17:58:22 iliaa Exp $
+ $Id: php_sqlite.h,v 1.32.2.2.2.3 2007/12/31 07:20:11 sebastian Exp $
*/
#ifndef PHP_SQLITE_H
diff --git a/ext/sqlite/sess_sqlite.c b/ext/sqlite/sess_sqlite.c
index a4f652214..e2671051c 100644
--- a/ext/sqlite/sess_sqlite.c
+++ b/ext/sqlite/sess_sqlite.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sess_sqlite.c,v 1.18.2.1.2.2 2007/05/05 15:36:15 iliaa Exp $ */
+/* $Id: sess_sqlite.c,v 1.18.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */
#include "php.h"
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index 184fd23fb..84cf22cd3 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Marcus Boerger <helly@php.net> |
+----------------------------------------------------------------------+
- $Id: sqlite.c,v 1.166.2.13.2.9 2007/05/19 17:58:22 iliaa Exp $
+ $Id: sqlite.c,v 1.166.2.13.2.10 2007/12/31 07:20:11 sebastian Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1128,7 +1128,7 @@ PHP_MINFO_FUNCTION(sqlite)
{
php_info_print_table_start();
php_info_print_table_header(2, "SQLite support", "enabled");
- php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.13.2.9 2007/05/19 17:58:22 iliaa Exp $");
+ php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.13.2.10 2007/12/31 07:20:11 sebastian Exp $");
php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
php_info_print_table_end();
diff --git a/ext/standard/array.c b/ext/standard/array.c
index e3f2b7609..6f154b7d9 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.308.2.21.2.42 2007/11/06 13:28:21 jani Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.55 2008/03/12 19:13:00 felipe Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -102,7 +102,7 @@ ZEND_DECLARE_MODULE_GLOBALS(array)
*/
static void php_array_init_globals(zend_array_globals *array_globals)
{
- memset(array_globals, 0, sizeof(array_globals));
+ memset(array_globals, 0, sizeof(zend_array_globals));
}
/* }}} */
@@ -283,6 +283,11 @@ static int php_count_recursive(zval *array, long mode TSRMLS_DC) /* {{{ */
zval **element;
if (Z_TYPE_P(array) == IS_ARRAY) {
+ if (Z_ARRVAL_P(array)->nApplyCount > 1) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
+ return 0;
+ }
+
cnt = zend_hash_num_elements(Z_ARRVAL_P(array));
if (mode == COUNT_RECURSIVE) {
HashPosition pos;
@@ -290,7 +295,9 @@ static int php_count_recursive(zval *array, long mode TSRMLS_DC) /* {{{ */
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(array), &pos);
zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **) &element, &pos) == SUCCESS;
zend_hash_move_forward_ex(Z_ARRVAL_P(array), &pos)) {
+ Z_ARRVAL_P(array)->nApplyCount++;
cnt += php_count_recursive(*element, COUNT_RECURSIVE TSRMLS_CC);
+ Z_ARRVAL_P(array)->nApplyCount--;
}
}
}
@@ -324,7 +331,7 @@ PHP_FUNCTION(count)
if (Z_OBJ_HT_P(array)->get_class_entry && instanceof_function(Z_OBJCE_P(array), spl_ce_Countable TSRMLS_CC)) {
zend_call_method_with_0_params(&array, NULL, NULL, "count", &retval);
if (retval) {
- convert_to_long(retval);
+ convert_to_long_ex(&retval);
RETVAL_LONG(Z_LVAL_P(retval));
zval_ptr_dtor(&retval);
}
@@ -1077,7 +1084,7 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive
if (recursive && Z_TYPE_PP(args[0]) == IS_ARRAY) {
HashTable *thash;
- SEPARATE_ZVAL_TO_MAKE_IS_REF(args[0]);
+ SEPARATE_ZVAL_IF_NOT_REF(args[0]);
thash = HASH_OF(*(args[0]));
if (thash->nApplyCount > 1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
@@ -1975,6 +1982,7 @@ PHP_FUNCTION(array_push)
new_var->refcount++;
if (zend_hash_next_index_insert(Z_ARRVAL_P(stack), &new_var, sizeof(zval *), NULL) == FAILURE) {
+ new_var->refcount--;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot add element to the array as the next element is already occupied");
efree(args);
RETURN_FALSE;
@@ -2201,103 +2209,83 @@ PHP_FUNCTION(array_splice)
Returns elements specified by offset and length */
PHP_FUNCTION(array_slice)
{
- zval **input, /* Input array */
- **offset, /* Offset to get elements from */
- **length, /* How many elements to get */
- **entry, /* An array entry */
- **z_preserve_keys; /* Whether to preserve keys while copying to the new array or not */
- int offset_val, /* Value of the offset argument */
- length_val, /* Value of the length argument */
- num_in, /* Number of elements in the input array */
- pos, /* Current position in the array */
- argc; /* Number of function arguments */
-
+ zval *input, /* Input array */
+ **z_length, /* How many elements to get */
+ **entry; /* An array entry */
+ long offset, /* Offset to get elements from */
+ length = 0;
+ zend_bool preserve_keys = 0; /* Whether to preserve keys while copying to the new array or not */
+ int num_in, /* Number of elements in the input array */
+ pos; /* Current position in the array */
char *string_key;
uint string_key_len;
ulong num_key;
HashPosition hpos;
- zend_bool preserve_keys = 0;
- /* Get the arguments and do error-checking */
- argc = ZEND_NUM_ARGS();
- if (argc < 2 || argc > 4 || zend_get_parameters_ex(argc, &input, &offset, &length, &z_preserve_keys)) {
- WRONG_PARAM_COUNT;
- }
-
- if (Z_TYPE_PP(input) != IS_ARRAY) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should be an array");
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "al|Zb", &input, &offset, &z_length, &preserve_keys) == FAILURE) {
return;
}
-
- /* Make sure offset and length are integers and assume
- we want all entries from offset to the end if length
- is not passed */
- convert_to_long_ex(offset);
- offset_val = Z_LVAL_PP(offset);
- if (argc >= 3 && Z_TYPE_PP(length) != IS_NULL) {
- convert_to_long_ex(length);
- length_val = Z_LVAL_PP(length);
+
+ /* Get number of entries in the input hash */
+ num_in = zend_hash_num_elements(Z_ARRVAL_P(input));
+
+ /* We want all entries from offset to the end if length is not passed or is null */
+ if (ZEND_NUM_ARGS() < 3 || Z_TYPE_PP(z_length) == IS_NULL) {
+ length = num_in;
} else {
- length_val = zend_hash_num_elements(Z_ARRVAL_PP(input));
+ convert_to_long_ex(z_length);
+ length = Z_LVAL_PP(z_length);
}
- if (ZEND_NUM_ARGS() > 3) {
- convert_to_boolean_ex(z_preserve_keys);
- preserve_keys = Z_BVAL_PP(z_preserve_keys);
- }
-
/* Initialize returned array */
array_init(return_value);
-
- /* Get number of entries in the input hash */
- num_in = zend_hash_num_elements(Z_ARRVAL_PP(input));
-
+
/* Clamp the offset.. */
- if (offset_val > num_in)
+ if (offset > num_in) {
return;
- else if (offset_val < 0 && (offset_val = (num_in + offset_val)) < 0)
- offset_val = 0;
-
+ } else if (offset < 0 && (offset = (num_in + offset)) < 0) {
+ offset = 0;
+ }
+
/* ..and the length */
- if (length_val < 0) {
- length_val = num_in - offset_val + length_val;
- } else if (((unsigned)offset_val + (unsigned)length_val) > (unsigned)num_in) {
- length_val = num_in - offset_val;
+ if (length < 0) {
+ length = num_in - offset + length;
+ } else if (((unsigned) offset + (unsigned) length) > (unsigned) num_in) {
+ length = num_in - offset;
}
-
- if (length_val == 0)
+
+ if (length == 0) {
return;
-
+ }
+
/* Start at the beginning and go until we hit offset */
pos = 0;
- zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &hpos);
- while (pos < offset_val && zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void **)&entry, &hpos) == SUCCESS) {
+ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(input), &hpos);
+ while (pos < offset && zend_hash_get_current_data_ex(Z_ARRVAL_P(input), (void **)&entry, &hpos) == SUCCESS) {
pos++;
- zend_hash_move_forward_ex(Z_ARRVAL_PP(input), &hpos);
+ zend_hash_move_forward_ex(Z_ARRVAL_P(input), &hpos);
}
-
+
/* Copy elements from input array to the one that's returned */
- while (pos < offset_val+length_val && zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void **)&entry, &hpos) == SUCCESS) {
-
- (*entry)->refcount++;
+ while (pos < offset + length && zend_hash_get_current_data_ex(Z_ARRVAL_P(input), (void **)&entry, &hpos) == SUCCESS) {
+
+ zval_add_ref(entry);
- switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key, &string_key_len, &num_key, 0, &hpos)) {
+ switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(input), &string_key, &string_key_len, &num_key, 0, &hpos)) {
case HASH_KEY_IS_STRING:
- zend_hash_update(Z_ARRVAL_P(return_value), string_key, string_key_len,
- entry, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL_P(return_value), string_key, string_key_len, entry, sizeof(zval *), NULL);
break;
-
+
case HASH_KEY_IS_LONG:
- if (preserve_keys)
- zend_hash_index_update(Z_ARRVAL_P(return_value), num_key,
- entry, sizeof(zval *), NULL);
- else
- zend_hash_next_index_insert(Z_ARRVAL_P(return_value),
- entry, sizeof(zval *), NULL);
+ if (preserve_keys) {
+ zend_hash_index_update(Z_ARRVAL_P(return_value), num_key, entry, sizeof(zval *), NULL);
+ } else {
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), entry, sizeof(zval *), NULL);
+ }
break;
}
pos++;
- zend_hash_move_forward_ex(Z_ARRVAL_PP(input), &hpos);
+ zend_hash_move_forward_ex(Z_ARRVAL_P(input), &hpos);
}
}
/* }}} */
@@ -2314,20 +2302,40 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS
while (zend_hash_get_current_data_ex(src, (void **)&src_entry, &pos) == SUCCESS) {
switch (zend_hash_get_current_key_ex(src, &string_key, &string_key_len, &num_key, 0, &pos)) {
case HASH_KEY_IS_STRING:
- if (recursive &&
- zend_hash_find(dest, string_key, string_key_len, (void **)&dest_entry) == SUCCESS) {
- if (*src_entry == *dest_entry && ((*dest_entry)->refcount % 2)) {
+ if (recursive && zend_hash_find(dest, string_key, string_key_len, (void **)&dest_entry) == SUCCESS) {
+ HashTable *thash = HASH_OF(*dest_entry);
+
+ if ((thash && thash->nApplyCount > 1) || (*src_entry == *dest_entry && (*dest_entry)->is_ref && ((*dest_entry)->refcount % 2))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
return 0;
}
SEPARATE_ZVAL(dest_entry);
SEPARATE_ZVAL(src_entry);
- convert_to_array_ex(dest_entry);
- convert_to_array_ex(src_entry);
- if (!php_array_merge(Z_ARRVAL_PP(dest_entry),
- Z_ARRVAL_PP(src_entry), recursive TSRMLS_CC))
+ if (Z_TYPE_PP(dest_entry) == IS_NULL) {
+ convert_to_array_ex(dest_entry);
+ add_next_index_null(*dest_entry);
+ } else {
+ convert_to_array_ex(dest_entry);
+ }
+ if (Z_TYPE_PP(src_entry) == IS_NULL) {
+ convert_to_array_ex(src_entry);
+ add_next_index_null(*src_entry);
+ } else {
+ convert_to_array_ex(src_entry);
+ }
+ if (thash) {
+ thash->nApplyCount++;
+ }
+ if (!php_array_merge(Z_ARRVAL_PP(dest_entry), Z_ARRVAL_PP(src_entry), recursive TSRMLS_CC)) {
+ if (thash) {
+ thash->nApplyCount--;
+ }
return 0;
+ }
+ if (thash) {
+ thash->nApplyCount--;
+ }
} else {
(*src_entry)->refcount++;
@@ -2655,6 +2663,11 @@ PHP_FUNCTION(array_pad)
/* Do some initial calculations */
input_size = zend_hash_num_elements(Z_ARRVAL_PP(input));
pad_size_abs = abs(Z_LVAL_PP(pad_size));
+ if (pad_size_abs < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "You may only pad up to 1048576 elements at a time");
+ zval_dtor(return_value);
+ RETURN_FALSE;
+ }
do_pad = (input_size >= pad_size_abs) ? 0 : 1;
/* Copy the original array */
@@ -3722,13 +3735,14 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
}
c = 1;
for (i = 1; i < arr_argc; i++) {
+ Bucket **ptr = ptrs[i];
if (behavior == DIFF_NORMAL) {
- while (*ptrs[i] && (0 < (c = diff_data_compare_func(ptrs[0], ptrs[i] TSRMLS_CC)))) {
- ptrs[i]++;
+ while (*ptr && (0 < (c = diff_data_compare_func(ptrs[0], ptr TSRMLS_CC)))) {
+ ptr++;
}
} else if (behavior & DIFF_ASSOC) { /* triggered also when DIFF_KEY */
- while (*ptrs[i] && (0 < (c = diff_key_compare_func(ptrs[0], ptrs[i] TSRMLS_CC)))) {
- ptrs[i]++;
+ while (*ptr && (0 != (c = diff_key_compare_func(ptrs[0], ptr TSRMLS_CC)))) {
+ ptr++;
}
}
if (!c) {
@@ -3742,11 +3756,11 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
In this branch is execute only when DIFF_ASSOC. If behavior == DIFF_KEY
data comparison is not needed - skipped.
*/
- if (*ptrs[i]) {
+ if (*ptr) {
if (data_compare_type == DIFF_COMP_DATA_USER) {
BG(user_compare_func_name) = args[arr_argc];
}
- if (diff_data_compare_func(ptrs[0], ptrs[i] TSRMLS_CC) != 0) {
+ if (diff_data_compare_func(ptrs[0], ptr TSRMLS_CC) != 0) {
/* the data is not the same */
c = -1;
if (key_compare_type == DIFF_COMP_KEY_USER) {
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index 220ffad51..c4fb5a13e 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: assert.c,v 1.60.2.3.2.6 2007/02/16 16:35:04 dmitry Exp $ */
+/* $Id: assert.c,v 1.60.2.3.2.7 2007/12/31 07:20:12 sebastian Exp $ */
/* {{{ includes/startup/misc */
diff --git a/ext/standard/base64.c b/ext/standard/base64.c
index 2bfe83198..b3179b99f 100644
--- a/ext/standard/base64.c
+++ b/ext/standard/base64.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: base64.c,v 1.43.2.2.2.3 2007/07/21 01:24:26 jani Exp $ */
+/* $Id: base64.c,v 1.43.2.2.2.4 2007/12/31 07:20:12 sebastian Exp $ */
#include <string.h>
diff --git a/ext/standard/base64.h b/ext/standard/base64.h
index 20c3f3dbe..11a65e1b1 100644
--- a/ext/standard/base64.h
+++ b/ext/standard/base64.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: base64.h,v 1.14.2.1.2.2 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: base64.h,v 1.14.2.1.2.3 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef BASE64_H
#define BASE64_H
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 43b3b1407..3d61f3d0c 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.725.2.31.2.66 2007/10/22 07:37:20 dmitry Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.69 2008/03/20 00:55:26 dsp Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -4568,10 +4568,11 @@ PHP_FUNCTION(getopt)
* in order to be on the safe side, even though it is also available
* from the symbol table.
*/
- if (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE ||
- zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) {
+ if ((zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE ||
+ zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY
+ ) {
int pos = 0;
- zval **arg;
+ zval **entry;
argc = zend_hash_num_elements(Z_ARRVAL_PP(args));
@@ -4586,8 +4587,22 @@ PHP_FUNCTION(getopt)
/* Iterate over the hash to construct the argv array. */
while (zend_hash_get_current_data(Z_ARRVAL_PP(args),
- (void **)&arg) == SUCCESS) {
- argv[pos++] = estrdup(Z_STRVAL_PP(arg));
+ (void **)&entry) == SUCCESS) {
+ zval arg, *arg_ptr = *entry;
+
+ if (Z_TYPE_PP(entry) != IS_STRING) {
+ arg = **entry;
+ zval_copy_ctor(&arg);
+ convert_to_string(&arg);
+ arg_ptr = &arg;
+ }
+
+ argv[pos++] = estrdup(Z_STRVAL_P(arg_ptr));
+
+ if (arg_ptr != *entry) {
+ zval_dtor(&arg);
+ }
+
zend_hash_move_forward(Z_ARRVAL_PP(args));
}
@@ -4605,7 +4620,7 @@ PHP_FUNCTION(getopt)
#ifdef HARTMUT_0
int len, c = zend_hash_num_elements(Z_ARRVAL_P(p_longopts));
struct option *p;
- zval **arg;
+ zval **entry;
char *name;
longopts = (struct option *)ecalloc(c+1, sizeof(struct option));
@@ -4618,10 +4633,19 @@ PHP_FUNCTION(getopt)
/* Iterate over the hash to construct the argv array. */
while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts),
- (void **)&arg) == SUCCESS) {
+ (void **)&entry) == SUCCESS) {
+ zval arg, *arg_ptr = *entry;
+
+ if (Z_TYPE_PP(entry) != IS_STRING) {
+ arg = **entry;
+ zval_copy_ctor(&arg);
+ convert_to_string(&arg);
+ arg_ptr = &arg;
+ }
+
p->has_arg = 0;
- name = estrdup(Z_STRVAL_PP(arg));
+ name = estrdup(Z_STRVAL_P(arg_ptr));
len = strlen(name);
if((len > 0) && (name[len-1] == ':')) {
p->has_arg++;
@@ -4636,6 +4660,10 @@ PHP_FUNCTION(getopt)
p->flag = NULL;
p->val = 0;
+ if (arg_ptr != *entry) {
+ zval_dtor(&arg);
+ }
+
zend_hash_move_forward(Z_ARRVAL_P(p_longopts));
p++;
}
@@ -5191,8 +5219,10 @@ PHP_FUNCTION(call_user_method)
SEPARATE_ZVAL(params[0]);
convert_to_string(*params[0]);
- if (call_user_function_ex(EG(function_table), params[1], *params[0], &retval_ptr, arg_count-2, params+2, 0, NULL TSRMLS_CC) == SUCCESS && retval_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+ if (call_user_function_ex(EG(function_table), params[1], *params[0], &retval_ptr, arg_count-2, params+2, 0, NULL TSRMLS_CC) == SUCCESS) {
+ if (retval_ptr) {
+ COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+ }
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_PP(params[0]));
}
@@ -5233,8 +5263,10 @@ PHP_FUNCTION(call_user_method_array)
element++;
}
- if (call_user_function_ex(EG(function_table), obj, *method_name, &retval_ptr, num_elems, method_args, 0, NULL TSRMLS_CC) == SUCCESS && retval_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+ if (call_user_function_ex(EG(function_table), obj, *method_name, &retval_ptr, num_elems, method_args, 0, NULL TSRMLS_CC) == SUCCESS) {
+ if (retval_ptr) {
+ COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+ }
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_PP(method_name));
}
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index 767ca8b2e..b9269fe8a 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.h,v 1.139.2.4.2.6 2007/07/21 01:24:26 jani Exp $ */
+/* $Id: basic_functions.h,v 1.139.2.4.2.7 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef BASIC_FUNCTIONS_H
#define BASIC_FUNCTIONS_H
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 3e661fd9b..f8fde93dd 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: browscap.c,v 1.85.2.2.2.4 2007/10/04 13:31:10 jani Exp $ */
+/* $Id: browscap.c,v 1.85.2.2.2.5 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "php_regex.h"
diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c
index 7116e468a..44e711b1b 100644
--- a/ext/standard/crc32.c
+++ b/ext/standard/crc32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: crc32.c,v 1.16.2.4.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: crc32.c,v 1.16.2.4.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "basic_functions.h"
diff --git a/ext/standard/crc32.h b/ext/standard/crc32.h
index 3fa98d45a..477bac1de 100644
--- a/ext/standard/crc32.h
+++ b/ext/standard/crc32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: crc32.h,v 1.6.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: crc32.h,v 1.6.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
/*
* This code implements the AUTODIN II polynomial
diff --git a/ext/standard/credits.c b/ext/standard/credits.c
index cef6c76dd..d6f0a8e6f 100644
--- a/ext/standard/credits.c
+++ b/ext/standard/credits.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: credits.c,v 1.36.2.4.2.4 2007/05/22 15:44:11 bjori Exp $ */
+/* $Id: credits.c,v 1.36.2.4.2.6 2008/04/10 05:32:26 philip Exp $ */
#include "php.h"
#include "info.h"
@@ -96,9 +96,9 @@ PHPAPI void php_print_credits(int flag TSRMLS_DC)
if (flag & PHP_CREDITS_DOCS) {
php_info_print_table_start();
php_info_print_table_colspan_header(2, "PHP Documentation");
- CREDIT_LINE("Authors", "Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Philip Olson, Georg Richter, Damien Seguy, Jakub Vrana");
+ CREDIT_LINE("Authors", "Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Hannes Magnusson, Georg Richter, Damien Seguy, Jakub Vrana");
CREDIT_LINE("Editor", "Philip Olson");
- CREDIT_LINE("User Note Maintainers", "Mehdi Achour, Friedhelm Betz, Vincent Gevers, Aidan Lister, Nuno Lopes, Tom Sommer");
+ CREDIT_LINE("User Note Maintainers", "Friedhelm Betz, Etienne Kneuss, Nuno Lopes, Hannes Magnusson, Felipe Pena, Maciek Sokolewicz");
CREDIT_LINE("Other Contributors", "Previously active authors, editors and other contributors are listed in the manual.");
php_info_print_table_end();
}
diff --git a/ext/standard/credits.h b/ext/standard/credits.h
index 27ad4dd41..f8466147a 100644
--- a/ext/standard/credits.h
+++ b/ext/standard/credits.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: credits.h,v 1.11.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: credits.h,v 1.11.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef CREDITS_H
#define CREDITS_H
diff --git a/ext/standard/credits_ext.h b/ext/standard/credits_ext.h
index b468545c6..2288bb812 100644
--- a/ext/standard/credits_ext.h
+++ b/ext/standard/credits_ext.h
@@ -79,7 +79,7 @@ CREDIT_LINE("System V Message based IPC", "Wez Furlong");
CREDIT_LINE("System V Semaphores", "Tom May");
CREDIT_LINE("System V Shared Memory", "Christian Cartus");
CREDIT_LINE("tidy", "John Coggeshall, Ilia Alshanetsky");
-CREDIT_LINE("tokenizer", "Andrei Zmievski");
+CREDIT_LINE("tokenizer", "Andrei Zmievski, Johannes Schlueter");
CREDIT_LINE("WDDX", "Andrei Zmievski");
CREDIT_LINE("XMLReader", "Rob Richards");
CREDIT_LINE("xmlrpc", "Dan Libby");
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index 2a74d1bd0..fa51d6f7d 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: crypt.c,v 1.62.2.1.2.6 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: crypt.c,v 1.62.2.1.2.7 2007/12/31 07:20:12 sebastian Exp $ */
#include <stdlib.h>
#include "php.h"
diff --git a/ext/standard/css.c b/ext/standard/css.c
index 8595e0d3d..e138ab6c6 100644
--- a/ext/standard/css.c
+++ b/ext/standard/css.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: css.c,v 1.13.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: css.c,v 1.13.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "info.h"
diff --git a/ext/standard/css.h b/ext/standard/css.h
index fdced8f61..ad80fa783 100644
--- a/ext/standard/css.h
+++ b/ext/standard/css.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: css.h,v 1.6.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: css.h,v 1.6.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef CSS_H
#define CSS_H
diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c
index ac2eef59b..ff1bd5f94 100644
--- a/ext/standard/cyr_convert.c
+++ b/ext/standard/cyr_convert.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cyr_convert.c,v 1.27.2.3.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: cyr_convert.c,v 1.27.2.3.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#include <stdlib.h>
diff --git a/ext/standard/cyr_convert.h b/ext/standard/cyr_convert.h
index fba4877ba..970edc992 100644
--- a/ext/standard/cyr_convert.h
+++ b/ext/standard/cyr_convert.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cyr_convert.h,v 1.11.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: cyr_convert.h,v 1.11.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef CYR_CONVERT_H
#define CYR_CONVERT_H
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index afb5e771d..c0bb09be0 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: datetime.c,v 1.134.2.2.2.4 2007/06/07 08:59:00 tony2001 Exp $ */
+/* $Id: datetime.c,v 1.134.2.2.2.5 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "zend_operators.h"
diff --git a/ext/standard/datetime.h b/ext/standard/datetime.h
index 1f8bcc99f..c0c7a47d0 100644
--- a/ext/standard/datetime.h
+++ b/ext/standard/datetime.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: datetime.h,v 1.23.2.2.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: datetime.h,v 1.23.2.2.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef DATETIME_H
#define DATETIME_H
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index a3f540d2e..f6737ed1a 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dir.c,v 1.147.2.3.2.12 2007/09/19 22:37:58 iliaa Exp $ */
+/* $Id: dir.c,v 1.147.2.3.2.16 2008/03/05 12:10:18 tony2001 Exp $ */
/* {{{ includes/startup/misc */
@@ -256,14 +256,16 @@ PHP_FUNCTION(closedir)
{
zval **id, **tmp, *myself;
php_stream *dirp;
+ int rsrc_id;
FETCH_DIRP();
- if (dirp->rsrc_id == DIRG(default_dir)) {
+ rsrc_id = dirp->rsrc_id;
+ zend_list_delete(dirp->rsrc_id);
+
+ if (rsrc_id == DIRG(default_dir)) {
php_set_default_dir(-1 TSRMLS_CC);
}
-
- zend_list_delete(dirp->rsrc_id);
}
/* }}} */
@@ -467,7 +469,7 @@ no_results:
array_init(return_value);
for (n = 0; n < globbuf.gl_pathc; n++) {
if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
- if (PG(safe_mode) && (!php_checkuid(globbuf.gl_pathv[n], NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
+ if (PG(safe_mode) && (!php_checkuid_ex(globbuf.gl_pathv[n], NULL, CHECKUID_CHECK_FILE_AND_DIR, CHECKUID_NO_ERRORS))) {
basedir_limit = 1;
continue;
} else if (php_check_open_basedir_ex(globbuf.gl_pathv[n], 0 TSRMLS_CC)) {
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index 09f186cf0..f652d2536 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dl.c,v 1.106.2.1.2.5 2007/09/18 20:19:34 stas Exp $ */
+/* $Id: dl.c,v 1.106.2.1.2.6 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "dl.h"
diff --git a/ext/standard/dl.h b/ext/standard/dl.h
index 114680770..6b00fa74e 100644
--- a/ext/standard/dl.h
+++ b/ext/standard/dl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dl.h,v 1.23.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: dl.h,v 1.23.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef DL_H
#define DL_H
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index aba99dc79..a224a1cd9 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dns.c,v 1.70.2.7.2.5 2007/06/26 11:04:55 tony2001 Exp $ */
+/* $Id: dns.c,v 1.70.2.7.2.6 2007/12/31 07:20:12 sebastian Exp $ */
/* {{{ includes */
#include "php.h"
diff --git a/ext/standard/dns.h b/ext/standard/dns.h
index cc4772aab..356ced73e 100644
--- a/ext/standard/dns.h
+++ b/ext/standard/dns.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dns.h,v 1.19.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: dns.h,v 1.19.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef DNS_H
#define DNS_H
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 8f999c39f..7f1aea174 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
| Ilia Alshanetsky <iliaa@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: exec.c,v 1.113.2.3.2.2 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: exec.c,v 1.113.2.3.2.10 2008/04/08 17:17:07 iliaa Exp $ */
#include <stdio.h>
#include "php.h"
@@ -25,6 +25,7 @@
#include "safe_mode.h"
#include "ext/standard/head.h"
#include "ext/standard/file.h"
+#include "basic_functions.h"
#include "exec.h"
#include "php_globals.h"
#include "SAPI.h"
@@ -265,11 +266,25 @@ char *php_escape_shell_cmd(char *str) {
register int x, y, l;
char *cmd;
char *p = NULL;
+
+ TSRMLS_FETCH();
l = strlen(str);
cmd = safe_emalloc(2, l, 1);
for (x = 0, y = 0; x < l; x++) {
+ int mb_len = php_mblen(str + x, (l - x));
+
+ /* skip non-valid multibyte characters */
+ if (mb_len < 0) {
+ continue;
+ } else if (mb_len > 1) {
+ memcpy(cmd + y, str + x, mb_len);
+ y += mb_len;
+ x += mb_len - 1;
+ continue;
+ }
+
switch (str[x]) {
case '"':
case '\'':
@@ -328,6 +343,7 @@ char *php_escape_shell_cmd(char *str) {
char *php_escape_shell_arg(char *str) {
int x, y, l;
char *cmd;
+ TSRMLS_FETCH();
y = 0;
l = strlen(str);
@@ -341,6 +357,18 @@ char *php_escape_shell_arg(char *str) {
#endif
for (x = 0; x < l; x++) {
+ int mb_len = php_mblen(str + x, (l - x));
+
+ /* skip non-valid multibyte characters */
+ if (mb_len < 0) {
+ continue;
+ } else if (mb_len > 1) {
+ memcpy(cmd + y, str + x, mb_len);
+ y += mb_len;
+ x += mb_len - 1;
+ continue;
+ }
+
switch (str[x]) {
#ifdef PHP_WIN32
case '"':
@@ -372,18 +400,19 @@ char *php_escape_shell_arg(char *str) {
Escape shell metacharacters */
PHP_FUNCTION(escapeshellcmd)
{
- zval **arg1;
+ char *command;
+ int command_len;
char *cmd = NULL;
- if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &command, &command_len) == FAILURE) {
+ return;
}
-
- convert_to_string_ex(arg1);
- if (Z_STRLEN_PP(arg1)) {
- cmd = php_escape_shell_cmd(Z_STRVAL_PP(arg1));
- RETVAL_STRING(cmd, 1);
- efree(cmd);
+
+ if (command_len) {
+ cmd = php_escape_shell_cmd(command);
+ RETVAL_STRING(cmd, 0);
+ } else {
+ RETVAL_EMPTY_STRING();
}
}
/* }}} */
@@ -392,18 +421,17 @@ PHP_FUNCTION(escapeshellcmd)
Quote and escape an argument for use in a shell command */
PHP_FUNCTION(escapeshellarg)
{
- zval **arg1;
+ char *argument;
+ int argument_len;
char *cmd = NULL;
- if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &argument, &argument_len) == FAILURE) {
+ return;
}
-
- convert_to_string_ex(arg1);
- if (Z_STRLEN_PP(arg1)) {
- cmd = php_escape_shell_arg(Z_STRVAL_PP(arg1));
- RETVAL_STRING(cmd, 1);
- efree(cmd);
+
+ if (argument) {
+ cmd = php_escape_shell_arg(argument);
+ RETVAL_STRING(cmd, 0);
}
}
/* }}} */
diff --git a/ext/standard/exec.h b/ext/standard/exec.h
index 43d798b2b..371f695e1 100644
--- a/ext/standard/exec.h
+++ b/ext/standard/exec.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: exec.h,v 1.24.2.3.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: exec.h,v 1.24.2.3.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef EXEC_H
#define EXEC_H
diff --git a/ext/standard/file.c b/ext/standard/file.c
index e10295496..8ff709c58 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.409.2.6.2.28 2007/09/04 12:51:49 iliaa Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.31 2007/12/31 07:20:12 sebastian Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -592,6 +592,7 @@ PHP_FUNCTION(file_put_contents)
zval *zcontext = NULL;
php_stream_context *context = NULL;
php_stream *srcstream = NULL;
+ char mode[3] = "wb";
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/|lr!", &filename, &filename_len,
&data, &flags, &zcontext) == FAILURE) {
@@ -604,8 +605,14 @@ PHP_FUNCTION(file_put_contents)
context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT);
- stream = php_stream_open_wrapper_ex(filename, (flags & PHP_FILE_APPEND) ? "ab" : "wb",
- ((flags & PHP_FILE_USE_INCLUDE_PATH) ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
+ if (flags & PHP_FILE_APPEND) {
+ mode[0] = 'a';
+ } else if (flags & LOCK_EX) {
+ mode[0] = 'c';
+ }
+ mode[2] = '\0';
+
+ stream = php_stream_open_wrapper_ex(filename, mode, ((flags & PHP_FILE_USE_INCLUDE_PATH) ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
if (stream == NULL) {
RETURN_FALSE;
}
@@ -615,6 +622,10 @@ PHP_FUNCTION(file_put_contents)
RETURN_FALSE;
}
+ if (mode[0] == 'c') {
+ php_stream_truncate_set_size(stream, 0);
+ }
+
switch (Z_TYPE_P(data)) {
case IS_RESOURCE:
numbytes = php_stream_copy_to_stream(srcstream, stream, PHP_STREAM_COPY_ALL);
diff --git a/ext/standard/file.h b/ext/standard/file.h
index 7a1c7d1b3..d4d16bc09 100644
--- a/ext/standard/file.h
+++ b/ext/standard/file.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.h,v 1.94.2.2.2.5 2007/01/10 14:40:06 bjori Exp $ */
+/* $Id: file.h,v 1.94.2.2.2.6 2007/12/31 07:20:12 sebastian Exp $ */
/* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index df60b2e2d..a9f3f1000 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.136.2.8.2.15 2007/10/31 13:23:06 jani Exp $ */
+/* $Id: filestat.c,v 1.136.2.8.2.16 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "safe_mode.h"
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index 763272460..4e41063c4 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filters.c,v 1.44.2.6.2.5 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: filters.c,v 1.44.2.6.2.6 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "php_globals.h"
diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c
index c153c3457..167702b85 100644
--- a/ext/standard/flock_compat.c
+++ b/ext/standard/flock_compat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: flock_compat.c,v 1.29.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: flock_compat.c,v 1.29.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include <errno.h>
diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h
index 51ae7ac4e..ac6d55cb3 100644
--- a/ext/standard/flock_compat.h
+++ b/ext/standard/flock_compat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: flock_compat.h,v 1.20.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: flock_compat.h,v 1.20.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef FLOCK_COMPAT_H
#define FLOCK_COMPAT_H
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index 46c782536..662d85cd2 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: formatted_print.c,v 1.82.2.1.2.17 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: formatted_print.c,v 1.82.2.1.2.19 2008/03/17 23:00:41 stas Exp $ */
#include <math.h> /* modf() */
#include "php.h"
@@ -76,6 +76,7 @@ php_sprintf_appendstring(char **buffer, int *pos, int *size, char *add,
register int npad;
int req_size;
int copy_len;
+ int m_width;
copy_len = (expprec ? MIN(max_width, len) : len);
npad = min_width - copy_len;
@@ -86,11 +87,19 @@ php_sprintf_appendstring(char **buffer, int *pos, int *size, char *add,
PRINTF_DEBUG(("sprintf: appendstring(%x, %d, %d, \"%s\", %d, '%c', %d)\n",
*buffer, *pos, *size, add, min_width, padding, alignment));
+ m_width = MAX(min_width, copy_len);
- req_size = *pos + MAX(min_width, copy_len) + 1;
+ if(m_width > INT_MAX - *pos - 1) {
+ zend_error_noreturn(E_ERROR, "Field width %d is too long", m_width);
+ }
+
+ req_size = *pos + m_width + 1;
if (req_size > *size) {
while (req_size > *size) {
+ if(*size > INT_MAX/2) {
+ zend_error_noreturn(E_ERROR, "Field width %d is too long", req_size);
+ }
*size <<= 1;
}
PRINTF_DEBUG(("sprintf ereallocing buffer to %d bytes\n", *size));
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 5dedcc841..d54b3b5e9 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fsock.c,v 1.121.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: fsock.c,v 1.121.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "php_globals.h"
diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h
index 6ae55d19a..10531b68a 100644
--- a/ext/standard/fsock.h
+++ b/ext/standard/fsock.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fsock.h,v 1.50.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: fsock.h,v 1.50.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
/* Synced with php 3.0 revision 1.24 1999-06-18 [ssb] */
diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c
index a63708177..40b74d547 100644
--- a/ext/standard/ftok.c
+++ b/ext/standard/ftok.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ftok.c,v 1.16.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: ftok.c,v 1.16.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
index e408615b6..c2e3896dc 100644
--- a/ext/standard/ftp_fopen_wrapper.c
+++ b/ext/standard/ftp_fopen_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
| Sara Golemon <pollita@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.6 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.9 2008/01/08 19:10:16 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -300,19 +300,21 @@ connect_errexit:
/* {{{ php_fopen_do_pasv
*/
-static unsigned short php_fopen_do_pasv(php_stream *stream, char *ip, int ip_size, char **phoststart TSRMLS_DC)
+static unsigned short php_fopen_do_pasv(php_stream *stream, char *ip, size_t ip_size, char **phoststart TSRMLS_DC)
{
char tmp_line[512];
int result, i;
unsigned short portno;
char *tpath, *ttpath, *hoststart=NULL;
+#ifdef HAVE_IPV6
/* We try EPSV first, needed for IPv6 and works on some IPv4 servers */
php_stream_write_string(stream, "EPSV\r\n");
result = GET_FTP_RESULT(stream);
/* check if we got a 229 response */
if (result != 229) {
+#endif
/* EPSV failed, let's try PASV */
php_stream_write_string(stream, "PASV\r\n");
result = GET_FTP_RESULT(stream);
@@ -357,6 +359,8 @@ static unsigned short php_fopen_do_pasv(php_stream *stream, char *ip, int ip_siz
tpath++;
/* pull out the LSB of the port */
portno += (unsigned short) strtoul(tpath, &ttpath, 10);
+
+#ifdef HAVE_IPV6
} else {
/* parse epsv command (|||6446|) */
for (i = 0, tpath = tmp_line + 4; *tpath; tpath++) {
@@ -372,7 +376,8 @@ static unsigned short php_fopen_do_pasv(php_stream *stream, char *ip, int ip_siz
/* pull out the port */
portno = (unsigned short) strtoul(tpath + 1, &ttpath, 10);
}
-
+#endif
+
if (ttpath == NULL) {
/* didn't get correct response from EPSV/PASV */
return 0;
@@ -771,6 +776,7 @@ static int php_stream_ftp_url_stat(php_stream_wrapper *wrapper, char *url, int f
ssb->sb.st_mode |= S_IFDIR;
}
+ php_stream_write_string(stream, "TYPE I\r\n"); /* we need this since some servers refuse to accept SIZE command in ASCII mode */
php_stream_printf(stream TSRMLS_CC, "SIZE %s\r\n", (resource->path != NULL ? resource->path : "/"));
result = GET_FTP_RESULT(stream);
if (result < 200 || result > 299) {
diff --git a/ext/standard/head.c b/ext/standard/head.c
index 868015f9e..f0502ab21 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
-/* $Id: head.c,v 1.84.2.1.2.7 2007/02/26 02:12:36 iliaa Exp $ */
+/* $Id: head.c,v 1.84.2.1.2.8 2007/12/31 07:20:12 sebastian Exp $ */
#include <stdio.h>
#include "php.h"
diff --git a/ext/standard/head.h b/ext/standard/head.h
index 1afac8063..365ef3ea1 100644
--- a/ext/standard/head.h
+++ b/ext/standard/head.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: head.h,v 1.28.2.1.2.2 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: head.h,v 1.28.2.1.2.3 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef HEAD_H
#define HEAD_H
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 357257997..dd8afdc9c 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: html.c,v 1.111.2.2.2.15 2007/10/03 04:53:05 stas Exp $ */
+/* $Id: html.c,v 1.111.2.2.2.20 2008/04/11 19:01:25 felipe Exp $ */
/*
* HTML entity resources:
@@ -847,7 +847,7 @@ det_charset:
/* now walk the charset map and look for the codeset */
for (i = 0; charset_map[i].codeset; i++) {
- if (strncasecmp(charset_hint, charset_map[i].codeset, len) == 0) {
+ if (len == strlen(charset_map[i].codeset) && strncasecmp(charset_hint, charset_map[i].codeset, len) == 0) {
charset = charset_map[i].charset;
found = 1;
break;
@@ -954,6 +954,7 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new
case cs_cp1251:
case cs_8859_5:
case cs_cp866:
+ case cs_koi8r:
replacement[0] = k;
replacement[1] = '\0';
replacement_len = 1;
diff --git a/ext/standard/html.h b/ext/standard/html.h
index b7ef2823c..e5bdafc4d 100644
--- a/ext/standard/html.h
+++ b/ext/standard/html.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: html.h,v 1.20.2.1.2.3 2007/05/22 12:37:00 iliaa Exp $ */
+/* $Id: html.h,v 1.20.2.1.2.4 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef HTML_H
#define HTML_H
diff --git a/ext/standard/http.c b/ext/standard/http.c
index a82ca61fa..85ad35c83 100644
--- a/ext/standard/http.c
+++ b/ext/standard/http.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: http.c,v 1.14.2.4.2.4 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: http.c,v 1.14.2.4.2.6 2008/01/10 20:32:41 shire Exp $ */
#include "php_http.h"
#include "php_ini.h"
@@ -105,7 +105,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
*p = '\0';
} else {
/* Is an integer key */
- ekey_len = spprintf(&ekey, 12, "%ld", idx);
+ ekey_len = spprintf(&ekey, 0, "%ld", idx);
newprefix_len = key_prefix_len + num_prefix_len + ekey_len + key_suffix_len + 3 /* %5B */;
newprefix = emalloc(newprefix_len + 1);
p = newprefix;
@@ -153,7 +153,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
if (num_prefix) {
smart_str_appendl(formstr, num_prefix, num_prefix_len);
}
- ekey_len = spprintf(&ekey, 12, "%ld", idx);
+ ekey_len = spprintf(&ekey, 0, "%ld", idx);
smart_str_appendl(formstr, ekey, ekey_len);
efree(ekey);
}
@@ -165,10 +165,10 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
break;
case IS_LONG:
case IS_BOOL:
- ekey_len = spprintf(&ekey, 12, "%ld", Z_LVAL_PP(zdata));
+ ekey_len = spprintf(&ekey, 0, "%ld", Z_LVAL_PP(zdata));
break;
case IS_DOUBLE:
- ekey_len = spprintf(&ekey, 48, "%.*G", (int) EG(precision), Z_DVAL_PP(zdata));
+ ekey_len = spprintf(&ekey, 0, "%.*G", (int) EG(precision), Z_DVAL_PP(zdata));
break;
default:
/* fall back on convert to string */
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 0d964fd14..bdd811f8a 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
| Sara Golemon <pollita@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.10 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.12 2008/04/08 00:03:34 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -105,6 +105,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
char *protocol_version = NULL;
int protocol_version_len = 3; /* Default: "1.0" */
struct timeval timeout;
+ char *user_headers = NULL;
tmp_line[0] = '\0';
@@ -351,10 +352,8 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
efree(tmp);
tmp = tmp_c;
}
-
- /* Output trimmed headers with \r\n at the end */
- php_stream_write(stream, tmp, strlen(tmp));
- php_stream_write(stream, "\r\n", sizeof("\r\n") - 1);
+
+ user_headers = estrdup(tmp);
/* Make lowercase for easy comparison against 'standard' headers */
php_strtolower(tmp, strlen(tmp));
@@ -452,6 +451,27 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
}
}
+ if (user_headers) {
+ /* A bit weird, but some servers require that Content-Length be sent prior to Content-Type for POST
+ * see bug #44603 for details. Since Content-Type maybe part of user's headers we need to do this check first.
+ */
+ if (
+ header_init &&
+ context &&
+ !(have_header & HTTP_HEADER_CONTENT_LENGTH) &&
+ php_stream_context_get_option(context, "http", "content", &tmpzval) == SUCCESS &&
+ Z_TYPE_PP(tmpzval) == IS_STRING && Z_STRLEN_PP(tmpzval) > 0
+ ) {
+ scratch_len = slprintf(scratch, scratch_len, "Content-Length: %d\r\n", Z_STRLEN_PP(tmpzval));
+ php_stream_write(stream, scratch, scratch_len);
+ have_header |= HTTP_HEADER_CONTENT_LENGTH;
+ }
+
+ php_stream_write(stream, user_headers, strlen(user_headers));
+ php_stream_write(stream, "\r\n", sizeof("\r\n")-1);
+ efree(user_headers);
+ }
+
/* Request content, such as for POST requests */
if (header_init && context &&
php_stream_context_get_option(context, "http", "content", &tmpzval) == SUCCESS &&
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 0356da8dc..8dbd04299 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.114.2.2.2.6 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: image.c,v 1.114.2.2.2.7 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include <stdio.h>
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index 3f6d85bd1..d669f2ce6 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
*/
-/* $Id: incomplete_class.c,v 1.28.2.2.2.2 2007/02/01 14:07:43 tony2001 Exp $ */
+/* $Id: incomplete_class.c,v 1.28.2.2.2.3 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "basic_functions.h"
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 0c6741952..6cd9057a3 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: info.c,v 1.249.2.10.2.14 2007/07/21 01:24:26 jani Exp $ */
+/* $Id: info.c,v 1.249.2.10.2.17 2008/03/05 21:09:29 pajoye Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -277,7 +277,7 @@ PHPAPI char *php_get_uname(char mode)
php_uname = tmp_uname;
break;
case PROCESSOR_ARCHITECTURE_MIPS :
- php_uname = "MIPS R4000";
+ snprintf(tmp_uname, sizeof(tmp_uname), "MIPS R%d000", SysInfo.wProcessorLevel);
php_uname = tmp_uname;
break;
case PROCESSOR_ARCHITECTURE_ALPHA :
@@ -326,6 +326,30 @@ PHPAPI char *php_get_uname(char mode)
if (uname((struct utsname *)&buf) == -1) {
php_uname = PHP_UNAME;
} else {
+#ifdef NETWARE
+ if (mode == 's') {
+ php_uname = buf.sysname;
+ } else if (mode == 'r') {
+ snprintf(tmp_uname, sizeof(tmp_uname), "%d.%d.%d",
+ buf.netware_major, buf.netware_minor, buf.netware_revision);
+ php_uname = tmp_uname;
+ } else if (mode == 'n') {
+ php_uname = buf.servername;
+ } else if (mode == 'v') {
+ snprintf(tmp_uname, sizeof(tmp_uname), "libc-%d.%d.%d #%d",
+ buf.libmajor, buf.libminor, buf.librevision, buf.libthreshold);
+ php_uname = tmp_uname;
+ } else if (mode == 'm') {
+ php_uname = buf.machine;
+ } else { /* assume mode == 'a' */
+ snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d.%d libc-%d.%d.%d #%d %s",
+ buf.sysname, buf.servername,
+ buf.netware_major, buf.netware_minor, buf.netware_revision,
+ buf.libmajor, buf.libminor, buf.librevision, buf.libthreshold,
+ buf.machine);
+ php_uname = tmp_uname;
+ }
+#else
if (mode == 's') {
php_uname = buf.sysname;
} else if (mode == 'r') {
@@ -342,6 +366,7 @@ PHPAPI char *php_get_uname(char mode)
buf.machine);
php_uname = tmp_uname;
}
+#endif /* NETWARE */
}
#else
php_uname = PHP_UNAME;
diff --git a/ext/standard/info.h b/ext/standard/info.h
index e41257a18..931c842ef 100644
--- a/ext/standard/info.h
+++ b/ext/standard/info.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: info.h,v 1.38.2.1.2.5 2007/06/09 11:44:08 sniper Exp $ */
+/* $Id: info.h,v 1.38.2.1.2.6 2007/12/31 07:20:12 sebastian Exp $ */
#ifndef INFO_H
#define INFO_H
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index 8939779df..578534d41 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: iptc.c,v 1.50.2.2.2.5 2007/05/10 12:23:25 tony2001 Exp $ */
+/* $Id: iptc.c,v 1.50.2.2.2.6 2007/12/31 07:20:12 sebastian Exp $ */
/*
* Functions to parse & compse IPTC data.
diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c
index 958a2c364..c5bd5c866 100644
--- a/ext/standard/lcg.c
+++ b/ext/standard/lcg.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: lcg.c,v 1.41.2.1.2.2 2007/05/17 06:38:13 rasmus Exp $ */
+/* $Id: lcg.c,v 1.41.2.1.2.3 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "php_lcg.h"
diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c
index 1ed2edf84..c5c6caa08 100644
--- a/ext/standard/levenshtein.c
+++ b/ext/standard/levenshtein.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Hartmut Holzgraefe <hholzgra@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: levenshtein.c,v 1.34.2.1.2.3 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: levenshtein.c,v 1.34.2.1.2.4 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include <stdlib.h>
diff --git a/ext/standard/link.c b/ext/standard/link.c
index c352e59fb..24afc561d 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: link.c,v 1.52.2.1.2.3 2007/07/10 13:21:11 dmitry Exp $ */
+/* $Id: link.c,v 1.52.2.1.2.4 2007/12/31 07:20:12 sebastian Exp $ */
#include "php.h"
#include "php_filestat.h"
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index fe348786b..3f9763ba0 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mail.c,v 1.87.2.1.2.8 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: mail.c,v 1.87.2.1.2.9 2007/12/31 07:20:12 sebastian Exp $ */
#include <stdlib.h>
#include <ctype.h>
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 0d16ad2ff..8f293ae71 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: math.c,v 1.131.2.2.2.6 2007/05/23 15:01:00 iliaa Exp $ */
+/* $Id: math.c,v 1.131.2.2.2.9 2008/02/21 11:53:51 tony2001 Exp $ */
#include "php.h"
#include "php_math.h"
@@ -471,14 +471,13 @@ PHP_FUNCTION(pow)
Returns e raised to the power of the number */
PHP_FUNCTION(exp)
{
- zval **num;
+ double num;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &num) == FAILURE) {
+ return;
}
- convert_to_double_ex(num);
- Z_DVAL_P(return_value) = exp(Z_DVAL_PP(num));
- Z_TYPE_P(return_value) = IS_DOUBLE;
+
+ RETURN_DOUBLE(exp(num));
}
/* }}} */
diff --git a/ext/standard/md5.c b/ext/standard/md5.c
index 7bc85bcf0..16c295b4b 100644
--- a/ext/standard/md5.c
+++ b/ext/standard/md5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: md5.c,v 1.39.2.1.2.4 2007/05/27 15:29:38 nlopess Exp $ */
+/* $Id: md5.c,v 1.39.2.1.2.5 2007/12/31 07:20:13 sebastian Exp $ */
/*
* md5.c - Copyright 1997 Lachlan Roche
diff --git a/ext/standard/md5.h b/ext/standard/md5.h
index 548b8743b..b9285c1ba 100644
--- a/ext/standard/md5.h
+++ b/ext/standard/md5.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: md5.h,v 1.17.2.1.2.2 2007/05/19 20:30:35 iliaa Exp $ */
+/* $Id: md5.h,v 1.17.2.1.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef MD5_H
#define MD5_H
diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c
index f780818a9..3c8cb93aa 100644
--- a/ext/standard/metaphone.c
+++ b/ext/standard/metaphone.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: metaphone.c,v 1.28.2.1.2.4 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: metaphone.c,v 1.28.2.1.2.7 2008/02/27 01:10:56 felipe Exp $ */
/*
Based on CPANs "Text-Metaphone-1.96" by Michael G Schwern <schwern@pobox.com>
@@ -144,13 +144,18 @@ static char Lookahead(char *word, int how_far)
* could be one though; or more too). */
#define Phonize(c) { \
if (p_idx >= max_buffer_len) { \
- *phoned_word = erealloc(*phoned_word, max_buffer_len + 2); \
+ *phoned_word = safe_erealloc(*phoned_word, 2, sizeof(char), max_buffer_len); \
max_buffer_len += 2; \
} \
(*phoned_word)[p_idx++] = c; \
}
/* Slap a null character on the end of the phoned word */
-#define End_Phoned_Word {(*phoned_word)[p_idx] = '\0';}
+#define End_Phoned_Word { \
+ if (p_idx == max_buffer_len) { \
+ *phoned_word = safe_erealloc(*phoned_word, 1, sizeof(char), max_buffer_len); \
+ } \
+ (*phoned_word)[p_idx] = '\0'; \
+ }
/* How long is the phoned word? */
#define Phone_Len (p_idx)
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index 552b1503b..6b26c641d 100644
--- a/ext/standard/microtime.c
+++ b/ext/standard/microtime.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: microtime.c,v 1.53.2.2.2.3 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: microtime.c,v 1.53.2.2.2.4 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
diff --git a/ext/standard/microtime.h b/ext/standard/microtime.h
index 9cf5806e7..ca564c55c 100644
--- a/ext/standard/microtime.h
+++ b/ext/standard/microtime.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: microtime.h,v 1.14.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: microtime.h,v 1.14.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef MICROTIME_H
#define MICROTIME_H
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 097b70788..7233cb3b3 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Chris Schneider <cschneid@relog.ch> |
+----------------------------------------------------------------------+
*/
-/* $Id: pack.c,v 1.57.2.5.2.6 2007/09/22 15:25:46 iliaa Exp $ */
+/* $Id: pack.c,v 1.57.2.5.2.7 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
diff --git a/ext/standard/pack.h b/ext/standard/pack.h
index d28f0431e..88680fada 100644
--- a/ext/standard/pack.h
+++ b/ext/standard/pack.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pack.h,v 1.16.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: pack.h,v 1.16.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PACK_H
#define PACK_H
diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c
index ea23c5082..1dd1c6123 100644
--- a/ext/standard/pageinfo.c
+++ b/ext/standard/pageinfo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pageinfo.c,v 1.40.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: pageinfo.c,v 1.40.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
#include "pageinfo.h"
diff --git a/ext/standard/pageinfo.h b/ext/standard/pageinfo.h
index 926e88617..e3e59f96c 100644
--- a/ext/standard/pageinfo.h
+++ b/ext/standard/pageinfo.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pageinfo.h,v 1.14.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: pageinfo.h,v 1.14.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PAGEINFO_H
#define PAGEINFO_H
diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h
index 02190b8df..d77edf899 100644
--- a/ext/standard/php_array.h
+++ b/ext/standard/php_array.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_array.h,v 1.50.2.2.2.3 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_array.h,v 1.50.2.2.2.4 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_ARRAY_H
#define PHP_ARRAY_H
diff --git a/ext/standard/php_assert.h b/ext/standard/php_assert.h
index abc02f962..b3c61c1bf 100644
--- a/ext/standard/php_assert.h
+++ b/ext/standard/php_assert.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_assert.h,v 1.15.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_assert.h,v 1.15.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_ASSERT_H
#define PHP_ASSERT_H
diff --git a/ext/standard/php_browscap.h b/ext/standard/php_browscap.h
index 074786bd2..a5a79c7a8 100644
--- a/ext/standard/php_browscap.h
+++ b/ext/standard/php_browscap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_browscap.h,v 1.13.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_browscap.h,v 1.13.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_BROWSCAP_H
#define PHP_BROWSCAP_H
diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h
index f212c4590..1a631057c 100644
--- a/ext/standard/php_crypt.h
+++ b/ext/standard/php_crypt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_crypt.h,v 1.18.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_crypt.h,v 1.18.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_CRYPT_H
#define PHP_CRYPT_H
diff --git a/ext/standard/php_dir.h b/ext/standard/php_dir.h
index d21331f32..14fb5d69f 100644
--- a/ext/standard/php_dir.h
+++ b/ext/standard/php_dir.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_dir.h,v 1.24.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_dir.h,v 1.24.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_DIR_H
#define PHP_DIR_H
diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h
index bf83de826..e5ff1e918 100644
--- a/ext/standard/php_ext_syslog.h
+++ b/ext/standard/php_ext_syslog.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ext_syslog.h,v 1.12.2.2.2.2 2007/05/17 06:38:13 rasmus Exp $ */
+/* $Id: php_ext_syslog.h,v 1.12.2.2.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_EXT_SYSLOG_H
#define PHP_EXT_SYSLOG_H
diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h
index d30cf37de..bd66459ba 100644
--- a/ext/standard/php_filestat.h
+++ b/ext/standard/php_filestat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_filestat.h,v 1.24.2.4.2.2 2007/10/31 13:23:06 jani Exp $ */
+/* $Id: php_filestat.h,v 1.24.2.4.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_FILESTAT_H
#define PHP_FILESTAT_H
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index 6afbc4531..64e05e0c3 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Hartmut Holzgraefe <hholzgra@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_fopen_wrapper.c,v 1.45.2.4.2.8 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: php_fopen_wrapper.c,v 1.45.2.4.2.9 2007/12/31 07:20:13 sebastian Exp $ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/ext/standard/php_fopen_wrappers.h b/ext/standard/php_fopen_wrappers.h
index c63022b01..b32ae7272 100644
--- a/ext/standard/php_fopen_wrappers.h
+++ b/ext/standard/php_fopen_wrappers.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_fopen_wrappers.h,v 1.21.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_fopen_wrappers.h,v 1.21.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_FOPEN_WRAPPERS_H
#define PHP_FOPEN_WRAPPERS_H
diff --git a/ext/standard/php_ftok.h b/ext/standard/php_ftok.h
index 444761029..c3b4b9825 100644
--- a/ext/standard/php_ftok.h
+++ b/ext/standard/php_ftok.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ftok.h,v 1.9.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_ftok.h,v 1.9.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_FTOK_H
#define PHP_FTOK_H
diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h
index 806beaaa8..9097a67de 100644
--- a/ext/standard/php_http.h
+++ b/ext/standard/php_http.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.h,v 1.5.2.2.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_http.h,v 1.5.2.2.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_HTTP_H
#define PHP_HTTP_H
diff --git a/ext/standard/php_image.h b/ext/standard/php_image.h
index 37812fbff..33f8495e9 100644
--- a/ext/standard/php_image.h
+++ b/ext/standard/php_image.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_image.h,v 1.29.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_image.h,v 1.29.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_IMAGE_H
#define PHP_IMAGE_H
diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h
index b194ede8d..8d3061af3 100644
--- a/ext/standard/php_incomplete_class.h
+++ b/ext/standard/php_incomplete_class.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_incomplete_class.h,v 1.17.2.2.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_incomplete_class.h,v 1.17.2.2.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_INCOMPLETE_CLASS_H
#define PHP_INCOMPLETE_CLASS_H
diff --git a/ext/standard/php_iptc.h b/ext/standard/php_iptc.h
index c85b84ab2..18d77e3f8 100644
--- a/ext/standard/php_iptc.h
+++ b/ext/standard/php_iptc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_iptc.h,v 1.11.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_iptc.h,v 1.11.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_IPTC_H
#define PHP_IPTC_H
diff --git a/ext/standard/php_lcg.h b/ext/standard/php_lcg.h
index 9e04442e5..93aa78e64 100644
--- a/ext/standard/php_lcg.h
+++ b/ext/standard/php_lcg.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_lcg.h,v 1.21.2.1.2.2 2007/05/18 11:36:55 rasmus Exp $ */
+/* $Id: php_lcg.h,v 1.21.2.1.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_LCG_H
#define PHP_LCG_H
diff --git a/ext/standard/php_link.h b/ext/standard/php_link.h
index 0cde3a678..353f5dc27 100644
--- a/ext/standard/php_link.h
+++ b/ext/standard/php_link.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_link.h,v 1.12.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_link.h,v 1.12.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_LINK_H
#define PHP_LINK_H
diff --git a/ext/standard/php_mail.h b/ext/standard/php_mail.h
index f159bc916..7b249a015 100644
--- a/ext/standard/php_mail.h
+++ b/ext/standard/php_mail.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mail.h,v 1.18.2.1.2.2 2007/07/11 17:36:56 johannes Exp $ */
+/* $Id: php_mail.h,v 1.18.2.1.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_MAIL_H
#define PHP_MAIL_H
diff --git a/ext/standard/php_math.h b/ext/standard/php_math.h
index e7766a57a..84b750a0e 100644
--- a/ext/standard/php_math.h
+++ b/ext/standard/php_math.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_math.h,v 1.28.2.2.2.3 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_math.h,v 1.28.2.2.2.4 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_MATH_H
#define PHP_MATH_H
diff --git a/ext/standard/php_metaphone.h b/ext/standard/php_metaphone.h
index b886a357f..3706392bc 100644
--- a/ext/standard/php_metaphone.h
+++ b/ext/standard/php_metaphone.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_metaphone.h,v 1.16.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_metaphone.h,v 1.16.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_METAPHONE_H
#define PHP_METAPHONE_H
diff --git a/ext/standard/php_rand.h b/ext/standard/php_rand.h
index b6bb2c348..7a12d2466 100644
--- a/ext/standard/php_rand.h
+++ b/ext/standard/php_rand.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
| Based on code from: Shawn Cokus <Cokus@math.washington.edu> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_rand.h,v 1.28.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_rand.h,v 1.28.2.1.2.4 2008/03/07 08:56:45 tony2001 Exp $ */
#ifndef PHP_RAND_H
#define PHP_RAND_H
@@ -47,9 +47,9 @@
#define PHP_MT_RAND_MAX ((long) (0x7FFFFFFF)) /* (1<<31) - 1 */
#ifdef PHP_WIN32
-#define GENERATE_SEED() ((long) (time(0) * GetCurrentProcessId() * 1000000 * php_combined_lcg(TSRMLS_C)))
+#define GENERATE_SEED() (((long) (time(0) * GetCurrentProcessId())) ^ ((long) (1000000.0 * php_combined_lcg(TSRMLS_C))))
#else
-#define GENERATE_SEED() ((long) (time(0) * getpid() * 1000000 * php_combined_lcg(TSRMLS_C)))
+#define GENERATE_SEED() (((long) (time(0) * getpid())) ^ ((long) (1000000.0 * php_combined_lcg(TSRMLS_C))))
#endif
PHPAPI void php_srand(long seed TSRMLS_DC);
diff --git a/ext/standard/php_smart_str.h b/ext/standard/php_smart_str.h
index 4e8eb52fc..fd6dfb6dc 100644
--- a/ext/standard/php_smart_str.h
+++ b/ext/standard/php_smart_str.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_smart_str.h,v 1.30.2.3.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_smart_str.h,v 1.30.2.3.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_SMART_STR_H
#define PHP_SMART_STR_H
diff --git a/ext/standard/php_smart_str_public.h b/ext/standard/php_smart_str_public.h
index d71d30618..2d119e790 100644
--- a/ext/standard/php_smart_str_public.h
+++ b/ext/standard/php_smart_str_public.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_smart_str_public.h,v 1.10.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_smart_str_public.h,v 1.10.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_SMART_STR_PUBLIC_H
#define PHP_SMART_STR_PUBLIC_H
diff --git a/ext/standard/php_standard.h b/ext/standard/php_standard.h
index e210bf6fb..dd41fc25a 100644
--- a/ext/standard/php_standard.h
+++ b/ext/standard/php_standard.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_standard.h,v 1.24.2.2.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_standard.h,v 1.24.2.2.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#include "basic_functions.h"
#include "php_math.h"
diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h
index b4936d84e..c2b038fdd 100644
--- a/ext/standard/php_string.h
+++ b/ext/standard/php_string.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_string.h,v 1.87.2.2.2.3 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_string.h,v 1.87.2.2.2.4 2007/12/31 07:20:13 sebastian Exp $ */
/* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
diff --git a/ext/standard/php_type.h b/ext/standard/php_type.h
index fee24bdf7..bd170239e 100644
--- a/ext/standard/php_type.h
+++ b/ext/standard/php_type.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_type.h,v 1.6.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_type.h,v 1.6.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_TYPE_H
#define PHP_TYPE_H
diff --git a/ext/standard/php_uuencode.h b/ext/standard/php_uuencode.h
index 908d64e6e..0bab2fc6c 100644
--- a/ext/standard/php_uuencode.h
+++ b/ext/standard/php_uuencode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_uuencode.h,v 1.4.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_uuencode.h,v 1.4.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_UUENCODE_H
#define PHP_UUENCODE_H
diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h
index 0c9693049..19527286b 100644
--- a/ext/standard/php_var.h
+++ b/ext/standard/php_var.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_var.h,v 1.30.2.1.2.6 2007/05/22 14:34:22 tony2001 Exp $ */
+/* $Id: php_var.h,v 1.30.2.1.2.7 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_VAR_H
#define PHP_VAR_H
diff --git a/ext/standard/php_versioning.h b/ext/standard/php_versioning.h
index a23aa7506..2f502e305 100644
--- a/ext/standard/php_versioning.h
+++ b/ext/standard/php_versioning.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_versioning.h,v 1.10.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_versioning.h,v 1.10.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_VERSIONING_H
#define PHP_VERSIONING_H
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index 2ef4b6790..69fca4d71 100644
--- a/ext/standard/proc_open.c
+++ b/ext/standard/proc_open.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: proc_open.c,v 1.36.2.1.2.17 2007/09/12 11:42:43 nlopess Exp $ */
+/* $Id: proc_open.c,v 1.36.2.1.2.19 2008/04/08 08:45:51 jani Exp $ */
#if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
# define _BSD_SOURCE /* linux wants this when XOPEN mode is on */
@@ -624,7 +624,7 @@ PHP_FUNCTION(proc_open)
goto exit_fail;
}
- if (strcmp(Z_STRVAL_PP(zmode), "w") != 0) {
+ if (strncmp(Z_STRVAL_PP(zmode), "w", 1) != 0) {
descriptors[ndesc].parentend = newpipe[1];
descriptors[ndesc].childend = newpipe[0];
descriptors[ndesc].mode |= DESC_PARENT_MODE_WRITE;
diff --git a/ext/standard/proc_open.h b/ext/standard/proc_open.h
index 520a83e92..10625f5b1 100644
--- a/ext/standard/proc_open.h
+++ b/ext/standard/proc_open.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: proc_open.h,v 1.5.2.1.2.2 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: proc_open.h,v 1.5.2.1.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#ifdef PHP_WIN32
typedef HANDLE php_file_descriptor_t;
diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c
index a8ba0f8c2..b57d826a6 100644
--- a/ext/standard/quot_print.c
+++ b/ext/standard/quot_print.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: quot_print.c,v 1.29.2.2.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: quot_print.c,v 1.29.2.2.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#include <stdlib.h>
diff --git a/ext/standard/quot_print.h b/ext/standard/quot_print.h
index 9ffc9286b..37a10ff2e 100644
--- a/ext/standard/quot_print.h
+++ b/ext/standard/quot_print.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: quot_print.h,v 1.13.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: quot_print.h,v 1.13.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef QUOT_PRINT_H
#define QUOT_PRINT_H
diff --git a/ext/standard/rand.c b/ext/standard/rand.c
index d9161a15f..eee131b78 100644
--- a/ext/standard/rand.c
+++ b/ext/standard/rand.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,7 +23,7 @@
| Shawn Cokus <Cokus@math.washington.edu> |
+----------------------------------------------------------------------+
*/
-/* $Id: rand.c,v 1.70.2.1.2.2 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: rand.c,v 1.70.2.1.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#include <stdlib.h>
diff --git a/ext/standard/reg.c b/ext/standard/reg.c
index beacf285f..3c3a02c54 100644
--- a/ext/standard/reg.c
+++ b/ext/standard/reg.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| Jaakko Hyvätti <jaakko@hyvatti.iki.fi> |
+----------------------------------------------------------------------+
*/
-/* $Id: reg.c,v 1.82.2.3.2.2 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: reg.c,v 1.82.2.3.2.5 2008/04/20 01:43:18 felipe Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -564,7 +564,9 @@ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase)
} else if (subs[0].rm_so == 0 && subs[0].rm_eo == 0) {
/* No more matches */
regfree(&re);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Regular Expression to split()");
+
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Regular Expression");
+
zend_hash_destroy(Z_ARRVAL_P(return_value));
efree(Z_ARRVAL_P(return_value));
RETURN_FALSE;
diff --git a/ext/standard/reg.h b/ext/standard/reg.h
index 2d3b7e8ea..6557916cf 100644
--- a/ext/standard/reg.h
+++ b/ext/standard/reg.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
*/
-/* $Id: reg.h,v 1.21.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: reg.h,v 1.21.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef REG_H
#define REG_H
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index 26e5e1783..d5c591d1f 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: scanf.c,v 1.31.2.2.2.5 2007/07/26 15:24:06 jani Exp $ */
+/* $Id: scanf.c,v 1.31.2.2.2.6 2007/12/31 07:20:13 sebastian Exp $ */
/*
scanf.c --
diff --git a/ext/standard/scanf.h b/ext/standard/scanf.h
index 391c9d504..25ef8c45c 100644
--- a/ext/standard/scanf.h
+++ b/ext/standard/scanf.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: scanf.h,v 1.14.2.2.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: scanf.h,v 1.14.2.2.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef SCANF_H
#define SCANF_H
diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c
index 9db3afe76..1fae65324 100644
--- a/ext/standard/sha1.c
+++ b/ext/standard/sha1.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sha1.c,v 1.13.2.1.2.3 2007/05/27 14:50:09 sniper Exp $ */
+/* $Id: sha1.c,v 1.13.2.1.2.4 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
diff --git a/ext/standard/sha1.h b/ext/standard/sha1.h
index fc9049000..a29f96190 100644
--- a/ext/standard/sha1.h
+++ b/ext/standard/sha1.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sha1.h,v 1.5.2.1.2.2 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: sha1.h,v 1.5.2.1.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef SHA1_H
#define SHA1_H
diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c
index 31f803dff..20ee0b73a 100644
--- a/ext/standard/soundex.c
+++ b/ext/standard/soundex.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Bjørn Borud - Guardian Networks AS <borud@guardian.no> |
+----------------------------------------------------------------------+
*/
-/* $Id: soundex.c,v 1.25.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: soundex.c,v 1.25.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
#include <stdlib.h>
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index 7963e529a..c8542fba8 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streamsfuncs.c,v 1.58.2.6.2.16 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: streamsfuncs.c,v 1.58.2.6.2.19 2008/02/03 16:15:30 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -1325,6 +1325,9 @@ PHP_FUNCTION(stream_socket_enable_crypto)
if (php_stream_xport_crypto_setup(stream, cryptokind, sessstream TSRMLS_CC) < 0) {
RETURN_FALSE;
}
+ } else if (enable) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "When enabling encryption you must specify the crypto type");
+ RETURN_FALSE;
}
ret = php_stream_xport_crypto_enable(stream, enable TSRMLS_CC);
@@ -1361,7 +1364,7 @@ PHP_FUNCTION(stream_is_local)
wrapper = stream->wrapper;
} else {
convert_to_string_ex(&zstream);
- wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC);
+ wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), NULL, 0 TSRMLS_CC);
}
if(!wrapper) {
diff --git a/ext/standard/streamsfuncs.h b/ext/standard/streamsfuncs.h
index f2ad960f4..b966ed57d 100644
--- a/ext/standard/streamsfuncs.h
+++ b/ext/standard/streamsfuncs.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streamsfuncs.h,v 1.13.2.1.2.4 2007/07/09 17:27:24 dmitry Exp $ */
+/* $Id: streamsfuncs.h,v 1.13.2.1.2.5 2007/12/31 07:20:13 sebastian Exp $ */
/* Flags for stream_socket_client */
#define PHP_STREAM_CLIENT_PERSISTENT 1
diff --git a/ext/standard/string.c b/ext/standard/string.c
index c1e898ea2..8125c18e2 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.445.2.14.2.70 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.73 2008/01/16 08:35:59 tony2001 Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -452,15 +452,182 @@ PHP_MINIT_FUNCTION(nl_langinfo)
Query language and locale information */
PHP_FUNCTION(nl_langinfo)
{
- zval **item;
+ long item;
char *value;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &item) == FAILURE) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &item) == FAILURE) {
+ return;
+ }
+
+ switch(item) { /* {{{ */
+#ifdef ABDAY_1
+ case ABDAY_1:
+ case ABDAY_2:
+ case ABDAY_3:
+ case ABDAY_4:
+ case ABDAY_5:
+ case ABDAY_6:
+ case ABDAY_7:
+#endif
+#ifdef DAY_1
+ case DAY_1:
+ case DAY_2:
+ case DAY_3:
+ case DAY_4:
+ case DAY_5:
+ case DAY_6:
+ case DAY_7:
+#endif
+#ifdef ABMON_1
+ case ABMON_1:
+ case ABMON_2:
+ case ABMON_3:
+ case ABMON_4:
+ case ABMON_5:
+ case ABMON_6:
+ case ABMON_7:
+ case ABMON_8:
+ case ABMON_9:
+ case ABMON_10:
+ case ABMON_11:
+ case ABMON_12:
+#endif
+#ifdef MON_1
+ case MON_1:
+ case MON_2:
+ case MON_3:
+ case MON_4:
+ case MON_5:
+ case MON_6:
+ case MON_7:
+ case MON_8:
+ case MON_9:
+ case MON_10:
+ case MON_11:
+ case MON_12:
+#endif
+#ifdef AM_STR
+ case AM_STR:
+#endif
+#ifdef PM_STR
+ case PM_STR:
+#endif
+#ifdef D_T_FMT
+ case D_T_FMT:
+#endif
+#ifdef D_FMT
+ case D_FMT:
+#endif
+#ifdef T_FMT
+ case T_FMT:
+#endif
+#ifdef T_FMT_AMPM
+ case T_FMT_AMPM:
+#endif
+#ifdef ERA
+ case ERA:
+#endif
+#ifdef ERA_YEAR
+ case ERA_YEAR:
+#endif
+#ifdef ERA_D_T_FMT
+ case ERA_D_T_FMT:
+#endif
+#ifdef ERA_D_FMT
+ case ERA_D_FMT:
+#endif
+#ifdef ERA_T_FMT
+ case ERA_T_FMT:
+#endif
+#ifdef ALT_DIGITS
+ case ALT_DIGITS:
+#endif
+#ifdef INT_CURR_SYMBOL
+ case INT_CURR_SYMBOL:
+#endif
+#ifdef CURRENCY_SYMBOL
+ case CURRENCY_SYMBOL:
+#endif
+#ifdef CRNCYSTR
+ case CRNCYSTR:
+#endif
+#ifdef MON_DECIMAL_POINT
+ case MON_DECIMAL_POINT:
+#endif
+#ifdef MON_THOUSANDS_SEP
+ case MON_THOUSANDS_SEP:
+#endif
+#ifdef MON_GROUPING
+ case MON_GROUPING:
+#endif
+#ifdef POSITIVE_SIGN
+ case POSITIVE_SIGN:
+#endif
+#ifdef NEGATIVE_SIGN
+ case NEGATIVE_SIGN:
+#endif
+#ifdef INT_FRAC_DIGITS
+ case INT_FRAC_DIGITS:
+#endif
+#ifdef FRAC_DIGITS
+ case FRAC_DIGITS:
+#endif
+#ifdef P_CS_PRECEDES
+ case P_CS_PRECEDES:
+#endif
+#ifdef P_SEP_BY_SPACE
+ case P_SEP_BY_SPACE:
+#endif
+#ifdef N_CS_PRECEDES
+ case N_CS_PRECEDES:
+#endif
+#ifdef N_SEP_BY_SPACE
+ case N_SEP_BY_SPACE:
+#endif
+#ifdef P_SIGN_POSN
+ case P_SIGN_POSN:
+#endif
+#ifdef N_SIGN_POSN
+ case N_SIGN_POSN:
+#endif
+#ifdef DECIMAL_POINT
+ case DECIMAL_POINT:
+#endif
+#ifdef RADIXCHAR
+ case RADIXCHAR:
+#endif
+#ifdef THOUSANDS_SEP
+ case THOUSANDS_SEP:
+#endif
+#ifdef THOUSEP
+ case THOUSEP:
+#endif
+#ifdef GROUPING
+ case GROUPING:
+#endif
+#ifdef YESEXPR
+ case YESEXPR:
+#endif
+#ifdef NOEXPR
+ case NOEXPR:
+#endif
+#ifdef YESSTR
+ case YESSTR:
+#endif
+#ifdef NOSTR
+ case NOSTR:
+#endif
+#ifdef CODESET
+ case CODESET:
+#endif
+ break;
+ default:
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Item '%ld' is not valid", item);
+ RETURN_FALSE;
}
- convert_to_long_ex(item);
+ /* }}} */
- value = nl_langinfo(Z_LVAL_PP(item));
+ value = nl_langinfo(item);
if (value == NULL) {
RETURN_FALSE;
} else {
@@ -4966,7 +5133,7 @@ PHP_FUNCTION(str_word_count)
while (p < e) {
s = p;
- while (p < e && (isalpha(*p) || (char_list && ch[(unsigned char)*p]) || *p == '\'' || *p == '-')) {
+ while (p < e && (isalpha((unsigned char)*p) || (char_list && ch[(unsigned char)*p]) || *p == '\'' || *p == '-')) {
p++;
}
if (p > s) {
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c
index a3a2391a6..985bb8411 100644
--- a/ext/standard/syslog.c
+++ b/ext/standard/syslog.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: syslog.c,v 1.49.2.3.2.2 2007/05/17 06:38:13 rasmus Exp $ */
+/* $Id: syslog.c,v 1.49.2.3.2.4 2008/02/20 15:28:37 iliaa Exp $ */
#include "php.h"
@@ -110,6 +110,7 @@ PHP_RINIT_FUNCTION(syslog)
} else {
BG(syslog_started)=0;
}
+ BG(syslog_device) = NULL;
return SUCCESS;
}
@@ -126,6 +127,7 @@ PHP_MSHUTDOWN_FUNCTION(syslog)
{
if (BG(syslog_device)) {
free(BG(syslog_device));
+ BG(syslog_device) = NULL;
}
return SUCCESS;
}
diff --git a/ext/standard/tests/array/array_change_key_case_variation1.phpt b/ext/standard/tests/array/array_change_key_case_variation1.phpt
new file mode 100644
index 000000000..e70774e01
--- /dev/null
+++ b/ext/standard/tests/array/array_change_key_case_variation1.phpt
@@ -0,0 +1,224 @@
+--TEST--
+Test array_change_key_case() function : usage variations - Pass different data types as $input arg
+--FILE--
+<?php
+/* Prototype : array array_change_key_case(array $input [, int $case])
+ * Description: Retuns an array with all string keys lowercased [or uppercased]
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $input argument to test behaviour of array_change_key_case()
+ */
+
+echo "*** Testing array_change_key_case() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_change_key_case()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_change_key_case($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_change_key_case() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+array(0) {
+}
+
+-- Iteration 19 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 25 --
+
+Warning: array_change_key_case(): The argument should be an array in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/array_change_key_case_variation2.phpt b/ext/standard/tests/array/array_change_key_case_variation2.phpt
new file mode 100644
index 000000000..cce432e8d
--- /dev/null
+++ b/ext/standard/tests/array/array_change_key_case_variation2.phpt
@@ -0,0 +1,318 @@
+--TEST--
+Test array_change_key_case() function : usage variations - Pass different data types as $case arg
+--FILE--
+<?php
+/* Prototype : array array_change_key_case(array $input [, int $case])
+ * Description: Retuns an array with all string keys lowercased [or uppercased]
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $case argument to array_change_key_case() to test behaviour
+ * Where possible, CASE_UPPER has been entered as a string value
+ */
+
+echo "*** Testing array_change_key_case() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$array = array ('one' => 1, 'TWO' => 2, 'Three' => 3);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+CASE_UPPER
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $case argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "CASE_UPPER",
+ 'CASE_UPPER',
+ $heredoc,
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+);
+
+// loop through each element of $inputs to check the behavior of array_change_key_case()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_change_key_case($array, $input) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_change_key_case() : usage variations ***
+
+-- Iteration 1 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 2 --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+
+-- Iteration 3 --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+
+-- Iteration 4 --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+
+-- Iteration 5 --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+
+-- Iteration 6 --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+
+-- Iteration 7 --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+
+-- Iteration 8 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 9 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 10 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 11 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 12 --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+
+-- Iteration 13 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 14 --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+
+-- Iteration 15 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 16 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 17 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 18 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 19 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 20 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 21 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 22 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 23 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_change_key_case_variation3.phpt b/ext/standard/tests/array/array_change_key_case_variation3.phpt
new file mode 100644
index 000000000..596703385
--- /dev/null
+++ b/ext/standard/tests/array/array_change_key_case_variation3.phpt
@@ -0,0 +1,197 @@
+--TEST--
+Test array_change_key_case() function : usage variations - different data types as keys
+--FILE--
+<?php
+/* Prototype : array array_change_key_case(array $input [, int $case])
+ * Description: Retuns an array with all string keys lowercased [or uppercased]
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays with different data types as keys to array_change_key_case()
+ * to test conversion
+ */
+
+echo "*** Testing array_change_key_case() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// arrays of different data types to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+ 'extreme floats' => array(
+ 12.3456789000e6 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*3*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*4*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*5*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*6*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*8*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*9*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each sub-array of $inputs to check the behavior of array_change_key_case()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator : $key data --\n";
+ var_dump( array_change_key_case($input, CASE_UPPER) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_change_key_case() : usage variations ***
+
+-- Iteration 1 : int data --
+array(4) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [12345]=>
+ string(8) "positive"
+ [-2345]=>
+ string(8) "negative"
+}
+
+-- Iteration 2 : float data --
+array(3) {
+ [10]=>
+ string(8) "positive"
+ [-10]=>
+ string(8) "negative"
+ [0]=>
+ string(4) "half"
+}
+
+-- Iteration 3 : extreme floats data --
+array(2) {
+ [12345678]=>
+ string(5) "large"
+ [0]=>
+ string(5) "small"
+}
+
+-- Iteration 4 : null uppercase data --
+array(1) {
+ [""]=>
+ string(6) "null 1"
+}
+
+-- Iteration 5 : null lowercase data --
+array(1) {
+ [""]=>
+ string(6) "null 2"
+}
+
+-- Iteration 6 : bool lowercase data --
+array(2) {
+ [1]=>
+ string(6) "lowert"
+ [0]=>
+ string(6) "lowerf"
+}
+
+-- Iteration 7 : bool uppercase data --
+array(2) {
+ [1]=>
+ string(6) "uppert"
+ [0]=>
+ string(6) "upperf"
+}
+
+-- Iteration 8 : empty double quotes data --
+array(1) {
+ [""]=>
+ string(6) "emptyd"
+}
+
+-- Iteration 9 : empty single quotes data --
+array(1) {
+ [""]=>
+ string(6) "emptys"
+}
+
+-- Iteration 10 : string data --
+array(3) {
+ ["STRINGD"]=>
+ string(7) "stringd"
+ ["STRINGS"]=>
+ string(7) "strings"
+ ["HELLO WORLD"]=>
+ string(7) "stringh"
+}
+
+-- Iteration 11 : undefined data --
+array(1) {
+ [""]=>
+ string(9) "undefined"
+}
+
+-- Iteration 12 : unset data --
+array(1) {
+ [""]=>
+ string(5) "unset"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_change_key_case_variation4.phpt b/ext/standard/tests/array/array_change_key_case_variation4.phpt
new file mode 100644
index 000000000..ad9ad75a3
--- /dev/null
+++ b/ext/standard/tests/array/array_change_key_case_variation4.phpt
@@ -0,0 +1,138 @@
+--TEST--
+Test array_change_key_case() function : usage variations - different int values for $case
+--FILE--
+<?php
+/* Prototype : array array_change_key_case(array $input [, int $case])
+ * Description: Retuns an array with all string keys lowercased [or uppercased]
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different integer values as $case argument to array_change_key_case() to test behaviour
+ */
+
+echo "*** Testing array_change_key_case() : usage variations ***\n";
+
+$input = array('One' => 'un', 'TWO' => 'deux', 'three' => 'trois');
+for ($i = -5; $i <=5; $i += 1){
+ echo "\n-- \$sort argument is $i --\n";
+ $temp = $input;
+ var_dump(array_change_key_case($temp, $i));
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_change_key_case() : usage variations ***
+
+-- $sort argument is -5 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is -4 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is -3 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is -2 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is -1 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is 0 --
+array(3) {
+ ["one"]=>
+ string(2) "un"
+ ["two"]=>
+ string(4) "deux"
+ ["three"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is 1 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is 2 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is 3 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is 4 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+
+-- $sort argument is 5 --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_change_key_case_variation5.phpt b/ext/standard/tests/array/array_change_key_case_variation5.phpt
new file mode 100644
index 000000000..aa3852a41
--- /dev/null
+++ b/ext/standard/tests/array/array_change_key_case_variation5.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test array_change_key_case() function : usage variations - position of internal pointer
+--FILE--
+<?php
+/* Prototype : array array_change_key_case(array $input [, int $case])
+ * Description: Retuns an array with all string keys lowercased [or uppercased]
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Check the position of the internal array pointer after calling the function
+ */
+
+echo "*** Testing array_change_key_case() : usage variations ***\n";
+
+$input = array ('one' => 'un', 'two' => 'deux', 'three' => 'trois');
+
+echo "\n-- Call array_change_key_case() --\n";
+var_dump($result = array_change_key_case($input, CASE_UPPER));
+
+echo "-- Position of Internal Pointer in Result: --\n";
+echo key($result) . " => " . current($result) . "\n";
+echo "\n-- Position of Internal Pointer in Original Array: --\n";
+echo key($input) . " => " . current ($input) . "\n";
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_change_key_case() : usage variations ***
+
+-- Call array_change_key_case() --
+array(3) {
+ ["ONE"]=>
+ string(2) "un"
+ ["TWO"]=>
+ string(4) "deux"
+ ["THREE"]=>
+ string(5) "trois"
+}
+-- Position of Internal Pointer in Result: --
+ONE => un
+
+-- Position of Internal Pointer in Original Array: --
+one => un
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_change_key_case_variation6.phpt b/ext/standard/tests/array/array_change_key_case_variation6.phpt
new file mode 100644
index 000000000..d4371d345
--- /dev/null
+++ b/ext/standard/tests/array/array_change_key_case_variation6.phpt
@@ -0,0 +1,72 @@
+--TEST--
+Test array_change_key_case() function : usage variations - multidimensional arrays
+--FILE--
+<?php
+/* Prototype : array array_change_key_case(array $input [, int $case])
+ * Description: Retuns an array with all string keys lowercased [or uppercased]
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_change_key_case() converts keys in multi-dimensional arrays
+ */
+
+echo "*** Testing array_change_key_case() : usage variations ***\n";
+
+$input = array('English' => array('one' => 1, 'two' => 2, 'three' => 3),
+ 'French' => array('un' => 1, 'deux' => 2, 'trois' => 3),
+ 'German' => array('eins' => 1, 'zwei' => 2, 'drei' => 3));
+
+echo "\n-- Pass a two-dimensional array as \$input argument --\n";
+var_dump(array_change_key_case($input, CASE_UPPER));
+
+echo "\n-- Pass a sub-arry as \$input argument --\n";
+var_dump(array_change_key_case($input['English'], CASE_UPPER));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_change_key_case() : usage variations ***
+
+-- Pass a two-dimensional array as $input argument --
+array(3) {
+ ["ENGLISH"]=>
+ array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ }
+ ["FRENCH"]=>
+ array(3) {
+ ["un"]=>
+ int(1)
+ ["deux"]=>
+ int(2)
+ ["trois"]=>
+ int(3)
+ }
+ ["GERMAN"]=>
+ array(3) {
+ ["eins"]=>
+ int(1)
+ ["zwei"]=>
+ int(2)
+ ["drei"]=>
+ int(3)
+ }
+}
+
+-- Pass a sub-arry as $input argument --
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["THREE"]=>
+ int(3)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_change_key_case_variation7.phpt b/ext/standard/tests/array/array_change_key_case_variation7.phpt
new file mode 100644
index 000000000..173a7ec4d
--- /dev/null
+++ b/ext/standard/tests/array/array_change_key_case_variation7.phpt
@@ -0,0 +1,91 @@
+--TEST--
+Test array_change_key_case() function : usage variations - referenced variables
+--INI--
+allow_call_time_pass_reference=on
+--FILE--
+<?php
+/* Prototype : array array_change_key_case(array $input [, int $case])
+ * Description: Retuns an array with all string keys lowercased [or uppercased]
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_change_key_case() when:
+ * 1. Passed a referenced variable
+ * 2. Passed an argument by reference
+ */
+
+echo "*** Testing array_change_key_case() : usage variations ***\n";
+
+$input = array('one' => 1, 'two' => 2, 'ABC' => 'xyz');
+
+echo "\n-- \$input argument is a reference to array --\n";
+$new_input = &$input;
+echo "Result:\n";
+var_dump(array_change_key_case($new_input, CASE_UPPER));
+echo "Original:\n";
+var_dump($input);
+echo "Referenced:\n";
+var_dump($new_input);
+
+echo "\n-- \$input is an array passed by reference --\n";
+echo "Result:\n";
+var_dump(array_change_key_case(&$input, CASE_UPPER));
+echo "Original:\n";
+var_dump($input);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_change_key_case() : usage variations ***
+
+-- $input argument is a reference to array --
+Result:
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["ABC"]=>
+ string(3) "xyz"
+}
+Original:
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["ABC"]=>
+ string(3) "xyz"
+}
+Referenced:
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["ABC"]=>
+ string(3) "xyz"
+}
+
+-- $input is an array passed by reference --
+Result:
+array(3) {
+ ["ONE"]=>
+ int(1)
+ ["TWO"]=>
+ int(2)
+ ["ABC"]=>
+ string(3) "xyz"
+}
+Original:
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["ABC"]=>
+ string(3) "xyz"
+}
+Done
diff --git a/ext/standard/tests/array/array_change_key_case_variation8.phpt b/ext/standard/tests/array/array_change_key_case_variation8.phpt
new file mode 100644
index 000000000..f9893da79
--- /dev/null
+++ b/ext/standard/tests/array/array_change_key_case_variation8.phpt
@@ -0,0 +1,128 @@
+--TEST--
+Test array_change_key_case() function : usage variations - Different strings as keys
+--FILE--
+<?php
+/* Prototype : array array_change_key_case(array $input [, int $case])
+ * Description: Retuns an array with all string keys lowercased [or uppercased]
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_change_key_case() behaves with different strings
+ */
+
+echo "*** Testing array_change_key_case() : usage variations ***\n";
+
+$inputs = array (
+ // group of escape sequences
+ array(null => 1, NULL => 2, "\a" => 3, "\cx" => 4, "\e" => 5, "\f" => 6, "\n" => 7, "\t" => 8, "\xhh" => 9, "\ddd" => 10, "\v" => 11),
+
+ // array contains combination of capital/small letters
+ array("lemoN" => 1, "Orange" => 2, "banana" => 3, "apple" => 4, "Test" => 5, "TTTT" => 6, "ttt" => 7, "ww" => 8, "x" => 9, "X" => 10, "oraNGe" => 11, "BANANA" => 12)
+);
+
+foreach($inputs as $input) {
+ echo "\n-- \$case = default --\n";
+ var_dump(array_change_key_case($input));
+ echo "-- \$case = upper --\n";
+ var_dump(array_change_key_case($input, CASE_UPPER));
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_change_key_case() : usage variations ***
+
+-- $case = default --
+array(10) {
+ [""]=>
+ int(2)
+ ["\a"]=>
+ int(3)
+ ["\cx"]=>
+ int(4)
+ ["\e"]=>
+ int(5)
+ [" "]=>
+ int(6)
+ ["
+"]=>
+ int(7)
+ [" "]=>
+ int(8)
+ ["\xhh"]=>
+ int(9)
+ ["\ddd"]=>
+ int(10)
+ [" "]=>
+ int(11)
+}
+-- $case = upper --
+array(10) {
+ [""]=>
+ int(2)
+ ["\A"]=>
+ int(3)
+ ["\CX"]=>
+ int(4)
+ ["\E"]=>
+ int(5)
+ [" "]=>
+ int(6)
+ ["
+"]=>
+ int(7)
+ [" "]=>
+ int(8)
+ ["\XHH"]=>
+ int(9)
+ ["\DDD"]=>
+ int(10)
+ [" "]=>
+ int(11)
+}
+
+-- $case = default --
+array(9) {
+ ["lemon"]=>
+ int(1)
+ ["orange"]=>
+ int(11)
+ ["banana"]=>
+ int(12)
+ ["apple"]=>
+ int(4)
+ ["test"]=>
+ int(5)
+ ["tttt"]=>
+ int(6)
+ ["ttt"]=>
+ int(7)
+ ["ww"]=>
+ int(8)
+ ["x"]=>
+ int(10)
+}
+-- $case = upper --
+array(9) {
+ ["LEMON"]=>
+ int(1)
+ ["ORANGE"]=>
+ int(11)
+ ["BANANA"]=>
+ int(12)
+ ["APPLE"]=>
+ int(4)
+ ["TEST"]=>
+ int(5)
+ ["TTTT"]=>
+ int(6)
+ ["TTT"]=>
+ int(7)
+ ["WW"]=>
+ int(8)
+ ["X"]=>
+ int(10)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_chunk_basic1.phpt b/ext/standard/tests/array/array_chunk_basic1.phpt
new file mode 100644
index 000000000..56a90f479
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_basic1.phpt
@@ -0,0 +1,138 @@
+--TEST--
+Test array_chunk() function : basic functionality - defualt 'preserve_keys'
+--FILE--
+<?php
+/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ * Chunks an array into size large chunks.
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_chunk() : basic functionality ***\n";
+$size = 2;
+
+$input_arrays = array (
+ // array with default keys - numeric values
+ array(1, 2, 3, 4, 5),
+
+ // array with default keys - string values
+ array('value1', "value2", "value3"),
+
+ // associative arrays - key as string
+ array('key1' => 1, "key2" => 2, "key3" => 3),
+
+ // associative arrays - key as numeric
+ array(1 => 'one', 2 => "two", 3 => "three"),
+
+ // array containing elements with/witout keys
+ array(1 => 'one','two', 3 => 'three', 4, "five" => 5)
+
+);
+
+$count = 1;
+// loop through each element of the array for input
+foreach ($input_arrays as $input_array){
+ echo "\n-- Iteration $count --\n";
+ var_dump( array_chunk($input_array, $size) );
+ $count++;
+}
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_chunk() : basic functionality ***
+
+-- Iteration 1 --
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(4)
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(5)
+ }
+}
+
+-- Iteration 2 --
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(6) "value1"
+ [1]=>
+ string(6) "value2"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(6) "value3"
+ }
+}
+
+-- Iteration 3 --
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(3)
+ }
+}
+
+-- Iteration 4 --
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(5) "three"
+ }
+}
+
+-- Iteration 5 --
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(5) "three"
+ [1]=>
+ int(4)
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(5)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_chunk_basic2.phpt b/ext/standard/tests/array/array_chunk_basic2.phpt
new file mode 100644
index 000000000..f96d863e1
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_basic2.phpt
@@ -0,0 +1,222 @@
+--TEST--
+Test array_chunk() function : basic functionality - 'preserve_keys' as true/false
+--FILE--
+<?php
+/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ * Chunks an array into size large chunks.
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_chunk() : basic functionality ***\n";
+$size = 2;
+
+$input_arrays = array(
+ // array with default keys - numeric values
+ array(1, 2, 3, 4, 5),
+
+ // array with default keys - string values
+ array('value1', "value2", "value3"),
+
+ // associative arrays - key as string
+ array('key1' => 1, "key2" => 2, "key3" => 3),
+
+ // associative arrays - key as numeric
+ array(1 => 'one', 2 => "two", 3 => "three"),
+
+ // array containing elements with/without keys
+ array(1 => 'one','two', 3 => 'three', 4, "five" => 5)
+);
+
+$count = 1;
+// loop through each element of the array for input
+foreach ($input_arrays as $input_array){
+ echo "\n-- Iteration $count --\n";
+ var_dump( array_chunk($input_array, $size, true) );
+ var_dump( array_chunk($input_array, $size, false) );
+ $count++;
+}
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_chunk() : basic functionality ***
+
+-- Iteration 1 --
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [1]=>
+ array(2) {
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ }
+ [2]=>
+ array(1) {
+ [4]=>
+ int(5)
+ }
+}
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(4)
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(5)
+ }
+}
+
+-- Iteration 2 --
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(6) "value1"
+ [1]=>
+ string(6) "value2"
+ }
+ [1]=>
+ array(1) {
+ [2]=>
+ string(6) "value3"
+ }
+}
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(6) "value1"
+ [1]=>
+ string(6) "value2"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(6) "value3"
+ }
+}
+
+-- Iteration 3 --
+array(2) {
+ [0]=>
+ array(2) {
+ ["key1"]=>
+ int(1)
+ ["key2"]=>
+ int(2)
+ }
+ [1]=>
+ array(1) {
+ ["key3"]=>
+ int(3)
+ }
+}
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(3)
+ }
+}
+
+-- Iteration 4 --
+array(2) {
+ [0]=>
+ array(2) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ }
+ [1]=>
+ array(1) {
+ [3]=>
+ string(5) "three"
+ }
+}
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(5) "three"
+ }
+}
+
+-- Iteration 5 --
+array(3) {
+ [0]=>
+ array(2) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ }
+ [1]=>
+ array(2) {
+ [3]=>
+ string(5) "three"
+ [4]=>
+ int(4)
+ }
+ [2]=>
+ array(1) {
+ ["five"]=>
+ int(5)
+ }
+}
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(5) "three"
+ [1]=>
+ int(4)
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(5)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_chunk_error.phpt b/ext/standard/tests/array/array_chunk_error.phpt
new file mode 100644
index 000000000..519794599
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_error.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test array_chunk() function : error conditions
+--FILE--
+<?php
+/* Prototype : array array_chunk(array input, int size [, bool preserve_keys])
+ * Description: Split array into chunks
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_chunk() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing array_chunk() function with zero arguments --\n";
+var_dump( array_chunk() );
+
+echo "\n-- Testing array_chunk() function with more than expected no. of arguments --\n";
+$input = array(1, 2);
+$size = 10;
+$preserve_keys = true;
+$extra_arg = 10;
+var_dump( array_chunk($input,$size,$preserve_keys, $extra_arg) );
+
+echo "\n-- Testing array_chunk() function with less than expected no. of arguments --\n";
+$input = array(1, 2);
+var_dump( array_chunk($input) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_chunk() : error conditions ***
+
+-- Testing array_chunk() function with zero arguments --
+
+Warning: array_chunk() expects at least 2 parameters, 0 given in %s on line %d
+NULL
+
+-- Testing array_chunk() function with more than expected no. of arguments --
+
+Warning: array_chunk() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+
+-- Testing array_chunk() function with less than expected no. of arguments --
+
+Warning: array_chunk() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_chunk_variation1.phpt b/ext/standard/tests/array/array_chunk_variation1.phpt
new file mode 100644
index 000000000..caaf274dd
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_variation1.phpt
@@ -0,0 +1,325 @@
+--TEST--
+Test array_chunk() function : usage variations - unexpected values for 'array' argument
+--FILE--
+<?php
+/* Prototype : proto array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ * Chunks an array into size large chunks.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_chunk() function with unexpected values for 'array' argument
+*/
+
+echo "*** Testing array_chunk() : usage variations ***\n";
+
+// Initialise function arguments
+$size = 10;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 10.5e10,
+ 10.6E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+
+ // object data
+/*20*/ new stdclass(),
+
+ // undefined data
+/*21*/ @undefined_var,
+
+ // unset data
+/*22*/ @unset_var
+
+);
+
+$count = 1;
+// loop through each element of the array for input
+foreach($values as $value){
+ echo "\n-- Iteration $count --\n";
+ var_dump( array_chunk($value, $size) );
+ var_dump( array_chunk($value, $size, true) );
+ var_dump( array_chunk($value, $size, false) );
+ $count++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_chunk() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_chunk_variation2.phpt b/ext/standard/tests/array/array_chunk_variation2.phpt
new file mode 100644
index 000000000..8cfe99440
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_variation2.phpt
@@ -0,0 +1,427 @@
+--TEST--
+Test array_chunk() function : usage variations - unexpected values for 'size' argument
+--FILE--
+<?php
+/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ : Chunks an array into size large chunks
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_chunk() function with unexpected values for 'size' argument
+*/
+
+echo "*** Testing array_chunk() : usage variations ***\n";
+
+// input array
+$input = array(1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array (
+
+ // float data
+/*1*/ 10.5,
+ -10.5,
+ 10.5e10,
+ 10.6E-10,
+ .5,
+
+ // array data
+/*6*/ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+/*11*/ NULL,
+ null,
+
+ // boolean data
+/*13*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*17*/ "",
+ '',
+
+ // string data
+/*19*/ "string",
+ 'string',
+
+ // object data
+/*21*/ new stdclass(),
+
+ // undefined data
+/*22*/ @undefined_var,
+
+ // unset data
+/*23*/ @unset_var
+
+);
+
+// loop through each element of the array for size
+$count = 1;
+foreach($values as $value){
+ echo "\n-- Iteration $count --\n";
+ var_dump( array_chunk($input, $value) );
+ var_dump( array_chunk($input, $value, true) );
+ var_dump( array_chunk($input, $value, false) );
+ $count++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_chunk() : usage variations ***
+
+-- Iteration 1 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 2 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Iteration 3 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 4 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Iteration 13 --
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+}
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [1]=>
+ int(2)
+ }
+}
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+}
+
+-- Iteration 14 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Iteration 15 --
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+}
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [1]=>
+ int(2)
+ }
+}
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+}
+
+-- Iteration 16 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_chunk() expects parameter 2 to be long, object given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, object given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, object given in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_chunk_variation3.phpt b/ext/standard/tests/array/array_chunk_variation3.phpt
new file mode 100644
index 000000000..452006a44
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_variation3.phpt
@@ -0,0 +1,268 @@
+--TEST--
+Test array_chunk() function : usage variations - unexpected values for 'preserve_keys'
+--FILE--
+<?php
+/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_chunk() function with unexpected values for 'preserve_keys'
+*/
+
+echo "*** Testing array_chunk() : usage variations ***\n";
+
+// input array
+$input = array(1, 2);
+$size = 10;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 10.5e10,
+ 10.6E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // empty data
+/*12*/ "",
+ '',
+
+ // string data
+/*14*/ "string",
+ 'string',
+
+ // object data
+/*16*/ new stdclass(),
+
+ // undefined data
+/*17*/ @undefined_var,
+
+ // unset data
+/*18*/ @unset_var
+
+);
+
+$count = 1;
+
+// loop through each element of the array for preserve_keys
+foreach($values as $value) {
+ echo "\n-- Iteration $count --\n";
+ var_dump( array_chunk($input, $size, $value) );
+ $count++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_chunk() : usage variations ***
+
+-- Iteration 1 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 2 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 3 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 4 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 5 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 6 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 7 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 8 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 9 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 10 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 11 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 12 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 13 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 14 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 15 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 16 --
+
+Warning: array_chunk() expects parameter 3 to be boolean, object given in %s on line %d
+NULL
+
+-- Iteration 17 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+
+-- Iteration 18 --
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_chunk_variation4.phpt b/ext/standard/tests/array/array_chunk_variation4.phpt
new file mode 100644
index 000000000..7f04f51bf
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_variation4.phpt
@@ -0,0 +1,120 @@
+--TEST--
+Test array_chunk() function : usage variations - array with diff. sub arrays
+--FILE--
+<?php
+/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ * : Chunks an array into size large chunks
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_chunk() function - input array containing different sub arrays
+*/
+
+echo "*** Testing array_chunk() : usage variations ***\n";
+
+$size = 2;
+
+// input array
+$input_array = array (
+ "array1" => array(),
+ "array2" => array(1, 2, 3),
+ "array3" => array(1)
+);
+
+echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as defualt --\n";
+var_dump( array_chunk($input_array, $size) );
+
+echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' = true --\n";
+var_dump( array_chunk($input_array, $size, true) );
+
+echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' = false --\n";
+var_dump( array_chunk($input_array, $size, false) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_chunk() : usage variations ***
+
+-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as defualt --
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ }
+}
+
+-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' = true --
+array(2) {
+ [0]=>
+ array(2) {
+ ["array1"]=>
+ array(0) {
+ }
+ ["array2"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ }
+ [1]=>
+ array(1) {
+ ["array3"]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ }
+}
+
+-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' = false --
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_chunk_variation5.phpt b/ext/standard/tests/array/array_chunk_variation5.phpt
new file mode 100644
index 000000000..8d3609282
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_variation5.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test array_chunk() function : usage variations - different 'size' values
+--FILE--
+<?php
+/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ * : Chunks an array into size large chunks
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_chunk() function with following conditions
+ * 1. -ve size value
+ * 2. size value is more than the no. of elements in the input array
+ * 3. size value is zero
+ * 4. Decimal size value
+*/
+
+echo "*** Testing array_chunk() : usage variations ***\n";
+
+// input array
+$input_array = array(1, 2, 3);
+
+// different magnitude's
+$sizes = array(-1, count($input_array) + 1, 0, 1.5);
+
+// loop through the array for size argument
+foreach ($sizes as $size){
+ echo "\n-- Testing array_chunk() when size = $size --\n";
+ var_dump( array_chunk($input_array, $size) );
+ var_dump( array_chunk($input_array, $size, true) );
+ var_dump( array_chunk($input_array, $size, false) );
+}
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_chunk() : usage variations ***
+
+-- Testing array_chunk() when size = -1 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Testing array_chunk() when size = 4 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Testing array_chunk() when size = 0 --
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
+NULL
+
+-- Testing array_chunk() when size = 1.5 --
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(3)
+ }
+}
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ array(1) {
+ [2]=>
+ int(3)
+ }
+}
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(3)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_chunk_variation6.phpt b/ext/standard/tests/array/array_chunk_variation6.phpt
new file mode 100644
index 000000000..f44eb3960
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_variation6.phpt
@@ -0,0 +1,135 @@
+--TEST--
+Test array_chunk() function : usage variations - different arrays
+--FILE--
+<?php
+/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ * : Chunks an array into size large chunks
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_chunk() function with following conditions
+ * 1. array without elements
+ * 2. associative array with duplicate keys
+ * 3. array with one element
+*/
+
+echo "*** Testing array_chunk() : usage variations ***\n";
+
+// input array
+$input_arrays = array (
+
+ // array without elements
+ "array1" => array(),
+
+ // array with one element
+ "array2" => array(1),
+
+ // associative array with duplicate keys
+ "array3" => array("a" => 1, "b" => 2, "c" => 3, "a" => 4, "d" => 5)
+
+);
+
+$size = 2;
+$count = 1;
+
+echo "\n-- Testing array_chunk() by supplying various arrays --\n";
+
+// loop through the array for 'array' argument
+foreach ($input_arrays as $input_array){
+ echo "\n-- Iteration $count --\n";
+ var_dump( array_chunk($input_array, $size) );
+ var_dump( array_chunk($input_array, $size, true) );
+ var_dump( array_chunk($input_array, $size, false) );
+ $count++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_chunk() : usage variations ***
+
+-- Testing array_chunk() by supplying various arrays --
+
+-- Iteration 1 --
+array(0) {
+}
+array(0) {
+}
+array(0) {
+}
+
+-- Iteration 2 --
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+
+-- Iteration 3 --
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(2)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(5)
+ }
+}
+array(2) {
+ [0]=>
+ array(2) {
+ ["a"]=>
+ int(4)
+ ["b"]=>
+ int(2)
+ }
+ [1]=>
+ array(2) {
+ ["c"]=>
+ int(3)
+ ["d"]=>
+ int(5)
+ }
+}
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(2)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(5)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_chunk_variation7.phpt b/ext/standard/tests/array/array_chunk_variation7.phpt
new file mode 100644
index 000000000..c8a71964f
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_variation7.phpt
@@ -0,0 +1,89 @@
+--TEST--
+Test array_chunk() function : usage variations - references
+--FILE--
+<?php
+/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
+ * Description: Split array into chunks
+ * : Chunks an array into size large chunks
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_chunk() function with following conditions
+ * 1. input array containing references
+*/
+
+echo "*** Testing array_chunk() : usage variations ***\n";
+
+$size = 2;
+
+echo "\n-- Testing array_chunk(), input array containing references \n";
+
+$numbers=array(1, 2, 3, 4);
+// reference array
+$input_array = array (
+ "one" => &$numbers[0],
+ "two" => &$numbers[1],
+ "three" => &$numbers[2],
+ "four" => &$numbers[3]
+);
+
+var_dump( array_chunk($input_array, $size) );
+var_dump( array_chunk($input_array, $size, true) );
+var_dump( array_chunk($input_array, $size, false) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_chunk() : usage variations ***
+
+-- Testing array_chunk(), input array containing references
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(2)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ &int(3)
+ [1]=>
+ &int(4)
+ }
+}
+array(2) {
+ [0]=>
+ array(2) {
+ ["one"]=>
+ &int(1)
+ ["two"]=>
+ &int(2)
+ }
+ [1]=>
+ array(2) {
+ ["three"]=>
+ &int(3)
+ ["four"]=>
+ &int(4)
+ }
+}
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(2)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ &int(3)
+ [1]=>
+ &int(4)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_combine_basic.phpt b/ext/standard/tests/array/array_combine_basic.phpt
new file mode 100644
index 000000000..5d855cfec
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_basic.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test array_combine() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_combine() : basic functionality ***\n";
+
+/* Different arrays for $keys and $values arguments */
+
+// array with default keys for $keys and $values arguments
+$keys_array = array(1, 2);
+$values_array = array(3,4);
+var_dump( array_combine($keys_array, $values_array) );
+
+// associative arrays for $keys and $values arguments
+$keys_array = array(1 => "a", 2 => 'b');
+$values_array = array(3 => 'c', 4 => "d");
+var_dump( array_combine($keys_array, $values_array) );
+
+// mixed array for $keys and $values arguments
+$keys_array = array(1, 2 => "b");
+$values_array = array(3 => 'c', 4);
+var_dump( array_combine($keys_array, $values_array) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : basic functionality ***
+array(2) {
+ [1]=>
+ int(3)
+ [2]=>
+ int(4)
+}
+array(2) {
+ ["a"]=>
+ string(1) "c"
+ ["b"]=>
+ string(1) "d"
+}
+array(2) {
+ [1]=>
+ string(1) "c"
+ ["b"]=>
+ int(4)
+}
+Done
diff --git a/ext/standard/tests/array/array_combine_error1.phpt b/ext/standard/tests/array/array_combine_error1.phpt
new file mode 100644
index 000000000..aa5a1afe1
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_error1.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test array_combine() function : error conditions
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_combine() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing array_combine() function with Zero arguments --\n";
+var_dump( array_combine() );
+
+//Test array_combine with one more than the expected number of arguments
+echo "\n-- Testing array_combine() function with more than expected no. of arguments --\n";
+$keys = array(1, 2);
+$values = array(1, 2);
+$extra_arg = 10;
+var_dump( array_combine($keys,$values, $extra_arg) );
+
+// Testing array_combine with one less than the expected number of arguments
+echo "\n-- Testing array_combine() function with less than expected no. of arguments --\n";
+$keys = array(1, 2);
+var_dump( array_combine($keys) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : error conditions ***
+
+-- Testing array_combine() function with Zero arguments --
+
+Warning: array_combine() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+
+-- Testing array_combine() function with more than expected no. of arguments --
+
+Warning: array_combine() expects exactly 2 parameters, 3 given in %s on line %d
+NULL
+
+-- Testing array_combine() function with less than expected no. of arguments --
+
+Warning: array_combine() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_combine_error2.phpt b/ext/standard/tests/array/array_combine_error2.phpt
new file mode 100644
index 000000000..c06fdb490
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_error2.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test array_combine() function : error conditions - empty array
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_combine() : error conditions specific to array_combine() ***\n";
+
+// Testing array_combine by passing empty arrays to $keys and $values arguments
+echo "\n-- Testing array_combine() function with empty arrays --\n";
+var_dump( array_combine(array(), array()) );
+
+// Testing array_combine by passing empty array to $keys
+echo "\n-- Testing array_combine() function with empty array for \$keys argument --\n";
+var_dump( array_combine(array(), array(1, 2)) );
+
+// Testing array_combine by passing empty array to $values
+echo "\n-- Testing array_combine() function with empty array for \$values argument --\n";
+var_dump( array_combine(array(1, 2), array()) );
+
+// Testing array_combine with arrays having unequal number of elements
+echo "\n-- Testing array_combine() function by passing array with unequal number of elements --\n";
+var_dump( array_combine(array(1, 2), array(1, 2, 3)) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : error conditions specific to array_combine() ***
+
+-- Testing array_combine() function with empty arrays --
+
+Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
+bool(false)
+
+-- Testing array_combine() function with empty array for $keys argument --
+
+Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
+bool(false)
+
+-- Testing array_combine() function with empty array for $values argument --
+
+Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
+bool(false)
+
+-- Testing array_combine() function by passing array with unequal number of elements --
+
+Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/array_combine_variation1.phpt b/ext/standard/tests/array/array_combine_variation1.phpt
new file mode 100644
index 000000000..c69d4ebaf
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_variation1.phpt
@@ -0,0 +1,198 @@
+--TEST--
+Test array_combine() function : usage variations - unexpected values for 'keys' argument
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_combine() function by passing values to $keys argument other than arrays
+* and see that function emits proper warning messages wherever expected.
+* The $values argument passed is a fixed array.
+*/
+
+echo "*** Testing array_combine() : Passing non-array values to \$keys argument ***\n";
+
+// Initialise $values argument
+$values = array(1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $keys argument
+$keys_passed = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element within $keys_passed to check the behavior of array_combine()
+$iterator = 1;
+foreach($keys_passed as $keys) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_combine($keys,$values) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : Passing non-array values to $keys argument ***
+-- Iteration 1 --
+
+Warning: array_combine() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+-- Iteration 2 --
+
+Warning: array_combine() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+-- Iteration 3 --
+
+Warning: array_combine() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+-- Iteration 4 --
+
+Warning: array_combine() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+-- Iteration 5 --
+
+Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
+NULL
+-- Iteration 6 --
+
+Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
+NULL
+-- Iteration 7 --
+
+Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
+NULL
+-- Iteration 8 --
+
+Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
+NULL
+-- Iteration 9 --
+
+Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
+NULL
+-- Iteration 10 --
+
+Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
+NULL
+-- Iteration 11 --
+
+Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
+NULL
+-- Iteration 12 --
+
+Warning: array_combine() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+-- Iteration 13 --
+
+Warning: array_combine() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+-- Iteration 14 --
+
+Warning: array_combine() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+-- Iteration 15 --
+
+Warning: array_combine() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+-- Iteration 16 --
+
+Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
+NULL
+-- Iteration 17 --
+
+Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
+NULL
+-- Iteration 18 --
+
+Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
+NULL
+-- Iteration 19 --
+
+Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
+NULL
+-- Iteration 20 --
+
+Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
+NULL
+-- Iteration 21 --
+
+Warning: array_combine() expects parameter 1 to be array, object given in %s on line %d
+NULL
+-- Iteration 22 --
+
+Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
+NULL
+-- Iteration 23 --
+
+Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
+NULL
+-- Iteration 24 --
+
+Warning: array_combine() expects parameter 1 to be array, resource given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_combine_variation2.phpt b/ext/standard/tests/array/array_combine_variation2.phpt
new file mode 100644
index 000000000..e58893bae
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_variation2.phpt
@@ -0,0 +1,198 @@
+--TEST--
+Test array_combine() function : usage variations - unexpected values for 'values' argument
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_combine() function by passing values to $values argument other than arrays
+* and see that function emits proper warning messages wherever expected.
+* The $keys argument passed is a fixed array.
+*/
+
+echo "*** Testing array_combine() : Passing non-array values to \$values argument ***\n";
+
+// Initialize $keys array
+$keys = array(1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $values argument
+$values_passed = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element within $values_passed to check the behavior of array_combine()
+$iterator = 1;
+foreach($values_passed as $values) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_combine($keys,$values) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : Passing non-array values to $values argument ***
+-- Iteration 1 --
+
+Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d
+NULL
+-- Iteration 2 --
+
+Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d
+NULL
+-- Iteration 3 --
+
+Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d
+NULL
+-- Iteration 4 --
+
+Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d
+NULL
+-- Iteration 5 --
+
+Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
+NULL
+-- Iteration 6 --
+
+Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
+NULL
+-- Iteration 7 --
+
+Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
+NULL
+-- Iteration 8 --
+
+Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
+NULL
+-- Iteration 9 --
+
+Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
+NULL
+-- Iteration 10 --
+
+Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
+NULL
+-- Iteration 11 --
+
+Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
+NULL
+-- Iteration 12 --
+
+Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d
+NULL
+-- Iteration 13 --
+
+Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d
+NULL
+-- Iteration 14 --
+
+Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d
+NULL
+-- Iteration 15 --
+
+Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d
+NULL
+-- Iteration 16 --
+
+Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
+NULL
+-- Iteration 17 --
+
+Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
+NULL
+-- Iteration 18 --
+
+Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
+NULL
+-- Iteration 19 --
+
+Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
+NULL
+-- Iteration 20 --
+
+Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
+NULL
+-- Iteration 21 --
+
+Warning: array_combine() expects parameter 2 to be array, object given in %s on line %d
+NULL
+-- Iteration 22 --
+
+Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
+NULL
+-- Iteration 23 --
+
+Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
+NULL
+-- Iteration 24 --
+
+Warning: array_combine() expects parameter 2 to be array, resource given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_combine_variation3.phpt b/ext/standard/tests/array/array_combine_variation3.phpt
new file mode 100644
index 000000000..51d8462d5
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_variation3.phpt
@@ -0,0 +1,279 @@
+--TEST--
+Test array_combine() function : usage variations - different arrays(Bug#43424)
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing different types of arrays to both $keys and $values arguments and testing whether
+* array_combine() behaves in an expected way with the arguments passed to the function
+*/
+
+echo "*** Testing array_combine() : Passing different types of arrays to both \$keys and \$values argument ***\n";
+/* Different heredoc strings passed as argument to arrays */
+// heredoc with blank line
+$blank_line = <<<EOT
+
+
+EOT;
+
+// heredoc with multiline string
+$multiline_string = <<<EOT
+hello world
+The quick brown fox jumped over;
+the lazy dog
+This is a double quoted string
+EOT;
+
+// heredoc with diferent whitespaces
+$diff_whitespaces = <<<EOT
+hello\r world\t
+1111\t\t != 2222\v\v
+heredoc\ndouble quoted string. with\vdifferent\fwhite\vspaces
+EOT;
+
+// heredoc with quoted strings and numeric values
+$numeric_string = <<<EOT
+11 < 12. 123 >22
+'single quoted string'
+"double quoted string"
+2222 != 1111.\t 0000 = 0000\n
+EOT;
+
+// arrays passed to $keys argument
+$arrays = array (
+/*1*/ array(1, 2), // with default keys and numeric values
+ array(1.1, 2.2), // with default keys & float values
+ array(false,true), // with default keys and boolean values
+ array(), // empty array
+/*5*/ array(NULL), // with NULL
+ array("a\v\f","aaaa\r","b","b\tbbb","c","\[\]\!\@\#\$\%\^\&\*\(\)\{\}"), // with double quoted strings
+ array('a\v\f','aaaa\r','b','b\tbbb','c','\[\]\!\@\#\$\%\^\&\*\(\)\{\}'), // with single quoted strings
+ array("h1" => $blank_line, "h2" => $multiline_string, "h3" => $diff_whitespaces, $numeric_string), // with heredocs
+
+ // associative arrays
+/*9*/ array(1 => "one", 2 => "two", 3 => "three"), // explicit numeric keys, string values
+ array("one" => 1, "two" => 2, "three" => 3 ), // string keys & numeric values
+ array( 1 => 10, 2 => 20, 4 => 40, 3 => 30), // explicit numeric keys and numeric values
+ array( "one" => "ten", "two" => "twenty", "three" => "thirty"), // string key/value
+ array("one" => 1, 2 => "two", 4 => "four"), //mixed
+
+ // associative array, containing null/empty/boolean values as key/value
+/*14*/ array(NULL => "NULL", null => "null", "NULL" => NULL, "null" => null),
+ array(true => "true", false => "false", "false" => false, "true" => true),
+ array("" => "emptyd", '' => 'emptys', "emptyd" => "", 'emptys' => ''),
+ array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
+ array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
+
+ // array with repetative keys
+/*19*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
+);
+
+// loop through each sub-array within $arrays to check the behavior of array_combine()
+// same arrays are passed to both $keys and $values
+$iterator = 1;
+foreach($arrays as $array) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_combine($array, $array) );
+ $iterator++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : Passing different types of arrays to both $keys and $values argument ***
+-- Iteration 1 --
+array(2) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+-- Iteration 2 --
+array(2) {
+ ["1.1"]=>
+ float(1.1)
+ ["2.2"]=>
+ float(2.2)
+}
+-- Iteration 3 --
+array(2) {
+ [""]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+-- Iteration 4 --
+
+Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
+bool(false)
+-- Iteration 5 --
+array(1) {
+ [""]=>
+ NULL
+}
+-- Iteration 6 --
+array(6) {
+ ["a "]=>
+ string(3) "a "
+ ["aaaa "]=>
+ string(5) "aaaa "
+ ["b"]=>
+ string(1) "b"
+ ["b bbb"]=>
+ string(5) "b bbb"
+ ["c"]=>
+ string(1) "c"
+ ["\[\]\!\@\#$\%\^\&\*\(\)\{\}"]=>
+ string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
+}
+-- Iteration 7 --
+array(6) {
+ ["a\v\f"]=>
+ string(5) "a\v\f"
+ ["aaaa\r"]=>
+ string(6) "aaaa\r"
+ ["b"]=>
+ string(1) "b"
+ ["b\tbbb"]=>
+ string(6) "b\tbbb"
+ ["c"]=>
+ string(1) "c"
+ ["\[\]\!\@\#\$\%\^\&\*\(\)\{\}"]=>
+ string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
+}
+-- Iteration 8 --
+array(4) {
+ ["
+"]=>
+ string(1) "
+"
+ ["hello world
+The quick brown fox jumped over;
+the lazy dog
+This is a double quoted string"]=>
+ string(88) "hello world
+The quick brown fox jumped over;
+the lazy dog
+This is a double quoted string"
+ ["hello world
+1111 != 2222
+heredoc
+double quoted string. with different white spaces"]=>
+ string(88) "hello world
+1111 != 2222
+heredoc
+double quoted string. with different white spaces"
+ ["11 < 12. 123 >22
+'single quoted string'
+"double quoted string"
+2222 != 1111. 0000 = 0000
+"]=>
+ string(90) "11 < 12. 123 >22
+'single quoted string'
+"double quoted string"
+2222 != 1111. 0000 = 0000
+"
+}
+-- Iteration 9 --
+array(3) {
+ ["one"]=>
+ string(3) "one"
+ ["two"]=>
+ string(3) "two"
+ ["three"]=>
+ string(5) "three"
+}
+-- Iteration 10 --
+array(3) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+}
+-- Iteration 11 --
+array(4) {
+ [10]=>
+ int(10)
+ [20]=>
+ int(20)
+ [40]=>
+ int(40)
+ [30]=>
+ int(30)
+}
+-- Iteration 12 --
+array(3) {
+ ["ten"]=>
+ string(3) "ten"
+ ["twenty"]=>
+ string(6) "twenty"
+ ["thirty"]=>
+ string(6) "thirty"
+}
+-- Iteration 13 --
+array(3) {
+ [1]=>
+ int(1)
+ ["two"]=>
+ string(3) "two"
+ ["four"]=>
+ string(4) "four"
+}
+-- Iteration 14 --
+array(2) {
+ ["null"]=>
+ string(4) "null"
+ [""]=>
+ NULL
+}
+-- Iteration 15 --
+array(4) {
+ ["true"]=>
+ string(4) "true"
+ ["false"]=>
+ string(5) "false"
+ [""]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+-- Iteration 16 --
+array(2) {
+ ["emptys"]=>
+ string(6) "emptys"
+ [""]=>
+ string(0) ""
+}
+-- Iteration 17 --
+array(2) {
+ [""]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+-- Iteration 18 --
+array(3) {
+ [4]=>
+ int(4)
+ [5]=>
+ int(5)
+ [6]=>
+ int(6)
+}
+-- Iteration 19 --
+array(3) {
+ [10]=>
+ int(10)
+ [20]=>
+ int(20)
+ [3]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/array_combine_variation4.phpt b/ext/standard/tests/array/array_combine_variation4.phpt
new file mode 100644
index 000000000..02ec6efd2
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_variation4.phpt
@@ -0,0 +1,192 @@
+--TEST--
+Test array_combine() function : usage variations - associative array with different keys(Bug#43424)
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_combine() by passing different
+ * associative arrays having different possible keys to $keys argument and
+ * associative arrays having different possible keys to $values argument.
+*/
+
+echo "*** Testing array_combine() : assoc array with diff keys to both \$keys and \$values argument ***\n";
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a class
+class classA
+{
+ public function __toString(){
+ return "Class A object";
+ }
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// different variations of associative arrays to be passed to $arr1 argument
+$arrays = array (
+
+ // empty array
+/*1*/ array(),
+
+ // arrays with integer keys
+ array(0 => "0"),
+ array(1 => "1"),
+ array(1 => "1", 2 => "2", 3 => "3", 4 => "4"),
+
+ // arrays with float keys
+/*5*/ array(2.3333 => "float"),
+ array(1.2 => "f1", 3.33 => "f2",
+ 4.89999922839999 => "f3",
+ 33333333.333333 => "f4"),
+
+ // arrays with string keys
+/*7*/ array('\tHello' => 111, 're\td' => "color",
+ '\v\fworld' => 2.2, 'pen\n' => 33),
+ array("\tHello" => 111, "re\td" => "color",
+ "\v\fworld" => 2.2, "pen\n" => 33),
+ array("hello", $heredoc => "string"), // heredoc
+
+ // array with object, unset variable and resource variable
+/*10*/ array(new classA() => 11, @$unset_var => "hello", $fp => 'resource'),
+
+ // array with mixed keys
+/*11*/ array('hello' => 1, new classA() => 2, "fruit" => 2.2,
+ $fp => 'resource', 133 => "int", 444.432 => "float",
+ @$unset_var => "unset", $heredoc => "heredoc")
+);
+
+// array to be passsed to $arr2 argument
+$arr2 = array(0 => 0, 2 => "float", 4 => "f3", 33333333 => "f4",
+ "\tHello" => 111, 2.2, 'color', "Hello world" => "string",
+ "pen\n" => 33, new classA() => 11, 133 => "int");
+
+// loop through each sub-array within $arrays to check the behavior of array_combine()
+// same arrays are passed to both $keys and $values
+$iterator = 1;
+foreach($arrays as $array) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_combine($array, $array) );
+ $iterator++;
+}
+
+// close the file resource used
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : assoc array with diff keys to both $keys and $values argument ***
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+-- Iteration 1 --
+
+Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
+bool(false)
+-- Iteration 2 --
+array(1) {
+ [0]=>
+ string(1) "0"
+}
+-- Iteration 3 --
+array(1) {
+ [1]=>
+ string(1) "1"
+}
+-- Iteration 4 --
+array(4) {
+ [1]=>
+ string(1) "1"
+ [2]=>
+ string(1) "2"
+ [3]=>
+ string(1) "3"
+ [4]=>
+ string(1) "4"
+}
+-- Iteration 5 --
+array(1) {
+ ["float"]=>
+ string(5) "float"
+}
+-- Iteration 6 --
+array(4) {
+ ["f1"]=>
+ string(2) "f1"
+ ["f2"]=>
+ string(2) "f2"
+ ["f3"]=>
+ string(2) "f3"
+ ["f4"]=>
+ string(2) "f4"
+}
+-- Iteration 7 --
+array(4) {
+ [111]=>
+ int(111)
+ ["color"]=>
+ string(5) "color"
+ ["2.2"]=>
+ float(2.2)
+ [33]=>
+ int(33)
+}
+-- Iteration 8 --
+array(4) {
+ [111]=>
+ int(111)
+ ["color"]=>
+ string(5) "color"
+ ["2.2"]=>
+ float(2.2)
+ [33]=>
+ int(33)
+}
+-- Iteration 9 --
+array(2) {
+ ["hello"]=>
+ string(5) "hello"
+ ["string"]=>
+ string(6) "string"
+}
+-- Iteration 10 --
+array(1) {
+ ["hello"]=>
+ string(5) "hello"
+}
+-- Iteration 11 --
+array(6) {
+ [1]=>
+ int(1)
+ ["2.2"]=>
+ float(2.2)
+ ["int"]=>
+ string(3) "int"
+ ["float"]=>
+ string(5) "float"
+ ["unset"]=>
+ string(5) "unset"
+ ["heredoc"]=>
+ string(7) "heredoc"
+}
+Done
diff --git a/ext/standard/tests/array/array_combine_variation5.phpt b/ext/standard/tests/array/array_combine_variation5.phpt
new file mode 100644
index 000000000..c3d1d57aa
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_variation5.phpt
@@ -0,0 +1,186 @@
+--TEST--
+Test array_combine() function : usage variations - associative array with different values(Bug#43424)
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing the functionality of array_combine() by passing various
+* associative arrays having different possible values to $keys argument and
+* associative arrays having different possible values to $values argument.
+*/
+
+echo "*** Testing array_combine() : assoc array with diff values to both \$keys and \$values argument ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a class
+class classA
+{
+public function __toString(){
+return "Class A object";
+}
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// different variations of associative array
+$arrays = array (
+
+ // empty array
+/*1*/ array(),
+
+ // arrays with integer values
+ array('0' => 0),
+ array("1" => 1),
+ array("one" => 1, 'two' => 2, "three" => 3, 4 => 4),
+
+ // arrays with float values
+/*5*/ array("float" => 2.3333),
+ array("f1" => 1.2, 'f2' => 3.33, 3 => 4.89999922839999, 'f4' => 33333333.333),
+
+ // arrays with string values
+/*7*/ array(111 => "\tHello", "red" => "col\tor", 2 => "\v\fworld", 3.3 => "pen\n"),
+ array(111 => '\tHello', "red" => 'col\tor', 2 => '\v\fworld', 3.3 => 'pen\n'),
+ array(1 => "hello", "heredoc" => $heredoc),
+
+ // array with object, unset variable and resource variable
+/*10*/ array(11 => new classA(), "unset" => @$unset_var, "resource" => $fp),
+
+ // array with mixed values
+/*11*/ array(1 => 'hello', 2 => new classA(), 222 => "fruit",
+ 'resource' => $fp, "int" => 133, "float" => 444.432,
+ "unset" => @$unset_var, "heredoc" => $heredoc)
+);
+
+
+// loop through each sub-array within $arrays to check the behavior of array_combine()
+$iterator = 1;
+foreach($arrays as $array) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_combine($array, $array) );
+ $iterator++;
+}
+
+// close the file resource used
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : assoc array with diff values to both $keys and $values argument ***
+-- Iteration 1 --
+
+Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
+bool(false)
+-- Iteration 2 --
+array(1) {
+ [0]=>
+ int(0)
+}
+-- Iteration 3 --
+array(1) {
+ [1]=>
+ int(1)
+}
+-- Iteration 4 --
+array(4) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ [4]=>
+ int(4)
+}
+-- Iteration 5 --
+array(1) {
+ ["2.3333"]=>
+ float(2.3333)
+}
+-- Iteration 6 --
+array(4) {
+ ["1.2"]=>
+ float(1.2)
+ ["3.33"]=>
+ float(3.33)
+ ["4.8999992284"]=>
+ float(4.8999992284)
+ ["33333333.333"]=>
+ float(33333333.333)
+}
+-- Iteration 7 --
+array(4) {
+ [" Hello"]=>
+ string(6) " Hello"
+ ["col or"]=>
+ string(6) "col or"
+ [" world"]=>
+ string(7) " world"
+ ["pen
+"]=>
+ string(4) "pen
+"
+}
+-- Iteration 8 --
+array(4) {
+ ["\tHello"]=>
+ string(7) "\tHello"
+ ["col\tor"]=>
+ string(7) "col\tor"
+ ["\v\fworld"]=>
+ string(9) "\v\fworld"
+ ["pen\n"]=>
+ string(5) "pen\n"
+}
+-- Iteration 9 --
+array(2) {
+ ["hello"]=>
+ string(5) "hello"
+ ["Hello world"]=>
+ string(11) "Hello world"
+}
+-- Iteration 10 --
+array(3) {
+ ["Class A object"]=>
+ object(classA)#%d (0) {
+ }
+ [""]=>
+ NULL
+ ["Resource id #%d"]=>
+ resource(%d) of type (stream)
+}
+-- Iteration 11 --
+array(8) {
+ ["hello"]=>
+ string(5) "hello"
+ ["Class A object"]=>
+ object(classA)#%d (0) {
+ }
+ ["fruit"]=>
+ string(5) "fruit"
+ ["Resource id #%d"]=>
+ resource(%d) of type (stream)
+ [133]=>
+ int(133)
+ ["444.432"]=>
+ float(444.432)
+ [""]=>
+ NULL
+ ["Hello world"]=>
+ string(11) "Hello world"
+}
+Done
diff --git a/ext/standard/tests/array/array_combine_variation6.phpt b/ext/standard/tests/array/array_combine_variation6.phpt
new file mode 100644
index 000000000..94c7b4d66
--- /dev/null
+++ b/ext/standard/tests/array/array_combine_variation6.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test array_combine() function : usage variations - binary safe checking
+--FILE--
+<?php
+/* Prototype : array array_combine(array $keys, array $values)
+ * Description: Creates an array by using the elements of the first parameter as keys
+ * and the elements of the second as the corresponding values
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing the behavior of array_combine() by passing array with
+* binary values for $keys and $values argument.
+*/
+
+echo "*** Testing array_combine() : binary safe checking ***\n";
+
+// array with binary values
+$arr_binary = array(b"hello", b"world");
+$arr_normal = array("hello", "world");
+
+// array with binary value for $keys and $values argument
+var_dump( array_combine($arr_binary, $arr_binary) );
+
+// array with binary value for $values argument
+var_dump( array_combine($arr_normal, $arr_binary) );
+
+// array with binary value for $keys argument
+var_dump( array_combine($arr_binary, $arr_normal) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_combine() : binary safe checking ***
+array(2) {
+ ["hello"]=>
+ string(5) "hello"
+ ["world"]=>
+ string(5) "world"
+}
+array(2) {
+ ["hello"]=>
+ string(5) "hello"
+ ["world"]=>
+ string(5) "world"
+}
+array(2) {
+ ["hello"]=>
+ string(5) "hello"
+ ["world"]=>
+ string(5) "world"
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_assoc_basic.phpt b/ext/standard/tests/array/array_diff_assoc_basic.phpt
new file mode 100644
index 000000000..c6b3aef00
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_basic.phpt
@@ -0,0 +1,90 @@
+--TEST--
+Test array_diff_assoc() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of array_diff_assoc
+ */
+
+echo "*** Testing array_diff_assoc() : basic functionality ***\n";
+$array_default_key = array('one', 2, 'three', '4');
+$array_numeric_key = array(1 => 'one', 2=> 'two', 3 => 4);
+$array_string_key = array('one' => 1, 'two' => '2', '3' => 'three');
+
+
+
+echo "-- Compare Default keys to numeric keys --\n";
+var_dump(array_diff_assoc($array_default_key, $array_numeric_key));
+var_dump(array_diff_assoc($array_numeric_key, $array_default_key));
+
+
+echo "\n-- Compare Default keys to string keys --\n";
+var_dump(array_diff_assoc($array_default_key, $array_numeric_key));
+var_dump(array_diff_assoc($array_numeric_key, $array_default_key));
+
+
+echo "\n-- Compare numeric keys to string keys --\n";
+var_dump(array_diff_assoc($array_numeric_key, $array_string_key));
+var_dump(array_diff_assoc($array_string_key, $array_numeric_key));
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff_assoc() : basic functionality ***
+-- Compare Default keys to numeric keys --
+array(3) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ [2]=>
+ string(5) "three"
+}
+array(2) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+}
+
+-- Compare Default keys to string keys --
+array(3) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ [2]=>
+ string(5) "three"
+}
+array(2) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+}
+
+-- Compare numeric keys to string keys --
+array(3) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ int(4)
+}
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ string(1) "2"
+ [3]=>
+ string(5) "three"
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_assoc_error.phpt b/ext/standard/tests/array/array_diff_assoc_error.phpt
new file mode 100644
index 000000000..0c9da2f2c
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_error.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test array_diff_assoc() function : error conditions - pass array_diff_assoc() too few/zero arguments
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of arr1 that have values which are not present
+ * in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test errors for array_diff with too few\zero arguments
+ */
+
+echo "*** Testing array_diff_assoc() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing array_diff() function with zero arguments --\n";
+var_dump( array_diff_assoc() );
+
+// Testing array_diff_assoc with one less than the expected number of arguments
+echo "\n-- Testing array_diff_assoc() function with less than expected no. of arguments --\n";
+$arr1 = array(1, 2);
+var_dump( array_diff_assoc($arr1) );
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff_assoc() : error conditions ***
+
+-- Testing array_diff() function with zero arguments --
+
+Warning: Wrong parameter count for array_diff_assoc() in %s on line %d
+NULL
+
+-- Testing array_diff_assoc() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for array_diff_assoc() in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_assoc_variation1.phpt b/ext/standard/tests/array/array_diff_assoc_variation1.phpt
new file mode 100644
index 000000000..b6c63794b
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation1.phpt
@@ -0,0 +1,234 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - unexpected values for 'arr1' argument
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not present
+ * in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass array_diff_assoc arguments that are not arrays in place of $arr1
+ */
+
+echo "*** Testing array_diff_assoc() : usage variations ***\n";
+
+$array = array(1, 2, 3);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+//array of unexpected values to be passed to $arr1 argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // binary data
+/*21*/ b"binary",
+ (binary)"binary",
+
+ // object data
+/*23*/ new classA(),
+
+ // undefined data
+/*24*/ @$undefined_var,
+
+ // unset data
+/*25*/ @$unset_var,
+
+ // resource variable
+/*26*/ $fp,
+);
+
+// loop through each element of $inputs to check the behavior of array_diff_assoc
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_diff_assoc($input, $array));
+ $iterator++;
+};
+fclose($fp);
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_diff_assoc() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 26 --
+
+Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_assoc_variation10.phpt b/ext/standard/tests/array/array_diff_assoc_variation10.phpt
new file mode 100644
index 000000000..0687ed8a5
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation10.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - binary safe check
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of arr1 that have values which are not
+ * present in any of the others arguments but do additional checks whether
+ * the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff_assoc() compares binary data
+ */
+
+echo "*** Testing array_diff_assoc() : usage variations ***\n";
+
+$array1 = array( b"1",
+ b"hello",
+ "world",
+ "str1" => "hello",
+ "str2" => "world");
+
+$array2 = array( b"1" => 'hello',
+ b"world",
+ "hello",
+ 'test');
+
+var_dump(array_diff_assoc($array1, $array2));
+var_dump(array_diff_assoc($array2, $array1));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff_assoc() : usage variations ***
+array(3) {
+ [0]=>
+ string(1) "1"
+ ["str1"]=>
+ string(5) "hello"
+ ["str2"]=>
+ string(5) "world"
+}
+array(2) {
+ [3]=>
+ string(5) "hello"
+ [4]=>
+ string(4) "test"
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_assoc_variation2.phpt b/ext/standard/tests/array/array_diff_assoc_variation2.phpt
new file mode 100644
index 000000000..5de94424e
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation2.phpt
@@ -0,0 +1,235 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - unexpected values for 'arr1' argument
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of arr1 that have values which are not present
+ * in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * pass array_diff_assoc arguments which are not arrays in place of $arr2
+ */
+
+echo "\n*** Testing array_diff_assoc() : usage variations ***\n";
+
+$array = array(1, 2, 3);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+//array of unexpected values to be passed to $arr1 argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // binary data
+/*21*/ b"binary",
+ (binary)"binary",
+
+ // object data
+/*23*/ new classA(),
+
+ // undefined data
+/*24*/ @$undefined_var,
+
+ // unset data
+/*25*/ @$unset_var,
+
+ // resource variable
+/*26*/ $fp,
+);
+
+// loop through each element of $inputs to check the behavior of array_diff_assoc
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_diff_assoc($array, $input));
+ $iterator++;
+};
+fclose($fp);
+echo "Done";
+?>
+
+--EXPECTF--
+
+*** Testing array_diff_assoc() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 26 --
+
+Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_assoc_variation3.phpt b/ext/standard/tests/array/array_diff_assoc_variation3.phpt
new file mode 100644
index 000000000..1d4aaf2e4
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation3.phpt
@@ -0,0 +1,206 @@
+--TEST--
+Test array_diff_assoc() function : variation - array containing different data types
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of arr1 that have values which are not present
+ * in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff_assoc() compares indexed arrays containing different data types
+ */
+
+echo "\n*** Testing array_diff_assoc() : usage variations ***\n";
+
+$array = array(1, 2, 3);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+//array of different data types to be passed to $arr1 argument
+$inputs = array(
+
+ // int data
+/*1*/
+'int' => array(
+ 0,
+ 1,
+ 12345,
+ -2345),
+
+ // float data
+/*2*/
+'float' => array(
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5),
+
+ // null data
+/*3*/
+'null' => array(
+ NULL,
+ null),
+
+ // boolean data
+/*4*/
+'bool' => array(
+ true,
+ false,
+ TRUE,
+ FALSE),
+
+ // empty data
+/*5*/
+'empty' => array(
+ "",
+ ''),
+
+ // string data
+/*6*/
+'string' => array(
+ "string",
+ 'string',
+ $heredoc),
+
+ // binary data
+/*7*/
+'binary' => array(
+ b"binary",
+ (binary)"binary"),
+
+ // object data
+/*8*/
+'object' => array(
+ new classA()),
+
+ // undefined data
+/*9*/
+'undefined' => array(
+ @$undefined_var),
+
+ // unset data
+/*10*/
+'unset' => array(
+ @$unset_var),
+);
+
+// loop through each element of $inputs to check the behavior of array_diff_assoc
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_diff_assoc($input, $array));
+ $iterator++;
+};
+echo "Done";
+?>
+--EXPECTF--
+
+*** Testing array_diff_assoc() : usage variations ***
+
+-- Iteration 1 --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(12345)
+ [3]=>
+ int(-2345)
+}
+
+-- Iteration 2 --
+array(5) {
+ [0]=>
+ float(10.5)
+ [1]=>
+ float(-10.5)
+ [2]=>
+ float(123456789000)
+ [3]=>
+ float(1.23456789E-9)
+ [4]=>
+ float(0.5)
+}
+
+-- Iteration 3 --
+array(2) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+}
+
+-- Iteration 4 --
+array(3) {
+ [1]=>
+ bool(false)
+ [2]=>
+ bool(true)
+ [3]=>
+ bool(false)
+}
+
+-- Iteration 5 --
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+}
+
+-- Iteration 6 --
+array(3) {
+ [0]=>
+ string(6) "string"
+ [1]=>
+ string(6) "string"
+ [2]=>
+ string(11) "hello world"
+}
+
+-- Iteration 7 --
+array(2) {
+ [0]=>
+ string(6) "binary"
+ [1]=>
+ string(6) "binary"
+}
+
+-- Iteration 8 --
+array(1) {
+ [0]=>
+ object(classA)#%d (0) {
+ }
+}
+
+-- Iteration 9 --
+array(1) {
+ [0]=>
+ NULL
+}
+
+-- Iteration 10 --
+array(1) {
+ [0]=>
+ NULL
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_assoc_variation4.phpt b/ext/standard/tests/array/array_diff_assoc_variation4.phpt
new file mode 100644
index 000000000..34e979ab2
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation4.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - arrays with different data types as keys
+--FILE--
+
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of arr1 that have values which are not present
+ * in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff_assoc() compares arrays containing different data types
+ * as keys
+ */
+
+echo "\n*** Testing array_diff_assoc() : usage variations ***\n";
+
+$array = array(1, 2, 3);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+//Different data types as keys to be passed to $arr1 argument
+$inputs = array(
+
+ // int data
+/*1*/
+'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative'),
+
+ // float data
+/*2*/
+'float' => array(
+ 10.5 => 'float 1',
+ -10.5 => 'float 2',
+ .5 => 'float 3'),
+
+ // null data
+/*3*/
+'null' => array(
+ NULL => 'null 1',
+ null => 'null 2'),
+
+ // boolean data
+/*4*/
+'bool' => array(
+ true => 'boolt',
+ false => 'boolf',
+ TRUE => 'boolT',
+ FALSE => 'boolF'),
+
+ // empty data
+/*5*/
+'empty' => array(
+ "" => 'emptyd',
+ '' => 'emptys'),
+
+ // string data
+/*6*/
+'string' => array(
+ "string" => 'stringd',
+ 'string' => 'strings',
+ $heredoc => 'stringh'),
+
+ // binary data
+/*7*/
+'binary' => array(
+ b"binary1" => 'binary 1',
+ (binary)"binary2" => 'binary 2'),
+
+ // undefined data
+/*8*/
+'undefined' => array(
+ @$undefined_var => 'undefined'),
+
+ // unset data
+/*9*/
+'unset' => array(
+ @$unset_var => 'unset'),
+
+);
+
+// loop through each element of $inputs to check the behavior of array_diff_assoc
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_diff_assoc($input, $array));
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+
+*** Testing array_diff_assoc() : usage variations ***
+
+-- Iteration 1 --
+array(4) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [12345]=>
+ string(8) "positive"
+ [-2345]=>
+ string(8) "negative"
+}
+
+-- Iteration 2 --
+array(3) {
+ [10]=>
+ string(7) "float 1"
+ [-10]=>
+ string(7) "float 2"
+ [0]=>
+ string(7) "float 3"
+}
+
+-- Iteration 3 --
+array(1) {
+ [""]=>
+ string(6) "null 2"
+}
+
+-- Iteration 4 --
+array(2) {
+ [1]=>
+ string(5) "boolT"
+ [0]=>
+ string(5) "boolF"
+}
+
+-- Iteration 5 --
+array(1) {
+ [""]=>
+ string(6) "emptys"
+}
+
+-- Iteration 6 --
+array(2) {
+ ["string"]=>
+ string(7) "strings"
+ ["hello world"]=>
+ string(7) "stringh"
+}
+
+-- Iteration 7 --
+array(2) {
+ ["binary1"]=>
+ string(8) "binary 1"
+ ["binary2"]=>
+ string(8) "binary 2"
+}
+
+-- Iteration 8 --
+array(1) {
+ [""]=>
+ string(9) "undefined"
+}
+
+-- Iteration 9 --
+array(1) {
+ [""]=>
+ string(5) "unset"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_assoc_variation5.phpt b/ext/standard/tests/array/array_diff_assoc_variation5.phpt
new file mode 100644
index 000000000..c89c65642
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation5.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - compare integers, floats and strings
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of arr1 that have values which are not present
+ * in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff_assoc compares integers, floats and string
+ */
+
+echo "*** Testing array_diff_assoc() : usage variations ***\n";
+$arr_default_int = array(1, 2, 3, 'a');
+$arr_float = array(0 => 1.00, 1.00 => 2.00, 2.00 => 3.00, 'b');
+$arr_string = array('1', '2', '3', 'c');
+$arr_string_float = array('0' => '1.00', '1.00' => '2.00', '2.00' => '3.00', 'd');
+
+echo "-- Result of comparing integers and floating point numbers: --\n";
+var_dump(array_diff_assoc($arr_default_int, $arr_float));
+var_dump(array_diff_assoc($arr_float, $arr_default_int));
+
+echo "-- Result of comparing integers and strings containing an integers : --\n";
+var_dump(array_diff_assoc($arr_default_int, $arr_string));
+var_dump(array_diff_assoc($arr_string, $arr_default_int));
+
+echo "-- Result of comparing integers and strings containing floating points : --\n";
+var_dump(array_diff_assoc($arr_default_int, $arr_string_float));
+var_dump(array_diff_assoc($arr_string_float, $arr_default_int));
+
+echo "-- Result of comparing floating points and strings containing integers : --\n";
+var_dump(array_diff_assoc($arr_float, $arr_string));
+var_dump(array_diff_assoc($arr_string, $arr_float));
+
+echo "-- Result of comparing floating points and strings containing floating point: --\n";
+var_dump(array_diff_assoc($arr_float, $arr_string_float));
+var_dump(array_diff_assoc($arr_string_float, $arr_float));
+
+echo "-- Result of comparing strings containing integers and strings containing floating points : --\n";
+var_dump(array_diff_assoc($arr_string, $arr_string_float));
+var_dump(array_diff_assoc($arr_string_float, $arr_string));
+
+echo "-- Result of comparing more than two arrays: --\n";
+var_dump(array_diff_assoc($arr_default_int, $arr_float, $arr_string, $arr_string_float));
+
+echo "Done";
+?>
+--EXPECTF--
+
+*** Testing array_diff_assoc() : usage variations ***
+-- Result of comparing integers and floating point numbers: --
+array(1) {
+ [3]=>
+ string(1) "a"
+}
+array(1) {
+ [3]=>
+ string(1) "b"
+}
+-- Result of comparing integers and strings containing an integers : --
+array(1) {
+ [3]=>
+ string(1) "a"
+}
+array(1) {
+ [3]=>
+ string(1) "c"
+}
+-- Result of comparing integers and strings containing floating points : --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ string(1) "a"
+}
+array(4) {
+ [0]=>
+ string(4) "1.00"
+ ["1.00"]=>
+ string(4) "2.00"
+ ["2.00"]=>
+ string(4) "3.00"
+ [1]=>
+ string(1) "d"
+}
+-- Result of comparing floating points and strings containing integers : --
+array(1) {
+ [3]=>
+ string(1) "b"
+}
+array(1) {
+ [3]=>
+ string(1) "c"
+}
+-- Result of comparing floating points and strings containing floating point: --
+array(4) {
+ [0]=>
+ float(1)
+ [1]=>
+ float(2)
+ [2]=>
+ float(3)
+ [3]=>
+ string(1) "b"
+}
+array(4) {
+ [0]=>
+ string(4) "1.00"
+ ["1.00"]=>
+ string(4) "2.00"
+ ["2.00"]=>
+ string(4) "3.00"
+ [1]=>
+ string(1) "d"
+}
+-- Result of comparing strings containing integers and strings containing floating points : --
+array(4) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ string(1) "2"
+ [2]=>
+ string(1) "3"
+ [3]=>
+ string(1) "c"
+}
+array(4) {
+ [0]=>
+ string(4) "1.00"
+ ["1.00"]=>
+ string(4) "2.00"
+ ["2.00"]=>
+ string(4) "3.00"
+ [1]=>
+ string(1) "d"
+}
+-- Result of comparing more than two arrays: --
+array(1) {
+ [3]=>
+ string(1) "a"
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_assoc_variation6.phpt b/ext/standard/tests/array/array_diff_assoc_variation6.phpt
new file mode 100644
index 000000000..d6190b658
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation6.phpt
@@ -0,0 +1,196 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - strict string comparison check
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff_assoc behaves
+ * 1. When comparing an array that has similar elements
+ * but has been created in a different order
+ * 2. When doing a strict comparison of string representation
+ */
+
+echo "*** Testing array_diff_assoc() : usage variations ***\n";
+
+$array = array ('zero',
+ 1 => 1,
+ 'two' => 2.00000000000001);
+
+$inputs = array (
+
+//default keys => string values
+/*1*/ array('2.00000000000001', '1', 'zero', 'a'),
+
+//numeric keys => string values
+/*2*/ array(2 => '2.00000000000001',
+ 1 => '1',
+ 0 => 'zero',
+ 3 => 'a'),
+
+//string keys => string values
+/*3*/ array('2' => '2.00000000000001',
+ '1' => '1',
+ '0' => 'zero',
+ '3' => 'a') ,
+
+//default keys => numeric values
+/*4*/ array(2, 1, 0),
+
+//numeric keys => numeric values
+/*5*/ array(2 => 2,
+ 1 => 1,
+ 0 => 0),
+
+//string keys => numeric values
+/*6*/ array('two' => 2,
+ '1' => 1,
+ '0' => 0),
+
+//defualt keys => float values
+/*7*/ array(2.00000000000001, 1.00, 0.01E-9),
+
+//numeric keys => float values
+/*8*/ array(2 => 2.00000000000001,
+ 1 => 1.00,
+ 0 => 0.01E-9),
+
+//string keys => float values
+/*9*/ array ('two' => 2.00000000000001,
+ '1' => 1.00,
+ '0' =>0.01E-9)
+);
+
+// loop through each element of $inputs to check the behavior of array_diff_assoc
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(array_diff_assoc($array, $input));
+ var_dump(array_diff_assoc($input, $array));
+ $iterator++;
+};
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff_assoc() : usage variations ***
+
+-- Iteration 1 --
+array(2) {
+ [0]=>
+ string(4) "zero"
+ ["two"]=>
+ float(2)
+}
+array(3) {
+ [0]=>
+ string(16) "2.00000000000001"
+ [2]=>
+ string(4) "zero"
+ [3]=>
+ string(1) "a"
+}
+
+-- Iteration 2 --
+array(1) {
+ ["two"]=>
+ float(2)
+}
+array(2) {
+ [2]=>
+ string(16) "2.00000000000001"
+ [3]=>
+ string(1) "a"
+}
+
+-- Iteration 3 --
+array(1) {
+ ["two"]=>
+ float(2)
+}
+array(2) {
+ [2]=>
+ string(16) "2.00000000000001"
+ [3]=>
+ string(1) "a"
+}
+
+-- Iteration 4 --
+array(2) {
+ [0]=>
+ string(4) "zero"
+ ["two"]=>
+ float(2)
+}
+array(2) {
+ [0]=>
+ int(2)
+ [2]=>
+ int(0)
+}
+
+-- Iteration 5 --
+array(2) {
+ [0]=>
+ string(4) "zero"
+ ["two"]=>
+ float(2)
+}
+array(2) {
+ [2]=>
+ int(2)
+ [0]=>
+ int(0)
+}
+
+-- Iteration 6 --
+array(1) {
+ [0]=>
+ string(4) "zero"
+}
+array(1) {
+ [0]=>
+ int(0)
+}
+
+-- Iteration 7 --
+array(2) {
+ [0]=>
+ string(4) "zero"
+ ["two"]=>
+ float(2)
+}
+array(2) {
+ [0]=>
+ float(2)
+ [2]=>
+ float(1.0E-11)
+}
+
+-- Iteration 8 --
+array(2) {
+ [0]=>
+ string(4) "zero"
+ ["two"]=>
+ float(2)
+}
+array(2) {
+ [2]=>
+ float(2)
+ [0]=>
+ float(1.0E-11)
+}
+
+-- Iteration 9 --
+array(1) {
+ [0]=>
+ string(4) "zero"
+}
+array(1) {
+ [0]=>
+ float(1.0E-11)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_assoc_variation7.phpt b/ext/standard/tests/array/array_diff_assoc_variation7.phpt
new file mode 100644
index 000000000..6fab0aebf
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation7.phpt
@@ -0,0 +1,101 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - arrays containing referenced variables
+--FILE--
+
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments but do additional checks whether the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Tests how array_diff_assoc compares
+ * 1. Referenced variables
+ * 2. Arrays that have been referenced to each other
+ */
+
+echo "*** Testing array_diff_assoc() : usage variations ***\n";
+
+$a = 'a';
+
+$arr1 = array('a', 'b', 'c', $a);
+$arr2 = array('a' => 1, 'b' => 2, 'c' => 3, &$a);
+
+echo "-- Results when \$a = $a: --\n";
+var_dump(array_diff_assoc($arr1, $arr2));
+var_dump(array_diff_assoc($arr2, $arr1));
+
+$a = 4;
+
+echo "-- Results when \$a has been changed to $a: --\n";
+var_dump(array_diff_assoc($arr1, $arr2));
+var_dump(array_diff_assoc($arr2, $arr1));
+
+$arr2 = &$arr1;
+
+echo "-- Results when \$arr2 is referenced to \$arr1 --\n";
+var_dump(array_diff_assoc($arr1, $arr2));
+var_dump(array_diff_assoc($arr2, $arr1));
+
+$arr1 = array('zero' => 'x', 'one' => 'y', 'two' => 'z');
+
+echo "-- Results when \$arr1 is changed --\n";
+var_dump(array_diff_assoc($arr1, $arr2));
+var_dump(array_diff_assoc($arr2, $arr1));
+
+echo "Done";
+?>
+
+--EXPECTF--
+
+*** Testing array_diff_assoc() : usage variations ***
+-- Results when $a = a: --
+array(3) {
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ [3]=>
+ string(1) "a"
+}
+array(3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+}
+-- Results when $a has been changed to 4: --
+array(4) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ [3]=>
+ string(1) "a"
+}
+array(4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ [0]=>
+ &int(4)
+}
+-- Results when $arr2 is referenced to $arr1 --
+array(0) {
+}
+array(0) {
+}
+-- Results when $arr1 is changed --
+array(0) {
+}
+array(0) {
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_assoc_variation8.phpt b/ext/standard/tests/array/array_diff_assoc_variation8.phpt
new file mode 100644
index 000000000..3189c11f2
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation8.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - array containing duplicate keys and values
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments but do additional checks whether
+ * the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff_assoc() behaves when comparing:
+ * 1. the order of the array
+ * 2. duplicate values
+ * 3. duplicate key names
+ */
+
+echo "*** Testing array_diff_assoc() : variation ***\n";
+
+$array_index = array('a', 'b', 'c', 0 => 'd', 'b'); //duplicate key (0), duplicate value (b)
+$array_assoc = array ('2' => 'c', //same key=>value pair, different order
+ '1' => 'b',
+ '0' => 'a',
+ 'b' => '3', //key and value from array_index swapped
+ 'c' => 2); //same as above, using integer
+
+var_dump(array_diff_assoc($array_index, $array_assoc));
+var_dump(array_diff_assoc($array_assoc, $array_index));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff_assoc() : variation ***
+array(2) {
+ [0]=>
+ string(1) "d"
+ [3]=>
+ string(1) "b"
+}
+array(3) {
+ [0]=>
+ string(1) "a"
+ ["b"]=>
+ string(1) "3"
+ ["c"]=>
+ int(2)
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_assoc_variation9.phpt b/ext/standard/tests/array/array_diff_assoc_variation9.phpt
new file mode 100644
index 000000000..5ab623265
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_assoc_variation9.phpt
@@ -0,0 +1,141 @@
+--TEST--
+Test array_diff_assoc() function : usage variations - compare multidimensional arrays
+--FILE--
+<?php
+/* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments but do additional checks whether
+ * the keys are equal
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff_assoc behaves when comparing
+ * multi-dimensional arrays
+ */
+
+echo "*** Testing array_diff_assoc() : usage variations ***\n";
+
+$array1 = array('sub_array1' => array (1, 2, 3),
+ 'sub_array2' => array ('a', 'b', 'c'));
+$array2 = array('sub_arraya' => array (1, 3, 5),
+ 'sub_arrayb' => array ('a', 'z', 'y'));
+
+echo "-- Compare two 2-D arrays --\n";
+var_dump(array_diff_assoc($array1, $array2));
+var_dump(array_diff_assoc($array2, $array1));
+
+echo "\n-- Compare subarrays from two 2-D arrays --\n";
+var_dump(array_diff_assoc($array1['sub_array1'], $array2['sub_arraya']));
+var_dump(array_diff_assoc($array2['sub_arraya'], $array1['sub_array1']));
+var_dump(array_diff_assoc($array1['sub_array2'], $array2['sub_arrayb']));
+var_dump(array_diff_assoc($array2['sub_arrayb'], $array1['sub_array1']));
+
+echo "\n-- Compare a subarray from one 2-D array and one 2-D array --\n";
+var_dump(array_diff_assoc($array1['sub_array1'], $array2));
+var_dump(array_diff_assoc($array1, $array2['sub_arraya']));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff_assoc() : usage variations ***
+-- Compare two 2-D arrays --
+array(2) {
+ ["sub_array1"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["sub_array2"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+array(2) {
+ ["sub_arraya"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(3)
+ [2]=>
+ int(5)
+ }
+ ["sub_arrayb"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "z"
+ [2]=>
+ string(1) "y"
+ }
+}
+
+-- Compare subarrays from two 2-D arrays --
+array(2) {
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+array(2) {
+ [1]=>
+ int(3)
+ [2]=>
+ int(5)
+}
+array(2) {
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+}
+array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "z"
+ [2]=>
+ string(1) "y"
+}
+
+-- Compare a subarray from one 2-D array and one 2-D array --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+array(2) {
+ ["sub_array1"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["sub_array2"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_basic.phpt b/ext/standard/tests/array/array_diff_basic.phpt
new file mode 100644
index 000000000..30aead657
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_basic.phpt
@@ -0,0 +1,116 @@
+--TEST--
+Test array_diff() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not present
+ * in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of array_diff
+ */
+
+echo "*** Testing array_diff() : basic functionality ***\n";
+
+//Test indexed array with integers as elements
+$array_int1 = array (1, 2, 3, 4);
+$array_int2 = array (3, 4, 5, 6);
+
+echo "-- Test indexed array with integers as elements --\n";
+var_dump(array_diff($array_int1, $array_int2));
+var_dump(array_diff($array_int2, $array_int1));
+
+
+//Test indexed array with strings as elements
+$array_string1 = array ('one', 'two', 'three', 'four');
+$array_string2 = array ('three', 'four', 'five', 'six');
+
+echo "-- Test indexed array with strings as elements --\n";
+var_dump(array_diff($array_string1, $array_string2));
+var_dump(array_diff($array_string2, $array_string1));
+
+//Test associative array with strings as keys and integers as elements
+$array_assoc_int1 = array ('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4);
+$array_assoc_int2 = array ('three' => 3, 'four' => 4, 'five' => 5, 'six' => 6);
+
+echo "-- Test associative array with strings as keys and integers as elements --\n";
+var_dump(array_diff($array_assoc_int1, $array_assoc_int2));
+var_dump(array_diff($array_assoc_int2, $array_assoc_int1));
+
+//Test associative array with strings as keys and elements
+$array_assoc_str1 = array ('one' => 'un', 'two' => 'deux', 'three' => 'trois', 'four' => 'quatre');
+$array_assoc_str2 = array ('three' => 'trois', 'four' => 'quatre', 'five' => 'cinq', 'six' => 'six');
+
+echo "-- Test associative array with strings as keys and integers as elements --\n";
+var_dump(array_diff($array_assoc_str1, $array_assoc_str2));
+var_dump(array_diff($array_assoc_str2, $array_assoc_str1));
+
+echo "-- Test array_diff with more than 2 arguments --\n";
+var_dump(array_diff($array_int1, $array_int2, $array_string1, $array_string2));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : basic functionality ***
+-- Test indexed array with integers as elements --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+array(2) {
+ [2]=>
+ int(5)
+ [3]=>
+ int(6)
+}
+-- Test indexed array with strings as elements --
+array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+}
+array(2) {
+ [2]=>
+ string(4) "five"
+ [3]=>
+ string(3) "six"
+}
+-- Test associative array with strings as keys and integers as elements --
+array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(2) {
+ ["five"]=>
+ int(5)
+ ["six"]=>
+ int(6)
+}
+-- Test associative array with strings as keys and integers as elements --
+array(2) {
+ ["one"]=>
+ string(2) "un"
+ ["two"]=>
+ string(4) "deux"
+}
+array(2) {
+ ["five"]=>
+ string(4) "cinq"
+ ["six"]=>
+ string(3) "six"
+}
+-- Test array_diff with more than 2 arguments --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_error.phpt b/ext/standard/tests/array/array_diff_error.phpt
new file mode 100644
index 000000000..2e4e86f08
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_error.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test array_diff() function : error conditions - too few arguments passed to function
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are
+ * not present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_diff with less than the expected number of arguments
+ */
+
+echo "*** Testing array_diff() : error conditions ***\n";
+// Zero arguments
+echo "\n-- Testing array_diff() function with zero arguments --\n";
+var_dump( array_diff() );
+
+
+// Testing array_diff with one less than the expected number of arguments
+echo "\n-- Testing array_diff() function with less than expected no. of arguments --\n";
+$arr1 = array(1, 2);
+var_dump( array_diff($arr1) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : error conditions ***
+
+-- Testing array_diff() function with zero arguments --
+
+Warning: Wrong parameter count for array_diff() in %s on line %d
+NULL
+
+-- Testing array_diff() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for array_diff() in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_key_basic.phpt b/ext/standard/tests/array/array_diff_key_basic.phpt
new file mode 100644
index 000000000..6f6fcb9a4
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_key_basic.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Test array_diff_key() : basic functionality
+--FILE--
+<?php
+/*
+* proto array array_diff_key(array arr1, array arr2 [, array ...])
+* Function is implemented in ext/standard/array.c
+*/
+$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
+$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
+var_dump(array_diff_key($array1, $array2));
+?>
+--EXPECT--
+array(2) {
+ ["red"]=>
+ int(2)
+ ["purple"]=>
+ int(4)
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_key_variation1.phpt b/ext/standard/tests/array/array_diff_key_variation1.phpt
new file mode 100644
index 000000000..00da7afa9
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_key_variation1.phpt
@@ -0,0 +1,89 @@
+--TEST--
+array_diff_key() : type variations
+--FILE--
+<?php
+/*
+* proto array array_diff_key(array arr1, array arr2 [, array ...])
+* Function is implemented in ext/standard/array.c
+*/
+/*
+* Testing how array_diff_key treats keys that are numbers, floating point numbers or strings.
+*/
+$arr1 = array(1 => 'a', 2 => 'b', 3 => 'c', 'key1' => 'value');
+$arr2 = array(1.00 => 'a', 2.00 => 'b', 3.00 => 'c', 'key2' => 'value');
+$arr3 = array('1' => 'a', '2' => 'b', '3' => 'c', 'key3' => 'value');
+$arr4 = array('1.00' => 'a', '2.00' => 'b', '3.00' => 'c', 'key4' => 'value'); //$arr4 looks different to the other three arrays.
+print "Result of comparing integers and floating point value:\n"; //1 and 1.00 are treated as the same thing
+print_r(array_diff_key($arr1, $arr2));
+print_r(array_diff_key($arr2, $arr1));
+print "Result of comparing integers and strings containing an integers:\n"; //1 and the string 1 are treated as the same thing
+print_r(array_diff_key($arr1, $arr3));
+print_r(array_diff_key($arr3, $arr1));
+print "Result of comparing integers and strings containing floating points:\n"; //1 and the string 1.00 are not treated as the same thing
+print_r(array_diff_key($arr1, $arr4));
+print_r(array_diff_key($arr4, $arr1));
+print "Result of comparing floating points and strings containing integers:\n";
+print_r(array_diff_key($arr2, $arr3)); //1.00 and the string 1 are treated as the same thing
+print_r(array_diff_key($arr3, $arr2));
+print "Result of comparing strings containing integers and strings containing floating points:\n"; //the strings 1 and 1.00 are not treated as the same thing.
+print_r(array_diff_key($arr3, $arr4));
+print_r(array_diff_key($arr4, $arr3));
+?>
+--EXPECTF--
+Result of comparing integers and floating point value:
+Array
+(
+ [key1] => value
+)
+Array
+(
+ [key2] => value
+)
+Result of comparing integers and strings containing an integers:
+Array
+(
+ [key1] => value
+)
+Array
+(
+ [key3] => value
+)
+Result of comparing integers and strings containing floating points:
+Array
+(
+ [1] => a
+ [2] => b
+ [3] => c
+ [key1] => value
+)
+Array
+(
+ [1.00] => a
+ [2.00] => b
+ [3.00] => c
+ [key4] => value
+)
+Result of comparing floating points and strings containing integers:
+Array
+(
+ [key2] => value
+)
+Array
+(
+ [key3] => value
+)
+Result of comparing strings containing integers and strings containing floating points:
+Array
+(
+ [1] => a
+ [2] => b
+ [3] => c
+ [key3] => value
+)
+Array
+(
+ [1.00] => a
+ [2.00] => b
+ [3.00] => c
+ [key4] => value
+)
diff --git a/ext/standard/tests/array/array_diff_uassoc_basic.phpt b/ext/standard/tests/array/array_diff_uassoc_basic.phpt
new file mode 100644
index 000000000..6a96be6b7
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_uassoc_basic.phpt
@@ -0,0 +1,28 @@
+--TEST--
+array_diff_uassoc(): Basic test
+--FILE--
+<?php
+/*
+* array array_diff_uassoc ( array $array1, array $array2 [, array $..., callback $key_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+function key_compare_func($a, $b) {
+ if ($a === $b) {
+ return 0;
+ }
+ return ($a > $b) ? 1 : -1;
+}
+$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
+$array2 = array("a" => "green", "yellow", "red");
+$result = array_diff_uassoc($array1, $array2, "key_compare_func");
+var_dump($result);
+?>
+--EXPECT--
+array(3) {
+ ["b"]=>
+ string(5) "brown"
+ ["c"]=>
+ string(4) "blue"
+ [0]=>
+ string(3) "red"
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_ukey_basic.phpt b/ext/standard/tests/array/array_diff_ukey_basic.phpt
new file mode 100644
index 000000000..7ac309a01
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_ukey_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+array_diff_ukey() : Basic test.
+--FILE--
+<?php
+/*
+* proto array array_diff_ukey ( array $array1, array $array2 [, array $ ..., callback $key_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+function key_compare_func($key1, $key2) {
+ if ($key1 == $key2) return 0;
+ else if ($key1 > $key2) return 1;
+ else return -1;
+}
+$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
+$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
+var_dump(array_diff_ukey($array1, $array2, 'key_compare_func'));
+?>
+--EXPECT--
+array(2) {
+ ["red"]=>
+ int(2)
+ ["purple"]=>
+ int(4)
+}
diff --git a/ext/standard/tests/array/array_diff_variation1.phpt b/ext/standard/tests/array/array_diff_variation1.phpt
new file mode 100644
index 000000000..f9a34b0a5
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation1.phpt
@@ -0,0 +1,208 @@
+--TEST--
+Test array_diff() function : usage variations - unexpected values for 'arr1' argument
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_diff by passing non array values in place of $arr1
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+$array = array(1, 2, 3);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // binary data
+/*21*/ b"binary",
+ (binary)"binary",
+
+ // object data
+/*23*/ new classA(),
+
+ // undefined data
+/*24*/ @$undefined_var,
+
+ // unset data
+/*25*/ @$unset_var,
+
+ // resource variable
+/*26*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_diff
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --";
+ var_dump( array_diff($input, $array));
+ $iterator++;
+};
+
+fclose($fp);
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+
+-- Iteration 1 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 19 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 25 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 26 --
+Warning: array_diff(): Argument #1 is not an array in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_variation10.phpt b/ext/standard/tests/array/array_diff_variation10.phpt
new file mode 100644
index 000000000..9442b946d
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation10.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test array_diff() function : usage variations - binary safe checking
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are
+ * not present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test behaviour of array_diff() function with binary input
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+
+$array1 = array( b"1",
+ b"hello",
+ "world",
+ "str1" => "hello",
+ "str2" => "world");
+
+$array2 = array( b"1" => 'hello',
+ b"world",
+ "hello",
+ 'test');
+
+var_dump(array_diff($array1, $array2));
+var_dump(array_diff($array2, $array1));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+array(1) {
+ [0]=>
+ string(1) "1"
+}
+array(1) {
+ [4]=>
+ string(4) "test"
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_variation2.phpt b/ext/standard/tests/array/array_diff_variation2.phpt
new file mode 100644
index 000000000..be68c40c2
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation2.phpt
@@ -0,0 +1,207 @@
+--TEST--
+Test array_diff() function : usage variations - unexpected values for 'arr2' argument
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are
+ * not present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_diff by passing non array values in place of $arr2
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+$array = array(1, 2, 3);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // binary data
+/*21*/ b"binary",
+ (binary)"binary",
+
+ // object data
+/*23*/ new classA(),
+
+ // undefined data
+/*24*/ @$undefined_var,
+
+ // unset data
+/*25*/ @$unset_var,
+
+ // resource variable
+/*26*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_diff
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --";
+ var_dump( array_diff($array, $input));
+ $iterator++;
+};
+fclose($fp);
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+
+-- Iteration 1 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 19 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 25 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 26 --
+Warning: array_diff(): Argument #2 is not an array in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_variation3.phpt b/ext/standard/tests/array/array_diff_variation3.phpt
new file mode 100644
index 000000000..84f73fd28
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation3.phpt
@@ -0,0 +1,190 @@
+--TEST--
+Test array_diff() function : usage variations - array with different data types as values
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff() compares indexed arrays containing different
+ * data types as values in place of $arr1
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$array = array(1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//get heredoc
+$heredoc = <<<END
+This is a heredoc
+END;
+
+//array of values to iterate over
+$values = array(
+
+/*1*/"empty array" => array(),
+
+/*2*/
+"int" => array(
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345),
+
+/*3*/
+"float" => array(
+ // float data
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5),
+
+/*4*/
+"null" => array(
+ // null data
+ NULL,
+ null),
+
+/*5*/
+"boolean" => array(
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE),
+
+/*6*/
+"empty" => array(
+ // empty data
+ "",
+ ''),
+
+/*7*/
+"string" => array(
+ // string data
+ "string",
+ 'string',
+ $heredoc),
+
+/*8*/
+"binary" => array(
+ // binary data
+ b"binary",
+ (binary)"binary"),
+
+/*9*/
+"undefined" => array(
+ // undefined data
+ @$undefined_var),
+
+/*10*/
+"unset" => array(
+ // unset data
+ @$unset_var)
+);
+
+// loop through each element of the array for arr1
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n Iteration: $iterator \n";
+ var_dump( array_diff($value, $array) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+
+ Iteration: 1
+array(0) {
+}
+
+ Iteration: 2
+array(3) {
+ [0]=>
+ int(0)
+ [2]=>
+ int(12345)
+ [3]=>
+ int(-2345)
+}
+
+ Iteration: 3
+array(5) {
+ [0]=>
+ float(10.5)
+ [1]=>
+ float(-10.5)
+ [2]=>
+ float(123456789000)
+ [3]=>
+ float(1.23456789E-9)
+ [4]=>
+ float(0.5)
+}
+
+ Iteration: 4
+array(2) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+}
+
+ Iteration: 5
+array(2) {
+ [1]=>
+ bool(false)
+ [3]=>
+ bool(false)
+}
+
+ Iteration: 6
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+}
+
+ Iteration: 7
+array(3) {
+ [0]=>
+ string(6) "string"
+ [1]=>
+ string(6) "string"
+ [2]=>
+ string(17) "This is a heredoc"
+}
+
+ Iteration: 8
+array(2) {
+ [0]=>
+ string(6) "binary"
+ [1]=>
+ string(6) "binary"
+}
+
+ Iteration: 9
+array(1) {
+ [0]=>
+ NULL
+}
+
+ Iteration: 10
+array(1) {
+ [0]=>
+ NULL
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_variation4.phpt b/ext/standard/tests/array/array_diff_variation4.phpt
new file mode 100644
index 000000000..75b01adaa
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation4.phpt
@@ -0,0 +1,184 @@
+--TEST--
+Test array_diff() function : usage variations - array with different data types as values
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff() compares indexed arrays containing different
+ * data types as values in place of $arr2
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$array = array(1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//get heredoc
+$heredoc = <<<END
+This is a heredoc
+END;
+
+//array of values to iterate over
+$values = array(
+
+/*1*/"empty array" => array(),
+
+/*2*/
+"int" => array(
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345),
+
+/*3*/
+"float" => array(
+ // float data
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5),
+
+/*4*/
+"null" => array(
+ // null data
+ NULL,
+ null),
+
+/*5*/
+"boolean" => array(
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE),
+
+/*6*/
+"empty" => array(
+ // empty data
+ "",
+ ''),
+
+/*7*/
+"string" => array(
+ // string data
+ "string",
+ 'string',
+ $heredoc),
+
+/*8*/
+"binary" => array(
+ // binary data
+ b"binary",
+ (binary)"binary"),
+
+/*9*/
+"undefined" => array(
+ // undefined data
+ @$undefined_var),
+
+/*10*/
+"unset" => array(
+ // unset data
+ @$unset_var)
+);
+
+// loop through each element of the array for $arr2
+$iterator = 1;
+foreach($values as $value) {
+ echo "\n Iteration: $iterator \n";
+ var_dump( array_diff($array, $value) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+
+ Iteration: 1
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+ Iteration: 2
+array(1) {
+ [1]=>
+ int(2)
+}
+
+ Iteration: 3
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+ Iteration: 4
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+ Iteration: 5
+array(1) {
+ [1]=>
+ int(2)
+}
+
+ Iteration: 6
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+ Iteration: 7
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+ Iteration: 8
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+ Iteration: 9
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+ Iteration: 10
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_variation5.phpt b/ext/standard/tests/array/array_diff_variation5.phpt
new file mode 100644
index 000000000..cb6b5d3da
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation5.phpt
@@ -0,0 +1,119 @@
+--TEST--
+Test array_diff() function : usage variations - comparing integers, float
+and string array values
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff compares integers, floats and strings
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+$arr_int = array(1, 2, 3);
+$arr_float = array(1.00, 2.00, 3.00);
+$arr_int_str = array('1', '2', '3');
+$arr_float_str = array('1.00', '2.00', '3.00');
+
+print "-- Compare integers and floats: --\n";
+var_dump(array_diff($arr_int, $arr_float));
+var_dump(array_diff($arr_float, $arr_int));
+
+
+print "-- Compare integers and strings containing an integers: --\n";
+var_dump(array_diff($arr_int, $arr_int_str));
+var_dump(array_diff($arr_int_str, $arr_int));
+
+print "-- Compare integers and strings containing floats: --\n";
+var_dump(array_diff($arr_int, $arr_float_str));
+var_dump(array_diff($arr_float_str, $arr_int));
+
+print "-- Compare floats and strings containing integers: --\n";
+
+var_dump(array_diff($arr_float, $arr_int_str));
+var_dump(array_diff($arr_int_str, $arr_float));
+
+print "-- Compare floats and strings containing floats: --\n";
+var_dump(array_diff($arr_float, $arr_float_str));
+var_dump(array_diff($arr_float_str, $arr_float));
+
+print "-- Compare strings containing integers and strings containing floats: --\n";
+var_dump(array_diff($arr_int_str, $arr_float_str));
+var_dump(array_diff($arr_float_str, $arr_int_str));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+-- Compare integers and floats: --
+array(0) {
+}
+array(0) {
+}
+-- Compare integers and strings containing an integers: --
+array(0) {
+}
+array(0) {
+}
+-- Compare integers and strings containing floats: --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+array(3) {
+ [0]=>
+ string(4) "1.00"
+ [1]=>
+ string(4) "2.00"
+ [2]=>
+ string(4) "3.00"
+}
+-- Compare floats and strings containing integers: --
+array(0) {
+}
+array(0) {
+}
+-- Compare floats and strings containing floats: --
+array(3) {
+ [0]=>
+ float(1)
+ [1]=>
+ float(2)
+ [2]=>
+ float(3)
+}
+array(3) {
+ [0]=>
+ string(4) "1.00"
+ [1]=>
+ string(4) "2.00"
+ [2]=>
+ string(4) "3.00"
+}
+-- Compare strings containing integers and strings containing floats: --
+array(3) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ string(1) "2"
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ string(4) "1.00"
+ [1]=>
+ string(4) "2.00"
+ [2]=>
+ string(4) "3.00"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_variation6.phpt b/ext/standard/tests/array/array_diff_variation6.phpt
new file mode 100644
index 000000000..8ea84bb9d
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation6.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test array_diff() function : usage variations - array containing duplicate keys and values
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test that array_diff behaves as expected for comparing:
+ * 1. the order of the array
+ * 2. duplicate values
+ * 3. duplicate key names
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+$array_index = array('a', 'b', 'c', 0 => 'd', 'b'); //duplicate key (0), duplicate value (b)
+$array_assoc = array ('2' => 'c', //same key=>value pair, different order
+ '1' => 'b',
+ '0' => 'a',
+ 'b' => '3', //key and value from array_index swapped
+ 'c' => 2); //same as above, using integer
+
+var_dump(array_diff($array_index, $array_assoc));
+var_dump(array_diff($array_assoc, $array_index));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+array(1) {
+ [0]=>
+ string(1) "d"
+}
+array(3) {
+ [0]=>
+ string(1) "a"
+ ["b"]=>
+ string(1) "3"
+ ["c"]=>
+ int(2)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_variation7.phpt b/ext/standard/tests/array/array_diff_variation7.phpt
new file mode 100644
index 000000000..c53cbb3d1
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation7.phpt
@@ -0,0 +1,95 @@
+--TEST--
+Test array_diff() function : usage variations - arrays containing referenced variables
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are not
+ * present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff compares arrays that
+ * 1. Contain referenced variables
+ * 2. Have been referenced to each other
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+$a = 'a';
+
+$arr1 = array ("&$a", 'b', 'c');
+$arr2 = array (1, 2, 3);
+echo "-- Basic Comparison --\n";
+var_dump(array_diff($arr1, $arr2));
+var_dump(array_diff($arr2, $arr1));
+
+$a = 1;
+
+echo "-- \$a changed --\n";
+var_dump(array_diff($arr1, $arr2));
+var_dump(array_diff($arr2, $arr1));
+
+
+$arr2 = &$arr1;
+echo "-- Arrays referenced to each other --\n";
+var_dump(array_diff($arr1, $arr2));
+var_dump(array_diff($arr2, $arr1));
+
+
+$arr1 = array('x', 'y', 'z');
+echo "-- \$arr1 changed --\n";
+var_dump(array_diff($arr1, $arr2));
+var_dump(array_diff($arr2, $arr1));
+
+
+echo "Done";
+?>
+
+--EXPECTF--
+
+*** Testing array_diff() : usage variations ***
+-- Basic Comparison --
+array(3) {
+ [0]=>
+ string(2) "&a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+-- $a changed --
+array(3) {
+ [0]=>
+ string(2) "&a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+-- Arrays referenced to each other --
+array(0) {
+}
+array(0) {
+}
+-- $arr1 changed --
+array(0) {
+}
+array(0) {
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_diff_variation8.phpt b/ext/standard/tests/array/array_diff_variation8.phpt
new file mode 100644
index 000000000..99f9614d7
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation8.phpt
@@ -0,0 +1,207 @@
+--TEST--
+Test array_diff() function : usage variations - associative arrays contianing different data types
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of $arr1 that have values which are
+ * not present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_diff() with associative arrays containing different data types as values
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+$array = array('a' => '1', 'b' => '2', 'c' => '3');
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// associative arrays with different values
+$inputs = array (
+ // arrays with integer values
+/*1*/ array('0' => 0, '1' => 0),
+ array("one" => 1, 'two' => 2, "three" => 1, 4 => 1),
+
+ // arrays with float values
+/*3*/ array("float1" => 2.3333, "float2" => 2.3333),
+ array("f1" => 1.2, 'f2' => 3.33, 3 => 4.89999922839999, 'f4' => 1.2),
+
+ // arrays with string values
+/*5*/ array(111 => "\tHello", "red" => "col\tor", 2 => "\v\fworld", 3.3 => "\tHello"),
+ array(111 => '\tHello', "red" => 'col\tor', 2 => '\v\fworld', 3.3 => '\tHello'),
+ array(1 => "hello", "heredoc" => $heredoc, $heredoc),
+
+ // array with object, unset variable and resource variable
+/*8*/ array(11 => new classA(), "unset" => @$unset_var, "resource" => $fp, new classA(), $fp),
+);
+
+// loop through each sub-array of $inputs to check the behavior of array_unique()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_diff($array, $input) );
+ var_dump( array_diff($input, $array) );
+ $iterator++;
+}
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+-- Iteration 1 --
+array(3) {
+ ["a"]=>
+ string(1) "1"
+ ["b"]=>
+ string(1) "2"
+ ["c"]=>
+ string(1) "3"
+}
+array(2) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(0)
+}
+-- Iteration 2 --
+array(1) {
+ ["c"]=>
+ string(1) "3"
+}
+array(0) {
+}
+-- Iteration 3 --
+array(3) {
+ ["a"]=>
+ string(1) "1"
+ ["b"]=>
+ string(1) "2"
+ ["c"]=>
+ string(1) "3"
+}
+array(2) {
+ ["float1"]=>
+ float(2.3333)
+ ["float2"]=>
+ float(2.3333)
+}
+-- Iteration 4 --
+array(3) {
+ ["a"]=>
+ string(1) "1"
+ ["b"]=>
+ string(1) "2"
+ ["c"]=>
+ string(1) "3"
+}
+array(4) {
+ ["f1"]=>
+ float(1.2)
+ ["f2"]=>
+ float(3.33)
+ [3]=>
+ float(4.8999992284)
+ ["f4"]=>
+ float(1.2)
+}
+-- Iteration 5 --
+array(3) {
+ ["a"]=>
+ string(1) "1"
+ ["b"]=>
+ string(1) "2"
+ ["c"]=>
+ string(1) "3"
+}
+array(4) {
+ [111]=>
+ string(6) " Hello"
+ ["red"]=>
+ string(6) "col or"
+ [2]=>
+ string(7) " world"
+ [3]=>
+ string(6) " Hello"
+}
+-- Iteration 6 --
+array(3) {
+ ["a"]=>
+ string(1) "1"
+ ["b"]=>
+ string(1) "2"
+ ["c"]=>
+ string(1) "3"
+}
+array(4) {
+ [111]=>
+ string(7) "\tHello"
+ ["red"]=>
+ string(7) "col\tor"
+ [2]=>
+ string(9) "\v\fworld"
+ [3]=>
+ string(7) "\tHello"
+}
+-- Iteration 7 --
+array(3) {
+ ["a"]=>
+ string(1) "1"
+ ["b"]=>
+ string(1) "2"
+ ["c"]=>
+ string(1) "3"
+}
+array(3) {
+ [1]=>
+ string(5) "hello"
+ ["heredoc"]=>
+ string(11) "Hello world"
+ [2]=>
+ string(11) "Hello world"
+}
+-- Iteration 8 --
+array(3) {
+ ["a"]=>
+ string(1) "1"
+ ["b"]=>
+ string(1) "2"
+ ["c"]=>
+ string(1) "3"
+}
+array(5) {
+ [11]=>
+ object(classA)#%d (0) {
+ }
+ ["unset"]=>
+ NULL
+ ["resource"]=>
+ resource(%d) of type (stream)
+ [12]=>
+ object(classA)#%d (0) {
+ }
+ [13]=>
+ resource(%d) of type (stream)
+}
+Done
diff --git a/ext/standard/tests/array/array_diff_variation9.phpt b/ext/standard/tests/array/array_diff_variation9.phpt
new file mode 100644
index 000000000..58d9c201b
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_variation9.phpt
@@ -0,0 +1,100 @@
+--TEST--
+Test array_diff() function : usage variations - multidimensional arrays
+--FILE--
+<?php
+/* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
+ * Description: Returns the entries of arr1 that have values which are
+ * not present in any of the others arguments.
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_diff() compares multidimensional arrays
+ */
+
+echo "*** Testing array_diff() : usage variations ***\n";
+
+$array1 = array('sub_array1' => array (1, 2, 3),
+ 'sub_array2' => array ('a', 'b', 'c'));
+$array2 = array('sub_arraya' => array (1, 3, 5),
+ 'sub_arrayb' => array ('a', 'z', 'y'));
+
+echo "-- Compare two 2-D arrays --\n";
+var_dump(array_diff($array1, $array2));
+var_dump(array_diff($array2, $array1));
+
+echo "\n-- Compare subarrays from two 2-D arrays --\n";
+var_dump(array_diff($array1['sub_array1'], $array2['sub_arraya']));
+var_dump(array_diff($array2['sub_arraya'], $array1['sub_array1']));
+
+var_dump(array_diff($array1['sub_array2'], $array2['sub_arrayb']));
+var_dump(array_diff($array2['sub_arrayb'], $array1['sub_array1']));
+
+echo "\n-- Compare a subarray from one 2-D array and one 2-D array --\n";
+var_dump(array_diff($array1['sub_array1'], $array2));
+var_dump(array_diff($array1, $array2['sub_arraya']));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_diff() : usage variations ***
+-- Compare two 2-D arrays --
+array(0) {
+}
+array(0) {
+}
+
+-- Compare subarrays from two 2-D arrays --
+array(1) {
+ [1]=>
+ int(2)
+}
+array(1) {
+ [2]=>
+ int(5)
+}
+array(2) {
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+}
+array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "z"
+ [2]=>
+ string(1) "y"
+}
+
+-- Compare a subarray from one 2-D array and one 2-D array --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+array(2) {
+ ["sub_array1"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["sub_array2"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_intersect_key_basic.phpt b/ext/standard/tests/array/array_intersect_key_basic.phpt
new file mode 100644
index 000000000..fc6e177f5
--- /dev/null
+++ b/ext/standard/tests/array/array_intersect_key_basic.phpt
@@ -0,0 +1,19 @@
+--TEST--
+array_intersect_key(): Basic Test
+--FILE--
+<?php
+/*
+* proto array array_intersect_key(array arr1, array arr2 [, array ...])
+* Function is implemented in ext/standard/array.c
+*/
+$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
+$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
+var_dump(array_intersect_key($array1, $array2));
+?>
+--EXPECT--
+array(2) {
+ ["blue"]=>
+ int(1)
+ ["green"]=>
+ int(3)
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_intersect_uassoc_basic.phpt b/ext/standard/tests/array/array_intersect_uassoc_basic.phpt
new file mode 100644
index 000000000..1a2d57ec3
--- /dev/null
+++ b/ext/standard/tests/array/array_intersect_uassoc_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+array_intersect_uassoc(): Basic test
+--FILE--
+<?php
+/*
+* array array_intersect_uassoc ( array $array1, array $array2 [, array $..., callback $key_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+function key_compare_func($a, $b) {
+ if ($a === $b) {
+ return 0;
+ }
+ return ($a > $b) ? 1 : -1;
+}
+$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
+$array2 = array("a" => "green", "yellow", "red");
+$result = array_intersect_uassoc($array1, $array2, "key_compare_func");
+var_dump($result);
+?>
+--EXPECT--
+array(1) {
+ ["a"]=>
+ string(5) "green"
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_intersect_ukey_basic.phpt b/ext/standard/tests/array/array_intersect_ukey_basic.phpt
new file mode 100644
index 000000000..db21b9b01
--- /dev/null
+++ b/ext/standard/tests/array/array_intersect_ukey_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+array_intersect_ukey(): Basic test.
+--FILE--
+<?php
+/*
+* proto array array_intersect_ukey ( array $array1, array $array2 [, array $ ..., callback $key_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+function key_compare_func($key1, $key2) {
+ if ($key1 == $key2) return 0;
+ else if ($key1 > $key2) return 1;
+ else return -1;
+}
+$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
+$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
+var_dump(array_intersect_ukey($array1, $array2, 'key_compare_func'));
+?>
+--EXPECT--
+array(2) {
+ ["blue"]=>
+ int(1)
+ ["green"]=>
+ int(3)
+}
diff --git a/ext/standard/tests/array/array_key_exists_basic.phpt b/ext/standard/tests/array/array_key_exists_basic.phpt
new file mode 100644
index 000000000..6fbd415dc
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_basic.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Test array_key_exists() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Test basic functionality of array_key_exists()
+ */
+
+echo "*** Testing array_key_exists() : basic functionality ***\n";
+
+$key1 = 'key';
+$key2 = 'val';
+$search = array('one', 'key' => 'value', 'val');
+var_dump(array_key_exists($key1, $search));
+var_dump(array_key_exists($key2, $search));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_key_exists() : basic functionality ***
+bool(true)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_error.phpt b/ext/standard/tests/array/array_key_exists_error.phpt
new file mode 100644
index 000000000..f87d2199e
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test array_key_exists() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Pass incorrect number of arguments to array_key_exists() to test behaviour
+ */
+
+echo "*** Testing array_key_exists() : error conditions ***\n";
+
+//Test array_key_exists with one more than the expected number of arguments
+echo "\n-- Testing array_key_exists() function with more than expected no. of arguments --\n";
+$key = 1;
+$search = array(1, 2);
+$extra_arg = 10;
+var_dump( array_key_exists($key, $search, $extra_arg) );
+
+// Testing array_key_exists with one less than the expected number of arguments
+echo "\n-- Testing array_key_exists() function with less than expected no. of arguments --\n";
+$key = 1;
+var_dump( array_key_exists($key) );
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : error conditions ***
+
+-- Testing array_key_exists() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for array_key_exists() in %s on line %d
+NULL
+
+-- Testing array_key_exists() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for array_key_exists() in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_object1.phpt b/ext/standard/tests/array/array_key_exists_object1.phpt
new file mode 100644
index 000000000..6c85f5389
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_object1.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Test array_key_exists() function : object functionality
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Test basic functionality of array_key_exists() with objects
+ */
+
+echo "*** Testing array_key_exists() : object functionality ***\n";
+
+class myClass {
+ var $var1;
+ var $var2;
+ var $var3;
+
+ function __construct($a, $b, $c = null) {
+ $this->var1 = $a;
+ $this->var2 = $b;
+ if (!is_null($c)) {
+ $this->var3 = $c;
+ }
+ }
+}
+
+echo "\n-- Do not assign a value to \$class1->var3 --\n";
+$class1 = new myClass ('a', 'b');
+echo "\$key = var1:\n";
+var_dump(array_key_exists('var1', $class1));
+echo "\$key = var3:\n";
+var_dump(array_key_exists('var3', $class1));
+echo "\$class1:\n";
+var_dump($class1);
+
+echo "\n-- Assign a value to \$class2->var3 --\n";
+$class2 = new myClass('x', 'y', 'z');
+echo "\$key = var3:\n";
+var_dump(array_key_exists('var3', $class2));
+echo "\$class2:\n";
+var_dump($class2);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : object functionality ***
+
+-- Do not assign a value to $class1->var3 --
+$key = var1:
+bool(true)
+$key = var3:
+bool(true)
+$class1:
+object(myClass)#%d (3) {
+ ["var1"]=>
+ string(1) "a"
+ ["var2"]=>
+ string(1) "b"
+ ["var3"]=>
+ NULL
+}
+
+-- Assign a value to $class2->var3 --
+$key = var3:
+bool(true)
+$class2:
+object(myClass)#%d (3) {
+ ["var1"]=>
+ string(1) "x"
+ ["var2"]=>
+ string(1) "y"
+ ["var3"]=>
+ string(1) "z"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_object2.phpt b/ext/standard/tests/array/array_key_exists_object2.phpt
new file mode 100644
index 000000000..07c93b2f8
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_object2.phpt
@@ -0,0 +1,84 @@
+--TEST--
+Test array_key_exists() function : object functionality - different visibilities
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Pass array_key_exists() an object with private and protected properties
+ */
+
+echo "*** Testing array_key_exists() : object functionality ***\n";
+
+class myClass {
+ public $var1;
+ protected $var2;
+ private $var3;
+
+ function __construct($a, $b, $c = null) {
+ $this->var1 = $a;
+ $this->var2 = $b;
+ if (!is_null($c)) {
+ $this->var3 = $c;
+ }
+ }
+}
+
+echo "\n-- Do not assign a value to \$class1->var3 --\n";
+$class1 = new myClass ('a', 'b');
+echo "\$key = var1:\n";
+var_dump(array_key_exists('var1', $class1));
+echo "\$key = var2:\n";
+var_dump(array_key_exists('var2', $class1));
+echo "\$key = var3:\n";
+var_dump(array_key_exists('var3', $class1));
+echo "\$class1:\n";
+var_dump($class1);
+
+echo "\n-- Assign a value to \$class2->var3 --\n";
+$class2 = new myClass('x', 'y', 'z');
+echo "\$key = var3:\n";
+var_dump(array_key_exists('var3', $class2));
+echo "\$class2:\n";
+var_dump($class2);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : object functionality ***
+
+-- Do not assign a value to $class1->var3 --
+$key = var1:
+bool(true)
+$key = var2:
+bool(false)
+$key = var3:
+bool(false)
+$class1:
+object(myClass)#%d (3) {
+ ["var1"]=>
+ string(1) "a"
+ ["var2:protected"]=>
+ string(1) "b"
+ ["var3:private"]=>
+ NULL
+}
+
+-- Assign a value to $class2->var3 --
+$key = var3:
+bool(false)
+$class2:
+object(myClass)#%d (3) {
+ ["var1"]=>
+ string(1) "x"
+ ["var2:protected"]=>
+ string(1) "y"
+ ["var3:private"]=>
+ string(1) "z"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_variation1.phpt b/ext/standard/tests/array/array_key_exists_variation1.phpt
new file mode 100644
index 000000000..2f50d3e86
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_variation1.phpt
@@ -0,0 +1,203 @@
+--TEST--
+Test array_key_exists() function : usage variations - Pass different data types as $key arg
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Pass different data types as $key argument to array_key_exists() to test behaviour
+ */
+
+echo "*** Testing array_key_exists() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$search = array ('zero', 'key' => 'val', 'two');
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "key";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+key
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $key argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "key",
+ 'key',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_key_exists()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_key_exists($input, $search) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : usage variations ***
+
+-- Iteration 1 --
+bool(true)
+
+-- Iteration 2 --
+bool(true)
+
+-- Iteration 3 --
+bool(false)
+
+-- Iteration 4 --
+bool(false)
+
+-- Iteration 5 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+bool(true)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_variation2.phpt b/ext/standard/tests/array/array_key_exists_variation2.phpt
new file mode 100644
index 000000000..0804006f6
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_variation2.phpt
@@ -0,0 +1,225 @@
+--TEST--
+Test array_key_exists() function : usage variations - Pass differnt data types to $search arg
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Pass different data types as $search argument to array_key_exists() to test behaviour
+ */
+
+echo "*** Testing array_key_exists() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$key = 'val';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $search argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_key_exists()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_key_exists($key, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+
+-- Iteration 25 --
+
+Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_variation3.phpt b/ext/standard/tests/array/array_key_exists_variation3.phpt
new file mode 100644
index 000000000..e8a52a705
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_variation3.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test array_key_exists() function : usage variations - floats and casting to ints
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Pass floats as $key argument, then cast float values
+ * to integers and pass as $key argument
+ */
+
+echo "*** Testing array_key_exists() : usage variations ***\n";
+
+$keys = array(1.2345678900E-10, 1.00000000000001, 1.99999999999999);
+
+$search = array ('zero', 'one', 'two');
+
+$iterator = 1;
+foreach($keys as $key) {
+ echo "\n-- Iteration $iterator --\n";
+ echo "Pass float as \$key:\n";
+ var_dump(array_key_exists($key, $search));
+ echo "Cast float to int:\n";
+ var_dump(array_key_exists((int)$key, $search));
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : usage variations ***
+
+-- Iteration 1 --
+Pass float as $key:
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+Cast float to int:
+bool(true)
+
+-- Iteration 1 --
+Pass float as $key:
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+Cast float to int:
+bool(true)
+
+-- Iteration 1 --
+Pass float as $key:
+
+Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
+bool(false)
+Cast float to int:
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_variation4.phpt b/ext/standard/tests/array/array_key_exists_variation4.phpt
new file mode 100644
index 000000000..edc39269a
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_variation4.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test array_key_exists() function : usage variations - referenced variables
+--INI--
+allow_call_time_pass_reference=on
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Pass referenced variables as arguments to array_key_exists() to test behaviour
+ */
+
+echo "*** Testing array_key_exists() : usage variations ***\n";
+
+$array = array('one' => 1, 'two' => 2, 'three' => 3);
+
+echo "\n-- \$search is a reference to \$array --\n";
+$search = &$array;
+var_dump(array_key_exists('one', $search));
+
+echo "\n-- \$key is a referenced variable --\n";
+$key = 'two';
+var_dump(array_key_exists(&$key, $array));
+
+echo "\n-- Both arguments are referenced variables --\n";
+var_dump(array_key_exists(&$key, &$array));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : usage variations ***
+
+-- $search is a reference to $array --
+bool(true)
+
+-- $key is a referenced variable --
+bool(true)
+
+-- Both arguments are referenced variables --
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_key_exists_variation5.phpt b/ext/standard/tests/array/array_key_exists_variation5.phpt
new file mode 100644
index 000000000..9c15759fc
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_variation5.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test array_key_exists() function : usage variations - multidimensional arrays
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Test how array_key_exists() behaves with multi-dimensional arrays
+ */
+
+echo "*** Testing array_key_exists() : usage variations ***\n";
+
+$multi_array = array ('zero' => 'val1',
+ 'one' => 'val2',
+ 'sub1' => array (1, 2, 3));
+
+echo "\n-- Attempt to match key in sub-array --\n";
+// this key is in the sub-array
+var_dump(array_key_exists(0, $multi_array));
+
+echo "\n-- \$search arg points to sub-array --\n";
+var_dump(array_key_exists(0, $multi_array['sub1']));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : usage variations ***
+
+-- Attempt to match key in sub-array --
+bool(false)
+
+-- $search arg points to sub-array --
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_variation6.phpt b/ext/standard/tests/array/array_key_exists_variation6.phpt
new file mode 100644
index 000000000..d19e58e76
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_variation6.phpt
@@ -0,0 +1,96 @@
+--TEST--
+Test array_key_exists() function : usage variations - equality test for certain data types
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Pass certain data types that can be taken as a key in an array
+ * and test whether array_key_exists(() thinks they are equal and therefore
+ * returns true when searching for them
+ */
+
+echo "*** Testing array_key_exists() : usage variations ***\n";
+
+$unset = 10;
+unset($unset);
+$array = array ('null' => null,
+ 'NULL' => NULL,
+ 'empty single quoted string' => '',
+ "empty double quoted string" => "",
+ 'undefined variable' => @$undefined,
+ 'unset variable' => @$unset);
+
+//iterate through original array
+foreach($array as $name => $input) {
+ $iterator = 1;
+ echo "\n-- Key in \$search array is : $name --\n";
+ $search[$input] = 'test';
+
+ //iterate through array again to see which values are considered equal
+ foreach($array as $key) {
+ echo "Iteration $iterator: ";
+ var_dump(array_key_exists($key, $search));
+ $iterator++;
+ }
+ $search = null;
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : usage variations ***
+
+-- Key in $search array is : null --
+Iteration 1: bool(true)
+Iteration 2: bool(true)
+Iteration 3: bool(true)
+Iteration 4: bool(true)
+Iteration 5: bool(true)
+Iteration 6: bool(true)
+
+-- Key in $search array is : NULL --
+Iteration 1: bool(true)
+Iteration 2: bool(true)
+Iteration 3: bool(true)
+Iteration 4: bool(true)
+Iteration 5: bool(true)
+Iteration 6: bool(true)
+
+-- Key in $search array is : empty single quoted string --
+Iteration 1: bool(true)
+Iteration 2: bool(true)
+Iteration 3: bool(true)
+Iteration 4: bool(true)
+Iteration 5: bool(true)
+Iteration 6: bool(true)
+
+-- Key in $search array is : empty double quoted string --
+Iteration 1: bool(true)
+Iteration 2: bool(true)
+Iteration 3: bool(true)
+Iteration 4: bool(true)
+Iteration 5: bool(true)
+Iteration 6: bool(true)
+
+-- Key in $search array is : undefined variable --
+Iteration 1: bool(true)
+Iteration 2: bool(true)
+Iteration 3: bool(true)
+Iteration 4: bool(true)
+Iteration 5: bool(true)
+Iteration 6: bool(true)
+
+-- Key in $search array is : unset variable --
+Iteration 1: bool(true)
+Iteration 2: bool(true)
+Iteration 3: bool(true)
+Iteration 4: bool(true)
+Iteration 5: bool(true)
+Iteration 6: bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_variation7.phpt b/ext/standard/tests/array/array_key_exists_variation7.phpt
new file mode 100644
index 000000000..845c1e54b
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_variation7.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test array_key_exists() function : usage variations - position of internal array pointer
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Check the position of the internal array pointer after calling array_key_exists()
+ */
+
+echo "*** Testing array_key_exists() : usage variations ***\n";
+
+$input = array ('one' => 'un', 'two' => 'deux', 'three' => 'trois');
+
+echo "\n-- Call array_key_exists() --\n";
+var_dump($result = array_key_exists('one', $input));
+
+echo "\n-- Position of Internal Pointer in Original Array: --\n";
+echo key($input) . " => " . current ($input) . "\n";
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : usage variations ***
+
+-- Call array_key_exists() --
+bool(true)
+
+-- Position of Internal Pointer in Original Array: --
+one => un
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_key_exists_variation8.phpt b/ext/standard/tests/array/array_key_exists_variation8.phpt
new file mode 100644
index 000000000..d5bad62e2
--- /dev/null
+++ b/ext/standard/tests/array/array_key_exists_variation8.phpt
@@ -0,0 +1,547 @@
+--TEST--
+Test array_key_exists() function : usage variations - array keys are different data types
+--FILE--
+<?php
+/* Prototype : bool array_key_exists(mixed $key, array $search)
+ * Description: Checks if the given key or index exists in the array
+ * Source code: ext/standard/array.c
+ * Alias to functions: key_exists
+ */
+
+/*
+ * Pass an array where the keys are different data types as the $search argument
+ * then pass many different data types as $key argument to test where array_key_exist()
+ * returns true.
+ */
+
+echo "*** Testing array_key_exists() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+string
+EOT;
+
+// different data types to be iterated over
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+ 'extreme floats' => array(
+ 12.3456789000e10 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*3*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*4*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*5*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*6*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*8*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*9*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of array_key_exists()
+$iterator = 1;
+foreach($inputs as $type => $input) {
+ echo "\n-- Iteration $iterator: $type data --\n";
+
+ //iterate over again to get all different key values
+ foreach ($inputs as $new_type => $new_input) {
+ echo "-- \$key arguments are $new_type data:\n";
+ foreach ($new_input as $key => $search) {
+ var_dump(array_key_exists($key, $input));
+ }
+ }
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_key_exists() : usage variations ***
+
+-- Iteration 1: int data --
+-- $key arguments are int data:
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(true)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(true)
+-- $key arguments are null uppercase data:
+bool(false)
+-- $key arguments are null lowercase data:
+bool(false)
+-- $key arguments are bool lowercase data:
+bool(true)
+bool(true)
+-- $key arguments are bool uppercase data:
+bool(true)
+bool(true)
+-- $key arguments are empty double quotes data:
+bool(false)
+-- $key arguments are empty single quotes data:
+bool(false)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(false)
+-- $key arguments are unset data:
+bool(false)
+
+-- Iteration 2: float data --
+-- $key arguments are int data:
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(true)
+bool(true)
+bool(true)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(true)
+-- $key arguments are null uppercase data:
+bool(false)
+-- $key arguments are null lowercase data:
+bool(false)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(true)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(true)
+-- $key arguments are empty double quotes data:
+bool(false)
+-- $key arguments are empty single quotes data:
+bool(false)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(false)
+-- $key arguments are unset data:
+bool(false)
+
+-- Iteration 3: extreme floats data --
+-- $key arguments are int data:
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(true)
+-- $key arguments are extreme floats data:
+bool(true)
+bool(true)
+-- $key arguments are null uppercase data:
+bool(false)
+-- $key arguments are null lowercase data:
+bool(false)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(true)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(true)
+-- $key arguments are empty double quotes data:
+bool(false)
+-- $key arguments are empty single quotes data:
+bool(false)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(false)
+-- $key arguments are unset data:
+bool(false)
+
+-- Iteration 4: null uppercase data --
+-- $key arguments are int data:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(false)
+-- $key arguments are null uppercase data:
+bool(true)
+-- $key arguments are null lowercase data:
+bool(true)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(false)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(false)
+-- $key arguments are empty double quotes data:
+bool(true)
+-- $key arguments are empty single quotes data:
+bool(true)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(true)
+-- $key arguments are unset data:
+bool(true)
+
+-- Iteration 5: null lowercase data --
+-- $key arguments are int data:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(false)
+-- $key arguments are null uppercase data:
+bool(true)
+-- $key arguments are null lowercase data:
+bool(true)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(false)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(false)
+-- $key arguments are empty double quotes data:
+bool(true)
+-- $key arguments are empty single quotes data:
+bool(true)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(true)
+-- $key arguments are unset data:
+bool(true)
+
+-- Iteration 6: bool lowercase data --
+-- $key arguments are int data:
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(true)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(true)
+-- $key arguments are null uppercase data:
+bool(false)
+-- $key arguments are null lowercase data:
+bool(false)
+-- $key arguments are bool lowercase data:
+bool(true)
+bool(true)
+-- $key arguments are bool uppercase data:
+bool(true)
+bool(true)
+-- $key arguments are empty double quotes data:
+bool(false)
+-- $key arguments are empty single quotes data:
+bool(false)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(false)
+-- $key arguments are unset data:
+bool(false)
+
+-- Iteration 7: bool uppercase data --
+-- $key arguments are int data:
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(true)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(true)
+-- $key arguments are null uppercase data:
+bool(false)
+-- $key arguments are null lowercase data:
+bool(false)
+-- $key arguments are bool lowercase data:
+bool(true)
+bool(true)
+-- $key arguments are bool uppercase data:
+bool(true)
+bool(true)
+-- $key arguments are empty double quotes data:
+bool(false)
+-- $key arguments are empty single quotes data:
+bool(false)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(false)
+-- $key arguments are unset data:
+bool(false)
+
+-- Iteration 8: empty double quotes data --
+-- $key arguments are int data:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(false)
+-- $key arguments are null uppercase data:
+bool(true)
+-- $key arguments are null lowercase data:
+bool(true)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(false)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(false)
+-- $key arguments are empty double quotes data:
+bool(true)
+-- $key arguments are empty single quotes data:
+bool(true)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(true)
+-- $key arguments are unset data:
+bool(true)
+
+-- Iteration 9: empty single quotes data --
+-- $key arguments are int data:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(false)
+-- $key arguments are null uppercase data:
+bool(true)
+-- $key arguments are null lowercase data:
+bool(true)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(false)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(false)
+-- $key arguments are empty double quotes data:
+bool(true)
+-- $key arguments are empty single quotes data:
+bool(true)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(true)
+-- $key arguments are unset data:
+bool(true)
+
+-- Iteration 10: string data --
+-- $key arguments are int data:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(false)
+-- $key arguments are null uppercase data:
+bool(false)
+-- $key arguments are null lowercase data:
+bool(false)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(false)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(false)
+-- $key arguments are empty double quotes data:
+bool(false)
+-- $key arguments are empty single quotes data:
+bool(false)
+-- $key arguments are string data:
+bool(true)
+bool(true)
+bool(true)
+-- $key arguments are undefined data:
+bool(false)
+-- $key arguments are unset data:
+bool(false)
+
+-- Iteration 11: undefined data --
+-- $key arguments are int data:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(false)
+-- $key arguments are null uppercase data:
+bool(true)
+-- $key arguments are null lowercase data:
+bool(true)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(false)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(false)
+-- $key arguments are empty double quotes data:
+bool(true)
+-- $key arguments are empty single quotes data:
+bool(true)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(true)
+-- $key arguments are unset data:
+bool(true)
+
+-- Iteration 12: unset data --
+-- $key arguments are int data:
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are float data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are extreme floats data:
+bool(false)
+bool(false)
+-- $key arguments are null uppercase data:
+bool(true)
+-- $key arguments are null lowercase data:
+bool(true)
+-- $key arguments are bool lowercase data:
+bool(false)
+bool(false)
+-- $key arguments are bool uppercase data:
+bool(false)
+bool(false)
+-- $key arguments are empty double quotes data:
+bool(true)
+-- $key arguments are empty single quotes data:
+bool(true)
+-- $key arguments are string data:
+bool(false)
+bool(false)
+bool(false)
+-- $key arguments are undefined data:
+bool(true)
+-- $key arguments are unset data:
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_map.phpt b/ext/standard/tests/array/array_map.phpt
deleted file mode 100644
index 78815e083..000000000
--- a/ext/standard/tests/array/array_map.phpt
+++ /dev/null
@@ -1,423 +0,0 @@
---TEST--
-Test array_map() function
---FILE--
-<?php
-/* Prototype: array array_map ( callback $callback, array $arr1 [, array $...] );
- Description: array_map() returns an array containing all the elements of arr1
- after applying the callback function to each one. The number of
- parameters that the callback function accepts should match the
- number of arrays passed to the array_map()
-*/
-
-echo "*** Testing basic operations ***\n";
-/* array_map with null as function and different arrays */
-var_dump( array_map(NULL, array()) );
-var_dump( array_map(NULL, array(), array()) );
-var_dump( array_map(NULL, array(1,2,3), array(1,2,3)) );
-var_dump( array_map(NULL, array(1,2), array(1,2,3,4)) );
-var_dump( array_map(NULL, array("Jan", "Feb", "March"), array("31","28","31")) );
-var_dump( array_map(NULL, array("Text", "Words", "Lineup"), array(4, 5, 6)) );
-var_dump( array_map(NULL, array("a", "ab", "abc", "abcd"), array()) );
-var_dump( array_map(NULL,
- array("Jan"=>"01", "Feb"=>"02", "March"=>"03"),
- array("31"=>"Jan", "28"=>"Feb", "031"=>"March")
- )
- );
-
-/* using key as "string" where no.of arguments passed to array_map() is 2 */
-var_dump( array_map( create_function('$n', 'return $n*$n;'),
- array("key1"=>1, "key2"=>2, "key3"=>3)
- )
- );
-
-echo "\n*** Testing possible variations ***\n";
-/* anonymous callback function */
-var_dump( array_map( create_function('$a,$b', 'return $a+$b;'),
- array(1,2,3),
- array(5,6,7,8,9)
- )
- );
-
-/* anonymous callback function with reference */
-var_dump( array_map( create_function('&$a, $b', 'return array($a,$b);'),
- array("Hello","Good"),
- array("World","Day")
- )
- );
-
-/* callback function with reference */
-$a = array(1,2,3);
-function square(&$var) {
- return( $var * $var );
-}
-print_r( array_map('square', $a) );
-
-/* array_map in recursion */
-function square_recur($var) {
- if (is_array($var))
- return array_map('square_recur', $var);
- return $var * $var;
-}
-$rec_array = array(1, 2, array(3, 4, array(5, 2), array() ) );
-var_dump( array_map('square_recur', $rec_array) );
-
-/* callback function as string variable containing the function name */
-$string_var = "square";
-var_dump( array_map("square", $a) );
-var_dump( array_map($string_var, $a) );
-
-echo "\n*** Testing error conditions ***\n";
-/* arguments of non array type */
-$int_var=10;
-$float_var = 10.5;
-var_dump( array_map('square', $int_var) );
-var_dump( array_map('square', $float_var) );
-var_dump( array_map('square', $string_var) );
-
-/* Zero argument */
-var_dump( array_map() );
-
-/* use array(), echo(), empty(), eval(), exit(), isset(), list(), print()
- and unset() as callback, failure expected */
-var_dump( array_map( 'echo', array(1) ) );
-var_dump( array_map( 'array', array(1) ) );
-var_dump( array_map( 'empty', array(1) ) );
-var_dump( array_map( 'eval', array(1) ) );
-var_dump( array_map( 'exit', array(1) ) );
-var_dump( array_map( 'isset', array(1) ) );
-var_dump( array_map( 'list', array(1) ) );
-var_dump( array_map( 'print', array(1) ) );
-
-
-echo "\n*** Testing operation on objects ***\n";
-/* array_map with class object */
-class check_array_map {
- public static function helloWorld() {
- return "Static_Function_helloWorld(): Hello World";
- }
- public function Message($v) {
- return $v;
- }
-
- public static function Square( $n ) {
- return $n * $n;
- }
-}
-/* call static member function */
-var_dump( array_map( array('check_array_map', 'Square'), array(1,2,3)) );
-
-/* call non static member function - notice should be issues*/
-var_dump( array_map( array('check_array_map', 'Message'), array(1)) );
-
-/* call function using object */
-$obj = new check_array_map();
-var_dump( array_map( array($obj, 'helloWorld' ) ) ); // not enough args warning
-var_dump( array_map( array($obj, 'helloWorld'), array(1) ) );
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing basic operations ***
-array(0) {
-}
-array(0) {
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(2)
- }
- [2]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(3)
- }
-}
-array(4) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(2)
- }
- [2]=>
- array(2) {
- [0]=>
- NULL
- [1]=>
- int(3)
- }
- [3]=>
- array(2) {
- [0]=>
- NULL
- [1]=>
- int(4)
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(3) "Jan"
- [1]=>
- string(2) "31"
- }
- [1]=>
- array(2) {
- [0]=>
- string(3) "Feb"
- [1]=>
- string(2) "28"
- }
- [2]=>
- array(2) {
- [0]=>
- string(5) "March"
- [1]=>
- string(2) "31"
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(4) "Text"
- [1]=>
- int(4)
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "Words"
- [1]=>
- int(5)
- }
- [2]=>
- array(2) {
- [0]=>
- string(6) "Lineup"
- [1]=>
- int(6)
- }
-}
-array(4) {
- [0]=>
- array(2) {
- [0]=>
- string(1) "a"
- [1]=>
- NULL
- }
- [1]=>
- array(2) {
- [0]=>
- string(2) "ab"
- [1]=>
- NULL
- }
- [2]=>
- array(2) {
- [0]=>
- string(3) "abc"
- [1]=>
- NULL
- }
- [3]=>
- array(2) {
- [0]=>
- string(4) "abcd"
- [1]=>
- NULL
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(2) "01"
- [1]=>
- string(3) "Jan"
- }
- [1]=>
- array(2) {
- [0]=>
- string(2) "02"
- [1]=>
- string(3) "Feb"
- }
- [2]=>
- array(2) {
- [0]=>
- string(2) "03"
- [1]=>
- string(5) "March"
- }
-}
-array(3) {
- ["key1"]=>
- int(1)
- ["key2"]=>
- int(4)
- ["key3"]=>
- int(9)
-}
-
-*** Testing possible variations ***
-array(5) {
- [0]=>
- int(6)
- [1]=>
- int(8)
- [2]=>
- int(10)
- [3]=>
- int(8)
- [4]=>
- int(9)
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(5) "Hello"
- [1]=>
- string(5) "World"
- }
- [1]=>
- array(2) {
- [0]=>
- string(4) "Good"
- [1]=>
- string(3) "Day"
- }
-}
-Array
-(
- [0] => 1
- [1] => 4
- [2] => 9
-)
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(4)
- [2]=>
- array(4) {
- [0]=>
- int(9)
- [1]=>
- int(16)
- [2]=>
- array(2) {
- [0]=>
- int(25)
- [1]=>
- int(4)
- }
- [3]=>
- array(0) {
- }
- }
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(4)
- [2]=>
- int(9)
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(4)
- [2]=>
- int(9)
-}
-
-*** Testing error conditions ***
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d
-NULL
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d
-NULL
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d
-NULL
-
-Warning: Wrong parameter count for array_map() %s on line %d
-NULL
-
-Warning: array_map(): The first argument, 'echo', should be either NULL or a valid callback in %s on line %d
-NULL
-
-Warning: array_map(): The first argument, 'array', should be either NULL or a valid callback in %s on line %d
-NULL
-
-Warning: array_map(): The first argument, 'empty', should be either NULL or a valid callback in %s on line %d
-NULL
-
-Warning: array_map(): The first argument, 'eval', should be either NULL or a valid callback in %s on line %d
-NULL
-
-Warning: array_map(): The first argument, 'exit', should be either NULL or a valid callback in %s on line %d
-NULL
-
-Warning: array_map(): The first argument, 'isset', should be either NULL or a valid callback in %s on line %d
-NULL
-
-Warning: array_map(): The first argument, 'list', should be either NULL or a valid callback in %s on line %d
-NULL
-
-Warning: array_map(): The first argument, 'print', should be either NULL or a valid callback in %s on line %d
-NULL
-
-*** Testing operation on objects ***
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(4)
- [2]=>
- int(9)
-}
-
-Strict Standards: Non-static method check_array_map::Message() cannot be called statically in %s on line %d
-
-Strict Standards: Non-static method check_array_map::Message() cannot be called statically in %s on line %d
-array(1) {
- [0]=>
- int(1)
-}
-
-Warning: Wrong parameter count for array_map() in %s on line %d
-NULL
-array(1) {
- [0]=>
- string(41) "Static_Function_helloWorld(): Hello World"
-}
-Done
diff --git a/ext/standard/tests/array/array_map_basic.phpt b/ext/standard/tests/array/array_map_basic.phpt
new file mode 100644
index 000000000..53a7bb4e2
--- /dev/null
+++ b/ext/standard/tests/array/array_map_basic.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test array_map() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+echo "*** Testing array_map() : basic functionality ***\n";
+
+function multiply($p, $q) {
+ return ($p * $q);
+}
+
+function square($p) {
+ return ($p * $p);
+}
+
+function concatenate($a, $b) {
+ return "$a = $b";
+}
+
+// integer array
+$arr1 = array(1, 2, 3);
+$arr2 = array(4, 5, 6);
+
+echo "-- With two integer array --\n";
+var_dump( array_map('multiply', $arr1, $arr2) );
+
+echo "-- With single integer array --\n";
+var_dump( array_map('square', $arr1) );
+
+// string array
+$arr1 = array("one", "two");
+$arr2 = array("single", "double");
+
+echo "-- With string array --\n";
+var_dump( array_map('concatenate', $arr1, $arr2) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : basic functionality ***
+-- With two integer array --
+array(3) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(10)
+ [2]=>
+ int(18)
+}
+-- With single integer array --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+ [2]=>
+ int(9)
+}
+-- With string array --
+array(2) {
+ [0]=>
+ string(12) "one = single"
+ [1]=>
+ string(12) "two = double"
+}
+Done
diff --git a/ext/standard/tests/array/array_map_error.phpt b/ext/standard/tests/array/array_map_error.phpt
new file mode 100644
index 000000000..a1c93d0fc
--- /dev/null
+++ b/ext/standard/tests/array/array_map_error.phpt
@@ -0,0 +1,73 @@
+--TEST--
+Test array_map() function : error conditions
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+echo "*** Testing array_map() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing array_map() function with Zero arguments --\n";
+var_dump( array_map() );
+
+// Testing array_map with one less than the expected number of arguments
+echo "\n-- Testing array_map() function with one less than expected no. of arguments --\n";
+function callback1() {
+ return 1;
+}
+var_dump( array_map('callback1') );
+
+echo "\n-- Testing array_map() function with less no. of arrays than callback function arguments --\n";
+$arr1 = array(1, 2);
+function callback2($p, $q) {
+ return $p * $q;
+}
+var_dump( array_map('callback2', $arr1) );
+
+echo "\n-- Testing array_map() function with more no. of arrays than callback function arguments --\n";
+$arr2 = array(3, 4);
+$arr3 = array(5, 6);
+var_dump( array_map('callback2', $arr1, $arr2, $arr3) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : error conditions ***
+
+-- Testing array_map() function with Zero arguments --
+
+Warning: Wrong parameter count for array_map() in %s on line %d
+NULL
+
+-- Testing array_map() function with one less than expected no. of arguments --
+
+Warning: Wrong parameter count for array_map() in %s on line %d
+NULL
+
+-- Testing array_map() function with less no. of arrays than callback function arguments --
+
+Warning: Missing argument 2 for callback2() in %s on line %d
+
+Notice: Undefined variable: q in %s on line %d
+
+Warning: Missing argument 2 for callback2() in %s on line %d
+
+Notice: Undefined variable: q in %s on line %d
+array(2) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(0)
+}
+
+-- Testing array_map() function with more no. of arrays than callback function arguments --
+array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(8)
+}
+Done
diff --git a/ext/standard/tests/array/array_map_object1.phpt b/ext/standard/tests/array/array_map_object1.phpt
new file mode 100644
index 000000000..1265e3a74
--- /dev/null
+++ b/ext/standard/tests/array/array_map_object1.phpt
@@ -0,0 +1,200 @@
+--TEST--
+Test array_map() function : usage variations - object functionality
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Testing array_map() for object functionalities:
+ * 1) simple class with variable and method
+ * 2) class without members
+ * 3) class with only one method and no variable
+ * 4) abstract and child class
+ * 5) class with static and final members
+ * 6) interface and implemented class
+ */
+echo "*** Testing array_map() : object functionality ***\n";
+
+echo "-- simple class with public variable and method --\n";
+class SimpleClass
+{
+ public $var1 = 1;
+ public function square($n) {
+ return $n * $n;
+ }
+}
+var_dump( array_map(array('SimpleClass', 'square'), array(1, 2)) );
+
+echo "\n-- simple class with private variable and method --\n";
+class SimpleClassPri
+{
+ private $var1 = 10;
+ private function add($n) {
+ return $var + $n;
+ }
+}
+var_dump( array_map(array('SimpleClassPri', 'add'), array(1)) );
+
+echo "\n-- simple class with protected variable and method --\n";
+class SimpleClassPro
+{
+ protected $var1 = 5;
+ protected function mul($n) {
+ return $var1 * $n;
+ }
+}
+var_dump( array_map(array('SimpleClassPro', 'mul'), array(2)) );
+
+echo "\n-- class without members --";
+class EmptyClass
+{
+}
+var_dump( array_map(array('EmptyClass'), array(1, 2)) );
+
+echo "\n-- abstract class --";
+abstract class AbstractClass
+{
+ protected $var2 = 5;
+ abstract function emptyFunction();
+}
+
+// class deriving the above abstract class
+class ChildClass extends AbstractClass
+{
+ private $var3;
+ public function emptyFunction() {
+ echo "defined in child";
+ }
+}
+var_dump( array_map(array('ChildClass', 'emptyFunction'), array(1, 2)) );
+
+echo "\n-- class with final method --";
+class FinalClass
+{
+ private $var4;
+ final function finalMethod() {
+ echo "This function can't be overloaded";
+ }
+}
+var_dump( array_map(array('FinalClass', 'finalMethod'), array(1, 2)) );
+
+echo "\n-- class with static members --\n";
+class StaticClass
+{
+ static $var5 = 2;
+ public static function square($n) {
+ return ($n * $n);
+ }
+ private static function cube($n) {
+ return ($n * $n * $n);
+ }
+ protected static function retVal($n) {
+ return array($n);
+ }
+}
+var_dump( array_map(array('StaticClass', 'square'), array(1, 2)) );
+var_dump( array_map(array('StaticClass', 'cube'), array(2)) );
+var_dump( array_map(array('StaticClass', 'retVal'), array(3, 4)) );
+
+echo "-- class implementing an interface --\n";
+interface myInterface
+{
+ public function toImplement();
+}
+class InterClass implements myInterface
+{
+ public static function square($n) {
+ return ($n * $n);
+ }
+ public function toImplement() {
+ return 1;
+ }
+}
+var_dump( array_map(array('InterClass', 'square'), array(1, 2)));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : object functionality ***
+-- simple class with public variable and method --
+
+Strict Standards: Non-static method SimpleClass::square() cannot be called statically in %s on line %d
+
+Strict Standards: Non-static method SimpleClass::square() cannot be called statically in %s on line %d
+
+Strict Standards: Non-static method SimpleClass::square() cannot be called statically in %s on line %d
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+}
+
+-- simple class with private variable and method --
+
+Strict Standards: Non-static method SimpleClassPri::add() cannot be called statically in %s on line %d
+
+Warning: array_map(): The first argument, 'SimpleClassPri::add', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- simple class with protected variable and method --
+
+Strict Standards: Non-static method SimpleClassPro::mul() cannot be called statically in %s on line %d
+
+Warning: array_map(): The first argument, 'SimpleClassPro::mul', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- class without members --
+Warning: array_map(): The first argument, 'Array', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- abstract class --
+Strict Standards: Non-static method ChildClass::emptyFunction() cannot be called statically in %s on line %d
+
+Strict Standards: Non-static method ChildClass::emptyFunction() cannot be called statically in %s on line %d
+defined in child
+Strict Standards: Non-static method ChildClass::emptyFunction() cannot be called statically in %s on line %d
+defined in childarray(2) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+}
+
+-- class with final method --
+Strict Standards: Non-static method FinalClass::finalMethod() cannot be called statically in %s on line %d
+
+Strict Standards: Non-static method FinalClass::finalMethod() cannot be called statically in %s on line %d
+This function can't be overloaded
+Strict Standards: Non-static method FinalClass::finalMethod() cannot be called statically in %s on line %d
+This function can't be overloadedarray(2) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+}
+
+-- class with static members --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+}
+
+Warning: array_map(): The first argument, 'StaticClass::cube', should be either NULL or a valid callback in %s on line %d
+NULL
+
+Warning: array_map(): The first argument, 'StaticClass::retVal', should be either NULL or a valid callback in %s on line %d
+NULL
+-- class implementing an interface --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+}
+Done
diff --git a/ext/standard/tests/array/array_map_object2.phpt b/ext/standard/tests/array/array_map_object2.phpt
new file mode 100644
index 000000000..91f713018
--- /dev/null
+++ b/ext/standard/tests/array/array_map_object2.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test array_map() function : object functionality - with non-existent class and method
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Testing array_map() for following object functionalities:
+ * 1) non-existent class
+ * 2) existent class and non-existent function
+ */
+echo "*** Testing array_map() : with non-existent class and method ***\n";
+
+class SimpleClass
+{
+ public $var1 = 1;
+ public function square($n) {
+ return $n * $n;
+ }
+ public static function cube($n) {
+ return $n * $n * $n;
+ }
+}
+
+echo "-- with non-existent class --\n";
+var_dump( array_map(array('non-existent', 'square'), array(1, 2)) );
+
+echo "-- with existent class and non-existent method --\n";
+var_dump( array_map(array('SimpleClass', 'non-existent'), array(1, 2)) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : with non-existent class and method ***
+-- with non-existent class --
+
+Warning: array_map(): The first argument, 'non-existent::square', should be either NULL or a valid callback in %s on line %d
+NULL
+-- with existent class and non-existent method --
+
+Warning: array_map(): The first argument, 'SimpleClass::non-existent', should be either NULL or a valid callback in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_object3.phpt b/ext/standard/tests/array/array_map_object3.phpt
new file mode 100644
index 000000000..56296a0b8
--- /dev/null
+++ b/ext/standard/tests/array/array_map_object3.phpt
@@ -0,0 +1,91 @@
+--TEST--
+Test array_map() function : object functionality - class methods as callback function
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Testing array_map() for object functionality with following callback function variations:
+ * 1) child class method using parent object
+ * 2) parent class method using child object
+ * 3) child class method using parent class
+ * 4) parent class method using child class
+ */
+echo "*** Testing array_map() : class methods as callback function ***\n";
+
+$arr1 = array(1, 5, 7);
+
+class ParentClass
+{
+ public $var1 = 10;
+ public static function staticParent1($n) {
+ return $n;
+ }
+ private static function staticParent2($n) {
+ return $n;
+ }
+}
+class ChildClass extends ParentClass
+{
+ var $parent_obj;
+ public function __construct ( ) {
+ $this->parent_obj = new ParentClass();
+ }
+ public $var2 = 5;
+ public static function staticChild($n) {
+ return $n;
+ }
+ public function nonstaticChild($n) {
+ return $n;
+ }
+}
+
+$childobj = new ChildClass();
+$parentobj = new ParentClass();
+
+echo "-- accessing parent method from child class --\n";
+var_dump( array_map(array('ChildClass', 'staticParent1'), $arr1) );
+
+echo "-- accessing child method from parent class --\n";
+var_dump( array_map(array('ParentClass', 'staticChild'), $arr1) );
+
+echo "-- accessing parent method using child class object --\n";
+var_dump( array_map(array($childobj, 'staticParent1'), $arr1) );
+
+echo "-- accessing child method using parent class object --\n";
+var_dump( array_map(array($parentobj, 'staticChild'), $arr1) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : class methods as callback function ***
+-- accessing parent method from child class --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(7)
+}
+-- accessing child method from parent class --
+
+Warning: array_map(): The first argument, 'ParentClass::staticChild', should be either NULL or a valid callback in %s on line %d
+NULL
+-- accessing parent method using child class object --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(7)
+}
+-- accessing child method using parent class object --
+
+Warning: array_map(): The first argument, 'ParentClass::staticChild', should be either NULL or a valid callback in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_variation1.phpt b/ext/standard/tests/array/array_map_variation1.phpt
new file mode 100644
index 000000000..cd09be7ba
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation1.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test array_map() function : usage variations - string keys
+--FILE--
+<?php
+
+/* Prototype : array array_map(mixed callback, array input1 [, array input2 ,...])
+ * Description: Applies the callback to the elements in given arrays.
+ * Source code: ext/standard/array.c
+*/
+
+
+
+echo "*** Testing array_map() : string keys ***\n";
+
+$arr = array("stringkey" => "value");
+function cb1 ($a) {return array ($a);};
+function cb2 ($a,$b) {return array ($a,$b);};
+var_dump( array_map("cb1", $arr));
+var_dump( array_map("cb2", $arr,$arr));
+var_dump( array_map(null, $arr));
+var_dump( array_map(null, $arr, $arr));
+echo "Done";
+?>
+
+--EXPECT--
+*** Testing array_map() : string keys ***
+array(1) {
+ ["stringkey"]=>
+ array(1) {
+ [0]=>
+ string(5) "value"
+ }
+}
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(5) "value"
+ [1]=>
+ string(5) "value"
+ }
+}
+array(1) {
+ ["stringkey"]=>
+ string(5) "value"
+}
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(5) "value"
+ [1]=>
+ string(5) "value"
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_map_variation10.phpt b/ext/standard/tests/array/array_map_variation10.phpt
new file mode 100644
index 000000000..cc7543699
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation10.phpt
@@ -0,0 +1,120 @@
+--TEST--
+Test array_map() function : usage variations - anonymous callback function
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing anoymous callback function with following variations
+ */
+
+echo "*** Testing array_map() : anonymous callback function ***\n";
+
+$array1 = array(1, 2, 3);
+$array2 = array(3, 4, 5);
+
+echo "-- anonymous function with all parameters and body --\n";
+var_dump( array_map( create_function('$a, $b', 'return array($a, $b);'), $array1, $array2));
+
+echo "-- anonymous function with two parameters and passing one array --\n";
+var_dump( array_map( create_function('$a, $b', 'return array($a, $b);'), $array1));
+
+echo "-- anonymous function with NULL parameter --\n";
+var_dump( array_map( create_function(NULL, 'return NULL;'), $array1));
+
+echo "-- anonymous function with NULL body --\n";
+var_dump( array_map( create_function('$a', NULL), $array1));
+
+echo "-- passing NULL as 'arr1' --\n";
+var_dump( array_map( create_function('$a', 'return array($a);'), NULL));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : anonymous callback function ***
+-- anonymous function with all parameters and body --
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(3)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(4)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(5)
+ }
+}
+-- anonymous function with two parameters and passing one array --
+
+Warning: Missing argument 2 for __lambda_func() in %s(20) : runtime-created function on line %d
+
+Notice: Undefined variable: b in %s(20) : runtime-created function on line %d
+
+Warning: Missing argument 2 for __lambda_func() in %s(20) : runtime-created function on line %d
+
+Notice: Undefined variable: b in %s(20) : runtime-created function on line %d
+
+Warning: Missing argument 2 for __lambda_func() in %s(20) : runtime-created function on line %d
+
+Notice: Undefined variable: b in %s(20) : runtime-created function on line %d
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ NULL
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ NULL
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ NULL
+ }
+}
+-- anonymous function with NULL parameter --
+array(3) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ NULL
+}
+-- anonymous function with NULL body --
+array(3) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ NULL
+}
+-- passing NULL as 'arr1' --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_variation11.phpt b/ext/standard/tests/array/array_map_variation11.phpt
new file mode 100644
index 000000000..9cad3668d
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation11.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test array_map() function : usage variations - with recursive callback
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing subarrays and recursive callback function
+ */
+
+echo "*** Testing array_map() : recursive callback function ***\n";
+
+// callback function
+function square_recur_single_array($var) {
+ if (is_array($var))
+ return array_map('square_recur_single_array', $var);
+ return $var * $var;
+}
+
+$array1 = array(1, array(2, 3, array(5)), array(4));
+
+var_dump( array_map('square_recur_single_array', $array1));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : recursive callback function ***
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ array(3) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(9)
+ [2]=>
+ array(1) {
+ [0]=>
+ int(25)
+ }
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(16)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation12.phpt b/ext/standard/tests/array/array_map_variation12.phpt
new file mode 100644
index 000000000..e599ed5a5
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation12.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test array_map() function : usage variations - built-in function as callback
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing buit-in function as callback function
+ */
+
+echo "*** Testing array_map() : built-in function ***\n";
+
+$array1 = array(1, 2, 3);
+$array2 = array(3, 4, 5);
+
+echo "-- with built-in function 'pow' and two parameters --\n";
+var_dump( array_map('pow', $array1, $array2));
+
+echo "-- with built-in function 'pow' and one parameter --\n";
+var_dump( array_map('pow', $array1));
+
+echo "-- with language construct --\n";
+var_dump( array_map('echo', $array1));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : built-in function ***
+-- with built-in function 'pow' and two parameters --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(16)
+ [2]=>
+ int(243)
+}
+-- with built-in function 'pow' and one parameter --
+
+Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
+array(3) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ NULL
+}
+-- with language construct --
+
+Warning: array_map(): The first argument, 'echo', should be either NULL or a valid callback in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_variation13.phpt b/ext/standard/tests/array/array_map_variation13.phpt
new file mode 100644
index 000000000..94babdf96
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation13.phpt
@@ -0,0 +1,107 @@
+--TEST--
+Test array_map() function : usage variations - callback function with different return types
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing different callback function returning:
+ * int, string, bool, null values
+ */
+
+echo "*** Testing array_map() : callback with diff return value ***\n";
+
+$array1 = array(1, 2, 3);
+$array2 = array(3, 4, 5);
+
+echo "-- with integer return value --\n";
+function callback_int($a, $b)
+{
+ return $a + $b;
+}
+var_dump( array_map('callback_int', $array1, $array2));
+
+echo "-- with string return value --\n";
+function callback_string($a, $b)
+{
+ return "$a"."$b";
+}
+var_dump( array_map('callback_string', $array1, $array2));
+
+echo "-- with bool return value --\n";
+function callback_bool($a, $b)
+{
+ return TRUE;
+}
+var_dump( array_map('callback_bool', $array1, $array2));
+
+echo "-- with null return value --\n";
+function callback_null($array1)
+{
+ return NULL;
+}
+var_dump( array_map('callback_null', $array1));
+
+echo "-- with no return value --\n";
+function callback_without_ret($arr1)
+{
+ echo "callback_without_ret called\n";
+}
+var_dump( array_map('callback_without_ret', $array1));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : callback with diff return value ***
+-- with integer return value --
+array(3) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(6)
+ [2]=>
+ int(8)
+}
+-- with string return value --
+array(3) {
+ [0]=>
+ string(2) "13"
+ [1]=>
+ string(2) "24"
+ [2]=>
+ string(2) "35"
+}
+-- with bool return value --
+array(3) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [2]=>
+ bool(true)
+}
+-- with null return value --
+array(3) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ NULL
+}
+-- with no return value --
+callback_without_ret called
+callback_without_ret called
+callback_without_ret called
+array(3) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ NULL
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation14.phpt b/ext/standard/tests/array/array_map_variation14.phpt
new file mode 100644
index 000000000..baa1f7753
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation14.phpt
@@ -0,0 +1,125 @@
+--TEST--
+Test array_map() function : usage variations - null value for 'callback' argument
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing null values for $callback argument and testing whether shortest
+ * array will be extended with empty elements
+ */
+
+echo "*** Testing array_map() : null value for 'callback' argument ***\n";
+
+// arrays to be passed as arguments
+$arr1 = array(1, 2);
+$arr2 = array("one", "two");
+$arr3 = array(1.1, 2.2);
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+/* calling array_map() with null callback */
+
+echo "-- with null --\n";
+var_dump( array_map(null, $arr1, $arr2, $arr3) );
+var_dump( array_map(NULL, $arr1, $arr2, $arr3) );
+
+echo "-- with unset variable --\n";
+var_dump( array_map(@$unset_var, $arr1, $arr2, $arr3) );
+
+echo "-- with undefined variable --\n";
+var_dump( array_map(@$undefined_var, $arr1) );
+
+echo "-- with empty string --\n";
+var_dump( array_map("", $arr1, $arr2) );
+
+echo "-- with empty array --\n";
+var_dump( array_map(array(), $arr1, $arr2) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : null value for 'callback' argument ***
+-- with null --
+array(2) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ string(3) "one"
+ [2]=>
+ float(1.1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(2)
+ [1]=>
+ string(3) "two"
+ [2]=>
+ float(2.2)
+ }
+}
+array(2) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ string(3) "one"
+ [2]=>
+ float(1.1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(2)
+ [1]=>
+ string(3) "two"
+ [2]=>
+ float(2.2)
+ }
+}
+-- with unset variable --
+array(2) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ string(3) "one"
+ [2]=>
+ float(1.1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(2)
+ [1]=>
+ string(3) "two"
+ [2]=>
+ float(2.2)
+ }
+}
+-- with undefined variable --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- with empty string --
+
+Warning: array_map(): The first argument, '', should be either NULL or a valid callback in %s line %d
+NULL
+-- with empty array --
+
+Warning: array_map(): The first argument, 'Array', should be either NULL or a valid callback in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_variation15.phpt b/ext/standard/tests/array/array_map_variation15.phpt
new file mode 100644
index 000000000..9844d4c8c
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation15.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Test array_map() function : usage variations - non existent 'callback' function
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing non existent function for $callback argument
+ */
+
+echo "*** Testing array_map() : non existent 'callback' function ***\n";
+
+// arrays to be passed as arguments
+$arr1 = array(1, 2);
+$arr2 = array("one", "two");
+$arr3 = array(1.1, 2.2);
+
+var_dump( array_map('non_existent', $arr1, $arr2, $arr3) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : non existent 'callback' function ***
+
+Warning: array_map(): The first argument, 'non_existent', should be either NULL or a valid callback in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_variation16.phpt b/ext/standard/tests/array/array_map_variation16.phpt
new file mode 100644
index 000000000..e6972972d
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation16.phpt
@@ -0,0 +1,73 @@
+--TEST--
+Test array_map() function : usage variations - failing built-in functions & language constructs
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing non-permmited built-in functions and language constructs i.e.
+ * echo(), array(), empty(), eval(), exit(), isset(), list(), print()
+ */
+
+echo "*** Testing array_map() : non-permmited built-in functions ***\n";
+
+// array to be passed as arguments
+$arr1 = array(1, 2);
+
+// built-in functions & language constructs
+$callback_names = array(
+/*1*/ 'echo',
+ 'array',
+ 'empty',
+/*4*/ 'eval',
+ 'exit',
+ 'isset',
+ 'list',
+/*8*/ 'print'
+);
+for($count = 0; $count < count($callback_names); $count++)
+{
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( array_map($callback_names[$count], $arr1) );
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : non-permmited built-in functions ***
+-- Iteration 1 --
+
+Warning: array_map(): The first argument, 'echo', should be either NULL or a valid callback in %s on line %d
+NULL
+-- Iteration 2 --
+
+Warning: array_map(): The first argument, 'array', should be either NULL or a valid callback in %s on line %d
+NULL
+-- Iteration 3 --
+
+Warning: array_map(): The first argument, 'empty', should be either NULL or a valid callback in %s on line %d
+NULL
+-- Iteration 4 --
+
+Warning: array_map(): The first argument, 'eval', should be either NULL or a valid callback in %s on line %d
+NULL
+-- Iteration 5 --
+
+Warning: array_map(): The first argument, 'exit', should be either NULL or a valid callback in %s on line %d
+NULL
+-- Iteration 6 --
+
+Warning: array_map(): The first argument, 'isset', should be either NULL or a valid callback in %s on line %d
+NULL
+-- Iteration 7 --
+
+Warning: array_map(): The first argument, 'list', should be either NULL or a valid callback in %s on line %d
+NULL
+-- Iteration 8 --
+
+Warning: array_map(): The first argument, 'print', should be either NULL or a valid callback in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_variation17.phpt b/ext/standard/tests/array/array_map_variation17.phpt
new file mode 100644
index 000000000..4c96af230
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation17.phpt
@@ -0,0 +1,158 @@
+--TEST--
+Test array_map() function : usage variations - unexpected values for 'callback' argument
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing different scalar/nonscalar values in place of $callback
+ */
+
+echo "*** Testing array_map() : unexpected values for 'callback' argument ***\n";
+
+$arr1 = array(1, 2, 3);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$unexpected_callbacks = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // boolean data
+/*10*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*14*/ "",
+ '',
+
+ // array data
+/*16*/ array(),
+ array(1, 2),
+ array(1, array(2)),
+
+ // object data
+/*19*/ new classA(),
+
+ // resource variable
+/*20*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_map
+for($count = 0; $count < count($unexpected_callbacks); $count++) {
+ echo "\n-- Iteration ".($count + 1)." --";
+ var_dump( array_map($unexpected_callbacks[$count], $arr1));
+};
+
+fclose($fp);
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : unexpected values for 'callback' argument ***
+
+-- Iteration 1 --
+Warning: array_map(): The first argument, '0', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 2 --
+Warning: array_map(): The first argument, '1', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 3 --
+Warning: array_map(): The first argument, '12345', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 4 --
+Warning: array_map(): The first argument, '-2345', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 5 --
+Warning: array_map(): The first argument, '10.5', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 6 --
+Warning: array_map(): The first argument, '-10.5', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 7 --
+Warning: array_map(): The first argument, '123456789000', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 8 --
+Warning: array_map(): The first argument, '1.23456789E-9', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 9 --
+Warning: array_map(): The first argument, '0.5', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 10 --
+Warning: array_map(): The first argument, '1', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 11 --
+Warning: array_map(): The first argument, '', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 12 --
+Warning: array_map(): The first argument, '1', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 13 --
+Warning: array_map(): The first argument, '', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 14 --
+Warning: array_map(): The first argument, '', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 15 --
+Warning: array_map(): The first argument, '', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 16 --
+Warning: array_map(): The first argument, 'Array', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 17 --
+Warning: array_map(): The first argument, 'Array', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 18 --
+Warning: array_map(): The first argument, 'Array', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 19 --
+Warning: array_map(): The first argument, 'Class A object', should be either NULL or a valid callback in %s on line %d
+NULL
+
+-- Iteration 20 --
+Warning: array_map(): The first argument, 'Resource id #%d', should be either NULL or a valid callback in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_variation18.phpt b/ext/standard/tests/array/array_map_variation18.phpt
new file mode 100644
index 000000000..8170fb846
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation18.phpt
@@ -0,0 +1,205 @@
+--TEST--
+Test array_map() function : usage variations - unexpected values for 'arr1' argument
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing non array values in place of $arr1
+ */
+
+echo "*** Testing array_map() : unexpected values for 'arr1' ***\n";
+
+function callback($a)
+{
+ return $a;
+}
+
+//get an unset array variable
+$unset_var1 = array(1, 2);
+unset ($unset_var1);
+
+// get an unset variable
+$unset_var2 = 10;
+unset ($unset_var2);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// different scalar/non-scalar values for array input
+$unexpected_inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var1,
+ @$unset_var2,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $unexpected_inputs to check the behavior of array_map
+for($count = 0; $count < count($unexpected_inputs); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( array_map('callback', $unexpected_inputs[$count]));
+};
+
+fclose($fp);
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : unexpected values for 'arr1' ***
+-- Iteration 1 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 2 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 3 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 4 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 5 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 6 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 7 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 8 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 9 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 10 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 11 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 12 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 13 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 14 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 15 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 16 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 17 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 18 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 19 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 20 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 21 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 22 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 23 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 24 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+-- Iteration 25 --
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_map_variation2.phpt b/ext/standard/tests/array/array_map_variation2.phpt
new file mode 100644
index 000000000..6cd0096b6
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation2.phpt
@@ -0,0 +1,276 @@
+--TEST--
+Test array_map() function : usage variations - references
+--FILE--
+<?php
+
+/* Prototype : array array_map(mixed callback, array input1 [, array input2 ,...])
+ * Description: Applies the callback to the elements in given arrays.
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_map() : references ***\n";
+$arr = array("k1" => "v1","k2"=>"v2");
+$arr[]=&$arr["k1"];
+$arr[]=&$arr;
+function cb1 ($a) {var_dump ($a);return array ($a);};
+function cb2 (&$a) {var_dump ($a);return array (&$a);};
+var_dump( array_map("cb1", $arr));
+var_dump( array_map("cb2", $arr,$arr));
+var_dump( array_map(null, $arr));
+var_dump( array_map(null, $arr, $arr));
+
+// Break cycles
+$arr[0] = null;
+$arr[1] = null;
+
+echo "Done";
+?>
+
+--EXPECT--
+*** Testing array_map() : references ***
+string(2) "v1"
+string(2) "v2"
+string(2) "v1"
+array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ *RECURSION*
+ }
+ }
+}
+array(4) {
+ ["k1"]=>
+ array(1) {
+ [0]=>
+ string(2) "v1"
+ }
+ ["k2"]=>
+ array(1) {
+ [0]=>
+ string(2) "v2"
+ }
+ [0]=>
+ array(1) {
+ [0]=>
+ string(2) "v1"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ *RECURSION*
+ }
+ }
+ }
+ }
+}
+string(2) "v1"
+string(2) "v2"
+string(2) "v1"
+array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ *RECURSION*
+ }
+ }
+}
+array(4) {
+ [0]=>
+ array(1) {
+ [0]=>
+ &string(2) "v1"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(2) "v2"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ &string(2) "v1"
+ }
+ [3]=>
+ array(1) {
+ [0]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ *RECURSION*
+ }
+ }
+ }
+}
+array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ *RECURSION*
+ }
+ }
+}
+array(4) {
+ [0]=>
+ array(2) {
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &string(2) "v1"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(2) "v2"
+ [1]=>
+ string(2) "v2"
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &string(2) "v1"
+ }
+ [3]=>
+ array(2) {
+ [0]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ *RECURSION*
+ }
+ }
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ &array(4) {
+ ["k1"]=>
+ &string(2) "v1"
+ ["k2"]=>
+ string(2) "v2"
+ [0]=>
+ &string(2) "v1"
+ [1]=>
+ *RECURSION*
+ }
+ }
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation3.phpt b/ext/standard/tests/array/array_map_variation3.phpt
new file mode 100644
index 000000000..a0715504e
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation3.phpt
@@ -0,0 +1,227 @@
+--TEST--
+Test array_map() function : usage variations - different arrays for 'arr1' argument
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing different arrays for $arr1 argument
+ */
+
+echo "*** Testing array_map() : different arrays for 'arr1' argument ***\n";
+
+function callback($a)
+{
+ return ($a);
+}
+
+// different arrays
+$arrays = array (
+/*1*/ array(1, 2), // array with default keys and numeric values
+ array(1.1, 2.2), // array with default keys & float values
+ array( array(2), array(1)), // sub arrays
+ array(false,true), // array with default keys and boolean values
+ array(), // empty array
+ array(NULL), // array with NULL
+ array("a","aaaa","b","bbbb","c","ccccc"),
+
+ // associative arrays
+/*8*/ array(1 => "one", 2 => "two", 3 => "three"), // explicit numeric keys, string values
+ array("one" => 1, "two" => 2, "three" => 3 ), // string keys & numeric values
+ array( 1 => 10, 2 => 20, 4 => 40, 3 => 30), // explicit numeric keys and numeric values
+ array( "one" => "ten", "two" => "twenty", "three" => "thirty"), // string key/value
+ array("one" => 1, 2 => "two", 4 => "four"), //mixed
+
+ // associative array, containing null/empty/boolean values as key/value
+/*13*/ array(NULL => "NULL", null => "null", "NULL" => NULL, "null" => null),
+ array(true => "true", false => "false", "false" => false, "true" => true),
+ array("" => "emptyd", '' => 'emptys', "emptyd" => "", 'emptys' => ''),
+ array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
+ array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
+
+ // array with repetative keys
+/*18*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
+);
+
+// loop through the various elements of $arrays to test array_map()
+$iterator = 1;
+foreach($arrays as $arr1) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_map('callback', $arr1) );
+ $iterator++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : different arrays for 'arr1' argument ***
+-- Iteration 1 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 2 --
+array(2) {
+ [0]=>
+ float(1.1)
+ [1]=>
+ float(2.2)
+}
+-- Iteration 3 --
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+-- Iteration 4 --
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+-- Iteration 5 --
+array(0) {
+}
+-- Iteration 6 --
+array(1) {
+ [0]=>
+ NULL
+}
+-- Iteration 7 --
+array(6) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(4) "aaaa"
+ [2]=>
+ string(1) "b"
+ [3]=>
+ string(4) "bbbb"
+ [4]=>
+ string(1) "c"
+ [5]=>
+ string(5) "ccccc"
+}
+-- Iteration 8 --
+array(3) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ string(5) "three"
+}
+-- Iteration 9 --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+-- Iteration 10 --
+array(4) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(20)
+ [4]=>
+ int(40)
+ [3]=>
+ int(30)
+}
+-- Iteration 11 --
+array(3) {
+ ["one"]=>
+ string(3) "ten"
+ ["two"]=>
+ string(6) "twenty"
+ ["three"]=>
+ string(6) "thirty"
+}
+-- Iteration 12 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [2]=>
+ string(3) "two"
+ [4]=>
+ string(4) "four"
+}
+-- Iteration 13 --
+array(3) {
+ [""]=>
+ string(4) "null"
+ ["NULL"]=>
+ NULL
+ ["null"]=>
+ NULL
+}
+-- Iteration 14 --
+array(4) {
+ [1]=>
+ string(4) "true"
+ [0]=>
+ string(5) "false"
+ ["false"]=>
+ bool(false)
+ ["true"]=>
+ bool(true)
+}
+-- Iteration 15 --
+array(3) {
+ [""]=>
+ string(6) "emptys"
+ ["emptyd"]=>
+ string(0) ""
+ ["emptys"]=>
+ string(0) ""
+}
+-- Iteration 16 --
+array(6) {
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(0) ""
+ [3]=>
+ NULL
+ [4]=>
+ NULL
+ [5]=>
+ bool(false)
+ [6]=>
+ bool(true)
+}
+-- Iteration 17 --
+array(3) {
+ [""]=>
+ int(4)
+ [0]=>
+ int(5)
+ [1]=>
+ int(6)
+}
+-- Iteration 18 --
+array(3) {
+ ["One"]=>
+ int(10)
+ ["two"]=>
+ int(20)
+ ["three"]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation4.phpt b/ext/standard/tests/array/array_map_variation4.phpt
new file mode 100644
index 000000000..2517d034e
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation4.phpt
@@ -0,0 +1,179 @@
+--TEST--
+Test array_map() function : usage variations - associative array with different keys
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing associative array with different keys for $arr1 argument
+ */
+
+echo "*** Testing array_map() : associative array with diff. keys for 'arr1' argument ***\n";
+
+function callback($a)
+{
+ return ($a);
+}
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a class
+class classA{
+ public function __toString(){
+ return "Class A object";
+ }
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// initializing the array
+$arrays = array (
+
+ // empty array
+/*1*/ array(),
+
+ // arrays with integer keys
+/*2*/ array(0 => "0"),
+ array(1 => "1"),
+ array(1 => "1", 2 => "2", 3 => "3", 4 => "4"),
+
+ // arrays with float keys
+/*5*/ array(2.3333 => "float"),
+ array(1.2 => "f1", 3.33 => "f2", 4.89999922839999 => "f3", 33333333.333333 => "f4"),
+
+ // arrays with string keys
+ array('\tHello' => 111, 're\td' => 'color', '\v\fworld' => 2.2, 'pen\n' => 33),
+/*8*/ array("\tHello" => 111, "re\td" => "color", "\v\fworld" => 2.2, "pen\n" => 33),
+ array("hello", $heredoc => "string"), // heredoc
+
+ // array with object, unset variable and resource variable
+ array(new classA() => 11, @$unset_var => "hello", $fp => 'resource'),
+
+ // array with mixed values
+/*11*/ array('hello' => 1, new classA() => 2, "fruit" => 2.2,
+ $fp => 'resource', 133 => "int", 444.432 => "float",
+ @$unset_var => "unset", $heredoc => "heredoc")
+);
+
+// loop through the various elements of $arrays to test array_map()
+$iterator = 1;
+foreach($arrays as $arr1) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_map('callback', $arr1) );
+ $iterator++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : associative array with diff. keys for 'arr1' argument ***
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+-- Iteration 1 --
+array(0) {
+}
+-- Iteration 2 --
+array(1) {
+ [0]=>
+ string(1) "0"
+}
+-- Iteration 3 --
+array(1) {
+ [1]=>
+ string(1) "1"
+}
+-- Iteration 4 --
+array(4) {
+ [1]=>
+ string(1) "1"
+ [2]=>
+ string(1) "2"
+ [3]=>
+ string(1) "3"
+ [4]=>
+ string(1) "4"
+}
+-- Iteration 5 --
+array(1) {
+ [2]=>
+ string(5) "float"
+}
+-- Iteration 6 --
+array(4) {
+ [1]=>
+ string(2) "f1"
+ [3]=>
+ string(2) "f2"
+ [4]=>
+ string(2) "f3"
+ [33333333]=>
+ string(2) "f4"
+}
+-- Iteration 7 --
+array(4) {
+ ["\tHello"]=>
+ int(111)
+ ["re\td"]=>
+ string(5) "color"
+ ["\v\fworld"]=>
+ float(2.2)
+ ["pen\n"]=>
+ int(33)
+}
+-- Iteration 8 --
+array(4) {
+ [" Hello"]=>
+ int(111)
+ ["re d"]=>
+ string(5) "color"
+ [" world"]=>
+ float(2.2)
+ ["pen
+"]=>
+ int(33)
+}
+-- Iteration 9 --
+array(2) {
+ [0]=>
+ string(5) "hello"
+ ["Hello world"]=>
+ string(6) "string"
+}
+-- Iteration 10 --
+array(1) {
+ [""]=>
+ string(5) "hello"
+}
+-- Iteration 11 --
+array(6) {
+ ["hello"]=>
+ int(1)
+ ["fruit"]=>
+ float(2.2)
+ [133]=>
+ string(3) "int"
+ [444]=>
+ string(5) "float"
+ [""]=>
+ string(5) "unset"
+ ["Hello world"]=>
+ string(7) "heredoc"
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation5.phpt b/ext/standard/tests/array/array_map_variation5.phpt
new file mode 100644
index 000000000..55f156921
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation5.phpt
@@ -0,0 +1,181 @@
+--TEST--
+Test array_map() function : usage variations - associative array with different values
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing associative array with different values for $arr1 argument
+ */
+
+echo "*** Testing array_map() : associative array with diff. values for 'arr1' argument ***\n";
+
+function callback($a)
+{
+ return ($a);
+}
+//get an unset variable
+$unset_var = array(1, 2);
+unset ($unset_var);
+
+//get a resource variable
+$fp = fopen(__FILE__, "r");
+
+//get a class
+class classA
+{
+ public function __toString(){
+ return "Class A object";
+ }
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// initializing the array
+$arrays = array (
+
+ // empty array
+/*1*/ array(),
+
+ // arrays with integer values
+ array('0' => 0),
+ array("1" => 1),
+ array("one" => 1, 'two' => 2, "three" => 3, 4 => 4),
+
+ // arrays with float values
+/*5*/ array("float" => 2.3333),
+ array("f1" => 1.2, 'f2' => 3.33, 3 => 4.89999922839999, 'f4' => 33333333.3333),
+
+ // arrays with string values
+ array(111 => "\tHello", "red" => "col\tor", 2 => "\v\fworld", 3.3 => "pen\n"),
+/*8*/ array(111 => '\tHello', "red" => 'col\tor', 2 => '\v\fworld', 3.3 => 'pen\n'),
+ array(1 => "hello", "heredoc" => $heredoc),
+
+ // array with object, unset variable and resource variable
+ array(11 => new classA(), "unset" => @$unset_var, "resource" => $fp),
+
+ // array with mixed values
+/*11*/ array(1 => 'hello', 2 => new classA(), 222 => "fruit",
+ 'resource' => $fp, "int" => 133, "float" => 444.432,
+ "unset" => @$unset_var, "heredoc" => $heredoc)
+);
+
+// loop through the various elements of $arrays to test array_map()
+$iterator = 1;
+foreach($arrays as $arr1) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_map('callback', $arr1) );
+ $iterator++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : associative array with diff. values for 'arr1' argument ***
+-- Iteration 1 --
+array(0) {
+}
+-- Iteration 2 --
+array(1) {
+ [0]=>
+ int(0)
+}
+-- Iteration 3 --
+array(1) {
+ [1]=>
+ int(1)
+}
+-- Iteration 4 --
+array(4) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [4]=>
+ int(4)
+}
+-- Iteration 5 --
+array(1) {
+ ["float"]=>
+ float(2.3333)
+}
+-- Iteration 6 --
+array(4) {
+ ["f1"]=>
+ float(1.2)
+ ["f2"]=>
+ float(3.33)
+ [3]=>
+ float(4.8999992284)
+ ["f4"]=>
+ float(33333333.3333)
+}
+-- Iteration 7 --
+array(4) {
+ [111]=>
+ string(6) " Hello"
+ ["red"]=>
+ string(6) "col or"
+ [2]=>
+ string(7) " world"
+ [3]=>
+ string(4) "pen
+"
+}
+-- Iteration 8 --
+array(4) {
+ [111]=>
+ string(7) "\tHello"
+ ["red"]=>
+ string(7) "col\tor"
+ [2]=>
+ string(9) "\v\fworld"
+ [3]=>
+ string(5) "pen\n"
+}
+-- Iteration 9 --
+array(2) {
+ [1]=>
+ string(5) "hello"
+ ["heredoc"]=>
+ string(11) "Hello world"
+}
+-- Iteration 10 --
+array(3) {
+ [11]=>
+ object(classA)#%d (0) {
+ }
+ ["unset"]=>
+ NULL
+ ["resource"]=>
+ resource(%d) of type (stream)
+}
+-- Iteration 11 --
+array(8) {
+ [1]=>
+ string(5) "hello"
+ [2]=>
+ object(classA)#%d (0) {
+ }
+ [222]=>
+ string(5) "fruit"
+ ["resource"]=>
+ resource(%d) of type (stream)
+ ["int"]=>
+ int(133)
+ ["float"]=>
+ float(444.432)
+ ["unset"]=>
+ NULL
+ ["heredoc"]=>
+ string(11) "Hello world"
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation6.phpt b/ext/standard/tests/array/array_map_variation6.phpt
new file mode 100644
index 000000000..2409a5763
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation6.phpt
@@ -0,0 +1,72 @@
+--TEST--
+Test array_map() function : usage variations - array having subarrays
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing array having different subarrays
+ */
+
+echo "*** Testing array_map() : array having subarrays ***\n";
+
+function callback($a)
+{
+ return $a;
+}
+
+// different subarrays
+$arr1 = array(
+ array(),
+ array(1, 2),
+ array('a', 'b'),
+ array(1, 2, 'a', 'b'),
+ array(1 => 'a', 'b' => 2)
+);
+
+var_dump( array_map('callback', $arr1));
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : array having subarrays ***
+array(5) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ }
+ [3]=>
+ array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "a"
+ [3]=>
+ string(1) "b"
+ }
+ [4]=>
+ array(2) {
+ [1]=>
+ string(1) "a"
+ ["b"]=>
+ int(2)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation7.phpt b/ext/standard/tests/array/array_map_variation7.phpt
new file mode 100644
index 000000000..8f88a0f88
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation7.phpt
@@ -0,0 +1,122 @@
+--TEST--
+Test array_map() function : usage variations - arrays of different size
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing array having different size
+ * 1) first array as empty array
+ * 2) second array as empty array
+ * 3) second array shorter than first array
+ * 4) first array shorter than second array
+ * 5) one more array than callback function arguments
+ */
+
+echo "*** Testing array_map() : arrays with diff. size ***\n";
+
+function callback($a, $b)
+{
+ return array($a => $b);
+}
+
+// calling array_map with different arrays
+var_dump( array_map('callback', array(1, 2, 3), array()) );
+var_dump( array_map('callback', array(), array('a', 'b', 'c')) );
+var_dump( array_map('callback', array(1, 2, 3), array('a', 'b')) );
+var_dump( array_map('callback', array(012, 0x2F, 0X1A), array(2.3, 12.4e2)) );
+var_dump( array_map('callback', array(), array(1, 2, 3), array('a', 'b')) ); // passing more no. of arrays than callback function argument
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : arrays with diff. size ***
+array(3) {
+ [0]=>
+ array(1) {
+ [1]=>
+ NULL
+ }
+ [1]=>
+ array(1) {
+ [2]=>
+ NULL
+ }
+ [2]=>
+ array(1) {
+ [3]=>
+ NULL
+ }
+}
+array(3) {
+ [0]=>
+ array(1) {
+ [""]=>
+ string(1) "a"
+ }
+ [1]=>
+ array(1) {
+ [""]=>
+ string(1) "b"
+ }
+ [2]=>
+ array(1) {
+ [""]=>
+ string(1) "c"
+ }
+}
+array(3) {
+ [0]=>
+ array(1) {
+ [1]=>
+ string(1) "a"
+ }
+ [1]=>
+ array(1) {
+ [2]=>
+ string(1) "b"
+ }
+ [2]=>
+ array(1) {
+ [3]=>
+ NULL
+ }
+}
+array(3) {
+ [0]=>
+ array(1) {
+ [10]=>
+ float(2.3)
+ }
+ [1]=>
+ array(1) {
+ [47]=>
+ float(1240)
+ }
+ [2]=>
+ array(1) {
+ [26]=>
+ NULL
+ }
+}
+array(3) {
+ [0]=>
+ array(1) {
+ [""]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [""]=>
+ int(2)
+ }
+ [2]=>
+ array(1) {
+ [""]=>
+ int(3)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation8.phpt b/ext/standard/tests/array/array_map_variation8.phpt
new file mode 100644
index 000000000..5672e6cd9
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation8.phpt
@@ -0,0 +1,81 @@
+--TEST--
+Test array_map() function : usage variations - array with references
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing array having reference values for $arr1 argument
+ */
+
+echo "*** Testing array_map() : array with references for 'arr1' argument ***\n";
+
+function callback1($a)
+{
+ return ($a);
+}
+
+function callback_cat($a, $b)
+{
+ return ($a . $b);
+}
+
+// reference variables
+$value1 = 10;
+$value2 = "hello";
+$value3 = 0;
+$value4 = &$value2;
+
+// array containing reference variables
+$arr1 = array(
+ 0 => 0,
+ 1 => &$value4,
+ 2 => &$value2,
+ 3 => "hello",
+ 4 => &$value3,
+ $value4 => &$value2
+);
+echo "-- with one array --\n";
+var_dump( array_map('callback1', $arr1) );
+
+echo "-- with two arrays --\n";
+var_dump( array_map('callback_cat', $arr1, $arr1) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : array with references for 'arr1' argument ***
+-- with one array --
+array(6) {
+ [0]=>
+ int(0)
+ [1]=>
+ string(5) "hello"
+ [2]=>
+ string(5) "hello"
+ [3]=>
+ string(5) "hello"
+ [4]=>
+ int(0)
+ ["hello"]=>
+ string(5) "hello"
+}
+-- with two arrays --
+array(6) {
+ [0]=>
+ string(2) "00"
+ [1]=>
+ string(10) "hellohello"
+ [2]=>
+ string(10) "hellohello"
+ [3]=>
+ string(10) "hellohello"
+ [4]=>
+ string(2) "00"
+ [5]=>
+ string(10) "hellohello"
+}
+Done
diff --git a/ext/standard/tests/array/array_map_variation9.phpt b/ext/standard/tests/array/array_map_variation9.phpt
new file mode 100644
index 000000000..b4f69739d
--- /dev/null
+++ b/ext/standard/tests/array/array_map_variation9.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Test array_map() function : usage variations - binary safe checking
+--FILE--
+<?php
+/* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
+ * Description: Applies the callback to the elements of the given arrays
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_map() by passing array having binary values for $arr1 argument
+ */
+
+echo "*** Testing array_map() : array with binary data for 'arr1' argument ***\n";
+
+function callback1($a)
+{
+ return ($a);
+}
+function callback2($a, $b)
+{
+ return array($a => $b);
+}
+
+// array with binary data
+$arr1 = array(b"hello", b"world", "1", b"22.22");
+
+echo "-- checking binary safe array with one parameter callback function --\n";
+var_dump( array_map('callback1', $arr1) );
+
+echo "-- checking binary safe array with two parameter callback function --\n";
+var_dump( array_map(b"callback2", $arr1) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_map() : array with binary data for 'arr1' argument ***
+-- checking binary safe array with one parameter callback function --
+array(4) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ [2]=>
+ string(1) "1"
+ [3]=>
+ string(5) "22.22"
+}
+-- checking binary safe array with two parameter callback function --
+
+Warning: Missing argument 2 for callback2() in %s on line %d
+
+Notice: Undefined variable: b in %s on line %d
+
+Warning: Missing argument 2 for callback2() in %s on line %d
+
+Notice: Undefined variable: b in %s on line %d
+
+Warning: Missing argument 2 for callback2() in %s on line %d
+
+Notice: Undefined variable: b in %s on line %d
+
+Warning: Missing argument 2 for callback2() in %s on line %d
+
+Notice: Undefined variable: b in %s on line %d
+array(4) {
+ [0]=>
+ array(1) {
+ ["hello"]=>
+ NULL
+ }
+ [1]=>
+ array(1) {
+ ["world"]=>
+ NULL
+ }
+ [2]=>
+ array(1) {
+ [1]=>
+ NULL
+ }
+ [3]=>
+ array(1) {
+ ["22.22"]=>
+ NULL
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_basic.phpt b/ext/standard/tests/array/array_merge_basic.phpt
new file mode 100644
index 000000000..c4dc69638
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_basic.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Test array_merge() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of array_merge()
+ */
+
+echo "*** Testing array_merge() : basic functionality ***\n";
+
+//indexed array
+$array1 = array ('zero', 'one', 'two');
+//associative array
+$array2 = array ('a' => 1, 'b' => 2, 'c' => 3);
+
+var_dump(array_merge($array1, $array2));
+
+var_dump(array_merge($array2, $array1));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : basic functionality ***
+array(6) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+}
+array(6) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_error.phpt b/ext/standard/tests/array/array_merge_error.phpt
new file mode 100644
index 000000000..3a394bbb7
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_error.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Test array_merge() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to array_merge() to test behaviour
+ */
+
+echo "*** Testing array_merge() : error conditions ***\n";
+
+// Testing array_merge with zero arguments
+echo "\n-- Testing array_merge() function with less than expected no. of arguments --\n";
+$arr1 = array(1, 2);
+var_dump( array_merge() );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge() : error conditions ***
+
+-- Testing array_merge() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for array_merge() in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_recursive_basic1.phpt b/ext/standard/tests/array/array_merge_recursive_basic1.phpt
new file mode 100644
index 000000000..a86a8510a
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_basic1.phpt
@@ -0,0 +1,97 @@
+--TEST--
+Test array_merge_recursive() function : basic functionality - array with default keys
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_merge_recursive() : array with default keys ***\n";
+
+// Initialise the arrays
+$arr1 = array(1, array(1, 2));
+$arr2 = array(3, array("hello", 'world'));
+$arr3 = array(array(6, 7), array("str1", 'str2'));
+
+// Calling array_merge_recursive() with default arguments
+echo "-- With default argument --\n";
+var_dump( array_merge_recursive($arr1) );
+
+// Calling array_merge_recursive() with more arguments
+echo "-- With more arguments --\n";
+var_dump( array_merge_recursive($arr1,$arr2) );
+var_dump( array_merge_recursive($arr1,$arr2,$arr3) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : array with default keys ***
+-- With default argument --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+-- With more arguments --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ int(3)
+ [3]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+}
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ int(3)
+ [3]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [4]=>
+ array(2) {
+ [0]=>
+ int(6)
+ [1]=>
+ int(7)
+ }
+ [5]=>
+ array(2) {
+ [0]=>
+ string(4) "str1"
+ [1]=>
+ string(4) "str2"
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_basic2.phpt b/ext/standard/tests/array/array_merge_recursive_basic2.phpt
new file mode 100644
index 000000000..3f8c62e7a
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_basic2.phpt
@@ -0,0 +1,94 @@
+--TEST--
+Test array_merge_recursive() function : basic functionality - associative arrays
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_merge_recursive() : associative arrays ***\n";
+
+// Initialise the arrays
+$arr1 = array(1 => "one", 2 => array(1, 2));
+$arr2 = array(2 => 'three', "four" => array("hello", 'world'));
+$arr3 = array(1 => array(6, 7), 'four' => array("str1", 'str2'));
+
+// Calling array_merge_recursive() with default arguments
+echo "-- With default argument --\n";
+var_dump( array_merge_recursive($arr1) );
+
+// Calling array_merge_recursive() with more arguments
+echo "-- With more arguments --\n";
+var_dump( array_merge_recursive($arr1,$arr2) );
+var_dump( array_merge_recursive($arr1,$arr2,$arr3) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : associative arrays ***
+-- With default argument --
+array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+-- With more arguments --
+array(4) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ string(5) "three"
+ ["four"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+}
+array(5) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ string(5) "three"
+ ["four"]=>
+ array(4) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ [2]=>
+ string(4) "str1"
+ [3]=>
+ string(4) "str2"
+ }
+ [3]=>
+ array(2) {
+ [0]=>
+ int(6)
+ [1]=>
+ int(7)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_error.phpt b/ext/standard/tests/array/array_merge_recursive_error.phpt
new file mode 100644
index 000000000..b2fb1fd6d
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_error.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test array_merge_recursive() function : error conditions
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+echo "*** Testing array_merge_recursive() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing array_merge_recursive() function with Zero arguments --\n";
+var_dump( array_merge_recursive() );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : error conditions ***
+
+-- Testing array_merge_recursive() function with Zero arguments --
+
+Warning: Wrong parameter count for array_merge_recursive() in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation1.phpt b/ext/standard/tests/array/array_merge_recursive_variation1.phpt
new file mode 100644
index 000000000..75e0c2086
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation1.phpt
@@ -0,0 +1,303 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - unexpected values for $arr1 argument
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing non array values to 'arr1' argument of array_merge_recursive() and see
+ * that the function outputs proper warning messages wherever expected.
+*/
+
+echo "*** Testing array_merge_recursive() : Passing non array values to \$arr1 argument ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class A
+{
+// public $var = 10;
+ public function __toString() {
+ return "object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $arr1 argument
+$arrays = array (
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // undefined data
+/*21*/ @$undefined_var,
+
+ // unset data
+/*22*/ @$unset_var,
+
+ // resource variable
+/*23*/ $fp,
+
+ // object data
+/*24*/ new A()
+);
+
+// initialise the second argument
+$arr2 = array(1, array("hello", 'world'));
+
+// loop through each element of $arrays and check the behavior of array_merge_recursive()
+$iterator = 1;
+foreach($arrays as $arr1) {
+ echo "\n-- Iteration $iterator --";
+
+ // with default argument
+ echo "\n-- With default argument --";
+ var_dump( array_merge_recursive($arr1) );
+
+ // with more arguments
+ echo "-- With more arguments --";
+ var_dump( array_merge_recursive($arr1, $arr2) );
+
+ $iterator++;
+}
+
+// close the file resource used
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : Passing non array values to $arr1 argument ***
+
+-- Iteration 1 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 19 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+-- With default argument --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+-- With more arguments --
+Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation10.phpt b/ext/standard/tests/array/array_merge_recursive_variation10.phpt
new file mode 100644
index 000000000..42d315eb8
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation10.phpt
@@ -0,0 +1,174 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - two dimensional arrays
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_merge_recursive() by passing
+ * two dimensional arrays for $arr1 argument.
+*/
+
+echo "*** Testing array_merge_recursive() : two dimensional array for \$arr1 argument ***\n";
+
+// initialize the 2-d array
+$arr1 = array(
+ array(1, 2, 3, 1),
+ "array" => array("hello", "world", "str1" => "hello", "str2" => 'world'),
+ array(1 => "one", 2 => "two", "one", 'two'),
+ array(1, 2, 3, 1)
+);
+
+// initialize the second argument
+$arr2 = array(1, "hello", "array" => array("hello", 'world'));
+
+echo "-- Passing the entire 2-d array --\n";
+echo "-- With default argument --\n";
+var_dump( array_merge_recursive($arr1) );
+echo "-- With more arguments --\n";
+var_dump( array_merge_recursive($arr1, $arr2) );
+
+echo "-- Passing the sub-array --\n";
+echo "-- With default argument --\n";
+var_dump( array_merge_recursive($arr1["array"]) );
+echo "-- With more arguments --\n";
+var_dump( array_merge_recursive($arr1["array"], $arr2["array"]) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : two dimensional array for $arr1 argument ***
+-- Passing the entire 2-d array --
+-- With default argument --
+array(4) {
+ [0]=>
+ array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(1)
+ }
+ ["array"]=>
+ array(4) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ ["str1"]=>
+ string(5) "hello"
+ ["str2"]=>
+ string(5) "world"
+ }
+ [1]=>
+ array(4) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ string(3) "one"
+ [4]=>
+ string(3) "two"
+ }
+ [2]=>
+ array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(1)
+ }
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(1)
+ }
+ ["array"]=>
+ array(6) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ ["str1"]=>
+ string(5) "hello"
+ ["str2"]=>
+ string(5) "world"
+ [2]=>
+ string(5) "hello"
+ [3]=>
+ string(5) "world"
+ }
+ [1]=>
+ array(4) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ string(3) "one"
+ [4]=>
+ string(3) "two"
+ }
+ [2]=>
+ array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(1)
+ }
+ [3]=>
+ int(1)
+ [4]=>
+ string(5) "hello"
+}
+-- Passing the sub-array --
+-- With default argument --
+array(4) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ ["str1"]=>
+ string(5) "hello"
+ ["str2"]=>
+ string(5) "world"
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ ["str1"]=>
+ string(5) "hello"
+ ["str2"]=>
+ string(5) "world"
+ [2]=>
+ string(5) "hello"
+ [3]=>
+ string(5) "world"
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation2.phpt b/ext/standard/tests/array/array_merge_recursive_variation2.phpt
new file mode 100644
index 000000000..83f237474
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation2.phpt
@@ -0,0 +1,199 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - unexpected values for $arr2 argument
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing non array values to 'arr2' argument of array_merge_recursive() and see
+ * that the function outputs proper warning messages wherever expected.
+*/
+
+echo "*** Testing array_merge_recursive() : Passing non array values to \$arr2 argument ***\n";
+
+// initialise the first argument
+$arr1 = array(1, array("hello", 'world'));
+
+//get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class A
+{
+// public $var = 10;
+ public function __toString() {
+ return "object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $arr2 argument
+$arrays = array (
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // undefined data
+/*21*/ @$undefined_var,
+
+ // unset data
+/*22*/ @$unset_var,
+
+ // resource variable
+/*23*/ $fp,
+
+ // object data
+/*24*/ new A()
+);
+
+// loop through each element of $arrays and check the behavior of array_merge_recursive()
+$iterator = 1;
+foreach($arrays as $arr2) {
+ echo "\n-- Iteration $iterator --";
+ var_dump( array_merge_recursive($arr1, $arr2) );
+ $iterator++;
+}
+
+// close the file resource used
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : Passing non array values to $arr2 argument ***
+
+-- Iteration 1 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 19 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation3.phpt b/ext/standard/tests/array/array_merge_recursive_variation3.phpt
new file mode 100644
index 000000000..722388a01
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation3.phpt
@@ -0,0 +1,761 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - different arrays for 'arr1' argument
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing different arrays to $arr1 argument and testing whether
+* array_merge_recursive() behaves in an expected way.
+*/
+
+echo "*** Testing array_merge_recursive() : Passing different arrays to \$arr1 argument ***\n";
+
+/* Different heredoc strings */
+
+// heredoc with blank line
+$blank_line = <<<EOT
+
+
+EOT;
+
+// heredoc with multiline string
+$multiline_string = <<<EOT
+hello world
+The quick brown fox jumped over;
+the lazy dog
+This is a double quoted string
+EOT;
+
+// heredoc with diferent whitespaces
+$diff_whitespaces = <<<EOT
+hello\r world\t
+1111\t\t != 2222\v\v
+heredoc\ndouble quoted string. with\vdifferent\fwhite\vspaces
+EOT;
+
+// heredoc with quoted strings and numeric values
+$numeric_string = <<<EOT
+11 < 12. 123 >22
+'single quoted string'
+"double quoted string"
+2222 != 1111.\t 0000 = 0000\n
+EOT;
+
+// arrays passed to $arr1 argument
+$arrays = array (
+/*1*/ array(1, 2,), // with default keys and numeric values
+ array(1.1, 2.2), // with default keys & float values
+ array(false, true), // with default keys and boolean values
+ array(), // empty array
+/*5*/ array(NULL), // with NULL
+ array("a\v\f", "aaaa\r", "b", "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"), // with double quoted strings
+ array('a\v\f', 'aaaa\r', 'b', '\[\]\!\@\#\$\%\^\&\*\(\)\{\}'), // with single quoted strings
+ array("h1" => $blank_line, "h2" => $multiline_string, "h3" => $diff_whitespaces), // with heredocs
+
+ // associative arrays
+/*9*/ array(1 => "one", 2 => "two"), // explicit numeric keys, string values
+ array("one" => 1, "two" => 2, "1" => 1 ), // string keys & numeric values
+ array( 1 => 10, 2 => 20, 4 => 40), // explicit numeric keys and numeric values
+ array( "one" => "ten", "two" => "twenty"), // string key/value
+ array("one" => 1, 2 => "two", 4 => "four"), //mixed
+
+ // associative array, containing null/empty/boolean values as key/value
+/*14*/ array(NULL => "NULL", null => "null", "NULL" => NULL, "null" => null),
+ array(true => "true", false => "false", "false" => false, "true" => true),
+ array("" => "emptyd", '' => 'emptys', "emptyd" => "", 'emptys' => ''),
+ array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
+ array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
+
+ // array containing embedded arrays
+/*15*/ array("str1", "array" => array("hello", 'world'), array(1, 2))
+);
+
+// initialise the second argument
+$arr2 = array( 1 => "one", 2, "string" => "hello", "array" => array("a", "b", "c"));
+
+// loop through each sub array of $arrays and check the behavior of array_merge_recursive()
+$iterator = 1;
+foreach($arrays as $arr1) {
+ echo "-- Iteration $iterator --\n";
+
+ // with default argument
+ echo "-- With default argument --\n";
+ var_dump( array_merge_recursive($arr1) );
+
+ // with more arguments
+ echo "-- With more arguments --\n";
+ var_dump( array_merge_recursive($arr1, $arr2) );
+
+ $iterator++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : Passing different arrays to $arr1 argument ***
+-- Iteration 1 --
+-- With default argument --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 2 --
+-- With default argument --
+array(2) {
+ [0]=>
+ float(1.1)
+ [1]=>
+ float(2.2)
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ float(1.1)
+ [1]=>
+ float(2.2)
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 3 --
+-- With default argument --
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 4 --
+-- With default argument --
+array(0) {
+}
+-- With more arguments --
+array(4) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 5 --
+-- With default argument --
+array(1) {
+ [0]=>
+ NULL
+}
+-- With more arguments --
+array(5) {
+ [0]=>
+ NULL
+ [1]=>
+ string(3) "one"
+ [2]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 6 --
+-- With default argument --
+array(4) {
+ [0]=>
+ string(3) "a "
+ [1]=>
+ string(5) "aaaa "
+ [2]=>
+ string(1) "b"
+ [3]=>
+ string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
+}
+-- With more arguments --
+array(8) {
+ [0]=>
+ string(3) "a "
+ [1]=>
+ string(5) "aaaa "
+ [2]=>
+ string(1) "b"
+ [3]=>
+ string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
+ [4]=>
+ string(3) "one"
+ [5]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 7 --
+-- With default argument --
+array(4) {
+ [0]=>
+ string(5) "a\v\f"
+ [1]=>
+ string(6) "aaaa\r"
+ [2]=>
+ string(1) "b"
+ [3]=>
+ string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
+}
+-- With more arguments --
+array(8) {
+ [0]=>
+ string(5) "a\v\f"
+ [1]=>
+ string(6) "aaaa\r"
+ [2]=>
+ string(1) "b"
+ [3]=>
+ string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
+ [4]=>
+ string(3) "one"
+ [5]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 8 --
+-- With default argument --
+array(3) {
+ ["h1"]=>
+ string(1) "
+"
+ ["h2"]=>
+ string(88) "hello world
+The quick brown fox jumped over;
+the lazy dog
+This is a double quoted string"
+ ["h3"]=>
+ string(88) "hello world
+1111 != 2222
+heredoc
+double quoted string. with different white spaces"
+}
+-- With more arguments --
+array(7) {
+ ["h1"]=>
+ string(1) "
+"
+ ["h2"]=>
+ string(88) "hello world
+The quick brown fox jumped over;
+the lazy dog
+This is a double quoted string"
+ ["h3"]=>
+ string(88) "hello world
+1111 != 2222
+heredoc
+double quoted string. with different white spaces"
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 9 --
+-- With default argument --
+array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 10 --
+-- With default argument --
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [0]=>
+ int(1)
+}
+-- With more arguments --
+array(7) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [0]=>
+ int(1)
+ [1]=>
+ string(3) "one"
+ [2]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 11 --
+-- With default argument --
+array(3) {
+ [0]=>
+ int(10)
+ [1]=>
+ int(20)
+ [2]=>
+ int(40)
+}
+-- With more arguments --
+array(7) {
+ [0]=>
+ int(10)
+ [1]=>
+ int(20)
+ [2]=>
+ int(40)
+ [3]=>
+ string(3) "one"
+ [4]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 12 --
+-- With default argument --
+array(2) {
+ ["one"]=>
+ string(3) "ten"
+ ["two"]=>
+ string(6) "twenty"
+}
+-- With more arguments --
+array(6) {
+ ["one"]=>
+ string(3) "ten"
+ ["two"]=>
+ string(6) "twenty"
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 13 --
+-- With default argument --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(4) "four"
+}
+-- With more arguments --
+array(7) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(4) "four"
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 14 --
+-- With default argument --
+array(3) {
+ [""]=>
+ string(4) "null"
+ ["NULL"]=>
+ NULL
+ ["null"]=>
+ NULL
+}
+-- With more arguments --
+array(7) {
+ [""]=>
+ string(4) "null"
+ ["NULL"]=>
+ NULL
+ ["null"]=>
+ NULL
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 15 --
+-- With default argument --
+array(4) {
+ [0]=>
+ string(4) "true"
+ [1]=>
+ string(5) "false"
+ ["false"]=>
+ bool(false)
+ ["true"]=>
+ bool(true)
+}
+-- With more arguments --
+array(8) {
+ [0]=>
+ string(4) "true"
+ [1]=>
+ string(5) "false"
+ ["false"]=>
+ bool(false)
+ ["true"]=>
+ bool(true)
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 16 --
+-- With default argument --
+array(3) {
+ [""]=>
+ string(6) "emptys"
+ ["emptyd"]=>
+ string(0) ""
+ ["emptys"]=>
+ string(0) ""
+}
+-- With more arguments --
+array(7) {
+ [""]=>
+ string(6) "emptys"
+ ["emptyd"]=>
+ string(0) ""
+ ["emptys"]=>
+ string(0) ""
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 17 --
+-- With default argument --
+array(6) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ NULL
+ [3]=>
+ NULL
+ [4]=>
+ bool(false)
+ [5]=>
+ bool(true)
+}
+-- With more arguments --
+array(10) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ NULL
+ [3]=>
+ NULL
+ [4]=>
+ bool(false)
+ [5]=>
+ bool(true)
+ [6]=>
+ string(3) "one"
+ [7]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 18 --
+-- With default argument --
+array(3) {
+ [""]=>
+ int(4)
+ [0]=>
+ int(5)
+ [1]=>
+ int(6)
+}
+-- With more arguments --
+array(7) {
+ [""]=>
+ int(4)
+ [0]=>
+ int(5)
+ [1]=>
+ int(6)
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 19 --
+-- With default argument --
+array(3) {
+ [0]=>
+ string(4) "str1"
+ ["array"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ string(4) "str1"
+ ["array"]=>
+ array(5) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ [2]=>
+ string(1) "a"
+ [3]=>
+ string(1) "b"
+ [4]=>
+ string(1) "c"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation4.phpt b/ext/standard/tests/array/array_merge_recursive_variation4.phpt
new file mode 100644
index 000000000..bacfe3aff
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation4.phpt
@@ -0,0 +1,424 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - associative array with different keys
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_merge_recursive() by passing different
+ * associative arrays having different keys to $arr1 argument.
+*/
+
+echo "*** Testing array_merge_recursive() : assoc. array with diff. keys to \$arr1 argument ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a class
+class classA
+{
+ public function __toString(){
+ return "Class A object";
+ }
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// different associative arrays to be passed to $arr1 argument
+$arrays = array (
+/*1*/ // arrays with integer keys
+ array(0 => "0", 1 => array(1 => "one")),
+ array(1 => "1", 2 => array(1 => "one", 2 => "two", 3 => 1, 4 => "4")),
+
+ // arrays with float keys
+/*3*/ array(2.3333 => "float", 44.44 => array(1.1 => "float")),
+ array(1.2 => "f1", 3.33 => "f2", 4.89999922839999 => array(1.1 => "f1"), 3333333.333333 => "f4"),
+
+ // arrays with string keys
+/*5*/ array('\tHello' => array("hello", 'world'), '\v\fworld' => 2.2, 'pen\n' => 111),
+ array("\tHello" => array("hello", 'world'), "\v\fworld" => 2.2, "pen\n" => 111),
+ array("hello", $heredoc => array("heredoc", 'string'), "string"),
+
+ // array with object, unset variable and resource variable
+/*8*/ array(new classA() => 11, @$unset_var => array("unset"), $fp => 'resource', 11, "hello")
+);
+
+// initialise the second array
+$arr2 = array( 1 => "one", 2, "string" => "hello", "array" => array("a", "b", "c"));
+
+// loop through each sub array of $arrays and check the behavior of array_merge_recursive()
+$iterator = 1;
+foreach($arrays as $arr1) {
+ echo "-- Iteration $iterator --\n";
+
+ // with default argument
+ echo "-- With default argument --\n";
+ var_dump( array_merge_recursive($arr1) );
+
+ // with more arguments
+ echo "-- With more arguments --\n";
+ var_dump( array_merge_recursive($arr1, $arr2) );
+
+ $iterator++;
+}
+
+// close the file resource used
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : assoc. array with diff. keys to $arr1 argument ***
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+-- Iteration 1 --
+-- With default argument --
+array(2) {
+ [0]=>
+ string(1) "0"
+ [1]=>
+ array(1) {
+ [1]=>
+ string(3) "one"
+ }
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ string(1) "0"
+ [1]=>
+ array(1) {
+ [1]=>
+ string(3) "one"
+ }
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 2 --
+-- With default argument --
+array(2) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ array(4) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ int(1)
+ [4]=>
+ string(1) "4"
+ }
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ array(4) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ int(1)
+ [4]=>
+ string(1) "4"
+ }
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 3 --
+-- With default argument --
+array(2) {
+ [0]=>
+ string(5) "float"
+ [1]=>
+ array(1) {
+ [1]=>
+ string(5) "float"
+ }
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ string(5) "float"
+ [1]=>
+ array(1) {
+ [1]=>
+ string(5) "float"
+ }
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 4 --
+-- With default argument --
+array(4) {
+ [0]=>
+ string(2) "f1"
+ [1]=>
+ string(2) "f2"
+ [2]=>
+ array(1) {
+ [1]=>
+ string(2) "f1"
+ }
+ [3]=>
+ string(2) "f4"
+}
+-- With more arguments --
+array(8) {
+ [0]=>
+ string(2) "f1"
+ [1]=>
+ string(2) "f2"
+ [2]=>
+ array(1) {
+ [1]=>
+ string(2) "f1"
+ }
+ [3]=>
+ string(2) "f4"
+ [4]=>
+ string(3) "one"
+ [5]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 5 --
+-- With default argument --
+array(3) {
+ ["\tHello"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ ["\v\fworld"]=>
+ float(2.2)
+ ["pen\n"]=>
+ int(111)
+}
+-- With more arguments --
+array(7) {
+ ["\tHello"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ ["\v\fworld"]=>
+ float(2.2)
+ ["pen\n"]=>
+ int(111)
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 6 --
+-- With default argument --
+array(3) {
+ [" Hello"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [" world"]=>
+ float(2.2)
+ ["pen
+"]=>
+ int(111)
+}
+-- With more arguments --
+array(7) {
+ [" Hello"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [" world"]=>
+ float(2.2)
+ ["pen
+"]=>
+ int(111)
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 7 --
+-- With default argument --
+array(3) {
+ [0]=>
+ string(5) "hello"
+ ["Hello world"]=>
+ array(2) {
+ [0]=>
+ string(7) "heredoc"
+ [1]=>
+ string(6) "string"
+ }
+ [1]=>
+ string(6) "string"
+}
+-- With more arguments --
+array(7) {
+ [0]=>
+ string(5) "hello"
+ ["Hello world"]=>
+ array(2) {
+ [0]=>
+ string(7) "heredoc"
+ [1]=>
+ string(6) "string"
+ }
+ [1]=>
+ string(6) "string"
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 8 --
+-- With default argument --
+array(3) {
+ [""]=>
+ array(1) {
+ [0]=>
+ string(5) "unset"
+ }
+ [0]=>
+ int(11)
+ [1]=>
+ string(5) "hello"
+}
+-- With more arguments --
+array(7) {
+ [""]=>
+ array(1) {
+ [0]=>
+ string(5) "unset"
+ }
+ [0]=>
+ int(11)
+ [1]=>
+ string(5) "hello"
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation5.phpt b/ext/standard/tests/array/array_merge_recursive_variation5.phpt
new file mode 100644
index 000000000..3b251220e
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation5.phpt
@@ -0,0 +1,404 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - associative array with different values
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_merge_recursive() by passing different
+ * associative arrays having different values to $arr1 argument.
+*/
+
+echo "*** Testing array_merge_recursive() : assoc. array with diff. values to \$arr1 argument ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a class
+class classA
+{
+ public function __toString(){
+ return "Class A object";
+ }
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// different associative arrays to be passed to $arr1 argument
+$arrays = array (
+// arrays with integer values
+/*1*/ array('0' => 0, '1' => 0),
+ array("one" => 1, 'two' => 2, "three" => 1, 4 => 1),
+
+ // arrays with float values
+/*3*/ array("f1" => 2.3333, "f2" => 2.3333, "f3" => array(1.1, 2.22)),
+ array("f1" => 1.2, 'f2' => 3.33, 3 => 4.89999922839999, 'f4' => array(1.2, 'f4' => 1.2)),
+
+ // arrays with string values
+/*5*/ array(111 => "\tHello", "array" => "col\tor", 2 => "\v\fworld", 3.3 => "\tHello"),
+ array(111 => '\tHello', 'array' => 'col\tor', 2 => '\v\fworld', 3.3 => '\tHello'),
+ array(1 => "hello", "string" => $heredoc, $heredoc),
+
+ // array with object, unset variable and resource variable
+/*8*/ array(11 => new classA(), "string" => @$unset_var, "resource" => $fp, new classA(), $fp),
+);
+
+// initialise the second array
+$arr2 = array( 1 => "one", 2, "string" => "hello", "array" => array("a", "b", "c"));
+
+// loop through each sub array of $arrays and check the behavior of array_merge_recursive()
+$iterator = 1;
+foreach($arrays as $arr1) {
+ echo "-- Iteration $iterator --\n";
+
+ // with default argument
+ echo "-- With default argument --\n";
+ var_dump( array_merge_recursive($arr1) );
+
+ // with more arguments
+ echo "-- With more arguments --\n";
+ var_dump( array_merge_recursive($arr1, $arr2) );
+
+ $iterator++;
+}
+
+// close the file resource used
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : assoc. array with diff. values to $arr1 argument ***
+-- Iteration 1 --
+-- With default argument --
+array(2) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(0)
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(0)
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 2 --
+-- With default argument --
+array(4) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(1)
+ [0]=>
+ int(1)
+}
+-- With more arguments --
+array(8) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(1)
+ [0]=>
+ int(1)
+ [1]=>
+ string(3) "one"
+ [2]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 3 --
+-- With default argument --
+array(3) {
+ ["f1"]=>
+ float(2.3333)
+ ["f2"]=>
+ float(2.3333)
+ ["f3"]=>
+ array(2) {
+ [0]=>
+ float(1.1)
+ [1]=>
+ float(2.22)
+ }
+}
+-- With more arguments --
+array(7) {
+ ["f1"]=>
+ float(2.3333)
+ ["f2"]=>
+ float(2.3333)
+ ["f3"]=>
+ array(2) {
+ [0]=>
+ float(1.1)
+ [1]=>
+ float(2.22)
+ }
+ [0]=>
+ string(3) "one"
+ [1]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 4 --
+-- With default argument --
+array(4) {
+ ["f1"]=>
+ float(1.2)
+ ["f2"]=>
+ float(3.33)
+ [0]=>
+ float(4.8999992284)
+ ["f4"]=>
+ array(2) {
+ [0]=>
+ float(1.2)
+ ["f4"]=>
+ float(1.2)
+ }
+}
+-- With more arguments --
+array(8) {
+ ["f1"]=>
+ float(1.2)
+ ["f2"]=>
+ float(3.33)
+ [0]=>
+ float(4.8999992284)
+ ["f4"]=>
+ array(2) {
+ [0]=>
+ float(1.2)
+ ["f4"]=>
+ float(1.2)
+ }
+ [1]=>
+ string(3) "one"
+ [2]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 5 --
+-- With default argument --
+array(4) {
+ [0]=>
+ string(6) " Hello"
+ ["array"]=>
+ string(6) "col or"
+ [1]=>
+ string(7) " world"
+ [2]=>
+ string(6) " Hello"
+}
+-- With more arguments --
+array(7) {
+ [0]=>
+ string(6) " Hello"
+ ["array"]=>
+ array(4) {
+ [0]=>
+ string(6) "col or"
+ [1]=>
+ string(1) "a"
+ [2]=>
+ string(1) "b"
+ [3]=>
+ string(1) "c"
+ }
+ [1]=>
+ string(7) " world"
+ [2]=>
+ string(6) " Hello"
+ [3]=>
+ string(3) "one"
+ [4]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+}
+-- Iteration 6 --
+-- With default argument --
+array(4) {
+ [0]=>
+ string(7) "\tHello"
+ ["array"]=>
+ string(7) "col\tor"
+ [1]=>
+ string(9) "\v\fworld"
+ [2]=>
+ string(7) "\tHello"
+}
+-- With more arguments --
+array(7) {
+ [0]=>
+ string(7) "\tHello"
+ ["array"]=>
+ array(4) {
+ [0]=>
+ string(7) "col\tor"
+ [1]=>
+ string(1) "a"
+ [2]=>
+ string(1) "b"
+ [3]=>
+ string(1) "c"
+ }
+ [1]=>
+ string(9) "\v\fworld"
+ [2]=>
+ string(7) "\tHello"
+ [3]=>
+ string(3) "one"
+ [4]=>
+ int(2)
+ ["string"]=>
+ string(5) "hello"
+}
+-- Iteration 7 --
+-- With default argument --
+array(3) {
+ [0]=>
+ string(5) "hello"
+ ["string"]=>
+ string(11) "Hello world"
+ [1]=>
+ string(11) "Hello world"
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ string(5) "hello"
+ ["string"]=>
+ array(2) {
+ [0]=>
+ string(11) "Hello world"
+ [1]=>
+ string(5) "hello"
+ }
+ [1]=>
+ string(11) "Hello world"
+ [2]=>
+ string(3) "one"
+ [3]=>
+ int(2)
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+-- Iteration 8 --
+-- With default argument --
+array(5) {
+ [0]=>
+ object(classA)#%d (0) {
+ }
+ ["string"]=>
+ NULL
+ ["resource"]=>
+ resource(%d) of type (stream)
+ [1]=>
+ object(classA)#%d (0) {
+ }
+ [2]=>
+ resource(%d) of type (stream)
+}
+-- With more arguments --
+array(8) {
+ [0]=>
+ object(classA)#%d (0) {
+ }
+ ["string"]=>
+ array(2) {
+ [0]=>
+ NULL
+ [1]=>
+ string(5) "hello"
+ }
+ ["resource"]=>
+ resource(%d) of type (stream)
+ [1]=>
+ object(classA)#%d (0) {
+ }
+ [2]=>
+ resource(%d) of type (stream)
+ [3]=>
+ string(3) "one"
+ [4]=>
+ int(2)
+ ["array"]=>
+ array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation6.phpt b/ext/standard/tests/array/array_merge_recursive_variation6.phpt
new file mode 100644
index 000000000..8e460ba36
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation6.phpt
@@ -0,0 +1,113 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - array with duplicate keys
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_merge_recursive() by passing
+ * array having duplicate keys.
+*/
+
+echo "*** Testing array_merge_recursive() : array with duplicate keys for \$arr1 argument ***\n";
+
+/* initialize the array having duplicate keys */
+// array with numeric keys
+$arr1_numeric_key = array( 1 => "one", 2 => "two", 2 => array(1, 2), 3 => "three", 1 => array("duplicate", 'strings'));
+// array with string keys
+$arr1_string_key = array("str1" => "hello", "str2" => 111, "str1" => "world", "str2" => 111.111);
+
+// initialize the second argument
+$arr2 = array("one", "str1" => "two", array("one", "two"));
+
+echo "-- With default argument --\n";
+var_dump( array_merge_recursive($arr1_numeric_key) );
+var_dump( array_merge_recursive($arr1_string_key) );
+
+echo "-- With more arguments --\n";
+var_dump( array_merge_recursive($arr1_numeric_key, $arr2) );
+var_dump( array_merge_recursive($arr1_string_key, $arr2) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : array with duplicate keys for $arr1 argument ***
+-- With default argument --
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(9) "duplicate"
+ [1]=>
+ string(7) "strings"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ string(5) "three"
+}
+array(2) {
+ ["str1"]=>
+ string(5) "world"
+ ["str2"]=>
+ float(111.111)
+}
+-- With more arguments --
+array(6) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(9) "duplicate"
+ [1]=>
+ string(7) "strings"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ string(5) "three"
+ [3]=>
+ string(3) "one"
+ ["str1"]=>
+ string(3) "two"
+ [4]=>
+ array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ }
+}
+array(4) {
+ ["str1"]=>
+ array(2) {
+ [0]=>
+ string(5) "world"
+ [1]=>
+ string(3) "two"
+ }
+ ["str2"]=>
+ float(111.111)
+ [0]=>
+ string(3) "one"
+ [1]=>
+ array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation7.phpt b/ext/standard/tests/array/array_merge_recursive_variation7.phpt
new file mode 100644
index 000000000..b244e7d6b
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation7.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - array with reference variables
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_merge_recursive() by passing
+ * array having reference variables.
+*/
+
+echo "*** Testing array_merge_recursive() : array with reference variables for \$arr1 argument ***\n";
+
+$value1 = 10;
+$value2 = "hello";
+$value3 = 0;
+$value4 = &$value2;
+
+// input array containing elements as reference variables
+$arr1 = array(
+ 0 => 0,
+ 1 => &$value4,
+ 2 => &$value2,
+ 3 => "hello",
+ 4 => &$value3,
+ $value4 => &$value2
+);
+
+// initialize the second argument
+$arr2 = array($value4 => "hello", &$value2);
+
+echo "-- With default argument --\n";
+var_dump( array_merge_recursive($arr1) );
+
+echo "-- With more arguments --\n";
+var_dump( array_merge_recursive($arr1, $arr2) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : array with reference variables for $arr1 argument ***
+-- With default argument --
+array(6) {
+ [0]=>
+ int(0)
+ [1]=>
+ &string(5) "hello"
+ [2]=>
+ &string(5) "hello"
+ [3]=>
+ string(5) "hello"
+ [4]=>
+ &int(0)
+ ["hello"]=>
+ &string(5) "hello"
+}
+-- With more arguments --
+array(7) {
+ [0]=>
+ int(0)
+ [1]=>
+ &string(5) "hello"
+ [2]=>
+ &string(5) "hello"
+ [3]=>
+ string(5) "hello"
+ [4]=>
+ &int(0)
+ ["hello"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "hello"
+ }
+ [5]=>
+ &string(5) "hello"
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation8.phpt b/ext/standard/tests/array/array_merge_recursive_variation8.phpt
new file mode 100644
index 000000000..6ad2f6989
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation8.phpt
@@ -0,0 +1,73 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - binary safe checking
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_merge_recursive() by passing an array having binary values.
+*/
+
+echo "*** Testing array_merge_recursive() : array with binary data for \$arr1 argument ***\n";
+
+// array with binary values
+$arr1 = array(b"1", b"hello" => "hello", b"world", "str1" => b"hello", "str2" => "world");
+
+// initialize the second argument
+$arr2 = array(b"str1" => b"binary", b"hello" => "binary", b"str2" => b"binary");
+
+echo "-- With default argument --\n";
+var_dump( array_merge_recursive($arr1) );
+
+echo "-- With more arguments --\n";
+var_dump( array_merge_recursive($arr1, $arr2) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : array with binary data for $arr1 argument ***
+-- With default argument --
+array(5) {
+ [0]=>
+ string(1) "1"
+ ["hello"]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ ["str1"]=>
+ string(5) "hello"
+ ["str2"]=>
+ string(5) "world"
+}
+-- With more arguments --
+array(5) {
+ [0]=>
+ string(1) "1"
+ ["hello"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(6) "binary"
+ }
+ [1]=>
+ string(5) "world"
+ ["str1"]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(6) "binary"
+ }
+ ["str2"]=>
+ array(2) {
+ [0]=>
+ string(5) "world"
+ [1]=>
+ string(6) "binary"
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_recursive_variation9.phpt b/ext/standard/tests/array/array_merge_recursive_variation9.phpt
new file mode 100644
index 000000000..d51d2f890
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_recursive_variation9.phpt
@@ -0,0 +1,117 @@
+--TEST--
+Test array_merge_recursive() function : usage variations - common key and value(Bug#43559)
+--FILE--
+<?php
+/* Prototype : array array_merge_recursive(array $arr1[, array $...])
+ * Description: Recursively merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_merge_recursive() by passing
+ * arrays having common key and value.
+*/
+
+echo "*** Testing array_merge_recursive() : arrays with common key and value ***\n";
+
+/* initialize the array having duplicate values */
+
+// integer values
+$arr1 = array("a" => 1, "b" => 2);
+$arr2 = array("b" => 2, "c" => 4);
+echo "-- Integer values --\n";
+var_dump( array_merge_recursive($arr1, $arr2) );
+
+// float values
+$arr1 = array("a" => 1.1, "b" => 2.2);
+$arr2 = array("b" => 2.2, "c" => 3.3);
+echo "-- Float values --\n";
+var_dump( array_merge_recursive($arr1, $arr2) );
+
+// string values
+$arr1 = array("a" => "hello", "b" => "world");
+$arr2 = array("b" => "world", "c" => "string");
+echo "-- String values --\n";
+var_dump( array_merge_recursive($arr1, $arr2) );
+
+// boolean values
+$arr1 = array("a" => true, "b" => false);
+$arr2 = array("b" => false);
+echo "-- Boolean values --\n";
+var_dump( array_merge_recursive($arr1, $arr2) );
+
+// null values
+$arr1 = array( "a" => NULL);
+$arr2 = array( "a" => NULL);
+echo "-- Null values --\n";
+var_dump( array_merge_recursive($arr1, $arr2) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge_recursive() : arrays with common key and value ***
+-- Integer values --
+array(3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(2)
+ }
+ ["c"]=>
+ int(4)
+}
+-- Float values --
+array(3) {
+ ["a"]=>
+ float(1.1)
+ ["b"]=>
+ array(2) {
+ [0]=>
+ float(2.2)
+ [1]=>
+ float(2.2)
+ }
+ ["c"]=>
+ float(3.3)
+}
+-- String values --
+array(3) {
+ ["a"]=>
+ string(5) "hello"
+ ["b"]=>
+ array(2) {
+ [0]=>
+ string(5) "world"
+ [1]=>
+ string(5) "world"
+ }
+ ["c"]=>
+ string(6) "string"
+}
+-- Boolean values --
+array(2) {
+ ["a"]=>
+ bool(true)
+ ["b"]=>
+ array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+ }
+}
+-- Null values --
+array(1) {
+ ["a"]=>
+ array(2) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_merge_variation1.phpt b/ext/standard/tests/array/array_merge_variation1.phpt
new file mode 100644
index 000000000..1ce71debb
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation1.phpt
@@ -0,0 +1,231 @@
+--TEST--
+Test array_merge() function : usage variations - Pass different data types to $arr1 arg
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $arr1 argument to test behaviour
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$arr2 = array (1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $arr1 argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_merge()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_merge($input, $arr2) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+-- Iteration 19 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: array_merge(): Argument #1 is not an array in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_merge_variation10.phpt b/ext/standard/tests/array/array_merge_variation10.phpt
new file mode 100644
index 000000000..7f08a4bb7
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation10.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test array_merge() function : usage variations - position of internal array pointer
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Check the position of the internal array pointer after calling array_merge().
+ * This test is also passing more than two arguments to array_merge().
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+$arr1 = array ('zero', 'one', 'two');
+$arr2 = array ('zero', 'un', 'deux');
+$arr3 = array ('null', 'eins', 'zwei');
+
+echo "\n-- Call array_merge() --\n";
+var_dump($result = array_merge($arr1, $arr2, $arr3));
+
+echo "\n-- Position of Internal Pointer in Result: --\n";
+echo key($result) . " => " . current($result) . "\n";
+
+echo "\n-- Position of Internal Pointer in Original Array: --\n";
+echo "\$arr1: ";
+echo key($arr1) . " => " . current ($arr1) . "\n";
+echo "\$arr2: ";
+echo key($arr2) . " => " . current ($arr2) . "\n";
+echo "\$arr3: ";
+echo key($arr3) . " => " . current ($arr3) . "\n";
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+
+-- Call array_merge() --
+array(9) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ string(4) "zero"
+ [4]=>
+ string(2) "un"
+ [5]=>
+ string(4) "deux"
+ [6]=>
+ string(4) "null"
+ [7]=>
+ string(4) "eins"
+ [8]=>
+ string(4) "zwei"
+}
+
+-- Position of Internal Pointer in Result: --
+0 => zero
+
+-- Position of Internal Pointer in Original Array: --
+$arr1: 0 => zero
+$arr2: 0 => zero
+$arr3: 0 => null
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_variation2.phpt b/ext/standard/tests/array/array_merge_variation2.phpt
new file mode 100644
index 000000000..4ebbeb92b
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation2.phpt
@@ -0,0 +1,230 @@
+--TEST--
+Test array_merge() function : usage variations - Pass different data types as $arr2 arg
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $arr2 argument to array_merge() to test behaviour
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$arr1 = array (1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $arr2 argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_merge()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_merge($arr1, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+-- Iteration 19 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: array_merge(): Argument #2 is not an array in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_merge_variation3.phpt b/ext/standard/tests/array/array_merge_variation3.phpt
new file mode 100644
index 000000000..717968adb
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation3.phpt
@@ -0,0 +1,379 @@
+--TEST--
+Test array_merge() function : usage variations - arrays of diff. data types
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays of different data types to test how array_merge adds them
+ * onto an existing array
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$arr = array (1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// arrays of different data types to be passed as $input
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0,
+ 1,
+ 12345,
+ -2345,
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+ ),
+
+ // null data
+/*3*/ 'null' => array(
+ NULL,
+ null,
+ ),
+
+ // boolean data
+/*4*/ 'bool' => array(
+ true,
+ false,
+ TRUE,
+ FALSE,
+ ),
+
+ // empty data
+/*5*/ 'empty string' => array(
+ "",
+ '',
+ ),
+
+/*6*/ 'empty array' => array(
+ ),
+
+ // string data
+/*7*/ 'string' => array(
+ "string",
+ 'string',
+ $heredoc,
+ ),
+
+ // object data
+/*8*/ 'object' => array(
+ new classA(),
+ ),
+
+ // undefined data
+/*9*/ 'undefined' => array(
+ @$undefined_var,
+ ),
+
+ // unset data
+/*10*/ 'unset' => array(
+ @$unset_var,
+ ),
+
+ // resource variable
+/*11*/ 'resource' => array(
+ $fp
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of array_merge
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator: $key data --\n";
+ var_dump( array_merge($input, $arr) );
+ var_dump( array_merge($arr, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+
+-- Iteration 1: int data --
+array(6) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(12345)
+ [3]=>
+ int(-2345)
+ [4]=>
+ int(1)
+ [5]=>
+ int(2)
+}
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(0)
+ [3]=>
+ int(1)
+ [4]=>
+ int(12345)
+ [5]=>
+ int(-2345)
+}
+
+-- Iteration 2: float data --
+array(7) {
+ [0]=>
+ float(10.5)
+ [1]=>
+ float(-10.5)
+ [2]=>
+ float(123456789000)
+ [3]=>
+ float(1.23456789E-9)
+ [4]=>
+ float(0.5)
+ [5]=>
+ int(1)
+ [6]=>
+ int(2)
+}
+array(7) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ float(10.5)
+ [3]=>
+ float(-10.5)
+ [4]=>
+ float(123456789000)
+ [5]=>
+ float(1.23456789E-9)
+ [6]=>
+ float(0.5)
+}
+
+-- Iteration 3: null data --
+array(4) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ NULL
+ [3]=>
+ NULL
+}
+
+-- Iteration 4: bool data --
+array(6) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(false)
+ [2]=>
+ bool(true)
+ [3]=>
+ bool(false)
+ [4]=>
+ int(1)
+ [5]=>
+ int(2)
+}
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ bool(true)
+ [3]=>
+ bool(false)
+ [4]=>
+ bool(true)
+ [5]=>
+ bool(false)
+}
+
+-- Iteration 5: empty string data --
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(0) ""
+ [3]=>
+ string(0) ""
+}
+
+-- Iteration 6: empty array data --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+-- Iteration 7: string data --
+array(5) {
+ [0]=>
+ string(6) "string"
+ [1]=>
+ string(6) "string"
+ [2]=>
+ string(11) "hello world"
+ [3]=>
+ int(1)
+ [4]=>
+ int(2)
+}
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(6) "string"
+ [3]=>
+ string(6) "string"
+ [4]=>
+ string(11) "hello world"
+}
+
+-- Iteration 8: object data --
+array(3) {
+ [0]=>
+ object(classA)#%d (0) {
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ object(classA)#%d (0) {
+ }
+}
+
+-- Iteration 9: undefined data --
+array(3) {
+ [0]=>
+ NULL
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ NULL
+}
+
+-- Iteration 10: unset data --
+array(3) {
+ [0]=>
+ NULL
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ NULL
+}
+
+-- Iteration 11: resource data --
+array(3) {
+ [0]=>
+ resource(%d) of type (stream)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ resource(%d) of type (stream)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_variation4.phpt b/ext/standard/tests/array/array_merge_variation4.phpt
new file mode 100644
index 000000000..e4eb2570c
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation4.phpt
@@ -0,0 +1,368 @@
+--TEST--
+Test array_merge() function : usage variations - Diff. data types as array keys
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass an array with different data types as keys to test how array_merge
+ * adds it onto an existing array
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$arr = array ('one' => 1, 'two' => 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// arrays with keys as different data types to be passed as $input
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+/*3*/ 'extreme floats' => array(
+ 12.3456789000e10 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*4*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+
+/*5*/ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*6*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+
+/*7*/ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*8*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+
+/*9*/ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*10*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*11*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*12*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of array_merge
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator: $key data --\n";
+ var_dump( array_merge($input, $arr) );
+ var_dump( array_merge($arr, $input) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+
+-- Iteration 1: int data --
+array(6) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(8) "positive"
+ [3]=>
+ string(8) "negative"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(6) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(8) "positive"
+ [3]=>
+ string(8) "negative"
+}
+
+-- Iteration 2: float data --
+array(5) {
+ [0]=>
+ string(8) "positive"
+ [1]=>
+ string(8) "negative"
+ [2]=>
+ string(4) "half"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(5) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [0]=>
+ string(8) "positive"
+ [1]=>
+ string(8) "negative"
+ [2]=>
+ string(4) "half"
+}
+
+-- Iteration 3: extreme floats data --
+array(4) {
+ [0]=>
+ string(5) "large"
+ [1]=>
+ string(5) "small"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(4) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [0]=>
+ string(5) "large"
+ [1]=>
+ string(5) "small"
+}
+
+-- Iteration 4: null uppercase data --
+array(3) {
+ [""]=>
+ string(6) "null 1"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [""]=>
+ string(6) "null 1"
+}
+
+-- Iteration 5: null lowercase data --
+array(3) {
+ [""]=>
+ string(6) "null 2"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [""]=>
+ string(6) "null 2"
+}
+
+-- Iteration 6: bool lowercase data --
+array(4) {
+ [0]=>
+ string(6) "lowert"
+ [1]=>
+ string(6) "lowerf"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(4) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [0]=>
+ string(6) "lowert"
+ [1]=>
+ string(6) "lowerf"
+}
+
+-- Iteration 7: bool uppercase data --
+array(4) {
+ [0]=>
+ string(6) "uppert"
+ [1]=>
+ string(6) "upperf"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(4) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [0]=>
+ string(6) "uppert"
+ [1]=>
+ string(6) "upperf"
+}
+
+-- Iteration 8: empty double quotes data --
+array(3) {
+ [""]=>
+ string(6) "emptyd"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [""]=>
+ string(6) "emptyd"
+}
+
+-- Iteration 9: empty single quotes data --
+array(3) {
+ [""]=>
+ string(6) "emptys"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [""]=>
+ string(6) "emptys"
+}
+
+-- Iteration 10: string data --
+array(5) {
+ ["stringd"]=>
+ string(7) "stringd"
+ ["strings"]=>
+ string(7) "strings"
+ ["hello world"]=>
+ string(7) "stringh"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(5) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["stringd"]=>
+ string(7) "stringd"
+ ["strings"]=>
+ string(7) "strings"
+ ["hello world"]=>
+ string(7) "stringh"
+}
+
+-- Iteration 11: undefined data --
+array(3) {
+ [""]=>
+ string(9) "undefined"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [""]=>
+ string(9) "undefined"
+}
+
+-- Iteration 12: unset data --
+array(3) {
+ [""]=>
+ string(5) "unset"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+array(3) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ [""]=>
+ string(5) "unset"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_variation5.phpt b/ext/standard/tests/array/array_merge_variation5.phpt
new file mode 100644
index 000000000..eca6078e6
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation5.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test array_merge() function : usage variations - numeric keys
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass array_merge() arrays with only numeric keys to test behaviour.
+ * $arr2 contains a duplicate element to $arr1.
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+//numeric keys
+$arr1 = array('zero', 'one', 'two', 'three');
+$arr2 = array(1 => 'one', 20 => 'twenty', 30 => 'thirty');
+
+var_dump(array_merge($arr1, $arr2));
+var_dump(array_merge($arr2, $arr1));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+array(7) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ string(5) "three"
+ [4]=>
+ string(3) "one"
+ [5]=>
+ string(6) "twenty"
+ [6]=>
+ string(6) "thirty"
+}
+array(7) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(6) "twenty"
+ [2]=>
+ string(6) "thirty"
+ [3]=>
+ string(4) "zero"
+ [4]=>
+ string(3) "one"
+ [5]=>
+ string(3) "two"
+ [6]=>
+ string(5) "three"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_variation6.phpt b/ext/standard/tests/array/array_merge_variation6.phpt
new file mode 100644
index 000000000..13b346eb3
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation6.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test array_merge() function : usage variations - string keys
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass array_merge arrays with string keys to test behaviour.
+ * $arr2 has a duplicate key to $arr1
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+//string keys
+$arr1 = array('zero' => 'zero', 'one' => 'un', 'two' => 'deux');
+$arr2 = array('zero' => 'zero', 'un' => 'eins', 'deux' => 'zwei');
+
+var_dump(array_merge($arr1, $arr2));
+var_dump(array_merge($arr2, $arr1));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+array(5) {
+ ["zero"]=>
+ string(4) "zero"
+ ["one"]=>
+ string(2) "un"
+ ["two"]=>
+ string(4) "deux"
+ ["un"]=>
+ string(4) "eins"
+ ["deux"]=>
+ string(4) "zwei"
+}
+array(5) {
+ ["zero"]=>
+ string(4) "zero"
+ ["un"]=>
+ string(4) "eins"
+ ["deux"]=>
+ string(4) "zwei"
+ ["one"]=>
+ string(2) "un"
+ ["two"]=>
+ string(4) "deux"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_variation7.phpt b/ext/standard/tests/array/array_merge_variation7.phpt
new file mode 100644
index 000000000..00943f3ea
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation7.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Test array_merge() function : usage variations - Mixed keys
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass array_merge() arrays with mixed keys to test how it attaches them to
+ * existing arrays
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+//mixed keys
+$arr1 = array('zero', 20 => 'twenty', 'thirty' => 30, true => 'bool');
+$arr2 = array(0, 1, 2, null => 'null', 1.234E-10 => 'float');
+
+var_dump(array_merge($arr1, $arr2));
+var_dump(array_merge($arr2, $arr1));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+array(8) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(6) "twenty"
+ ["thirty"]=>
+ int(30)
+ [2]=>
+ string(4) "bool"
+ [3]=>
+ string(5) "float"
+ [4]=>
+ int(1)
+ [5]=>
+ int(2)
+ [""]=>
+ string(4) "null"
+}
+array(8) {
+ [0]=>
+ string(5) "float"
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [""]=>
+ string(4) "null"
+ [3]=>
+ string(4) "zero"
+ [4]=>
+ string(6) "twenty"
+ ["thirty"]=>
+ int(30)
+ [5]=>
+ string(4) "bool"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_variation8.phpt b/ext/standard/tests/array/array_merge_variation8.phpt
new file mode 100644
index 000000000..a4cdea74f
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation8.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Test array_merge() function : usage variations - multi-dimensional arrays
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_merge() with multi-dimensional arrays
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+$arr1 = array('zero', 'one', 'two', array(0));
+$arr2 = array(1, 2, 3);
+
+echo "\n-- Merge a two-dimensional and a one-dimensional array --\n";
+var_dump(array_merge($arr1, $arr2));
+
+echo "\n-- Merge an array and a sub-array --\n";
+var_dump(array_merge($arr1[3], $arr2));
+var_dump(array_merge($arr2, $arr1[3]));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+
+-- Merge a two-dimensional and a one-dimensional array --
+array(7) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ array(1) {
+ [0]=>
+ int(0)
+ }
+ [4]=>
+ int(1)
+ [5]=>
+ int(2)
+ [6]=>
+ int(3)
+}
+
+-- Merge an array and a sub-array --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+}
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(0)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_merge_variation9.phpt b/ext/standard/tests/array/array_merge_variation9.phpt
new file mode 100644
index 000000000..e42e29282
--- /dev/null
+++ b/ext/standard/tests/array/array_merge_variation9.phpt
@@ -0,0 +1,114 @@
+--TEST--
+Test array_merge() function : usage variations - referenced variables
+--INI--
+allow_call_time_pass_reference=on
+--FILE--
+<?php
+/* Prototype : array array_merge(array $arr1, array $arr2 [, array $...])
+ * Description: Merges elements from passed arrays into one array
+ * Source code: ext/standard/array.c
+ */
+
+/* Test array_merge() when:
+ * 1. Passed an array made up of referenced variables
+ * 2. Passed an array as the first argument and a reference to that array as the second.
+ */
+
+echo "*** Testing array_merge() : usage variations ***\n";
+
+$val1 = 'foo';
+$val2 = 'bar';
+$val3 = 'baz';
+
+$arr1 = array(&$val1, &$val2, &$val3);
+$arr2 = array('key1' => 'val1', 'key2' => 'val2', 'key3' => 'val3');
+
+echo "\n-- Merge an array made up of referenced variables to an assoc. array --\n";
+var_dump(array_merge($arr1, $arr2));
+var_dump(array_merge($arr2, $arr1));
+
+$val2 = 'hello world';
+
+echo "\n-- Change \$val2 --\n";
+var_dump(array_merge($arr1, $arr2));
+var_dump(array_merge($arr2, $arr1));
+
+echo "\n-- Merge an array and a reference to the first array --\n";
+var_dump(array_merge($arr2, &$arr2));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_merge() : usage variations ***
+
+-- Merge an array made up of referenced variables to an assoc. array --
+array(6) {
+ [0]=>
+ &string(3) "foo"
+ [1]=>
+ &string(3) "bar"
+ [2]=>
+ &string(3) "baz"
+ ["key1"]=>
+ string(4) "val1"
+ ["key2"]=>
+ string(4) "val2"
+ ["key3"]=>
+ string(4) "val3"
+}
+array(6) {
+ ["key1"]=>
+ string(4) "val1"
+ ["key2"]=>
+ string(4) "val2"
+ ["key3"]=>
+ string(4) "val3"
+ [0]=>
+ &string(3) "foo"
+ [1]=>
+ &string(3) "bar"
+ [2]=>
+ &string(3) "baz"
+}
+
+-- Change $val2 --
+array(6) {
+ [0]=>
+ &string(3) "foo"
+ [1]=>
+ &string(11) "hello world"
+ [2]=>
+ &string(3) "baz"
+ ["key1"]=>
+ string(4) "val1"
+ ["key2"]=>
+ string(4) "val2"
+ ["key3"]=>
+ string(4) "val3"
+}
+array(6) {
+ ["key1"]=>
+ string(4) "val1"
+ ["key2"]=>
+ string(4) "val2"
+ ["key3"]=>
+ string(4) "val3"
+ [0]=>
+ &string(3) "foo"
+ [1]=>
+ &string(11) "hello world"
+ [2]=>
+ &string(3) "baz"
+}
+
+-- Merge an array and a reference to the first array --
+array(3) {
+ ["key1"]=>
+ string(4) "val1"
+ ["key2"]=>
+ string(4) "val2"
+ ["key3"]=>
+ string(4) "val3"
+}
+Done
diff --git a/ext/standard/tests/array/array_pad_basic.phpt b/ext/standard/tests/array/array_pad_basic.phpt
new file mode 100644
index 000000000..1dfc71e01
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_basic.phpt
@@ -0,0 +1,92 @@
+--TEST--
+Test array_pad() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_pad() : basic functionality ***\n";
+
+// Initialise $input and $pad_value arguments
+$input = array(1, 2, 3);
+$pad_value = -3;
+
+// positive $pad_size
+echo "-- Positive pad_size --\n";
+var_dump( array_pad($input, 8, $pad_value) );
+
+// negative $pad_size
+echo "-- Negative pad_size --\n";
+var_dump( array_pad($input, -8, $pad_value) );
+
+// $pad_size less than array size, no padding expected
+echo "-- Pad_size lesser than array_size --\n";
+var_dump( array_pad($input, 2, $pad_value) );
+
+// $pad_size equal to array size, no padding expected
+echo "-- Pad_size equal to array_size --\n";
+var_dump( array_pad($input, 3, $pad_value) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : basic functionality ***
+-- Positive pad_size --
+array(8) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(-3)
+ [4]=>
+ int(-3)
+ [5]=>
+ int(-3)
+ [6]=>
+ int(-3)
+ [7]=>
+ int(-3)
+}
+-- Negative pad_size --
+array(8) {
+ [0]=>
+ int(-3)
+ [1]=>
+ int(-3)
+ [2]=>
+ int(-3)
+ [3]=>
+ int(-3)
+ [4]=>
+ int(-3)
+ [5]=>
+ int(1)
+ [6]=>
+ int(2)
+ [7]=>
+ int(3)
+}
+-- Pad_size lesser than array_size --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+-- Pad_size equal to array_size --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/array_pad_error.phpt b/ext/standard/tests/array/array_pad_error.phpt
new file mode 100644
index 000000000..49fa66e86
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_error.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test array_pad() function : error conditions
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_pad() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing array_pad() function with Zero arguments --\n";
+var_dump( array_pad() );
+
+//Test array_pad with one more than the expected number of arguments
+echo "\n-- Testing array_pad() function with more than expected no. of arguments --\n";
+$input = array(1, 2);
+$pad_size = 10;
+$pad_value = 1;
+$extra_arg = 10;
+var_dump( array_pad($input, $pad_size, $pad_value, $extra_arg) );
+
+// Testing array_pad with less than the expected number of arguments
+echo "\n-- Testing array_pad() function with less than expected no. of arguments --\n";
+$input = array(1, 2);
+$pad_size = 10;
+var_dump( array_pad($input, $pad_size) );
+var_dump( array_pad($input) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : error conditions ***
+
+-- Testing array_pad() function with Zero arguments --
+
+Warning: Wrong parameter count for array_pad() in %s on line %d
+NULL
+
+-- Testing array_pad() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for array_pad() in %s on line %d
+NULL
+
+-- Testing array_pad() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for array_pad() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for array_pad() in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_pad_variation1.phpt b/ext/standard/tests/array/array_pad_variation1.phpt
new file mode 100644
index 000000000..b92f36da7
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_variation1.phpt
@@ -0,0 +1,270 @@
+--TEST--
+Test array_pad() function : usage variations - unexpected values for 'input' argument
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_pad() function by passing values to $input argument other than arrays
+* and see that function outputs proper warning messages wherever expected.
+* The $pad_size and $pad_value arguments passed are fixed values.
+*/
+
+echo "*** Testing array_pad() : passing non array values to \$input argument ***\n";
+
+// Initialise $pad_size and $pad_value
+$pad_size = 10;
+$pad_value = 1;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_pad()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --";
+ var_dump( array_pad($input, $pad_size, $pad_value) ); // positive 'pad_size'
+ var_dump( array_pad($input, -$pad_size, $pad_value) ); // negative 'pad_size'
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : passing non array values to $input argument ***
+
+-- Iteration 1 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 19 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+
+Warning: array_pad(): The argument should be an array in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_pad_variation2.phpt b/ext/standard/tests/array/array_pad_variation2.phpt
new file mode 100644
index 000000000..0413b9ef2
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_variation2.phpt
@@ -0,0 +1,288 @@
+--TEST--
+Test array_pad() function : usage variations - unexpected values for 'pad_size' argument(Bug#43482)
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_pad() function by passing values to $pad_size argument other than integers
+* and see that function outputs proper warning messages wherever expected.
+* The $input and $pad_value arguments passed are fixed values.
+*/
+
+echo "*** Testing array_pad() : passing non integer values to \$pad_size argument ***\n";
+
+// Initialise $input and $pad_value arguments
+$input = array(1, 2);
+$pad_value = 1;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+//array of values to iterate over
+$pad_sizes = array(
+
+ // float data
+/*1*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ -12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // array data
+/*6*/ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+/*11*/ NULL,
+ null,
+
+ // boolean data
+/*13*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*17*/ "",
+ '',
+
+ // string data
+/*19*/ "string",
+ 'string',
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+);
+
+// loop through each element of $pad_sizes to check the behavior of array_pad()
+$iterator = 1;
+foreach($pad_sizes as $pad_size) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_pad($input, $pad_size, $pad_value) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : passing non integer values to $pad_size argument ***
+-- Iteration 1 --
+array(10) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(1)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+ [5]=>
+ int(1)
+ [6]=>
+ int(1)
+ [7]=>
+ int(1)
+ [8]=>
+ int(1)
+ [9]=>
+ int(1)
+}
+-- Iteration 2 --
+array(10) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+ [5]=>
+ int(1)
+ [6]=>
+ int(1)
+ [7]=>
+ int(1)
+ [8]=>
+ int(1)
+ [9]=>
+ int(2)
+}
+-- Iteration 3 --
+
+Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
+bool(false)
+-- Iteration 5 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 6 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 7 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 8 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 9 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 10 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 11 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 12 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 13 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 14 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 15 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 16 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 17 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 18 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 19 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 20 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 21 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 22 --
+
+Notice: Object of class classA could not be converted to int in %s on line %d
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 23 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 24 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+Done
diff --git a/ext/standard/tests/array/array_pad_variation3.phpt b/ext/standard/tests/array/array_pad_variation3.phpt
new file mode 100644
index 000000000..75df11822
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_variation3.phpt
@@ -0,0 +1,869 @@
+--TEST--
+Test array_pad() function : usage variations - possible values for 'pad_value' argument
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_pad() function for expected behavior by passing
+* different possible values for $pad_value argument.
+* $input and $pad_size arguments take fixed value.
+*/
+
+echo "*** Testing array_pad() : possible values for \$pad_value argument ***\n";
+
+// Initialise $input and $pad_size argument
+$input = array(1, 2);
+$pad_size = 4;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a reference variable
+$value = "hello";
+$reference = &$value;
+
+// different values to be passed to $pad_value argument
+$pad_values = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // array data
+/*10*/ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+/*15*/ NULL,
+ null,
+
+ // boolean data
+/*17*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*21*/ "",
+ '',
+
+ // string data
+/*23*/ "string",
+ 'string',
+ $heredoc,
+
+ // strings with different white spaces
+/*26*/ "\v\fHello\t world!! \rstring\n",
+ '\v\fHello\t world!! \rstring\n',
+
+ // object data
+/*28*/ new classA(),
+
+ // undefined data
+/*29*/ @$undefined_var,
+
+ // unset data
+/*30*/ @$unset_var,
+
+ // resource variable
+/*31*/ $fp,
+
+ // reference variable
+/*32*/ $reference
+);
+
+// loop through each element of $pad_values to check the behavior of array_pad()
+$iterator = 1;
+foreach($pad_values as $pad_value) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_pad($input, $pad_size, $pad_value) ); // positive 'pad_size'
+ var_dump( array_pad($input, -$pad_size, $pad_value) ); // negative 'pad_size'
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : possible values for $pad_value argument ***
+-- Iteration 1 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(0)
+ [3]=>
+ int(0)
+}
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(0)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 2 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(1)
+ [3]=>
+ int(1)
+}
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 3 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(12345)
+ [3]=>
+ int(12345)
+}
+array(4) {
+ [0]=>
+ int(12345)
+ [1]=>
+ int(12345)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 4 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(-2345)
+ [3]=>
+ int(-2345)
+}
+array(4) {
+ [0]=>
+ int(-2345)
+ [1]=>
+ int(-2345)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 5 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ float(10.5)
+ [3]=>
+ float(10.5)
+}
+array(4) {
+ [0]=>
+ float(10.5)
+ [1]=>
+ float(10.5)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 6 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ float(-10.5)
+ [3]=>
+ float(-10.5)
+}
+array(4) {
+ [0]=>
+ float(-10.5)
+ [1]=>
+ float(-10.5)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 7 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ float(123456789000)
+ [3]=>
+ float(123456789000)
+}
+array(4) {
+ [0]=>
+ float(123456789000)
+ [1]=>
+ float(123456789000)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 8 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ float(1.23456789E-9)
+ [3]=>
+ float(1.23456789E-9)
+}
+array(4) {
+ [0]=>
+ float(1.23456789E-9)
+ [1]=>
+ float(1.23456789E-9)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 9 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ float(0.5)
+ [3]=>
+ float(0.5)
+}
+array(4) {
+ [0]=>
+ float(0.5)
+ [1]=>
+ float(0.5)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 10 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ array(0) {
+ }
+ [3]=>
+ array(0) {
+ }
+}
+array(4) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 11 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ array(1) {
+ [0]=>
+ int(0)
+ }
+ [3]=>
+ array(1) {
+ [0]=>
+ int(0)
+ }
+}
+array(4) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(0)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(0)
+ }
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 12 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [3]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+}
+array(4) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 13 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [3]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+array(4) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 14 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ array(2) {
+ ["color"]=>
+ string(3) "red"
+ ["item"]=>
+ string(3) "pen"
+ }
+ [3]=>
+ array(2) {
+ ["color"]=>
+ string(3) "red"
+ ["item"]=>
+ string(3) "pen"
+ }
+}
+array(4) {
+ [0]=>
+ array(2) {
+ ["color"]=>
+ string(3) "red"
+ ["item"]=>
+ string(3) "pen"
+ }
+ [1]=>
+ array(2) {
+ ["color"]=>
+ string(3) "red"
+ ["item"]=>
+ string(3) "pen"
+ }
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 15 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ NULL
+ [3]=>
+ NULL
+}
+array(4) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 16 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ NULL
+ [3]=>
+ NULL
+}
+array(4) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 17 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ bool(true)
+ [3]=>
+ bool(true)
+}
+array(4) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 18 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ bool(false)
+ [3]=>
+ bool(false)
+}
+array(4) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 19 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ bool(true)
+ [3]=>
+ bool(true)
+}
+array(4) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 20 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ bool(false)
+ [3]=>
+ bool(false)
+}
+array(4) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 21 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(0) ""
+ [3]=>
+ string(0) ""
+}
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 22 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(0) ""
+ [3]=>
+ string(0) ""
+}
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 23 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(6) "string"
+ [3]=>
+ string(6) "string"
+}
+array(4) {
+ [0]=>
+ string(6) "string"
+ [1]=>
+ string(6) "string"
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 24 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(6) "string"
+ [3]=>
+ string(6) "string"
+}
+array(4) {
+ [0]=>
+ string(6) "string"
+ [1]=>
+ string(6) "string"
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 25 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(11) "hello world"
+ [3]=>
+ string(11) "hello world"
+}
+array(4) {
+ [0]=>
+ string(11) "hello world"
+ [1]=>
+ string(11) "hello world"
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 26 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(25) " Hello world!! string
+"
+ [3]=>
+ string(25) " Hello world!! string
+"
+}
+array(4) {
+ [0]=>
+ string(25) " Hello world!! string
+"
+ [1]=>
+ string(25) " Hello world!! string
+"
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 27 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(30) "\v\fHello\t world!! \rstring\n"
+ [3]=>
+ string(30) "\v\fHello\t world!! \rstring\n"
+}
+array(4) {
+ [0]=>
+ string(30) "\v\fHello\t world!! \rstring\n"
+ [1]=>
+ string(30) "\v\fHello\t world!! \rstring\n"
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 28 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ object(classA)#%d (0) {
+ }
+ [3]=>
+ object(classA)#%d (0) {
+ }
+}
+array(4) {
+ [0]=>
+ object(classA)#%d (0) {
+ }
+ [1]=>
+ object(classA)#%d (0) {
+ }
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 29 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ NULL
+ [3]=>
+ NULL
+}
+array(4) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 30 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ NULL
+ [3]=>
+ NULL
+}
+array(4) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 31 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ resource(%d) of type (stream)
+ [3]=>
+ resource(%d) of type (stream)
+}
+array(4) {
+ [0]=>
+ resource(%d) of type (stream)
+ [1]=>
+ resource(%d) of type (stream)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+-- Iteration 32 --
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(5) "hello"
+ [3]=>
+ string(5) "hello"
+}
+array(4) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "hello"
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+}
+Done
diff --git a/ext/standard/tests/array/array_pad_variation4.phpt b/ext/standard/tests/array/array_pad_variation4.phpt
new file mode 100644
index 000000000..83c1e8300
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_variation4.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test array_pad() function : usage variations - binary safe checking
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing binary values to $pad_value argument and testing whether
+* array_pad() behaves in an expected way with the other arguments passed to the function.
+* The $input and $pad_size arguments passed are fixed values.
+*/
+
+echo "*** Testing array_pad() : Passing binary values to \$pad_value argument ***\n";
+
+// initialize the $input and $pad_size argument
+$input = array(1, 2, 3);
+$pad_size = 6;
+
+// initialize $pad_value with reference variable
+$binary = b"hello";
+
+var_dump( array_pad($input, $pad_size, $binary) ); // positive 'pad_size'
+var_dump( array_pad($input, -$pad_size, $binary) ); // negative 'pad_size'
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : Passing binary values to $pad_value argument ***
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ string(5) "hello"
+ [4]=>
+ string(5) "hello"
+ [5]=>
+ string(5) "hello"
+}
+array(6) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "hello"
+ [2]=>
+ string(5) "hello"
+ [3]=>
+ int(1)
+ [4]=>
+ int(2)
+ [5]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/array_pad_variation5.phpt b/ext/standard/tests/array/array_pad_variation5.phpt
new file mode 100644
index 000000000..4e8e0f113
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_variation5.phpt
@@ -0,0 +1,140 @@
+--TEST--
+Test array_pad() function : usage variations - two dimensional array for 'pad_value' argument
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing two dimensional array to $pad_value argument and testing whether
+* array_pad() behaves in an expected way with the other arguments passed to the function.
+* The $input and $pad_size arguments passed are fixed values.
+*/
+
+echo "*** Testing array_pad() : Passing 2-d array to \$pad_value argument ***\n";
+
+// initialize the $input and $pad_size argument
+$input = array(1, 2, 3);
+$pad_size = 5;
+
+// initialize $pad_value
+$pad_value = array (
+ array(1),
+ array("hello", 'world'),
+ array("one" => 1, 'two' => 2)
+);
+
+var_dump( array_pad($input, $pad_size, $pad_value) ); // positive 'pad_value'
+var_dump( array_pad($input, -$pad_size, $pad_value) ); // negative 'pad_value'
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : Passing 2-d array to $pad_value argument ***
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [2]=>
+ array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ }
+ }
+ [4]=>
+ array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [2]=>
+ array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ }
+ }
+}
+array(5) {
+ [0]=>
+ array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [2]=>
+ array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ }
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [2]=>
+ array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ }
+ }
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+ [4]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/array_pad_variation6.phpt b/ext/standard/tests/array/array_pad_variation6.phpt
new file mode 100644
index 000000000..2f97e3ee5
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_variation6.phpt
@@ -0,0 +1,668 @@
+--TEST--
+Test array_pad() function : usage variations - different arrays for 'input' argument
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing different arrays to $input argument and testing whether
+* array_pad() behaves in an expected way with the other arguments passed to the function.
+* The $pad_size and $pad_value arguments passed are fixed values.
+*/
+
+echo "*** Testing array_pad() : Passing different arrays to \$input argument ***\n";
+
+/* Different heredoc strings */
+
+// heredoc with blank line
+$blank_line = <<<EOT
+
+
+EOT;
+
+// heredoc with multiline string
+$multiline_string = <<<EOT
+hello world
+The big brown fox jumped over;
+the lazy dog
+This is a double quoted string
+EOT;
+
+// heredoc with diferent whitespaces
+$diff_whitespaces = <<<EOT
+hello\r world\t
+1111\t\t != 2222\v\v
+heredoc\ndouble quoted string. with\vdifferent\fwhite\vspaces
+EOT;
+
+// heredoc with quoted strings and numeric values
+$numeric_string = <<<EOT
+11 < 12. 123 >22
+'single quoted string'
+"double quoted string"
+2222 != 1111.\t 0000 = 0000\n
+EOT;
+
+// different arrays to be passed to $input argument
+$inputs = array (
+/*1*/ array(1, 2), // with default keys and numeric values
+ array(1.1, 2.2), // with default keys & float values
+ array(false,true), // with default keys and boolean values
+ array(), // empty array
+/*5*/ array(NULL), // with NULL
+ array("a\v\f", "aaaa\r", "b\tbbb", "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"), // with double quoted strings
+ array('a\v\f', 'aaaa\r', 'b\tbbb', '\[\]\!\@\#\$\%\^\&\*\(\)\{\}'), // with single quoted strings
+ array("h1" => $blank_line, "h2" => $multiline_string, "h3" => $diff_whitespaces, $numeric_string), // with heredocs
+
+ // associative arrays
+/*9*/ array(1 => "one", 2 => "two", 3 => "three"), // explicit numeric keys, string values
+ array("one" => 1, "two" => 2, "three" => 3 ), // string keys & numeric values
+ array( 1 => 10, 2 => 20, 4 => 40, 3 => 30), // explicit numeric keys and numeric values
+ array( "one" => "ten", "two" => "twenty", "three" => "thirty"), // string key/value
+ array("one" => 1, 2 => "two", 4 => "four"), //mixed
+
+ // associative array, containing null/empty/boolean values as key/value
+/*14*/ array(NULL => "NULL", null => "null", "NULL" => NULL, "null" => null),
+ array(true => "true", false => "false", "false" => false, "true" => true),
+ array("" => "emptyd", '' => 'emptys', "emptyd" => "", 'emptys' => ''),
+ array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
+ array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
+
+ // array with repetative keys
+/*19*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
+);
+
+// initialize the $pad_size and $pad_value arguments
+$pad_size = 6;
+$pad_value = "HELLO";
+
+// loop through each sub-array within $inputs to check the behavior of array_pad()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_pad($input, $pad_size, $pad_value) ); // positive 'pad_size'
+ var_dump( array_pad($input, -$pad_size, $pad_value) ); // negative 'pad_size'
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : Passing different arrays to $input argument ***
+-- Iteration 1 --
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ int(1)
+ [5]=>
+ int(2)
+}
+-- Iteration 2 --
+array(6) {
+ [0]=>
+ float(1.1)
+ [1]=>
+ float(2.2)
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ float(1.1)
+ [5]=>
+ float(2.2)
+}
+-- Iteration 3 --
+array(6) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ bool(false)
+ [5]=>
+ bool(true)
+}
+-- Iteration 4 --
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+-- Iteration 5 --
+array(6) {
+ [0]=>
+ NULL
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ NULL
+}
+-- Iteration 6 --
+array(6) {
+ [0]=>
+ string(3) "a "
+ [1]=>
+ string(5) "aaaa "
+ [2]=>
+ string(5) "b bbb"
+ [3]=>
+ string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(3) "a "
+ [3]=>
+ string(5) "aaaa "
+ [4]=>
+ string(5) "b bbb"
+ [5]=>
+ string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
+}
+-- Iteration 7 --
+array(6) {
+ [0]=>
+ string(5) "a\v\f"
+ [1]=>
+ string(6) "aaaa\r"
+ [2]=>
+ string(6) "b\tbbb"
+ [3]=>
+ string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "a\v\f"
+ [3]=>
+ string(6) "aaaa\r"
+ [4]=>
+ string(6) "b\tbbb"
+ [5]=>
+ string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
+}
+-- Iteration 8 --
+array(6) {
+ ["h1"]=>
+ string(1) "
+"
+ ["h2"]=>
+ string(86) "hello world
+The big brown fox jumped over;
+the lazy dog
+This is a double quoted string"
+ ["h3"]=>
+ string(88) "hello world
+1111 != 2222
+heredoc
+double quoted string. with different white spaces"
+ [0]=>
+ string(90) "11 < 12. 123 >22
+'single quoted string'
+"double quoted string"
+2222 != 1111. 0000 = 0000
+"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ ["h1"]=>
+ string(1) "
+"
+ ["h2"]=>
+ string(86) "hello world
+The big brown fox jumped over;
+the lazy dog
+This is a double quoted string"
+ ["h3"]=>
+ string(88) "hello world
+1111 != 2222
+heredoc
+double quoted string. with different white spaces"
+ [2]=>
+ string(90) "11 < 12. 123 >22
+'single quoted string'
+"double quoted string"
+2222 != 1111. 0000 = 0000
+"
+}
+-- Iteration 9 --
+array(6) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ [2]=>
+ string(5) "three"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(3) "one"
+ [4]=>
+ string(3) "two"
+ [5]=>
+ string(5) "three"
+}
+-- Iteration 10 --
+array(6) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["three"]=>
+ int(3)
+}
+-- Iteration 11 --
+array(6) {
+ [0]=>
+ int(10)
+ [1]=>
+ int(20)
+ [2]=>
+ int(40)
+ [3]=>
+ int(30)
+ [4]=>
+ string(5) "HELLO"
+ [5]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ int(10)
+ [3]=>
+ int(20)
+ [4]=>
+ int(40)
+ [5]=>
+ int(30)
+}
+-- Iteration 12 --
+array(6) {
+ ["one"]=>
+ string(3) "ten"
+ ["two"]=>
+ string(6) "twenty"
+ ["three"]=>
+ string(6) "thirty"
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ ["one"]=>
+ string(3) "ten"
+ ["two"]=>
+ string(6) "twenty"
+ ["three"]=>
+ string(6) "thirty"
+}
+-- Iteration 13 --
+array(6) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(4) "four"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ ["one"]=>
+ int(1)
+ [3]=>
+ string(3) "two"
+ [4]=>
+ string(4) "four"
+}
+-- Iteration 14 --
+array(6) {
+ [""]=>
+ string(4) "null"
+ ["NULL"]=>
+ NULL
+ ["null"]=>
+ NULL
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [""]=>
+ string(4) "null"
+ ["NULL"]=>
+ NULL
+ ["null"]=>
+ NULL
+}
+-- Iteration 15 --
+array(6) {
+ [0]=>
+ string(4) "true"
+ [1]=>
+ string(5) "false"
+ ["false"]=>
+ bool(false)
+ ["true"]=>
+ bool(true)
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(4) "true"
+ [3]=>
+ string(5) "false"
+ ["false"]=>
+ bool(false)
+ ["true"]=>
+ bool(true)
+}
+-- Iteration 16 --
+array(6) {
+ [""]=>
+ string(6) "emptys"
+ ["emptyd"]=>
+ string(0) ""
+ ["emptys"]=>
+ string(0) ""
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [""]=>
+ string(6) "emptys"
+ ["emptyd"]=>
+ string(0) ""
+ ["emptys"]=>
+ string(0) ""
+}
+-- Iteration 17 --
+array(6) {
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(0) ""
+ [3]=>
+ NULL
+ [4]=>
+ NULL
+ [5]=>
+ bool(false)
+ [6]=>
+ bool(true)
+}
+array(6) {
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(0) ""
+ [3]=>
+ NULL
+ [4]=>
+ NULL
+ [5]=>
+ bool(false)
+ [6]=>
+ bool(true)
+}
+-- Iteration 18 --
+array(6) {
+ [""]=>
+ int(4)
+ [0]=>
+ int(5)
+ [1]=>
+ int(6)
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [""]=>
+ int(4)
+ [3]=>
+ int(5)
+ [4]=>
+ int(6)
+}
+-- Iteration 19 --
+array(6) {
+ ["One"]=>
+ int(10)
+ ["two"]=>
+ int(20)
+ ["three"]=>
+ int(3)
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+}
+array(6) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ ["One"]=>
+ int(10)
+ ["two"]=>
+ int(20)
+ ["three"]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/array_pad_variation7.phpt b/ext/standard/tests/array/array_pad_variation7.phpt
new file mode 100644
index 000000000..887f35194
--- /dev/null
+++ b/ext/standard/tests/array/array_pad_variation7.phpt
@@ -0,0 +1,127 @@
+--TEST--
+Test array_pad() function : usage variations - two dimensional array for 'input' argument
+--FILE--
+<?php
+/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value)
+ * Description: Returns a copy of input array padded with pad_value to size pad_size
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing two dimensional array to $input argument and testing whether
+* array_pad() behaves in an expected way with the other arguments passed to the function.
+* The $pad_size and $pad_value arguments passed are fixed values.
+*/
+
+echo "*** Testing array_pad() : Passing 2-D array to \$input argument ***\n";
+
+// initialize the 2-d array
+$input = array (
+ array(1, 2, 3),
+ array("hello", 'world'),
+ array("one" => 1, "two" => 2)
+);
+
+// initialize the $pad_size and $pad_value arguments
+$pad_size = 5;
+$pad_value = "HELLO";
+
+// entire 2-d array
+echo "-- Entire 2-d array for \$input argument --\n";
+var_dump( array_pad($input, $pad_size, $pad_value) ); // positive 'pad_size'
+var_dump( array_pad($input, -$pad_size, $pad_value) ); // negative 'pad_size'
+
+// sub array
+echo "-- Sub array for \$input argument --\n";
+var_dump( array_pad($input[1], $pad_size, $pad_value) ); // positive 'pad_size'
+var_dump( array_pad($input[1], -$pad_size, $pad_value) ); // negative 'pad_size'
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_pad() : Passing 2-D array to $input argument ***
+-- Entire 2-d array for $input argument --
+array(5) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [2]=>
+ array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ }
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+}
+array(5) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [3]=>
+ array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ }
+ [4]=>
+ array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ }
+}
+-- Sub array for $input argument --
+array(5) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "world"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "HELLO"
+ [4]=>
+ string(5) "HELLO"
+}
+array(5) {
+ [0]=>
+ string(5) "HELLO"
+ [1]=>
+ string(5) "HELLO"
+ [2]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "hello"
+ [4]=>
+ string(5) "world"
+}
+Done
diff --git a/ext/standard/tests/array/array_push_basic.phpt b/ext/standard/tests/array/array_push_basic.phpt
new file mode 100644
index 000000000..5ccf037da
--- /dev/null
+++ b/ext/standard/tests/array/array_push_basic.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Test array_push() function : basic functionality
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of array_push with indexed and associative arrays
+ */
+
+echo "*** Testing array_push() : basic functionality ***\n";
+
+$array = array ('zero', 'one', 'two');
+$var1 = 'three';
+$var2 = 'four';
+
+echo "\n-- Push values onto an indexed array --\n";
+var_dump(array_push($array, $var1, $var2));
+var_dump($array);
+
+$array_assoc = array ('one' => 'un', 'two' => 'deux');
+
+echo "\n-- Push values onto an associative array --\n";
+var_dump(array_push($array_assoc, $var1, $var2));
+var_dump($array_assoc);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_push() : basic functionality ***
+
+-- Push values onto an indexed array --
+int(5)
+array(5) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ string(5) "three"
+ [4]=>
+ string(4) "four"
+}
+
+-- Push values onto an associative array --
+int(4)
+array(4) {
+ ["one"]=>
+ string(2) "un"
+ ["two"]=>
+ string(4) "deux"
+ [0]=>
+ string(5) "three"
+ [1]=>
+ string(4) "four"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_push_error1.phpt b/ext/standard/tests/array/array_push_error1.phpt
new file mode 100644
index 000000000..1b427ff93
--- /dev/null
+++ b/ext/standard/tests/array/array_push_error1.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Test array_push() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to array_push() to test behaviour
+ */
+
+echo "*** Testing array_push() : error conditions ***\n";
+
+// Testing array_push with one less than the expected number of arguments
+echo "\n-- Testing array_push() function with less than expected no. of arguments --\n";
+$stack = array(1, 2);
+var_dump( array_push($stack) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_push() : error conditions ***
+
+-- Testing array_push() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for array_push() in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_push_error2.phpt b/ext/standard/tests/array/array_push_error2.phpt
new file mode 100644
index 000000000..86f8df78b
--- /dev/null
+++ b/ext/standard/tests/array/array_push_error2.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test array_push() function : error conditions - min and max int values as keys
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Use PHP's minimum and maximum integer values as array keys
+ * then try and push new elements onto the array
+ */
+
+echo "*** Testing array_push() : error conditions ***\n";
+
+$array = array(-PHP_INT_MAX => 'min', PHP_INT_MAX => 'max');
+
+var_dump(array_push($array, 'new'));
+var_dump($array);
+var_dump(array_push($array, 'var'));
+var_dump($array);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_push() : error conditions ***
+int(3)
+array(3) {
+ [-2147483647]=>
+ string(3) "min"
+ [2147483647]=>
+ string(3) "max"
+ [-2147483648]=>
+ string(3) "new"
+}
+
+Warning: array_push(): Cannot add element to the array as the next element is already occupied in %s on line %d
+bool(false)
+array(3) {
+ [-2147483647]=>
+ string(3) "min"
+ [2147483647]=>
+ string(3) "max"
+ [-2147483648]=>
+ string(3) "new"
+}
+Done
diff --git a/ext/standard/tests/array/array_push_variation1.phpt b/ext/standard/tests/array/array_push_variation1.phpt
new file mode 100644
index 000000000..c4451d9e4
--- /dev/null
+++ b/ext/standard/tests/array/array_push_variation1.phpt
@@ -0,0 +1,225 @@
+--TEST--
+Test array_push() function : usage variations - Pass different data types as $stack arg
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $stack argument to array_push() to test behaviour
+ */
+
+echo "*** Testing array_push() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$var = 'value';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $stack argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_push()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_push($input, $var) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_push() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+int(1)
+
+-- Iteration 19 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+
+-- Iteration 25 --
+
+Warning: array_push(): First argument should be an array in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_push_variation2.phpt b/ext/standard/tests/array/array_push_variation2.phpt
new file mode 100644
index 000000000..7fefcfa49
--- /dev/null
+++ b/ext/standard/tests/array/array_push_variation2.phpt
@@ -0,0 +1,178 @@
+--TEST--
+Test array_push() function : usage variations - Pass different data types as $var arg
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $var argument to array_push to test behaviour
+ */
+
+echo "*** Testing array_push() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$stack = array (1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $var argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_push()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ $temp_array = $stack;
+ var_dump( array_push($temp_array, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_push() : usage variations ***
+
+-- Iteration 1 --
+int(3)
+
+-- Iteration 2 --
+int(3)
+
+-- Iteration 3 --
+int(3)
+
+-- Iteration 4 --
+int(3)
+
+-- Iteration 5 --
+int(3)
+
+-- Iteration 6 --
+int(3)
+
+-- Iteration 7 --
+int(3)
+
+-- Iteration 8 --
+int(3)
+
+-- Iteration 9 --
+int(3)
+
+-- Iteration 10 --
+int(3)
+
+-- Iteration 11 --
+int(3)
+
+-- Iteration 12 --
+int(3)
+
+-- Iteration 13 --
+int(3)
+
+-- Iteration 14 --
+int(3)
+
+-- Iteration 15 --
+int(3)
+
+-- Iteration 16 --
+int(3)
+
+-- Iteration 17 --
+int(3)
+
+-- Iteration 18 --
+int(3)
+
+-- Iteration 19 --
+int(3)
+
+-- Iteration 20 --
+int(3)
+
+-- Iteration 21 --
+int(3)
+
+-- Iteration 22 --
+int(3)
+
+-- Iteration 23 --
+int(3)
+
+-- Iteration 24 --
+int(3)
+
+-- Iteration 25 --
+int(3)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_push_variation3.phpt b/ext/standard/tests/array/array_push_variation3.phpt
new file mode 100644
index 000000000..2bc71a769
--- /dev/null
+++ b/ext/standard/tests/array/array_push_variation3.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test array_push() function : usage variations - multidimensional arrays
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_push when passed:
+ * 1. an array as $var arg
+ * 2. as sub-array as $stack arg
+ */
+
+echo "*** Testing array_push() : usage variations ***\n";
+
+echo "\n-- Pass array as \$var argument --\n";
+$array = array(1, 2, 3);
+$sub_array = array('one', 'two');
+var_dump(array_push($array, $sub_array));
+var_dump($array);
+
+echo "\n-- Pass sub-array as \$stack argument --\n";
+var_dump(array_push($array[3], 'a'));
+var_dump($array);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_push() : usage variations ***
+
+-- Pass array as $var argument --
+int(4)
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ }
+}
+
+-- Pass sub-array as $stack argument --
+int(3)
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ array(3) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+ [2]=>
+ string(1) "a"
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_push_variation4.phpt b/ext/standard/tests/array/array_push_variation4.phpt
new file mode 100644
index 000000000..1048d80cf
--- /dev/null
+++ b/ext/standard/tests/array/array_push_variation4.phpt
@@ -0,0 +1,134 @@
+--TEST--
+Test array_push() function : usage variations - referenced variables
+--INI--
+allow_call_time_pass_reference=on
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_push when:
+ * 1. passed referenced variables as $var arguments
+ * 2. $var argument is a reference to $stack argument
+ */
+
+echo "*** Testing array_push() : usage variations ***\n";
+
+$var1 = 'a';
+$var2 = 'b';
+$var3 = 'c';
+$var4 = 'x';
+$var5 = 'y';
+$var6 = 'z';
+
+$array = array(1, 2, 3);
+
+echo "\n-- Pass array_push referenced varialbes as \$var arguments --\n";
+var_dump(array_push($array, &$var1, &$var2, &$var3, &$var4, &$var5, &$var6));
+var_dump($array);
+
+echo "\n-- Pass \$var argument which is a reference to \$stack argument --\n";
+var_dump(array_push($array, &$array));
+var_dump($array);
+
+/* break cycle */
+$array[9] = null;
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_push() : usage variations ***
+
+-- Pass array_push referenced varialbes as $var arguments --
+int(9)
+array(9) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ &string(1) "a"
+ [4]=>
+ &string(1) "b"
+ [5]=>
+ &string(1) "c"
+ [6]=>
+ &string(1) "x"
+ [7]=>
+ &string(1) "y"
+ [8]=>
+ &string(1) "z"
+}
+
+-- Pass $var argument which is a reference to $stack argument --
+int(10)
+array(10) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ &string(1) "a"
+ [4]=>
+ &string(1) "b"
+ [5]=>
+ &string(1) "c"
+ [6]=>
+ &string(1) "x"
+ [7]=>
+ &string(1) "y"
+ [8]=>
+ &string(1) "z"
+ [9]=>
+ &array(10) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ &string(1) "a"
+ [4]=>
+ &string(1) "b"
+ [5]=>
+ &string(1) "c"
+ [6]=>
+ &string(1) "x"
+ [7]=>
+ &string(1) "y"
+ [8]=>
+ &string(1) "z"
+ [9]=>
+ &array(10) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ &string(1) "a"
+ [4]=>
+ &string(1) "b"
+ [5]=>
+ &string(1) "c"
+ [6]=>
+ &string(1) "x"
+ [7]=>
+ &string(1) "y"
+ [8]=>
+ &string(1) "z"
+ [9]=>
+ *RECURSION*
+ }
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_push_variation5.phpt b/ext/standard/tests/array/array_push_variation5.phpt
new file mode 100644
index 000000000..4b6f39975
--- /dev/null
+++ b/ext/standard/tests/array/array_push_variation5.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test array_push() function : usage variations - position of internal array pointer
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Check the position of the internal array pointer after calling array_push()
+ */
+
+echo "*** Testing array_push() : usage variations ***\n";
+
+$stack = array ('one' => 'un', 'two' => 'deux');
+$var0 = 'zero';
+
+echo "\n-- Call array_push() --\n";
+var_dump($result = array_push($stack, $var0));
+
+echo "\n-- Position of Internal Pointer in Original Array: --\n";
+echo key($stack) . " => " . current ($stack) . "\n";
+
+echo "Done";
+?>
+--EXPECTF--
+
+*** Testing array_push() : usage variations ***
+
+-- Call array_push() --
+int(3)
+
+-- Position of Internal Pointer in Original Array: --
+one => un
+Done
diff --git a/ext/standard/tests/array/array_push_variation6.phpt b/ext/standard/tests/array/array_push_variation6.phpt
new file mode 100644
index 000000000..19afebb74
--- /dev/null
+++ b/ext/standard/tests/array/array_push_variation6.phpt
@@ -0,0 +1,159 @@
+--TEST--
+Test array_push() function : usage variations - array keys are different data types
+--FILE--
+<?php
+/* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
+ * Description: Pushes elements onto the end of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass array_push arrays where the keys are different data types.
+ */
+
+echo "*** Testing array_push() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$var = 'value';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// arrays of different data types as keys to be passed to $stack argument
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+ 'extreme floats' => array(
+ 12.3456789000e10 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*3*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*4*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*5*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*6*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*8*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*9*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each sub-array of $inputs to check the behavior of array_push()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator : $key data --\n";
+ echo "Before : ";
+ var_dump(count($input));
+ echo "After : ";
+ var_dump( array_push($input, $var) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_push() : usage variations ***
+
+-- Iteration 1 : int data --
+Before : int(4)
+After : int(5)
+
+-- Iteration 2 : float data --
+Before : int(3)
+After : int(4)
+
+-- Iteration 3 : extreme floats data --
+Before : int(2)
+After : int(3)
+
+-- Iteration 4 : null uppercase data --
+Before : int(1)
+After : int(2)
+
+-- Iteration 5 : null lowercase data --
+Before : int(1)
+After : int(2)
+
+-- Iteration 6 : bool lowercase data --
+Before : int(2)
+After : int(3)
+
+-- Iteration 7 : bool uppercase data --
+Before : int(2)
+After : int(3)
+
+-- Iteration 8 : empty double quotes data --
+Before : int(1)
+After : int(2)
+
+-- Iteration 9 : empty single quotes data --
+Before : int(1)
+After : int(2)
+
+-- Iteration 10 : string data --
+Before : int(3)
+After : int(4)
+
+-- Iteration 11 : undefined data --
+Before : int(1)
+After : int(2)
+
+-- Iteration 12 : unset data --
+Before : int(1)
+After : int(2)
+Done
diff --git a/ext/standard/tests/array/array_reverse_variation5.phpt b/ext/standard/tests/array/array_reverse_variation5.phpt
index 2d22be035..6c4c95224 100644
--- a/ext/standard/tests/array/array_reverse_variation5.phpt
+++ b/ext/standard/tests/array/array_reverse_variation5.phpt
@@ -1,5 +1,7 @@
--TEST--
Test array_reverse() function : usage variations - assoc. array with diff. value for 'array' argument
+--INI--
+precision=12
--FILE--
<?php
/* Prototype : array array_reverse(array $array [, bool $preserve_keys])
@@ -179,7 +181,7 @@ array(1) {
- default argument -
array(4) {
["f4"]=>
- float(33333333.333333)
+ float(33333333.3333)
[0]=>
float(4.8999992284)
["f2"]=>
@@ -190,7 +192,7 @@ array(4) {
- $preserve keys = true -
array(4) {
["f4"]=>
- float(33333333.333333)
+ float(33333333.3333)
[3]=>
float(4.8999992284)
["f2"]=>
@@ -201,7 +203,7 @@ array(4) {
- $preserve_keys = false -
array(4) {
["f4"]=>
- float(33333333.333333)
+ float(33333333.3333)
[0]=>
float(4.8999992284)
["f2"]=>
diff --git a/ext/standard/tests/array/array_shift_basic.phpt b/ext/standard/tests/array/array_shift_basic.phpt
new file mode 100644
index 000000000..2bb4ae93a
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_basic.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Test array_shift() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of array_shift()
+ */
+
+echo "*** Testing array_shift() : basic functionality ***\n";
+
+$array = array('zero', 'one', '3' => 'three', 'four' => 4);
+echo "\n-- Before shift: --\n";
+var_dump($array);
+
+echo "\n-- After shift: --\n";
+echo "Returned value:\t";
+var_dump(array_shift($array));
+echo "New array:\n";
+var_dump($array);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : basic functionality ***
+
+-- Before shift: --
+array(4) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [3]=>
+ string(5) "three"
+ ["four"]=>
+ int(4)
+}
+
+-- After shift: --
+Returned value: string(4) "zero"
+New array:
+array(3) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(5) "three"
+ ["four"]=>
+ int(4)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_error.phpt b/ext/standard/tests/array/array_shift_error.phpt
new file mode 100644
index 000000000..bbf62de5b
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_error.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test array_shift() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to array_shift() to test behaviour
+ */
+
+echo "*** Testing array_shift() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing array_shift() function with Zero arguments --\n";
+var_dump( array_shift() );
+
+//Test array_shift with one more than the expected number of arguments
+echo "\n-- Testing array_shift() function with more than expected no. of arguments --\n";
+$stack = array(1, 2);
+$extra_arg = 10;
+var_dump( array_shift($stack, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : error conditions ***
+
+-- Testing array_shift() function with Zero arguments --
+
+Warning: Wrong parameter count for array_shift() in %s on line %d
+NULL
+
+-- Testing array_shift() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for array_shift() in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_variation1.phpt b/ext/standard/tests/array/array_shift_variation1.phpt
new file mode 100644
index 000000000..eafe7a90e
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_variation1.phpt
@@ -0,0 +1,218 @@
+--TEST--
+Test array_shift() function : usage variations - Pass different data types as $stack arg
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $stack argument to array_shift() to test behaviour
+ */
+
+echo "*** Testing array_shift() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $stack argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_shift()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_shift($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: array_shift(): The argument should be an array in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_variation2.phpt b/ext/standard/tests/array/array_shift_variation2.phpt
new file mode 100644
index 000000000..2b3adc605
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_variation2.phpt
@@ -0,0 +1,208 @@
+--TEST--
+Test array_shift() function : usage variations - Pass arrays of different data types
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays where values are of one data type to test behaviour of array_shift()
+ */
+
+echo "*** Testing array_shift() : usage variations ***\n";
+
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// arrays of different data types to be passed to $stack argument
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0,
+ 1,
+ 12345,
+ -2345,
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+ ),
+
+ // null data
+/*3*/ 'null' => array(
+ NULL,
+ null,
+ ),
+
+ // boolean data
+/*4*/ 'bool' => array(
+ true,
+ false,
+ TRUE,
+ FALSE,
+ ),
+
+ // empty data
+/*5*/ 'empty string' => array(
+ "",
+ '',
+ ),
+
+/*6*/ 'empty array' => array(
+ ),
+
+ // string data
+/*7*/ 'string' => array(
+ "string",
+ 'string',
+ $heredoc,
+ ),
+
+ // object data
+/*8*/ 'object' => array(
+ new classA(),
+ ),
+
+ // undefined data
+/*9*/ 'undefined' => array(
+ @$undefined_var,
+ ),
+
+ // unset data
+/*10*/ 'unset' => array(
+ @$unset_var,
+ ),
+
+ // resource variable
+/*11*/ 'resource' => array(
+ $fp
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of array_shift
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator: $key data --\n";
+ var_dump( array_shift($input) );
+ var_dump($input);
+ $iterator++;
+};
+
+fclose($fp);
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : usage variations ***
+
+-- Iteration 1: int data --
+int(0)
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(12345)
+ [2]=>
+ int(-2345)
+}
+
+-- Iteration 2: float data --
+float(10.5)
+array(4) {
+ [0]=>
+ float(-10.5)
+ [1]=>
+ float(123456789000)
+ [2]=>
+ float(1.23456789E-9)
+ [3]=>
+ float(0.5)
+}
+
+-- Iteration 3: null data --
+NULL
+array(1) {
+ [0]=>
+ NULL
+}
+
+-- Iteration 4: bool data --
+bool(true)
+array(3) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+ [2]=>
+ bool(false)
+}
+
+-- Iteration 5: empty string data --
+string(0) ""
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+-- Iteration 6: empty array data --
+NULL
+array(0) {
+}
+
+-- Iteration 7: string data --
+string(6) "string"
+array(2) {
+ [0]=>
+ string(6) "string"
+ [1]=>
+ string(11) "hello world"
+}
+
+-- Iteration 8: object data --
+object(classA)#%d (0) {
+}
+array(0) {
+}
+
+-- Iteration 9: undefined data --
+NULL
+array(0) {
+}
+
+-- Iteration 10: unset data --
+NULL
+array(0) {
+}
+
+-- Iteration 11: resource data --
+resource(%d) of type (stream)
+array(0) {
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_variation3.phpt b/ext/standard/tests/array/array_shift_variation3.phpt
new file mode 100644
index 000000000..cc260c630
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_variation3.phpt
@@ -0,0 +1,188 @@
+--TEST--
+Test array_shift() function : usage variations - Pass array with different data types as keys
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays with different data types as keys to test how array_shift() re-assigns keys
+ */
+
+echo "*** Testing array_shift() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed to $stack argument
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+/*3*/ 'extreme floats' => array(
+ 12.3456789000e10 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*4*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+
+/*5*/ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*6*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+
+/*7*/ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*8*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+
+/*9*/ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*10*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*11*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*12*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of array_shift()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator : $key data --\n";
+ var_dump( array_shift($input) );
+ var_dump($input);
+ $iterator++;
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : usage variations ***
+
+-- Iteration 1 : int data --
+string(4) "zero"
+array(3) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(8) "positive"
+ [2]=>
+ string(8) "negative"
+}
+
+-- Iteration 2 : float data --
+string(8) "positive"
+array(2) {
+ [0]=>
+ string(8) "negative"
+ [1]=>
+ string(4) "half"
+}
+
+-- Iteration 3 : extreme floats data --
+string(5) "large"
+array(1) {
+ [0]=>
+ string(5) "small"
+}
+
+-- Iteration 4 : null uppercase data --
+string(6) "null 1"
+array(0) {
+}
+
+-- Iteration 5 : null lowercase data --
+string(6) "null 2"
+array(0) {
+}
+
+-- Iteration 6 : bool lowercase data --
+string(6) "lowert"
+array(1) {
+ [0]=>
+ string(6) "lowerf"
+}
+
+-- Iteration 7 : bool uppercase data --
+string(6) "uppert"
+array(1) {
+ [0]=>
+ string(6) "upperf"
+}
+
+-- Iteration 8 : empty double quotes data --
+string(6) "emptyd"
+array(0) {
+}
+
+-- Iteration 9 : empty single quotes data --
+string(6) "emptys"
+array(0) {
+}
+
+-- Iteration 10 : string data --
+string(7) "stringd"
+array(2) {
+ ["strings"]=>
+ string(7) "strings"
+ ["hello world"]=>
+ string(7) "stringh"
+}
+
+-- Iteration 11 : undefined data --
+string(9) "undefined"
+array(0) {
+}
+
+-- Iteration 12 : unset data --
+string(5) "unset"
+array(0) {
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_variation4.phpt b/ext/standard/tests/array/array_shift_variation4.phpt
new file mode 100644
index 000000000..f27681561
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_variation4.phpt
@@ -0,0 +1,109 @@
+--TEST--
+Test array_shift() function : usage variations - multi-dimensional arrays
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test popping elements from a sub-array and popping an array from an array
+ */
+
+echo "*** Testing array_shift() : usage variations ***\n";
+
+$stack_first = array(array(1, 2, 3), 'one', 'two');
+$stack_last = array ('zero', 'one', array (1, 2, 3));
+echo "\n-- Before shift: --\n";
+echo "---- \$stack_first:\n";
+var_dump($stack_first);
+echo "---- \$stack_last:\n";
+var_dump($stack_last);
+
+echo "\n-- After shift: --\n";
+echo "---- Pop array from array:\n";
+echo "Returned value:\t";
+var_dump(array_shift($stack_first));
+echo "New array:\n";
+var_dump($stack_first);
+
+echo "---- Pop element from array within array:\n";
+echo "Returned value:\t";
+var_dump(array_shift($stack_last[2]));
+echo "New array:\n";
+var_dump($stack_last);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : usage variations ***
+
+-- Before shift: --
+---- $stack_first:
+array(3) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+}
+---- $stack_last:
+array(3) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- After shift: --
+---- Pop array from array:
+Returned value: array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+New array:
+array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+}
+---- Pop element from array within array:
+Returned value: int(1)
+New array:
+array(3) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_variation5.phpt b/ext/standard/tests/array/array_shift_variation5.phpt
new file mode 100644
index 000000000..2ac15da6b
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_variation5.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test array_shift() function : usage variations - call recursively
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Use the result of one call to array_shift
+ * as the the $stack argument of another call to array_shift()
+ * When done in one statement causes strict error messages.
+ */
+
+echo "*** Testing array_shift() : usage variations ***\n";
+
+$stack = array ( array ( array ('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei');
+
+// not following strict standards
+echo "\n-- Incorrect Method: --\n";
+var_dump(array_shift(array_shift(array_shift($stack))));
+
+$stack = array (array( array('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei');
+// correct way of doing above:
+echo "\n-- Correct Method: --\n";
+$result1 = array_shift($stack);
+$result2 = array_shift($result1);
+var_dump(array_shift($result2));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : usage variations ***
+
+-- Incorrect Method: --
+
+Strict Standards: Only variables should be passed by reference in %s on line %d
+
+Strict Standards: Only variables should be passed by reference in %s on line %d
+string(4) "zero"
+
+-- Correct Method: --
+string(4) "zero"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_variation6.phpt b/ext/standard/tests/array/array_shift_variation6.phpt
new file mode 100644
index 000000000..9033e7d17
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_variation6.phpt
@@ -0,0 +1,83 @@
+--TEST--
+Test array_shift() function : usage variations - Referenced arrays
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how array_shift when passed:
+ * 1. a variable that is referenced to an array
+ * 2. an array that contains a referenced array
+ */
+
+echo "*** Testing array_shift() : usage variations ***\n";
+
+echo "\n-- Variable is referenced array --\n";
+$original_array = array('zero', 'one', 'two');
+$copied_array = &$original_array;
+
+echo "Result: ";
+var_dump(array_shift($copied_array));
+echo "\n\$original_array:\n";
+var_dump($original_array);
+echo "\n\$copied_array:\n";
+var_dump($copied_array);
+
+echo "\n-- Element is referenced array --\n";
+$new_array = array (&$copied_array, 1, 'two');
+echo "Result: ";
+var_dump(array_shift($new_array[0]));
+echo "\n\$new_array:\n";
+var_dump($new_array);
+echo "\n\$copied_array\n";
+var_dump($copied_array);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : usage variations ***
+
+-- Variable is referenced array --
+Result: string(4) "zero"
+
+$original_array:
+array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+}
+
+$copied_array:
+array(2) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ string(3) "two"
+}
+
+-- Element is referenced array --
+Result: string(3) "one"
+
+$new_array:
+array(3) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ string(3) "two"
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ string(3) "two"
+}
+
+$copied_array
+array(1) {
+ [0]=>
+ string(3) "two"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_variation7.phpt b/ext/standard/tests/array/array_shift_variation7.phpt
new file mode 100644
index 000000000..9367cacbc
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_variation7.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test array_shift() function : usage variations - position of internal pointer
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test that the internal pointer is reset after calling array_shift()
+ */
+
+echo "*** Testing array_shift() : usage variations ***\n";
+
+$stack = array ('one' => 'un', 'two' => 'deux');
+
+echo "\n-- Call array_shift() --\n";
+var_dump($result = array_shift($stack));
+
+echo "\n-- Position of Internal Pointer in Passed Array: --\n";
+echo key($stack) . " => " . current ($stack) . "\n";
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : usage variations ***
+
+-- Call array_shift() --
+string(2) "un"
+
+-- Position of Internal Pointer in Passed Array: --
+two => deux
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shift_variation8.phpt b/ext/standard/tests/array/array_shift_variation8.phpt
new file mode 100644
index 000000000..717d98fad
--- /dev/null
+++ b/ext/standard/tests/array/array_shift_variation8.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Test array_shift() function : usage variations - maintaining referenced elements
+--FILE--
+<?php
+/* Prototype : mixed array_shift(array &$stack)
+ * Description: Pops an element off the beginning of the array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * From a comment left by Traps on 09-Jul-2007 on the array_shift documentation page:
+ * For those that may be trying to use array_shift() with an array containing references
+ * (e.g. working with linked node trees), beware that array_shift() may not work as you expect:
+ * it will return a *copy* of the first element of the array,
+ * and not the element itself, so your reference will be lost.
+ * The solution is to reference the first element before removing it with array_shift():
+ */
+
+echo "*** Testing array_shift() : usage variations ***\n";
+
+// using only array_shift:
+echo "\n-- Reference result of array_shift: --\n";
+$a = 1;
+$array = array(&$a);
+$b =& array_shift($array);
+$b = 2;
+echo "a = $a, b = $b\n";
+
+// solution: referencing the first element first:
+echo "\n-- Reference first element before array_shift: --\n";
+$a = 1;
+$array = array(&$a);
+$b =& $array[0];
+array_shift($array);
+$b = 2;
+echo "a = $a, b = $b\n";
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_shift() : usage variations ***
+
+-- Reference result of array_shift: --
+
+Strict Standards: Only variables should be assigned by reference in %s on line %d
+a = 1, b = 2
+
+-- Reference first element before array_shift: --
+a = 2, b = 2
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_shuffle_basic.phpt b/ext/standard/tests/array/array_shuffle_basic.phpt
new file mode 100644
index 000000000..fdf932605
--- /dev/null
+++ b/ext/standard/tests/array/array_shuffle_basic.phpt
@@ -0,0 +1,99 @@
+--TEST--
+array_shuffle(): Test return type and value for expected input
+--FILE--
+<?php
+/*
+* proto bool shuffle ( array &$array )
+* Function is implemented in ext/standard/array.c
+*/
+$numbers = range(1, 20);
+echo "*** testing array_shuffle \n";
+$a = array();
+var_dump(shuffle($a));
+var_dump($a);
+$a = array(1);
+var_dump(shuffle($a));
+var_dump($a);
+$a = array(2 => 1);
+var_dump(shuffle($a));
+var_dump($a);
+$a = array("a" => 1);
+var_dump(shuffle($a));
+var_dump($a);
+$a = array(array(1, 2, 3));
+var_dump(shuffle($a));
+var_dump($a);
+$a = array(1, 1, 1, 1);
+var_dump(shuffle($a));
+var_dump($a);
+$arr1 = array(5 => 1, 6 => 2, 7 => 3, 8 => 9);
+$arr2 = array(5 => 1, 6 => 2, 7 => 3, 8 => 9);
+shuffle($arr1);
+echo "this should be 0->...." . count(array_diff($arr1, $arr2)) . "\n";
+echo "this should be 4->...." . count(array_intersect($arr1, $arr2)) . "\n";
+$bigarray = range(1, 400);
+shuffle($bigarray);
+echo "this should be 400->...." . count($bigarray) . "\n";
+echo "*** testing pass by reference \n";
+$original = $bigarray;
+shuffle($bigarray);
+$diffarray = array_diff_assoc($original, $bigarray);
+if (count($diffarray) < 350) {
+ // with 400 entries, the probability that 50 entries or more get the same
+ // key-> value association should be so close to zero it wont happen in the lifetime of the
+ // universe.
+ echo "shuffled array seems to be similar to original\n";
+ var_dump($original);
+ var_dump($bigarray);
+} else {
+ echo "test passed \n";
+}
+?>
+--EXPECT--
+*** testing array_shuffle
+bool(true)
+array(0) {
+}
+bool(true)
+array(1) {
+ [0]=>
+ int(1)
+}
+bool(true)
+array(1) {
+ [0]=>
+ int(1)
+}
+bool(true)
+array(1) {
+ [0]=>
+ int(1)
+}
+bool(true)
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+bool(true)
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+ [3]=>
+ int(1)
+}
+this should be 0->....0
+this should be 4->....4
+this should be 400->....400
+*** testing pass by reference
+test passed \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_basic.phpt b/ext/standard/tests/array/array_slice_basic.phpt
new file mode 100644
index 000000000..a4cbe4675
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_basic.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test array_slice() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of array_slice()
+ */
+
+echo "*** Testing array_slice() : basic functionality ***\n";
+
+
+$input = array('one' => 1, 'two' => 2, 3, 23 => 4);
+$offset = 2;
+$length = 2;
+$preserve_keys = true;
+
+// Calling array_slice() with all possible arguments
+echo "\n-- All arguments --\n";
+var_dump( array_slice($input, $offset, $length, $preserve_keys) );
+
+// Calling array_slice() with mandatory arguments
+echo "\n-- Mandatory arguments --\n";
+var_dump( array_slice($input, $offset) );
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : basic functionality ***
+
+-- All arguments --
+array(2) {
+ [0]=>
+ int(3)
+ [23]=>
+ int(4)
+}
+
+-- Mandatory arguments --
+array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_error.phpt b/ext/standard/tests/array/array_slice_error.phpt
new file mode 100644
index 000000000..0e8f1c757
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test array_slice() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to array_slice() to test behaviour
+ */
+
+echo "*** Testing array_slice() : error conditions ***\n";
+
+//Test array_slice with one more than the expected number of arguments
+echo "\n-- Testing array_slice() function with more than expected no. of arguments --\n";
+$input = array(1, 2);
+$offset = 10;
+$length = 10;
+$preserve_keys = true;
+$extra_arg = 10;
+var_dump( array_slice($input, $offset, $length, $preserve_keys, $extra_arg) );
+
+// Testing array_slice with one less than the expected number of arguments
+echo "\n-- Testing array_slice() function with less than expected no. of arguments --\n";
+var_dump( array_slice($input) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_slice() : error conditions ***
+
+-- Testing array_slice() function with more than expected no. of arguments --
+
+Warning: array_slice() expects at most 4 parameters, 5 given in %s on line %d
+NULL
+
+-- Testing array_slice() function with less than expected no. of arguments --
+
+Warning: array_slice() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation1.phpt b/ext/standard/tests/array/array_slice_variation1.phpt
new file mode 100644
index 000000000..4c7a148c8
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation1.phpt
@@ -0,0 +1,227 @@
+--TEST--
+Test array_slice() function : usage variations - Pass different data types as $input arg
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different arguments as $input argument to array_slice() to test behaviour
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$offset = 2;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_slice()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_slice($input, $offset) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+array(0) {
+}
+
+-- Iteration 19 --
+
+Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_slice() expects parameter 1 to be array, object given in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: array_slice() expects parameter 1 to be array, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation10.phpt b/ext/standard/tests/array/array_slice_variation10.phpt
new file mode 100644
index 000000000..85c521d6d
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation10.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test array_slice() function : usage variations - position of internal array pointer
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Check position of internal array pointer after calling array_slice()
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+$input = array ('one' => 'un', 'two' => 'deux', 23 => 'twenty-three', 'zero');
+
+echo "\n-- Call array_slice() --\n";
+var_dump($result = array_slice($input, 2));
+
+echo "-- Position of Internal Pointer in Result: --\n";
+echo key($result) . " => " . current($result) . "\n";
+echo "\n-- Position of Internal Pointer in Original Array: --\n";
+echo key($input) . " => " . current ($input) . "\n";
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- Call array_slice() --
+array(2) {
+ [0]=>
+ string(12) "twenty-three"
+ [1]=>
+ string(4) "zero"
+}
+-- Position of Internal Pointer in Result: --
+0 => twenty-three
+
+-- Position of Internal Pointer in Original Array: --
+one => un
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation2.phpt b/ext/standard/tests/array/array_slice_variation2.phpt
new file mode 100644
index 000000000..d293ce58d
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation2.phpt
@@ -0,0 +1,309 @@
+--TEST--
+Test array_slice() function : usage variations - Pass different data types as $offset arg
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $offset argument to array_slice() to test behaviour
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$input_array = array('one' => 1, 2, 'three' => 3, 4);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $offset argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+);
+
+// loop through each element of $inputs to check the behavior of array_slice()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_slice($input_array, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- Iteration 1 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 2 --
+array(3) {
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 3 --
+array(0) {
+}
+
+-- Iteration 4 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 5 --
+array(0) {
+}
+
+-- Iteration 6 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 7 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 8 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 9 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 10 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 11 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 12 --
+array(3) {
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 13 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 14 --
+array(3) {
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 15 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 16 --
+
+Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: array_slice() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 22 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+
+-- Iteration 23 --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ ["three"]=>
+ int(3)
+ [1]=>
+ int(4)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation3.phpt b/ext/standard/tests/array/array_slice_variation3.phpt
new file mode 100644
index 000000000..0aafa645e
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation3.phpt
@@ -0,0 +1,207 @@
+--TEST--
+Test array_slice() function : usage variations - Pass different data types as $length arg
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $length argument to array_slice to test behaviour
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$input_array = array('one' => 1, 2, 'three' => 3, 4);
+$offset = 2;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed to $length argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+);
+
+// loop through each element of $inputs to check the behavior of array_slice
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_slice($input_array, $offset, $input) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- Iteration 1 --
+array(0) {
+}
+
+-- Iteration 2 --
+array(1) {
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 3 --
+array(2) {
+ ["three"]=>
+ int(3)
+ [0]=>
+ int(4)
+}
+
+-- Iteration 4 --
+array(0) {
+}
+
+-- Iteration 5 --
+array(2) {
+ ["three"]=>
+ int(3)
+ [0]=>
+ int(4)
+}
+
+-- Iteration 6 --
+array(0) {
+}
+
+-- Iteration 7 --
+array(0) {
+}
+
+-- Iteration 8 --
+array(0) {
+}
+
+-- Iteration 9 --
+array(0) {
+}
+
+-- Iteration 10 --
+array(2) {
+ ["three"]=>
+ int(3)
+ [0]=>
+ int(4)
+}
+
+-- Iteration 11 --
+array(2) {
+ ["three"]=>
+ int(3)
+ [0]=>
+ int(4)
+}
+
+-- Iteration 12 --
+array(1) {
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 13 --
+array(0) {
+}
+
+-- Iteration 14 --
+array(1) {
+ ["three"]=>
+ int(3)
+}
+
+-- Iteration 15 --
+array(0) {
+}
+
+-- Iteration 16 --
+array(0) {
+}
+
+-- Iteration 17 --
+array(0) {
+}
+
+-- Iteration 18 --
+array(0) {
+}
+
+-- Iteration 19 --
+array(0) {
+}
+
+-- Iteration 20 --
+array(0) {
+}
+
+-- Iteration 21 --
+array(0) {
+}
+
+-- Iteration 22 --
+array(2) {
+ ["three"]=>
+ int(3)
+ [0]=>
+ int(4)
+}
+
+-- Iteration 23 --
+array(2) {
+ ["three"]=>
+ int(3)
+ [0]=>
+ int(4)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation4.phpt b/ext/standard/tests/array/array_slice_variation4.phpt
new file mode 100644
index 000000000..f093d2db8
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation4.phpt
@@ -0,0 +1,327 @@
+--TEST--
+Test array_slice() function : usage variations - Pass different data types as $preserve_keys arg
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $preserve_keys argument to array_slice() to test behaviour
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$input_array = array('one' => 1, 2, 99 => 3, 4);
+$offset = 0;
+$length = 3;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed to $preserve_keys argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+);
+
+// loop through each element of $inputs to check the behavior of array_slice()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_slice($input_array, $offset, $length, $input) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- Iteration 1 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- Iteration 2 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 3 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 4 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 5 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 6 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 7 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 8 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 9 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 10 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- Iteration 11 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- Iteration 12 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 13 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- Iteration 14 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 15 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- Iteration 16 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- Iteration 17 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- Iteration 18 --
+
+Warning: array_slice() expects parameter 4 to be boolean, array given in %s on line %d
+NULL
+
+-- Iteration 19 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 20 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 21 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [99]=>
+ int(3)
+}
+
+-- Iteration 22 --
+
+Warning: array_slice() expects parameter 4 to be boolean, object given in %s on line %d
+NULL
+
+-- Iteration 23 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- Iteration 24 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation5.phpt b/ext/standard/tests/array/array_slice_variation5.phpt
new file mode 100644
index 000000000..ed5c82f18
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation5.phpt
@@ -0,0 +1,191 @@
+--TEST--
+Test array_slice() function : usage variations - Pass different integers as $offset argument
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different integers as $offset argument to test how array_slice() behaves
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+$input = array ('one' => 1, 2 => 'two', 'three', 9 => 'nine', 'ten' => 10);
+
+for ($i = -7; $i <= 7; $i++) {
+ echo "\n-- \$offset is $i --\n";
+ var_dump(array_slice($input, $i));
+}
+echo "\n-- \$offset is maximum integer value --\n";
+var_dump(array_slice($input, PHP_INT_MAX));
+
+echo "\n-- \$offset is minimum integer value --\n";
+var_dump(array_slice($input, -PHP_INT_MAX));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- $offset is -7 --
+array(5) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is -6 --
+array(5) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is -5 --
+array(5) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is -4 --
+array(4) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is -3 --
+array(3) {
+ [0]=>
+ string(5) "three"
+ [1]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is -2 --
+array(2) {
+ [0]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is -1 --
+array(1) {
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is 0 --
+array(5) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is 1 --
+array(4) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is 2 --
+array(3) {
+ [0]=>
+ string(5) "three"
+ [1]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is 3 --
+array(2) {
+ [0]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is 4 --
+array(1) {
+ ["ten"]=>
+ int(10)
+}
+
+-- $offset is 5 --
+array(0) {
+}
+
+-- $offset is 6 --
+array(0) {
+}
+
+-- $offset is 7 --
+array(0) {
+}
+
+-- $offset is maximum integer value --
+array(0) {
+}
+
+-- $offset is minimum integer value --
+array(5) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation6.phpt b/ext/standard/tests/array/array_slice_variation6.phpt
new file mode 100644
index 000000000..e210b4dd2
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation6.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test array_slice() function : usage variations - pass different int values as $length arg
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different integer values as $length argument to array_slice() to test behaviour
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+$input = array ('one' => 1, 2 => 'two', 'three', 9 => 'nine', 'ten' => 10);
+$offset = 1;
+
+for ($i = -6; $i <= 6; $i++) {
+ echo "\n-- \$length is $i --\n";
+ var_dump(array_slice($input, $offset, $i));
+}
+echo "\n-- \$length is maximum integer value --\n";
+var_dump(array_slice($input, $offset, PHP_INT_MAX));
+
+echo "\n-- \$length is minimum integer value --\n";
+var_dump(array_slice($input, $offset, -PHP_INT_MAX));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- $length is -6 --
+array(0) {
+}
+
+-- $length is -5 --
+array(0) {
+}
+
+-- $length is -4 --
+array(0) {
+}
+
+-- $length is -3 --
+array(1) {
+ [0]=>
+ string(3) "two"
+}
+
+-- $length is -2 --
+array(2) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+}
+
+-- $length is -1 --
+array(3) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+}
+
+-- $length is 0 --
+array(0) {
+}
+
+-- $length is 1 --
+array(1) {
+ [0]=>
+ string(3) "two"
+}
+
+-- $length is 2 --
+array(2) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+}
+
+-- $length is 3 --
+array(3) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+}
+
+-- $length is 4 --
+array(4) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $length is 5 --
+array(4) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $length is 6 --
+array(4) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $length is maximum integer value --
+array(4) {
+ [0]=>
+ string(3) "two"
+ [1]=>
+ string(5) "three"
+ [2]=>
+ string(4) "nine"
+ ["ten"]=>
+ int(10)
+}
+
+-- $length is minimum integer value --
+array(0) {
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation7.phpt b/ext/standard/tests/array/array_slice_variation7.phpt
new file mode 100644
index 000000000..abf517d1f
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation7.phpt
@@ -0,0 +1,300 @@
+--TEST--
+Test array_slice() function : usage variations - different data types as keys in an array
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as keys in an array to array_slice()
+ * to test how $preserve_keys treats them
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$offset = 0;
+$length = 10; // to ensure all elements are displayed
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// arrays of different data types to be passed as $input
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+/*3*/ 'extreme floats' => array(
+ 12.3456789000e6 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*4*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+
+/*5*/ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*6*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+
+/*7*/ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*8*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+
+/*9*/ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*10*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*11*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*12*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of array_slice()
+$iterator = 1;
+foreach($inputs as $type => $input) {
+ echo "\n-- Iteration $iterator : key type is $type --\n";
+ echo "\$preserve_keys = TRUE\n";
+ var_dump( array_slice($input, $offset, $length, true) );
+ echo "\$preserve_keys = FALSE\n";
+ var_dump( array_slice($input, $offset, $length, false) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- Iteration 1 : key type is int --
+$preserve_keys = TRUE
+array(4) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [12345]=>
+ string(8) "positive"
+ [-2345]=>
+ string(8) "negative"
+}
+$preserve_keys = FALSE
+array(4) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(8) "positive"
+ [3]=>
+ string(8) "negative"
+}
+
+-- Iteration 2 : key type is float --
+$preserve_keys = TRUE
+array(3) {
+ [10]=>
+ string(8) "positive"
+ [-10]=>
+ string(8) "negative"
+ [0]=>
+ string(4) "half"
+}
+$preserve_keys = FALSE
+array(3) {
+ [0]=>
+ string(8) "positive"
+ [1]=>
+ string(8) "negative"
+ [2]=>
+ string(4) "half"
+}
+
+-- Iteration 3 : key type is extreme floats --
+$preserve_keys = TRUE
+array(2) {
+ [12345678]=>
+ string(5) "large"
+ [0]=>
+ string(5) "small"
+}
+$preserve_keys = FALSE
+array(2) {
+ [0]=>
+ string(5) "large"
+ [1]=>
+ string(5) "small"
+}
+
+-- Iteration 4 : key type is null uppercase --
+$preserve_keys = TRUE
+array(1) {
+ [""]=>
+ string(6) "null 1"
+}
+$preserve_keys = FALSE
+array(1) {
+ [""]=>
+ string(6) "null 1"
+}
+
+-- Iteration 5 : key type is null lowercase --
+$preserve_keys = TRUE
+array(1) {
+ [""]=>
+ string(6) "null 2"
+}
+$preserve_keys = FALSE
+array(1) {
+ [""]=>
+ string(6) "null 2"
+}
+
+-- Iteration 6 : key type is bool lowercase --
+$preserve_keys = TRUE
+array(2) {
+ [1]=>
+ string(6) "lowert"
+ [0]=>
+ string(6) "lowerf"
+}
+$preserve_keys = FALSE
+array(2) {
+ [0]=>
+ string(6) "lowert"
+ [1]=>
+ string(6) "lowerf"
+}
+
+-- Iteration 7 : key type is bool uppercase --
+$preserve_keys = TRUE
+array(2) {
+ [1]=>
+ string(6) "uppert"
+ [0]=>
+ string(6) "upperf"
+}
+$preserve_keys = FALSE
+array(2) {
+ [0]=>
+ string(6) "uppert"
+ [1]=>
+ string(6) "upperf"
+}
+
+-- Iteration 8 : key type is empty double quotes --
+$preserve_keys = TRUE
+array(1) {
+ [""]=>
+ string(6) "emptyd"
+}
+$preserve_keys = FALSE
+array(1) {
+ [""]=>
+ string(6) "emptyd"
+}
+
+-- Iteration 9 : key type is empty single quotes --
+$preserve_keys = TRUE
+array(1) {
+ [""]=>
+ string(6) "emptys"
+}
+$preserve_keys = FALSE
+array(1) {
+ [""]=>
+ string(6) "emptys"
+}
+
+-- Iteration 10 : key type is string --
+$preserve_keys = TRUE
+array(3) {
+ ["stringd"]=>
+ string(7) "stringd"
+ ["strings"]=>
+ string(7) "strings"
+ ["hello world"]=>
+ string(7) "stringh"
+}
+$preserve_keys = FALSE
+array(3) {
+ ["stringd"]=>
+ string(7) "stringd"
+ ["strings"]=>
+ string(7) "strings"
+ ["hello world"]=>
+ string(7) "stringh"
+}
+
+-- Iteration 11 : key type is undefined --
+$preserve_keys = TRUE
+array(1) {
+ [""]=>
+ string(9) "undefined"
+}
+$preserve_keys = FALSE
+array(1) {
+ [""]=>
+ string(9) "undefined"
+}
+
+-- Iteration 12 : key type is unset --
+$preserve_keys = TRUE
+array(1) {
+ [""]=>
+ string(5) "unset"
+}
+$preserve_keys = FALSE
+array(1) {
+ [""]=>
+ string(5) "unset"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation8.phpt b/ext/standard/tests/array/array_slice_variation8.phpt
new file mode 100644
index 000000000..aece410c0
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation8.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test array_slice() function : usage variations - multidimensional arrays
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_slice when passed
+ * 1. a two-dimensional array as $input argument
+ * 2. a sub-array as $input argument
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+$input = array ('zero', 'one', array('zero', 'un', 'deux'), 9 => 'nine');
+
+echo "\n-- Slice a two-dimensional array --\n";
+var_dump(array_slice($input, 1, 3));
+
+echo "\n-- \$input is a sub-array --\n";
+var_dump(array_slice($input[2], 1, 2));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- Slice a two-dimensional array --
+array(3) {
+ [0]=>
+ string(3) "one"
+ [1]=>
+ array(3) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(2) "un"
+ [2]=>
+ string(4) "deux"
+ }
+ [2]=>
+ string(4) "nine"
+}
+
+-- $input is a sub-array --
+array(2) {
+ [0]=>
+ string(2) "un"
+ [1]=>
+ string(4) "deux"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_slice_variation9.phpt b/ext/standard/tests/array/array_slice_variation9.phpt
new file mode 100644
index 000000000..030d4bd73
--- /dev/null
+++ b/ext/standard/tests/array/array_slice_variation9.phpt
@@ -0,0 +1,75 @@
+--TEST--
+Test array_slice() function : usage variations - referenced variables
+--INI--
+allow_call_time_pass_reference=on
+--FILE--
+<?php
+/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]])
+ * Description: Returns elements specified by offset and length
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_slice() when:
+ * 1. Passed an array of referenced variables
+ * 2. $input argument is passed by reference
+ */
+
+echo "*** Testing array_slice() : usage variations ***\n";
+
+$val1 = 'one';
+$val2 = 'two';
+$val3 = 'three';
+
+echo "\n-- Array of referenced variables (\$preserve_keys = default) --\n";
+$input = array(3 => &$val1, 2 => &$val2, 1 => &$val3);
+var_dump(array_slice($input, 1, 2));
+
+echo "-- Change \$val2 (\$preserve_keys = TRUE) --\n";
+$val2 = 'hello, world';
+var_dump(array_slice($input, 1, 2, true));
+
+echo "\n-- Pass array by reference --\n";
+$new_input = array (1, 2, 3);
+var_dump(array_slice(&$new_input, 1));
+echo "-- Check passed array: --\n";
+var_dump($new_input);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_slice() : usage variations ***
+
+-- Array of referenced variables ($preserve_keys = default) --
+array(2) {
+ [0]=>
+ &string(3) "two"
+ [1]=>
+ &string(5) "three"
+}
+-- Change $val2 ($preserve_keys = TRUE) --
+array(2) {
+ [2]=>
+ &string(12) "hello, world"
+ [1]=>
+ &string(5) "three"
+}
+
+-- Pass array by reference --
+array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+-- Check passed array: --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/array_sum_basic.phpt b/ext/standard/tests/array/array_sum_basic.phpt
new file mode 100644
index 000000000..c178853d7
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_basic.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test array_sum() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array &input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_sum() : basic functionality ***\n";
+
+// array with integer values
+$input = array(1, 2, 3, 4, 5);
+echo "-- array_sum() with integer array entries --\n";
+var_dump( array_sum($input) );
+
+// array with float values
+$input = array(1.0, 2.2, 3.4, 4.6);
+echo "-- array_sum() with float array entries --\n";
+var_dump( array_sum($input) );
+
+// array with integer and float values
+$input = array(1, 2.3, 4, 0.6, 10);
+echo "-- array_sum() with integer/float array entries --\n";
+var_dump( array_sum($input) );
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : basic functionality ***
+-- array_sum() with integer array entries --
+int(15)
+-- array_sum() with float array entries --
+float(11.2)
+-- array_sum() with integer/float array entries --
+float(17.9)
+Done
diff --git a/ext/standard/tests/array/array_sum_error.phpt b/ext/standard/tests/array/array_sum_error.phpt
new file mode 100644
index 000000000..ffa7e5b6d
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_error.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test array_sum() function : error conditions
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array &input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_sum() : error conditions ***\n";
+
+// Zero arguments
+echo "-- Testing array_sum() function with zero arguments --\n";
+var_dump( array_sum() );
+
+// One more than the expected number of arguments
+echo "-- Testing array_sum() function with more than expected no. of arguments --\n";
+$input = array(1, 2, 3, 4);
+$extra_arg = 10;
+var_dump( array_sum($input, $extra_arg) );
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : error conditions ***
+-- Testing array_sum() function with zero arguments --
+
+Warning: Wrong parameter count for array_sum() in %s on line %d
+NULL
+-- Testing array_sum() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for array_sum() in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_sum_variation1.phpt b/ext/standard/tests/array/array_sum_variation1.phpt
new file mode 100644
index 000000000..df6238670
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_variation1.phpt
@@ -0,0 +1,179 @@
+--TEST--
+Test array_sum() function : usage variations - unexpected values for 'input' argument
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array $input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing different scalar/nonscalar values as 'input' argument to array_sum()
+*/
+
+echo "*** Testing array_sum() : unexpected values for 'input' ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// Class definition
+class MyClass
+{
+ public function __toString()
+ {
+ return "object";
+ }
+}
+
+// different scalar/non scalar values for 'input' argument
+$input_values = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 10.1234567e8,
+ 10.7654321E-8,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+
+ // object data
+/*20*/ new MyClass(),
+
+ // resource data
+/*21*/ $fp = fopen(__FILE__,'r'),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+);
+
+// loop through each element of the array for input
+for($count = 0; $count < count($input_values); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( array_sum($input_values[$count]) );
+};
+
+fclose($fp);
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : unexpected values for 'input' ***
+-- Iteration 1 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 2 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 3 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 4 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 5 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 6 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 7 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 8 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 9 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 10 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 11 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 12 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 13 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 14 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 15 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 16 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 17 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 18 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 19 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 20 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 21 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 22 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+-- Iteration 23 --
+
+Warning: array_sum(): The argument should be an array in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_sum_variation2.phpt b/ext/standard/tests/array/array_sum_variation2.phpt
new file mode 100644
index 000000000..a697a15fc
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_variation2.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test array_sum() function : usage variations - array with different integer value
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array &input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_sum() with different types of integer arrays containing data of following type:
+* integer, octal, hexadecimal, maximum and minimum integer values & mixed of all integers
+*/
+
+echo "*** Testing array_sum() : different integer array ***\n";
+
+// Int array
+$int_values = array(3, 2, 100, 150, 25, 350, 0, -3, -1200);
+echo "-- Sum of Integer array --\n";
+var_dump( array_sum($int_values) );
+
+// Octal array
+$octal_values = array(056, 023, 090, 015, -045, 01, -078);
+echo "-- Sum of Octal array --\n";
+var_dump( array_sum($octal_values) );
+
+// Hexadecimal array
+$hex_values = array(0xAE, 0x2B, 0X10, -0xCF, 0X12, -0XF2);
+echo "-- Sum of Hex array --\n";
+var_dump( array_sum($hex_values) );
+
+// Mixed values int, octal & hex
+$mixed_int_value = array(2, 5, -1, 054, 0X3E, 0, -014, -0x2A);
+echo "-- Sum of mixed integer values --\n";
+var_dump( array_sum($mixed_int_value) );
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : different integer array ***
+-- Sum of Integer array --
+int(-573)
+-- Sum of Octal array --
+int(35)
+-- Sum of Hex array --
+int(-198)
+-- Sum of mixed integer values --
+int(58)
+Done
diff --git a/ext/standard/tests/array/array_sum_variation3.phpt b/ext/standard/tests/array/array_sum_variation3.phpt
new file mode 100644
index 000000000..9d32c2c38
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_variation3.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Test array_sum() function : usage variations - array with different float values
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array $input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * sum of array containing different float values
+*/
+
+echo "*** Testing array_sum() : array with different float values ***\n";
+
+// Simple float array
+$float_input = array( 1.1, 2.3, 0.0, 0.5, -2.3, -0.8, .5);
+echo "-- simple float array --\n";
+var_dump( array_sum($float_input) );
+
+// float array with scientific notations
+$float_input = array( 1.2e2, 23.4e3, -4.1e2, 0.2e2, 2.1e-2, .5e3);
+echo "-- float array with scientific notations e and E --\n";
+var_dump( array_sum($float_input) );
+$float_input = array( 1.2E2, 23.4E3, -4.1E2, 0.2E2, 2.1E-2, .5E3);
+var_dump( array_sum($float_input) );
+
+// Mixed float array
+$float_input = array(
+ 1.2,
+ 0.5
+ -5.8,
+ 6.334,
+ -0.65,
+ 1.2e3,
+ -2.3e2,
+ 5.56E3,
+ -3.82E-2
+);
+echo "-- Mixed float array --\n";
+var_dump( array_sum($float_input) );
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : array with different float values ***
+-- simple float array --
+float(1.3)
+-- float array with scientific notations e and E --
+float(23630.021)
+float(23630.021)
+-- Mixed float array --
+float(6531.5458)
+Done
diff --git a/ext/standard/tests/array/array_sum_variation4.phpt b/ext/standard/tests/array/array_sum_variation4.phpt
new file mode 100644
index 000000000..4959deee7
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_variation4.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test array_sum() function : usage variations - array with duplicate values
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array $input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Checking array_sum() with integer and float array containing duplicate values
+*/
+
+echo "*** Testing array_sum() : array with duplicate values ***\n";
+
+// integer array with duplicate values
+$int_input = array( 2, 5, 7, 5, 0, -4, 2, 100);
+echo "-- With integer array --\n";
+var_dump( array_sum($int_input) );
+
+// float array with duplicate values
+$float_input = array( 2.3, 1.9, -4.1, 0.5, 1.9, -4.1, 3.6, 0.5);
+echo "-- With float array --\n";
+var_dump( array_sum($float_input) );
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : array with duplicate values ***
+-- With integer array --
+int(117)
+-- With float array --
+float(2.5)
+Done
diff --git a/ext/standard/tests/array/array_sum_variation5.phpt b/ext/standard/tests/array/array_sum_variation5.phpt
new file mode 100644
index 000000000..9068c4565
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_variation5.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test array_sum() function : usage variations - array with reference variables as elements
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array $input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_sum() with 'input' having reference variables as elements
+*/
+
+echo "*** Testing array_sum() : array with elements as reference ***\n";
+
+$value1 = -5;
+$value2 = 100;
+$value3 = 0;
+$value4 = &$value1;
+
+// input array containing elements as reference variables
+$input = array(
+ 0 => 10,
+ 1 => &$value4,
+ 2 => &$value2,
+ 3 => 200,
+ 4 => &$value3,
+);
+
+var_dump( array_sum($input) );
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : array with elements as reference ***
+int(305)
+Done
diff --git a/ext/standard/tests/array/array_sum_variation6.phpt b/ext/standard/tests/array/array_sum_variation6.phpt
new file mode 100644
index 000000000..ba67cfd49
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_variation6.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test array_sum() function : usage variations - associative array
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array $input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_sum() with associative array as 'input' argument
+*/
+
+echo "*** Testing array_sum() : with associative array ***\n";
+
+// array with numeric keys
+$input = array(0 => 1, 1 => 10, 2 => 0, 3 => -2, 4 => 23.56);
+echo "-- with numeric keys --\n";
+var_dump( array_sum($input) );
+
+// array with string keys
+$input = array('a' => 20, "b" => 50, 'c' => 0, 'd' => -30, "e" => 100);
+echo "-- with string keys --\n";
+var_dump( array_sum($input) );
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : with associative array ***
+-- with numeric keys --
+float(32.56)
+-- with string keys --
+int(140)
+Done
diff --git a/ext/standard/tests/array/array_sum_variation7.phpt b/ext/standard/tests/array/array_sum_variation7.phpt
new file mode 100644
index 000000000..d30987535
--- /dev/null
+++ b/ext/standard/tests/array/array_sum_variation7.phpt
@@ -0,0 +1,86 @@
+--TEST--
+Test array_sum() function : usage variations - 'input' array with unexpected values as array element
+--FILE--
+<?php
+/* Prototype : mixed array_sum(array $input)
+ * Description: Returns the sum of the array entries
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_sum() with array having other than numeric entries
+* strings, bool, null, subarrays & objects
+*/
+
+echo "*** Testing array_sum() : array with unexpected entries ***\n";
+
+// empty array
+$input = array();
+echo "-- empty array --\n";
+var_dump( array_sum($input) );
+
+// string array
+$input = array('Apple', 'Banana', 'Carrot', 'Mango', 'Orange');
+echo "-- array with string values --\n";
+var_dump( array_sum($input) );
+
+// bool array
+$input = array( true, true, false, true, false);
+echo "-- array with bool values --\n";
+var_dump( array_sum($input) );
+
+// array with null entry
+$input = array(null, NULL);
+echo "-- array with null values --\n";
+var_dump( array_sum($input) );
+
+// array with subarray
+$input = array(
+ array(1, 2),
+ array(),
+ array(0)
+);
+echo "-- array with subarrays --\n";
+var_dump( array_sum($input) );
+
+class MyClass
+{
+ public $value;
+ public function __construct($value)
+ {
+ $this->value = $value;
+ }
+}
+// array of objects
+$input = array(
+ new MyClass(2),
+ new MyClass(5),
+ new MyClass(10),
+ new MyClass(0)
+);
+echo "-- array with object values --\n";
+var_dump( array_sum($input) );
+
+// Mixed values
+$input = array( 5, -8, 7.2, -1.2, "10", "apple", 'Mango', true, false, null, NULL, array( array(1,2), array(0), array()));
+echo "-- array with mixed values --\n";
+var_dump( array_sum($input) );
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_sum() : array with unexpected entries ***
+-- empty array --
+int(0)
+-- array with string values --
+int(0)
+-- array with bool values --
+int(3)
+-- array with null values --
+int(0)
+-- array with subarrays --
+int(0)
+-- array with object values --
+int(0)
+-- array with mixed values --
+float(14)
+Done
diff --git a/ext/standard/tests/array/array_udiff_assoc_basic.phpt b/ext/standard/tests/array/array_udiff_assoc_basic.phpt
new file mode 100644
index 000000000..9670eef5d
--- /dev/null
+++ b/ext/standard/tests/array/array_udiff_assoc_basic.phpt
@@ -0,0 +1,41 @@
+--TEST--
+array_udiff_assoc(): Test return type and value for expected input
+--FILE--
+<?php
+/*
+* proto array array_udiff_assoc ( array $array1, array $array2 [, array $ ..., callback $data_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+class cr {
+ private $priv_member;
+ function cr($val) {
+ $this->priv_member = $val;
+ }
+ static function comp_func_cr($a, $b) {
+ if ($a->priv_member === $b->priv_member) return 0;
+ return ($a->priv_member > $b->priv_member) ? 1 : -1;
+ }
+}
+$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1 => new cr(4), 2 => new cr(-15),);
+$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1 => new cr(4), 2 => new cr(-15),);
+$result = array_udiff_assoc($a, $b, array("cr", "comp_func_cr"));
+var_dump($result);
+?>
+--EXPECTF--
+array(3) {
+ ["0.1"]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(9)
+ }
+ ["0.5"]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(12)
+ }
+ [0]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(23)
+ }
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_udiff_basic.phpt b/ext/standard/tests/array/array_udiff_basic.phpt
new file mode 100644
index 000000000..636e3abf3
--- /dev/null
+++ b/ext/standard/tests/array/array_udiff_basic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+array_udiff():Test return type and value for expected input
+--FILE--
+<?php
+/*
+* proto array array_udiff ( array $array1, array $array2 [, array $ ..., callback $data_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+class cr {
+ private $priv_member;
+ function cr($val) {
+ $this->priv_member = $val;
+ }
+ static function comp_func_cr($a, $b) {
+ if ($a->priv_member === $b->priv_member) return 0;
+ return ($a->priv_member > $b->priv_member) ? 1 : -1;
+ }
+}
+$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1 => new cr(4), 2 => new cr(-15),);
+$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1 => new cr(4), 2 => new cr(-15),);
+$result = array_udiff($a, $b, array("cr", "comp_func_cr"));
+var_dump($result);
+?>
+--EXPECTF--
+array(2) {
+ ["0.5"]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(12)
+ }
+ [0]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(23)
+ }
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_udiff_uassoc_basic.phpt b/ext/standard/tests/array/array_udiff_uassoc_basic.phpt
new file mode 100644
index 000000000..0e6d6154d
--- /dev/null
+++ b/ext/standard/tests/array/array_udiff_uassoc_basic.phpt
@@ -0,0 +1,45 @@
+--TEST--
+array_udiff_uassoc(): Test return type and value for expected input
+--FILE--
+<?php
+/*
+* proto array array_udiff_assoc ( array $array1, array $array2 [, array $ ..., callback $data_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+class cr {
+ private $priv_member;
+ function cr($val) {
+ $this->priv_member = $val;
+ }
+ static function comp_func_cr($a, $b) {
+ if ($a->priv_member === $b->priv_member) return 0;
+ return ($a->priv_member > $b->priv_member) ? 1 : -1;
+ }
+ static function comp_func_key($a, $b) {
+ if ($a === $b) return 0;
+ return ($a > $b) ? 1 : -1;
+ }
+}
+$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1 => new cr(4), 2 => new cr(-15),);
+$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1 => new cr(4), 2 => new cr(-15),);
+$result = array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), array("cr", "comp_func_key"));
+var_dump($result);
+?>
+--EXPECTF--
+array(3) {
+ ["0.1"]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(9)
+ }
+ ["0.5"]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(12)
+ }
+ [0]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(23)
+ }
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_uintersect_assoc_basic.phpt b/ext/standard/tests/array/array_uintersect_assoc_basic.phpt
new file mode 100644
index 000000000..644109ab6
--- /dev/null
+++ b/ext/standard/tests/array/array_uintersect_assoc_basic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+array_uintersect_assoc(): Test return type and value for expected input
+--FILE--
+<?php
+/*
+* proto array array_uintersect_assoc ( array $array1, array $array2 [, array $ ..., callback $data_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+class cr {
+ private $priv_member;
+ function cr($val) {
+ $this->priv_member = $val;
+ }
+ static function comp_func_cr($a, $b) {
+ if ($a->priv_member === $b->priv_member) return 0;
+ return ($a->priv_member > $b->priv_member) ? 1 : -1;
+ }
+}
+$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1 => new cr(4), 2 => new cr(-15),);
+$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1 => new cr(4), 2 => new cr(-15),);
+$result = array_uintersect_assoc($a, $b, array("cr", "comp_func_cr"));
+var_dump($result);
+?>
+--EXPECTF--
+array(2) {
+ [1]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(4)
+ }
+ [2]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(-15)
+ }
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_uintersect_basic.phpt b/ext/standard/tests/array/array_uintersect_basic.phpt
new file mode 100644
index 000000000..1c80a959b
--- /dev/null
+++ b/ext/standard/tests/array/array_uintersect_basic.phpt
@@ -0,0 +1,41 @@
+--TEST--
+array_uintersect(): Test return type and value for expected input
+--FILE--
+<?php
+/*
+* proto array array_uintersect ( array $array1, array $array2 [, array $ ..., callback $data_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+class cr {
+ private $priv_member;
+ function cr($val) {
+ $this->priv_member = $val;
+ }
+ static function comp_func_cr($a, $b) {
+ if ($a->priv_member === $b->priv_member) return 0;
+ return ($a->priv_member > $b->priv_member) ? 1 : -1;
+ }
+}
+$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1 => new cr(4), 2 => new cr(-15),);
+$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1 => new cr(4), 2 => new cr(-15),);
+$result = array_uintersect($a, $b, array("cr", "comp_func_cr"));
+var_dump($result);
+?>
+--EXPECTF--
+array(3) {
+ ["0.1"]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(9)
+ }
+ [1]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(4)
+ }
+ [2]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(-15)
+ }
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_uintersect_uassoc_basic.phpt b/ext/standard/tests/array/array_uintersect_uassoc_basic.phpt
new file mode 100644
index 000000000..a0bd055e8
--- /dev/null
+++ b/ext/standard/tests/array/array_uintersect_uassoc_basic.phpt
@@ -0,0 +1,40 @@
+--TEST--
+array_uintersect_uassoc(): Test return type and value for expected input
+--FILE--
+<?php
+/*
+* proto array array_uintersect_assoc ( array $array1, array $array2 [, array $ ..., callback $data_compare_func] )
+* Function is implemented in ext/standard/array.c
+*/
+class cr {
+ private $priv_member;
+ function cr($val) {
+ $this->priv_member = $val;
+ }
+ static function comp_func_cr($a, $b) {
+ if ($a->priv_member === $b->priv_member) return 0;
+ return ($a->priv_member > $b->priv_member) ? 1 : -1;
+ }
+ static function comp_func_key($a, $b) {
+ if ($a === $b) return 0;
+ return ($a > $b) ? 1 : -1;
+ }
+}
+$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1 => new cr(4), 2 => new cr(-15),);
+$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1 => new cr(4), 2 => new cr(-15),);
+$result = array_uintersect_uassoc($a, $b, array("cr", "comp_func_cr"), array("cr", "comp_func_key"));
+var_dump($result);
+?>
+--EXPECTF--
+array(2) {
+ [1]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(4)
+ }
+ [2]=>
+ object(cr)#%d (1) {
+ ["priv_member:private"]=>
+ int(-15)
+ }
+} \ No newline at end of file
diff --git a/ext/standard/tests/array/array_unique_basic.phpt b/ext/standard/tests/array/array_unique_basic.phpt
new file mode 100644
index 000000000..58d3acf1b
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_basic.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test array_unique() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_unique() : basic functionality ***\n";
+
+// array with default keys
+$input = array(1, 2, "1", '2');
+var_dump( array_unique($input) );
+
+// associative array
+$input = array("1" => "one", 1 => "one", 2 => "two", '2' => "two");
+var_dump( array_unique($input) );
+
+// mixed array
+$input = array("1" => "one", "two", "one", 2 => "two", "three");
+var_dump( array_unique($input) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : basic functionality ***
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+array(2) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+}
+array(3) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [4]=>
+ string(5) "three"
+}
+Done
diff --git a/ext/standard/tests/array/array_unique_error.phpt b/ext/standard/tests/array/array_unique_error.phpt
new file mode 100644
index 000000000..59d458a2a
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_error.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test array_unique() function : error conditions
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_unique() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing array_unique() function with zero arguments --\n";
+var_dump( array_unique() );
+
+//Test array_unique with one more than the expected number of arguments
+echo "\n-- Testing array_unique() function with more than expected no. of arguments --\n";
+$input = array(1, 2);
+$extra_arg = 10;
+var_dump( array_unique($input, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : error conditions ***
+
+-- Testing array_unique() function with zero arguments --
+
+Warning: Wrong parameter count for array_unique() in %s on line %d
+NULL
+
+-- Testing array_unique() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for array_unique() in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_unique_variation1.phpt b/ext/standard/tests/array/array_unique_variation1.phpt
new file mode 100644
index 000000000..3a9ae10dd
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_variation1.phpt
@@ -0,0 +1,194 @@
+--TEST--
+Test array_unique() function : usage variations - unexpected values for 'input' argument
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing non array values to 'input' argument of array_unique() and see
+ * that the function outputs proper warning messages wherever expected.
+*/
+
+echo "*** Testing array_unique() : Passing non array values to \$input argument ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array (
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs and check the behavior of array_unique()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_unique($input) );
+ $iterator++;
+}
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : Passing non array values to $input argument ***
+-- Iteration 1 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 11 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 13 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 14 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 21 --
+array(0) {
+}
+-- Iteration 22 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 23 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 24 --
+
+Warning: array_unique(): The argument should be an array in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_unique_variation2.phpt b/ext/standard/tests/array/array_unique_variation2.phpt
new file mode 100644
index 000000000..5cdb43a8e
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_variation2.phpt
@@ -0,0 +1,232 @@
+--TEST--
+Test array_unique() function : usage variations - different arrays for 'input' argument
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing different arrays to $input argument and testing whether
+* array_unique() behaves in an expected way.
+*/
+
+echo "*** Testing array_unique() : Passing different arrays to \$input argument ***\n";
+
+/* Different heredoc strings passed as argument to arrays */
+// heredoc with blank line
+$blank_line = <<<EOT
+
+
+EOT;
+
+// heredoc with multiline string
+$multiline_string = <<<EOT
+hello world
+The quick brown fox jumped over;
+the lazy dog
+This is a double quoted string
+EOT;
+
+// heredoc with diferent whitespaces
+$diff_whitespaces = <<<EOT
+hello\r world
+1111\t\t != 2222\v\v
+heredoc\ndouble quoted string. with\vdifferent\fwhite\vspaces
+EOT;
+
+// heredoc with quoted strings and numeric values
+$numeric_string = <<<EOT
+11 < 12. 123 >22
+'single quoted string'
+"double quoted string"
+2222 != 1111.\t 0000 = 0000\n
+EOT;
+
+// arrays passed to $input argument
+$inputs = array (
+/*1*/ array(1, 2, 2, 1), // with default keys and numeric values
+ array(1.1, 2.2, 1.1), // with default keys & float values
+ array(false, true, false), // with default keys and boolean values
+ array(), // empty array
+/*5*/ array(NULL, null), // with NULL
+ array("a\v\f", "aaaa\r", "b", "aaaa\r", "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"), // with double quoted strings
+ array('a\v\f', 'aaaa\r', 'b', 'aaaa\r', '\[\]\!\@\#\$\%\^\&\*\(\)\{\}'), // with single quoted strings
+ array("h1" => $blank_line, "h2" => $multiline_string, "h3" => $diff_whitespaces, $blank_line), // with heredocs
+
+ // associative arrays
+/*9*/ array(1 => "one", 2 => "two", 2 => "two"), // explicit numeric keys, string values
+ array("one" => 1, "two" => 2, "1" => 1 ), // string keys & numeric values
+ array( 1 => 10, 2 => 20, 4 => 40, 5 => 10), // explicit numeric keys and numeric values
+ array( "one" => "ten", "two" => "twenty", "10" => "ten"), // string key/value
+ array("one" => 1, 2 => "two", 4 => "four"), //mixed
+
+ // associative array, containing null/empty/boolean values as key/value
+/*14*/ array(NULL => "NULL", null => "null", "NULL" => NULL, "null" => null),
+ array(true => "true", false => "false", "false" => false, "true" => true),
+ array("" => "emptyd", '' => 'emptys', "emptyd" => "", 'emptys' => ''),
+ array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
+/*18*/ array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
+);
+
+// loop through each sub-array of $inputs to check the behavior of array_unique()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_unique($input) );
+ $iterator++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : Passing different arrays to $input argument ***
+-- Iteration 1 --
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+-- Iteration 2 --
+array(2) {
+ [0]=>
+ float(1.1)
+ [1]=>
+ float(2.2)
+}
+-- Iteration 3 --
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+-- Iteration 4 --
+array(0) {
+}
+-- Iteration 5 --
+array(1) {
+ [0]=>
+ NULL
+}
+-- Iteration 6 --
+array(4) {
+ [0]=>
+ string(3) "a "
+ [1]=>
+ string(5) "aaaa "
+ [2]=>
+ string(1) "b"
+ [4]=>
+ string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
+}
+-- Iteration 7 --
+array(4) {
+ [0]=>
+ string(5) "a\v\f"
+ [1]=>
+ string(6) "aaaa\r"
+ [2]=>
+ string(1) "b"
+ [4]=>
+ string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
+}
+-- Iteration 8 --
+array(3) {
+ ["h1"]=>
+ string(1) "
+"
+ ["h2"]=>
+ string(88) "hello world
+The quick brown fox jumped over;
+the lazy dog
+This is a double quoted string"
+ ["h3"]=>
+ string(87) "hello world
+1111 != 2222
+heredoc
+double quoted string. with different white spaces"
+}
+-- Iteration 9 --
+array(2) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+}
+-- Iteration 10 --
+array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+-- Iteration 11 --
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(20)
+ [4]=>
+ int(40)
+}
+-- Iteration 12 --
+array(2) {
+ ["one"]=>
+ string(3) "ten"
+ ["two"]=>
+ string(6) "twenty"
+}
+-- Iteration 13 --
+array(3) {
+ ["one"]=>
+ int(1)
+ [2]=>
+ string(3) "two"
+ [4]=>
+ string(4) "four"
+}
+-- Iteration 14 --
+array(2) {
+ [""]=>
+ string(4) "null"
+ ["NULL"]=>
+ NULL
+}
+-- Iteration 15 --
+array(4) {
+ [1]=>
+ string(4) "true"
+ [0]=>
+ string(5) "false"
+ ["false"]=>
+ bool(false)
+ ["true"]=>
+ bool(true)
+}
+-- Iteration 16 --
+array(2) {
+ [""]=>
+ string(6) "emptys"
+ ["emptyd"]=>
+ string(0) ""
+}
+-- Iteration 17 --
+array(2) {
+ [1]=>
+ string(0) ""
+ [6]=>
+ bool(true)
+}
+-- Iteration 18 --
+array(3) {
+ [""]=>
+ int(4)
+ [0]=>
+ int(5)
+ [1]=>
+ int(6)
+}
+Done
diff --git a/ext/standard/tests/array/array_unique_variation3.phpt b/ext/standard/tests/array/array_unique_variation3.phpt
new file mode 100644
index 000000000..49103c815
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_variation3.phpt
@@ -0,0 +1,134 @@
+--TEST--
+Test array_unique() function : usage variations - associative array with different keys
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_unique() by passing different
+ * associative arrays having different keys to $input argument.
+*/
+
+echo "*** Testing array_unique() : assoc. array with diff. keys passed to \$input argument ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a class
+class classA
+{
+ public function __toString(){
+ return "Class A object";
+ }
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// different associative arrays to be passed to $input argument
+$inputs = array (
+/*1*/ // arrays with integer keys
+ array(0 => "0", 1 => "0"),
+ array(1 => "1", 2 => "2", 3 => 1, 4 => "4"),
+
+ // arrays with float keys
+/*3*/ array(2.3333 => "float", 44.44 => "float"),
+ array(1.2 => "f1", 3.33 => "f2", 4.89999922839999 => "f1", 3333333.333333 => "f4"),
+
+ // arrays with string keys
+/*5*/ array('\tHello' => 111, 're\td' => "color", '\v\fworld' => 2.2, 'pen\n' => 111),
+ array("\tHello" => 111, "re\td" => "color", "\v\fworld" => 2.2, "pen\n" => 111),
+ array("hello", $heredoc => "string", "string"),
+
+ // array with object, unset variable and resource variable
+/*8*/ array(new classA() => 11, @$unset_var => "hello", $fp => 'resource', 11, "hello"),
+);
+
+// loop through each sub-array of $inputs to check the behavior of array_unique()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_unique($input) );
+ $iterator++;
+}
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : assoc. array with diff. keys passed to $input argument ***
+
+Warning: Illegal offset type in %s on line %d
+
+Warning: Illegal offset type in %s on line %d
+-- Iteration 1 --
+array(1) {
+ [0]=>
+ string(1) "0"
+}
+-- Iteration 2 --
+array(3) {
+ [1]=>
+ string(1) "1"
+ [2]=>
+ string(1) "2"
+ [4]=>
+ string(1) "4"
+}
+-- Iteration 3 --
+array(1) {
+ [2]=>
+ string(5) "float"
+}
+-- Iteration 4 --
+array(3) {
+ [1]=>
+ string(2) "f1"
+ [3]=>
+ string(2) "f2"
+ [3333333]=>
+ string(2) "f4"
+}
+-- Iteration 5 --
+array(3) {
+ ["\tHello"]=>
+ int(111)
+ ["re\td"]=>
+ string(5) "color"
+ ["\v\fworld"]=>
+ float(2.2)
+}
+-- Iteration 6 --
+array(3) {
+ [" Hello"]=>
+ int(111)
+ ["re d"]=>
+ string(5) "color"
+ [" world"]=>
+ float(2.2)
+}
+-- Iteration 7 --
+array(2) {
+ [0]=>
+ string(5) "hello"
+ ["Hello world"]=>
+ string(6) "string"
+}
+-- Iteration 8 --
+array(2) {
+ [""]=>
+ string(5) "hello"
+ [0]=>
+ int(11)
+}
+Done
diff --git a/ext/standard/tests/array/array_unique_variation4.phpt b/ext/standard/tests/array/array_unique_variation4.phpt
new file mode 100644
index 000000000..a1fc13e94
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_variation4.phpt
@@ -0,0 +1,131 @@
+--TEST--
+Test array_unique() function : usage variations - associative array with different values
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_unique() by passing different
+ * associative arrays having different values to $input argument.
+*/
+
+echo "*** Testing array_unique() : assoc. array with diff. values to \$input argument ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// get a heredoc string
+$heredoc = <<<EOT
+Hello world
+EOT;
+
+// associative arrays with different values
+$inputs = array (
+ // arrays with integer values
+/*1*/ array('0' => 0, '1' => 0),
+ array("one" => 1, 'two' => 2, "three" => 1, 4 => 1),
+
+ // arrays with float values
+/*3*/ array("float1" => 2.3333, "float2" => 2.3333),
+ array("f1" => 1.2, 'f2' => 3.33, 3 => 4.89999922839999, 'f4' => 1.2),
+
+ // arrays with string values
+/*5*/ array(111 => "\tHello", "red" => "col\tor", 2 => "\v\fworld", 3.3 => "\tHello"),
+ array(111 => '\tHello', "red" => 'col\tor', 2 => '\v\fworld', 3.3 => '\tHello'),
+ array(1 => "hello", "heredoc" => $heredoc, $heredoc),
+
+ // array with object, unset variable and resource variable
+/*8*/ array(11 => new classA(), "unset" => @$unset_var, "resource" => $fp, new classA(), $fp),
+);
+
+// loop through each sub-array of $inputs to check the behavior of array_unique()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "-- Iteration $iterator --\n";
+ var_dump( array_unique($input) );
+ $iterator++;
+}
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : assoc. array with diff. values to $input argument ***
+-- Iteration 1 --
+array(1) {
+ [0]=>
+ int(0)
+}
+-- Iteration 2 --
+array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+-- Iteration 3 --
+array(1) {
+ ["float1"]=>
+ float(2.3333)
+}
+-- Iteration 4 --
+array(3) {
+ ["f1"]=>
+ float(1.2)
+ ["f2"]=>
+ float(3.33)
+ [3]=>
+ float(4.8999992284)
+}
+-- Iteration 5 --
+array(3) {
+ [111]=>
+ string(6) " Hello"
+ ["red"]=>
+ string(6) "col or"
+ [2]=>
+ string(7) " world"
+}
+-- Iteration 6 --
+array(3) {
+ [111]=>
+ string(7) "\tHello"
+ ["red"]=>
+ string(7) "col\tor"
+ [2]=>
+ string(9) "\v\fworld"
+}
+-- Iteration 7 --
+array(2) {
+ [1]=>
+ string(5) "hello"
+ ["heredoc"]=>
+ string(11) "Hello world"
+}
+-- Iteration 8 --
+array(3) {
+ [11]=>
+ object(classA)#%d (0) {
+ }
+ ["unset"]=>
+ NULL
+ ["resource"]=>
+ resource(%d) of type (stream)
+}
+Done
diff --git a/ext/standard/tests/array/array_unique_variation5.phpt b/ext/standard/tests/array/array_unique_variation5.phpt
new file mode 100644
index 000000000..5e3f7c36d
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_variation5.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test array_unique() function : usage variations - array with duplicate keys
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_unique() by passing
+ * array having duplicate keys as values.
+*/
+
+echo "*** Testing array_unique() : array with duplicate keys for \$input argument ***\n";
+
+// initialize the array having duplicate keys
+$input = array( 1 => "one", 2 => "two", 2 => "2", 3 => "three", 1 => "1", "1", "2");
+var_dump( array_unique($input) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : array with duplicate keys for $input argument ***
+array(3) {
+ [1]=>
+ string(1) "1"
+ [2]=>
+ string(1) "2"
+ [3]=>
+ string(5) "three"
+}
+Done
diff --git a/ext/standard/tests/array/array_unique_variation6.phpt b/ext/standard/tests/array/array_unique_variation6.phpt
new file mode 100644
index 000000000..fd8b226fa
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_variation6.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test array_unique() function : usage variations - array with reference variables
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_unique() by passing
+ * array having reference variables as values.
+*/
+
+echo "*** Testing array_unique() : array with reference variables for \$input argument ***\n";
+
+$value1 = 10;
+$value2 = "hello";
+$value3 = 0;
+$value4 = &$value2;
+
+// input array containing elements as reference variables
+$input = array(
+ 0 => 0,
+ 1 => &$value4,
+ 2 => &$value2,
+ 3 => "hello",
+ 4 => &$value3,
+ 5 => $value4
+);
+
+var_dump( array_unique($input) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : array with reference variables for $input argument ***
+array(2) {
+ [0]=>
+ int(0)
+ [1]=>
+ &string(5) "hello"
+}
+Done
diff --git a/ext/standard/tests/array/array_unique_variation7.phpt b/ext/standard/tests/array/array_unique_variation7.phpt
new file mode 100644
index 000000000..e998a73c6
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_variation7.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test array_unique() function : usage variations - binary safe checking
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_unique() by passing an array having binary values.
+*/
+
+echo "*** Testing array_unique() : array with binary data for \$input argument ***\n";
+
+// array with binary values
+$input = array( b"1", b"hello", "world", "str1" => "hello", "str2" => "world");
+
+var_dump( array_unique($input) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : array with binary data for $input argument ***
+array(3) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ string(5) "hello"
+ [2]=>
+ string(5) "world"
+}
+Done
diff --git a/ext/standard/tests/array/array_unique_variation8.phpt b/ext/standard/tests/array/array_unique_variation8.phpt
new file mode 100644
index 000000000..ae6e8bb5c
--- /dev/null
+++ b/ext/standard/tests/array/array_unique_variation8.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test array_unique() function : usage variations - two dimensional arrays
+--FILE--
+<?php
+/* Prototype : array array_unique(array $input)
+ * Description: Removes duplicate values from array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing the functionality of array_unique() by passing
+ * two dimensional arrays for $input argument.
+*/
+
+echo "*** Testing array_unique() : two dimensional array for \$input argument ***\n";
+
+// initialize the 2-d array
+$input = array(
+ array(1, 2, 3, 1),
+ array("hello", "world", "str1" => "hello", "str2" => 'world'),
+ array(1 => "one", 2 => "two", "one", 'two'),
+ array(1, 2, 3, 1)
+);
+
+var_dump( array_unique($input) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_unique() : two dimensional array for $input argument ***
+array(1) {
+ [0]=>
+ array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(1)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_unshift_variation5.phpt b/ext/standard/tests/array/array_unshift_variation5.phpt
index ff6bf28f8..7f083694a 100644
--- a/ext/standard/tests/array/array_unshift_variation5.phpt
+++ b/ext/standard/tests/array/array_unshift_variation5.phpt
@@ -1,5 +1,7 @@
--TEST--
Test array_unshift() function : usage variations - assoc. array with diff values for 'array' argument
+--INI--
+precision=12
--FILE--
<?php
/* Prototype : int array_unshift(array $array, mixed $var [, mixed ...])
@@ -209,7 +211,7 @@ array(5) {
[1]=>
float(4.8999992284)
["f4"]=>
- float(33333333.333333)
+ float(33333333.3333)
}
int(7)
array(7) {
@@ -226,7 +228,7 @@ array(7) {
[3]=>
float(4.8999992284)
["f4"]=>
- float(33333333.333333)
+ float(33333333.3333)
}
-- Iteration 7 --
int(5)
diff --git a/ext/standard/tests/array/array_values_basic.phpt b/ext/standard/tests/array/array_values_basic.phpt
new file mode 100644
index 000000000..9cbdf07b8
--- /dev/null
+++ b/ext/standard/tests/array/array_values_basic.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test array_values() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array array_values(array $input)
+ * Description: Return just the values from the input array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of array_values()
+ */
+
+echo "*** Testing array_values() : basic functionality ***\n";
+
+
+// Initialise all required variables
+$input = array('zero', 'one', 'two', 'three' => 3, 10 => 'ten');
+
+// Calling array_values() with all possible arguments
+var_dump( array_values($input) );
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_values() : basic functionality ***
+array(5) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ int(3)
+ [4]=>
+ string(3) "ten"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_values_variation1.phpt b/ext/standard/tests/array/array_values_variation1.phpt
new file mode 100644
index 000000000..efe08c72b
--- /dev/null
+++ b/ext/standard/tests/array/array_values_variation1.phpt
@@ -0,0 +1,224 @@
+--TEST--
+Test array_values() function : usage variations - Pass different data types as $input arg
+--FILE--
+<?php
+/* Prototype : array array_values(array $input)
+ * Description: Return just the values from the input array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $input argument to array_values() to test behaviour
+ */
+
+echo "*** Testing array_values() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $input argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of array_values()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( array_values($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_values() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+array(0) {
+}
+
+-- Iteration 19 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: array_values(): The argument should be an array in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_values_variation2.phpt b/ext/standard/tests/array/array_values_variation2.phpt
new file mode 100644
index 000000000..c7e9ad3f7
--- /dev/null
+++ b/ext/standard/tests/array/array_values_variation2.phpt
@@ -0,0 +1,215 @@
+--TEST--
+Test array_values() function : usage variations - arrays of different data types
+--FILE--
+<?php
+/* Prototype : array array_values(array $input)
+ * Description: Return just the values from the input array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays of different data types as $input argument to array_values() to test behaviour
+ */
+
+echo "*** Testing array_values() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// arrays of different data types to be passed as $input
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0,
+ 1,
+ 12345,
+ -2345,
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+ ),
+
+ // null data
+/*3*/ 'null' => array(
+ NULL,
+ null,
+ ),
+
+ // boolean data
+/*4*/ 'bool' => array(
+ true,
+ false,
+ TRUE,
+ FALSE,
+ ),
+
+ // empty data
+/*5*/ 'empty string' => array(
+ "",
+ '',
+ ),
+
+/*6*/ 'empty array' => array(
+ ),
+
+ // string data
+/*7*/ 'string' => array(
+ "string",
+ 'string',
+ $heredoc,
+ ),
+
+ // object data
+/*8*/ 'object' => array(
+ new classA(),
+ ),
+
+ // undefined data
+/*9*/ 'undefined' => array(
+ @$undefined_var,
+ ),
+
+ // unset data
+/*10*/ 'unset' => array(
+ @$unset_var,
+ ),
+
+ // resource variable
+/*11*/ 'resource' => array(
+ $fp
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of array_values()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator: $key data --\n";
+ var_dump( array_values($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_values() : usage variations ***
+
+-- Iteration 1: int data --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(12345)
+ [3]=>
+ int(-2345)
+}
+
+-- Iteration 2: float data --
+array(5) {
+ [0]=>
+ float(10.5)
+ [1]=>
+ float(-10.5)
+ [2]=>
+ float(123456789000)
+ [3]=>
+ float(1.23456789E-9)
+ [4]=>
+ float(0.5)
+}
+
+-- Iteration 3: null data --
+array(2) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+}
+
+-- Iteration 4: bool data --
+array(4) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(false)
+ [2]=>
+ bool(true)
+ [3]=>
+ bool(false)
+}
+
+-- Iteration 5: empty string data --
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+}
+
+-- Iteration 6: empty array data --
+array(0) {
+}
+
+-- Iteration 7: string data --
+array(3) {
+ [0]=>
+ string(6) "string"
+ [1]=>
+ string(6) "string"
+ [2]=>
+ string(11) "hello world"
+}
+
+-- Iteration 8: object data --
+array(1) {
+ [0]=>
+ object(classA)#%d (0) {
+ }
+}
+
+-- Iteration 9: undefined data --
+array(1) {
+ [0]=>
+ NULL
+}
+
+-- Iteration 10: unset data --
+array(1) {
+ [0]=>
+ NULL
+}
+
+-- Iteration 11: resource data --
+array(1) {
+ [0]=>
+ resource(%d) of type (stream)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_values_variation3.phpt b/ext/standard/tests/array/array_values_variation3.phpt
new file mode 100644
index 000000000..5c74c0d47
--- /dev/null
+++ b/ext/standard/tests/array/array_values_variation3.phpt
@@ -0,0 +1,200 @@
+--TEST--
+Test array_values() function : usage variations - array keys different data types
+--FILE--
+<?php
+/* Prototype : array array_values(array $input)
+ * Description: Return just the values from the input array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays where the keys are different data types as $input argument
+ * to array_values() to test behaviour
+ */
+
+echo "*** Testing array_values() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed as $input
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+/*3*/ 'extreme floats' => array(
+ 12.3456789000e10 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*4*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+
+/*5*/ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*6*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+
+/*7*/ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*8*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+
+/*9*/ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*10*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*11*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*12*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of array_values()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator: $key data --\n";
+ var_dump( array_values($input) );
+ $iterator++;
+};
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_values() : usage variations ***
+
+-- Iteration 1: int data --
+array(4) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(8) "positive"
+ [3]=>
+ string(8) "negative"
+}
+
+-- Iteration 2: float data --
+array(3) {
+ [0]=>
+ string(8) "positive"
+ [1]=>
+ string(8) "negative"
+ [2]=>
+ string(4) "half"
+}
+
+-- Iteration 3: extreme floats data --
+array(2) {
+ [0]=>
+ string(5) "large"
+ [1]=>
+ string(5) "small"
+}
+
+-- Iteration 4: null uppercase data --
+array(1) {
+ [0]=>
+ string(6) "null 1"
+}
+
+-- Iteration 5: null lowercase data --
+array(1) {
+ [0]=>
+ string(6) "null 2"
+}
+
+-- Iteration 6: bool lowercase data --
+array(2) {
+ [0]=>
+ string(6) "lowert"
+ [1]=>
+ string(6) "lowerf"
+}
+
+-- Iteration 7: bool uppercase data --
+array(2) {
+ [0]=>
+ string(6) "uppert"
+ [1]=>
+ string(6) "upperf"
+}
+
+-- Iteration 8: empty double quotes data --
+array(1) {
+ [0]=>
+ string(6) "emptyd"
+}
+
+-- Iteration 9: empty single quotes data --
+array(1) {
+ [0]=>
+ string(6) "emptys"
+}
+
+-- Iteration 10: string data --
+array(3) {
+ [0]=>
+ string(7) "stringd"
+ [1]=>
+ string(7) "strings"
+ [2]=>
+ string(7) "stringh"
+}
+
+-- Iteration 11: undefined data --
+array(1) {
+ [0]=>
+ string(9) "undefined"
+}
+
+-- Iteration 12: unset data --
+array(1) {
+ [0]=>
+ string(5) "unset"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_values_variation4.phpt b/ext/standard/tests/array/array_values_variation4.phpt
new file mode 100644
index 000000000..199d23dc9
--- /dev/null
+++ b/ext/standard/tests/array/array_values_variation4.phpt
@@ -0,0 +1,118 @@
+--TEST--
+Test array_values() function : usage variations - multi-dimensional arrays
+--FILE--
+<?php
+/* Prototype : array array_values(array $input)
+ * Description: Return just the values from the input array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_values when:
+ * 1. Passed a two-dimensional array as $input argument
+ * 2. Passed a sub-array as $input argument
+ * 3. Passed an infinitely recursive multi-dimensional array
+ */
+
+echo "*** Testing array_values() : usage variations ***\n";
+
+$input = array ('zero' => 'zero', 'un' => 'one', 'sub' => array (1, 2, 3));
+
+echo "\n-- Array values of a two-dimensional array --\n";
+var_dump(array_values($input));
+
+echo "\n-- Array values of a sub-array --\n";
+var_dump(array_values($input['sub']));
+
+// get an infinitely recursive array
+$input[] = &$input;
+echo "\n-- Array values of an infinitely recursive array --\n";
+var_dump(array_values($input));
+
+// break cycle
+$input[0] = null;
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_values() : usage variations ***
+
+-- Array values of a two-dimensional array --
+array(3) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+-- Array values of a sub-array --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+
+-- Array values of an infinitely recursive array --
+array(4) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [3]=>
+ &array(4) {
+ ["zero"]=>
+ string(4) "zero"
+ ["un"]=>
+ string(3) "one"
+ ["sub"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [0]=>
+ &array(4) {
+ ["zero"]=>
+ string(4) "zero"
+ ["un"]=>
+ string(3) "one"
+ ["sub"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [0]=>
+ *RECURSION*
+ }
+ }
+}
+Done
diff --git a/ext/standard/tests/array/array_values_variation5.phpt b/ext/standard/tests/array/array_values_variation5.phpt
new file mode 100644
index 000000000..d65b4674d
--- /dev/null
+++ b/ext/standard/tests/array/array_values_variation5.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test array_values() function : usage variations - internal array pointer
+--FILE--
+<?php
+/* Prototype : array array_values(array $input)
+ * Description: Return just the values from the input array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test the position of the internal array pointer after a call to array_values
+ */
+
+echo "*** Testing array_values() : usage variations ***\n";
+
+$input = array ('one' => 'un', 'two' => 'deux', 'three' => 'trois');
+
+echo "\n-- Call array_values() --\n";
+var_dump($result = array_values($input));
+
+echo "-- Position of Internal Pointer in Result: --\n";
+echo key($result) . " => " . current($result) . "\n";
+echo "\n-- Position of Internal Pointer in Original Array: --\n";
+echo key($input) . " => " . current ($input) . "\n";
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_values() : usage variations ***
+
+-- Call array_values() --
+array(3) {
+ [0]=>
+ string(2) "un"
+ [1]=>
+ string(4) "deux"
+ [2]=>
+ string(5) "trois"
+}
+-- Position of Internal Pointer in Result: --
+0 => un
+
+-- Position of Internal Pointer in Original Array: --
+one => un
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_values_variation6.phpt b/ext/standard/tests/array/array_values_variation6.phpt
new file mode 100644
index 000000000..e56515076
--- /dev/null
+++ b/ext/standard/tests/array/array_values_variation6.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test array_values() function : usage variations - Referenced variables
+--INI--
+allow_call_time_pass_reference=on
+--FILE--
+<?php
+/* Prototype : array array_values(array $input)
+ * Description: Return just the values from the input array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test array_values() when:
+ * 1. Passed an array made up of referenced variables
+ * 2. Passed an array by reference
+ */
+
+echo "*** Testing array_values() : usage variations ***\n";
+
+$val1 = 'one';
+$val2 = 'two';
+$val3 = 'three';
+
+echo "\n-- \$input is an array made up of referenced variables: --\n";
+$input = array(&$val1, &$val2, &$val3);
+var_dump($result1 = array_values($input));
+
+echo "Change \$val2 and check result of array_values():\n";
+$val2 = 'deux';
+var_dump($result1);
+
+echo "\n-- Pass \$input argument by reference --\n";
+$array = array(1, 2, 3);
+var_dump($result2 = array_values(&$array));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_values() : usage variations ***
+
+-- $input is an array made up of referenced variables: --
+array(3) {
+ [0]=>
+ &string(3) "one"
+ [1]=>
+ &string(3) "two"
+ [2]=>
+ &string(5) "three"
+}
+Change $val2 and check result of array_values():
+array(3) {
+ [0]=>
+ &string(3) "one"
+ [1]=>
+ &string(4) "deux"
+ [2]=>
+ &string(5) "three"
+}
+
+-- Pass $input argument by reference --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/array_values_variation7.phpt b/ext/standard/tests/array/array_values_variation7.phpt
new file mode 100644
index 000000000..b71306456
--- /dev/null
+++ b/ext/standard/tests/array/array_values_variation7.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test array_values() function : usage variations - Internal order check
+--FILE--
+<?php
+/* Prototype : array array_values(array $input)
+ * Description: Return just the values from the input array
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Check that array_values is re-assigning keys according to the internal order of the array,
+ * and is not dependant on the \$input argument's keys
+ */
+
+echo "*** Testing array_values() : usage variations ***\n";
+
+// populate array with 'default' keys in reverse order
+$input = array(3 => 'three', 2 => 'two', 1 => 'one', 0 => 'zero');
+
+echo "\n-- \$input argument: --\n";
+var_dump($input);
+
+echo "\n-- Result of array_values() --\n";
+var_dump(array_values($input));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing array_values() : usage variations ***
+
+-- $input argument: --
+array(4) {
+ [3]=>
+ string(5) "three"
+ [2]=>
+ string(3) "two"
+ [1]=>
+ string(3) "one"
+ [0]=>
+ string(4) "zero"
+}
+
+-- Result of array_values() --
+array(4) {
+ [0]=>
+ string(5) "three"
+ [1]=>
+ string(3) "two"
+ [2]=>
+ string(3) "one"
+ [3]=>
+ string(4) "zero"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_walk_basic1.phpt b/ext/standard/tests/array/array_walk_basic1.phpt
new file mode 100644
index 000000000..34e8e88c7
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_basic1.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Test array_walk() function : basic functionality - regular array
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_walk() : basic functionality ***\n";
+
+// regular array
+$fruits = array("lemon", "orange", "banana", "apple");
+
+/* Prototype : test_print(mixed $item, mixed $key)
+ * Parameters : item - item in key/item pair
+ * key - key in key/item pair
+ * Description : prints the array values with keys
+ */
+function test_print($item, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($item); // value
+ var_dump($key); // key
+ echo "\n"; // new line to separate the output between each element
+}
+function with_userdata($item, $key, $user_data)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($item); // value
+ var_dump($key); // key
+ var_dump($user_data); // user supplied data
+ echo "\n"; // new line to separate the output between each element
+}
+
+echo "-- Using array_walk() with default parameters to show array contents --\n";
+var_dump( array_walk($fruits, 'test_print'));
+
+echo "-- Using array_walk() with all parameters --\n";
+var_dump( array_walk($fruits, 'with_userdata', "Added"));
+
+echo "Done";
+?>
+--EXPECT--
+*** Testing array_walk() : basic functionality ***
+-- Using array_walk() with default parameters to show array contents --
+string(5) "lemon"
+int(0)
+
+string(6) "orange"
+int(1)
+
+string(6) "banana"
+int(2)
+
+string(5) "apple"
+int(3)
+
+bool(true)
+-- Using array_walk() with all parameters --
+string(5) "lemon"
+int(0)
+string(5) "Added"
+
+string(6) "orange"
+int(1)
+string(5) "Added"
+
+string(6) "banana"
+int(2)
+string(5) "Added"
+
+string(5) "apple"
+int(3)
+string(5) "Added"
+
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_walk_basic2.phpt b/ext/standard/tests/array/array_walk_basic2.phpt
new file mode 100644
index 000000000..e856b580b
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_basic2.phpt
@@ -0,0 +1,105 @@
+--TEST--
+Test array_walk() function : basic functionality - associative array
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_walk() : basic functionality ***\n";
+
+// associative array
+$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
+
+// User defined callback functions
+/* Prototype : test_alter(mixed $item, mixed $key, string $prefix)
+ * Parameters : item - value in key/value pair
+ * key - key in key/value pair
+ * prefix - string to be added
+ * Description : alters the array values by appending prefix string
+ */
+function test_alter(&$item, $key, $prefix)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($item); // value
+ var_dump($key); // key
+ var_dump($prefix); // additional agument passed to callback function
+ echo "\n"; // new line to separate the output between each element
+}
+
+/* Prototype : test_print(mixed $item, mixed $key)
+ * Parameters : item - value in key/value pair
+ * key - key in key/value pair
+ * Description : prints the array values with keys
+ */
+function test_print($item, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($item); // value
+ var_dump($key); // key
+ echo "\n"; // new line to separate the output between each element
+}
+
+echo "-- Using array_walk with default parameters to show array contents --\n";
+var_dump(array_walk($fruits, 'test_print'));
+
+echo "-- Using array_walk with one optional parameter to modify contents --\n";
+var_dump (array_walk($fruits, 'test_alter', 'fruit'));
+
+echo "-- Using array_walk with default parameters to show modified array contents --\n";
+var_dump (array_walk($fruits, 'test_print'));
+
+echo "Done";
+?>
+--EXPECT--
+*** Testing array_walk() : basic functionality ***
+-- Using array_walk with default parameters to show array contents --
+string(5) "lemon"
+string(1) "d"
+
+string(6) "orange"
+string(1) "a"
+
+string(6) "banana"
+string(1) "b"
+
+string(5) "apple"
+string(1) "c"
+
+bool(true)
+-- Using array_walk with one optional parameter to modify contents --
+string(5) "lemon"
+string(1) "d"
+string(5) "fruit"
+
+string(6) "orange"
+string(1) "a"
+string(5) "fruit"
+
+string(6) "banana"
+string(1) "b"
+string(5) "fruit"
+
+string(5) "apple"
+string(1) "c"
+string(5) "fruit"
+
+bool(true)
+-- Using array_walk with default parameters to show modified array contents --
+string(5) "lemon"
+string(1) "d"
+
+string(6) "orange"
+string(1) "a"
+
+string(6) "banana"
+string(1) "b"
+
+string(5) "apple"
+string(1) "c"
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_error1.phpt b/ext/standard/tests/array/array_walk_error1.phpt
new file mode 100644
index 000000000..014885a94
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_error1.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test array_walk() function : error conditions
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+$input = array(1, 2);
+
+/* Prototype : callback(mixed value, mixed key, mixed user_data)
+ * Parameters : value - value in key/value pair
+ * key - key in key/value pair
+ * user_data - extra parameter
+ */
+function callback ($value, $key, $user_data) {
+ echo "\ncallback() invoked \n";
+}
+
+echo "*** Testing array_walk() : error conditions ***\n";
+
+echo "-- Testing array_walk() function with zero arguments --\n";
+var_dump( array_walk() );
+
+echo "-- Testing array_walk() function with one argument --\n";
+var_dump( array_walk($input) );
+
+echo "-- Testing array_walk() function with non existent callback function --\n";
+var_dump( array_walk($input, "non_existent") );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_walk() : error conditions ***
+-- Testing array_walk() function with zero arguments --
+
+Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
+NULL
+-- Testing array_walk() function with one argument --
+
+Warning: array_walk() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+-- Testing array_walk() function with non existent callback function --
+
+Warning: array_walk(): Unable to call non_existent() - function does not exist in %s on line %d
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_error2.phpt b/ext/standard/tests/array/array_walk_error2.phpt
new file mode 100644
index 000000000..654637ab5
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_error2.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test array_walk() function : error conditions - callback parameters
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_walk() by passing more number of parameters to callback function
+ */
+$input = array(1);
+
+function callback1($value, $key, $user_data ) {
+ echo "\ncallback1() invoked \n";
+}
+
+function callback2($value, $key, $user_data1, $user_data2) {
+ echo "\ncallback2() invoked \n";
+}
+echo "*** Testing array_walk() : error conditions - callback parameters ***\n";
+
+// expected: Missing argument Warning
+var_dump( array_walk($input, "callback1") );
+var_dump( array_walk($input, "callback2", 4) );
+
+// expected: Warning is supressed
+var_dump( @array_walk($input, "callback1") );
+var_dump( @array_walk($input, "callback2", 4) );
+
+echo "-- Testing array_walk() function with too many callback parameters --\n";
+var_dump( array_walk($input, "callback1", 20, 10) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_walk() : error conditions - callback parameters ***
+
+Warning: Missing argument 3 for callback1() in %s on line %d
+
+callback1() invoked
+bool(true)
+
+Warning: Missing argument 4 for callback2() in %s on line %d
+
+callback2() invoked
+bool(true)
+
+callback1() invoked
+bool(true)
+
+callback2() invoked
+bool(true)
+-- Testing array_walk() function with too many callback parameters --
+
+Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_walk_object1.phpt b/ext/standard/tests/array/array_walk_object1.phpt
new file mode 100644
index 000000000..632b651c0
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_object1.phpt
Binary files differ
diff --git a/ext/standard/tests/array/array_walk_object2.phpt b/ext/standard/tests/array/array_walk_object2.phpt
new file mode 100644
index 000000000..61d052975
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_object2.phpt
@@ -0,0 +1,104 @@
+--TEST--
+Test array_walk() function : object functionality - array of objects
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_walk() with an array of objects
+*/
+
+echo "*** Testing array_walk() : array of objects ***\n";
+
+/*
+ * Prototype : callback(mixed $value, mixed $key, int $addvalue
+ * Parameters : $value - values in given input array
+ * $key - keys in given input array
+ * $addvalue - value to be added
+ * Description : Function adds the addvalue to each element of an array
+*/
+function callback_private($value, $key, $addValue)
+{
+ echo "value : ";
+ var_dump($value->getValue());
+ echo "key : ";
+ var_dump($key);
+}
+
+function callback_public($value, $key)
+{
+ echo "value : ";
+ var_dump($value->pub_value);
+}
+function callback_protected($value, $key)
+{
+ echo "value : ";
+ var_dump($value->get_pro_value());
+}
+
+class MyClass
+{
+ private $pri_value;
+ public $pub_value;
+ protected $pro_value;
+ public function __construct($setVal)
+ {
+ $this->pri_value = $setVal;
+ $this->pub_value = $setVal;
+ $this->pro_value = $setVal;
+ }
+ public function getValue()
+ {
+ return $this->pri_value;
+ }
+ public function get_pro_value()
+ {
+ return $this->pro_value;
+ }
+};
+
+// array containing objects of MyClass
+$input = array (
+ new MyClass(3),
+ new MyClass(10),
+ new MyClass(20),
+ new MyClass(-10)
+);
+
+echo "-- For private member --\n";
+var_dump( array_walk($input, "callback_private", 1));
+echo "-- For public member --\n";
+var_dump( array_walk($input, "callback_public"));
+echo "-- For protected member --\n";
+var_dump( array_walk($input, "callback_protected"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : array of objects ***
+-- For private member --
+value : int(3)
+key : int(0)
+value : int(10)
+key : int(1)
+value : int(20)
+key : int(2)
+value : int(-10)
+key : int(3)
+bool(true)
+-- For public member --
+value : int(3)
+value : int(10)
+value : int(20)
+value : int(-10)
+bool(true)
+-- For protected member --
+value : int(3)
+value : int(10)
+value : int(20)
+value : int(-10)
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_basic1.phpt b/ext/standard/tests/array/array_walk_recursive_basic1.phpt
new file mode 100644
index 000000000..df192b6a7
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_basic1.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Test array_walk_recursive() function : basic functionality - regular array
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_walk_recursive() : basic functionality ***\n";
+
+// regular array
+$fruits = array("lemon", array("orange", "banana"), array("apple"));
+
+/* Prototype : test_print(mixed $item, mixed $key)
+ * Parameters : item - item in key/item pair
+ * key - key in key/item pair
+ * Description : prints the array values with keys
+ */
+function test_print($item, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($item); // value
+ var_dump($key); // key
+ echo "\n"; // new line to separate the output between each element
+}
+function with_userdata($item, $key, $user_data)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($item); // value
+ var_dump($key); // key
+ var_dump($user_data); // user supplied data
+ echo "\n"; // new line to separate the output between each element
+}
+
+echo "-- Using array_walk_recursive() with default parameters to show array contents --\n";
+var_dump( array_walk_recursive($fruits, 'test_print'));
+
+echo "-- Using array_walk_recursive() with all parameters --\n";
+var_dump( array_walk_recursive($fruits, 'with_userdata', "Added"));
+
+echo "Done";
+?>
+--EXPECT--
+*** Testing array_walk_recursive() : basic functionality ***
+-- Using array_walk_recursive() with default parameters to show array contents --
+string(5) "lemon"
+int(0)
+
+string(6) "orange"
+int(0)
+
+string(6) "banana"
+int(1)
+
+string(5) "apple"
+int(0)
+
+bool(true)
+-- Using array_walk_recursive() with all parameters --
+string(5) "lemon"
+int(0)
+string(5) "Added"
+
+string(6) "orange"
+int(0)
+string(5) "Added"
+
+string(6) "banana"
+int(1)
+string(5) "Added"
+
+string(5) "apple"
+int(0)
+string(5) "Added"
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_basic2.phpt b/ext/standard/tests/array/array_walk_recursive_basic2.phpt
new file mode 100644
index 000000000..c71d92b45
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_basic2.phpt
@@ -0,0 +1,105 @@
+--TEST--
+Test array_walk_recursive() function : basic functionality - associative array
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing array_walk_recursive() : basic functionality ***\n";
+
+// associative array
+$fruits = array("a" => "lemon", "b" => array( "c" => "orange", "d" => "banana"), "e" => array("f" => "apple"));
+
+// User defined callback functions
+/* Prototype : test_alter(mixed $item, mixed $key, string $prefix)
+ * Parameters : item - value in key/value pair
+ * key - key in key/value pair
+ * prefix - string to be added
+ * Description : alters the array values by appending prefix string
+ */
+function test_alter(&$item, $key, $prefix)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($item); // value
+ var_dump($key); // key
+ var_dump($prefix); // additional agument passed to callback function
+ echo "\n"; // new line to separate the output between each element
+}
+
+/* Prototype : test_print(mixed $item, mixed $key)
+ * Parameters : item - value in key/value pair
+ * key - key in key/value pair
+ * Description : prints the array values with keys
+ */
+function test_print($item, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($item); // value
+ var_dump($key); // key
+ echo "\n"; // new line to separate the output between each element
+}
+
+echo "-- Using array_walk_recursive with default parameters to show array contents --\n";
+var_dump(array_walk_recursive($fruits, 'test_print'));
+
+echo "-- Using array_walk_recursive with one optional parameter to modify contents --\n";
+var_dump (array_walk_recursive($fruits, 'test_alter', 'fruit'));
+
+echo "-- Using array_walk_recursive with default parameters to show modified array contents --\n";
+var_dump (array_walk_recursive($fruits, 'test_print'));
+
+echo "Done";
+?>
+--EXPECT--
+*** Testing array_walk_recursive() : basic functionality ***
+-- Using array_walk_recursive with default parameters to show array contents --
+string(5) "lemon"
+string(1) "a"
+
+string(6) "orange"
+string(1) "c"
+
+string(6) "banana"
+string(1) "d"
+
+string(5) "apple"
+string(1) "f"
+
+bool(true)
+-- Using array_walk_recursive with one optional parameter to modify contents --
+string(5) "lemon"
+string(1) "a"
+string(5) "fruit"
+
+string(6) "orange"
+string(1) "c"
+string(5) "fruit"
+
+string(6) "banana"
+string(1) "d"
+string(5) "fruit"
+
+string(5) "apple"
+string(1) "f"
+string(5) "fruit"
+
+bool(true)
+-- Using array_walk_recursive with default parameters to show modified array contents --
+string(5) "lemon"
+string(1) "a"
+
+string(6) "orange"
+string(1) "c"
+
+string(6) "banana"
+string(1) "d"
+
+string(5) "apple"
+string(1) "f"
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_error1.phpt b/ext/standard/tests/array/array_walk_recursive_error1.phpt
new file mode 100644
index 000000000..df7092c02
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_error1.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test array_walk_recursive() function : error conditions
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+$input = array(1, 2);
+
+/* Prototype : callback(mixed value, mixed key, mixed user_data)
+ * Parameters : value - value in key/value pair
+ * key - key in key/value pair
+ * user_data - extra parameter
+ */
+function callback ($value, $key, $user_data) {
+ echo "\ncallback() invoked \n";
+}
+
+echo "*** Testing array_walk_recursive() : error conditions ***\n";
+
+echo "-- Testing array_walk_recursive() function with zero arguments --\n";
+var_dump( array_walk_recursive() );
+
+echo "-- Testing array_walk_recursive() function with one argument --\n";
+var_dump( array_walk_recursive($input) );
+
+echo "-- Testing array_walk_recursive() function with non existent callback function --\n";
+var_dump( array_walk_recursive($input, "non_existent") );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : error conditions ***
+-- Testing array_walk_recursive() function with zero arguments --
+
+Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d
+NULL
+-- Testing array_walk_recursive() function with one argument --
+
+Warning: array_walk_recursive() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+-- Testing array_walk_recursive() function with non existent callback function --
+
+Warning: array_walk_recursive(): Unable to call non_existent() - function does not exist in %s on line %d
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_error2.phpt b/ext/standard/tests/array/array_walk_recursive_error2.phpt
new file mode 100644
index 000000000..d628e9327
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_error2.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test array_walk_recursive() function : error conditions - callback parameters
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_walk_recursive() by passing more number of parameters to callback function
+ */
+$input = array(1);
+
+function callback1($value, $key, $user_data ) {
+ echo "\ncallback1() invoked \n";
+}
+
+function callback2($value, $key, $user_data1, $user_data2) {
+ echo "\ncallback2() invoked \n";
+}
+echo "*** Testing array_walk_recursive() : error conditions - callback parameters ***\n";
+
+// expected: Missing argument Warning
+var_dump( array_walk_recursive($input, "callback1") );
+var_dump( array_walk_recursive($input, "callback2", 4) );
+
+// expected: Warning is supressed
+var_dump( @array_walk_recursive($input, "callback1") );
+var_dump( @array_walk_recursive($input, "callback2", 4) );
+
+echo "-- Testing array_walk_recursive() function with too many callback parameters --\n";
+var_dump( array_walk_recursive($input, "callback1", 20, 10) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : error conditions - callback parameters ***
+
+Warning: Missing argument 3 for callback1() in %s on line %d
+
+callback1() invoked
+bool(true)
+
+Warning: Missing argument 4 for callback2() in %s on line %d
+
+callback2() invoked
+bool(true)
+
+callback1() invoked
+bool(true)
+
+callback2() invoked
+bool(true)
+-- Testing array_walk_recursive() function with too many callback parameters --
+
+Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_object1.phpt b/ext/standard/tests/array/array_walk_recursive_object1.phpt
new file mode 100644
index 000000000..30d03a70a
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_object1.phpt
Binary files differ
diff --git a/ext/standard/tests/array/array_walk_recursive_object2.phpt b/ext/standard/tests/array/array_walk_recursive_object2.phpt
new file mode 100644
index 000000000..aa12fe869
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_object2.phpt
@@ -0,0 +1,106 @@
+--TEST--
+Test array_walk_recursive() function : object functionality - array of objects
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing array_walk_recursive() with an array of objects
+*/
+
+echo "*** Testing array_walk_recursive() : array of objects ***\n";
+
+/*
+ * Prototype : callback(mixed $value, mixed $key, int $addvalue
+ * Parameters : $value - values in given input array
+ * $key - keys in given input array
+ * $addvalue - value to be added
+ * Description : Function adds the addvalue to each element of an array
+*/
+function callback_private($value, $key, $addValue)
+{
+ echo "value : ";
+ var_dump($value->getValue());
+ echo "key : ";
+ var_dump($key);
+}
+
+function callback_public($value, $key)
+{
+ echo "value : ";
+ var_dump($value->pub_value);
+}
+function callback_protected($value, $key)
+{
+ echo "value : ";
+ var_dump($value->get_pro_value());
+}
+
+class MyClass
+{
+ private $pri_value;
+ public $pub_value;
+ protected $pro_value;
+ public function __construct($setVal)
+ {
+ $this->pri_value = $setVal;
+ $this->pub_value = $setVal;
+ $this->pro_value = $setVal;
+ }
+ public function getValue()
+ {
+ return $this->pri_value;
+ }
+ public function get_pro_value()
+ {
+ return $this->pro_value;
+ }
+};
+
+// array containing objects of MyClass
+$input = array (
+ array(
+ new MyClass(3),
+ new MyClass(10),
+ ),
+ new MyClass(20),
+ array(new MyClass(-10))
+);
+
+echo "-- For private member --\n";
+var_dump( array_walk_recursive($input, "callback_private", 1));
+echo "-- For public member --\n";
+var_dump( array_walk_recursive($input, "callback_public"));
+echo "-- For protected member --\n";
+var_dump( array_walk_recursive($input, "callback_protected"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : array of objects ***
+-- For private member --
+value : int(3)
+key : int(0)
+value : int(10)
+key : int(1)
+value : int(20)
+key : int(1)
+value : int(-10)
+key : int(0)
+bool(true)
+-- For public member --
+value : int(3)
+value : int(10)
+value : int(20)
+value : int(-10)
+bool(true)
+-- For protected member --
+value : int(3)
+value : int(10)
+value : int(20)
+value : int(-10)
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation1.phpt b/ext/standard/tests/array/array_walk_recursive_variation1.phpt
new file mode 100644
index 000000000..2673df99a
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation1.phpt
@@ -0,0 +1,250 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - unexpected values for 'input' argument
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing different scalar/nonscalar values in place of 'input' argument
+*/
+
+echo "*** Testing array_walk_recursive() : unexpected values for 'input' argument ***\n";
+
+// callback function
+/* Prototype : callback(mixed $value, mixed $key)
+ * Parameters : $value - values given in input array
+ * $key - keys given in input array
+ * Description : Function prints each element of an array with key
+ */
+function callback($value, $key)
+{
+ echo "key : ";
+ var_dump($key);
+ echo "value : ";
+ var_dump($value);
+}
+
+// extra parameter passed to array_walk_recursive()
+$user_data = 10;
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get resource variable
+$fp = fopen(__FILE__, 'r');
+
+// different scalar/nonscalar values to be used in place of an 'input' argument
+$input_values = array(
+
+ // int data
+/* 1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/* 5*/ 10.5,
+ -10.5,
+ 10.1234567e8,
+ 10.7654321E-8,
+ .5,
+
+ // null data
+/* 10*/ NULL,
+ null,
+
+ // boolean data
+/* 12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/* 16*/ "",
+ '',
+
+ // string data
+/* 18*/ "string",
+ 'string',
+
+ // resource data
+ $fp,
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+/* 22*/ @$unset_var,
+);
+
+
+for($count = 0; $count < count($input_values); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( array_walk_recursive($input_values[$count], "callback") );
+ var_dump( array_walk_recursive($input_values[$count], "callback", $user_data) );
+}
+
+fclose($fp);
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : unexpected values for 'input' argument ***
+-- Iteration 1 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 11 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 13 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 14 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 21 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 22 --
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): The argument should be an array in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation2.phpt b/ext/standard/tests/array/array_walk_recursive_variation2.phpt
new file mode 100644
index 000000000..d94647376
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation2.phpt
@@ -0,0 +1,271 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - unexpected values in place of 'funcname' argument(Bug#43543)
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing different scalar/nonscalar values in place of 'funcname' argument
+*/
+
+echo "*** Testing array_walk_recursive() : unexpected values for 'funcname' argument ***\n";
+
+$input = array(1, array(2, 3));
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+$user_data = 20;
+
+// get resource variable
+$fp = fopen(__FILE__, 'r');
+
+// class definition
+class MyClass
+{
+ public function __toString()
+ {
+ return 'object';
+ }
+}
+
+// different scalar/nonscalar values to be used in place of callback function
+$funcname_values = array(
+
+ // int data
+/* 1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/* 5*/ 10.5,
+ -10.5,
+ 10.1234567e8,
+ 10.7654321E-8,
+ .5,
+
+ // array data
+/* 10*/ array(),
+ array(0),
+ array(1),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+/* 14*/ NULL,
+ null,
+
+ // boolean data
+/* 16*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/* 20*/ "",
+ '',
+
+ // object data
+ new MyClass(),
+
+ // resource data
+/* 23*/ $fp,
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+/* 25*/ @$unset_var,
+);
+
+for($count = 0; $count < count($funcname_values); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( array_walk_recursive($input, $funcname_values[$count]) );
+ var_dump( array_walk_recursive($input, $funcname_values[$count], $user_data ));
+}
+
+fclose($fp);
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : unexpected values for 'funcname' argument ***
+-- Iteration 1 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: array_walk_recursive(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk_recursive(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+-- Iteration 11 --
+
+Warning: array_walk_recursive(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk_recursive(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+-- Iteration 12 --
+
+Warning: array_walk_recursive(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk_recursive(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+-- Iteration 13 --
+
+Warning: array_walk_recursive(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk_recursive(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+-- Iteration 14 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: array_walk_recursive(): Unable to call () - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk_recursive(): Unable to call () - function does not exist in %s on line %d
+bool(true)
+-- Iteration 21 --
+
+Warning: array_walk_recursive(): Unable to call () - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk_recursive(): Unable to call () - function does not exist in %s on line %d
+bool(true)
+-- Iteration 22 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 23 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 24 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 25 --
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk_recursive(): Wrong syntax for function name in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation3.phpt b/ext/standard/tests/array/array_walk_recursive_variation3.phpt
new file mode 100644
index 000000000..747ba3bb0
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation3.phpt
@@ -0,0 +1,123 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - 'input' array with different values
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_walk_recursive() with following types of 'input' arrays:
+ * integer, float, string, bool, null, empty & mixed
+*/
+
+// callback function
+/*
+ * Prototype : print_value(mixed $value, int $key, int $count)
+ * Parameters : $value - array entries(values)
+ * $key - keys in given input array
+ * $count - extra parameter used as an index
+ * Description : prints the array values with keys and count value
+ */
+function print_value($value, $key, $count)
+{
+ echo $count." : ".$key." ".$value."\n";
+}
+
+echo "*** Testing array_walk_recursive() : 'input' array with different values***\n";
+
+// different arrays as input
+$input_values = array(
+
+ // integer values
+/*1*/ array(array(1, 0, -10), array(023, -041), array(0x5A, 0X1F, -0x6E)),
+
+ // float value
+ array(array(3.4, 0.8, -2.9), array(6.25e2, 8.20E-3)),
+
+ // string values
+ array('Mango', array("Apple", 'Orange', "Lemon")),
+
+ // bool values
+/*4*/ array( array(true, false), array(TRUE, FALSE)),
+
+ // null values
+ array( array(null), array(NULL)),
+
+ // empty array
+ array(),
+
+ // binary array
+ array(b"binary"),
+
+ // mixed array
+/*8*/ array(16, 8.345, array("Fruits"), array(true, null), array(FALSE), array(-98, 0.005, 'banana'))
+);
+
+for($count = 0; $count < count($input_values); $count++) {
+ echo "\n-- Iteration ".($count + 1)." --\n";
+ var_dump( array_walk_recursive($input_values[$count], "print_value", $count+1));
+}
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : 'input' array with different values***
+
+-- Iteration 1 --
+1 : 0 1
+1 : 1 0
+1 : 2 -10
+1 : 0 19
+1 : 1 -33
+1 : 0 90
+1 : 1 31
+1 : 2 -110
+bool(true)
+
+-- Iteration 2 --
+2 : 0 3.4
+2 : 1 0.8
+2 : 2 -2.9
+2 : 0 625
+2 : 1 0.0082
+bool(true)
+
+-- Iteration 3 --
+3 : 0 Mango
+3 : 0 Apple
+3 : 1 Orange
+3 : 2 Lemon
+bool(true)
+
+-- Iteration 4 --
+4 : 0 1
+4 : 1
+4 : 0 1
+4 : 1
+bool(true)
+
+-- Iteration 5 --
+5 : 0
+5 : 0
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+
+-- Iteration 7 --
+7 : 0 binary
+bool(true)
+
+-- Iteration 8 --
+8 : 0 16
+8 : 1 8.345
+8 : 0 Fruits
+8 : 0 1
+8 : 1
+8 : 0
+8 : 0 -98
+8 : 1 0.005
+8 : 2 banana
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation4.phpt b/ext/standard/tests/array/array_walk_recursive_variation4.phpt
new file mode 100644
index 000000000..4db34979a
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation4.phpt
@@ -0,0 +1,76 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - 'input' array with subarray
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_walk_recursive() with an array having subarrays as elements
+*/
+
+echo "*** Testing array_walk_recursive() : array with subarray ***\n";
+
+// callback function
+/* Prototype : callback(mixed $value, mixed $key)
+ * Parameters : $value - values in given 'input' array
+ * $key - keys in given 'input' array
+ * Description : It prints the count of an array elements, passed as argument
+ */
+function callback($value, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($key); // key
+ var_dump($value); // value
+ echo "\n"; // new line to separate the output between each element
+}
+
+$input = array(
+ array(),
+ array(1),
+ array(1,2,3),
+ array("Mango", "Orange"),
+ array(array(1, 2, 3), array(1))
+);
+
+var_dump( array_walk_recursive( $input, "callback"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : array with subarray ***
+int(0)
+int(1)
+
+int(0)
+int(1)
+
+int(1)
+int(2)
+
+int(2)
+int(3)
+
+int(0)
+string(5) "Mango"
+
+int(1)
+string(6) "Orange"
+
+int(0)
+int(1)
+
+int(1)
+int(2)
+
+int(2)
+int(3)
+
+int(0)
+int(1)
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation5.phpt b/ext/standard/tests/array/array_walk_recursive_variation5.phpt
new file mode 100644
index 000000000..688da57f0
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation5.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - 'input' argument containing reference variables
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_walk_recursive() with an array having reference variables
+*/
+
+echo "*** Testing array_walk_recursive() : array with references ***\n";
+
+$value1 = 10;
+$value2 = -20;
+$value3 = &$value1;
+$value4 = 50;
+
+// 'input' array containing references to above variables
+$input = array(&$value1, array(&$value2, -35), array(&$value3, 0), array(&$value4));
+
+// callback function
+/* Prototype : callback(int $value, mixed $key)
+ * Parameters : $value - values in given input array
+ * $key - keys in given input array
+ * Description : function checks for the value whether positive or negative and displays according to that
+ */
+function callback($value, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($key); // key
+ var_dump($value); // value
+ echo "\n"; // new line to separate the output between each element
+}
+
+var_dump( array_walk_recursive($input, "callback"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : array with references ***
+int(0)
+int(10)
+
+int(0)
+int(-20)
+
+int(1)
+int(-35)
+
+int(0)
+int(10)
+
+int(1)
+int(0)
+
+int(0)
+int(50)
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation6.phpt b/ext/standard/tests/array/array_walk_recursive_variation6.phpt
new file mode 100644
index 000000000..554ade4f4
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation6.phpt
@@ -0,0 +1,147 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - 'input' argument as diff. associative arrays
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing 'input' argument as an associative array
+ * with Numeric & string keys
+*/
+
+echo "*** Testing array_walk_recursive() : 'input' as an associative array ***\n";
+
+// callback functions
+/* Prototype : for_numeric( int $value, int $key, int $user_data)
+ * Parameters : $value - value from key/value pair of the array
+ * $key - key from key/value pair of the array
+ * $user_data - data to be added to 'value'
+ * Description : Function adds values with keys & user_data
+ */
+function for_numeric($value, $key, $user_data)
+{
+ // dump the input values to see if they are
+ // passed with correct type
+ var_dump($key);
+ var_dump($value);
+ var_dump($user_data);
+ echo "\n"; // new line to separate the output between each element
+}
+
+/* Prototype : for_string( string $value, string $key)
+ * Parameters : $value - values in given input array
+ * $key - keys in given input array
+ * Description : Function appends key to the value
+ */
+function for_string($value, $key)
+{
+ // dump the input values to see if they are
+ // passed with correct type
+ var_dump($key);
+ var_dump($value);
+ echo "\n"; // new line to separate the output between each element
+}
+
+/* Prototype : for_mixed( mixed $value, mixed $key)
+ * Parameters : $value - values in given input array
+ * $key - keys in given input array
+ * Description : Function displays each element of an array with keys
+ */
+function for_mixed($value, $key)
+{
+ // dump the input values to see if they are
+ // passed with correct type
+ var_dump($key);
+ var_dump($value);
+ echo "\n"; // new line to separate the output between each element
+}
+
+// Numeric keys
+$input = array( 0 => array(1 => 25, 5 => 12, 0 => -80), 1 => array(-2 => 100, 5 => 30));
+echo "-- Associative array with numeric keys --\n";
+var_dump( array_walk_recursive($input, "for_numeric", 10));
+
+// String keys
+$input = array( "a" => "Apple", 'z' => array('b' => 'Bananna', "c" => "carrot"), 'x' => array('o' => "Orange"));
+echo "-- Associative array with string keys --\n";
+var_dump( array_walk_recursive($input, "for_string"));
+
+// binary keys
+$input = array( b"a" => "Apple", b"b" => "Banana");
+echo "-- Associative array with binary keys --\n";
+var_dump( array_walk_recursive($input, "for_string"));
+
+// Mixed keys - numeric/string
+$input = array( 0 => array(0 => 1, 1 => 2), "x" => array("a" => "Apple", "b" => "Banana"), 2 =>3);
+echo "-- Associative array with numeric/string keys --\n";
+var_dump( array_walk_recursive($input, "for_mixed"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : 'input' as an associative array ***
+-- Associative array with numeric keys --
+int(1)
+int(25)
+int(10)
+
+int(5)
+int(12)
+int(10)
+
+int(0)
+int(-80)
+int(10)
+
+int(-2)
+int(100)
+int(10)
+
+int(5)
+int(30)
+int(10)
+
+bool(true)
+-- Associative array with string keys --
+string(1) "a"
+string(5) "Apple"
+
+string(1) "b"
+string(7) "Bananna"
+
+string(1) "c"
+string(6) "carrot"
+
+string(1) "o"
+string(6) "Orange"
+
+bool(true)
+-- Associative array with binary keys --
+string(1) "a"
+string(5) "Apple"
+
+string(1) "b"
+string(6) "Banana"
+
+bool(true)
+-- Associative array with numeric/string keys --
+int(0)
+int(1)
+
+int(1)
+int(2)
+
+string(1) "a"
+string(5) "Apple"
+
+string(1) "b"
+string(6) "Banana"
+
+int(2)
+int(3)
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation7.phpt b/ext/standard/tests/array/array_walk_recursive_variation7.phpt
new file mode 100644
index 000000000..0cdd6d248
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation7.phpt
@@ -0,0 +1,93 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - anonymous callback function
+--FILE--
+<?php
+/* Prototype : proto bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing anonymous(run-time) callback function with following variations:
+* with one parameter
+* two parameters
+* three parameters
+* extra parameters
+* without parameters
+*/
+
+echo "*** Testing array_walk_recursive() : anonymous function as callback ***\n";
+
+$input = array( array(2, 5), array(10, 0));
+
+echo "-- Anonymous function with one argument --\n";
+var_dump( array_walk_recursive($input, create_function('$value', 'var_dump($value); echo "\n";')));
+
+echo "-- Anonymous function with two arguments --\n";
+var_dump( array_walk_recursive($input, create_function('$value, $key', 'var_dump($key); var_dump($value); echo "\n";')));
+
+echo "-- Anonymous function with three arguments --\n";
+var_dump( array_walk_recursive($input, create_function('$value, $key, $user_data', 'var_dump($key); var_dump($value); var_dump($user_data); echo "\n";'), 10));
+
+echo "-- Anonymous function with one more argument --\n";
+var_dump( array_walk_recursive($input, create_function('$value, $key, $user_data', 'var_dump($key); var_dump($value); var_dump($user_data); echo "\n";'), 20, 30));
+
+echo "-- Anonymous function with null argument --\n";
+var_dump( array_walk_recursive( $input, create_function(null, 'echo "1\n";')));
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : anonymous function as callback ***
+-- Anonymous function with one argument --
+int(2)
+
+int(5)
+
+int(10)
+
+int(0)
+
+bool(true)
+-- Anonymous function with two arguments --
+int(0)
+int(2)
+
+int(1)
+int(5)
+
+int(0)
+int(10)
+
+int(1)
+int(0)
+
+bool(true)
+-- Anonymous function with three arguments --
+int(0)
+int(2)
+int(10)
+
+int(1)
+int(5)
+int(10)
+
+int(0)
+int(10)
+int(10)
+
+int(1)
+int(0)
+int(10)
+
+bool(true)
+-- Anonymous function with one more argument --
+
+Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+-- Anonymous function with null argument --
+1
+1
+1
+1
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation8.phpt b/ext/standard/tests/array/array_walk_recursive_variation8.phpt
new file mode 100644
index 000000000..aa73912cf
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation8.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - buit-in function as callback
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing different buit-in functionns as callback function
+ * pow function
+ * min function
+ * echo language construct
+*/
+
+echo "*** Testing array_walk_recursive() : built-in function as callback ***\n";
+
+$input = array(array(1, 2));
+
+echo "-- With 'pow' built-in function --\n";
+var_dump( array_walk_recursive($input, 'pow'));
+
+echo "-- With 'min' built-in function --\n";
+var_dump( array_walk_recursive($input, "min"));
+
+echo "-- With 'echo' language construct --\n";
+var_dump( array_walk_recursive($input, "echo"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : built-in function as callback ***
+-- With 'pow' built-in function --
+bool(true)
+-- With 'min' built-in function --
+bool(true)
+-- With 'echo' language construct --
+
+Warning: array_walk_recursive(): Unable to call echo() - function does not exist in %s on line %d
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_recursive_variation9.phpt b/ext/standard/tests/array/array_walk_recursive_variation9.phpt
new file mode 100644
index 000000000..f18fe248c
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_recursive_variation9.phpt
@@ -0,0 +1,99 @@
+--TEST--
+Test array_walk_recursive() function : usage variations - different callback functions
+--FILE--
+<?php
+/* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing different types of callback functions to array_walk_recursive()
+ * without parameters
+ * with less and more parameters
+*/
+
+echo "*** Testing array_walk_recursive() : callback function variation ***\n";
+
+$input = array(array('Apple', 'Banana'), 'Mango', array('Orange'));
+
+echo "-- callback function with both parameters --\n";
+function callback_two_parameter($value, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($key); // key
+ var_dump($value); // value
+ echo "\n"; // new line to separate the output between each element
+}
+var_dump( array_walk_recursive($input, 'callback_two_parameter'));
+
+echo "-- callback function with only one parameter --\n";
+function callback_one_parameter($value)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($value); // value
+ echo "\n"; // new line to separate the output between each element
+}
+var_dump( array_walk_recursive($input, 'callback_one_parameter'));
+
+echo "-- callback function without parameters --\n";
+function callback_no_parameter()
+{
+ echo "callback3() called\n";
+}
+var_dump( array_walk_recursive($input, 'callback_no_parameter'));
+
+echo "-- passing one more parameter to function with two parameters --\n";
+var_dump( array_walk_recursive($input, 'callback_two_parameter', 10));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk_recursive() : callback function variation ***
+-- callback function with both parameters --
+int(0)
+string(5) "Apple"
+
+int(1)
+string(6) "Banana"
+
+int(1)
+string(5) "Mango"
+
+int(0)
+string(6) "Orange"
+
+bool(true)
+-- callback function with only one parameter --
+string(5) "Apple"
+
+string(6) "Banana"
+
+string(5) "Mango"
+
+string(6) "Orange"
+
+bool(true)
+-- callback function without parameters --
+callback3() called
+callback3() called
+callback3() called
+callback3() called
+bool(true)
+-- passing one more parameter to function with two parameters --
+int(0)
+string(5) "Apple"
+
+int(1)
+string(6) "Banana"
+
+int(1)
+string(5) "Mango"
+
+int(0)
+string(6) "Orange"
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_variation1.phpt b/ext/standard/tests/array/array_walk_variation1.phpt
new file mode 100644
index 000000000..e08c0d711
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation1.phpt
@@ -0,0 +1,250 @@
+--TEST--
+Test array_walk() function : usage variations - unexpected values for 'input' argument
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing different scalar/nonscalar values in place of 'input' argument
+*/
+
+echo "*** Testing array_walk() : unexpected values for 'input' argument ***\n";
+
+// callback function
+/* Prototype : callback(mixed $value, mixed $key)
+ * Parameters : $value - values given in input array
+ * $key - keys given in input array
+ * Description : Function prints each element of an array with key
+ */
+function callback($value, $key)
+{
+ echo "key : ";
+ var_dump($key);
+ echo "value : ";
+ var_dump($value);
+}
+
+// extra parameter passed to array_walk()
+$user_data = 10;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get resource variable
+$fp = fopen(__FILE__, 'r');
+
+// different scalar/nonscalar values to be used in place of an 'input' argument
+$input_values = array(
+
+ // int data
+/* 1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/* 5*/ 10.5,
+ -10.5,
+ 10.1234567e8,
+ 10.7654321E-8,
+ .5,
+
+ // null data
+/* 10*/ NULL,
+ null,
+
+ // boolean data
+/* 12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/* 16*/ "",
+ '',
+
+ // string data
+/* 18*/ "string",
+ 'string',
+
+ // resource data
+ $fp,
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+/* 22*/ @$unset_var,
+);
+
+
+for($count = 0; $count < count($input_values); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( array_walk($input_values[$count], "callback") );
+ var_dump( array_walk($input_values[$count], "callback", $user_data) );
+}
+
+fclose($fp);
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : unexpected values for 'input' argument ***
+-- Iteration 1 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 11 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 13 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 14 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 21 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 22 --
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+
+Warning: array_walk(): The argument should be an array in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/array_walk_variation2.phpt b/ext/standard/tests/array/array_walk_variation2.phpt
new file mode 100644
index 000000000..88fbbf3d5
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation2.phpt
@@ -0,0 +1,271 @@
+--TEST--
+Test array_walk() function : usage variations - unexpected values in place of 'funcname' argument
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing different scalar/nonscalar values in place of 'funcname' argument
+*/
+
+echo "*** Testing array_walk() : unexpected values for 'funcname' argument ***\n";
+
+$input = array(1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+$user_data = 20;
+
+// get resource variable
+$fp = fopen(__FILE__, 'r');
+
+// class definition
+class MyClass
+{
+ public function __toString()
+ {
+ return 'object';
+ }
+}
+
+// different scalar/nonscalar values to be used in place of callback function
+$funcname_values = array(
+
+ // int data
+/* 1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/* 5*/ 10.5,
+ -10.5,
+ 10.1234567e8,
+ 10.7654321E-8,
+ .5,
+
+ // array data
+/* 10*/ array(),
+ array(0),
+ array(1),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+/* 14*/ NULL,
+ null,
+
+ // boolean data
+/* 16*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/* 20*/ "",
+ '',
+
+ // object data
+ new MyClass(),
+
+ // resource data
+/* 23*/ $fp,
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+/* 25*/ @$unset_var,
+);
+
+for($count = 0; $count < count($funcname_values); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( array_walk($input, $funcname_values[$count]) );
+ var_dump( array_walk($input, $funcname_values[$count], $user_data ));
+}
+
+fclose($fp);
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : unexpected values for 'funcname' argument ***
+-- Iteration 1 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+-- Iteration 11 --
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+-- Iteration 12 --
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+-- Iteration 13 --
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+bool(true)
+-- Iteration 14 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: array_walk(): Unable to call () - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk(): Unable to call () - function does not exist in %s on line %d
+bool(true)
+-- Iteration 21 --
+
+Warning: array_walk(): Unable to call () - function does not exist in %s on line %d
+bool(true)
+
+Warning: array_walk(): Unable to call () - function does not exist in %s on line %d
+bool(true)
+-- Iteration 22 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 23 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 24 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+-- Iteration 25 --
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+
+Warning: array_walk(): Wrong syntax for function name in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/array_walk_variation3.phpt b/ext/standard/tests/array/array_walk_variation3.phpt
new file mode 100644
index 000000000..ad2612353
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation3.phpt
@@ -0,0 +1,123 @@
+--TEST--
+Test array_walk() function : usage variations - 'input' array with different values
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_walk() with following types of 'input' arrays:
+ * integer, float, string, bool, null, empty & mixed
+*/
+
+// callback function
+/*
+ * Prototype : print_value(mixed $value, int $key, int $count)
+ * Parameters : $value - array entries(values)
+ * $key - keys in given input array
+ * $count - extra parameter used as an index
+ * Description : prints the array values with keys and count value
+ */
+function print_value($value, $key, $count)
+{
+ echo $count." : ".$key." ".$value."\n";
+}
+
+echo "*** Testing array_walk() : 'input' array with different values***\n";
+
+// different arrays as input
+$input_values = array(
+
+ // integer values
+/*1*/ array(1, 0, -10, 023, -041, 0x5A, 0X1F, -0x6E),
+
+ // float value
+ array(3.4, 0.8, -2.9, 6.25e2, 8.20E-3),
+
+ // string values
+ array('Mango', "Apple", 'Orange', "Lemon"),
+
+ // bool values
+/*4*/ array(true, false, TRUE, FALSE),
+
+ // null values
+ array(null, NULL),
+
+ // empty array
+ array(),
+
+ // binary array
+ array(b"binary"),
+
+ // mixed array
+/*8*/ array(16, 8.345, "Fruits", true, null, FALSE, -98, 0.005, 'banana')
+);
+
+for($count = 0; $count < count($input_values); $count++) {
+ echo "\n-- Iteration ".($count + 1)." --\n";
+ var_dump( array_walk($input_values[$count], "print_value", $count+1));
+}
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : 'input' array with different values***
+
+-- Iteration 1 --
+1 : 0 1
+1 : 1 0
+1 : 2 -10
+1 : 3 19
+1 : 4 -33
+1 : 5 90
+1 : 6 31
+1 : 7 -110
+bool(true)
+
+-- Iteration 2 --
+2 : 0 3.4
+2 : 1 0.8
+2 : 2 -2.9
+2 : 3 625
+2 : 4 0.0082
+bool(true)
+
+-- Iteration 3 --
+3 : 0 Mango
+3 : 1 Apple
+3 : 2 Orange
+3 : 3 Lemon
+bool(true)
+
+-- Iteration 4 --
+4 : 0 1
+4 : 1
+4 : 2 1
+4 : 3
+bool(true)
+
+-- Iteration 5 --
+5 : 0
+5 : 1
+bool(true)
+
+-- Iteration 6 --
+bool(true)
+
+-- Iteration 7 --
+7 : 0 binary
+bool(true)
+
+-- Iteration 8 --
+8 : 0 16
+8 : 1 8.345
+8 : 2 Fruits
+8 : 3 1
+8 : 4
+8 : 5
+8 : 6 -98
+8 : 7 0.005
+8 : 8 banana
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_variation4.phpt b/ext/standard/tests/array/array_walk_variation4.phpt
new file mode 100644
index 000000000..868732daa
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation4.phpt
@@ -0,0 +1,87 @@
+--TEST--
+Test array_walk() function : usage variations - 'input' array with subarray
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_walk() with an array having subarrays as elements
+*/
+
+echo "*** Testing array_walk() : array with subarray ***\n";
+
+// callback function
+/* Prototype : callback(mixed $value, mixed $key)
+ * Parameters : $value - values in given 'input' array
+ * $key - keys in given 'input' array
+ * Description : It prints the count of an array elements, passed as argument
+ */
+function callback($value, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($key); // key
+ var_dump($value); // value
+ echo "\n"; // new line to separate the output between each element
+}
+
+$input = array(
+ array(),
+ array(1),
+ array(1,2,3),
+ array("Mango", "Orange"),
+ array(array(1, 2, 3))
+);
+
+var_dump( array_walk( $input, "callback"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : array with subarray ***
+int(0)
+array(0) {
+}
+
+int(1)
+array(1) {
+ [0]=>
+ int(1)
+}
+
+int(2)
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+
+int(3)
+array(2) {
+ [0]=>
+ string(5) "Mango"
+ [1]=>
+ string(6) "Orange"
+}
+
+int(4)
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_variation5.phpt b/ext/standard/tests/array/array_walk_variation5.phpt
new file mode 100644
index 000000000..f42e0f11e
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation5.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Test array_walk() function : usage variations - 'input' argument containing reference variables
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing array_walk() with an array having reference variables
+*/
+
+echo "*** Testing array_walk() : array with references ***\n";
+
+$value1 = 10;
+$value2 = -20;
+$value3 = &$value1;
+$value4 = 50;
+
+// 'input' array containing references to above variables
+$input = array(&$value1, &$value2, -35, &$value3, 0, &$value4);
+
+// callback function
+/* Prototype : callback(int $value, mixed $key)
+ * Parameters : $value - values in given input array
+ * $key - keys in given input array
+ * Description : function checks for the value whether positive or negative and displays according to that
+ */
+function callback($value, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($key); // key
+ var_dump($value); // value
+ echo "\n"; // new line to separate the output between each element
+}
+
+var_dump( array_walk($input, "callback"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : array with references ***
+int(0)
+int(10)
+
+int(1)
+int(-20)
+
+int(2)
+int(-35)
+
+int(3)
+int(10)
+
+int(4)
+int(0)
+
+int(5)
+int(50)
+
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/array_walk_variation6.phpt b/ext/standard/tests/array/array_walk_variation6.phpt
new file mode 100644
index 000000000..c1f23233e
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation6.phpt
@@ -0,0 +1,143 @@
+--TEST--
+Test array_walk() function : usage variations - 'input' argument as diff. associative arrays
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing 'input' argument as an associative array
+ * with Numeric & string keys
+*/
+
+echo "*** Testing array_walk() : 'input' as an associative array ***\n";
+
+// callback functions
+/* Prototype : for_numeric( int $value, int $key, int $user_data)
+ * Parameters : $value - value from key/value pair of the array
+ * $key - key from key/value pair of the array
+ * $user_data - data to be added to 'value'
+ * Description : Function adds values with keys & user_data
+ */
+function for_numeric($value, $key, $user_data)
+{
+ // dump the input values to see if they are
+ // passed with correct type
+ var_dump($key);
+ var_dump($value);
+ var_dump($user_data);
+ echo "\n"; // new line to separate the output between each element
+}
+
+/* Prototype : for_string( string $value, string $key)
+ * Parameters : $value - values in given input array
+ * $key - keys in given input array
+ * Description : Function appends key to the value
+ */
+function for_string($value, $key)
+{
+ // dump the input values to see if they are
+ // passed with correct type
+ var_dump($key);
+ var_dump($value);
+ echo "\n"; // new line to separate the output between each element
+}
+
+/* Prototype : for_mixed( mixed $value, mixed $key)
+ * Parameters : $value - values in given input array
+ * $key - keys in given input array
+ * Description : Function displays each element of an array with keys
+ */
+function for_mixed($value, $key)
+{
+ // dump the input values to see if they are
+ // passed with correct type
+ var_dump($key);
+ var_dump($value);
+ echo "\n"; // new line to separate the output between each element
+}
+
+// Numeric keys
+$input = array( 1 => 25, 5 => 12, 0 => -80, -2 => 100, 5 => 30);
+echo "-- Associative array with numeric keys --\n";
+var_dump( array_walk($input, "for_numeric", 10));
+
+// String keys
+$input = array( "a" => "Apple", 'b' => 'Bananna', "c" => "carrot", 'o' => "Orange");
+echo "-- Associative array with string keys --\n";
+var_dump( array_walk($input, "for_string"));
+
+// binary keys
+$input = array( b"a" => "Apple", b"b" => "Banana");
+echo "-- Associative array with binary keys --\n";
+var_dump( array_walk($input, "for_string"));
+
+// Mixed keys - numeric/string
+$input = array( 0 => 1, 1 => 2, "a" => "Apple", "b" => "Banana", 2 =>3);
+echo "-- Associative array with numeric/string keys --\n";
+var_dump( array_walk($input, "for_mixed"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : 'input' as an associative array ***
+-- Associative array with numeric keys --
+int(1)
+int(25)
+int(10)
+
+int(5)
+int(30)
+int(10)
+
+int(0)
+int(-80)
+int(10)
+
+int(-2)
+int(100)
+int(10)
+
+bool(true)
+-- Associative array with string keys --
+string(1) "a"
+string(5) "Apple"
+
+string(1) "b"
+string(7) "Bananna"
+
+string(1) "c"
+string(6) "carrot"
+
+string(1) "o"
+string(6) "Orange"
+
+bool(true)
+-- Associative array with binary keys --
+string(1) "a"
+string(5) "Apple"
+
+string(1) "b"
+string(6) "Banana"
+
+bool(true)
+-- Associative array with numeric/string keys --
+int(0)
+int(1)
+
+int(1)
+int(2)
+
+string(1) "a"
+string(5) "Apple"
+
+string(1) "b"
+string(6) "Banana"
+
+int(2)
+int(3)
+
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_variation7.phpt b/ext/standard/tests/array/array_walk_variation7.phpt
new file mode 100644
index 000000000..da85958b8
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation7.phpt
@@ -0,0 +1,93 @@
+--TEST--
+Test array_walk() function : usage variations - anonymous callback function
+--FILE--
+<?php
+/* Prototype : proto bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing anonymous(run-time) callback function with following variations:
+* with one parameter
+* two parameters
+* three parameters
+* extra parameters
+* without parameters
+*/
+
+echo "*** Testing array_walk() : anonymous function as callback ***\n";
+
+$input = array(2, 5, 10, 0);
+
+echo "-- Anonymous function with one argument --\n";
+var_dump( array_walk($input, create_function('$value', 'var_dump($value); echo "\n";')));
+
+echo "-- Anonymous function with two arguments --\n";
+var_dump( array_walk($input, create_function('$value, $key', 'var_dump($key); var_dump($value); echo "\n";')));
+
+echo "-- Anonymous function with three arguments --\n";
+var_dump( array_walk($input, create_function('$value, $key, $user_data', 'var_dump($key); var_dump($value); var_dump($user_data); echo "\n";'), 10));
+
+echo "-- Anonymous function with one more argument --\n";
+var_dump( array_walk($input, create_function('$value, $key, $user_data', 'var_dump($key); var_dump($value); var_dump($user_data); echo "\n";'), 20, 30));
+
+echo "-- Anonymous function with null argument --\n";
+var_dump( array_walk( $input, create_function(null, 'echo "1\n";')));
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : anonymous function as callback ***
+-- Anonymous function with one argument --
+int(2)
+
+int(5)
+
+int(10)
+
+int(0)
+
+bool(true)
+-- Anonymous function with two arguments --
+int(0)
+int(2)
+
+int(1)
+int(5)
+
+int(2)
+int(10)
+
+int(3)
+int(0)
+
+bool(true)
+-- Anonymous function with three arguments --
+int(0)
+int(2)
+int(10)
+
+int(1)
+int(5)
+int(10)
+
+int(2)
+int(10)
+int(10)
+
+int(3)
+int(0)
+int(10)
+
+bool(true)
+-- Anonymous function with one more argument --
+
+Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+-- Anonymous function with null argument --
+1
+1
+1
+1
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_variation8.phpt b/ext/standard/tests/array/array_walk_variation8.phpt
new file mode 100644
index 000000000..2086394dd
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation8.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test array_walk() function : usage variations - buit-in function as callback
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing different buit-in functionns as callback function
+ * pow function
+ * min function
+ * echo language construct
+*/
+
+echo "*** Testing array_walk() : built-in function as callback ***\n";
+
+$input = array(2 => 1, 65, 98, 100, 6 => -4);
+
+echo "-- With 'pow' built-in function --\n";
+var_dump( array_walk($input, 'pow'));
+
+echo "-- With 'min' built-in function --\n";
+var_dump( array_walk($input, "min"));
+
+echo "-- With 'echo' language construct --\n";
+var_dump( array_walk($input, "echo"));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : built-in function as callback ***
+-- With 'pow' built-in function --
+bool(true)
+-- With 'min' built-in function --
+bool(true)
+-- With 'echo' language construct --
+
+Warning: array_walk(): Unable to call echo() - function does not exist in %s on line %d
+bool(true)
+Done
diff --git a/ext/standard/tests/array/array_walk_variation9.phpt b/ext/standard/tests/array/array_walk_variation9.phpt
new file mode 100644
index 000000000..42ae20d68
--- /dev/null
+++ b/ext/standard/tests/array/array_walk_variation9.phpt
@@ -0,0 +1,99 @@
+--TEST--
+Test array_walk() function : usage variations - different callback functions
+--FILE--
+<?php
+/* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata])
+ * Description: Apply a user function to every member of an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Passing different types of callback functions to array_walk()
+ * without parameters
+ * with less and more parameters
+*/
+
+echo "*** Testing array_walk() : callback function variation ***\n";
+
+$input = array('Apple', 'Banana', 'Mango', 'Orange');
+
+echo "-- callback function with both parameters --\n";
+function callback_two_parameter($value, $key)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($key); // key
+ var_dump($value); // value
+ echo "\n"; // new line to separate the output between each element
+}
+var_dump( array_walk($input, 'callback_two_parameter'));
+
+echo "-- callback function with only one parameter --\n";
+function callback_one_parameter($value)
+{
+ // dump the arguments to check that they are passed
+ // with proper type
+ var_dump($value); // value
+ echo "\n"; // new line to separate the output between each element
+}
+var_dump( array_walk($input, 'callback_one_parameter'));
+
+echo "-- callback function without parameters --\n";
+function callback_no_parameter()
+{
+ echo "callback3() called\n";
+}
+var_dump( array_walk($input, 'callback_no_parameter'));
+
+echo "-- passing one more parameter to function with two parameters --\n";
+var_dump( array_walk($input, 'callback_two_parameter', 10));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing array_walk() : callback function variation ***
+-- callback function with both parameters --
+int(0)
+string(5) "Apple"
+
+int(1)
+string(6) "Banana"
+
+int(2)
+string(5) "Mango"
+
+int(3)
+string(6) "Orange"
+
+bool(true)
+-- callback function with only one parameter --
+string(5) "Apple"
+
+string(6) "Banana"
+
+string(5) "Mango"
+
+string(6) "Orange"
+
+bool(true)
+-- callback function without parameters --
+callback3() called
+callback3() called
+callback3() called
+callback3() called
+bool(true)
+-- passing one more parameter to function with two parameters --
+int(0)
+string(5) "Apple"
+
+int(1)
+string(6) "Banana"
+
+int(2)
+string(5) "Mango"
+
+int(3)
+string(6) "Orange"
+
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_error.phpt b/ext/standard/tests/array/arsort_error.phpt
new file mode 100644
index 000000000..676d8265e
--- /dev/null
+++ b/ext/standard/tests/array/arsort_error.phpt
@@ -0,0 +1,79 @@
+--TEST--
+Test arsort() function : error conditions
+--FILE--
+<?php
+/* Prototype : bool arsort(array &array_arg [, int sort_flags])
+ * Description: Sort an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing arsort() function with all possible error conditions
+*/
+
+echo "*** Testing arsort() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing arsort() function with Zero arguments --\n";
+var_dump( arsort() );
+
+//Test arsort with more than the expected number of arguments
+echo "\n-- Testing arsort() function with more than expected no. of arguments --\n";
+$array_arg = array(1, 2);
+$flags = array("SORT_REGULAR" => SORT_REGULAR, "SORT_STRING" => SORT_STRING, "SORT_NUMERIC" => SORT_NUMERIC);
+$extra_arg = 10;
+
+// loop through $flag_value array and setting all possible flag values
+foreach($flags as $key => $flag){
+ echo "\nSort flag = $key\n";
+ var_dump( arsort($array_arg,$flag, $extra_arg) );
+
+ // dump the input array to ensure that it wasn't changed
+ var_dump($array_arg);
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing arsort() : error conditions ***
+
+-- Testing arsort() function with Zero arguments --
+
+Warning: arsort() expects at least 1 parameter, 0 given in %sarsort_error.php on line %d
+bool(false)
+
+-- Testing arsort() function with more than expected no. of arguments --
+
+Sort flag = SORT_REGULAR
+
+Warning: arsort() expects at most 2 parameters, 3 given in %sarsort_error.php on line %d
+bool(false)
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+Sort flag = SORT_STRING
+
+Warning: arsort() expects at most 2 parameters, 3 given in %sarsort_error.php on line %d
+bool(false)
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+
+Sort flag = SORT_NUMERIC
+
+Warning: arsort() expects at most 2 parameters, 3 given in %sarsort_error.php on line %d
+bool(false)
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation1.phpt b/ext/standard/tests/array/arsort_variation1.phpt
new file mode 100644
index 000000000..1545abe34
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation1.phpt
@@ -0,0 +1,399 @@
+--TEST--
+Test arsort() function : usage variations - unexpected values for 'array_arg' argument
+--FILE--
+<?php
+/* Prototype : bool arsort(array &array_arg [, int sort_flags])
+ * Description: Sort an array and maintain index association
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing arsort() by providing different unexpected values for array argument with following flag values.
+ * 1. flag value as defualt
+ * 2. SORT_REGULAR - compare items normally
+ * 3. SORT_NUMERIC - compare items numerically
+ * 4. SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// resource variable
+$fp = fopen(__FILE__, "r");
+
+//array of values with indices to iterate over
+$unexpected_values = array (
+
+ // int data
+ 0 => 0,
+ 1 => 1,
+ 2 => 12345,
+ 3 => -2345,
+
+ // float data
+ 4 => 10.5,
+ 5 => -10.5,
+ 6 => 10.5e3,
+ 7 => 10.6E-2,
+ 8 => .5,
+
+ // null data
+ 9 => NULL,
+ 10 => null,
+
+ // boolean data
+ 11 => true,
+ 12 => false,
+ 13 => TRUE,
+ 14 => FALSE,
+
+ // empty data
+ 15 => "",
+ 16 => '',
+
+ // string data
+ 17 => "string",
+ 18 => 'string',
+
+ // object data
+ 19 => new stdclass(),
+
+ // undefined data
+ 20 => @undefined_var,
+
+ // unset data
+ 21 => @unset_var,
+
+ // resource variable
+ 22 => $fp
+
+);
+
+// loop though each element of the array and check the working of arsort()
+// when $array arugment is supplied with different values from $unexpected_values
+echo "\n-- Testing arsort() by supplying different unexpected values for 'array' argument --\n";
+echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
+
+$counter = 1;
+for($index = 0; $index < count($unexpected_values); $index ++) {
+ echo "-- Iteration $counter --\n";
+ $value = $unexpected_values [$index];
+ var_dump( arsort($value) ); // expecting : bool(false)
+ var_dump( arsort($value, SORT_REGULAR) ); // expecting : bool(false)
+ var_dump( arsort($value, SORT_NUMERIC) ); // expecting : bool(false)
+ var_dump( arsort($value, SORT_STRING) ); // expecting : bool(false)
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying different unexpected values for 'array' argument --
+
+-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
+-- Iteration 1 --
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 11 --
+
+Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 13 --
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 14 --
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 21 --
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 22 --
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
+bool(false)
+-- Iteration 23 --
+
+Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
+bool(false)
+
+Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation10.phpt b/ext/standard/tests/array/arsort_variation10.phpt
new file mode 100644
index 000000000..ec483df3a
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation10.phpt
@@ -0,0 +1,114 @@
+--TEST--
+Test arsort() function : usage variations - sort octal values
+--FILE--
+<?php
+/* Prototype : bool arsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array and maintain index association.
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing arsort() by providing different octal array for $array argument with following flag values
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+// an array contains unsorted octal values
+$unsorted_oct_array = array (
+ 01235 => 01235, 0321 => 0321, 0345 => 0345, 066 => 066, 0772 => 0772,
+ 077 => 077, -066 => -066, -0345 => -0345, 0 => 0
+);
+
+echo "\n-- Testing arsort() by supplying octal value array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( arsort($temp_array) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing arsort() by supplying octal value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( arsort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing arsort() by supplying octal value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( arsort($temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying octal value array, 'flag' value is defualt --
+bool(true)
+array(9) {
+ [669]=>
+ int(669)
+ [506]=>
+ int(506)
+ [229]=>
+ int(229)
+ [209]=>
+ int(209)
+ [63]=>
+ int(63)
+ [54]=>
+ int(54)
+ [0]=>
+ int(0)
+ [-54]=>
+ int(-54)
+ [-229]=>
+ int(-229)
+}
+
+-- Testing arsort() by supplying octal value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(9) {
+ [669]=>
+ int(669)
+ [506]=>
+ int(506)
+ [229]=>
+ int(229)
+ [209]=>
+ int(209)
+ [63]=>
+ int(63)
+ [54]=>
+ int(54)
+ [0]=>
+ int(0)
+ [-54]=>
+ int(-54)
+ [-229]=>
+ int(-229)
+}
+
+-- Testing arsort() by supplying octal value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(9) {
+ [669]=>
+ int(669)
+ [506]=>
+ int(506)
+ [229]=>
+ int(229)
+ [209]=>
+ int(209)
+ [63]=>
+ int(63)
+ [54]=>
+ int(54)
+ [0]=>
+ int(0)
+ [-54]=>
+ int(-54)
+ [-229]=>
+ int(-229)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation11.phpt b/ext/standard/tests/array/arsort_variation11.phpt
new file mode 100644
index 000000000..e8bfd772e
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation11.phpt
Binary files differ
diff --git a/ext/standard/tests/array/arsort_variation2.phpt b/ext/standard/tests/array/arsort_variation2.phpt
new file mode 100644
index 000000000..ab04b4409
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation2.phpt
@@ -0,0 +1,308 @@
+--TEST--
+Test arsort() function : usage variations - unexpected values for 'sort_flags' argument
+--FILE--
+<?php
+/* Prototype : proto bool arsort(array &array_arg [, int sort_flags])
+ * Description: Sort an array and maintain index association
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing arsort() by providing different unexpected values for flag argument
+*/
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// resource variable
+$fp = fopen(__FILE__, "r");
+
+// temperory array for checking unexpected behavior
+$unsorted_values = array(1 => 10, 2 => 2, 3 => 45);
+
+//array of values to iterate over
+$unexpected_values = array(
+
+ // int data
+/*1*/ -2345,
+
+ // float data
+/*2*/ 10.5,
+ -10.5,
+ 10.5e2,
+ 10.6E-2,
+ .5,
+
+ // null data
+/*7*/ NULL,
+ null,
+
+ // boolean data
+/*9*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*13*/ "",
+ '',
+
+ // string data
+/*15*/ "string",
+ 'string',
+
+ // object data
+/*16*/ new stdclass(),
+
+ // undefined data
+/*17*/ @undefined_var,
+
+ // unset data
+/*18*/ @unset_var,
+
+ // resource variable
+/*19*/ $fp
+
+);
+
+// loop though each element of the array and check the working of arsort()
+// when $flag arugment is supplied with different values from $unexpected_values
+echo "\n-- Testing arsort() by supplying different unexpected values for 'sort_flags' argument --\n";
+
+$counter = 1;
+for($index = 0; $index < count($unexpected_values); $index ++) {
+ echo "-- Iteration $counter --\n";
+ $value = $unexpected_values [$index];
+ $temp_array = $unsorted_values;
+ var_dump( arsort($temp_array, $value) );
+ var_dump($temp_array);
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying different unexpected values for 'sort_flags' argument --
+-- Iteration 1 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 2 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 3 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 4 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 5 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 6 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 7 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 8 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 9 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 10 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 11 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 12 --
+bool(true)
+array(3) {
+ [3]=>
+ int(45)
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 13 --
+
+Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
+bool(false)
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+ [3]=>
+ int(45)
+}
+-- Iteration 14 --
+
+Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
+bool(false)
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+ [3]=>
+ int(45)
+}
+-- Iteration 15 --
+
+Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
+bool(false)
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+ [3]=>
+ int(45)
+}
+-- Iteration 16 --
+
+Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
+bool(false)
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+ [3]=>
+ int(45)
+}
+-- Iteration 17 --
+
+Warning: arsort() expects parameter 2 to be long, object given in %sarsort_variation2.php on line %d
+bool(false)
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+ [3]=>
+ int(45)
+}
+-- Iteration 18 --
+
+Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
+bool(false)
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+ [3]=>
+ int(45)
+}
+-- Iteration 19 --
+
+Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
+bool(false)
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+ [3]=>
+ int(45)
+}
+-- Iteration 20 --
+
+Warning: arsort() expects parameter 2 to be long, resource given in %sarsort_variation2.php on line %d
+bool(false)
+array(3) {
+ [1]=>
+ int(10)
+ [2]=>
+ int(2)
+ [3]=>
+ int(45)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation3.phpt b/ext/standard/tests/array/arsort_variation3.phpt
new file mode 100644
index 000000000..609155ca7
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation3.phpt
@@ -0,0 +1,326 @@
+--TEST--
+Test arsort() function : usage variations - sort integer/float values
+--FILE--
+<?php
+/* Prototype : bool arsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array and maintain index association
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing arsort() by providing different integer/float value arrays for $array argument with following values
+ * 1. flag value as defualt
+ * 2. SORT_REGULAR - compare items normally
+ * 3. SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+// group of various arrays with indices
+$various_arrays = array(
+ // negative/posative integer array
+ array(1 => 11, 2 => -11, 3 => 21, 4 => -21, 5 => 31, 6 => -31, 7 => 0, 8 => 41, 10 =>-41),
+
+ // float value array
+ array(1 => 10.5, 2 => -10.5, 3 => 10.5e2, 4 => 10.6E-2, 5 => .5, 6 => .0001, 7 => -.1),
+
+ // mixed value array
+ array(1 => .0001, 2 => .0021, 3 => -.01, 4 => -1, 5 => 0, 6 => .09, 7 => 2, 8 => -.9, 9 => 10.6E-2, 10 => -10.6E-2, 11 => 33),
+
+ // array values contains minimum and maximum ranges
+ array(1 => 2147483647, 2 => 2147483648, 3 => -2147483647, 4 => -2147483648, 5 => -0, 6 => 0, 7 => -2147483649)
+);
+
+// set of possible flag values
+$flag_value = array("SORT_REGULAR" => SORT_REGULAR, "SORT_NUMERIC" => SORT_NUMERIC);
+
+$count = 1;
+echo "\n-- Testing arsort() by supplying various integer/float arrays --\n";
+
+// loop through to test arsort() with different arrays
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With default sort_flag -\n";
+ $temp_array = $array;
+ var_dump(arsort($temp_array) );
+ var_dump($temp_array);
+
+ // loop through $flag_value array and setting all possible flag values
+ foreach($flag_value as $key => $flag){
+ echo "- Sort_flag = $key -\n";
+ $temp_array = $array;
+ var_dump(arsort($temp_array, $flag) );
+ var_dump($temp_array);
+ }
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying various integer/float arrays --
+
+-- Iteration 1 --
+- With default sort_flag -
+bool(true)
+array(9) {
+ [8]=>
+ int(41)
+ [5]=>
+ int(31)
+ [3]=>
+ int(21)
+ [1]=>
+ int(11)
+ [7]=>
+ int(0)
+ [2]=>
+ int(-11)
+ [4]=>
+ int(-21)
+ [6]=>
+ int(-31)
+ [10]=>
+ int(-41)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(9) {
+ [8]=>
+ int(41)
+ [5]=>
+ int(31)
+ [3]=>
+ int(21)
+ [1]=>
+ int(11)
+ [7]=>
+ int(0)
+ [2]=>
+ int(-11)
+ [4]=>
+ int(-21)
+ [6]=>
+ int(-31)
+ [10]=>
+ int(-41)
+}
+- Sort_flag = SORT_NUMERIC -
+bool(true)
+array(9) {
+ [8]=>
+ int(41)
+ [5]=>
+ int(31)
+ [3]=>
+ int(21)
+ [1]=>
+ int(11)
+ [7]=>
+ int(0)
+ [2]=>
+ int(-11)
+ [4]=>
+ int(-21)
+ [6]=>
+ int(-31)
+ [10]=>
+ int(-41)
+}
+
+-- Iteration 2 --
+- With default sort_flag -
+bool(true)
+array(7) {
+ [3]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [5]=>
+ float(0.5)
+ [4]=>
+ float(0.106)
+ [6]=>
+ float(0.0001)
+ [7]=>
+ float(-0.1)
+ [2]=>
+ float(-10.5)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(7) {
+ [3]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [5]=>
+ float(0.5)
+ [4]=>
+ float(0.106)
+ [6]=>
+ float(0.0001)
+ [7]=>
+ float(-0.1)
+ [2]=>
+ float(-10.5)
+}
+- Sort_flag = SORT_NUMERIC -
+bool(true)
+array(7) {
+ [3]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [5]=>
+ float(0.5)
+ [4]=>
+ float(0.106)
+ [6]=>
+ float(0.0001)
+ [7]=>
+ float(-0.1)
+ [2]=>
+ float(-10.5)
+}
+
+-- Iteration 3 --
+- With default sort_flag -
+bool(true)
+array(11) {
+ [11]=>
+ int(33)
+ [7]=>
+ int(2)
+ [9]=>
+ float(0.106)
+ [6]=>
+ float(0.09)
+ [2]=>
+ float(0.0021)
+ [1]=>
+ float(0.0001)
+ [5]=>
+ int(0)
+ [3]=>
+ float(-0.01)
+ [10]=>
+ float(-0.106)
+ [8]=>
+ float(-0.9)
+ [4]=>
+ int(-1)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ [11]=>
+ int(33)
+ [7]=>
+ int(2)
+ [9]=>
+ float(0.106)
+ [6]=>
+ float(0.09)
+ [2]=>
+ float(0.0021)
+ [1]=>
+ float(0.0001)
+ [5]=>
+ int(0)
+ [3]=>
+ float(-0.01)
+ [10]=>
+ float(-0.106)
+ [8]=>
+ float(-0.9)
+ [4]=>
+ int(-1)
+}
+- Sort_flag = SORT_NUMERIC -
+bool(true)
+array(11) {
+ [11]=>
+ int(33)
+ [7]=>
+ int(2)
+ [9]=>
+ float(0.106)
+ [6]=>
+ float(0.09)
+ [2]=>
+ float(0.0021)
+ [1]=>
+ float(0.0001)
+ [5]=>
+ int(0)
+ [3]=>
+ float(-0.01)
+ [10]=>
+ float(-0.106)
+ [8]=>
+ float(-0.9)
+ [4]=>
+ int(-1)
+}
+
+-- Iteration 4 --
+- With default sort_flag -
+bool(true)
+array(7) {
+ [2]=>
+ %s(2147483648)
+ [1]=>
+ int(2147483647)
+ [6]=>
+ int(0)
+ [5]=>
+ int(0)
+ [3]=>
+ int(-2147483647)
+ [4]=>
+ %s(-2147483648)
+ [7]=>
+ %s(-2147483649)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(7) {
+ [2]=>
+ %s(2147483648)
+ [1]=>
+ int(2147483647)
+ [6]=>
+ int(0)
+ [5]=>
+ int(0)
+ [3]=>
+ int(-2147483647)
+ [4]=>
+ %s(-2147483648)
+ [7]=>
+ %s(-2147483649)
+}
+- Sort_flag = SORT_NUMERIC -
+bool(true)
+array(7) {
+ [2]=>
+ %s(2147483648)
+ [1]=>
+ int(2147483647)
+ [6]=>
+ int(0)
+ [5]=>
+ int(0)
+ [3]=>
+ int(-2147483647)
+ [4]=>
+ %s(-2147483648)
+ [7]=>
+ %s(-2147483649)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation4.phpt b/ext/standard/tests/array/arsort_variation4.phpt
new file mode 100644
index 000000000..a76a180f4
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation4.phpt
@@ -0,0 +1,79 @@
+--TEST--
+Test arsort() function : usage variations - sort reference variables
+--FILE--
+<?php
+/* Prototype : bool arsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array and maintain index association.
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing arsort() by providing reference variable array with following flag values
+ * flag value as defualt
+ * SORT_REGULAR - compare items normally
+ * SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing arsort() :usage variations ***\n";
+
+$value1 = 100;
+$value2 = 33;
+$value3 = 555;
+
+// an array containing integer references
+$unsorted_numerics = array( 1 => &$value1 , 2 => &$value2, 3 => &$value3);
+
+echo "\n-- Testing arsort() by supplying reference variable array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_numerics;
+var_dump( arsort($temp_array) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing arsort() by supplying reference variable array, 'flag' = SORT_REGULAR --\n";
+$temp_array = &$unsorted_numerics;
+var_dump( arsort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing arsort() by supplying reference variable array, 'flag' = SORT_NUMERIC --\n";
+$temp_array = &$unsorted_numerics;
+var_dump( arsort($temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing arsort() :usage variations ***
+
+-- Testing arsort() by supplying reference variable array, 'flag' value is defualt --
+bool(true)
+array(3) {
+ [3]=>
+ &int(555)
+ [1]=>
+ &int(100)
+ [2]=>
+ &int(33)
+}
+
+-- Testing arsort() by supplying reference variable array, 'flag' = SORT_REGULAR --
+bool(true)
+array(3) {
+ [3]=>
+ &int(555)
+ [1]=>
+ &int(100)
+ [2]=>
+ &int(33)
+}
+
+-- Testing arsort() by supplying reference variable array, 'flag' = SORT_NUMERIC --
+bool(true)
+array(3) {
+ [3]=>
+ &int(555)
+ [1]=>
+ &int(100)
+ [2]=>
+ &int(33)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation5.phpt b/ext/standard/tests/array/arsort_variation5.phpt
new file mode 100644
index 000000000..e69c26988
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation5.phpt
@@ -0,0 +1,242 @@
+--TEST--
+Test arsort() function : usage variations - sort strings
+--FILE--
+<?php
+/* Prototype : bool arsort ( array &$array [, int $asort_flags] )
+ * Description: Sort an array and maintain index association
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing arsort() by providing different string arrays for $array argument with following flag values
+ * flag value as defualt
+ * SORT_REGULAR - compare items normally
+ * SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+$various_arrays = array (
+ // group of escape sequences
+ array ("null"=> null, "NULL" => NULL, "\a" => "\a", "\cx" => "\cx", "\e" => "\e",
+ "\f" => "\f", "\n" =>"\n", "\r" => "\r", "\t" => "\t", "\xhh" => "\xhh",
+ "\ddd" => "\ddd", "\v" => "\v"
+ ),
+
+ // array contains combination of capital/small letters
+ array ('l' => "lemoN", 'O' => "Orange", 'b' => "banana", 'a' => "apple", 'Te' => "Test",
+ 'T' => "TTTT", 't' => "ttt", 'w' => "ww", 'x' => "x", 'X' => "X", 'o' => "oraNGe",
+ 'B' => "BANANA"
+ )
+);
+
+$flags = array("SORT_REGULAR" => SORT_REGULAR, "SORT_STRING" => SORT_STRING);
+
+$count = 1;
+echo "\n-- Testing arsort() by supplying various string arrays --\n";
+
+// loop through to test arsort() with different arrays
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With default sort_flag -\n";
+ $temp_array = $array;
+ var_dump(arsort($temp_array) ); // expecting : bool(true)
+ var_dump($temp_array);
+
+ // loop through $flags array and setting all possible flag values
+ foreach($flags as $key => $flag){
+ echo "- Sort_flag = $key -\n";
+ $temp_array = $array;
+ var_dump(arsort($temp_array, $flag) ); // expecting : bool(true)
+ var_dump($temp_array);
+ }
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying various string arrays --
+
+-- Iteration 1 --
+- With default sort_flag -
+bool(true)
+array(12) {
+ ["\xhh"]=>
+ string(4) "\xhh"
+ ["\e"]=>
+ string(2) "\e"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\a"]=>
+ string(2) "\a"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ ["null"]=>
+ NULL
+ ["NULL"]=>
+ NULL
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(12) {
+ ["\xhh"]=>
+ string(4) "\xhh"
+ ["\e"]=>
+ string(2) "\e"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\a"]=>
+ string(2) "\a"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ ["null"]=>
+ NULL
+ ["NULL"]=>
+ NULL
+}
+- Sort_flag = SORT_STRING -
+bool(true)
+array(12) {
+ ["\xhh"]=>
+ string(4) "\xhh"
+ ["\e"]=>
+ string(2) "\e"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\a"]=>
+ string(2) "\a"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ ["null"]=>
+ NULL
+ ["NULL"]=>
+ NULL
+}
+
+-- Iteration 2 --
+- With default sort_flag -
+bool(true)
+array(12) {
+ ["x"]=>
+ string(1) "x"
+ ["w"]=>
+ string(2) "ww"
+ ["t"]=>
+ string(3) "ttt"
+ ["o"]=>
+ string(6) "oraNGe"
+ ["l"]=>
+ string(5) "lemoN"
+ ["b"]=>
+ string(6) "banana"
+ ["a"]=>
+ string(5) "apple"
+ ["X"]=>
+ string(1) "X"
+ ["Te"]=>
+ string(4) "Test"
+ ["T"]=>
+ string(4) "TTTT"
+ ["O"]=>
+ string(6) "Orange"
+ ["B"]=>
+ string(6) "BANANA"
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(12) {
+ ["x"]=>
+ string(1) "x"
+ ["w"]=>
+ string(2) "ww"
+ ["t"]=>
+ string(3) "ttt"
+ ["o"]=>
+ string(6) "oraNGe"
+ ["l"]=>
+ string(5) "lemoN"
+ ["b"]=>
+ string(6) "banana"
+ ["a"]=>
+ string(5) "apple"
+ ["X"]=>
+ string(1) "X"
+ ["Te"]=>
+ string(4) "Test"
+ ["T"]=>
+ string(4) "TTTT"
+ ["O"]=>
+ string(6) "Orange"
+ ["B"]=>
+ string(6) "BANANA"
+}
+- Sort_flag = SORT_STRING -
+bool(true)
+array(12) {
+ ["x"]=>
+ string(1) "x"
+ ["w"]=>
+ string(2) "ww"
+ ["t"]=>
+ string(3) "ttt"
+ ["o"]=>
+ string(6) "oraNGe"
+ ["l"]=>
+ string(5) "lemoN"
+ ["b"]=>
+ string(6) "banana"
+ ["a"]=>
+ string(5) "apple"
+ ["X"]=>
+ string(1) "X"
+ ["Te"]=>
+ string(4) "Test"
+ ["T"]=>
+ string(4) "TTTT"
+ ["O"]=>
+ string(6) "Orange"
+ ["B"]=>
+ string(6) "BANANA"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation6.phpt b/ext/standard/tests/array/arsort_variation6.phpt
new file mode 100644
index 000000000..687b20a71
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation6.phpt
@@ -0,0 +1,114 @@
+--TEST--
+Test arsort() function : usage variations - sort hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool arsort ( array &$array [, int $asort_flags] )
+ * Description: Sort an array and maintain index association.
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing arsort() by providing different hexa-decimal array for $array argument with following flag values
+ * flag value as defualt
+ * SORT_REGULAR - compare items normally
+ * SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+// an array contains unsorted hexadecimal values
+// There are multiple keys which are duplicate and the later should be picked
+$unsorted_hex_array = array ( 0x1AB => 0x1AB, 0xFFF => 0xFFF, 0xF => 0xF, 0xFF => 0xFF, 0x2AA => 0x2AA, 0xBB => 0xBB,
+ 0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
+ );
+
+echo "\n-- Testing arsort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(arsort($temp_array) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing arsort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(arsort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing arsort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(arsort($temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying hexadecimal value array, 'flag' value is defualt --
+bool(true)
+array(9) {
+ [4095]=>
+ int(4095)
+ [682]=>
+ int(682)
+ [427]=>
+ int(427)
+ [255]=>
+ int(255)
+ [187]=>
+ int(187)
+ [15]=>
+ int(15)
+ [0]=>
+ int(0)
+ [-255]=>
+ int(-255)
+ [-682]=>
+ int(-682)
+}
+
+-- Testing arsort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(9) {
+ [4095]=>
+ int(4095)
+ [682]=>
+ int(682)
+ [427]=>
+ int(427)
+ [255]=>
+ int(255)
+ [187]=>
+ int(187)
+ [15]=>
+ int(15)
+ [0]=>
+ int(0)
+ [-255]=>
+ int(-255)
+ [-682]=>
+ int(-682)
+}
+
+-- Testing arsort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(9) {
+ [4095]=>
+ int(4095)
+ [682]=>
+ int(682)
+ [427]=>
+ int(427)
+ [255]=>
+ int(255)
+ [187]=>
+ int(187)
+ [15]=>
+ int(15)
+ [0]=>
+ int(0)
+ [-255]=>
+ int(-255)
+ [-682]=>
+ int(-682)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation7.phpt b/ext/standard/tests/array/arsort_variation7.phpt
new file mode 100644
index 000000000..97195b709
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation7.phpt
@@ -0,0 +1,98 @@
+--TEST--
+Test arsort() function : usage variations - sort bool values
+--FILE--
+<?php
+/* Prototype : bool arsort ( array &$array [, int $sort_flags] )
+ * Description: This function arsorts an array.
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing arsort() by providing bool value array for $array argument with following flag values.
+ * flag value as defualt
+ * SORT_REGULAR - compare items normally
+*/
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+// bool value array
+$bool_values = array (1 => true, 2 => false, 3 => TRUE, 4 => FALSE);
+
+echo "\n-- Testing arsort() by supplying bool value array, 'flag' value is defualt --\n";
+$temp_array = $bool_values;
+var_dump(arsort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- Testing arsort() by supplying bool value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $bool_values;
+var_dump(arsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "\n-- Testing arsort() by supplying bool value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $bool_values;
+var_dump(arsort($temp_array, SORT_NUMERIC) );
+var_dump($temp_array);
+
+echo "\n-- Testing arsort() by supplying bool value array, 'flag' value is SORT_STRING --\n";
+$temp_array = $bool_values;
+var_dump(arsort($temp_array, SORT_STRING) );
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying bool value array, 'flag' value is defualt --
+bool(true)
+array(4) {
+ [3]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [4]=>
+ bool(false)
+ [2]=>
+ bool(false)
+}
+
+-- Testing arsort() by supplying bool value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(4) {
+ [3]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [4]=>
+ bool(false)
+ [2]=>
+ bool(false)
+}
+
+-- Testing arsort() by supplying bool value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(4) {
+ [3]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [4]=>
+ bool(false)
+ [2]=>
+ bool(false)
+}
+
+-- Testing arsort() by supplying bool value array, 'flag' value is SORT_STRING --
+bool(true)
+array(4) {
+ [3]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [4]=>
+ bool(false)
+ [2]=>
+ bool(false)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation8.phpt b/ext/standard/tests/array/arsort_variation8.phpt
new file mode 100644
index 000000000..c2473160c
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation8.phpt
@@ -0,0 +1,180 @@
+--TEST--
+Test arsort() function : usage variations - sort array with diff. sub arrays, 'sort_flags' as default/SORT_REGULAR
+--FILE--
+<?php
+/* Prototype : bool arsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array and maintain index association.
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing arsort() by providing arrays contains sub arrays for $array argument with flowing flag values
+ * flag value as default
+ * SORT_REGULAR - compare items normally
+ * Note: arrays are sorted based on total count of elements inside it, when all the elements are arrays
+*/
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+// array of arrays
+$various_arrays = array (
+ // null array
+ "array[0]" => array(),
+
+ // array contains null sub array
+ "array[1]" => array( "sub_array[1][0]" => array() ),
+
+ // array of arrays along with some values
+ "array[2]" => array("data[2,0]" => 44, "data[2,1]" => 11, "sub_array[2][0] " => array(64,61) ),
+
+ // array contains sub arrays
+ "array[3]" => array ( "sub_array[3][0]" => array(33,-5,6), "sub_array[3][1]" => array(11),
+ "sub_array[3][2]" => array(22,-55), "sub_array[3][3]" => array() )
+);
+
+
+$count = 1;
+echo "\n-- Testing arsort() by supplying various arrays containing sub arrays --\n";
+
+// loop through to test arsort() with different arrays
+foreach ($various_arrays as $array) {
+
+ echo "\n-- Iteration $count --\n";
+ // testing arsort() function by supplying different arrays, flag value is default
+ echo "- With default sort_flag -\n";
+ $temp_array = $array;
+ var_dump(arsort($temp_array) );
+ var_dump($temp_array);
+
+ // testing arsort() function by supplying different arrays, flag value = SORT_REGULAR
+ echo "- Sort_flag = SORT_REGULAR -\n";
+ $temp_array = $array;
+ var_dump(arsort($temp_array, SORT_REGULAR) );
+ var_dump($temp_array);
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying various arrays containing sub arrays --
+
+-- Iteration 1 --
+- With default sort_flag -
+bool(true)
+array(0) {
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(0) {
+}
+
+-- Iteration 2 --
+- With default sort_flag -
+bool(true)
+array(1) {
+ ["sub_array[1][0]"]=>
+ array(0) {
+ }
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(1) {
+ ["sub_array[1][0]"]=>
+ array(0) {
+ }
+}
+
+-- Iteration 3 --
+- With default sort_flag -
+bool(true)
+array(3) {
+ ["sub_array[2][0] "]=>
+ array(2) {
+ [0]=>
+ int(64)
+ [1]=>
+ int(61)
+ }
+ ["data[2,0]"]=>
+ int(44)
+ ["data[2,1]"]=>
+ int(11)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ ["sub_array[2][0] "]=>
+ array(2) {
+ [0]=>
+ int(64)
+ [1]=>
+ int(61)
+ }
+ ["data[2,0]"]=>
+ int(44)
+ ["data[2,1]"]=>
+ int(11)
+}
+
+-- Iteration 4 --
+- With default sort_flag -
+bool(true)
+array(4) {
+ ["sub_array[3][0]"]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+ ["sub_array[3][2]"]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ ["sub_array[3][1]"]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ ["sub_array[3][3]"]=>
+ array(0) {
+ }
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(4) {
+ ["sub_array[3][0]"]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+ ["sub_array[3][2]"]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ ["sub_array[3][1]"]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ ["sub_array[3][3]"]=>
+ array(0) {
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/arsort_variation9.phpt b/ext/standard/tests/array/arsort_variation9.phpt
new file mode 100644
index 000000000..a034db5d9
--- /dev/null
+++ b/ext/standard/tests/array/arsort_variation9.phpt
@@ -0,0 +1,258 @@
+--TEST--
+Test arsort() function : usage variations - sorting arrays with/without keys, 'sort_flags' as default/SORT_REGULAR
+--FILE--
+<?php
+/* Prototype : bool arsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array and maintain index association.
+ Elements will be arranged from highest to lowest when this function has completed.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing arsort() by providing arrays with key values for $array argument with following flag values.
+ * 1.flag value as default
+ * 2.SORT_REGULAR - compare items normally
+ */
+
+echo "*** Testing arsort() : usage variations ***\n";
+
+// list of arrays with/without key values
+$various_arrays = array (
+ array(5 => 55, 66, 22, 33, 11),
+ array ("a" => "orange", "banana", "c" => "apple"),
+ array(1, 2, 3, 4, 5, 6),
+ array("first", 5 => "second", "third"),
+ array(1, 1, 8 => 1, 4 => 1, 19, 3 => 13),
+ array('bar' => 'baz', "foo" => 1),
+ array('a'=>1,'b'=>array('e'=>2,'f'=>3),'c'=>array('g'=>4),'d'=>5),
+);
+
+$count = 1;
+echo "\n-- Testing arsort() by supplying various arrays with key values --\n";
+
+// loop through to test arsort() with different arrays,
+// to test the new keys for the elements in the sorted array
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With default sort_flag -\n";
+ $temp_array = $array;
+ var_dump(arsort($temp_array) );
+ var_dump($temp_array);
+
+ echo "- Sort_flag = SORT_REGULAR -\n";
+ $temp_array = $array;
+ var_dump(arsort($temp_array, SORT_REGULAR) );
+ var_dump($temp_array);
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing arsort() : usage variations ***
+
+-- Testing arsort() by supplying various arrays with key values --
+
+-- Iteration 1 --
+- With default sort_flag -
+bool(true)
+array(5) {
+ [6]=>
+ int(66)
+ [5]=>
+ int(55)
+ [8]=>
+ int(33)
+ [7]=>
+ int(22)
+ [9]=>
+ int(11)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(5) {
+ [6]=>
+ int(66)
+ [5]=>
+ int(55)
+ [8]=>
+ int(33)
+ [7]=>
+ int(22)
+ [9]=>
+ int(11)
+}
+
+-- Iteration 2 --
+- With default sort_flag -
+bool(true)
+array(3) {
+ ["a"]=>
+ string(6) "orange"
+ [0]=>
+ string(6) "banana"
+ ["c"]=>
+ string(5) "apple"
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ ["a"]=>
+ string(6) "orange"
+ [0]=>
+ string(6) "banana"
+ ["c"]=>
+ string(5) "apple"
+}
+
+-- Iteration 3 --
+- With default sort_flag -
+bool(true)
+array(6) {
+ [5]=>
+ int(6)
+ [4]=>
+ int(5)
+ [3]=>
+ int(4)
+ [2]=>
+ int(3)
+ [1]=>
+ int(2)
+ [0]=>
+ int(1)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(6) {
+ [5]=>
+ int(6)
+ [4]=>
+ int(5)
+ [3]=>
+ int(4)
+ [2]=>
+ int(3)
+ [1]=>
+ int(2)
+ [0]=>
+ int(1)
+}
+
+-- Iteration 4 --
+- With default sort_flag -
+bool(true)
+array(3) {
+ [6]=>
+ string(5) "third"
+ [5]=>
+ string(6) "second"
+ [0]=>
+ string(5) "first"
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ [6]=>
+ string(5) "third"
+ [5]=>
+ string(6) "second"
+ [0]=>
+ string(5) "first"
+}
+
+-- Iteration 5 --
+- With default sort_flag -
+bool(true)
+array(6) {
+ [9]=>
+ int(19)
+ [3]=>
+ int(13)
+ [4]=>
+ int(1)
+ [8]=>
+ int(1)
+ [1]=>
+ int(1)
+ [0]=>
+ int(1)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(6) {
+ [9]=>
+ int(19)
+ [3]=>
+ int(13)
+ [4]=>
+ int(1)
+ [8]=>
+ int(1)
+ [1]=>
+ int(1)
+ [0]=>
+ int(1)
+}
+
+-- Iteration 6 --
+- With default sort_flag -
+bool(true)
+array(2) {
+ ["foo"]=>
+ int(1)
+ ["bar"]=>
+ string(3) "baz"
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(2) {
+ ["foo"]=>
+ int(1)
+ ["bar"]=>
+ string(3) "baz"
+}
+
+-- Iteration 7 --
+- With default sort_flag -
+bool(true)
+array(4) {
+ ["b"]=>
+ array(2) {
+ ["e"]=>
+ int(2)
+ ["f"]=>
+ int(3)
+ }
+ ["c"]=>
+ array(1) {
+ ["g"]=>
+ int(4)
+ }
+ ["d"]=>
+ int(5)
+ ["a"]=>
+ int(1)
+}
+- Sort_flag = SORT_REGULAR -
+bool(true)
+array(4) {
+ ["b"]=>
+ array(2) {
+ ["e"]=>
+ int(2)
+ ["f"]=>
+ int(3)
+ }
+ ["c"]=>
+ array(1) {
+ ["g"]=>
+ int(4)
+ }
+ ["d"]=>
+ int(5)
+ ["a"]=>
+ int(1)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/bug26458.phpt b/ext/standard/tests/array/bug26458.phpt
index d24e1f151..ecd12ba84 100644
--- a/ext/standard/tests/array/bug26458.phpt
+++ b/ext/standard/tests/array/bug26458.phpt
Binary files differ
diff --git a/ext/standard/tests/array/bug42177.phpt b/ext/standard/tests/array/bug42177.phpt
new file mode 100644
index 000000000..63a9b71d9
--- /dev/null
+++ b/ext/standard/tests/array/bug42177.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Bug #42177 (Warning "array_merge_recursive(): recursion detected" comes again...)
+--FILE--
+<?php
+
+$a1 = array( 'key1' => 1, 'key3' => 2 );
+$a2 = array();
+$a1 = array_merge_recursive( $a1, $a2 );
+$a1 = array_merge_recursive( $a1, $a2 );
+unset( $a1, $a2 );
+
+$a1 = array();
+$a2 = array( 'key1' => 1, 'key3' => 2 );
+$a1 = array_merge_recursive( $a1, $a2 );
+$a1 = array_merge_recursive( $a1, $a2 );
+unset( $a1, $a2 );
+
+$a1 = array();
+$a2 = array( 'key1' => &$a1 );
+$a1 = array_merge_recursive( $a1, $a2 );
+$a1 = array_merge_recursive( $a1, $a2 );
+$a1['key1'] = null;
+unset( $a1, $a2 );
+
+$x = 'foo';
+$y =& $x;
+$a1 = array($x, $y, $x, $y);
+$a2 = array( 'key1' => $a1, $x, $y );
+$a1 = array_merge_recursive( $a1, $a2 );
+$a1 = array_merge_recursive( $a1, $a2 );
+unset( $a1, $a2 );
+
+?>
+--EXPECTF--
+Warning: array_merge_recursive(): recursion detected in %s on line 18
diff --git a/ext/standard/tests/array/bug42838.phpt b/ext/standard/tests/array/bug42838.phpt
new file mode 100644
index 000000000..1f895f31e
--- /dev/null
+++ b/ext/standard/tests/array/bug42838.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug#42838 - Wrong results in array_diff_uassoc
+--FILE--
+<?php
+
+function key_compare_func($a, $b)
+{
+ if ($a === $b) {
+ return 0;
+ }
+ return ($a > $b)? 1:-1;
+}
+
+$array1 = array("a" => "green", "b" => "Brown", 'c' => 'blue', 0 => 'red');
+$array2 = array("a" => "green", "b" => "Brown", 'c' => 'blue', 0 => 'red');
+
+$result = array_diff_uassoc($array1, $array2, "key_compare_func");
+print_r($result);
+
+?>
+--EXPECT--
+Array
+(
+) \ No newline at end of file
diff --git a/ext/standard/tests/array/bug42850.phpt b/ext/standard/tests/array/bug42850.phpt
new file mode 100644
index 000000000..737cd170d
--- /dev/null
+++ b/ext/standard/tests/array/bug42850.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Bug #42850 array_walk_recursive() leaves references, #34982 array_walk_recursive() modifies elements outside function scope
+--FILE--
+<?php
+
+// Bug #42850
+$data = array ('key1' => 'val1', array('key2' => 'val2'));
+function apply_dumb($item, $key) {};
+var_dump($data);
+array_walk_recursive($data, 'apply_dumb');
+$data2 = $data;
+$data2[0] = 'altered';
+var_dump($data);
+var_dump($data2);
+
+// Bug #34982
+function myfunc($data) {
+ array_walk_recursive($data, 'apply_changed');
+}
+function apply_changed(&$input, $key) {
+ $input = 'changed';
+}
+myfunc($data);
+var_dump($data);
+
+--EXPECT--
+array(2) {
+ ["key1"]=>
+ string(4) "val1"
+ [0]=>
+ array(1) {
+ ["key2"]=>
+ string(4) "val2"
+ }
+}
+array(2) {
+ ["key1"]=>
+ string(4) "val1"
+ [0]=>
+ array(1) {
+ ["key2"]=>
+ string(4) "val2"
+ }
+}
+array(2) {
+ ["key1"]=>
+ string(4) "val1"
+ [0]=>
+ string(7) "altered"
+}
+array(2) {
+ ["key1"]=>
+ string(4) "val1"
+ [0]=>
+ array(1) {
+ ["key2"]=>
+ string(4) "val2"
+ }
+}
diff --git a/ext/standard/tests/array/bug43495.phpt b/ext/standard/tests/array/bug43495.phpt
new file mode 100644
index 000000000..cd0fab141
--- /dev/null
+++ b/ext/standard/tests/array/bug43495.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #43495 (array_merge_recursive() crashes with recursive arrays)
+--FILE--
+<?php
+$a=array("key1"=>array("key2"=>array()));
+$a["key1"]["key2"]["key3"]=&$a;
+
+$b=array("key1"=>array("key2"=>array()));
+$b["key1"]["key2"]["key3"]=&$b;
+
+array_merge_recursive($a,$b);
+
+/* Break recursion */
+$a["key1"]["key2"]["key3"] = null;
+$b["key1"]["key2"]["key3"] = null;
+
+echo "Done.\n";
+?>
+--EXPECTF--
+Warning: array_merge_recursive(): recursion detected in %s/bug43495.php on line %d
+Done.
diff --git a/ext/standard/tests/array/bug43505.phpt b/ext/standard/tests/array/bug43505.phpt
new file mode 100644
index 000000000..219bbfe29
--- /dev/null
+++ b/ext/standard/tests/array/bug43505.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #43505 (Assign by reference bug)
+--INI--
+error_reporting=0
+--SKIPIF--
+<?php if (!extension_loaded('spl')) die("skip SPL is not available"); ?>
+--FILE--
+<?php
+class Test implements Countable {
+ public function count() {
+ return $some;
+ }
+}
+
+$obj = new Test();
+
+$a = array();
+$b =& $a['test'];
+var_dump($a);
+
+$t = count($obj);
+
+$a = array();
+$b =& $a['test'];
+var_dump($a);
+?>
+--EXPECT--
+array(1) {
+ ["test"]=>
+ &NULL
+}
+array(1) {
+ ["test"]=>
+ &NULL
+}
+
diff --git a/ext/standard/tests/array/compact_basic.phpt b/ext/standard/tests/array/compact_basic.phpt
new file mode 100644
index 000000000..53a946e12
--- /dev/null
+++ b/ext/standard/tests/array/compact_basic.phpt
@@ -0,0 +1,85 @@
+--TEST--
+Test compact() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto array compact(mixed var_names [, mixed ...])
+ * Description: Creates a hash containing variables and their values
+ * Source code: ext/standard/array.c
+ * Alias to functions:
+ */
+
+/*
+ * Test basic functionality
+ */
+
+echo "*** Testing compact() : basic functionality ***\n";
+
+$a=1;
+$b=0.2;
+$c=true;
+$d=array("key"=>"val");
+$e=NULL;
+$f="string";
+
+// simple array test
+var_dump (compact(array("a", "b", "c", "d", "e", "f")));
+// simple parameter test
+var_dump (compact("a", "b", "c", "d", "e", "f"));
+var_dump (compact(array("keyval"=>"a", "b"=>"b", "c"=>1)));
+
+// cases which should not yield any output.
+var_dump (compact(array(10, 0.3, true, array(20), NULL)));
+var_dump (compact(10, 0.3, true, array(20), NULL));
+var_dump (compact(array("g")));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing compact() : basic functionality ***
+array(6) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ float(0.2)
+ ["c"]=>
+ bool(true)
+ ["d"]=>
+ array(1) {
+ ["key"]=>
+ string(3) "val"
+ }
+ ["e"]=>
+ NULL
+ ["f"]=>
+ string(6) "string"
+}
+array(6) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ float(0.2)
+ ["c"]=>
+ bool(true)
+ ["d"]=>
+ array(1) {
+ ["key"]=>
+ string(3) "val"
+ }
+ ["e"]=>
+ NULL
+ ["f"]=>
+ string(6) "string"
+}
+array(2) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ float(0.2)
+}
+array(0) {
+}
+array(0) {
+}
+array(0) {
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/compact_error.phpt b/ext/standard/tests/array/compact_error.phpt
new file mode 100644
index 000000000..d3d6e2cbb
--- /dev/null
+++ b/ext/standard/tests/array/compact_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test compact() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto array compact(mixed var_names [, mixed ...])
+ * Description: Creates a hash containing variables and their values
+ * Source code: ext/standard/array.c
+ * Alias to functions:
+ */
+
+/*
+ * Error -tests test compact with zero arguments.
+ */
+
+echo "*** Testing compact() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing compact() function with Zero arguments --\n";
+var_dump( compact() );
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing compact() : error conditions ***
+
+-- Testing compact() function with Zero arguments --
+
+Warning: Wrong parameter count for compact() in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/count_basic.phpt b/ext/standard/tests/array/count_basic.phpt
new file mode 100644
index 000000000..45f63d6a4
--- /dev/null
+++ b/ext/standard/tests/array/count_basic.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test count() function : basic functionality
+--FILE--
+<?php
+/* Prototype : int count(mixed $var [, int $mode])
+ * Description: Count the number of elements in a variable (usually an array)
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of count() using an array as $var argument
+ * and different values as $mode argument.
+ */
+
+echo "*** Testing count() : basic functionality ***\n";
+
+echo "\n-- One Dimensional Array: --\n";
+$array = array('zero', 'one', 'two');
+var_dump(count($array));
+
+echo "\n-- Two Dimensional Array: --\n";
+$array_multi = array('zero', array(1, 2, 3), 'two');
+echo "\$mode = COUNT_NORMAL: ";
+var_dump(count($array_multi, COUNT_NORMAL));
+echo "\$mode = 0: ";
+var_dump(count($array_multi, 0));
+echo "\$mode = COUNT_RECURSIVE: ";
+var_dump(count($array_multi, COUNT_RECURSIVE));
+echo "\$mode = 1: ";
+var_dump(count($array_multi, 1));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing count() : basic functionality ***
+
+-- One Dimensional Array: --
+int(3)
+
+-- Two Dimensional Array: --
+$mode = COUNT_NORMAL: int(3)
+$mode = 0: int(3)
+$mode = COUNT_RECURSIVE: int(6)
+$mode = 1: int(6)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/count_error.phpt b/ext/standard/tests/array/count_error.phpt
new file mode 100644
index 000000000..76f721364
--- /dev/null
+++ b/ext/standard/tests/array/count_error.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test count() function : error conditions - pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : int count(mixed var [, int mode])
+ * Description: Count the number of elements in a variable (usually an array)
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to count() to test behaviour
+ */
+
+echo "*** Testing count() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing count() function with Zero arguments --\n";
+var_dump( count() );
+
+//Test count with one more than the expected number of arguments
+echo "\n-- Testing count() function with more than expected no. of arguments --\n";
+$var = 1;
+$mode = 10;
+$extra_arg = 10;
+var_dump( count($var, $mode, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing count() : error conditions ***
+
+-- Testing count() function with Zero arguments --
+
+Warning: count() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing count() function with more than expected no. of arguments --
+
+Warning: count() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/count_variation1.phpt b/ext/standard/tests/array/count_variation1.phpt
new file mode 100644
index 000000000..b40a2ab29
--- /dev/null
+++ b/ext/standard/tests/array/count_variation1.phpt
@@ -0,0 +1,170 @@
+--TEST--
+Test count() function : usage variations - Pass different data types as $var arg
+--FILE--
+<?php
+/* Prototype : int count(mixed $var [, int $mode])
+ * Description: Count the number of elements in a variable (usually an array)
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * aPass different data types as $var argument to count() to test behaviour
+ */
+
+echo "*** Testing count() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $var argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of count()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( count($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing count() : usage variations ***
+
+-- Iteration 1 --
+int(1)
+
+-- Iteration 2 --
+int(1)
+
+-- Iteration 3 --
+int(1)
+
+-- Iteration 4 --
+int(1)
+
+-- Iteration 5 --
+int(1)
+
+-- Iteration 6 --
+int(1)
+
+-- Iteration 7 --
+int(1)
+
+-- Iteration 8 --
+int(1)
+
+-- Iteration 9 --
+int(1)
+
+-- Iteration 10 --
+int(0)
+
+-- Iteration 11 --
+int(0)
+
+-- Iteration 12 --
+int(1)
+
+-- Iteration 13 --
+int(1)
+
+-- Iteration 14 --
+int(1)
+
+-- Iteration 15 --
+int(1)
+
+-- Iteration 16 --
+int(1)
+
+-- Iteration 17 --
+int(1)
+
+-- Iteration 18 --
+int(1)
+
+-- Iteration 19 --
+int(1)
+
+-- Iteration 20 --
+int(1)
+
+-- Iteration 21 --
+int(1)
+
+-- Iteration 22 --
+int(0)
+
+-- Iteration 23 --
+int(0)
+
+-- Iteration 24 --
+int(1)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/count_variation2.phpt b/ext/standard/tests/array/count_variation2.phpt
new file mode 100644
index 000000000..86aecc07b
--- /dev/null
+++ b/ext/standard/tests/array/count_variation2.phpt
@@ -0,0 +1,187 @@
+--TEST--
+Test count() function : usage variations - Pass different data types as $mode arg
+--FILE--
+<?php
+/* Prototype : int count(mixed $var [, int $mode])
+ * Description: Count the number of elements in a variable (usually an array)
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $mode argument to count() to test behaviour
+ */
+
+echo "*** Testing count() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$var = array(1, 2, array ('one', 'two'));
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $mode argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of count()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( count($var, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing count() : usage variations ***
+
+-- Iteration 1 --
+int(3)
+
+-- Iteration 2 --
+int(5)
+
+-- Iteration 3 --
+int(3)
+
+-- Iteration 4 --
+int(3)
+
+-- Iteration 5 --
+int(3)
+
+-- Iteration 6 --
+int(3)
+
+-- Iteration 7 --
+int(3)
+
+-- Iteration 8 --
+int(3)
+
+-- Iteration 9 --
+int(3)
+
+-- Iteration 10 --
+int(3)
+
+-- Iteration 11 --
+int(3)
+
+-- Iteration 12 --
+int(5)
+
+-- Iteration 13 --
+int(3)
+
+-- Iteration 14 --
+int(5)
+
+-- Iteration 15 --
+int(3)
+
+-- Iteration 16 --
+
+Warning: count() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: count() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: count() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: count() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: count() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: count() expects parameter 2 to be long, object given in %s on line %d
+NULL
+
+-- Iteration 22 --
+int(3)
+
+-- Iteration 23 --
+int(3)
+
+-- Iteration 24 --
+
+Warning: count() expects parameter 2 to be long, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/count_variation3.phpt b/ext/standard/tests/array/count_variation3.phpt
new file mode 100644
index 000000000..7ec5667d3
--- /dev/null
+++ b/ext/standard/tests/array/count_variation3.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test count() function : usage variations - Infinitely recursive array
+--FILE--
+<?php
+/* Prototype : int count(mixed $var [, int $mode])
+ * Description: Count the number of elements in a variable (usually an array)
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass count() an infinitely recursive array as $var argument
+ * This will stop the script before it reaches the end.
+ */
+
+echo "*** Testing count() : usage variations ***\n";
+
+$array1 = array (1, 2, 'three');
+// get an infinitely recursive array
+$array1[] = &$array1;
+
+echo "\n-- \$mode not set: --\n";
+var_dump(count ($array1));
+
+echo "\n-- \$mode = 1: --\n";
+var_dump(count ($array1, 1));
+
+$array1[3] = null;
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing count() : usage variations ***
+
+-- $mode not set: --
+int(4)
+
+-- $mode = 1: --
+
+Warning: count(): recursion detected in %s on line %d
+int(12)
+Done
diff --git a/ext/standard/tests/array/current_basic.phpt b/ext/standard/tests/array/current_basic.phpt
new file mode 100644
index 000000000..cec695977
--- /dev/null
+++ b/ext/standard/tests/array/current_basic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Test current() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed current(array $array_arg)
+ * Description: Return the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of current()
+ */
+
+echo "*** Testing current() : basic functionality ***\n";
+
+$array = array ('zero', 'one', 'two', 'three' => 3);
+var_dump(current($array));
+next($array);
+var_dump(current($array));
+end($array);
+var_dump(current($array));
+next($array);
+var_dump(current($array));
+?>
+===DONE===
+--EXPECTF--
+*** Testing current() : basic functionality ***
+string(4) "zero"
+string(3) "one"
+int(3)
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/current_error.phpt b/ext/standard/tests/array/current_error.phpt
new file mode 100644
index 000000000..40362e779
--- /dev/null
+++ b/ext/standard/tests/array/current_error.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test current() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : mixed current(array $array_arg)
+ * Description: Return the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ * Alias to functions: pos
+ */
+
+/*
+ * Pass incorrect number of arguments to current() to test behaviour
+ */
+
+echo "*** Testing current() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing current() function with Zero arguments --\n";
+var_dump( current() );
+
+//Test current with one more than the expected number of arguments
+echo "\n-- Testing current() function with more than expected no. of arguments --\n";
+$array_arg = array(1, 2);
+$extra_arg = 10;
+var_dump( current($array_arg, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing current() : error conditions ***
+
+-- Testing current() function with Zero arguments --
+
+Warning: Wrong parameter count for current() in %s on line %d
+NULL
+
+-- Testing current() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for current() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/array/current_variation1.phpt b/ext/standard/tests/array/current_variation1.phpt
new file mode 100644
index 000000000..cb21df27a
--- /dev/null
+++ b/ext/standard/tests/array/current_variation1.phpt
@@ -0,0 +1,217 @@
+--TEST--
+Test current() function : usage variations - Pass different data types as $array_arg arg
+--FILE--
+<?php
+/* Prototype : mixed current(array $array_arg)
+ * Description: Return the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ * Alias to functions: pos
+ */
+
+/*
+ * Pass different data types as $array_arg argument to current() to test behaviour
+ */
+
+echo "*** Testing current() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ var $var1;
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of current()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( current($input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--EXPECTF--
+*** Testing current() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+NULL
+
+-- Iteration 22 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: current(): Passed variable is not an array or object in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/current_variation2.phpt b/ext/standard/tests/array/current_variation2.phpt
new file mode 100644
index 000000000..49769cea3
--- /dev/null
+++ b/ext/standard/tests/array/current_variation2.phpt
@@ -0,0 +1,155 @@
+--TEST--
+Test current() function : usage variations - arrays containing different data types
+--FILE--
+<?php
+/* Prototype : mixed current(array $array_arg)
+ * Description: Return the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ * Alias to functions: pos
+ */
+
+/*
+ * Pass arrays of different data types as $array_arg to current() to test behaviour
+ */
+
+echo "*** Testing current() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// arrays of different data types to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0,
+ 1,
+ 12345,
+ -2345,
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+ ),
+
+ // null data
+/*3*/ 'null' => array(
+ NULL,
+ null,
+ ),
+
+ // boolean data
+/*4*/ 'bool' => array(
+ true,
+ false,
+ TRUE,
+ FALSE,
+ ),
+
+ // empty data
+/*5*/ 'empty string' => array(
+ "",
+ '',
+ ),
+
+/*6*/ 'empty array' => array(
+ ),
+
+ // string data
+/*7*/ 'string' => array(
+ "string",
+ 'string',
+ $heredoc,
+ ),
+
+ // object data
+/*8*/ 'object' => array(
+ new classA(),
+ ),
+
+ // undefined data
+/*9*/ 'undefined' => array(
+ @$undefined_var,
+ ),
+
+ // unset data
+/*10*/ 'unset' => array(
+ @$unset_var,
+ ),
+
+ // resource variable
+/*11*/ 'resource' => array(
+ $fp
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of current()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator : $key data --\n";
+ var_dump( current($input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--EXPECTF--
+*** Testing current() : usage variations ***
+
+-- Iteration 1 : int data --
+int(0)
+
+-- Iteration 2 : float data --
+float(10.5)
+
+-- Iteration 3 : null data --
+NULL
+
+-- Iteration 4 : bool data --
+bool(true)
+
+-- Iteration 5 : empty string data --
+string(0) ""
+
+-- Iteration 6 : empty array data --
+bool(false)
+
+-- Iteration 7 : string data --
+string(6) "string"
+
+-- Iteration 8 : object data --
+object(classA)#%d (0) {
+}
+
+-- Iteration 9 : undefined data --
+NULL
+
+-- Iteration 10 : unset data --
+NULL
+
+-- Iteration 11 : resource data --
+resource(%d) of type (stream)
+===DONE===
diff --git a/ext/standard/tests/array/current_variation3.phpt b/ext/standard/tests/array/current_variation3.phpt
new file mode 100644
index 000000000..bab5e6e0c
--- /dev/null
+++ b/ext/standard/tests/array/current_variation3.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test current() function : usage variations - referenced variables
+--FILE--
+<?php
+/* Prototype : mixed current(array $array_arg)
+ * Description: Return the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ * Alias to functions: pos
+ */
+
+/*
+ * Test how the internal pointer is affected when two variables are referenced to each other
+ */
+
+echo "*** Testing current() : usage variations ***\n";
+
+$array1 = array ('zero', 'one', 'two');
+
+echo "\n-- Initial position of internal pointer --\n";
+var_dump(current($array1));
+next($array1);
+
+// Test that when two variables are referenced to one another
+// the internal pointer is the same for both
+$array2 = &$array1;
+echo "\n-- Position after calling next() --\n";
+echo "\$array1: ";
+var_dump(current($array1));
+echo "\$array2: ";
+var_dump(current($array2));
+?>
+===DONE===
+--EXPECTF--
+*** Testing current() : usage variations ***
+
+-- Initial position of internal pointer --
+string(4) "zero"
+
+-- Position after calling next() --
+$array1: string(3) "one"
+$array2: string(3) "one"
+===DONE===
diff --git a/ext/standard/tests/array/current_variation4.phpt b/ext/standard/tests/array/current_variation4.phpt
new file mode 100644
index 000000000..19864f584
--- /dev/null
+++ b/ext/standard/tests/array/current_variation4.phpt
@@ -0,0 +1,72 @@
+--TEST--
+Test current() function : usage variations - multi-dimensional arrays
+--FILE--
+<?php
+/* Prototype : mixed current(array $array_arg)
+ * Description: Return the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ * Alias to functions: pos
+ */
+
+/*
+ * Test how current() behaves with muti-dimensional and recursive arrays
+ */
+
+echo "*** Testing current() : usage variations ***\n";
+
+echo "\n-- Two Dimensional Array --\n";
+$multi_array = array ('zero', array (1, 2, 3), 'two');
+echo "Initial Position: ";
+var_dump(current($multi_array));
+
+echo "Next Position: ";
+next($multi_array);
+var_dump(current($multi_array));
+
+echo "End Position: ";
+end($multi_array);
+var_dump(current($multi_array));
+
+echo "\n-- Access an Array Within an Array --\n";
+//accessing an array within an array
+echo "Initial Position: ";
+var_dump(current($multi_array[1]));
+
+echo "\n-- Recursive, Multidimensional Array --\n";
+//create a recursive array
+$multi_array[] = &$multi_array;
+
+//See where internal pointer is after adding more elements
+echo "Current Position: ";
+var_dump(current($multi_array));
+
+//see if internal pointer is in same position as referenced array
+var_dump(current($multi_array[3][3][3]));
+// see if internal pointer is in the same position from when accessing this inner array
+var_dump(current($multi_array[3][3][3][1]));
+$multi_array[3] = null;
+?>
+===DONE===
+--EXPECTF--
+*** Testing current() : usage variations ***
+
+-- Two Dimensional Array --
+Initial Position: string(4) "zero"
+Next Position: array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+End Position: string(3) "two"
+
+-- Access an Array Within an Array --
+Initial Position: int(1)
+
+-- Recursive, Multidimensional Array --
+Current Position: string(3) "two"
+string(3) "two"
+int(1)
+===DONE===
diff --git a/ext/standard/tests/array/each_basic.phpt b/ext/standard/tests/array/each_basic.phpt
new file mode 100644
index 000000000..350b40f9a
--- /dev/null
+++ b/ext/standard/tests/array/each_basic.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Test each() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array each(array $arr)
+ * Description: Return the currently pointed key..value pair in the passed array,
+ * and advance the pointer to the next element
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+/*
+ * Test basic functionality of each()
+ */
+
+echo "*** Testing each() : basic functionality ***\n";
+
+$arr = array ('one' => 1, 'zero', 'two' => 'deux', 20 => 'twenty');
+echo "\n-- Passed array: --\n";
+var_dump($arr);
+
+echo "\n-- Initial position: --\n";
+var_dump(each($arr));
+
+echo "\n-- End position: --\n";
+end($arr);
+var_dump(each($arr));
+
+echo "\n-- Passed the end of array: --\n";
+var_dump(each($arr));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing each() : basic functionality ***
+
+-- Passed array: --
+array(4) {
+ ["one"]=>
+ int(1)
+ [0]=>
+ string(4) "zero"
+ ["two"]=>
+ string(4) "deux"
+ [20]=>
+ string(6) "twenty"
+}
+
+-- Initial position: --
+array(4) {
+ [1]=>
+ int(1)
+ ["value"]=>
+ int(1)
+ [0]=>
+ string(3) "one"
+ ["key"]=>
+ string(3) "one"
+}
+
+-- End position: --
+array(4) {
+ [1]=>
+ string(6) "twenty"
+ ["value"]=>
+ string(6) "twenty"
+ [0]=>
+ int(20)
+ ["key"]=>
+ int(20)
+}
+
+-- Passed the end of array: --
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/each_error.phpt b/ext/standard/tests/array/each_error.phpt
new file mode 100644
index 000000000..02c8ef9c0
--- /dev/null
+++ b/ext/standard/tests/array/each_error.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test each() function : error conditions - pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : array each(array $arr)
+ * Description: Return the currently pointed key..value pair in the passed array,
+ * and advance the pointer to the next element
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+/*
+ * Pass an incorrect number of arguments to each() to test behaviour
+ */
+
+echo "*** Testing each() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing each() function with Zero arguments --\n";
+var_dump( each() );
+
+//Test each with one more than the expected number of arguments
+echo "\n-- Testing each() function with more than expected no. of arguments --\n";
+$arr = array(1, 2);
+$extra_arg = 10;
+var_dump( each($arr, $extra_arg) );
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing each() : error conditions ***
+
+-- Testing each() function with Zero arguments --
+
+Warning: Wrong parameter count for each() in %s on line %d
+NULL
+
+-- Testing each() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for each() in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/each_variation1.phpt b/ext/standard/tests/array/each_variation1.phpt
new file mode 100644
index 000000000..0afef3143
--- /dev/null
+++ b/ext/standard/tests/array/each_variation1.phpt
@@ -0,0 +1,222 @@
+--TEST--
+Test each() function : usage variations - Pass different data types as $arr arg
+--FILE--
+<?php
+/* Prototype : array each(array $arr)
+ * Description: Return the currently pointed key..value pair in the passed array,
+ * and advance the pointer to the next element
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+/*
+ * Pass different data types as $arr arg to each() to test behaviour
+ */
+
+echo "*** Testing each() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $arr argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of each()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( each($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing each() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/each_variation2.phpt b/ext/standard/tests/array/each_variation2.phpt
new file mode 100644
index 000000000..3f7211c89
--- /dev/null
+++ b/ext/standard/tests/array/each_variation2.phpt
@@ -0,0 +1,248 @@
+--TEST--
+Test each() function : usage variations - arrays of different data types
+--FILE--
+<?php
+/* Prototype : array each(array $arr)
+ * Description: Return the currently pointed key..value pair in the passed array,
+ * and advance the pointer to the next element
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+/*
+ * Pass arrays of different data types as $arr argument to each() to test behaviour
+ */
+
+echo "*** Testing each() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// arrays of different data types to be passed as $arr
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0,
+ 1,
+ 12345,
+ -2345,
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+ ),
+
+ // null data
+/*3*/ 'null' => array(
+ NULL,
+ null,
+ ),
+
+ // boolean data
+/*4*/ 'bool' => array(
+ true,
+ false,
+ TRUE,
+ FALSE,
+ ),
+
+ // empty data
+/*5*/ 'empty string' => array(
+ "",
+ '',
+ ),
+
+/*6*/ 'empty array' => array(
+ ),
+
+ // string data
+/*7*/ 'string' => array(
+ "string",
+ 'string',
+ $heredoc,
+ ),
+
+ // object data
+/*8*/ 'object' => array(
+ new classA(),
+ ),
+
+ // undefined data
+/*9*/ 'undefined' => array(
+ @$undefined_var,
+ ),
+
+ // unset data
+/*10*/ 'unset' => array(
+ @$unset_var,
+ ),
+
+ // resource variable
+/*11*/ 'resource' => array(
+ $fp
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of each()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator: $key data --\n";
+ var_dump( each($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing each() : usage variations ***
+
+-- Iteration 1: int data --
+array(4) {
+ [1]=>
+ int(0)
+ ["value"]=>
+ int(0)
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 2: float data --
+array(4) {
+ [1]=>
+ float(10.5)
+ ["value"]=>
+ float(10.5)
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 3: null data --
+array(4) {
+ [1]=>
+ NULL
+ ["value"]=>
+ NULL
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 4: bool data --
+array(4) {
+ [1]=>
+ bool(true)
+ ["value"]=>
+ bool(true)
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 5: empty string data --
+array(4) {
+ [1]=>
+ string(0) ""
+ ["value"]=>
+ string(0) ""
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 6: empty array data --
+bool(false)
+
+-- Iteration 7: string data --
+array(4) {
+ [1]=>
+ string(6) "string"
+ ["value"]=>
+ string(6) "string"
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 8: object data --
+array(4) {
+ [1]=>
+ object(classA)#%d (0) {
+ }
+ ["value"]=>
+ object(classA)#%d (0) {
+ }
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 9: undefined data --
+array(4) {
+ [1]=>
+ NULL
+ ["value"]=>
+ NULL
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 10: unset data --
+array(4) {
+ [1]=>
+ NULL
+ ["value"]=>
+ NULL
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 11: resource data --
+array(4) {
+ [1]=>
+ resource(%d) of type (stream)
+ ["value"]=>
+ resource(%d) of type (stream)
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/each_variation3.phpt b/ext/standard/tests/array/each_variation3.phpt
new file mode 100644
index 000000000..b31ddc61b
--- /dev/null
+++ b/ext/standard/tests/array/each_variation3.phpt
@@ -0,0 +1,253 @@
+--TEST--
+Test each() function : usage variations - keys of different data types
+--FILE--
+<?php
+/* Prototype : array each(array $arr)
+ * Description: Return the currently pointed key..value pair in the passed array,
+ * and advance the pointer to the next element
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+/*
+ * Pass each() arrays where the keys are different data types to test behaviour
+ */
+
+echo "*** Testing each() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed as $arr
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+/*3*/ 'extreme floats' => array(
+ 12.3456789000e6 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*4*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+
+/*5*/ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*6*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+
+/*7*/ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*8*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+
+/*9*/ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*10*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*11*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*12*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of each()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator: $key data --\n";
+ var_dump( each($input) );
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing each() : usage variations ***
+
+-- Iteration 1: int data --
+array(4) {
+ [1]=>
+ string(4) "zero"
+ ["value"]=>
+ string(4) "zero"
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- Iteration 2: float data --
+array(4) {
+ [1]=>
+ string(8) "positive"
+ ["value"]=>
+ string(8) "positive"
+ [0]=>
+ int(10)
+ ["key"]=>
+ int(10)
+}
+
+-- Iteration 3: extreme floats data --
+array(4) {
+ [1]=>
+ string(5) "large"
+ ["value"]=>
+ string(5) "large"
+ [0]=>
+ int(12345678)
+ ["key"]=>
+ int(12345678)
+}
+
+-- Iteration 4: null uppercase data --
+array(4) {
+ [1]=>
+ string(6) "null 1"
+ ["value"]=>
+ string(6) "null 1"
+ [0]=>
+ string(0) ""
+ ["key"]=>
+ string(0) ""
+}
+
+-- Iteration 5: null lowercase data --
+array(4) {
+ [1]=>
+ string(6) "null 2"
+ ["value"]=>
+ string(6) "null 2"
+ [0]=>
+ string(0) ""
+ ["key"]=>
+ string(0) ""
+}
+
+-- Iteration 6: bool lowercase data --
+array(4) {
+ [1]=>
+ string(6) "lowert"
+ ["value"]=>
+ string(6) "lowert"
+ [0]=>
+ int(1)
+ ["key"]=>
+ int(1)
+}
+
+-- Iteration 7: bool uppercase data --
+array(4) {
+ [1]=>
+ string(6) "uppert"
+ ["value"]=>
+ string(6) "uppert"
+ [0]=>
+ int(1)
+ ["key"]=>
+ int(1)
+}
+
+-- Iteration 8: empty double quotes data --
+array(4) {
+ [1]=>
+ string(6) "emptyd"
+ ["value"]=>
+ string(6) "emptyd"
+ [0]=>
+ string(0) ""
+ ["key"]=>
+ string(0) ""
+}
+
+-- Iteration 9: empty single quotes data --
+array(4) {
+ [1]=>
+ string(6) "emptys"
+ ["value"]=>
+ string(6) "emptys"
+ [0]=>
+ string(0) ""
+ ["key"]=>
+ string(0) ""
+}
+
+-- Iteration 10: string data --
+array(4) {
+ [1]=>
+ string(7) "stringd"
+ ["value"]=>
+ string(7) "stringd"
+ [0]=>
+ string(7) "stringd"
+ ["key"]=>
+ string(7) "stringd"
+}
+
+-- Iteration 11: undefined data --
+array(4) {
+ [1]=>
+ string(9) "undefined"
+ ["value"]=>
+ string(9) "undefined"
+ [0]=>
+ string(0) ""
+ ["key"]=>
+ string(0) ""
+}
+
+-- Iteration 12: unset data --
+array(4) {
+ [1]=>
+ string(5) "unset"
+ ["value"]=>
+ string(5) "unset"
+ [0]=>
+ string(0) ""
+ ["key"]=>
+ string(0) ""
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/each_variation4.phpt b/ext/standard/tests/array/each_variation4.phpt
new file mode 100644
index 000000000..6ac57a736
--- /dev/null
+++ b/ext/standard/tests/array/each_variation4.phpt
@@ -0,0 +1,90 @@
+--TEST--
+Test each() function : usage variations - Referenced variables
+--INI--
+allow_call_time_pass_reference=on
+--FILE--
+<?php
+/* Prototype : array each(array $arr)
+ * Description: Return the currently pointed key..value pair in the passed array,
+ * and advance the pointer to the next element
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+/*
+ * Test behaviour of each() when:
+ * 1. Passed an array made up of referenced variables
+ * 2. Passed an array as $arr argument by reference
+ */
+
+echo "*** Testing each() : usage variations ***\n";
+
+echo "\n-- Array made up of referenced variables: --\n";
+$val1 = 'foo';
+$val2 = 'bar';
+
+$arr1 = array('one' => &$val1, &$val2);
+
+echo "-- Call each until at the end of the array: --\n";
+var_dump( each($arr1) );
+var_dump( each($arr1) );
+var_dump( each($arr1) );
+
+
+echo "\n-- Pass an array by reference to each(): --\n";
+$arr2 = array('zero', 'one', 'two');
+
+var_dump( each(&$arr2) );
+echo "-- Check original array: --\n";
+var_dump($arr2);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing each() : usage variations ***
+
+-- Array made up of referenced variables: --
+-- Call each until at the end of the array: --
+array(4) {
+ [1]=>
+ string(3) "foo"
+ ["value"]=>
+ string(3) "foo"
+ [0]=>
+ string(3) "one"
+ ["key"]=>
+ string(3) "one"
+}
+array(4) {
+ [1]=>
+ string(3) "bar"
+ ["value"]=>
+ string(3) "bar"
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+bool(false)
+
+-- Pass an array by reference to each(): --
+array(4) {
+ [1]=>
+ string(4) "zero"
+ ["value"]=>
+ string(4) "zero"
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+-- Check original array: --
+array(3) {
+ [0]=>
+ string(4) "zero"
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+}
+Done
diff --git a/ext/standard/tests/array/each_variation5.phpt b/ext/standard/tests/array/each_variation5.phpt
new file mode 100644
index 000000000..941ad5e3a
--- /dev/null
+++ b/ext/standard/tests/array/each_variation5.phpt
@@ -0,0 +1,96 @@
+--TEST--
+Test each() function : usage variations - Multi-dimensional arrays
+--FILE--
+<?php
+/* Prototype : array each(array $arr)
+ * Description: Return the currently pointed key..value pair in the passed array,
+ * and advance the pointer to the next element
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+/*
+ * Test behaviour of each() when passed:
+ * 1. a two-dimensional array
+ * 2. a sub-array
+ */
+
+echo "*** Testing each() : usage variations ***\n";
+
+$arr = array ('zero',
+ array(1, 2, 3),
+ 'one' => 'un',
+ array('a', 'b', 'c')
+ );
+
+echo "\n-- Pass each() a two-dimensional array --\n";
+for ($i = 1; $i < count($arr); $i++) {
+ var_dump( each($arr) );
+}
+
+echo "\n-- Pass each() a sub-array --\n";
+var_dump( each($arr[2]));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing each() : usage variations ***
+
+-- Pass each() a two-dimensional array --
+array(4) {
+ [1]=>
+ string(4) "zero"
+ ["value"]=>
+ string(4) "zero"
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+array(4) {
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["value"]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [0]=>
+ int(1)
+ ["key"]=>
+ int(1)
+}
+array(4) {
+ [1]=>
+ string(2) "un"
+ ["value"]=>
+ string(2) "un"
+ [0]=>
+ string(3) "one"
+ ["key"]=>
+ string(3) "one"
+}
+
+-- Pass each() a sub-array --
+array(4) {
+ [1]=>
+ string(1) "a"
+ ["value"]=>
+ string(1) "a"
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/each_variation6.phpt b/ext/standard/tests/array/each_variation6.phpt
new file mode 100644
index 000000000..445d63f31
--- /dev/null
+++ b/ext/standard/tests/array/each_variation6.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test each() function : usage variations - Internal array pointer
+--FILE--
+<?php
+/* Prototype : array each(array $arr)
+ * Description: Return the currently pointed key..value pair in the passed array,
+ * and advance the pointer to the next element
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+/*
+ * Test the position of the internal array pointer after a call to each()
+ */
+
+echo "*** Testing each() : usage variations ***\n";
+
+$arr = array('zero', 'one', 'two', 'abc', 'xyz');
+
+echo "\n-- Current position: --\n";
+echo key($arr) . " => " . current($arr) . "\n";
+
+echo "\n-- Call to each(): --\n";
+var_dump( each($arr) );
+
+echo "\n-- New position: --\n";
+echo key($arr) . " => " . current($arr) . "\n";
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing each() : usage variations ***
+
+-- Current position: --
+0 => zero
+
+-- Call to each(): --
+array(4) {
+ [1]=>
+ string(4) "zero"
+ ["value"]=>
+ string(4) "zero"
+ [0]=>
+ int(0)
+ ["key"]=>
+ int(0)
+}
+
+-- New position: --
+1 => one
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/end_basic.phpt b/ext/standard/tests/array/end_basic.phpt
new file mode 100644
index 000000000..5a6606d38
--- /dev/null
+++ b/ext/standard/tests/array/end_basic.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test end() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed end(array $array_arg)
+ * Description: Advances array argument's internal pointer to the last element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of end()
+ */
+
+echo "*** Testing end() : basic functionality ***\n";
+
+$array = array('zero', 'one', 200 => 'two');
+
+echo "\n-- Initial Position: --\n";
+echo key($array) . " => " . current($array) . "\n";
+
+echo "\n-- Call to end() --\n";
+var_dump(end($array));
+
+echo "\n-- Current Position: --\n";
+echo key($array) . " => " . current($array) . "\n";
+
+echo "\n-- Add a new element to array --\n";
+$array[2] = 'foo';
+var_dump(end($array));
+?>
+===DONE===
+--EXPECTF--
+*** Testing end() : basic functionality ***
+
+-- Initial Position: --
+0 => zero
+
+-- Call to end() --
+string(3) "two"
+
+-- Current Position: --
+200 => two
+
+-- Add a new element to array --
+string(3) "foo"
+===DONE===
diff --git a/ext/standard/tests/array/end_error.phpt b/ext/standard/tests/array/end_error.phpt
new file mode 100644
index 000000000..1efc5ac54
--- /dev/null
+++ b/ext/standard/tests/array/end_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test end() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : mixed end(array $array_arg)
+ * Description: Advances array argument's internal pointer to the last element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to end() to test behaviour
+ */
+
+echo "*** Testing end() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing end() function with Zero arguments --\n";
+var_dump( end() );
+
+//Test end with one more than the expected number of arguments
+echo "\n-- Testing end() function with more than expected no. of arguments --\n";
+$array_arg = array(1, 2);
+$extra_arg = 10;
+var_dump( end($array_arg, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing end() : error conditions ***
+
+-- Testing end() function with Zero arguments --
+
+Warning: Wrong parameter count for end() in %s on line %d
+NULL
+
+-- Testing end() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for end() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/array/end_variation1.phpt b/ext/standard/tests/array/end_variation1.phpt
new file mode 100644
index 000000000..4ed70aeb2
--- /dev/null
+++ b/ext/standard/tests/array/end_variation1.phpt
@@ -0,0 +1,220 @@
+--TEST--
+Test end() function : usage variations - Pass different data types as $array_arg
+--FILE--
+<?php
+/* Prototype : mixed end(array $array_arg)
+ * Description: Advances array argument's internal pointer to the last element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $array_arg to test behaviour of end()
+ */
+
+echo "*** Testing end() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ var $foo = 'hello, world';
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of end()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( end($input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--EXPECTF--
+*** Testing end() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+string(12) "hello, world"
+
+-- Iteration 23 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 25 --
+
+Warning: end(): Passed variable is not an array or object in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/end_variation2.phpt b/ext/standard/tests/array/end_variation2.phpt
new file mode 100644
index 000000000..180f7cdfb
--- /dev/null
+++ b/ext/standard/tests/array/end_variation2.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test end() function : usage variations - Multi-dimensional arrays
+--FILE--
+<?php
+/* Prototype : mixed end(array $array_arg)
+ * Description: Advances array argument's internal pointer to the last element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test end() when passed:
+ * 1. a two-dimensional array
+ * 2. a sub-array
+ * as $array_arg argument.
+ */
+
+echo "*** Testing end() : usage variations ***\n";
+
+$array_arg = array ('a' => 'z', array(9, 8, 7));
+
+echo "\n-- Pass a two-dimensional array as \$array_arg --\n";
+var_dump(end($array_arg));
+
+echo "\n-- Pass a sub-array as \$array_arg --\n";
+var_dump(end($array_arg[0]));
+?>
+===DONE===
+--EXPECTF--
+*** Testing end() : usage variations ***
+
+-- Pass a two-dimensional array as $array_arg --
+array(3) {
+ [0]=>
+ int(9)
+ [1]=>
+ int(8)
+ [2]=>
+ int(7)
+}
+
+-- Pass a sub-array as $array_arg --
+int(7)
+===DONE===
diff --git a/ext/standard/tests/array/end_variation3.phpt b/ext/standard/tests/array/end_variation3.phpt
new file mode 100644
index 000000000..cd1e2d0ec
--- /dev/null
+++ b/ext/standard/tests/array/end_variation3.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test end() function : usage variations - Referenced variables
+--FILE--
+<?php
+/* Prototype : mixed end(array $array_arg)
+ * Description: Advances array argument's internal pointer to the last element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how the internal pointer is affected when two variables are referenced to each other
+ */
+
+echo "*** Testing end() : usage variations ***\n";
+
+$array1 = array ('zero', 'one', 'two');
+
+echo "\n-- Initial position of internal pointer --\n";
+var_dump(current($array1));
+end($array1);
+
+// Test that when two variables are referenced to one another
+// the internal pointer is the same for both
+$array2 = &$array1;
+echo "\n-- Position after calling end() --\n";
+echo "\$array1: ";
+var_dump(current($array1));
+echo "\$array2: ";
+var_dump(current($array2));
+?>
+===DONE===
+--EXPECTF--
+*** Testing end() : usage variations ***
+
+-- Initial position of internal pointer --
+string(4) "zero"
+
+-- Position after calling end() --
+$array1: string(3) "two"
+$array2: string(3) "two"
+===DONE===
diff --git a/ext/standard/tests/array/key_basic.phpt b/ext/standard/tests/array/key_basic.phpt
new file mode 100644
index 000000000..8fdca1966
--- /dev/null
+++ b/ext/standard/tests/array/key_basic.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test key() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed key(array $array_arg)
+ * Description: Return the key of the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of key()
+ */
+
+echo "*** Testing key() : basic functionality ***\n";
+
+$array = array ('zero', 99 => 'one', 'two', 'three' => 3);
+echo "\n-- Initial Position: --\n";
+var_dump(key($array));
+
+echo "\n-- Next Position: --\n";
+next($array);
+var_dump(key($array));
+
+echo "\n-- End Position: --\n";
+end($array);
+var_dump(key($array));
+
+echo "\n-- Past end of the array --\n";
+next($array);
+var_dump(key($array));
+?>
+===DONE===
+--EXPECTF--
+*** Testing key() : basic functionality ***
+
+-- Initial Position: --
+int(0)
+
+-- Next Position: --
+int(99)
+
+-- End Position: --
+string(5) "three"
+
+-- Past end of the array --
+NULL
+===DONE===
diff --git a/ext/standard/tests/array/key_error.phpt b/ext/standard/tests/array/key_error.phpt
new file mode 100644
index 000000000..ae63bff07
--- /dev/null
+++ b/ext/standard/tests/array/key_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test key() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : mixed key(array $array_arg)
+ * Description: Return the key of the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to key() to test behaviour
+ */
+
+echo "*** Testing key() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing key() function with Zero arguments --\n";
+var_dump( key() );
+
+//Test current with one more than the expected number of arguments
+echo "\n-- Testing key() function with more than expected no. of arguments --\n";
+$array_arg = array(1, 2);
+$extra_arg = 10;
+var_dump( key($array_arg, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing key() : error conditions ***
+
+-- Testing key() function with Zero arguments --
+
+Warning: Wrong parameter count for key() in %s on line %d
+NULL
+
+-- Testing key() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for key() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/array/key_variation1.phpt b/ext/standard/tests/array/key_variation1.phpt
new file mode 100644
index 000000000..5b4a367ed
--- /dev/null
+++ b/ext/standard/tests/array/key_variation1.phpt
@@ -0,0 +1,220 @@
+--TEST--
+Test key() function : usage variations - Pass different data types as $array_arg arg.
+--FILE--
+<?php
+/* Prototype : mixed key(array $array_arg)
+ * Description: Return the key of the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $array_arg argument to test behaviour of key()
+ */
+
+echo "*** Testing key() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ var $var1;
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of key()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( key($input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--EXPECTF--
+*** Testing key() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+NULL
+
+-- Iteration 19 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+string(4) "var1"
+
+-- Iteration 23 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 25 --
+
+Warning: key(): Passed variable is not an array or object in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/key_variation2.phpt b/ext/standard/tests/array/key_variation2.phpt
new file mode 100644
index 000000000..35389062b
--- /dev/null
+++ b/ext/standard/tests/array/key_variation2.phpt
@@ -0,0 +1,155 @@
+--TEST--
+Test key() function : usage variations
+--FILE--
+<?php
+/* Prototype : mixed key(array $array_arg)
+ * Description: Return the key of the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays where keys are different data types as $array_arg to key() to test behaviour
+ */
+
+echo "*** Testing key() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed as $array_arg
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+/*3*/ 'extreme floats' => array(
+ 12.3456789000e6 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*4*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+
+/*5*/ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*6*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+
+/*7*/ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*8*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+
+/*9*/ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*10*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*11*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*12*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+);
+
+// loop through each element of $inputs to check the behavior of key()
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator : $key data --\n";
+ while (key($input) !== NULL) {
+ var_dump(key($input));
+ next($input);
+ }
+ $iterator++;
+};
+?>
+===DONE===
+--EXPECTF--
+*** Testing key() : usage variations ***
+
+-- Iteration 1 : int data --
+int(0)
+int(1)
+int(12345)
+int(-2345)
+
+-- Iteration 2 : float data --
+int(10)
+int(-10)
+int(0)
+
+-- Iteration 3 : extreme floats data --
+int(12345678)
+int(0)
+
+-- Iteration 4 : null uppercase data --
+string(0) ""
+
+-- Iteration 5 : null lowercase data --
+string(0) ""
+
+-- Iteration 6 : bool lowercase data --
+int(1)
+int(0)
+
+-- Iteration 7 : bool uppercase data --
+int(1)
+int(0)
+
+-- Iteration 8 : empty double quotes data --
+string(0) ""
+
+-- Iteration 9 : empty single quotes data --
+string(0) ""
+
+-- Iteration 10 : string data --
+string(7) "stringd"
+string(7) "strings"
+string(11) "hello world"
+
+-- Iteration 11 : undefined data --
+string(0) ""
+
+-- Iteration 12 : unset data --
+string(0) ""
+===DONE===
diff --git a/ext/standard/tests/array/key_variation3.phpt b/ext/standard/tests/array/key_variation3.phpt
new file mode 100644
index 000000000..a23191781
--- /dev/null
+++ b/ext/standard/tests/array/key_variation3.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test key() function : usage variations
+--FILE--
+<?php
+/* Prototype : mixed key(array $array_arg)
+ * Description: Return the key of the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how the internal pointer is affected when two variables are referenced to each other
+ */
+
+echo "*** Testing key() : usage variations ***\n";
+
+$array1 = array ('zero', 'one', 'two');
+
+echo "\n-- Initial position of internal pointer --\n";
+var_dump(key($array1));
+
+// Test that when two variables are referenced to one another
+// the internal pointer is the same for both
+$array2 = &$array1;
+
+next($array1);
+
+echo "\n-- Position after calling next() --\n";
+echo "\$array1: ";
+var_dump(key($array1));
+echo "\$array2: ";
+var_dump(key($array2));
+?>
+===DONE===
+--EXPECTF--
+*** Testing key() : usage variations ***
+
+-- Initial position of internal pointer --
+int(0)
+
+-- Position after calling next() --
+$array1: int(1)
+$array2: int(1)
+===DONE===
diff --git a/ext/standard/tests/array/key_variation4.phpt b/ext/standard/tests/array/key_variation4.phpt
new file mode 100644
index 000000000..0ddf05742
--- /dev/null
+++ b/ext/standard/tests/array/key_variation4.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Test key() function : usage variations
+--FILE--
+<?php
+/* Prototype : mixed key(array $array_arg)
+ * Description: Return the key of the element currently pointed to by the internal array pointer
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test how key() behaves with muti-dimensional and recursive arrays
+ */
+
+echo "*** Testing key() : usage variations ***\n";
+
+echo "\n-- Two Dimensional Array --\n";
+$multi_array = array ('zero', array (1, 2, 3), 'two');
+echo "Initial Position: ";
+var_dump(key($multi_array));
+
+echo "Next Position: ";
+next($multi_array);
+var_dump(key($multi_array));
+
+echo "End Position: ";
+end($multi_array);
+var_dump(key($multi_array));
+
+echo "\n-- Access an Array Within an Array --\n";
+//accessing an array within an array
+echo "Initial Position: ";
+var_dump(key($multi_array[1]));
+
+echo "\n-- Recursive, Multidimensional Array --\n";
+//create a recursive array
+$multi_array[] = &$multi_array;
+
+//See where internal pointer is after adding more elements
+echo "Current Position: ";
+var_dump(key($multi_array));
+
+//see if internal pointer is in same position as referenced array
+var_dump(key($multi_array[3][3][3]));
+// see if internal pointer is in the same position from when accessing this inner array
+var_dump(key($multi_array[3][3][3][1]));
+$multi_array[3] = null;
+?>
+===DONE===
+--EXPECTF--
+*** Testing key() : usage variations ***
+
+-- Two Dimensional Array --
+Initial Position: int(0)
+Next Position: int(1)
+End Position: int(2)
+
+-- Access an Array Within an Array --
+Initial Position: int(0)
+
+-- Recursive, Multidimensional Array --
+Current Position: int(2)
+int(2)
+int(0)
+===DONE===
diff --git a/ext/standard/tests/array/krsort_basic.phpt b/ext/standard/tests/array/krsort_basic.phpt
new file mode 100644
index 000000000..913256897
--- /dev/null
+++ b/ext/standard/tests/array/krsort_basic.phpt
@@ -0,0 +1,132 @@
+--TEST--
+Test krsort() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing krsort() by providing array of integer/string values to check the basic functionality
+ * with following flag values :
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+ * 4.SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing krsort() : basic functionality ***\n";
+
+// an array containing unsorted string values with indices
+$unsorted_strings = array( "lemon" => "l", "orange" => "o", "banana" => "b" );
+// an array containing unsorted numeric values with indices
+$unsorted_numerics = array( 100 => 4, 33 => 3, 555 => 2, 22 => 1 );
+
+echo "\n-- Testing krsort() by supplying string array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_strings;
+var_dump( krsort($temp_array) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing krsort() by supplying numeric array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_numerics;
+var_dump( krsort($temp_array) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing krsort() by supplying string array, 'flag' = SORT_REGULAR --\n";
+$temp_array = $unsorted_strings;
+var_dump( krsort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing krsort() by supplying numeric array, 'flag' = SORT_REGULAR --\n";
+$temp_array = $unsorted_numerics;
+var_dump( krsort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing krsort() by supplying string array, 'flag' = SORT_STRING --\n";
+$temp_array = $unsorted_strings;
+var_dump( krsort($temp_array, SORT_STRING) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing krsort() by supplying numeric array, 'flag' = SORT_NUMERIC --\n";
+$temp_array = $unsorted_numerics;
+var_dump( krsort($temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : basic functionality ***
+
+-- Testing krsort() by supplying string array, 'flag' value is defualt --
+bool(true)
+array(3) {
+ ["orange"]=>
+ string(1) "o"
+ ["lemon"]=>
+ string(1) "l"
+ ["banana"]=>
+ string(1) "b"
+}
+
+-- Testing krsort() by supplying numeric array, 'flag' value is defualt --
+bool(true)
+array(4) {
+ [555]=>
+ int(2)
+ [100]=>
+ int(4)
+ [33]=>
+ int(3)
+ [22]=>
+ int(1)
+}
+
+-- Testing krsort() by supplying string array, 'flag' = SORT_REGULAR --
+bool(true)
+array(3) {
+ ["orange"]=>
+ string(1) "o"
+ ["lemon"]=>
+ string(1) "l"
+ ["banana"]=>
+ string(1) "b"
+}
+
+-- Testing krsort() by supplying numeric array, 'flag' = SORT_REGULAR --
+bool(true)
+array(4) {
+ [555]=>
+ int(2)
+ [100]=>
+ int(4)
+ [33]=>
+ int(3)
+ [22]=>
+ int(1)
+}
+
+-- Testing krsort() by supplying string array, 'flag' = SORT_STRING --
+bool(true)
+array(3) {
+ ["orange"]=>
+ string(1) "o"
+ ["lemon"]=>
+ string(1) "l"
+ ["banana"]=>
+ string(1) "b"
+}
+
+-- Testing krsort() by supplying numeric array, 'flag' = SORT_NUMERIC --
+bool(true)
+array(4) {
+ [555]=>
+ int(2)
+ [100]=>
+ int(4)
+ [33]=>
+ int(3)
+ [22]=>
+ int(1)
+}
+Done
diff --git a/ext/standard/tests/array/krsort_error.phpt b/ext/standard/tests/array/krsort_error.phpt
new file mode 100644
index 000000000..1bca5f928
--- /dev/null
+++ b/ext/standard/tests/array/krsort_error.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Test krsort() function : error conditions
+--FILE--
+<?php
+/* Prototype : bool krsort(array &array_arg [, int asort_flags])
+ * Description: Sort an array
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing krsort() function with all possible error conditions
+*/
+
+echo "*** Testing krsort() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing krsort() function with zero arguments --\n";
+var_dump( krsort() );
+
+//Test krsort with more than the expected number of arguments
+echo "\n-- Testing krsort() function with more than expected no. of arguments --\n";
+$array_arg = array(1 => 1, 2 => 2);
+$flags = array("SORT_REGULAR" => SORT_REGULAR, "SORT_STRING" => SORT_STRING, "SORT_NUMERIC" => SORT_NUMERIC);
+$extra_arg = 10;
+
+// loop through $flag_value array and call krsort with all possible sort flag values
+foreach($flags as $key => $flag){
+ echo "\n- Sort flag = $key -\n";
+ $temp_array = $array_arg;
+ var_dump( krsort($temp_array,$flag, $extra_arg) );
+ var_dump($temp_array);
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing krsort() : error conditions ***
+
+-- Testing krsort() function with zero arguments --
+
+Warning: krsort() expects at least 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing krsort() function with more than expected no. of arguments --
+
+- Sort flag = SORT_REGULAR -
+
+Warning: krsort() expects at most 2 parameters, 3 given in %s on line %d
+bool(false)
+array(2) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+
+- Sort flag = SORT_STRING -
+
+Warning: krsort() expects at most 2 parameters, 3 given in %s on line %d
+bool(false)
+array(2) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+
+- Sort flag = SORT_NUMERIC -
+
+Warning: krsort() expects at most 2 parameters, 3 given in %s on line %d
+bool(false)
+array(2) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+Done
diff --git a/ext/standard/tests/array/krsort_object.phpt b/ext/standard/tests/array/krsort_object.phpt
new file mode 100644
index 000000000..36d8589a8
--- /dev/null
+++ b/ext/standard/tests/array/krsort_object.phpt
@@ -0,0 +1,242 @@
+--TEST--
+Test krsort() function : object functionality - sort objects
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+/*
+ * testing krsort() by providing array of integer/string objects with following flag values:
+ * 1.Defualt flag value
+ * 2.SORT_REGULAR - compare items normally
+*/
+
+echo "*** Testing krsort() : object functionality ***\n";
+
+// class declaration for integer objects
+class Integer
+{
+ public $class_value;
+ // initializing object member value
+ function __construct($value){
+ $this->class_value = $value;
+ }
+}
+
+// class declaration for string objects
+class String
+{
+ public $class_value;
+ // initializing object member value
+ function __construct($value){
+ $this->class_value = $value;
+ }
+
+ // return string value
+ function __tostring() {
+ return (string)$this->value;
+ }
+
+}
+
+// array of integer objects with different key values
+$unsorted_int_obj = array (
+ 10 => new Integer(11), 20 => new Integer(66),
+ 3 => new Integer(23), 4 => new Integer(-5),
+ 50 => new Integer(0.001), 6 => new Integer(0)
+);
+
+// array of string objects with different key values
+$unsorted_str_obj = array (
+ "axx" => new String("axx"), "t" => new String("t"),
+ "w" => new String("w"), "py" => new String("py"),
+ "apple" => new String("apple"), "Orange" => new String("Orange"),
+ "Lemon" => new String("Lemon"), "aPPle" => new String("aPPle")
+);
+
+
+echo "\n-- Testing krsort() by supplying various object arrays, 'flag' value is defualt --\n";
+
+// testing krsort() function by supplying integer object array, flag value is defualt
+$temp_array = $unsorted_int_obj;
+var_dump(krsort($temp_array) );
+var_dump($temp_array);
+
+// testing krsort() function by supplying string object array, flag value is defualt
+$temp_array = $unsorted_str_obj;
+var_dump(krsort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying various object arrays, 'flag' value is SORT_REGULAR --\n";
+// testing krsort() function by supplying integer object array, flag value = SORT_REGULAR
+$temp_array = $unsorted_int_obj;
+var_dump(krsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+// testing krsort() function by supplying string object array, flag value = SORT_REGULAR
+$temp_array = $unsorted_str_obj;
+var_dump(krsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : object functionality ***
+
+-- Testing krsort() by supplying various object arrays, 'flag' value is defualt --
+bool(true)
+array(6) {
+ [50]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ float(0.001)
+ }
+ [20]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(66)
+ }
+ [10]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(11)
+ }
+ [6]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(0)
+ }
+ [4]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(-5)
+ }
+ [3]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(23)
+ }
+}
+bool(true)
+array(8) {
+ ["w"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(1) "w"
+ }
+ ["t"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(1) "t"
+ }
+ ["py"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(2) "py"
+ }
+ ["axx"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(3) "axx"
+ }
+ ["apple"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "apple"
+ }
+ ["aPPle"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "aPPle"
+ }
+ ["Orange"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(6) "Orange"
+ }
+ ["Lemon"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "Lemon"
+ }
+}
+
+-- Testing krsort() by supplying various object arrays, 'flag' value is SORT_REGULAR --
+bool(true)
+array(6) {
+ [50]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ float(0.001)
+ }
+ [20]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(66)
+ }
+ [10]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(11)
+ }
+ [6]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(0)
+ }
+ [4]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(-5)
+ }
+ [3]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(23)
+ }
+}
+bool(true)
+array(8) {
+ ["w"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(1) "w"
+ }
+ ["t"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(1) "t"
+ }
+ ["py"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(2) "py"
+ }
+ ["axx"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(3) "axx"
+ }
+ ["apple"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "apple"
+ }
+ ["aPPle"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "aPPle"
+ }
+ ["Orange"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(6) "Orange"
+ }
+ ["Lemon"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "Lemon"
+ }
+}
+Done
diff --git a/ext/standard/tests/array/krsort_variation1.phpt b/ext/standard/tests/array/krsort_variation1.phpt
new file mode 100644
index 000000000..e4cbaf8d2
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation1.phpt
@@ -0,0 +1,397 @@
+--TEST--
+Test krsort() function : usage variations - unexpected values for 'array' argument
+--FILE--
+<?php
+/* Prototype : bool krsort(array &array_arg [, int sort_flags])
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing krsort() by providing different unexpected values for array argument
+ * with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+ * 4.SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// resource variable
+$fp = fopen(__FILE__, "r");
+
+$unexpected_values = array (
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 10.5e3,
+ 10.6E-2,
+ 0.5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*11*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*15*/ "",
+ '',
+
+ // string data
+/*17*/ "string",
+ 'string',
+
+ // object data
+/*19*/ new stdclass(),
+
+ // undefined data
+/*20*/ @undefined_var,
+
+ // unset data
+/*21*/ @unset_var,
+
+ // resource variable
+/*22*/ $fp
+);
+
+// loop though each element of the array and check the working of krsort()
+// when $array arugment is supplied with different values from $unexpected_values
+echo "\n-- Testing krsort() by supplying different unexpected values for 'array' argument --\n";
+echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
+
+$counter = 1;
+for($index = 0; $index < count($unexpected_values); $index ++) {
+ echo "-- Iteration $counter --\n";
+ $value = $unexpected_values [$index];
+ var_dump( krsort($value) ); // expecting : bool(false)
+ var_dump( krsort($value, SORT_REGULAR) ); // expecting : bool(false)
+ var_dump( krsort($value, SORT_NUMERIC) ); // expecting : bool(false)
+ var_dump( krsort($value, SORT_STRING) ); // expecting : bool(false)
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying different unexpected values for 'array' argument --
+
+-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
+-- Iteration 1 --
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+-- Iteration 11 --
+
+Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 13 --
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 14 --
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+-- Iteration 21 --
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 22 --
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 23 --
+
+Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+
+Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/krsort_variation10.phpt b/ext/standard/tests/array/krsort_variation10.phpt
new file mode 100644
index 000000000..f56d2870b
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation10.phpt
@@ -0,0 +1,98 @@
+--TEST--
+Test krsort() function : usage variations - sort heredoc strings
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing krsort() by providing array of heredoc strings for $array argument with
+ * following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+// Different heredoc strings to be sorted
+$simple_heredoc1 =<<<EOT
+Heredoc
+EOT;
+
+$simple_heredoc2 =<<<EOT
+HEREDOC
+EOT;
+
+$multiline_heredoc =<<<EOT
+heredoc string\twith!@# and 123
+Test this!!!
+EOT;
+
+$array = array (
+ $simple_heredoc1 => "Heredoc",
+ $simple_heredoc2 => "HEREDOC",
+ $multiline_heredoc => "heredoc string\twith!@# and 123\nTest this!!!"
+);
+
+echo "\n-- Testing krsort() by supplying heredoc string array, 'flag' value is defualt --\n";
+$temp_array = $array;
+var_dump(krsort($temp_array) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying heredoc string array, 'flag' = SORT_REGULAR --\n";
+$temp_array = $array;
+var_dump(krsort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying heredoc string array, 'flag' = SORT_STRING --\n";
+$temp_array = $array;
+var_dump(krsort($temp_array, SORT_STRING) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying heredoc string array, 'flag' value is defualt --
+bool(true)
+array(3) {
+ ["heredoc string with!@# and 123
+Test this!!!"]=>
+ string(43) "heredoc string with!@# and 123
+Test this!!!"
+ ["Heredoc"]=>
+ string(7) "Heredoc"
+ ["HEREDOC"]=>
+ string(7) "HEREDOC"
+}
+
+-- Testing krsort() by supplying heredoc string array, 'flag' = SORT_REGULAR --
+bool(true)
+array(3) {
+ ["heredoc string with!@# and 123
+Test this!!!"]=>
+ string(43) "heredoc string with!@# and 123
+Test this!!!"
+ ["Heredoc"]=>
+ string(7) "Heredoc"
+ ["HEREDOC"]=>
+ string(7) "HEREDOC"
+}
+
+-- Testing krsort() by supplying heredoc string array, 'flag' = SORT_STRING --
+bool(true)
+array(3) {
+ ["heredoc string with!@# and 123
+Test this!!!"]=>
+ string(43) "heredoc string with!@# and 123
+Test this!!!"
+ ["Heredoc"]=>
+ string(7) "Heredoc"
+ ["HEREDOC"]=>
+ string(7) "HEREDOC"
+}
+Done
diff --git a/ext/standard/tests/array/krsort_variation11.phpt b/ext/standard/tests/array/krsort_variation11.phpt
new file mode 100644
index 000000000..0cfa4821a
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation11.phpt
@@ -0,0 +1,81 @@
+--TEST--
+Test krsort() function : usage variations - sort bool values
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing krsort() by providing array of boolean values for $array argument with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+// bool value array
+$bool_values = array (true => true, false => false, TRUE => TRUE, FALSE => FALSE);
+
+echo "\n-- Testing krsort() by supplying boolean value array, 'flag' value is defualt --\n";
+$temp_array = $bool_values;
+var_dump(krsort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying boolean value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $bool_values;
+var_dump(krsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying boolean value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $bool_values;
+var_dump(krsort($temp_array, SORT_NUMERIC) );
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying boolean value array, 'flag' value is SORT_STRING --\n";
+$temp_array = $bool_values;
+var_dump(krsort($temp_array, SORT_STRING) );
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying boolean value array, 'flag' value is defualt --
+bool(true)
+array(2) {
+ [1]=>
+ bool(true)
+ [0]=>
+ bool(false)
+}
+
+-- Testing krsort() by supplying boolean value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(2) {
+ [1]=>
+ bool(true)
+ [0]=>
+ bool(false)
+}
+
+-- Testing krsort() by supplying boolean value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(2) {
+ [1]=>
+ bool(true)
+ [0]=>
+ bool(false)
+}
+
+-- Testing krsort() by supplying boolean value array, 'flag' value is SORT_STRING --
+bool(true)
+array(2) {
+ [1]=>
+ bool(true)
+ [0]=>
+ bool(false)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/krsort_variation2.phpt b/ext/standard/tests/array/krsort_variation2.phpt
new file mode 100644
index 000000000..c567f766c
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation2.phpt
@@ -0,0 +1,307 @@
+--TEST--
+Test krsort() function : usage variations - unexpected values for 'sort_flags' argument
+--FILE--
+<?php
+/* Prototype : bool krsort(array &array_arg [, int sort_flags])
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing krsort() by providing different unexpected values for flag argument
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// resource variable
+$fp = fopen(__FILE__, "r");
+
+// an array for checking unexpected behavior
+$unsorted_values = array(10 => 10, 2 => 2, 45 => 45);
+
+//array of unexpected values to iterate over
+$unexpected_values = array (
+
+ // int data
+/*1*/ -2345,
+
+ // float data
+/*2*/ 10.5,
+ -10.5,
+ 10.5e2,
+ 10.6E-2,
+ .5,
+
+ // null data
+/*7*/ NULL,
+ null,
+
+ // boolean data
+/*9*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*13*/ "",
+ '',
+
+ // string data
+/*15*/ "string",
+ 'string',
+
+ // object data
+/*16*/ new stdclass(),
+
+ // undefined data
+/*17*/ @undefined_var,
+
+ // unset data
+/*18*/ @unset_var,
+
+ // resource variable
+/*19*/ $fp
+
+);
+
+// loop though each element of the array and check the working of krsort()
+// when 'sort_flags' arugment is supplied with different values
+echo "\n-- Testing krsort() by supplying different unexpected values for 'sort_flags' argument --\n";
+
+$counter = 1;
+for($index = 0; $index < count($unexpected_values); $index ++) {
+ echo "-- Iteration $counter --\n";
+ $value = $unexpected_values [$index];
+ $temp_array = $unsorted_values;
+ var_dump( krsort($temp_array, $value) );
+ var_dump($temp_array);
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying different unexpected values for 'sort_flags' argument --
+-- Iteration 1 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 2 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 3 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 4 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 5 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 6 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 7 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 8 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 9 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 10 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 11 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 12 --
+bool(true)
+array(3) {
+ [45]=>
+ int(45)
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+}
+-- Iteration 13 --
+
+Warning: krsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 14 --
+
+Warning: krsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 15 --
+
+Warning: krsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 16 --
+
+Warning: krsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 17 --
+
+Warning: krsort() expects parameter 2 to be long, object given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 18 --
+
+Warning: krsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 19 --
+
+Warning: krsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 20 --
+
+Warning: krsort() expects parameter 2 to be long, resource given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+Done
diff --git a/ext/standard/tests/array/krsort_variation3.phpt b/ext/standard/tests/array/krsort_variation3.phpt
new file mode 100644
index 000000000..8f411a973
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation3.phpt
@@ -0,0 +1,262 @@
+--TEST--
+Test krsort() function : usage variations - sort integer/float values
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing krsort() by providing array of integer/float/mixed values for $array argument
+ * with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+// diff. associative arrays to sort
+$various_arrays = array(
+ // negative/posative integer key value array
+ array(1 => 11, -2 => -11, 3 => 21, -4 => -21, 5 => 31, -6 => -31, 7 => 0, 8 => 41, -10 =>-41),
+
+ // float key values
+ array(1.0 => 10.5, 0.2 => -10.5, 3.1 => 10.5e2, 4 => 10.6E-2, .5 => .5, 6 => .0001, -7 => -.1),
+
+ // mixed value array with different types of keys
+ array(1 => .0001, 2 => .0021, -3 => -.01, 4 => -1, 5 => 0, 6 => .09, 7 => 2, -8 => -.9, 9 => 10.6E-2,
+ -10 => -10.6E-2, 11 => 33)
+);
+
+// set of possible flag values
+$flags = array("SORT_REGULAR" => SORT_REGULAR, "SORT_NUMERIC" => SORT_NUMERIC);
+
+$count = 1;
+echo "\n-- Testing krsort() by supplying various integer/float arrays --\n";
+
+// loop through to test krsort() with different arrays
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump(krsort($temp_array) );
+ var_dump($temp_array);
+
+ // loop through $flags array and call krsort() with all possible sort flag values
+ foreach($flags as $key => $flag){
+ echo "- Sort flag = $key -\n";
+ $temp_array = $array;
+ var_dump(krsort($temp_array, $flag) );
+ var_dump($temp_array);
+ }
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying various integer/float arrays --
+
+-- Iteration 1 --
+- With defualt sort flag -
+bool(true)
+array(9) {
+ [8]=>
+ int(41)
+ [7]=>
+ int(0)
+ [5]=>
+ int(31)
+ [3]=>
+ int(21)
+ [1]=>
+ int(11)
+ [-2]=>
+ int(-11)
+ [-4]=>
+ int(-21)
+ [-6]=>
+ int(-31)
+ [-10]=>
+ int(-41)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(9) {
+ [8]=>
+ int(41)
+ [7]=>
+ int(0)
+ [5]=>
+ int(31)
+ [3]=>
+ int(21)
+ [1]=>
+ int(11)
+ [-2]=>
+ int(-11)
+ [-4]=>
+ int(-21)
+ [-6]=>
+ int(-31)
+ [-10]=>
+ int(-41)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(9) {
+ [8]=>
+ int(41)
+ [7]=>
+ int(0)
+ [5]=>
+ int(31)
+ [3]=>
+ int(21)
+ [1]=>
+ int(11)
+ [-2]=>
+ int(-11)
+ [-4]=>
+ int(-21)
+ [-6]=>
+ int(-31)
+ [-10]=>
+ int(-41)
+}
+
+-- Iteration 2 --
+- With defualt sort flag -
+bool(true)
+array(6) {
+ [6]=>
+ float(0.0001)
+ [4]=>
+ float(0.106)
+ [3]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [0]=>
+ float(0.5)
+ [-7]=>
+ float(-0.1)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(6) {
+ [6]=>
+ float(0.0001)
+ [4]=>
+ float(0.106)
+ [3]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [0]=>
+ float(0.5)
+ [-7]=>
+ float(-0.1)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(6) {
+ [6]=>
+ float(0.0001)
+ [4]=>
+ float(0.106)
+ [3]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [0]=>
+ float(0.5)
+ [-7]=>
+ float(-0.1)
+}
+
+-- Iteration 3 --
+- With defualt sort flag -
+bool(true)
+array(11) {
+ [11]=>
+ int(33)
+ [9]=>
+ float(0.106)
+ [7]=>
+ int(2)
+ [6]=>
+ float(0.09)
+ [5]=>
+ int(0)
+ [4]=>
+ int(-1)
+ [2]=>
+ float(0.0021)
+ [1]=>
+ float(0.0001)
+ [-3]=>
+ float(-0.01)
+ [-8]=>
+ float(-0.9)
+ [-10]=>
+ float(-0.106)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ [11]=>
+ int(33)
+ [9]=>
+ float(0.106)
+ [7]=>
+ int(2)
+ [6]=>
+ float(0.09)
+ [5]=>
+ int(0)
+ [4]=>
+ int(-1)
+ [2]=>
+ float(0.0021)
+ [1]=>
+ float(0.0001)
+ [-3]=>
+ float(-0.01)
+ [-8]=>
+ float(-0.9)
+ [-10]=>
+ float(-0.106)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(11) {
+ [11]=>
+ int(33)
+ [9]=>
+ float(0.106)
+ [7]=>
+ int(2)
+ [6]=>
+ float(0.09)
+ [5]=>
+ int(0)
+ [4]=>
+ int(-1)
+ [2]=>
+ float(0.0021)
+ [1]=>
+ float(0.0001)
+ [-3]=>
+ float(-0.01)
+ [-8]=>
+ float(-0.9)
+ [-10]=>
+ float(-0.106)
+}
+Done
diff --git a/ext/standard/tests/array/krsort_variation4.phpt b/ext/standard/tests/array/krsort_variation4.phpt
new file mode 100644
index 000000000..3df924ac8
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation4.phpt
@@ -0,0 +1,114 @@
+--TEST--
+Test krsort() function : usage variations - sort octal values
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing krsort() by providing array of octal values for $array argument
+ * with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+// an array containing unsorted octal values
+$unsorted_oct_array = array (
+ 01235 => 01, 0321 => 02, 0345 => 03, 066 => 04, 0772 => 05,
+ 077 => 06, -066 => -01, -0345 => -02, 0 => 0
+);
+
+echo "\n-- Testing krsort() by supplying octal value array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( krsort($temp_array) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying octal value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( krsort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying octal value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( krsort($temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying octal value array, 'flag' value is defualt --
+bool(true)
+array(9) {
+ [669]=>
+ int(1)
+ [506]=>
+ int(5)
+ [229]=>
+ int(3)
+ [209]=>
+ int(2)
+ [63]=>
+ int(6)
+ [54]=>
+ int(4)
+ [0]=>
+ int(0)
+ [-54]=>
+ int(-1)
+ [-229]=>
+ int(-2)
+}
+
+-- Testing krsort() by supplying octal value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(9) {
+ [669]=>
+ int(1)
+ [506]=>
+ int(5)
+ [229]=>
+ int(3)
+ [209]=>
+ int(2)
+ [63]=>
+ int(6)
+ [54]=>
+ int(4)
+ [0]=>
+ int(0)
+ [-54]=>
+ int(-1)
+ [-229]=>
+ int(-2)
+}
+
+-- Testing krsort() by supplying octal value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(9) {
+ [669]=>
+ int(1)
+ [506]=>
+ int(5)
+ [229]=>
+ int(3)
+ [209]=>
+ int(2)
+ [63]=>
+ int(6)
+ [54]=>
+ int(4)
+ [0]=>
+ int(0)
+ [-54]=>
+ int(-1)
+ [-229]=>
+ int(-2)
+}
+Done
diff --git a/ext/standard/tests/array/krsort_variation5.phpt b/ext/standard/tests/array/krsort_variation5.phpt
new file mode 100644
index 000000000..59621654c
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation5.phpt
@@ -0,0 +1,230 @@
+--TEST--
+Test krsort() function : usage variations - sort strings
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing krsort() by providing array of string values for $array argument with
+ * following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+$various_arrays = array (
+ // diff. escape sequence chars with key values
+ array ( null => null, NULL => NULL, "\a" => "\a", "\cx" => "\cx", "\e" => "\e",
+ "\f" => "\f", "\n" =>"\n", "\r" => "\r", "\t" => "\t", "\xhh" => "\xhh",
+ "\ddd" => "\ddd", "\v" => "\v"
+ ),
+
+ // array containing different strings with key values
+ array ( 'Lemon' => "lemoN", 'o' => "Orange", 'B' => "banana", 'Apple' => "apple", 'te' => "Test",
+ 't' => "TTTT", 'T' => "ttt", 'W' => "ww", 'X' => "x", 'x' => "X", 'O' => "oraNGe",
+ 'B' => "BANANA"
+ )
+);
+
+$flags = array("SORT_REGULAR" => SORT_REGULAR, "SORT_STRING" => SORT_STRING);
+
+$count = 1;
+echo "\n-- Testing krsort() by supplying various string arrays --\n";
+
+// loop through to test krsort() with different arrays
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump(krsort($temp_array) ); // expecting : bool(true)
+ var_dump($temp_array);
+
+ // loop through $flags array and call krsort() with all possible sort flag values
+ foreach($flags as $key => $flag){
+ echo "- Sort flag = $key -\n";
+ $temp_array = $array;
+ var_dump(krsort($temp_array, $flag) ); // expecting : bool(true)
+ var_dump($temp_array);
+ }
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying various string arrays --
+
+-- Iteration 1 --
+- With defualt sort flag -
+bool(true)
+array(11) {
+ ["\xhh"]=>
+ string(4) "\xhh"
+ ["\e"]=>
+ string(2) "\e"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\a"]=>
+ string(2) "\a"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ [""]=>
+ NULL
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ ["\xhh"]=>
+ string(4) "\xhh"
+ ["\e"]=>
+ string(2) "\e"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\a"]=>
+ string(2) "\a"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ [""]=>
+ NULL
+}
+- Sort flag = SORT_STRING -
+bool(true)
+array(11) {
+ ["\xhh"]=>
+ string(4) "\xhh"
+ ["\e"]=>
+ string(2) "\e"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\a"]=>
+ string(2) "\a"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ [""]=>
+ NULL
+}
+
+-- Iteration 2 --
+- With defualt sort flag -
+bool(true)
+array(11) {
+ ["x"]=>
+ string(1) "X"
+ ["te"]=>
+ string(4) "Test"
+ ["t"]=>
+ string(4) "TTTT"
+ ["o"]=>
+ string(6) "Orange"
+ ["X"]=>
+ string(1) "x"
+ ["W"]=>
+ string(2) "ww"
+ ["T"]=>
+ string(3) "ttt"
+ ["O"]=>
+ string(6) "oraNGe"
+ ["Lemon"]=>
+ string(5) "lemoN"
+ ["B"]=>
+ string(6) "BANANA"
+ ["Apple"]=>
+ string(5) "apple"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ ["x"]=>
+ string(1) "X"
+ ["te"]=>
+ string(4) "Test"
+ ["t"]=>
+ string(4) "TTTT"
+ ["o"]=>
+ string(6) "Orange"
+ ["X"]=>
+ string(1) "x"
+ ["W"]=>
+ string(2) "ww"
+ ["T"]=>
+ string(3) "ttt"
+ ["O"]=>
+ string(6) "oraNGe"
+ ["Lemon"]=>
+ string(5) "lemoN"
+ ["B"]=>
+ string(6) "BANANA"
+ ["Apple"]=>
+ string(5) "apple"
+}
+- Sort flag = SORT_STRING -
+bool(true)
+array(11) {
+ ["x"]=>
+ string(1) "X"
+ ["te"]=>
+ string(4) "Test"
+ ["t"]=>
+ string(4) "TTTT"
+ ["o"]=>
+ string(6) "Orange"
+ ["X"]=>
+ string(1) "x"
+ ["W"]=>
+ string(2) "ww"
+ ["T"]=>
+ string(3) "ttt"
+ ["O"]=>
+ string(6) "oraNGe"
+ ["Lemon"]=>
+ string(5) "lemoN"
+ ["B"]=>
+ string(6) "BANANA"
+ ["Apple"]=>
+ string(5) "apple"
+}
+Done
diff --git a/ext/standard/tests/array/krsort_variation6.phpt b/ext/standard/tests/array/krsort_variation6.phpt
new file mode 100644
index 000000000..167d0ee7d
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation6.phpt
@@ -0,0 +1,114 @@
+--TEST--
+Test krsort() function : usage variations - sort hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing krsort() by providing array of hexa-decimal values for $array argument
+ * with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+// an array containing unsorted hexadecimal values with keys
+$unsorted_hex_array = array (
+ 0x1AB => 0x1AB, 0xFFF => 0xFFF, 0xF => 0xF, 0xFF => 0xFF, 0x2AA => 0x2AA, 0xBB => 0xBB,
+ 0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
+);
+
+echo "\n-- Testing krsort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(krsort( $temp_array) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(krsort( $temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing krsort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(krsort( $temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying hexadecimal value array, 'flag' value is defualt --
+bool(true)
+array(9) {
+ [4095]=>
+ int(4095)
+ [682]=>
+ int(682)
+ [427]=>
+ int(427)
+ [255]=>
+ int(255)
+ [187]=>
+ int(187)
+ [15]=>
+ int(15)
+ [0]=>
+ int(0)
+ [-255]=>
+ int(-255)
+ [-682]=>
+ int(-682)
+}
+
+-- Testing krsort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(9) {
+ [4095]=>
+ int(4095)
+ [682]=>
+ int(682)
+ [427]=>
+ int(427)
+ [255]=>
+ int(255)
+ [187]=>
+ int(187)
+ [15]=>
+ int(15)
+ [0]=>
+ int(0)
+ [-255]=>
+ int(-255)
+ [-682]=>
+ int(-682)
+}
+
+-- Testing krsort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(9) {
+ [4095]=>
+ int(4095)
+ [682]=>
+ int(682)
+ [427]=>
+ int(427)
+ [255]=>
+ int(255)
+ [187]=>
+ int(187)
+ [15]=>
+ int(15)
+ [0]=>
+ int(0)
+ [-255]=>
+ int(-255)
+ [-682]=>
+ int(-682)
+}
+Done
diff --git a/ext/standard/tests/array/krsort_variation7.phpt b/ext/standard/tests/array/krsort_variation7.phpt
new file mode 100644
index 000000000..9ba3fc544
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation7.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test krsort() function : usage variations - sort array with diff. sub arrays
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing krsort() by providing arrays contains sub arrays for $array argument
+ * with flowing flag values
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+*/
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+// array with diff sub arrays to be sorted
+$various_arrays = array (
+ // null array
+ 1 => array(),
+
+ // array contains null sub array
+ 2 => array( 1 => array() ),
+
+ // array of arrays along with some values
+ 3 => array(4 => 44, 1 => 11, 3 => array(64,61) ),
+
+ // array contains sub arrays
+ 4 => array ( 3 => array(33,-5,6), 1 => array(11),
+ 2 => array(22,-55), 0 => array() )
+);
+
+
+$count = 1;
+echo "\n-- Testing krsort() by supplying various arrays containing sub arrays --\n";
+
+// loop through to test krsort() with different arrays
+foreach ($various_arrays as $array) {
+
+ echo "\n-- Iteration $count --\n";
+ echo "- With defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump( krsort($temp_array) );
+ var_dump($temp_array);
+
+ echo "- Sort flag = SORT_REGULAR -\n";
+ $temp_array = $array;
+ var_dump( krsort($temp_array, SORT_REGULAR) );
+ var_dump($temp_array);
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying various arrays containing sub arrays --
+
+-- Iteration 1 --
+- With defualt sort flag -
+bool(true)
+array(0) {
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(0) {
+}
+
+-- Iteration 2 --
+- With defualt sort flag -
+bool(true)
+array(1) {
+ [1]=>
+ array(0) {
+ }
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(1) {
+ [1]=>
+ array(0) {
+ }
+}
+
+-- Iteration 3 --
+- With defualt sort flag -
+bool(true)
+array(3) {
+ [4]=>
+ int(44)
+ [3]=>
+ array(2) {
+ [0]=>
+ int(64)
+ [1]=>
+ int(61)
+ }
+ [1]=>
+ int(11)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ [4]=>
+ int(44)
+ [3]=>
+ array(2) {
+ [0]=>
+ int(64)
+ [1]=>
+ int(61)
+ }
+ [1]=>
+ int(11)
+}
+
+-- Iteration 4 --
+- With defualt sort flag -
+bool(true)
+array(4) {
+ [3]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ [0]=>
+ array(0) {
+ }
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(4) {
+ [3]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ [0]=>
+ array(0) {
+ }
+}
+Done
diff --git a/ext/standard/tests/array/krsort_variation8.phpt b/ext/standard/tests/array/krsort_variation8.phpt
new file mode 100644
index 000000000..20276ade6
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation8.phpt
Binary files differ
diff --git a/ext/standard/tests/array/krsort_variation9.phpt b/ext/standard/tests/array/krsort_variation9.phpt
new file mode 100644
index 000000000..d7d8343b0
--- /dev/null
+++ b/ext/standard/tests/array/krsort_variation9.phpt
@@ -0,0 +1,257 @@
+--TEST--
+Test krsort() function : usage variations - sort array with/without key values
+--FILE--
+<?php
+/* Prototype : bool krsort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key in reverse order, maintaining key to data correlation.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing krsort() by providing arrays with/without key values for $array argument
+ * with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ */
+
+echo "*** Testing krsort() : usage variations ***\n";
+
+// list of arrays with/without key values
+$various_arrays = array (
+ array(5 => 55, 66, 22, 33, 11),
+ array ("a" => "orange", "banana", "c" => "apple"),
+ array(1, 2, 3, 4, 5, 6),
+ array("first", 5 => "second", 1 => "third"),
+ array(1, 1, 8 => 1, 4 => 1, 19, 3 => 13),
+ array('bar' => 'baz', "foo" => 1),
+ array('a' => 1,'b' => array('e' => 2,'f' => 3),'c' => array('g' => 4),'d' => 5),
+);
+
+$count = 1;
+echo "\n-- Testing krsort() by supplying various arrays with/without key values --\n";
+
+// loop through to test krsort() with different arrays,
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump( krsort($temp_array) );
+ var_dump($temp_array);
+
+ echo "- Sort flag = SORT_REGULAR -\n";
+ $temp_array = $array;
+ var_dump( krsort($temp_array, SORT_REGULAR) );
+ var_dump($temp_array);
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing krsort() : usage variations ***
+
+-- Testing krsort() by supplying various arrays with/without key values --
+
+-- Iteration 1 --
+- With defualt sort flag -
+bool(true)
+array(5) {
+ [9]=>
+ int(11)
+ [8]=>
+ int(33)
+ [7]=>
+ int(22)
+ [6]=>
+ int(66)
+ [5]=>
+ int(55)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(5) {
+ [9]=>
+ int(11)
+ [8]=>
+ int(33)
+ [7]=>
+ int(22)
+ [6]=>
+ int(66)
+ [5]=>
+ int(55)
+}
+
+-- Iteration 2 --
+- With defualt sort flag -
+bool(true)
+array(3) {
+ ["c"]=>
+ string(5) "apple"
+ [0]=>
+ string(6) "banana"
+ ["a"]=>
+ string(6) "orange"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ ["c"]=>
+ string(5) "apple"
+ [0]=>
+ string(6) "banana"
+ ["a"]=>
+ string(6) "orange"
+}
+
+-- Iteration 3 --
+- With defualt sort flag -
+bool(true)
+array(6) {
+ [5]=>
+ int(6)
+ [4]=>
+ int(5)
+ [3]=>
+ int(4)
+ [2]=>
+ int(3)
+ [1]=>
+ int(2)
+ [0]=>
+ int(1)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(6) {
+ [5]=>
+ int(6)
+ [4]=>
+ int(5)
+ [3]=>
+ int(4)
+ [2]=>
+ int(3)
+ [1]=>
+ int(2)
+ [0]=>
+ int(1)
+}
+
+-- Iteration 4 --
+- With defualt sort flag -
+bool(true)
+array(3) {
+ [5]=>
+ string(6) "second"
+ [1]=>
+ string(5) "third"
+ [0]=>
+ string(5) "first"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ [5]=>
+ string(6) "second"
+ [1]=>
+ string(5) "third"
+ [0]=>
+ string(5) "first"
+}
+
+-- Iteration 5 --
+- With defualt sort flag -
+bool(true)
+array(6) {
+ [9]=>
+ int(19)
+ [8]=>
+ int(1)
+ [4]=>
+ int(1)
+ [3]=>
+ int(13)
+ [1]=>
+ int(1)
+ [0]=>
+ int(1)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(6) {
+ [9]=>
+ int(19)
+ [8]=>
+ int(1)
+ [4]=>
+ int(1)
+ [3]=>
+ int(13)
+ [1]=>
+ int(1)
+ [0]=>
+ int(1)
+}
+
+-- Iteration 6 --
+- With defualt sort flag -
+bool(true)
+array(2) {
+ ["foo"]=>
+ int(1)
+ ["bar"]=>
+ string(3) "baz"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(2) {
+ ["foo"]=>
+ int(1)
+ ["bar"]=>
+ string(3) "baz"
+}
+
+-- Iteration 7 --
+- With defualt sort flag -
+bool(true)
+array(4) {
+ ["d"]=>
+ int(5)
+ ["c"]=>
+ array(1) {
+ ["g"]=>
+ int(4)
+ }
+ ["b"]=>
+ array(2) {
+ ["e"]=>
+ int(2)
+ ["f"]=>
+ int(3)
+ }
+ ["a"]=>
+ int(1)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(4) {
+ ["d"]=>
+ int(5)
+ ["c"]=>
+ array(1) {
+ ["g"]=>
+ int(4)
+ }
+ ["b"]=>
+ array(2) {
+ ["e"]=>
+ int(2)
+ ["f"]=>
+ int(3)
+ }
+ ["a"]=>
+ int(1)
+}
+Done
diff --git a/ext/standard/tests/array/ksort_basic.phpt b/ext/standard/tests/array/ksort_basic.phpt
new file mode 100644
index 000000000..fdc8bd8dc
--- /dev/null
+++ b/ext/standard/tests/array/ksort_basic.phpt
@@ -0,0 +1,131 @@
+--TEST--
+Test ksort() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing ksort() by providing array of integer/string values to check the basic functionality with following flag values :
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+ * 4.SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing ksort() : basic functionality ***\n";
+
+// an array containing unsorted string values with indices
+$unsorted_strings = array( "lemon" => "l", "orange" => "o", "banana" => "b" );
+// an array containing unsorted numeric values with indices
+$unsorted_numerics = array( 100 => 4, 33 => 3, 555 => 2, 22 => 1 );
+
+echo "\n-- Testing ksort() by supplying string array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_strings;
+var_dump( ksort($temp_array) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing ksort() by supplying numeric array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_numerics;
+var_dump( ksort($temp_array) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing ksort() by supplying string array, 'flag' = SORT_REGULAR --\n";
+$temp_array = $unsorted_strings;
+var_dump( ksort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing ksort() by supplying numeric array, 'flag' = SORT_REGULAR --\n";
+$temp_array = $unsorted_numerics;
+var_dump( ksort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing ksort() by supplying string array, 'flag' = SORT_STRING --\n";
+$temp_array = $unsorted_strings;
+var_dump( ksort($temp_array, SORT_STRING) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "\n-- Testing ksort() by supplying numeric array, 'flag' = SORT_NUMERIC --\n";
+$temp_array = $unsorted_numerics;
+var_dump( ksort($temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump( $temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : basic functionality ***
+
+-- Testing ksort() by supplying string array, 'flag' value is defualt --
+bool(true)
+array(3) {
+ ["banana"]=>
+ string(1) "b"
+ ["lemon"]=>
+ string(1) "l"
+ ["orange"]=>
+ string(1) "o"
+}
+
+-- Testing ksort() by supplying numeric array, 'flag' value is defualt --
+bool(true)
+array(4) {
+ [22]=>
+ int(1)
+ [33]=>
+ int(3)
+ [100]=>
+ int(4)
+ [555]=>
+ int(2)
+}
+
+-- Testing ksort() by supplying string array, 'flag' = SORT_REGULAR --
+bool(true)
+array(3) {
+ ["banana"]=>
+ string(1) "b"
+ ["lemon"]=>
+ string(1) "l"
+ ["orange"]=>
+ string(1) "o"
+}
+
+-- Testing ksort() by supplying numeric array, 'flag' = SORT_REGULAR --
+bool(true)
+array(4) {
+ [22]=>
+ int(1)
+ [33]=>
+ int(3)
+ [100]=>
+ int(4)
+ [555]=>
+ int(2)
+}
+
+-- Testing ksort() by supplying string array, 'flag' = SORT_STRING --
+bool(true)
+array(3) {
+ ["banana"]=>
+ string(1) "b"
+ ["lemon"]=>
+ string(1) "l"
+ ["orange"]=>
+ string(1) "o"
+}
+
+-- Testing ksort() by supplying numeric array, 'flag' = SORT_NUMERIC --
+bool(true)
+array(4) {
+ [22]=>
+ int(1)
+ [33]=>
+ int(3)
+ [100]=>
+ int(4)
+ [555]=>
+ int(2)
+}
+Done
diff --git a/ext/standard/tests/array/ksort_error.phpt b/ext/standard/tests/array/ksort_error.phpt
new file mode 100644
index 000000000..f2b102ae0
--- /dev/null
+++ b/ext/standard/tests/array/ksort_error.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Test ksort() function : error conditions
+--FILE--
+<?php
+/* Prototype : bool ksort(array &array_arg [, int sort_flags])
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing ksort() function with all possible error conditions
+*/
+
+echo "*** Testing ksort() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing ksort() function with Zero arguments --\n";
+var_dump( ksort() );
+
+//Test ksort with more than the expected number of arguments
+echo "\n-- Testing ksort() function with more than expected no. of arguments --\n";
+$array_arg = array(1 => 1, 2 => 2);
+$flag_value = array("SORT_REGULAR" => SORT_REGULAR, "SORT_STRING" => SORT_STRING, "SORT_NUMERIC" => SORT_NUMERIC);
+$extra_arg = 10;
+
+// loop through $flag_value array and call krsort with all possible sort flag values
+foreach($flag_value as $key => $flag){
+ echo "\n- Sort flag = $key -\n";
+ $temp_array = $array_arg;
+ var_dump( ksort($temp_array,$flag, $extra_arg) );
+ var_dump( $temp_array);
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ksort() : error conditions ***
+
+-- Testing ksort() function with Zero arguments --
+
+Warning: ksort() expects at least 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing ksort() function with more than expected no. of arguments --
+
+- Sort flag = SORT_REGULAR -
+
+Warning: ksort() expects at most 2 parameters, 3 given in %s on line %d
+bool(false)
+array(2) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+
+- Sort flag = SORT_STRING -
+
+Warning: ksort() expects at most 2 parameters, 3 given in %s on line %d
+bool(false)
+array(2) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+
+- Sort flag = SORT_NUMERIC -
+
+Warning: ksort() expects at most 2 parameters, 3 given in %s on line %d
+bool(false)
+array(2) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+Done
diff --git a/ext/standard/tests/array/ksort_object.phpt b/ext/standard/tests/array/ksort_object.phpt
new file mode 100644
index 000000000..20e8ba26e
--- /dev/null
+++ b/ext/standard/tests/array/ksort_object.phpt
@@ -0,0 +1,241 @@
+--TEST--
+Test ksort() function : object functionality - sort objects
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation.
+ * Source code: ext/standard/array.c
+*/
+/*
+ * testing ksort() by providing array ofinteger/string objects with following flag values:
+ * 1.SORT_NUMERIC - compare items numerically
+ * 2.SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing ksort() : object functionality ***\n";
+
+// class declaration for integer objects
+class Integer
+{
+ public $class_value;
+ // initializing object member value
+ function __construct($value){
+ $this->class_value = $value;
+ }
+
+}
+
+// class declaration for string objects
+class String
+{
+ public $class_value;
+ // initializing object member value
+ function __construct($value){
+ $this->class_value = $value;
+ }
+
+ // return string value
+ function __tostring() {
+ return (string)$this->value;
+ }
+
+}
+
+// array of integer objects
+$unsorted_int_obj = array (
+ 11 => new Integer(11), 66 => new Integer(66),
+ 23 => new Integer(23), -5 => new Integer(-5),
+ 1 => new Integer(0.001), 0 => new Integer(0)
+);
+
+// array of string objects
+$unsorted_str_obj = array (
+ "axx" => new String("axx"), "t" => new String("t"),
+ "w" => new String("w"), "py" => new String("py"),
+ "apple" => new String("apple"), "Orange" => new String("Orange"),
+ "Lemon" => new String("Lemon"), "aPPle" => new String("aPPle")
+);
+echo "\n-- Testing ksort() by supplying various object arrays, 'flag' value is defualt --\n";
+
+// testing ksort() function by supplying integer object array, flag value is defualt
+$temp_array = $unsorted_int_obj;
+var_dump(ksort($temp_array) );
+var_dump($temp_array);
+
+// testing ksort() function by supplying string object array, flag value is defualt
+$temp_array = $unsorted_str_obj;
+var_dump(ksort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying various object arrays, 'flag' value is SORT_REGULAR --\n";
+// testing ksort() function by supplying integer object array, flag value = SORT_REGULAR
+$temp_array = $unsorted_int_obj;
+var_dump(ksort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+// testing ksort() function by supplying string object array, flag value = SORT_REGULAR
+$temp_array = $unsorted_str_obj;
+var_dump(ksort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : object functionality ***
+
+-- Testing ksort() by supplying various object arrays, 'flag' value is defualt --
+bool(true)
+array(6) {
+ [-5]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(-5)
+ }
+ [0]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(0)
+ }
+ [1]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ float(0.001)
+ }
+ [11]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(11)
+ }
+ [23]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(23)
+ }
+ [66]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(66)
+ }
+}
+bool(true)
+array(8) {
+ ["Lemon"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "Lemon"
+ }
+ ["Orange"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(6) "Orange"
+ }
+ ["aPPle"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "aPPle"
+ }
+ ["apple"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "apple"
+ }
+ ["axx"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(3) "axx"
+ }
+ ["py"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(2) "py"
+ }
+ ["t"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(1) "t"
+ }
+ ["w"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(1) "w"
+ }
+}
+
+-- Testing ksort() by supplying various object arrays, 'flag' value is SORT_REGULAR --
+bool(true)
+array(6) {
+ [-5]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(-5)
+ }
+ [0]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(0)
+ }
+ [1]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ float(0.001)
+ }
+ [11]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(11)
+ }
+ [23]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(23)
+ }
+ [66]=>
+ object(Integer)#%d (1) {
+ ["class_value"]=>
+ int(66)
+ }
+}
+bool(true)
+array(8) {
+ ["Lemon"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "Lemon"
+ }
+ ["Orange"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(6) "Orange"
+ }
+ ["aPPle"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "aPPle"
+ }
+ ["apple"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(5) "apple"
+ }
+ ["axx"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(3) "axx"
+ }
+ ["py"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(2) "py"
+ }
+ ["t"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(1) "t"
+ }
+ ["w"]=>
+ object(String)#%d (1) {
+ ["class_value"]=>
+ string(1) "w"
+ }
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation1.phpt b/ext/standard/tests/array/ksort_variation1.phpt
new file mode 100644
index 000000000..d8c037fa9
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation1.phpt
@@ -0,0 +1,397 @@
+--TEST--
+Test ksort() function : usage variations - unexpected values for 'array' argument
+--FILE--
+<?php
+/* Prototype : bool ksort(array &array [, int sort_flags])
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing ksort() by providing different unexpected values for array argument with following flag values:
+ * 1. flag value as defualt
+ * 2. SORT_REGULAR - compare items normally
+ * 3. SORT_NUMERIC - compare items numerically
+ * 4. SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// resource variable
+$fp = fopen(__FILE__, "r");
+
+$unexpected_values = array (
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 10.5e3,
+ 10.6E-2,
+ 0.5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*11*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*15*/ "",
+ '',
+
+ // string data
+/*17*/ "string",
+ 'string',
+
+ // object data
+/*19*/ new stdclass(),
+
+ // undefined data
+/*20*/ @undefined_var,
+
+ // unset data
+/*21*/ @unset_var,
+
+ // resource variable
+/*22*/ $fp
+
+);
+
+// loop though each element of the array and check the working of ksort()
+// when $array arugment is supplied with different values from $unexpected_values
+echo "\n-- Testing ksort() by supplying different unexpected values for 'array' argument --\n";
+echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
+
+$counter = 1;
+for($index = 0; $index < count($unexpected_values); $index ++) {
+ echo "-- Iteration $counter --\n";
+ $value = $unexpected_values [$index];
+ var_dump( ksort($value) ); // expecting : bool(false)
+ var_dump( ksort($value, SORT_REGULAR) ); // expecting : bool(false)
+ var_dump( ksort($value, SORT_NUMERIC) ); // expecting : bool(false)
+ var_dump( ksort($value, SORT_STRING) ); // expecting : bool(false)
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying different unexpected values for 'array' argument --
+
+-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
+-- Iteration 1 --
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+-- Iteration 11 --
+
+Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 13 --
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 14 --
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+-- Iteration 21 --
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 22 --
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 23 --
+
+Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+
+Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/ksort_variation10.phpt b/ext/standard/tests/array/ksort_variation10.phpt
new file mode 100644
index 000000000..051bc3061
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation10.phpt
@@ -0,0 +1,113 @@
+--TEST--
+Test ksort() function : usage variations - sort octal values
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing ksort() by providing array of octal values for $array argument with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+// an array containing unsorted octal values
+$unsorted_oct_array = array (
+ 01235 => 01, 0321 => 02, 0345 => 03, 066 => 04, 0772 => 05,
+ 077 => 06, -066 => -01, -0345 => -02, 0 => 0
+);
+
+echo "\n-- Testing ksort() by supplying octal value array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( ksort($temp_array) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying octal value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( ksort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying octal value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $unsorted_oct_array;
+var_dump( ksort($temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying octal value array, 'flag' value is defualt --
+bool(true)
+array(9) {
+ [-229]=>
+ int(-2)
+ [-54]=>
+ int(-1)
+ [0]=>
+ int(0)
+ [54]=>
+ int(4)
+ [63]=>
+ int(6)
+ [209]=>
+ int(2)
+ [229]=>
+ int(3)
+ [506]=>
+ int(5)
+ [669]=>
+ int(1)
+}
+
+-- Testing ksort() by supplying octal value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(9) {
+ [-229]=>
+ int(-2)
+ [-54]=>
+ int(-1)
+ [0]=>
+ int(0)
+ [54]=>
+ int(4)
+ [63]=>
+ int(6)
+ [209]=>
+ int(2)
+ [229]=>
+ int(3)
+ [506]=>
+ int(5)
+ [669]=>
+ int(1)
+}
+
+-- Testing ksort() by supplying octal value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(9) {
+ [-229]=>
+ int(-2)
+ [-54]=>
+ int(-1)
+ [0]=>
+ int(0)
+ [54]=>
+ int(4)
+ [63]=>
+ int(6)
+ [209]=>
+ int(2)
+ [229]=>
+ int(3)
+ [506]=>
+ int(5)
+ [669]=>
+ int(1)
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation11.phpt b/ext/standard/tests/array/ksort_variation11.phpt
new file mode 100644
index 000000000..347df65c4
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation11.phpt
@@ -0,0 +1,98 @@
+--TEST--
+Test ksort() function : usage variations - sort heredoc strings
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing ksort() by providing array of heredoc strings for $array argument with
+ * following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+// Different heredoc strings to be sorted
+$simple_heredoc1 =<<<EOT
+Heredoc
+EOT;
+
+$simple_heredoc2 =<<<EOT
+HEREDOC
+EOT;
+
+$multiline_heredoc =<<<EOT
+heredoc string\twith!@# and 123
+Test this!!!
+EOT;
+
+$array = array (
+ $simple_heredoc1 => "Heredoc",
+ $simple_heredoc2 => "HEREDOC",
+ $multiline_heredoc => "heredoc string\twith!@# and 123\nTest this!!!"
+);
+
+echo "\n-- Testing ksort() by supplying heredoc string array, 'flag' value is defualt --\n";
+$temp_array = $array;
+var_dump(ksort($temp_array) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying heredoc string array, 'flag' = SORT_REGULAR --\n";
+$temp_array = $array;
+var_dump(ksort($temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying heredoc string array, 'flag' = SORT_STRING --\n";
+$temp_array = $array;
+var_dump(ksort($temp_array, SORT_STRING) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying heredoc string array, 'flag' value is defualt --
+bool(true)
+array(3) {
+ ["HEREDOC"]=>
+ string(7) "HEREDOC"
+ ["Heredoc"]=>
+ string(7) "Heredoc"
+ ["heredoc string with!@# and 123
+Test this!!!"]=>
+ string(43) "heredoc string with!@# and 123
+Test this!!!"
+}
+
+-- Testing ksort() by supplying heredoc string array, 'flag' = SORT_REGULAR --
+bool(true)
+array(3) {
+ ["HEREDOC"]=>
+ string(7) "HEREDOC"
+ ["Heredoc"]=>
+ string(7) "Heredoc"
+ ["heredoc string with!@# and 123
+Test this!!!"]=>
+ string(43) "heredoc string with!@# and 123
+Test this!!!"
+}
+
+-- Testing ksort() by supplying heredoc string array, 'flag' = SORT_STRING --
+bool(true)
+array(3) {
+ ["HEREDOC"]=>
+ string(7) "HEREDOC"
+ ["Heredoc"]=>
+ string(7) "Heredoc"
+ ["heredoc string with!@# and 123
+Test this!!!"]=>
+ string(43) "heredoc string with!@# and 123
+Test this!!!"
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation2.phpt b/ext/standard/tests/array/ksort_variation2.phpt
new file mode 100644
index 000000000..f765977d2
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation2.phpt
@@ -0,0 +1,307 @@
+--TEST--
+Test ksort() function : usage variations - unexpected values for 'sort_flags' argument
+--FILE--
+<?php
+/* Prototype : bool ksort(array &array_arg [, int sort_flags])
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing ksort() by providing different unexpected values for flag argument
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// resource variable
+$fp = fopen(__FILE__, "r");
+
+// an array for checking unexpected behavior
+$unsorted_values = array(10 => 10, 2 => 2, 45 => 45);
+
+//array of unexpected values to iterate over
+$unexpected_values = array (
+
+ // int data
+/*1*/ -2345,
+
+ // float data
+/*2*/ 10.5,
+ -10.5,
+ 10.5e2,
+ 10.6E-2,
+ .5,
+
+ // null data
+/*7*/ NULL,
+ null,
+
+ // boolean data
+/*9*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*13*/ "",
+ '',
+
+ // string data
+/*15*/ "string",
+ 'string',
+
+ // object data
+/*16*/ new stdclass(),
+
+ // undefined data
+/*17*/ @undefined_var,
+
+ // unset data
+/*18*/ @unset_var,
+
+ // resource variable
+/*19*/ $fp
+
+);
+
+// loop though each element of the array and check the working of ksort()
+// when 'sort_flags' arugment is supplied with different values
+echo "\n-- Testing ksort() by supplying different unexpected values for 'sort_flags' argument --\n";
+
+$counter = 1;
+for($index = 0; $index < count($unexpected_values); $index ++) {
+ echo "-- Iteration $counter --\n";
+ $value = $unexpected_values [$index];
+ $temp_array = $unsorted_values;
+ var_dump( ksort($temp_array, $value) );
+ var_dump($temp_array);
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying different unexpected values for 'sort_flags' argument --
+-- Iteration 1 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 2 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 3 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 4 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 5 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 6 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 7 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 8 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 9 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 10 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 11 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 12 --
+bool(true)
+array(3) {
+ [2]=>
+ int(2)
+ [10]=>
+ int(10)
+ [45]=>
+ int(45)
+}
+-- Iteration 13 --
+
+Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 14 --
+
+Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 15 --
+
+Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 16 --
+
+Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 17 --
+
+Warning: ksort() expects parameter 2 to be long, object given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 18 --
+
+Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 19 --
+
+Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+-- Iteration 20 --
+
+Warning: ksort() expects parameter 2 to be long, resource given in %s on line %d
+bool(false)
+array(3) {
+ [10]=>
+ int(10)
+ [2]=>
+ int(2)
+ [45]=>
+ int(45)
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation3.phpt b/ext/standard/tests/array/ksort_variation3.phpt
new file mode 100644
index 000000000..4029b9b8d
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation3.phpt
@@ -0,0 +1,262 @@
+--TEST--
+Test ksort() function : usage variations - sort integer/float values
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing ksort() by providing array of integer/float/mixed values for $array argument
+ * with following flag values:
+ * 1. flag value as defualt
+ * 2. SORT_REGULAR - compare items normally
+ * 3. SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+// diff. associative arrays to sort
+$various_arrays = array(
+ // negative/posative integer key value array
+ array(1 => 11, -2 => -11, 3 => 21, -4 => -21, 5 => 31, -6 => -31, 7 => 0, 8 => 41, -10 =>-41),
+
+ // float key values
+ array(1.0 => 10.5, 0.2 => -10.5, 3.1 => 10.5e2, 4 => 10.6E-2, .5 => .5, 6 => .0001, -7 => -.1),
+
+ // mixed value array with different types of keys
+ array(1 => .0001, 2 => .0021, -3 => -.01, 4 => -1, 5 => 0, 6 => .09, 7 => 2, -8 => -.9,
+ 9 => 10.6E-2, -10 => -10.6E-2, 11 => 33)
+);
+
+// set of possible flag values
+$flags = array("SORT_REGULAR" => SORT_REGULAR, "SORT_NUMERIC" => SORT_NUMERIC);
+
+$count = 1;
+echo "\n-- Testing ksort() by supplying various integer/float arrays --\n";
+
+// loop through to test ksort() with different arrays
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump(ksort($temp_array) );
+ var_dump($temp_array);
+
+ // loop through $flags array and call ksort() with all possible sort flag values
+ foreach($flags as $key => $flag){
+ echo "- Sort flag = $key -\n";
+ $temp_array = $array;
+ var_dump(ksort($temp_array, $flag) );
+ var_dump($temp_array);
+ }
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying various integer/float arrays --
+
+-- Iteration 1 --
+- With defualt sort flag -
+bool(true)
+array(9) {
+ [-10]=>
+ int(-41)
+ [-6]=>
+ int(-31)
+ [-4]=>
+ int(-21)
+ [-2]=>
+ int(-11)
+ [1]=>
+ int(11)
+ [3]=>
+ int(21)
+ [5]=>
+ int(31)
+ [7]=>
+ int(0)
+ [8]=>
+ int(41)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(9) {
+ [-10]=>
+ int(-41)
+ [-6]=>
+ int(-31)
+ [-4]=>
+ int(-21)
+ [-2]=>
+ int(-11)
+ [1]=>
+ int(11)
+ [3]=>
+ int(21)
+ [5]=>
+ int(31)
+ [7]=>
+ int(0)
+ [8]=>
+ int(41)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(9) {
+ [-10]=>
+ int(-41)
+ [-6]=>
+ int(-31)
+ [-4]=>
+ int(-21)
+ [-2]=>
+ int(-11)
+ [1]=>
+ int(11)
+ [3]=>
+ int(21)
+ [5]=>
+ int(31)
+ [7]=>
+ int(0)
+ [8]=>
+ int(41)
+}
+
+-- Iteration 2 --
+- With defualt sort flag -
+bool(true)
+array(6) {
+ [-7]=>
+ float(-0.1)
+ [0]=>
+ float(0.5)
+ [1]=>
+ float(10.5)
+ [3]=>
+ float(1050)
+ [4]=>
+ float(0.106)
+ [6]=>
+ float(0.0001)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(6) {
+ [-7]=>
+ float(-0.1)
+ [0]=>
+ float(0.5)
+ [1]=>
+ float(10.5)
+ [3]=>
+ float(1050)
+ [4]=>
+ float(0.106)
+ [6]=>
+ float(0.0001)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(6) {
+ [-7]=>
+ float(-0.1)
+ [0]=>
+ float(0.5)
+ [1]=>
+ float(10.5)
+ [3]=>
+ float(1050)
+ [4]=>
+ float(0.106)
+ [6]=>
+ float(0.0001)
+}
+
+-- Iteration 3 --
+- With defualt sort flag -
+bool(true)
+array(11) {
+ [-10]=>
+ float(-0.106)
+ [-8]=>
+ float(-0.9)
+ [-3]=>
+ float(-0.01)
+ [1]=>
+ float(0.0001)
+ [2]=>
+ float(0.0021)
+ [4]=>
+ int(-1)
+ [5]=>
+ int(0)
+ [6]=>
+ float(0.09)
+ [7]=>
+ int(2)
+ [9]=>
+ float(0.106)
+ [11]=>
+ int(33)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ [-10]=>
+ float(-0.106)
+ [-8]=>
+ float(-0.9)
+ [-3]=>
+ float(-0.01)
+ [1]=>
+ float(0.0001)
+ [2]=>
+ float(0.0021)
+ [4]=>
+ int(-1)
+ [5]=>
+ int(0)
+ [6]=>
+ float(0.09)
+ [7]=>
+ int(2)
+ [9]=>
+ float(0.106)
+ [11]=>
+ int(33)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(11) {
+ [-10]=>
+ float(-0.106)
+ [-8]=>
+ float(-0.9)
+ [-3]=>
+ float(-0.01)
+ [1]=>
+ float(0.0001)
+ [2]=>
+ float(0.0021)
+ [4]=>
+ int(-1)
+ [5]=>
+ int(0)
+ [6]=>
+ float(0.09)
+ [7]=>
+ int(2)
+ [9]=>
+ float(0.106)
+ [11]=>
+ int(33)
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation4.phpt b/ext/standard/tests/array/ksort_variation4.phpt
new file mode 100644
index 000000000..d6b3f482b
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation4.phpt
@@ -0,0 +1,81 @@
+--TEST--
+Test ksort() function : usage variations - sort bool values
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing ksort() by providing array of boolean values for $array argument with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+// bool value array
+$bool_values = array (true => true, false => false, TRUE => TRUE, FALSE => FALSE);
+
+echo "\n-- Testing ksort() by supplying boolean value array, 'flag' value is defualt --\n";
+$temp_array = $bool_values;
+var_dump(ksort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying boolean value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $bool_values;
+var_dump(ksort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying boolean value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $bool_values;
+var_dump(ksort($temp_array, SORT_NUMERIC) );
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying boolean value array, 'flag' value is SORT_STRING --\n";
+$temp_array = $bool_values;
+var_dump(ksort($temp_array, SORT_STRING) );
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying boolean value array, 'flag' value is defualt --
+bool(true)
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+
+-- Testing ksort() by supplying boolean value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+
+-- Testing ksort() by supplying boolean value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+
+-- Testing ksort() by supplying boolean value array, 'flag' value is SORT_STRING --
+bool(true)
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(true)
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation5.phpt b/ext/standard/tests/array/ksort_variation5.phpt
new file mode 100644
index 000000000..958476c01
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation5.phpt
@@ -0,0 +1,230 @@
+--TEST--
+Test ksort() function : usage variations - sort strings
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing ksort() by providing array of string values for $array argument with
+ * following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_STRING - compare items as strings
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+$various_arrays = array (
+ // diff. escape sequence chars with key values
+ array ( null => null, NULL => NULL, "\a" => "\a", "\cx" => "\cx", "\e" => "\e",
+ "\f" => "\f", "\n" =>"\n", "\r" => "\r", "\t" => "\t", "\xhh" => "\xhh",
+ "\ddd" => "\ddd", "\v" => "\v"
+ ),
+
+ // array containing different strings with key values
+ array ( 'Lemon' => "lemoN", 'o' => "Orange", 'B' => "banana", 'Apple' => "apple", 'te' => "Test",
+ 't' => "TTTT", 'T' => "ttt", 'W' => "ww", 'X' => "x", 'x' => "X", 'O' => "oraNGe",
+ 'B' => "BANANA"
+ )
+);
+
+$flags = array("SORT_REGULAR" => SORT_REGULAR, "SORT_STRING" => SORT_STRING);
+
+$count = 1;
+echo "\n-- Testing ksort() by supplying various string arrays --\n";
+
+// loop through to test ksort() with different arrays
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump(ksort($temp_array) ); // expecting : bool(true)
+ var_dump($temp_array);
+
+ // loop through $flags array and call ksort() with all possible sort flag values
+ foreach($flags as $key => $flag){
+ echo "- Sort flag = $key -\n";
+ $temp_array = $array;
+ var_dump(ksort($temp_array, $flag) ); // expecting : bool(true)
+ var_dump($temp_array);
+ }
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying various string arrays --
+
+-- Iteration 1 --
+- With defualt sort flag -
+bool(true)
+array(11) {
+ [""]=>
+ NULL
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["\a"]=>
+ string(2) "\a"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\e"]=>
+ string(2) "\e"
+ ["\xhh"]=>
+ string(4) "\xhh"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ [""]=>
+ NULL
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["\a"]=>
+ string(2) "\a"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\e"]=>
+ string(2) "\e"
+ ["\xhh"]=>
+ string(4) "\xhh"
+}
+- Sort flag = SORT_STRING -
+bool(true)
+array(11) {
+ [""]=>
+ NULL
+ [" "]=>
+ string(1) " "
+ ["
+"]=>
+ string(1) "
+"
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ [" "]=>
+ string(1) " "
+ ["\a"]=>
+ string(2) "\a"
+ ["\cx"]=>
+ string(3) "\cx"
+ ["\ddd"]=>
+ string(4) "\ddd"
+ ["\e"]=>
+ string(2) "\e"
+ ["\xhh"]=>
+ string(4) "\xhh"
+}
+
+-- Iteration 2 --
+- With defualt sort flag -
+bool(true)
+array(11) {
+ ["Apple"]=>
+ string(5) "apple"
+ ["B"]=>
+ string(6) "BANANA"
+ ["Lemon"]=>
+ string(5) "lemoN"
+ ["O"]=>
+ string(6) "oraNGe"
+ ["T"]=>
+ string(3) "ttt"
+ ["W"]=>
+ string(2) "ww"
+ ["X"]=>
+ string(1) "x"
+ ["o"]=>
+ string(6) "Orange"
+ ["t"]=>
+ string(4) "TTTT"
+ ["te"]=>
+ string(4) "Test"
+ ["x"]=>
+ string(1) "X"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ ["Apple"]=>
+ string(5) "apple"
+ ["B"]=>
+ string(6) "BANANA"
+ ["Lemon"]=>
+ string(5) "lemoN"
+ ["O"]=>
+ string(6) "oraNGe"
+ ["T"]=>
+ string(3) "ttt"
+ ["W"]=>
+ string(2) "ww"
+ ["X"]=>
+ string(1) "x"
+ ["o"]=>
+ string(6) "Orange"
+ ["t"]=>
+ string(4) "TTTT"
+ ["te"]=>
+ string(4) "Test"
+ ["x"]=>
+ string(1) "X"
+}
+- Sort flag = SORT_STRING -
+bool(true)
+array(11) {
+ ["Apple"]=>
+ string(5) "apple"
+ ["B"]=>
+ string(6) "BANANA"
+ ["Lemon"]=>
+ string(5) "lemoN"
+ ["O"]=>
+ string(6) "oraNGe"
+ ["T"]=>
+ string(3) "ttt"
+ ["W"]=>
+ string(2) "ww"
+ ["X"]=>
+ string(1) "x"
+ ["o"]=>
+ string(6) "Orange"
+ ["t"]=>
+ string(4) "TTTT"
+ ["te"]=>
+ string(4) "Test"
+ ["x"]=>
+ string(1) "X"
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation6.phpt b/ext/standard/tests/array/ksort_variation6.phpt
new file mode 100644
index 000000000..1243ab123
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation6.phpt
@@ -0,0 +1,114 @@
+--TEST--
+Test ksort() function : usage variations - sort hexadecimal values
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing ksort() by providing array of hexa-decimal values for $array argument with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ * 3.SORT_NUMERIC - compare items numerically
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+// an array containng unsorted hexadecimal values with keys
+// There are multiple keys which are duplicate and the later should be picked
+$unsorted_hex_array = array (
+ 0x1AB => 0x1AB, 0xFFF => 0xFFF, 0xF => 0xF, 0xFF => 0xFF, 0x2AA => 0x2AA, 0xBB => 0xBB,
+ 0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
+);
+
+echo "\n-- Testing ksort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(ksort( $temp_array) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(ksort( $temp_array, SORT_REGULAR) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "\n-- Testing ksort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(ksort( $temp_array, SORT_NUMERIC) ); // expecting : bool(true)
+var_dump($temp_array);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying hexadecimal value array, 'flag' value is defualt --
+bool(true)
+array(9) {
+ [-682]=>
+ int(-682)
+ [-255]=>
+ int(-255)
+ [0]=>
+ int(0)
+ [15]=>
+ int(15)
+ [187]=>
+ int(187)
+ [255]=>
+ int(255)
+ [427]=>
+ int(427)
+ [682]=>
+ int(682)
+ [4095]=>
+ int(4095)
+}
+
+-- Testing ksort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --
+bool(true)
+array(9) {
+ [-682]=>
+ int(-682)
+ [-255]=>
+ int(-255)
+ [0]=>
+ int(0)
+ [15]=>
+ int(15)
+ [187]=>
+ int(187)
+ [255]=>
+ int(255)
+ [427]=>
+ int(427)
+ [682]=>
+ int(682)
+ [4095]=>
+ int(4095)
+}
+
+-- Testing ksort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --
+bool(true)
+array(9) {
+ [-682]=>
+ int(-682)
+ [-255]=>
+ int(-255)
+ [0]=>
+ int(0)
+ [15]=>
+ int(15)
+ [187]=>
+ int(187)
+ [255]=>
+ int(255)
+ [427]=>
+ int(427)
+ [682]=>
+ int(682)
+ [4095]=>
+ int(4095)
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation7.phpt b/ext/standard/tests/array/ksort_variation7.phpt
new file mode 100644
index 000000000..a0f454bbd
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation7.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test ksort() function : usage variations - sort array with diff. sub arrays
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * testing ksort() by providing arrays containing sub arrays for $array argument
+ * with flowing flag values:
+ * 1. flag value as defualt
+ * 2. SORT_REGULAR - compare items normally
+*/
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+// array with diff sub arrays to be sorted
+$various_arrays = array (
+ // null array
+ 1 => array(),
+
+ // array contains null sub array
+ 2 => array( 1 => array() ),
+
+ // array of arrays along with some values
+ 3 => array(4 => 44, 1 => 11, 3 => array(64,61) ),
+
+ // array contains sub arrays
+ 4 => array ( 3 => array(33,-5,6), 1 => array(11),
+ 2 => array(22,-55), 0 => array() )
+);
+
+
+$count = 1;
+echo "\n-- Testing ksort() by supplying various arrays containing sub arrays --\n";
+
+// loop through to test ksort() with different arrays
+foreach ($various_arrays as $array) {
+
+ echo "\n-- Iteration $count --\n";
+ echo "- With defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump( ksort($temp_array) );
+ var_dump($temp_array);
+
+ echo "- Sort flag = SORT_REGULAR -\n";
+ $temp_array = $array;
+ var_dump( ksort($temp_array, SORT_REGULAR) );
+ var_dump($temp_array);
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying various arrays containing sub arrays --
+
+-- Iteration 1 --
+- With defualt sort flag -
+bool(true)
+array(0) {
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(0) {
+}
+
+-- Iteration 2 --
+- With defualt sort flag -
+bool(true)
+array(1) {
+ [1]=>
+ array(0) {
+ }
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(1) {
+ [1]=>
+ array(0) {
+ }
+}
+
+-- Iteration 3 --
+- With defualt sort flag -
+bool(true)
+array(3) {
+ [1]=>
+ int(11)
+ [3]=>
+ array(2) {
+ [0]=>
+ int(64)
+ [1]=>
+ int(61)
+ }
+ [4]=>
+ int(44)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ [1]=>
+ int(11)
+ [3]=>
+ array(2) {
+ [0]=>
+ int(64)
+ [1]=>
+ int(61)
+ }
+ [4]=>
+ int(44)
+}
+
+-- Iteration 4 --
+- With defualt sort flag -
+bool(true)
+array(4) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(4) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+}
+Done
diff --git a/ext/standard/tests/array/ksort_variation8.phpt b/ext/standard/tests/array/ksort_variation8.phpt
new file mode 100644
index 000000000..787e71d61
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation8.phpt
Binary files differ
diff --git a/ext/standard/tests/array/ksort_variation9.phpt b/ext/standard/tests/array/ksort_variation9.phpt
new file mode 100644
index 000000000..ed406e20b
--- /dev/null
+++ b/ext/standard/tests/array/ksort_variation9.phpt
@@ -0,0 +1,256 @@
+--TEST--
+Test ksort() function : usage variations - sorting arrays with/without keys
+--FILE--
+<?php
+/* Prototype : bool ksort ( array &$array [, int $sort_flags] )
+ * Description: Sort an array by key, maintaining key to data correlation.
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing ksort() by providing arrays with/without key values for $array argument with following flag values:
+ * 1.flag value as defualt
+ * 2.SORT_REGULAR - compare items normally
+ */
+
+echo "*** Testing ksort() : usage variations ***\n";
+
+// list of arrays with/without key values
+$various_arrays = array (
+ array(5 => 55, 66, 22, 33, 11),
+ array ("a" => "orange", "banana", "c" => "apple"),
+ array(1, 2, 3, 4, 5, 6),
+ array("first", 5 => "second", 1 => "third"),
+ array(1, 1, 8 => 1, 4 => 1, 19, 3 => 13),
+ array('bar' => 'baz', "foo" => 1),
+ array('a' => 1,'b' => array('e' => 2,'f' => 3),'c' => array('g' => 4),'d' => 5),
+);
+
+$count = 1;
+echo "\n-- Testing ksort() by supplying various arrays with/without key values --\n";
+
+// loop through to test ksort() with different arrays,
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump( ksort($temp_array) );
+ var_dump($temp_array);
+
+ echo "- Sort flag = SORT_REGULAR -\n";
+ $temp_array = $array;
+ var_dump( ksort($temp_array, SORT_REGULAR) );
+ var_dump($temp_array);
+ $count++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ksort() : usage variations ***
+
+-- Testing ksort() by supplying various arrays with/without key values --
+
+-- Iteration 1 --
+- With defualt sort flag -
+bool(true)
+array(5) {
+ [5]=>
+ int(55)
+ [6]=>
+ int(66)
+ [7]=>
+ int(22)
+ [8]=>
+ int(33)
+ [9]=>
+ int(11)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(5) {
+ [5]=>
+ int(55)
+ [6]=>
+ int(66)
+ [7]=>
+ int(22)
+ [8]=>
+ int(33)
+ [9]=>
+ int(11)
+}
+
+-- Iteration 2 --
+- With defualt sort flag -
+bool(true)
+array(3) {
+ ["c"]=>
+ string(5) "apple"
+ [0]=>
+ string(6) "banana"
+ ["a"]=>
+ string(6) "orange"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ ["c"]=>
+ string(5) "apple"
+ [0]=>
+ string(6) "banana"
+ ["a"]=>
+ string(6) "orange"
+}
+
+-- Iteration 3 --
+- With defualt sort flag -
+bool(true)
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ [4]=>
+ int(5)
+ [5]=>
+ int(6)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ [4]=>
+ int(5)
+ [5]=>
+ int(6)
+}
+
+-- Iteration 4 --
+- With defualt sort flag -
+bool(true)
+array(3) {
+ [0]=>
+ string(5) "first"
+ [1]=>
+ string(5) "third"
+ [5]=>
+ string(6) "second"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(3) {
+ [0]=>
+ string(5) "first"
+ [1]=>
+ string(5) "third"
+ [5]=>
+ string(6) "second"
+}
+
+-- Iteration 5 --
+- With defualt sort flag -
+bool(true)
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [3]=>
+ int(13)
+ [4]=>
+ int(1)
+ [8]=>
+ int(1)
+ [9]=>
+ int(19)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [3]=>
+ int(13)
+ [4]=>
+ int(1)
+ [8]=>
+ int(1)
+ [9]=>
+ int(19)
+}
+
+-- Iteration 6 --
+- With defualt sort flag -
+bool(true)
+array(2) {
+ ["bar"]=>
+ string(3) "baz"
+ ["foo"]=>
+ int(1)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(2) {
+ ["bar"]=>
+ string(3) "baz"
+ ["foo"]=>
+ int(1)
+}
+
+-- Iteration 7 --
+- With defualt sort flag -
+bool(true)
+array(4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ array(2) {
+ ["e"]=>
+ int(2)
+ ["f"]=>
+ int(3)
+ }
+ ["c"]=>
+ array(1) {
+ ["g"]=>
+ int(4)
+ }
+ ["d"]=>
+ int(5)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ array(2) {
+ ["e"]=>
+ int(2)
+ ["f"]=>
+ int(3)
+ }
+ ["c"]=>
+ array(1) {
+ ["g"]=>
+ int(4)
+ }
+ ["d"]=>
+ int(5)
+}
+Done
diff --git a/ext/standard/tests/array/natcasesort_basic.phpt b/ext/standard/tests/array/natcasesort_basic.phpt
new file mode 100644
index 000000000..cf6cc5728
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_basic.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test natcasesort() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of natcasesort()
+ */
+
+echo "*** Testing natcasesort() : basic functionality ***\n";
+
+$array = array ('A01', 'a1', 'b10', 'a01', 'b01');
+echo "\n-- Before sorting: --\n";
+var_dump($array);
+
+echo "\n-- After Sorting: --\n";
+var_dump(natcasesort($array));
+var_dump($array);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing natcasesort() : basic functionality ***
+
+-- Before sorting: --
+array(5) {
+ [0]=>
+ string(3) "A01"
+ [1]=>
+ string(2) "a1"
+ [2]=>
+ string(3) "b10"
+ [3]=>
+ string(3) "a01"
+ [4]=>
+ string(3) "b01"
+}
+
+-- After Sorting: --
+bool(true)
+array(5) {
+ [3]=>
+ string(3) "a01"
+ [0]=>
+ string(3) "A01"
+ [1]=>
+ string(2) "a1"
+ [4]=>
+ string(3) "b01"
+ [2]=>
+ string(3) "b10"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_error.phpt b/ext/standard/tests/array/natcasesort_error.phpt
new file mode 100644
index 000000000..0f18677ca
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_error.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test natcasesort() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to natcasesort() to test behaviour
+ */
+
+echo "*** Testing natcasesort() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing natcasesort() function with Zero arguments --\n";
+var_dump( natcasesort() );
+
+// Test natcasesort with one more than the expected number of arguments
+echo "\n-- Testing natcasesort() function with more than expected no. of arguments --\n";
+$array_arg = array(1, 2);
+$extra_arg = 10;
+var_dump( natcasesort($array_arg, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing natcasesort() : error conditions ***
+
+-- Testing natcasesort() function with Zero arguments --
+
+Warning: Wrong parameter count for natcasesort() in %s on line %d
+NULL
+
+-- Testing natcasesort() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for natcasesort() in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_object1.phpt b/ext/standard/tests/array/natcasesort_object1.phpt
new file mode 100644
index 000000000..aab98a45d
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_object1.phpt
@@ -0,0 +1,99 @@
+--TEST--
+Test natcasesort() function : object functionality - array of objects
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass natcasesort() an array of objects to test how it re-orders them
+ */
+
+echo "*** Testing natcasesort() : object functionality ***\n";
+
+// class declaration for string objects
+class for_string_natcasesort
+{
+ public $class_value;
+ // initializing object member value
+ function __construct($value){
+ $this->class_value = $value;
+ }
+
+ // return string value
+ function __tostring() {
+ return (string)$this->class_value;
+ }
+
+}
+
+
+
+// array of string objects
+$unsorted_str_obj = array (
+ new for_string_natcasesort("axx"), new for_string_natcasesort("t"),
+ new for_string_natcasesort("w"), new for_string_natcasesort("py"),
+ new for_string_natcasesort("apple"), new for_string_natcasesort("Orange"),
+ new for_string_natcasesort("Lemon"), new for_string_natcasesort("aPPle")
+);
+
+
+echo "\n-- Testing natcasesort() by supplying various object arrays --\n";
+
+// testing natcasesort() function by supplying string object array
+var_dump(natcasesort($unsorted_str_obj) );
+var_dump($unsorted_str_obj);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing natcasesort() : object functionality ***
+
+-- Testing natcasesort() by supplying various object arrays --
+bool(true)
+array(8) {
+ [4]=>
+ object(for_string_natcasesort)#%d (1) {
+ ["class_value"]=>
+ string(5) "apple"
+ }
+ [7]=>
+ object(for_string_natcasesort)#%d (1) {
+ ["class_value"]=>
+ string(5) "aPPle"
+ }
+ [0]=>
+ object(for_string_natcasesort)#%d (1) {
+ ["class_value"]=>
+ string(3) "axx"
+ }
+ [6]=>
+ object(for_string_natcasesort)#%d (1) {
+ ["class_value"]=>
+ string(5) "Lemon"
+ }
+ [5]=>
+ object(for_string_natcasesort)#%d (1) {
+ ["class_value"]=>
+ string(6) "Orange"
+ }
+ [3]=>
+ object(for_string_natcasesort)#%d (1) {
+ ["class_value"]=>
+ string(2) "py"
+ }
+ [1]=>
+ object(for_string_natcasesort)#%d (1) {
+ ["class_value"]=>
+ string(1) "t"
+ }
+ [2]=>
+ object(for_string_natcasesort)#%d (1) {
+ ["class_value"]=>
+ string(1) "w"
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_object2.phpt b/ext/standard/tests/array/natcasesort_object2.phpt
new file mode 100644
index 000000000..2b4acec25
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_object2.phpt
@@ -0,0 +1,99 @@
+--TEST--
+Test natcasesort() function : object functionality - mixed visibility within objects
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass natcasesort() an array of objects which have properties of different
+ * visibilities to test how it re-orders the array.
+ */
+
+echo "*** Testing natcasesort() : object functionality ***\n";
+
+// class declaration for string objects
+class for_string_natcasesort
+{
+ public $public_class_value;
+ private $private_class_value;
+ protected $protected_class_value;
+ // initializing object member value
+ function __construct($value1, $value2,$value3){
+ $this->public_class_value = $value1;
+ $this->private_class_value = $value2;
+ $this->protected_class_value = $value3;
+ }
+
+ // return string value
+ function __tostring() {
+ return (string)$this->public_class_value;
+ }
+
+}
+
+// array of string objects
+$unsorted_str_obj = array (
+new for_string_natcasesort("axx","AXX","ass"),
+new for_string_natcasesort("t","eee","abb"),
+new for_string_natcasesort("w","W", "c"),
+new for_string_natcasesort("py","PY", "pt"),
+);
+
+
+echo "\n-- Testing natcasesort() by supplying object arrays --\n";
+
+// testing natcasesort() function by supplying string object array
+$temp_array = $unsorted_str_obj;
+var_dump(natcasesort($temp_array) );
+var_dump($temp_array);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing natcasesort() : object functionality ***
+
+-- Testing natcasesort() by supplying object arrays --
+bool(true)
+array(4) {
+ [0]=>
+ object(for_string_natcasesort)#%d (3) {
+ ["public_class_value"]=>
+ string(3) "axx"
+ ["private_class_value:private"]=>
+ string(3) "AXX"
+ ["protected_class_value:protected"]=>
+ string(3) "ass"
+ }
+ [3]=>
+ object(for_string_natcasesort)#%d (3) {
+ ["public_class_value"]=>
+ string(2) "py"
+ ["private_class_value:private"]=>
+ string(2) "PY"
+ ["protected_class_value:protected"]=>
+ string(2) "pt"
+ }
+ [1]=>
+ object(for_string_natcasesort)#%d (3) {
+ ["public_class_value"]=>
+ string(1) "t"
+ ["private_class_value:private"]=>
+ string(3) "eee"
+ ["protected_class_value:protected"]=>
+ string(3) "abb"
+ }
+ [2]=>
+ object(for_string_natcasesort)#%d (3) {
+ ["public_class_value"]=>
+ string(1) "w"
+ ["private_class_value:private"]=>
+ string(1) "W"
+ ["protected_class_value:protected"]=>
+ string(1) "c"
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_variation1.phpt b/ext/standard/tests/array/natcasesort_variation1.phpt
new file mode 100644
index 000000000..f6019508c
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation1.phpt
@@ -0,0 +1,220 @@
+--TEST--
+Test natcasesort() function : usage variations - Pass different data types as $array_arg arg
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $array_arg argument to natcasesort() to test behaviour
+ */
+
+echo "*** Testing natcasesort() : usage variation ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of natcasesort()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( natcasesort($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing natcasesort() : usage variation ***
+
+-- Iteration 1 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 18 --
+bool(true)
+
+-- Iteration 19 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 22 --
+bool(true)
+
+-- Iteration 23 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: natcasesort(): The argument should be an array in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_variation10.phpt b/ext/standard/tests/array/natcasesort_variation10.phpt
new file mode 100644
index 000000000..cffa007b7
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation10.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test natcasesort() function : usage variations - position of internal array pointer
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Check position of internal array pointer after calling natcasesort()
+ */
+
+echo "*** Testing natcasesort() : usage variations ***\n";
+
+$array_arg = array ('img13', 'img20', 'img2', 'img1');
+
+echo "\n-- Initial Position of Internal Pointer: --\n";
+echo key($array_arg) . " => " . current ($array_arg) . "\n";
+
+echo "\n-- Call natcasesort() --\n";
+var_dump(natcasesort($array_arg));
+var_dump($array_arg);
+
+echo "\n-- Position of Internal Pointer in Passed Array: --\n";
+echo key($array_arg) . " => " . current ($array_arg) . "\n";
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing natcasesort() : usage variations ***
+
+-- Initial Position of Internal Pointer: --
+0 => img13
+
+-- Call natcasesort() --
+bool(true)
+array(4) {
+ [3]=>
+ string(4) "img1"
+ [2]=>
+ string(4) "img2"
+ [0]=>
+ string(5) "img13"
+ [1]=>
+ string(5) "img20"
+}
+
+-- Position of Internal Pointer in Passed Array: --
+3 => img1
+Done
diff --git a/ext/standard/tests/array/natcasesort_variation11.phpt b/ext/standard/tests/array/natcasesort_variation11.phpt
new file mode 100644
index 000000000..98158f15d
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation11.phpt
@@ -0,0 +1,232 @@
+--TEST--
+Test natcasesort() function : usage variations - Different array keys
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays where the keys are different data types to test behaviour of natcasesort()
+ */
+
+echo "*** Testing natcasesort() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// arrays with keys as different data types to be passed as $array_arg
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0 => 'zero',
+ 1 => 'one',
+ 12345 => 'positive',
+ -2345 => 'negative',
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5 => 'positive',
+ -10.5 => 'negative',
+ .5 => 'half',
+ ),
+
+/*3*/ 'extreme floats' => array(
+ 12.3456789000e6 => 'large',
+ 12.3456789000E-10 => 'small',
+ ),
+
+ // null data
+/*4*/ 'null uppercase' => array(
+ NULL => 'null 1',
+ ),
+
+/*5*/ 'null lowercase' => array(
+ null => 'null 2',
+ ),
+
+ // boolean data
+/*6*/ 'bool lowercase' => array(
+ true => 'lowert',
+ false => 'lowerf',
+ ),
+
+/*7*/ 'bool uppercase' => array(
+ TRUE => 'uppert',
+ FALSE => 'upperf',
+ ),
+
+ // empty data
+/*8*/ 'empty double quotes' => array(
+ "" => 'emptyd',
+ ),
+
+/*9*/ 'empty single quotes' => array(
+ '' => 'emptys',
+ ),
+
+ // string data
+/*10*/ 'string' => array(
+ "stringd" => 'stringd',
+ 'strings' => 'strings',
+ $heredoc => 'stringh',
+ ),
+
+ // undefined data
+/*11*/ 'undefined' => array(
+ @$undefined_var => 'undefined',
+ ),
+
+ // unset data
+/*12*/ 'unset' => array(
+ @$unset_var => 'unset',
+ ),
+
+ // duplicate values
+/*13*/ 'duplicate' => array(
+ 'foo' => 'bar',
+ 'baz' => 'bar',
+ 'hello' => 'world'
+ ),
+
+);
+
+// loop through each element of $inputs to check the behavior of natcasesort()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( natcasesort($input) );
+ var_dump($input);
+ $iterator++;
+};
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing natcasesort() : usage variations ***
+
+-- Iteration 1 --
+bool(true)
+array(4) {
+ [-2345]=>
+ string(8) "negative"
+ [1]=>
+ string(3) "one"
+ [12345]=>
+ string(8) "positive"
+ [0]=>
+ string(4) "zero"
+}
+
+-- Iteration 2 --
+bool(true)
+array(3) {
+ [0]=>
+ string(4) "half"
+ [-10]=>
+ string(8) "negative"
+ [10]=>
+ string(8) "positive"
+}
+
+-- Iteration 3 --
+bool(true)
+array(2) {
+ [12345678]=>
+ string(5) "large"
+ [0]=>
+ string(5) "small"
+}
+
+-- Iteration 4 --
+bool(true)
+array(1) {
+ [""]=>
+ string(6) "null 1"
+}
+
+-- Iteration 5 --
+bool(true)
+array(1) {
+ [""]=>
+ string(6) "null 2"
+}
+
+-- Iteration 6 --
+bool(true)
+array(2) {
+ [0]=>
+ string(6) "lowerf"
+ [1]=>
+ string(6) "lowert"
+}
+
+-- Iteration 7 --
+bool(true)
+array(2) {
+ [0]=>
+ string(6) "upperf"
+ [1]=>
+ string(6) "uppert"
+}
+
+-- Iteration 8 --
+bool(true)
+array(1) {
+ [""]=>
+ string(6) "emptyd"
+}
+
+-- Iteration 9 --
+bool(true)
+array(1) {
+ [""]=>
+ string(6) "emptys"
+}
+
+-- Iteration 10 --
+bool(true)
+array(3) {
+ ["stringd"]=>
+ string(7) "stringd"
+ ["hello world"]=>
+ string(7) "stringh"
+ ["strings"]=>
+ string(7) "strings"
+}
+
+-- Iteration 11 --
+bool(true)
+array(1) {
+ [""]=>
+ string(9) "undefined"
+}
+
+-- Iteration 12 --
+bool(true)
+array(1) {
+ [""]=>
+ string(5) "unset"
+}
+
+-- Iteration 13 --
+bool(true)
+array(3) {
+ ["foo"]=>
+ string(3) "bar"
+ ["baz"]=>
+ string(3) "bar"
+ ["hello"]=>
+ string(5) "world"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_variation2.phpt b/ext/standard/tests/array/natcasesort_variation2.phpt
new file mode 100644
index 000000000..00edf9434
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation2.phpt
@@ -0,0 +1,227 @@
+--TEST--
+Test natcasesort() function : usage variations - Pass arrays of different data types
+--FILE--
+<?php
+
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays of different data types to natcasesort() to test how they are sorted
+ */
+
+echo "*** Testing natcasesort() : usage variation ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// arrays of different data types to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 'int' => array(
+ 0,
+ 1,
+ 12345,
+ -2345,
+ ),
+
+ // float data
+/*2*/ 'float' => array(
+ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+ ),
+
+ // null data
+/*3*/ 'null' => array(
+ NULL,
+ null,
+ ),
+
+ // boolean data
+/*4*/ 'bool' => array(
+ true,
+ false,
+ TRUE,
+ FALSE,
+ ),
+
+ // empty data
+/*5*/ 'empty string' => array(
+ "",
+ '',
+ ),
+
+/*6*/ 'empty array' => array(
+ ),
+
+ // string data
+/*7*/ 'string' => array(
+ "string",
+ 'string',
+ $heredoc,
+ ),
+
+ // object data
+/*8*/ 'object' => array(
+ new classA(),
+ ),
+
+ // undefined data
+/*9*/ 'undefined' => array(
+ @$undefined_var,
+ ),
+
+ // unset data
+/*10*/ 'unset' => array(
+ @$unset_var,
+ ),
+
+ // resource variable
+/*11*/ 'resource' => array(
+ $fp
+ ),
+);
+// loop through each element of $inputs to check the behavior of natcasesort()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( natcasesort($input) );
+ var_dump($input);
+ $iterator++;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing natcasesort() : usage variation ***
+
+-- Iteration 1 --
+bool(true)
+array(4) {
+ [3]=>
+ int(-2345)
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(12345)
+}
+
+-- Iteration 2 --
+bool(true)
+array(5) {
+ [1]=>
+ float(-10.5)
+ [4]=>
+ float(0.5)
+ [3]=>
+ float(1.23456789E-9)
+ [0]=>
+ float(10.5)
+ [2]=>
+ float(123456789000)
+}
+
+-- Iteration 3 --
+bool(true)
+array(2) {
+ [1]=>
+ NULL
+ [0]=>
+ NULL
+}
+
+-- Iteration 4 --
+bool(true)
+array(4) {
+ [3]=>
+ bool(false)
+ [1]=>
+ bool(false)
+ [0]=>
+ bool(true)
+ [2]=>
+ bool(true)
+}
+
+-- Iteration 5 --
+bool(true)
+array(2) {
+ [1]=>
+ string(0) ""
+ [0]=>
+ string(0) ""
+}
+
+-- Iteration 6 --
+bool(true)
+array(0) {
+}
+
+-- Iteration 7 --
+bool(true)
+array(3) {
+ [2]=>
+ string(11) "hello world"
+ [1]=>
+ string(6) "string"
+ [0]=>
+ string(6) "string"
+}
+
+-- Iteration 8 --
+bool(true)
+array(1) {
+ [0]=>
+ object(classA)#%d (0) {
+ }
+}
+
+-- Iteration 9 --
+bool(true)
+array(1) {
+ [0]=>
+ NULL
+}
+
+-- Iteration 10 --
+bool(true)
+array(1) {
+ [0]=>
+ NULL
+}
+
+-- Iteration 11 --
+bool(true)
+array(1) {
+ [0]=>
+ resource(%d) of type (stream)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_variation3.phpt b/ext/standard/tests/array/natcasesort_variation3.phpt
new file mode 100644
index 000000000..f15150843
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation3.phpt
@@ -0,0 +1,135 @@
+--TEST--
+Test natcasesort() function : usage variations - different numeric types
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays of numeric data to test how natcasesort re-orders the array
+ */
+
+echo "*** Testing natcasesort() : usage variation ***\n";
+
+$inputs = array (
+
+ // negative/positive integers array
+ array(11, -11, 21, -21, 31, -31, 0, 41, -41),
+
+ // float value array
+ array(10.5, -10.5, 10.5e2, 10.6E-2, .5, .01, -.1),
+
+ // mixed value array
+ array(.0001, .0021, -.01, -1, 0, .09, 2, -.9, 10.6E-2, -10.6E-2, 33),
+
+ // array values contains minimum and maximum ranges
+ array(2147483647, 2147483648, -2147483647, -2147483648, -0, 0, -2147483649)
+);
+
+$iterator = 1;
+foreach ($inputs as $array_arg) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump(natcasesort($array_arg));
+ var_dump($array_arg);
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing natcasesort() : usage variation ***
+
+-- Iteration 1 --
+bool(true)
+array(9) {
+ [1]=>
+ int(-11)
+ [3]=>
+ int(-21)
+ [5]=>
+ int(-31)
+ [8]=>
+ int(-41)
+ [6]=>
+ int(0)
+ [0]=>
+ int(11)
+ [2]=>
+ int(21)
+ [4]=>
+ int(31)
+ [7]=>
+ int(41)
+}
+
+-- Iteration 1 --
+bool(true)
+array(7) {
+ [6]=>
+ float(-0.1)
+ [1]=>
+ float(-10.5)
+ [5]=>
+ float(0.01)
+ [4]=>
+ float(0.5)
+ [3]=>
+ float(0.106)
+ [0]=>
+ float(10.5)
+ [2]=>
+ float(1050)
+}
+
+-- Iteration 1 --
+bool(true)
+array(11) {
+ [2]=>
+ float(-0.01)
+ [7]=>
+ float(-0.9)
+ [9]=>
+ float(-0.106)
+ [3]=>
+ int(-1)
+ [4]=>
+ int(0)
+ [0]=>
+ float(0.0001)
+ [1]=>
+ float(0.0021)
+ [5]=>
+ float(0.09)
+ [8]=>
+ float(0.106)
+ [6]=>
+ int(2)
+ [10]=>
+ int(33)
+}
+
+-- Iteration 1 --
+bool(true)
+array(7) {
+ [2]=>
+ int(-2147483647)
+ [3]=>
+ float(-2147483648)
+ [6]=>
+ float(-2147483649)
+ [5]=>
+ int(0)
+ [4]=>
+ int(0)
+ [0]=>
+ int(2147483647)
+ [1]=>
+ float(2147483648)
+}
+Done
diff --git a/ext/standard/tests/array/natcasesort_variation4.phpt b/ext/standard/tests/array/natcasesort_variation4.phpt
new file mode 100644
index 000000000..81276ef1c
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation4.phpt
@@ -0,0 +1,86 @@
+--TEST--
+Test natcasesort() function : usage variations - different string types
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays of string data to see how natcasesort() re-orders the array
+ */
+
+echo "*** Testing natcasesort() : usage variation ***\n";
+
+$inputs = array (
+ // group of escape sequences
+ array(null, NULL, "\a", "\cx", "\e", "\f", "\n", "\t", "\xhh", "\ddd", "\v"),
+
+ // array contains combination of capital/small letters
+ array("lemoN", "Orange", "banana", "apple", "Test", "TTTT", "ttt", "ww", "x", "X", "oraNGe", "BANANA")
+);
+
+foreach ($inputs as $array_arg) {
+ var_dump( natcasesort($array_arg) );
+ var_dump($array_arg);
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing natcasesort() : usage variation ***
+bool(true)
+array(11) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [6]=>
+ string(1) "
+"
+ [10]=>
+ string(1) " "
+ [7]=>
+ string(1) " "
+ [5]=>
+ string(1) " "
+ [2]=>
+ string(2) "\a"
+ [3]=>
+ string(3) "\cx"
+ [9]=>
+ string(4) "\ddd"
+ [4]=>
+ string(2) "\e"
+ [8]=>
+ string(4) "\xhh"
+}
+bool(true)
+array(12) {
+ [3]=>
+ string(5) "apple"
+ [11]=>
+ string(6) "BANANA"
+ [2]=>
+ string(6) "banana"
+ [0]=>
+ string(5) "lemoN"
+ [10]=>
+ string(6) "oraNGe"
+ [1]=>
+ string(6) "Orange"
+ [4]=>
+ string(4) "Test"
+ [6]=>
+ string(3) "ttt"
+ [5]=>
+ string(4) "TTTT"
+ [7]=>
+ string(2) "ww"
+ [8]=>
+ string(1) "x"
+ [9]=>
+ string(1) "X"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_variation5.phpt b/ext/standard/tests/array/natcasesort_variation5.phpt
new file mode 100644
index 000000000..867d0b89e
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation5.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test natcasesort() function : usage variations - different hex values
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass an array of different hex values to test how natcasesort() re-orders it
+ */
+
+echo "*** Testing natcasesort() : usage variation ***\n";
+
+$unsorted_hex_array = array(0x1AB, 0xFFF, 0xF, 0xFF, 0x2AA, 0xBB, 0x1ab, 0xff, -0xFF, 0, -0x2aa);
+var_dump( natcasesort($unsorted_hex_array) );
+var_dump($unsorted_hex_array);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing natcasesort() : usage variation ***
+bool(true)
+array(11) {
+ [8]=>
+ int(-255)
+ [10]=>
+ int(-682)
+ [9]=>
+ int(0)
+ [2]=>
+ int(15)
+ [5]=>
+ int(187)
+ [3]=>
+ int(255)
+ [7]=>
+ int(255)
+ [0]=>
+ int(427)
+ [6]=>
+ int(427)
+ [4]=>
+ int(682)
+ [1]=>
+ int(4095)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_variation6.phpt b/ext/standard/tests/array/natcasesort_variation6.phpt
new file mode 100644
index 000000000..1d151d80d
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation6.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test natcasesort() function : usage variations - referenced variables
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass an array of referenced varaibles to test how natcasesort() re-orders it
+ */
+
+echo "*** Testing natcasesort() : usage variation ***\n";
+
+$value1 = 100;
+$value2 = 33;
+$value3 = 555;
+
+echo "\n-- Initial test --\n";
+$array = array( &$value1 , &$value2, &$value3);
+var_dump( natcasesort($array) );
+var_dump($array);
+
+echo "\n-- Change \$value1 --\n";
+$value1 = -29;
+var_dump( natcasesort($array) );
+var_dump($array);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing natcasesort() : usage variation ***
+
+-- Initial test --
+bool(true)
+array(3) {
+ [1]=>
+ &int(33)
+ [0]=>
+ &int(100)
+ [2]=>
+ &int(555)
+}
+
+-- Change $value1 --
+bool(true)
+array(3) {
+ [0]=>
+ &int(-29)
+ [1]=>
+ &int(33)
+ [2]=>
+ &int(555)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_variation7.phpt b/ext/standard/tests/array/natcasesort_variation7.phpt
new file mode 100644
index 000000000..eefcd1d6f
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation7.phpt
@@ -0,0 +1,98 @@
+--TEST--
+Test natcasesort() function : usage variations - recursive arrays
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass natcasesort() an infinitely recursive array to test how it is re-ordered
+ */
+
+echo "*** Testing natcasesort() : usage variations ***\n";
+
+$array = array (1, 3.00, 'zero', '2');
+$array[] = &$array;
+var_dump($array);
+
+var_dump(@natcasesort($array));
+var_dump($array);
+
+$array[4] = null;
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing natcasesort() : usage variations ***
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ float(3)
+ [2]=>
+ string(4) "zero"
+ [3]=>
+ string(1) "2"
+ [4]=>
+ &array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ float(3)
+ [2]=>
+ string(4) "zero"
+ [3]=>
+ string(1) "2"
+ [4]=>
+ &array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ float(3)
+ [2]=>
+ string(4) "zero"
+ [3]=>
+ string(1) "2"
+ [4]=>
+ *RECURSION*
+ }
+ }
+}
+bool(true)
+array(5) {
+ [0]=>
+ int(1)
+ [3]=>
+ string(1) "2"
+ [1]=>
+ float(3)
+ [4]=>
+ &array(5) {
+ [0]=>
+ int(1)
+ [3]=>
+ string(1) "2"
+ [1]=>
+ float(3)
+ [4]=>
+ &array(5) {
+ [0]=>
+ int(1)
+ [3]=>
+ string(1) "2"
+ [1]=>
+ float(3)
+ [4]=>
+ *RECURSION*
+ [2]=>
+ string(4) "zero"
+ }
+ [2]=>
+ string(4) "zero"
+ }
+ [2]=>
+ string(4) "zero"
+}
+Done
diff --git a/ext/standard/tests/array/natcasesort_variation8.phpt b/ext/standard/tests/array/natcasesort_variation8.phpt
new file mode 100644
index 000000000..fbced4a22
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation8.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test natcasesort() function : usage variations - octal values
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass an array of octal values to test how natcasesort() re-orders it
+ */
+
+echo "*** Testing natcasesort() : usage variation ***\n";
+
+$unsorted_oct_array = array(01235, 0321, 0345, 066, 0772, 077, -066, -0345, 0);
+
+var_dump( natcasesort($unsorted_oct_array) );
+var_dump($unsorted_oct_array);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing natcasesort() : usage variation ***
+bool(true)
+array(9) {
+ [6]=>
+ int(-54)
+ [7]=>
+ int(-229)
+ [8]=>
+ int(0)
+ [3]=>
+ int(54)
+ [5]=>
+ int(63)
+ [1]=>
+ int(209)
+ [2]=>
+ int(229)
+ [4]=>
+ int(506)
+ [0]=>
+ int(669)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/natcasesort_variation9.phpt b/ext/standard/tests/array/natcasesort_variation9.phpt
new file mode 100644
index 000000000..98eec05a0
--- /dev/null
+++ b/ext/standard/tests/array/natcasesort_variation9.phpt
@@ -0,0 +1,110 @@
+--TEST--
+Test natcasesort() function : usage variations - mixed array
+--FILE--
+<?php
+/* Prototype : bool natcasesort(array &$array_arg)
+ * Description: Sort an array using case-insensitive natural sort
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass an array containing sub-arrays, ints, floats, strings, boolean, null
+ * and escape characters to test how natcasesort() re-orders it
+ */
+
+echo "*** Testing natcasesort() : usage variation ***\n";
+
+$mixed_values = array (
+ array(),
+ array( array(33, -5, 6),
+ array(11),
+ array(22, -55),
+ array()
+ ),
+ -4, "4", 4.00, "b", "5", -2, -2.0, -2.98989, "-.9", "True", "",
+ NULL, "ab", "abcd", 0.0, -0, "abcd\x00abcd\x00abcd", '', true, false
+);
+// suppress errors as is generating a lot of "array to string" notices
+var_dump( @natcasesort($mixed_values) );
+
+var_dump($mixed_values);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing natcasesort() : usage variation ***
+bool(true)
+array(22) {
+ [13]=>
+ NULL
+ [19]=>
+ string(0) ""
+ [21]=>
+ bool(false)
+ [12]=>
+ string(0) ""
+ [10]=>
+ string(3) "-.9"
+ [7]=>
+ int(-2)
+ [8]=>
+ float(-2)
+ [9]=>
+ float(-2.98989)
+ [2]=>
+ int(-4)
+ [16]=>
+ float(0)
+ [17]=>
+ int(0)
+ [20]=>
+ bool(true)
+ [3]=>
+ string(1) "4"
+ [4]=>
+ float(4)
+ [6]=>
+ string(1) "5"
+ [14]=>
+ string(2) "ab"
+ [15]=>
+ string(4) "abcd"
+ [18]=>
+ string(14) "%s"
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(4) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ [3]=>
+ array(0) {
+ }
+ }
+ [5]=>
+ string(1) "b"
+ [11]=>
+ string(4) "True"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/next_basic.phpt b/ext/standard/tests/array/next_basic.phpt
new file mode 100644
index 000000000..fe8b70c88
--- /dev/null
+++ b/ext/standard/tests/array/next_basic.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test next() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed next(array $array_arg)
+ * Description: Move array argument's internal pointer to the next element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of next()
+ */
+
+echo "*** Testing next() : basic functionality ***\n";
+
+$array = array('zero', 'one', 'two');
+echo key($array) . " => " . current($array) . "\n";
+var_dump(next($array));
+
+echo key($array) . " => " . current($array) . "\n";
+var_dump(next($array));
+
+echo key($array) . " => " . current($array) . "\n";
+var_dump(next($array));
+?>
+===DONE===
+--EXPECTF--
+*** Testing next() : basic functionality ***
+0 => zero
+string(3) "one"
+1 => one
+string(3) "two"
+2 => two
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/next_error.phpt b/ext/standard/tests/array/next_error.phpt
new file mode 100644
index 000000000..ba7596feb
--- /dev/null
+++ b/ext/standard/tests/array/next_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test next() function : error conditions - Pass incorrect number of arguments
+--FILE--
+<?php
+/* Prototype : mixed next(array $array_arg)
+ * Description: Move array argument's internal pointer to the next element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to next() to test behaviour
+ */
+
+echo "*** Testing next() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing next() function with Zero arguments --\n";
+var_dump( next() );
+
+//Test next with one more than the expected number of arguments
+echo "\n-- Testing next() function with more than expected no. of arguments --\n";
+$array_arg = array(1, 2);
+$extra_arg = 10;
+var_dump( next($array_arg, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing next() : error conditions ***
+
+-- Testing next() function with Zero arguments --
+
+Warning: Wrong parameter count for next() in %s on line %d
+NULL
+
+-- Testing next() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for next() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/array/next_variation1.phpt b/ext/standard/tests/array/next_variation1.phpt
new file mode 100644
index 000000000..aa02ac599
--- /dev/null
+++ b/ext/standard/tests/array/next_variation1.phpt
@@ -0,0 +1,219 @@
+--TEST--
+Test next() function : usage variation - Pass different data types as $array_arg
+--FILE--
+<?php
+/* Prototype : mixed next(array $array_arg)
+ * Description: Move array argument's internal pointer to the next element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $array_arg argument to next() to test behaviour
+ */
+
+echo "*** Testing next() : variation ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of next()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( next($input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--EXPECTF--
+*** Testing next() : variation ***
+
+-- Iteration 1 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+
+-- Iteration 25 --
+
+Warning: next(): Passed variable is not an array or object in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/next_variation2.phpt b/ext/standard/tests/array/next_variation2.phpt
new file mode 100644
index 000000000..e7505096d
--- /dev/null
+++ b/ext/standard/tests/array/next_variation2.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test next() function : usage variation - Mulit-dimensional arrays
+--FILE--
+<?php
+/* Prototype : mixed next(array $array_arg)
+ * Description: Move array argument's internal pointer to the next element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test next() when passed:
+ * 1. a two-dimensional array
+ * 2. a sub-array
+ * as $array_arg argument.
+ */
+
+echo "*** Testing next() : usage variations ***\n";
+
+$array_arg = array ('a' => 'z', array(9, 8, 7));
+
+echo "\n-- Pass a two-dimensional array as \$array_arg --\n";
+var_dump(next($array_arg));
+var_dump(next($array_arg));
+
+echo "\n-- Pass a sub-array as \$array_arg --\n";
+var_dump(next($array_arg[0]));
+?>
+===DONE===
+--EXPECTF--
+*** Testing next() : usage variations ***
+
+-- Pass a two-dimensional array as $array_arg --
+array(3) {
+ [0]=>
+ int(9)
+ [1]=>
+ int(8)
+ [2]=>
+ int(7)
+}
+bool(false)
+
+-- Pass a sub-array as $array_arg --
+int(8)
+===DONE===
diff --git a/ext/standard/tests/array/reset_basic.phpt b/ext/standard/tests/array/reset_basic.phpt
new file mode 100644
index 000000000..d376e68a2
--- /dev/null
+++ b/ext/standard/tests/array/reset_basic.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test reset() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed reset(array $array_arg)
+ * Description: Set array argument's internal pointer to the first element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of reset()
+ */
+
+echo "*** Testing reset() : basic functionality ***\n";
+
+$array = array('zero', 'one', 200 => 'two');
+
+echo "\n-- Initial Position: --\n";
+echo key($array) . " => " . current($array) . "\n";
+
+echo "\n-- Call to next() --\n";
+var_dump(next($array));
+
+echo "\n-- Current Position: --\n";
+echo key($array) . " => " . current($array) . "\n";
+
+echo "\n-- Call to reset() --\n";
+var_dump(reset($array));
+?>
+===DONE===
+--EXPECTF--
+*** Testing reset() : basic functionality ***
+
+-- Initial Position: --
+0 => zero
+
+-- Call to next() --
+string(3) "one"
+
+-- Current Position: --
+1 => one
+
+-- Call to reset() --
+string(4) "zero"
+===DONE===
diff --git a/ext/standard/tests/array/reset_error.phpt b/ext/standard/tests/array/reset_error.phpt
new file mode 100644
index 000000000..1bf0f9613
--- /dev/null
+++ b/ext/standard/tests/array/reset_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test reset() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : mixed reset(array $array_arg)
+ * Description: Set array argument's internal pointer to the first element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to reset() to test behaviour
+ */
+
+echo "*** Testing reset() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing reset() function with Zero arguments --\n";
+var_dump( reset() );
+
+//Test reset with one more than the expected number of arguments
+echo "\n-- Testing reset() function with more than expected no. of arguments --\n";
+$array_arg = array(1, 2);
+$extra_arg = 10;
+var_dump( reset($array_arg, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing reset() : error conditions ***
+
+-- Testing reset() function with Zero arguments --
+
+Warning: Wrong parameter count for reset() in %s on line %d
+NULL
+
+-- Testing reset() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for reset() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/array/reset_variation1.phpt b/ext/standard/tests/array/reset_variation1.phpt
new file mode 100644
index 000000000..0dc99512e
--- /dev/null
+++ b/ext/standard/tests/array/reset_variation1.phpt
@@ -0,0 +1,219 @@
+--TEST--
+Test reset() function : usage variations - Pass different data types as $array_arg arg.
+--FILE--
+<?php
+/* Prototype : mixed reset(array $array_arg)
+ * Description: Set array argument's internal pointer to the first element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $array_arg argument to reset() to test behaviour
+ */
+
+echo "*** Testing reset() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of reset()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( reset($input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--EXPECTF--
+*** Testing reset() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 2 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 3 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 4 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 5 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 6 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 7 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 8 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 9 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 10 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 11 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 12 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 13 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 14 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 15 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 16 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 17 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 18 --
+bool(false)
+
+-- Iteration 19 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 20 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 21 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 22 --
+bool(false)
+
+-- Iteration 23 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 24 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+
+-- Iteration 25 --
+
+Warning: reset(): Passed variable is not an array or object in %s on line %s
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/reset_variation2.phpt b/ext/standard/tests/array/reset_variation2.phpt
new file mode 100644
index 000000000..1384affa9
--- /dev/null
+++ b/ext/standard/tests/array/reset_variation2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test reset() function : usage variations - unset first element
+--FILE--
+<?php
+/* Prototype : mixed reset(array $array_arg)
+ * Description: Set array argument's internal pointer to the first element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Unset first element of an array and test behaviour of reset()
+ */
+
+echo "*** Testing reset() : usage variations ***\n";
+
+$array = array('a', 'b', 'c');
+
+echo "\n-- Initial Position: --\n";
+echo current($array) . " => " . key($array) . "\n";
+
+echo "\n-- Unset First element in array and check reset() --\n";
+unset($array[0]);
+var_dump(reset($array));
+?>
+===DONE===
+--EXPECTF--
+*** Testing reset() : usage variations ***
+
+-- Initial Position: --
+a => 0
+
+-- Unset First element in array and check reset() --
+string(1) "b"
+===DONE===
diff --git a/ext/standard/tests/array/reset_variation3.phpt b/ext/standard/tests/array/reset_variation3.phpt
new file mode 100644
index 000000000..29f965abe
--- /dev/null
+++ b/ext/standard/tests/array/reset_variation3.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test reset() function : usage variations - Referenced variables
+--FILE--
+<?php
+/* Prototype : mixed reset(array $array_arg)
+ * Description: Set array argument's internal pointer to the first element and return it
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Reference two arrays to each other then call reset() to test position of
+ * internal pointer in both arrays
+ */
+
+echo "*** Testing reset() : usage variations ***\n";
+
+$array1 = array ('zero', 'one', 'two');
+
+echo "\n-- Initial position of internal pointer --\n";
+var_dump(current($array1));
+
+// Test that when two variables are referenced to one another
+// the internal pointer is the same for both
+$array2 = &$array1;
+
+next($array1);
+
+echo "\n-- Position after calling next() --\n";
+echo "\$array1: ";
+var_dump(current($array1));
+echo "\$array2: ";
+var_dump(current($array2));
+
+echo "\n-- Position after calling reset() --\n";
+var_dump(reset($array1));
+echo "\$array1: ";
+var_dump(current($array1));
+echo "\$array2: ";
+var_dump(current($array2));
+?>
+===DONE===
+--EXPECTF--
+*** Testing reset() : usage variations ***
+
+-- Initial position of internal pointer --
+string(4) "zero"
+
+-- Position after calling next() --
+$array1: string(3) "one"
+$array2: string(3) "one"
+
+-- Position after calling reset() --
+string(4) "zero"
+$array1: string(4) "zero"
+$array2: string(4) "zero"
+===DONE===
diff --git a/ext/standard/tests/array/rsort_basic.phpt b/ext/standard/tests/array/rsort_basic.phpt
new file mode 100644
index 000000000..5495be925
--- /dev/null
+++ b/ext/standard/tests/array/rsort_basic.phpt
@@ -0,0 +1,129 @@
+--TEST--
+Test rsort() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of rsort()
+ */
+
+echo "*** Testing rsort() : basic functionality ***\n";
+
+// associative array containing unsorted string values
+$unsorted_strings = array( "l" => "lemon", "o" => "orange", "b" => "banana" );
+
+// array with default keys containing unsorted numeric values
+$unsorted_numerics = array( 100, 33, 555, 22 );
+
+echo "\n-- Testing rsort() by supplying string array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_strings;
+var_dump( rsort($temp_array) );
+var_dump( $temp_array);
+
+echo "\n-- Testing rsort() by supplying numeric array, 'flag' value is defualt --\n";
+$temp_array = $unsorted_numerics;
+var_dump( rsort($temp_array) );
+var_dump( $temp_array);
+
+echo "\n-- Testing rsort() by supplying string array, 'flag' = SORT_REGULAR --\n";
+$temp_array = $unsorted_strings;
+var_dump( rsort($temp_array, SORT_REGULAR) );
+var_dump( $temp_array);
+
+echo "\n-- Testing rsort() by supplying numeric array, 'flag' = SORT_REGULAR --\n";
+$temp_array = $unsorted_numerics;
+var_dump( rsort($temp_array, SORT_REGULAR) );
+var_dump( $temp_array);
+
+echo "\n-- Testing rsort() by supplying string array, 'flag' = SORT_STRING --\n";
+$temp_array = $unsorted_strings;
+var_dump( rsort($temp_array, SORT_STRING) );
+var_dump( $temp_array);
+
+echo "\n-- Testing rsort() by supplying numeric array, 'flag' = SORT_NUMERIC --\n";
+$temp_array = $unsorted_numerics;
+var_dump( rsort($temp_array, SORT_NUMERIC) );
+var_dump( $temp_array);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : basic functionality ***
+
+-- Testing rsort() by supplying string array, 'flag' value is defualt --
+bool(true)
+array(3) {
+ [0]=>
+ string(6) "orange"
+ [1]=>
+ string(5) "lemon"
+ [2]=>
+ string(6) "banana"
+}
+
+-- Testing rsort() by supplying numeric array, 'flag' value is defualt --
+bool(true)
+array(4) {
+ [0]=>
+ int(555)
+ [1]=>
+ int(100)
+ [2]=>
+ int(33)
+ [3]=>
+ int(22)
+}
+
+-- Testing rsort() by supplying string array, 'flag' = SORT_REGULAR --
+bool(true)
+array(3) {
+ [0]=>
+ string(6) "orange"
+ [1]=>
+ string(5) "lemon"
+ [2]=>
+ string(6) "banana"
+}
+
+-- Testing rsort() by supplying numeric array, 'flag' = SORT_REGULAR --
+bool(true)
+array(4) {
+ [0]=>
+ int(555)
+ [1]=>
+ int(100)
+ [2]=>
+ int(33)
+ [3]=>
+ int(22)
+}
+
+-- Testing rsort() by supplying string array, 'flag' = SORT_STRING --
+bool(true)
+array(3) {
+ [0]=>
+ string(6) "orange"
+ [1]=>
+ string(5) "lemon"
+ [2]=>
+ string(6) "banana"
+}
+
+-- Testing rsort() by supplying numeric array, 'flag' = SORT_NUMERIC --
+bool(true)
+array(4) {
+ [0]=>
+ int(555)
+ [1]=>
+ int(100)
+ [2]=>
+ int(33)
+ [3]=>
+ int(22)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_error.phpt b/ext/standard/tests/array/rsort_error.phpt
new file mode 100644
index 000000000..6f6f2f976
--- /dev/null
+++ b/ext/standard/tests/array/rsort_error.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test rsort() function : error conditions - Pass incorrect number of args
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass incorrect number of arguments to rsort() to test behaviour
+ */
+
+echo "*** Testing rsort() : error conditions ***\n";
+
+// zero arguments
+echo "\n-- Testing rsort() function with Zero arguments --\n";
+var_dump( rsort() );
+
+//Test rsort() with more than the expected number of arguments
+echo "\n-- Testing rsort() function with more than expected no. of arguments --\n";
+$array_arg = array(1, 2);
+$sort_flags = SORT_REGULAR;
+$extra_arg = 10;
+var_dump( rsort($array_arg, $sort_flags, $extra_arg) );
+
+// dump the input array to ensure that it wasn't changed
+var_dump($array_arg);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : error conditions ***
+
+-- Testing rsort() function with Zero arguments --
+
+Warning: rsort() expects at least 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing rsort() function with more than expected no. of arguments --
+
+Warning: rsort() expects at most 2 parameters, 3 given in %s on line %d
+bool(false)
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_object1.phpt b/ext/standard/tests/array/rsort_object1.phpt
new file mode 100644
index 000000000..98f7cfec1
--- /dev/null
+++ b/ext/standard/tests/array/rsort_object1.phpt
@@ -0,0 +1,243 @@
+--TEST--
+Test rsort() function : object functionality
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test basic functionality of rsort() with objects
+ */
+
+echo "*** Testing rsort() : object functionality ***\n";
+
+// class declaration for integer objects
+class for_integer_rsort
+{
+ public $class_value;
+ // initializing object member value
+ function __construct($value){
+ $this->class_value = $value;
+ }
+
+}
+
+// class declaration for string objects
+class for_string_rsort
+{
+ public $class_value;
+ // initializing object member value
+ function __construct($value){
+ $this->class_value = $value;
+ }
+
+ // return string value
+ function __tostring() {
+ return (string)$this->value;
+ }
+
+}
+
+// array of integer objects
+$unsorted_int_obj = array(
+ new for_integer_rsort(11), new for_integer_rsort(66),
+ new for_integer_rsort(23), new for_integer_rsort(-5),
+ new for_integer_rsort(0.001), new for_integer_rsort(0)
+);
+
+// array of string objects
+$unsorted_str_obj = array (
+ new for_string_rsort("axx"), new for_string_rsort("t"),
+ new for_string_rsort("w"), new for_string_rsort("py"),
+ new for_string_rsort("apple"), new for_string_rsort("Orange"),
+ new for_string_rsort("Lemon"), new for_string_rsort("aPPle")
+);
+
+
+echo "\n-- Sort flag = default --\n";
+
+// testing rsort() function by supplying integer object array, flag value is defualt
+$temp_array = $unsorted_int_obj;
+var_dump(rsort($temp_array) );
+var_dump($temp_array);
+
+// testing rsort() function by supplying string object array, flag value is defualt
+$temp_array = $unsorted_str_obj;
+var_dump(rsort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- Sort flag = SORT_REGULAR --\n";
+// testing rsort() function by supplying integer object array, flag value = SORT_REGULAR
+$temp_array = $unsorted_int_obj;
+var_dump(rsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+// testing rsort() function by supplying string object array, flag value = SORT_REGULAR
+$temp_array = $unsorted_str_obj;
+var_dump(rsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : object functionality ***
+
+-- Sort flag = default --
+bool(true)
+array(6) {
+ [0]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(66)
+ }
+ [1]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(23)
+ }
+ [2]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(11)
+ }
+ [3]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ float(0.001)
+ }
+ [4]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(0)
+ }
+ [5]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(-5)
+ }
+}
+bool(true)
+array(8) {
+ [0]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(1) "w"
+ }
+ [1]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(1) "t"
+ }
+ [2]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(2) "py"
+ }
+ [3]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(3) "axx"
+ }
+ [4]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(5) "apple"
+ }
+ [5]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(5) "aPPle"
+ }
+ [6]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(6) "Orange"
+ }
+ [7]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(5) "Lemon"
+ }
+}
+
+-- Sort flag = SORT_REGULAR --
+bool(true)
+array(6) {
+ [0]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(66)
+ }
+ [1]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(23)
+ }
+ [2]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(11)
+ }
+ [3]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ float(0.001)
+ }
+ [4]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(0)
+ }
+ [5]=>
+ object(for_integer_rsort)#%d (1) {
+ ["class_value"]=>
+ int(-5)
+ }
+}
+bool(true)
+array(8) {
+ [0]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(1) "w"
+ }
+ [1]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(1) "t"
+ }
+ [2]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(2) "py"
+ }
+ [3]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(3) "axx"
+ }
+ [4]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(5) "apple"
+ }
+ [5]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(5) "aPPle"
+ }
+ [6]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(6) "Orange"
+ }
+ [7]=>
+ object(for_string_rsort)#%d (1) {
+ ["class_value"]=>
+ string(5) "Lemon"
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_object2.phpt b/ext/standard/tests/array/rsort_object2.phpt
new file mode 100644
index 000000000..216d3c910
--- /dev/null
+++ b/ext/standard/tests/array/rsort_object2.phpt
@@ -0,0 +1,258 @@
+--TEST--
+Test rsort() function : object functionality - different visibilities
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test functionality of rsort() with objects where properties have different visibilities
+ */
+
+echo "*** Testing rsort() : object functionality ***\n";
+
+// class declaration for integer objects
+class for_integer_rsort
+{
+ public $public_class_value;
+ private $private_class_value;
+ protected $protected_class_value;
+
+ // initializing object member value
+ function __construct($value1, $value2,$value3){
+ $this->public_class_value = $value1;
+ $this->private_class_value = $value2;
+ $this->protected_class_value = $value3;
+ }
+
+}
+
+// class declaration for string objects
+class for_string_rsort
+{
+ public $public_class_value;
+ private $private_class_value;
+ protected $protected_class_value;
+ // initializing object member value
+ function __construct($value1, $value2,$value3){
+ $this->public_class_value = $value1;
+ $this->private_class_value = $value2;
+ $this->protected_class_value = $value3;
+ }
+
+ // return string value
+ function __tostring() {
+ return (string)$this->value;
+ }
+
+}
+
+// array of integer objects
+
+$unsorted_int_obj = array(
+ new for_integer_rsort(11,33,30),
+ new for_integer_rsort(66,44,4),
+ new for_integer_rsort(-88,-5,5),
+ new for_integer_rsort(0.001,99.5,0.1)
+);
+
+// array of string objects
+$unsorted_str_obj = array (
+ new for_string_rsort("axx","AXX","ass"),
+ new for_string_rsort("t","eee","abb"),
+ new for_string_rsort("w","W", "c"),
+ new for_string_rsort("py","PY", "pt"),
+);
+
+
+echo "\n-- Sort flag = default --\n";
+
+// testing rsort() function by supplying integer object array, flag value is defualt
+$temp_array = $unsorted_int_obj;
+var_dump(rsort($temp_array) );
+var_dump($temp_array);
+
+// testing rsort() function by supplying string object array, flag value is defualt
+$temp_array = $unsorted_str_obj;
+var_dump(rsort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- Sort flag = SORT_REGULAR --\n";
+// testing rsort() function by supplying integer object array, flag value = SORT_REGULAR
+$temp_array = $unsorted_int_obj;
+var_dump(rsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+// testing rsort() function by supplying string object array, flag value = SORT_REGULAR
+$temp_array = $unsorted_str_obj;
+var_dump(rsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : object functionality ***
+
+-- Sort flag = default --
+bool(true)
+array(4) {
+ [0]=>
+ object(for_integer_rsort)#%d (3) {
+ ["public_class_value"]=>
+ int(66)
+ ["private_class_value:private"]=>
+ int(44)
+ ["protected_class_value:protected"]=>
+ int(4)
+ }
+ [1]=>
+ object(for_integer_rsort)#%d (3) {
+ ["public_class_value"]=>
+ int(11)
+ ["private_class_value:private"]=>
+ int(33)
+ ["protected_class_value:protected"]=>
+ int(30)
+ }
+ [2]=>
+ object(for_integer_rsort)#%d (3) {
+ ["public_class_value"]=>
+ float(0.001)
+ ["private_class_value:private"]=>
+ float(99.5)
+ ["protected_class_value:protected"]=>
+ float(0.1)
+ }
+ [3]=>
+ object(for_integer_rsort)#%d (3) {
+ ["public_class_value"]=>
+ int(-88)
+ ["private_class_value:private"]=>
+ int(-5)
+ ["protected_class_value:protected"]=>
+ int(5)
+ }
+}
+bool(true)
+array(4) {
+ [0]=>
+ object(for_string_rsort)#%d (3) {
+ ["public_class_value"]=>
+ string(1) "w"
+ ["private_class_value:private"]=>
+ string(1) "W"
+ ["protected_class_value:protected"]=>
+ string(1) "c"
+ }
+ [1]=>
+ object(for_string_rsort)#%d (3) {
+ ["public_class_value"]=>
+ string(1) "t"
+ ["private_class_value:private"]=>
+ string(3) "eee"
+ ["protected_class_value:protected"]=>
+ string(3) "abb"
+ }
+ [2]=>
+ object(for_string_rsort)#%d (3) {
+ ["public_class_value"]=>
+ string(2) "py"
+ ["private_class_value:private"]=>
+ string(2) "PY"
+ ["protected_class_value:protected"]=>
+ string(2) "pt"
+ }
+ [3]=>
+ object(for_string_rsort)#%d (3) {
+ ["public_class_value"]=>
+ string(3) "axx"
+ ["private_class_value:private"]=>
+ string(3) "AXX"
+ ["protected_class_value:protected"]=>
+ string(3) "ass"
+ }
+}
+
+-- Sort flag = SORT_REGULAR --
+bool(true)
+array(4) {
+ [0]=>
+ object(for_integer_rsort)#%d (3) {
+ ["public_class_value"]=>
+ int(66)
+ ["private_class_value:private"]=>
+ int(44)
+ ["protected_class_value:protected"]=>
+ int(4)
+ }
+ [1]=>
+ object(for_integer_rsort)#%d (3) {
+ ["public_class_value"]=>
+ int(11)
+ ["private_class_value:private"]=>
+ int(33)
+ ["protected_class_value:protected"]=>
+ int(30)
+ }
+ [2]=>
+ object(for_integer_rsort)#%d (3) {
+ ["public_class_value"]=>
+ float(0.001)
+ ["private_class_value:private"]=>
+ float(99.5)
+ ["protected_class_value:protected"]=>
+ float(0.1)
+ }
+ [3]=>
+ object(for_integer_rsort)#%d (3) {
+ ["public_class_value"]=>
+ int(-88)
+ ["private_class_value:private"]=>
+ int(-5)
+ ["protected_class_value:protected"]=>
+ int(5)
+ }
+}
+bool(true)
+array(4) {
+ [0]=>
+ object(for_string_rsort)#%d (3) {
+ ["public_class_value"]=>
+ string(1) "w"
+ ["private_class_value:private"]=>
+ string(1) "W"
+ ["protected_class_value:protected"]=>
+ string(1) "c"
+ }
+ [1]=>
+ object(for_string_rsort)#%d (3) {
+ ["public_class_value"]=>
+ string(1) "t"
+ ["private_class_value:private"]=>
+ string(3) "eee"
+ ["protected_class_value:protected"]=>
+ string(3) "abb"
+ }
+ [2]=>
+ object(for_string_rsort)#%d (3) {
+ ["public_class_value"]=>
+ string(2) "py"
+ ["private_class_value:private"]=>
+ string(2) "PY"
+ ["protected_class_value:protected"]=>
+ string(2) "pt"
+ }
+ [3]=>
+ object(for_string_rsort)#%d (3) {
+ ["public_class_value"]=>
+ string(3) "axx"
+ ["private_class_value:private"]=>
+ string(3) "AXX"
+ ["protected_class_value:protected"]=>
+ string(3) "ass"
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_variation1.phpt b/ext/standard/tests/array/rsort_variation1.phpt
new file mode 100644
index 000000000..96dac90ae
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation1.phpt
@@ -0,0 +1,514 @@
+--TEST--
+Test rsort() function : usage variations - Pass different data types as $array_arg arg
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $array_arg argument to rsort() to test behaviour
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $array_arg argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of rsort()
+$iterator = 1;
+foreach ($inputs as $input) {
+ echo "-- Iteration $iterator --\n";
+ echo "Flag = default:\n";
+ var_dump( rsort($input) );
+ echo "Flag = SORT_REGULAR:\n";
+ var_dump( rsort($input, SORT_REGULAR) );
+ echo "Flag = SORT_NUMERIC:\n";
+ var_dump( rsort($input, SORT_NUMERIC) );
+ echo "Flag = SORT_STRING:\n";
+ var_dump( rsort($input, SORT_STRING) );
+ $iterator++;
+}
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : variation ***
+-- Iteration 1 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 2 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 3 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 4 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
+bool(false)
+-- Iteration 5 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 6 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 7 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 8 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 9 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
+bool(false)
+-- Iteration 10 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+-- Iteration 11 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+-- Iteration 12 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 13 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 14 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 15 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
+bool(false)
+-- Iteration 16 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 17 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 18 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 19 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 20 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
+bool(false)
+-- Iteration 21 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
+bool(false)
+-- Iteration 22 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+-- Iteration 23 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
+bool(false)
+-- Iteration 24 --
+Flag = default:
+
+Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+Flag = SORT_REGULAR:
+
+Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+Flag = SORT_NUMERIC:
+
+Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+Flag = SORT_STRING:
+
+Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_variation10.phpt b/ext/standard/tests/array/rsort_variation10.phpt
new file mode 100644
index 000000000..ccf886b07
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation10.phpt
@@ -0,0 +1,108 @@
+--TEST--
+Test rsort() function : usage variations - Octal values
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass rsort() an array containing octal values to test behaviour
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+// an array containing unsorted octal values
+$unsorted_oct_array = array(01235, 0321, 0345, 066, 0772, 077, -066, -0345, 0);
+
+echo "\n-- Sort flag = default --\n";
+$temp_array = $unsorted_oct_array;
+var_dump(rsort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- Sort flag = SORT_REGULAR --\n";
+$temp_array = $unsorted_oct_array;
+var_dump(rsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "\n-- Sort flag = SORT_NUMERIC --\n";
+$temp_array = $unsorted_oct_array;
+var_dump(rsort($temp_array, SORT_NUMERIC) );
+var_dump($temp_array);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- Sort flag = default --
+bool(true)
+array(9) {
+ [0]=>
+ int(669)
+ [1]=>
+ int(506)
+ [2]=>
+ int(229)
+ [3]=>
+ int(209)
+ [4]=>
+ int(63)
+ [5]=>
+ int(54)
+ [6]=>
+ int(0)
+ [7]=>
+ int(-54)
+ [8]=>
+ int(-229)
+}
+
+-- Sort flag = SORT_REGULAR --
+bool(true)
+array(9) {
+ [0]=>
+ int(669)
+ [1]=>
+ int(506)
+ [2]=>
+ int(229)
+ [3]=>
+ int(209)
+ [4]=>
+ int(63)
+ [5]=>
+ int(54)
+ [6]=>
+ int(0)
+ [7]=>
+ int(-54)
+ [8]=>
+ int(-229)
+}
+
+-- Sort flag = SORT_NUMERIC --
+bool(true)
+array(9) {
+ [0]=>
+ int(669)
+ [1]=>
+ int(506)
+ [2]=>
+ int(229)
+ [3]=>
+ int(209)
+ [4]=>
+ int(63)
+ [5]=>
+ int(54)
+ [6]=>
+ int(0)
+ [7]=>
+ int(-54)
+ [8]=>
+ int(-229)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_variation11.phpt b/ext/standard/tests/array/rsort_variation11.phpt
new file mode 100644
index 000000000..83bbf84df
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation11.phpt
Binary files differ
diff --git a/ext/standard/tests/array/rsort_variation2.phpt b/ext/standard/tests/array/rsort_variation2.phpt
new file mode 100644
index 000000000..2196a6494
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation2.phpt
@@ -0,0 +1,484 @@
+--TEST--
+Test rsort() function : usage variations - Pass different data types as $sort_flags arg
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass different data types as $sort_flags argument to rsort() to test behaviour
+ * Where possible, 'SORT_NUMERIC' has been entered as a string value
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+// Initialise function arguments not being substituted
+$array_arg = array (1, 5, 2, 3, 1);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "SORT_NUMERIC";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+SORT_NUMERIC
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $sort_flags argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "SORT_NUMERIC",
+ 'SORT_NUMERIC',
+ $heredoc,
+
+ // object data
+/*21*/ new classA(),
+
+ // undefined data
+/*22*/ @$undefined_var,
+
+ // unset data
+/*23*/ @$unset_var,
+
+ // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of rsort()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+
+ //create temporary array in case rsort() works
+ $temp = $array_arg;
+
+ var_dump( rsort($temp, $input) );
+ var_dump($temp);
+ $iterator++;
+
+ $temp = null;
+};
+
+fclose($fp);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- Iteration 1 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 2 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 3 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 4 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 5 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 6 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 7 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 8 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 9 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 10 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 11 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 12 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 13 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 14 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 15 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 16 --
+
+Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 17 --
+
+Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 18 --
+
+Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 19 --
+
+Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 20 --
+
+Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 21 --
+
+Warning: rsort() expects parameter 2 to be long, object given in %s on line %d
+bool(false)
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 22 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 23 --
+bool(true)
+array(5) {
+ [0]=>
+ int(5)
+ [1]=>
+ int(3)
+ [2]=>
+ int(2)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+}
+
+-- Iteration 24 --
+
+Warning: rsort() expects parameter 2 to be long, resource given in %s on line %d
+bool(false)
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ [4]=>
+ int(1)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_variation3.phpt b/ext/standard/tests/array/rsort_variation3.phpt
new file mode 100644
index 000000000..798e148c7
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation3.phpt
@@ -0,0 +1,325 @@
+--TEST--
+Test rsort() function : usage variations - numeric values
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays containing different numeric data to rsort() to test behaviour
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+// group of various arrays
+
+$various_arrays = array (
+// negative/positive integers array
+array(11, -11, 21, -21, 31, -31, 0, 41, -41),
+
+// float value array
+array(10.5, -10.5, 10.5e2, 10.6E-2, .5, .01, -.1),
+
+// mixed value array
+array(.0001, .0021, -.01, -1, 0, .09, 2, -.9, 10.6E-2, -10.6E-2, 33),
+
+// array values contains minimum and maximum ranges
+array(2147483647, 2147483648, -2147483647, -2147483648, -0, 0, -2147483649)
+);
+
+// set of possible flag values
+$flag_value = array("SORT_REGULAR" => SORT_REGULAR, "SORT_NUMERIC" => SORT_NUMERIC);
+
+$count = 1;
+
+// loop through to test rsort() with different arrays
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With Defualt sort flag -\n";
+ $temp_array = $array;
+ var_dump(rsort($temp_array) );
+ var_dump($temp_array);
+
+ // loop through $flag_value array and setting all possible flag values
+ foreach($flag_value as $key => $flag){
+ echo "- Sort flag = $key -\n";
+ $temp_array = $array;
+ var_dump(rsort($temp_array, $flag) );
+ var_dump($temp_array);
+ }
+ $count++;
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- Iteration 1 --
+- With Defualt sort flag -
+bool(true)
+array(9) {
+ [0]=>
+ int(41)
+ [1]=>
+ int(31)
+ [2]=>
+ int(21)
+ [3]=>
+ int(11)
+ [4]=>
+ int(0)
+ [5]=>
+ int(-11)
+ [6]=>
+ int(-21)
+ [7]=>
+ int(-31)
+ [8]=>
+ int(-41)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(9) {
+ [0]=>
+ int(41)
+ [1]=>
+ int(31)
+ [2]=>
+ int(21)
+ [3]=>
+ int(11)
+ [4]=>
+ int(0)
+ [5]=>
+ int(-11)
+ [6]=>
+ int(-21)
+ [7]=>
+ int(-31)
+ [8]=>
+ int(-41)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(9) {
+ [0]=>
+ int(41)
+ [1]=>
+ int(31)
+ [2]=>
+ int(21)
+ [3]=>
+ int(11)
+ [4]=>
+ int(0)
+ [5]=>
+ int(-11)
+ [6]=>
+ int(-21)
+ [7]=>
+ int(-31)
+ [8]=>
+ int(-41)
+}
+
+-- Iteration 2 --
+- With Defualt sort flag -
+bool(true)
+array(7) {
+ [0]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [2]=>
+ float(0.5)
+ [3]=>
+ float(0.106)
+ [4]=>
+ float(0.01)
+ [5]=>
+ float(-0.1)
+ [6]=>
+ float(-10.5)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(7) {
+ [0]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [2]=>
+ float(0.5)
+ [3]=>
+ float(0.106)
+ [4]=>
+ float(0.01)
+ [5]=>
+ float(-0.1)
+ [6]=>
+ float(-10.5)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(7) {
+ [0]=>
+ float(1050)
+ [1]=>
+ float(10.5)
+ [2]=>
+ float(0.5)
+ [3]=>
+ float(0.106)
+ [4]=>
+ float(0.01)
+ [5]=>
+ float(-0.1)
+ [6]=>
+ float(-10.5)
+}
+
+-- Iteration 3 --
+- With Defualt sort flag -
+bool(true)
+array(11) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(2)
+ [2]=>
+ float(0.106)
+ [3]=>
+ float(0.09)
+ [4]=>
+ float(0.0021)
+ [5]=>
+ float(0.0001)
+ [6]=>
+ int(0)
+ [7]=>
+ float(-0.01)
+ [8]=>
+ float(-0.106)
+ [9]=>
+ float(-0.9)
+ [10]=>
+ int(-1)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(2)
+ [2]=>
+ float(0.106)
+ [3]=>
+ float(0.09)
+ [4]=>
+ float(0.0021)
+ [5]=>
+ float(0.0001)
+ [6]=>
+ int(0)
+ [7]=>
+ float(-0.01)
+ [8]=>
+ float(-0.106)
+ [9]=>
+ float(-0.9)
+ [10]=>
+ int(-1)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(11) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(2)
+ [2]=>
+ float(0.106)
+ [3]=>
+ float(0.09)
+ [4]=>
+ float(0.0021)
+ [5]=>
+ float(0.0001)
+ [6]=>
+ int(0)
+ [7]=>
+ float(-0.01)
+ [8]=>
+ float(-0.106)
+ [9]=>
+ float(-0.9)
+ [10]=>
+ int(-1)
+}
+
+-- Iteration 4 --
+- With Defualt sort flag -
+bool(true)
+array(7) {
+ [0]=>
+ float(2147483648)
+ [1]=>
+ int(2147483647)
+ [2]=>
+ int(0)
+ [3]=>
+ int(0)
+ [4]=>
+ int(-2147483647)
+ [5]=>
+ float(-2147483648)
+ [6]=>
+ float(-2147483649)
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(7) {
+ [0]=>
+ float(2147483648)
+ [1]=>
+ int(2147483647)
+ [2]=>
+ int(0)
+ [3]=>
+ int(0)
+ [4]=>
+ int(-2147483647)
+ [5]=>
+ float(-2147483648)
+ [6]=>
+ float(-2147483649)
+}
+- Sort flag = SORT_NUMERIC -
+bool(true)
+array(7) {
+ [0]=>
+ float(2147483648)
+ [1]=>
+ int(2147483647)
+ [2]=>
+ int(0)
+ [3]=>
+ int(0)
+ [4]=>
+ int(-2147483647)
+ [5]=>
+ float(-2147483648)
+ [6]=>
+ float(-2147483649)
+}
+Done
diff --git a/ext/standard/tests/array/rsort_variation4.phpt b/ext/standard/tests/array/rsort_variation4.phpt
new file mode 100644
index 000000000..4cab1a933
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation4.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Test rsort() function : usage variations - referenced variables
+--INI--
+allow_call_time_pass_reference=on
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Test behaviour of rsort() when:
+ * 1. passed an array of referenced variables
+ * 2. $array_arg is a reference to another array
+ * 3. $array_arg is passed by reference
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+$value1 = 100;
+$value2 = 33;
+$value3 = 555;
+
+// an array containing integer references
+$unsorted_numerics = array( &$value1 , &$value2, &$value3);
+
+echo "\n-- 'flag' value is defualt --\n";
+$temp_array = $unsorted_numerics;
+var_dump( rsort($temp_array) );
+var_dump( $temp_array);
+
+echo "\n-- 'flag' = SORT_REGULAR --\n";
+$temp_array = &$unsorted_numerics;
+var_dump( rsort($temp_array, SORT_REGULAR) );
+var_dump( $temp_array);
+
+echo "\n-- 'flag' = SORT_NUMERIC --\n";
+$temp_array = $unsorted_numerics;
+var_dump( rsort(&$temp_array, SORT_NUMERIC) );
+var_dump( $temp_array);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- 'flag' value is defualt --
+bool(true)
+array(3) {
+ [0]=>
+ &int(555)
+ [1]=>
+ &int(100)
+ [2]=>
+ &int(33)
+}
+
+-- 'flag' = SORT_REGULAR --
+bool(true)
+array(3) {
+ [0]=>
+ &int(555)
+ [1]=>
+ &int(100)
+ [2]=>
+ &int(33)
+}
+
+-- 'flag' = SORT_NUMERIC --
+bool(true)
+array(3) {
+ [0]=>
+ &int(555)
+ [1]=>
+ &int(100)
+ [2]=>
+ &int(33)
+}
+Done
diff --git a/ext/standard/tests/array/rsort_variation5.phpt b/ext/standard/tests/array/rsort_variation5.phpt
new file mode 100644
index 000000000..eba6bc420
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation5.phpt
@@ -0,0 +1,221 @@
+--TEST--
+Test rsort() function : usage variations - String values
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass arrays containing different string data to rsort() to test behaviour
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+$various_arrays = array (
+// group of escape sequences
+array(null, NULL, "\a", "\cx", "\e", "\f", "\n", "\t", "\xhh", "\ddd", "\v"),
+
+// array contains combination of capital/small letters
+array("lemoN", "Orange", "banana", "apple", "Test", "TTTT", "ttt", "ww", "x", "X", "oraNGe", "BANANA")
+);
+
+$flags = array("SORT_REGULAR" => SORT_REGULAR, "SORT_STRING" => SORT_STRING);
+
+$count = 1;
+// loop through to test rsort() with different arrays
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "- With Default sort flag -\n";
+ $temp_array = $array;
+ var_dump(rsort($temp_array) );
+ var_dump($temp_array);
+
+ // loop through $flags array and setting all possible flag values
+ foreach($flags as $key => $flag){
+ echo "- Sort flag = $key -\n";
+
+ $temp_array = $array;
+ var_dump(rsort($temp_array, $flag) );
+ var_dump($temp_array);
+ }
+ $count++;
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- Iteration 1 --
+- With Default sort flag -
+bool(true)
+array(11) {
+ [0]=>
+ string(4) "\xhh"
+ [1]=>
+ string(2) "\e"
+ [2]=>
+ string(4) "\ddd"
+ [3]=>
+ string(3) "\cx"
+ [4]=>
+ string(2) "\a"
+ [5]=>
+ string(1) " "
+ [6]=>
+ string(1) " "
+ [7]=>
+ string(1) "
+"
+ [8]=>
+ string(1) " "
+ [9]=>
+ NULL
+ [10]=>
+ NULL
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(11) {
+ [0]=>
+ string(4) "\xhh"
+ [1]=>
+ string(2) "\e"
+ [2]=>
+ string(4) "\ddd"
+ [3]=>
+ string(3) "\cx"
+ [4]=>
+ string(2) "\a"
+ [5]=>
+ string(1) " "
+ [6]=>
+ string(1) " "
+ [7]=>
+ string(1) "
+"
+ [8]=>
+ string(1) " "
+ [9]=>
+ NULL
+ [10]=>
+ NULL
+}
+- Sort flag = SORT_STRING -
+bool(true)
+array(11) {
+ [0]=>
+ string(4) "\xhh"
+ [1]=>
+ string(2) "\e"
+ [2]=>
+ string(4) "\ddd"
+ [3]=>
+ string(3) "\cx"
+ [4]=>
+ string(2) "\a"
+ [5]=>
+ string(1) " "
+ [6]=>
+ string(1) " "
+ [7]=>
+ string(1) "
+"
+ [8]=>
+ string(1) " "
+ [9]=>
+ NULL
+ [10]=>
+ NULL
+}
+
+-- Iteration 2 --
+- With Default sort flag -
+bool(true)
+array(12) {
+ [0]=>
+ string(1) "x"
+ [1]=>
+ string(2) "ww"
+ [2]=>
+ string(3) "ttt"
+ [3]=>
+ string(6) "oraNGe"
+ [4]=>
+ string(5) "lemoN"
+ [5]=>
+ string(6) "banana"
+ [6]=>
+ string(5) "apple"
+ [7]=>
+ string(1) "X"
+ [8]=>
+ string(4) "Test"
+ [9]=>
+ string(4) "TTTT"
+ [10]=>
+ string(6) "Orange"
+ [11]=>
+ string(6) "BANANA"
+}
+- Sort flag = SORT_REGULAR -
+bool(true)
+array(12) {
+ [0]=>
+ string(1) "x"
+ [1]=>
+ string(2) "ww"
+ [2]=>
+ string(3) "ttt"
+ [3]=>
+ string(6) "oraNGe"
+ [4]=>
+ string(5) "lemoN"
+ [5]=>
+ string(6) "banana"
+ [6]=>
+ string(5) "apple"
+ [7]=>
+ string(1) "X"
+ [8]=>
+ string(4) "Test"
+ [9]=>
+ string(4) "TTTT"
+ [10]=>
+ string(6) "Orange"
+ [11]=>
+ string(6) "BANANA"
+}
+- Sort flag = SORT_STRING -
+bool(true)
+array(12) {
+ [0]=>
+ string(1) "x"
+ [1]=>
+ string(2) "ww"
+ [2]=>
+ string(3) "ttt"
+ [3]=>
+ string(6) "oraNGe"
+ [4]=>
+ string(5) "lemoN"
+ [5]=>
+ string(6) "banana"
+ [6]=>
+ string(5) "apple"
+ [7]=>
+ string(1) "X"
+ [8]=>
+ string(4) "Test"
+ [9]=>
+ string(4) "TTTT"
+ [10]=>
+ string(6) "Orange"
+ [11]=>
+ string(6) "BANANA"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_variation6.phpt b/ext/standard/tests/array/rsort_variation6.phpt
new file mode 100644
index 000000000..559a1ebaf
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation6.phpt
@@ -0,0 +1,120 @@
+--TEST--
+Test rsort() function : usage variations - Hexadecimal vales
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass rsort() an array of hexadecimal values to test behaviour
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+// an array contains unsorted hexadecimal values
+$unsorted_hex_array = array(0x1AB, 0xFFF, 0xF, 0xFF, 0x2AA, 0xBB, 0x1ab, 0xff, -0xFF, 0, -0x2aa);
+
+echo "\n-- 'flag' value is defualt --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(rsort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- 'flag' value is SORT_REGULAR --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(rsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "\n-- 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $unsorted_hex_array;
+var_dump(rsort($temp_array, SORT_NUMERIC) );
+var_dump($temp_array);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- 'flag' value is defualt --
+bool(true)
+array(11) {
+ [0]=>
+ int(4095)
+ [1]=>
+ int(682)
+ [2]=>
+ int(427)
+ [3]=>
+ int(427)
+ [4]=>
+ int(255)
+ [5]=>
+ int(255)
+ [6]=>
+ int(187)
+ [7]=>
+ int(15)
+ [8]=>
+ int(0)
+ [9]=>
+ int(-255)
+ [10]=>
+ int(-682)
+}
+
+-- 'flag' value is SORT_REGULAR --
+bool(true)
+array(11) {
+ [0]=>
+ int(4095)
+ [1]=>
+ int(682)
+ [2]=>
+ int(427)
+ [3]=>
+ int(427)
+ [4]=>
+ int(255)
+ [5]=>
+ int(255)
+ [6]=>
+ int(187)
+ [7]=>
+ int(15)
+ [8]=>
+ int(0)
+ [9]=>
+ int(-255)
+ [10]=>
+ int(-682)
+}
+
+-- 'flag' value is SORT_NUMERIC --
+bool(true)
+array(11) {
+ [0]=>
+ int(4095)
+ [1]=>
+ int(682)
+ [2]=>
+ int(427)
+ [3]=>
+ int(427)
+ [4]=>
+ int(255)
+ [5]=>
+ int(255)
+ [6]=>
+ int(187)
+ [7]=>
+ int(15)
+ [8]=>
+ int(0)
+ [9]=>
+ int(-255)
+ [10]=>
+ int(-682)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_variation7.phpt b/ext/standard/tests/array/rsort_variation7.phpt
new file mode 100644
index 000000000..a996bf6db
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation7.phpt
@@ -0,0 +1,96 @@
+--TEST--
+Test rsort() function : usage variations - boolean values
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass rsort() arrays of boolean values to test behaviour
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+// bool value array
+$bool_values = array (true, false, TRUE, FALSE);
+
+echo "\n-- 'flag' value is defualt --\n";
+$temp_array = $bool_values;
+var_dump(rsort($temp_array) );
+var_dump($temp_array);
+
+echo "\n-- 'flag' value is SORT_REGULAR --\n";
+$temp_array = $bool_values;
+var_dump(rsort($temp_array, SORT_REGULAR) );
+var_dump($temp_array);
+
+echo "\n-- 'flag' value is SORT_NUMERIC --\n";
+$temp_array = $bool_values;
+var_dump(rsort($temp_array, SORT_NUMERIC) );
+var_dump($temp_array);
+
+echo "\n-- 'flag' value is SORT_STRING --\n";
+$temp_array = $bool_values;
+var_dump(rsort($temp_array, SORT_STRING) );
+var_dump($temp_array);
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- 'flag' value is defualt --
+bool(true)
+array(4) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [2]=>
+ bool(false)
+ [3]=>
+ bool(false)
+}
+
+-- 'flag' value is SORT_REGULAR --
+bool(true)
+array(4) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [2]=>
+ bool(false)
+ [3]=>
+ bool(false)
+}
+
+-- 'flag' value is SORT_NUMERIC --
+bool(true)
+array(4) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [2]=>
+ bool(false)
+ [3]=>
+ bool(false)
+}
+
+-- 'flag' value is SORT_STRING --
+bool(true)
+array(4) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(true)
+ [2]=>
+ bool(false)
+ [3]=>
+ bool(false)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_variation8.phpt b/ext/standard/tests/array/rsort_variation8.phpt
new file mode 100644
index 000000000..a4f94b5f0
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation8.phpt
@@ -0,0 +1,180 @@
+--TEST--
+Test rsort() function : usage variations - multi-dimensional arrays
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass rsort() multi-dimensional arrays to test behaviour
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+// array of arrays
+$various_arrays = array (
+ // null array
+ array(),
+
+ // array contains null sub array
+ array( array() ),
+
+ // array of arrays along with some values
+ array(44, 11, array(64, 61) ),
+
+ // array containing sub arrays
+ array(array(33, -5, 6), array(11), array(22, -55), array() )
+);
+
+
+$count = 1;
+
+// loop through to test rsort() with different arrays
+foreach ($various_arrays as $array) {
+
+ echo "\n-- Iteration $count --\n";
+
+ echo "\n-- 'flag' value is default --\n";
+ $temp_array = $array;
+ var_dump(rsort($temp_array) );
+ var_dump($temp_array);
+
+ echo "\n-- 'flag' value is SORT_REGULAR --\n";
+ $temp_array = $array;
+ var_dump(rsort($temp_array, SORT_REGULAR) );
+ var_dump($temp_array);
+ $count++;
+}
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- Iteration 1 --
+
+-- 'flag' value is default --
+bool(true)
+array(0) {
+}
+
+-- 'flag' value is SORT_REGULAR --
+bool(true)
+array(0) {
+}
+
+-- Iteration 2 --
+
+-- 'flag' value is default --
+bool(true)
+array(1) {
+ [0]=>
+ array(0) {
+ }
+}
+
+-- 'flag' value is SORT_REGULAR --
+bool(true)
+array(1) {
+ [0]=>
+ array(0) {
+ }
+}
+
+-- Iteration 3 --
+
+-- 'flag' value is default --
+bool(true)
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(64)
+ [1]=>
+ int(61)
+ }
+ [1]=>
+ int(44)
+ [2]=>
+ int(11)
+}
+
+-- 'flag' value is SORT_REGULAR --
+bool(true)
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(64)
+ [1]=>
+ int(61)
+ }
+ [1]=>
+ int(44)
+ [2]=>
+ int(11)
+}
+
+-- Iteration 4 --
+
+-- 'flag' value is default --
+bool(true)
+array(4) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ [3]=>
+ array(0) {
+ }
+}
+
+-- 'flag' value is SORT_REGULAR --
+bool(true)
+array(4) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(33)
+ [1]=>
+ int(-5)
+ [2]=>
+ int(6)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(22)
+ [1]=>
+ int(-55)
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ int(11)
+ }
+ [3]=>
+ array(0) {
+ }
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/rsort_variation9.phpt b/ext/standard/tests/array/rsort_variation9.phpt
new file mode 100644
index 000000000..c08791df1
--- /dev/null
+++ b/ext/standard/tests/array/rsort_variation9.phpt
@@ -0,0 +1,259 @@
+--TEST--
+Test rsort() function : usage variations - mixed associative arrays
+--FILE--
+<?php
+/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
+ * Description: Sort an array in reverse order
+ * Source code: ext/standard/array.c
+ */
+
+/*
+ * Pass rsort() associative arrays to test key re-assignment
+ */
+
+echo "*** Testing rsort() : variation ***\n";
+
+// Associative arrays
+$various_arrays = array(
+ // numeric assoc. only array
+ array(5 => 55, 6 => 66, 2 => 22, 3 => 33, 1 => 11),
+
+ // two-dimensional assoc. and default key array
+ array("fruits" => array("a" => "orange", "b" => "banana", "c" => "apple"),
+ "numbers" => array(1, 2, 3, 4, 5, 6),
+ "holes" => array("first", 5 => "second", "third")),
+
+ // numeric assoc. and default key array
+ array(1, 1, 8 => 1, 4 => 1, 19, 3 => 13),
+
+ // mixed assoc. array
+ array('bar' => 'baz', "foo" => 1),
+
+ // assoc. only multi-dimensional array
+ array('a' => 1,'b' => array('e' => 2,'f' => 3),'c' => array('g' => 4),'d' => 5),
+);
+
+$count = 1;
+
+// loop through to test rsort() with different arrays,
+// to test the new keys for the elements in the sorted array
+foreach ($various_arrays as $array) {
+ echo "\n-- Iteration $count --\n";
+
+ echo "-- Sort flag = default --\n";
+ $temp_array = $array;
+ var_dump(rsort($temp_array) );
+ var_dump($temp_array);
+
+ echo "-- Sort flag = SORT_REGULAR --\n";
+ $temp_array = $array;
+ var_dump(rsort($temp_array, SORT_REGULAR) );
+ var_dump($temp_array);
+ $count++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing rsort() : variation ***
+
+-- Iteration 1 --
+-- Sort flag = default --
+bool(true)
+array(5) {
+ [0]=>
+ int(66)
+ [1]=>
+ int(55)
+ [2]=>
+ int(33)
+ [3]=>
+ int(22)
+ [4]=>
+ int(11)
+}
+-- Sort flag = SORT_REGULAR --
+bool(true)
+array(5) {
+ [0]=>
+ int(66)
+ [1]=>
+ int(55)
+ [2]=>
+ int(33)
+ [3]=>
+ int(22)
+ [4]=>
+ int(11)
+}
+
+-- Iteration 2 --
+-- Sort flag = default --
+bool(true)
+array(3) {
+ [0]=>
+ array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ [4]=>
+ int(5)
+ [5]=>
+ int(6)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ string(5) "first"
+ [5]=>
+ string(6) "second"
+ [6]=>
+ string(5) "third"
+ }
+ [2]=>
+ array(3) {
+ ["a"]=>
+ string(6) "orange"
+ ["b"]=>
+ string(6) "banana"
+ ["c"]=>
+ string(5) "apple"
+ }
+}
+-- Sort flag = SORT_REGULAR --
+bool(true)
+array(3) {
+ [0]=>
+ array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ [4]=>
+ int(5)
+ [5]=>
+ int(6)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ string(5) "first"
+ [5]=>
+ string(6) "second"
+ [6]=>
+ string(5) "third"
+ }
+ [2]=>
+ array(3) {
+ ["a"]=>
+ string(6) "orange"
+ ["b"]=>
+ string(6) "banana"
+ ["c"]=>
+ string(5) "apple"
+ }
+}
+
+-- Iteration 3 --
+-- Sort flag = default --
+bool(true)
+array(6) {
+ [0]=>
+ int(19)
+ [1]=>
+ int(13)
+ [2]=>
+ int(1)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+ [5]=>
+ int(1)
+}
+-- Sort flag = SORT_REGULAR --
+bool(true)
+array(6) {
+ [0]=>
+ int(19)
+ [1]=>
+ int(13)
+ [2]=>
+ int(1)
+ [3]=>
+ int(1)
+ [4]=>
+ int(1)
+ [5]=>
+ int(1)
+}
+
+-- Iteration 4 --
+-- Sort flag = default --
+bool(true)
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ string(3) "baz"
+}
+-- Sort flag = SORT_REGULAR --
+bool(true)
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ string(3) "baz"
+}
+
+-- Iteration 5 --
+-- Sort flag = default --
+bool(true)
+array(4) {
+ [0]=>
+ array(2) {
+ ["e"]=>
+ int(2)
+ ["f"]=>
+ int(3)
+ }
+ [1]=>
+ array(1) {
+ ["g"]=>
+ int(4)
+ }
+ [2]=>
+ int(5)
+ [3]=>
+ int(1)
+}
+-- Sort flag = SORT_REGULAR --
+bool(true)
+array(4) {
+ [0]=>
+ array(2) {
+ ["e"]=>
+ int(2)
+ ["f"]=>
+ int(3)
+ }
+ [1]=>
+ array(1) {
+ ["g"]=>
+ int(4)
+ }
+ [2]=>
+ int(5)
+ [3]=>
+ int(1)
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/array/sizeof_basic1.phpt b/ext/standard/tests/array/sizeof_basic1.phpt
new file mode 100644
index 000000000..dea4a68ea
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_basic1.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test sizeof() function : basic functionality - for scalar types
+--FILE--
+<?php
+/* Prototype : int sizeof(mixed $var[, int $mode] )
+ * Description: Counts an elements in an array. If Standard PHP library is
+ * installed, it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+/* Testing the sizeof() for some of the scalar types(integer, float) values
+ * in default, COUNT_NORMAL and COUNT_RECURSIVE modes.
+ */
+
+echo "*** Testing sizeof() : basic functionality ***\n";
+
+$intval = 10;
+$floatval = 10.5;
+$stringval = "String";
+
+echo "-- Testing sizeof() for integer type in default, COUNT_NORMAL and COUNT_RECURSIVE modes --\n";
+echo "default mode: ";
+var_dump( sizeof($intval) );
+echo "\n";
+echo "COUNT_NORMAL mode: ";
+var_dump( sizeof($intval, COUNT_NORMAL) );
+echo "\n";
+echo "COUNT_RECURSIVE mode: ";
+var_dump( sizeof($intval, COUNT_RECURSIVE) );
+echo "\n";
+
+echo "-- Testing sizeof() for float type in default, COUNT_NORMAL and COUNT_RECURSIVE modes --\n";
+echo "default mode: ";
+var_dump( sizeof($floatval) );
+echo "\n";
+echo "COUNT_NORMAL mode: ";
+var_dump( sizeof($floatval, COUNT_NORMAL) );
+echo "\n";
+echo "COUNT_RECURSIVE mode: ";
+var_dump( sizeof($floatval, COUNT_RECURSIVE) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : basic functionality ***
+-- Testing sizeof() for integer type in default, COUNT_NORMAL and COUNT_RECURSIVE modes --
+default mode: int(1)
+
+COUNT_NORMAL mode: int(1)
+
+COUNT_RECURSIVE mode: int(1)
+
+-- Testing sizeof() for float type in default, COUNT_NORMAL and COUNT_RECURSIVE modes --
+default mode: int(1)
+
+COUNT_NORMAL mode: int(1)
+
+COUNT_RECURSIVE mode: int(1)
+Done
diff --git a/ext/standard/tests/array/sizeof_basic2.phpt b/ext/standard/tests/array/sizeof_basic2.phpt
new file mode 100644
index 000000000..a2ab2eedf
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_basic2.phpt
@@ -0,0 +1,99 @@
+--TEST--
+Test sizeof() function : basic functionality - for non-scalar type(array)
+--FILE--
+<?php
+/* Prototype : int sizeof(mixed $var[, int $mode] )
+ * Description: Counts an elements in an array. If Standard PHP library is
+ * installed, it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+/* Testing the sizeof() for non-scalar type(array) value
+ * in default, COUNT_NORMAL and COUNT_RECURSIVE modes.
+ * Sizeof() has been tested for simple integer, string,
+ * indexed and mixed arrays.
+ */
+
+echo "*** Testing sizeof() : basic functionality ***\n";
+
+$int_array = array(1, 2, 3, 4);
+$string_array = array("Saffron", "White", "Green");
+$indexed_array = array("Agression" => "Saffron", "Peace" => "White", "Growth" => "Green");
+$mixed_array = array(1, 2, "Aggression" => "Saffron", 10 => "Ten", "Ten" => 10);
+
+echo "-- Testing sizeof() with integer array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --\n";
+echo "default mode: ";
+var_dump( sizeof($int_array) );
+echo "\n";
+echo "COUNT_NORMAL mode: ";
+var_dump( sizeof($int_array, COUNT_NORMAL) );
+echo "\n";
+echo "COUNT_RECURSIVE mode: ";
+var_dump( sizeof($int_array, COUNT_RECURSIVE) );
+echo "\n";
+
+echo "-- Testing sizeof() with string array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --\n";
+echo "default mode: ";
+var_dump( sizeof($string_array) );
+echo "\n";
+echo "COUNT_NORMAL mode: ";
+var_dump( sizeof($string_array, COUNT_NORMAL) );
+echo "\n";
+echo "COUNT_RECURSIVE mode: ";
+var_dump( sizeof($string_array, COUNT_RECURSIVE) );
+echo "\n";
+
+echo "-- Testing sizeof() with indexed array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --\n";
+echo "default mode: ";
+var_dump( sizeof($indexed_array) );
+echo "\n";
+echo "COUNT_NORMAL mode: ";
+var_dump( sizeof($indexed_array, COUNT_NORMAL) );
+echo "\n";
+echo "COUNT_RECURSIVE mode: ";
+var_dump( sizeof($indexed_array, COUNT_RECURSIVE) );
+echo "\n";
+
+echo "-- Testing sizeof() with mixed array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --\n";
+echo "default mode: ";
+var_dump( sizeof($mixed_array) );
+echo "\n";
+echo "COUNT_NORMAL mode: ";
+var_dump( sizeof($mixed_array, COUNT_NORMAL) );
+echo "\n";
+echo "COUNT_RECURSIVE mode: ";
+var_dump( sizeof($mixed_array, COUNT_RECURSIVE) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : basic functionality ***
+-- Testing sizeof() with integer array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
+default mode: int(4)
+
+COUNT_NORMAL mode: int(4)
+
+COUNT_RECURSIVE mode: int(4)
+
+-- Testing sizeof() with string array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
+default mode: int(3)
+
+COUNT_NORMAL mode: int(3)
+
+COUNT_RECURSIVE mode: int(3)
+
+-- Testing sizeof() with indexed array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
+default mode: int(3)
+
+COUNT_NORMAL mode: int(3)
+
+COUNT_RECURSIVE mode: int(3)
+
+-- Testing sizeof() with mixed array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
+default mode: int(5)
+
+COUNT_NORMAL mode: int(5)
+
+COUNT_RECURSIVE mode: int(5)
+Done
diff --git a/ext/standard/tests/array/sizeof_error.phpt b/ext/standard/tests/array/sizeof_error.phpt
new file mode 100644
index 000000000..79a75f315
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_error.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test sizeof() function : error conditions
+--FILE--
+<?php
+/* Prototype : int sizeof(mixed $var[, int $mode] )
+ * Description: Counts an elements in an array. If Standard PHP Library is installed,
+ * it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+// Calling sizeof() with zero and more than expected arguments .
+
+echo "*** Testing sizeof() : error conditions ***\n";
+
+echo "-- Testing sizeof() with zero arguments --\n";
+var_dump( sizeof() );
+echo "-- Testing sizeof() function with more than two arguments under COUNT_NORMAL mode --\n";
+$var = 100;
+$extra_arg = 10;;
+var_dump( sizeof($var, COUNT_NORMAL, $extra_arg) );
+echo "-- Testing sizeof() function with more than two arguments under COUNT_RECURSIVE mode --\n";
+var_dump( sizeof($var, COUNT_RECURSIVE, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : error conditions ***
+-- Testing sizeof() with zero arguments --
+
+Warning: sizeof() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+-- Testing sizeof() function with more than two arguments under COUNT_NORMAL mode --
+
+Warning: sizeof() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+-- Testing sizeof() function with more than two arguments under COUNT_RECURSIVE mode --
+
+Warning: sizeof() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/sizeof_object1.phpt b/ext/standard/tests/array/sizeof_object1.phpt
new file mode 100644
index 000000000..470599605
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_object1.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test sizeof() function : object functionality - object with Countable interface
+--SKIPIF--
+<?php
+// Skip the test case if Standard PHP Library(spl) is not installed
+ if( !extension_loaded('spl'))
+ {
+ die('skip spl is not installed');
+ }
+?>
+--FILE--
+<?php
+/* Prototype : int sizeof($mixed var[, int $mode])
+ * Description: Counts an elements in an array. If Standard PHP library is installed,
+ * it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+echo "*** Testing sizeof() : object functionality ***\n";
+
+echo "-- Testing sizeof() with an object which implements Countable interface --\n";
+class sizeof_class implements Countable
+{
+ public $member1;
+ private $member2;
+ protected $member3;
+
+ public function count()
+ {
+ return 3; // return the count of member variables in the object
+ }
+}
+
+$obj = new sizeof_class();
+
+echo "-- Testing sizeof() in default mode --\n";
+var_dump( sizeof($obj) );
+echo "-- Testing sizeof() in COUNT_NORMAL mode --\n";
+var_dump( sizeof($obj, COUNT_NORMAL) );
+echo "-- Testing sizeof() in COUNT_RECURSIVE mode --\n";
+var_dump( sizeof($obj, COUNT_RECURSIVE) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : object functionality ***
+-- Testing sizeof() with an object which implements Countable interface --
+-- Testing sizeof() in default mode --
+int(3)
+-- Testing sizeof() in COUNT_NORMAL mode --
+int(3)
+-- Testing sizeof() in COUNT_RECURSIVE mode --
+int(3)
+Done
diff --git a/ext/standard/tests/array/sizeof_object2.phpt b/ext/standard/tests/array/sizeof_object2.phpt
new file mode 100644
index 000000000..e2c0816c6
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_object2.phpt
@@ -0,0 +1,138 @@
+--TEST--
+Test sizeof() function : object functionality - objects without Countable interface
+--FILE--
+<?php
+/* Prototype : int sizeof($mixed var[, int $mode] )
+ * Description: Counts an elements in an array. If Standard PHP library is installed,
+ * it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+echo "*** Testing sizeof() : object functionality ***\n";
+
+echo "--- Testing sizeof() with objects which doesn't implement Countable interface ---\n";
+
+// class without member
+class test
+{
+ // no members
+}
+
+// class with only members and with out member functions
+class test1
+{
+ public $member1;
+ var $var1;
+ private $member2;
+ protected $member3;
+
+ // no member functions
+}
+
+// class with only member functions
+class test2
+{
+ // no data members
+
+ public function display()
+ {
+ echo " Class Name : test2\n";
+ }
+}
+
+// child class which inherits parent test2
+class child_test2 extends test2
+{
+ public $child_member1;
+ private $child_member2;
+}
+
+// abstract class
+abstract class abstract_class
+{
+ public $member1;
+ private $member2;
+
+ abstract protected function display();
+}
+
+// implement abstract 'abstract_class' class
+class concrete_class extends abstract_class
+{
+ protected function display()
+ {
+ echo " class name is : concrete_class \n ";
+ }
+}
+
+$objects = array (
+ /* 1 */ new test(),
+ new test1(),
+ new test2(),
+ new child_test2(),
+ /* 5 */ new concrete_class()
+);
+
+$counter = 1;
+for($i = 0; $i < count($objects); $i++)
+{
+ echo "-- Iteration $counter --\n";
+ $var = $objects[$i];
+
+ echo "Default Mode: ";
+ var_dump( sizeof($var) );
+ echo "\n";
+
+ echo "COUNT_NORMAL Mode: ";
+ var_dump( sizeof($var, COUNT_NORMAL) );
+ echo "\n";
+
+ echo "COUNT_RECURSIVE Mode: ";
+ var_dump( sizeof($var, COUNT_RECURSIVE) );
+ echo "\n";
+
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : object functionality ***
+--- Testing sizeof() with objects which doesn't implement Countable interface ---
+-- Iteration 1 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 2 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 3 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 4 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 5 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+Done
diff --git a/ext/standard/tests/array/sizeof_variation1.phpt b/ext/standard/tests/array/sizeof_variation1.phpt
new file mode 100644
index 000000000..328645f9e
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_variation1.phpt
@@ -0,0 +1,215 @@
+--TEST--
+Test sizeof() function : usage variations - for all scalar types and resource variable
+--FILE--
+<?php
+/* Prototype : int sizeof($mixed var[, int $mode])
+ * Description: Counts an elements in an array. If Standard PHP library is installed,
+ * it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+echo "*** Testing sizeof() : usage variations ***\n";
+
+echo "--- Testing sizeof() for all scalar types in default,COUNT_NORMAL and COUNT_RECURSIVE mode ---\n";
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// array containing all scalar types
+$values = array (
+ // int values
+ /* 1 */ 0,
+ 1,
+
+ // float values
+ /* 3 */ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ /* 7 */ .5,
+
+ // NULL values
+ /* 8 */ NULL,
+ null,
+
+ // boolean values
+ /* 10 */ TRUE,
+ FALSE,
+ true,
+ /* 13 */ false,
+
+ // string data
+ /* 14 */ "",
+ '',
+ "string",
+ /* 17 */ 'string',
+
+ // undefined variable
+ @$undefined_var,
+
+ // resource variable
+ /* 19 */ $fp
+);
+
+// loop through the each value of the array for 'var' argument and check the behaviour of sizeof()
+$counter = 1;
+for($i = 0; $i < count($values); $i++)
+{
+ echo "-- Iteration $counter --\n";
+
+ $var = $values[$i];
+
+ echo "Default Mode: ";
+ var_dump( sizeof($var) );
+ echo "\n";
+
+ echo "COUNT_NORMAL Mode: ";
+ var_dump( sizeof($var, COUNT_NORMAL) );
+ echo "\n";
+
+ echo "COUNT_RECURSIVE Mode: ";
+ var_dump( sizeof($var, COUNT_RECURSIVE) );
+ echo "\n";
+
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : usage variations ***
+--- Testing sizeof() for all scalar types in default,COUNT_NORMAL and COUNT_RECURSIVE mode ---
+-- Iteration 1 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 2 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 3 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 4 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 5 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 6 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 7 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 8 --
+Default Mode: int(0)
+
+COUNT_NORMAL Mode: int(0)
+
+COUNT_RECURSIVE Mode: int(0)
+
+-- Iteration 9 --
+Default Mode: int(0)
+
+COUNT_NORMAL Mode: int(0)
+
+COUNT_RECURSIVE Mode: int(0)
+
+-- Iteration 10 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 11 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 12 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 13 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 14 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 15 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 16 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 17 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+-- Iteration 18 --
+Default Mode: int(0)
+
+COUNT_NORMAL Mode: int(0)
+
+COUNT_RECURSIVE Mode: int(0)
+
+-- Iteration 19 --
+Default Mode: int(1)
+
+COUNT_NORMAL Mode: int(1)
+
+COUNT_RECURSIVE Mode: int(1)
+
+Done
diff --git a/ext/standard/tests/array/sizeof_variation2.phpt b/ext/standard/tests/array/sizeof_variation2.phpt
new file mode 100644
index 000000000..a22457978
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_variation2.phpt
@@ -0,0 +1,163 @@
+--TEST--
+Test sizeof() function : usage variations - different array values for 'var' argument
+--FILE--
+<?php
+/* Prototype : int sizeof($mixed var[, int $mode])
+ * Description: Counts an elements in an array. If Standard PHP library is installed,
+ * it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+echo "*** Testing sizeof() : usage variations ***\n";
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+echo "--- Testing sizeof() with different array values for 'var' argument ---\n";
+
+// array containing different types of array values for 'var' argument
+$values = array (
+ /* 1 */ array($fp, "resource" => $fp),
+ array(1, array(3, 4, array(6, array(8)))),
+ array("a" => 1, 'b' => 2, array( "c" =>3, array( "d" => 5))),
+ array(),
+ /* 5 */ array(1, 2, 3, 4),
+ array("Saffron", "White", "Green"),
+ array('saffron', 'white', 'green'),
+ array(1 => "Hi", 2 => "Hello" ),
+ array("color" => "red", "item" => "pen"),
+ /* 10 */ array('color' => 'red', 'item' => 'pen'),
+ array(TRUE => "red", FALSE => "pen" ),
+ array(false => 'red', true => 'pen' ),
+ array('color' => "red", "item" => 'pen', 1 => "Hi", "" => "Hello" ),
+ /* 14 */ array($fp, "resource1" => $fp, 'resource2' => $fp, array( $fp, 'type' => $fp) )
+);
+
+// loop through each element of the values array for 'var' argument
+// check the working of sizeof()
+$counter = 1;
+for($i = 0; $i < count($values); $i++)
+{
+ echo "-- Iteration $counter --\n";
+ $var = $values[$i];
+
+ echo "Default Mode: ";
+ var_dump( sizeof($var) );
+ echo "\n";
+
+ echo "COUNT_NORMAL Mode: ";
+ var_dump( sizeof($var, COUNT_NORMAL) );
+ echo "\n";
+
+ echo "COUNT_RECURSIVE Mode: ";
+ var_dump( sizeof($var, COUNT_RECURSIVE) );
+ echo "\n";
+
+ $counter++;
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : usage variations ***
+--- Testing sizeof() with different array values for 'var' argument ---
+-- Iteration 1 --
+Default Mode: int(2)
+
+COUNT_NORMAL Mode: int(2)
+
+COUNT_RECURSIVE Mode: int(2)
+
+-- Iteration 2 --
+Default Mode: int(2)
+
+COUNT_NORMAL Mode: int(2)
+
+COUNT_RECURSIVE Mode: int(8)
+
+-- Iteration 3 --
+Default Mode: int(3)
+
+COUNT_NORMAL Mode: int(3)
+
+COUNT_RECURSIVE Mode: int(6)
+
+-- Iteration 4 --
+Default Mode: int(0)
+
+COUNT_NORMAL Mode: int(0)
+
+COUNT_RECURSIVE Mode: int(0)
+
+-- Iteration 5 --
+Default Mode: int(4)
+
+COUNT_NORMAL Mode: int(4)
+
+COUNT_RECURSIVE Mode: int(4)
+
+-- Iteration 6 --
+Default Mode: int(3)
+
+COUNT_NORMAL Mode: int(3)
+
+COUNT_RECURSIVE Mode: int(3)
+
+-- Iteration 7 --
+Default Mode: int(3)
+
+COUNT_NORMAL Mode: int(3)
+
+COUNT_RECURSIVE Mode: int(3)
+
+-- Iteration 8 --
+Default Mode: int(2)
+
+COUNT_NORMAL Mode: int(2)
+
+COUNT_RECURSIVE Mode: int(2)
+
+-- Iteration 9 --
+Default Mode: int(2)
+
+COUNT_NORMAL Mode: int(2)
+
+COUNT_RECURSIVE Mode: int(2)
+
+-- Iteration 10 --
+Default Mode: int(2)
+
+COUNT_NORMAL Mode: int(2)
+
+COUNT_RECURSIVE Mode: int(2)
+
+-- Iteration 11 --
+Default Mode: int(2)
+
+COUNT_NORMAL Mode: int(2)
+
+COUNT_RECURSIVE Mode: int(2)
+
+-- Iteration 12 --
+Default Mode: int(2)
+
+COUNT_NORMAL Mode: int(2)
+
+COUNT_RECURSIVE Mode: int(2)
+
+-- Iteration 13 --
+Default Mode: int(4)
+
+COUNT_NORMAL Mode: int(4)
+
+COUNT_RECURSIVE Mode: int(4)
+
+-- Iteration 14 --
+Default Mode: int(4)
+
+COUNT_NORMAL Mode: int(4)
+
+COUNT_RECURSIVE Mode: int(6)
+
+Done
diff --git a/ext/standard/tests/array/sizeof_variation3.phpt b/ext/standard/tests/array/sizeof_variation3.phpt
new file mode 100644
index 000000000..ba8afb83e
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_variation3.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test sizeof() function : usage variations - checking for infinite recursion in COUNT_RECURSIVE mode
+--FILE--
+<?php
+/* Prototype : int sizeof($mixed var[, int $mode])
+ * Description: Counts an elements in an array. If Standard PHP library is installed,
+ * it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+echo "*** Testing sizeof() : usage variations ***\n";
+
+echo "-- Testing sizeof() for infinite recursion with arrays as argument in COUNT_RECURSIVE mode --\n";
+
+$array2 = array ( "Hi", "Hello",@$a);
+$array3 = array( 'hi', 'hello');
+$a = array ( 1, @$array1, $array2, $array3);
+$array1 = array( array(1, 2), $a);
+$array4 = array( 100, @$array4);
+
+var_dump( sizeof($array1, COUNT_RECURSIVE) );
+echo "\n";
+var_dump( sizeof($array4, COUNT_RECURSIVE) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : usage variations ***
+-- Testing sizeof() for infinite recursion with arrays as argument in COUNT_RECURSIVE mode --
+int(13)
+
+int(2)
+Done
diff --git a/ext/standard/tests/array/sizeof_variation4.phpt b/ext/standard/tests/array/sizeof_variation4.phpt
new file mode 100644
index 000000000..a2462757d
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_variation4.phpt
@@ -0,0 +1,350 @@
+--TEST--
+Test sizeof() function : usage variations - all kinds of unset variables for 'var' argument
+--FILE--
+<?php
+/* Prototype : int sizeof($mixed var[, int $mode])
+ * Description: Counts an elements in an array. If Standard PHP library is installed,
+ * it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+echo "*** Testing sizeof() : usage variations ***\n";
+
+echo "--- Testing sizeof() for all kinds of unset variables in default, Normal and Recursive Modes ---\n";
+
+// class declaration
+class test
+{
+ public $member1;
+}
+
+// get an resource variable
+$fp = fopen(__FILE__, "r");
+
+// array containing different types of variables
+$values = array (
+ // int values
+ /* 1 */ 0,
+ 1,
+ // float values
+ /* 3 */ 10.5,
+ -10.5,
+ 12.34e3,
+ /* 6 */ 12.34E-3,
+ // string values
+ /* 7 */ "string",
+ 'string',
+ "",
+ /* 10 */ '',
+ // NULL values
+ /* 11 */ NULL,
+ null,
+ // Boolean Values
+ /* 12 */ TRUE,
+ true,
+ false,
+ /* 16 */ FALSE,
+ // array values
+ /* 17 */ array(),
+ array(1, 2, 3,4 , array(5, 6)),
+ // object variable
+ /* 19 */ new test(),
+ // resource variable
+ /* 20 */ $fp
+);
+
+// loop through the each element of the $values array for 'var' arugment
+// and check the functionality of sizeof()
+$counter = 1;
+foreach($values as $value)
+{
+ echo "-- Iteration $counter --\n";
+
+ // unset the variable
+ unset($value);
+
+ // now check the size of unset variable when different modes are given
+ echo "Default Mode: ";
+ var_dump( sizeof($value) );
+ echo "\n";
+
+ echo "COUNT_NORMAL Mode: ";
+ var_dump( sizeof($value, COUNT_NORMAL) );
+ echo "\n";
+
+ echo "COUNT_RECURSIVE Mode: ";
+ var_dump( sizeof($value, COUNT_RECURSIVE) );
+ echo "\n";
+
+ $counter++;
+}
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : usage variations ***
+--- Testing sizeof() for all kinds of unset variables in default, Normal and Recursive Modes ---
+-- Iteration 1 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 2 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 3 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 4 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 5 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 6 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 7 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 8 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 9 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 10 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 11 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 12 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 13 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 14 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 15 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 16 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 17 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 18 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 19 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+-- Iteration 20 --
+Default Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_NORMAL Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+COUNT_RECURSIVE Mode:
+Notice: Undefined variable: value in %s on line %d
+int(0)
+
+Done
diff --git a/ext/standard/tests/array/sizeof_variation5.phpt b/ext/standard/tests/array/sizeof_variation5.phpt
new file mode 100644
index 000000000..6e40f7ea7
--- /dev/null
+++ b/ext/standard/tests/array/sizeof_variation5.phpt
@@ -0,0 +1,132 @@
+--TEST--
+Test sizeof() function : usage variations - different values for 'mode' argument
+--FILE--
+<?php
+/* Prototype : int sizeof($mixed var[, int $mode])
+ * Description: Counts an elements in an array. If Standard PHP library is installed,
+ * it will return the properties of an object.
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions: count()
+ */
+
+echo "*** Testing sizeof() : usage variations ***\n";
+
+echo "--- Testing sizeof() with different values for 'mode' argument ---\n";
+$array1 = array(1, 2, 3, 4, array(1.0, 2.0, array()), array() );
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+//unset variable
+$unset_var = 10;
+unset($unset_var);
+
+//class declaration
+class test
+{
+ public $member1;
+}
+
+$mode_values = array (
+ /* 1 */ COUNT_NORMAL,
+ COUNT_RECURSIVE,
+ 0, // same as COUNT_NORMAL
+ 1, // same as COUNT_RECURSIVE
+
+ /* 5 */ TRUE, // same as COUNT_RECURSIVE
+ true, // same as COUNT_RECURSIVE
+ FALSE, // same as COUNT_NORMAL
+ false, // same as COUNT_NORMAL
+ NULL, // same as COUNT_NORMAL
+ /* 10 */ null, // same as COUNT_NORMAL
+ 100,
+ 10.5,
+ 12.34e3,
+ 12.34E-2,
+ /* 15 */ .5,
+ "",
+ '',
+ "string",
+ 'string',
+ /* 20 */ @$unset_var,
+ new test(),
+ /* 22 */ $fp
+);
+
+// loop through the each element of $modes_array for 'mode' argument
+// and check the working of sizeof()
+$counter = 1;
+for($i = 0; $i < count($mode_values); $i++)
+{
+ echo "-- Iteration $counter --\n";
+ $mode = $mode_values[$i];
+
+ var_dump( sizeof($array1, $mode) );
+
+ $counter++;
+}
+
+fclose($fp);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sizeof() : usage variations ***
+--- Testing sizeof() with different values for 'mode' argument ---
+-- Iteration 1 --
+int(6)
+-- Iteration 2 --
+int(9)
+-- Iteration 3 --
+int(6)
+-- Iteration 4 --
+int(9)
+-- Iteration 5 --
+int(9)
+-- Iteration 6 --
+int(9)
+-- Iteration 7 --
+int(6)
+-- Iteration 8 --
+int(6)
+-- Iteration 9 --
+int(6)
+-- Iteration 10 --
+int(6)
+-- Iteration 11 --
+int(6)
+-- Iteration 12 --
+int(6)
+-- Iteration 13 --
+int(6)
+-- Iteration 14 --
+int(6)
+-- Iteration 15 --
+int(6)
+-- Iteration 16 --
+
+Warning: sizeof() expects parameter 2 to be long, string given in %s on line %d
+NULL
+-- Iteration 17 --
+
+Warning: sizeof() expects parameter 2 to be long, string given in %s on line %d
+NULL
+-- Iteration 18 --
+
+Warning: sizeof() expects parameter 2 to be long, string given in %s on line %d
+NULL
+-- Iteration 19 --
+
+Warning: sizeof() expects parameter 2 to be long, string given in %s on line %d
+NULL
+-- Iteration 20 --
+int(6)
+-- Iteration 21 --
+
+Warning: sizeof() expects parameter 2 to be long, object given in %s on line %d
+NULL
+-- Iteration 22 --
+
+Warning: sizeof() expects parameter 2 to be long, resource given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/uasort_basic1.phpt b/ext/standard/tests/array/uasort_basic1.phpt
new file mode 100644
index 000000000..70dd04c0c
--- /dev/null
+++ b/ext/standard/tests/array/uasort_basic1.phpt
@@ -0,0 +1,116 @@
+--TEST--
+Test uasort() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing uasort() : basic functionality ***\n";
+
+// comparison function
+/* Prototype : int cmp(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else
+ return -1;
+}
+
+// Int array with default keys
+$int_values = array(1, 8, 9, 3, 2, 6, 7);
+echo "-- Numeric array with default keys --\n";
+var_dump( uasort($int_values, 'cmp') );
+var_dump($int_values);
+
+// String array with default keys
+$string_values = array("This", "is", 'a', "test");
+echo "-- String array with default keys --\n";
+var_dump( uasort($string_values, 'cmp') );
+var_dump($string_values);
+
+// Associative array with numeric keys
+$numeric_key_arg = array(1=> 1, 2 => 2, 3 => 7, 5 => 4, 4 => 9);
+echo "-- Associative array with numeric keys --\n";
+var_dump( uasort($numeric_key_arg, 'cmp') );
+var_dump($numeric_key_arg);
+
+// Associative array with string keys
+$string_key_arg = array('one' => 4, 'two' => 2, 'three' => 1, 'four' => 10);
+echo "-- Associative array with string keys --\n";
+var_dump( uasort($string_key_arg, 'cmp') );
+var_dump($string_key_arg);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : basic functionality ***
+-- Numeric array with default keys --
+bool(true)
+array(7) {
+ [0]=>
+ int(1)
+ [4]=>
+ int(2)
+ [3]=>
+ int(3)
+ [5]=>
+ int(6)
+ [6]=>
+ int(7)
+ [1]=>
+ int(8)
+ [2]=>
+ int(9)
+}
+-- String array with default keys --
+bool(true)
+array(4) {
+ [0]=>
+ string(4) "This"
+ [2]=>
+ string(1) "a"
+ [1]=>
+ string(2) "is"
+ [3]=>
+ string(4) "test"
+}
+-- Associative array with numeric keys --
+bool(true)
+array(5) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [5]=>
+ int(4)
+ [3]=>
+ int(7)
+ [4]=>
+ int(9)
+}
+-- Associative array with string keys --
+bool(true)
+array(4) {
+ ["three"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+ ["one"]=>
+ int(4)
+ ["four"]=>
+ int(10)
+}
+Done
diff --git a/ext/standard/tests/array/uasort_basic2.phpt b/ext/standard/tests/array/uasort_basic2.phpt
new file mode 100644
index 000000000..e1b4ac9b2
--- /dev/null
+++ b/ext/standard/tests/array/uasort_basic2.phpt
@@ -0,0 +1,102 @@
+--TEST--
+Test uasort() function : basic functionality - duplicate values
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing uasort() : basic functionality with duplicate values ***\n";
+
+// comparison function
+/* Prototype : int cmp(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else
+ return -1;
+}
+
+// increasing values
+$int_values1 = array(1, 1, 2, 2, 3, 3);
+echo "-- Numeric array with increasing values --\n";
+var_dump( uasort($int_values1, 'cmp') );
+var_dump($int_values1);
+
+// decreasing values
+$int_values2 = array(3, 3, 2, 2, 1, 1);
+echo "-- Numeric array with decreasing values --\n";
+var_dump( uasort($int_values2, 'cmp') );
+var_dump($int_values2);
+
+// increasing and decreasing values
+$int_values3 = array(1, 2, 3, 3, 2, 1);
+echo "-- Numeric array with increasing and decreasing values --\n";
+var_dump( uasort($int_values3, 'cmp') );
+var_dump($int_values3);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : basic functionality with duplicate values ***
+-- Numeric array with increasing values --
+bool(true)
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [3]=>
+ int(2)
+ [2]=>
+ int(2)
+ [5]=>
+ int(3)
+ [4]=>
+ int(3)
+}
+-- Numeric array with decreasing values --
+bool(true)
+array(6) {
+ [4]=>
+ int(1)
+ [5]=>
+ int(1)
+ [3]=>
+ int(2)
+ [2]=>
+ int(2)
+ [1]=>
+ int(3)
+ [0]=>
+ int(3)
+}
+-- Numeric array with increasing and decreasing values --
+bool(true)
+array(6) {
+ [5]=>
+ int(1)
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [4]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(3)
+}
+Done
diff --git a/ext/standard/tests/array/uasort_error.phpt b/ext/standard/tests/array/uasort_error.phpt
new file mode 100644
index 000000000..5f3d7ef10
--- /dev/null
+++ b/ext/standard/tests/array/uasort_error.phpt
@@ -0,0 +1,81 @@
+--TEST--
+Test uasort() function : error conditions
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+echo "*** Testing uasort() : error conditions ***\n";
+
+// comparison function
+/* Prototype : int cmp(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
+}
+
+// Initialize 'array_arg'
+$array_arg = array(0 => 1, 1 => 10, 2 => 'string', 3 => 3, 4 => 2, 5 => 100, 6 => 25);
+
+// With zero arguments
+echo "-- Testing uasort() function with Zero argument --\n";
+var_dump( uasort() );
+
+// With one more than the expected number of arguments
+echo "-- Testing uasort() function with more than expected no. of arguments --\n";
+$extra_arg = 10;
+var_dump( uasort($array_arg, 'cmp', $extra_arg) );
+
+// With one less than the expected number of arguments
+echo "-- Testing uasort() function with less than expected no. of arguments --\n";
+var_dump( uasort($array_arg) );
+
+// With non existent comparison function
+echo "-- Testing uasort() function with non-existent compare function --\n";
+var_dump( uasort($array_arg, 'non_existent') );
+
+// With non existent comparison function and extra arguemnt
+echo "-- Testing uasort() function with non-existent compare function and extra argument --\n";
+var_dump( uasort($array_arg, 'non_existent', $extra_arg) );
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : error conditions ***
+-- Testing uasort() function with Zero argument --
+
+Warning: Wrong parameter count for uasort() in %s on line %d
+NULL
+-- Testing uasort() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for uasort() in %s on line %d
+NULL
+-- Testing uasort() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for uasort() in %s on line %d
+NULL
+-- Testing uasort() function with non-existent compare function --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Testing uasort() function with non-existent compare function and extra argument --
+
+Warning: Wrong parameter count for uasort() in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/array/uasort_object1.phpt b/ext/standard/tests/array/uasort_object1.phpt
new file mode 100644
index 000000000..c407ebc1f
--- /dev/null
+++ b/ext/standard/tests/array/uasort_object1.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test uasort() function : object functionality
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+ * Testing uasort() function with the array of objects
+ * array of objects which has only one member variable & more than one member variables
+ */
+
+echo "*** Testing uasort() : object functionality ***\n";
+
+// comparison function
+/* Prototype : int cmp(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value3
+ * Description : compares value1 and value2
+ */
+function simple_cmp($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else
+ return -1;
+}
+
+// comparison function for SimpleClass2 objects which has more than one members
+function multiple_cmp($value1, $value2)
+{
+ if($value1->getValue() == $value2->getValue())
+ return 0;
+ else if($value1->getValue() > $value2->getValue())
+ return 1;
+ else
+ return -1;
+}
+
+// Simple class with single member variable
+class SimpleClass1
+{
+ private $int_value;
+
+ public function __construct($value) {
+ $this->int_value = $value;
+ }
+}
+
+// Simple class with more than one member variables
+class SimpleClass2
+{
+ private $int_value;
+ protected $float_value;
+ public $string_value;
+ public function __construct($int, $float, $str) {
+ $this->int_value = $int;
+ $this->float_value = $float;
+ $this->string_value = $str;
+ }
+ public function getValue() {
+ return $this->int_value;
+ }
+}
+
+// array of SimpleClass objects with only one member
+$array_arg = array(
+ 0 => new SimpleClass1(10),
+ 1 => new SimpleClass1(1),
+ 2 => new SimpleClass1(100),
+ 3 => new SimpleClass1(50)
+);
+var_dump( uasort($array_arg, 'simple_cmp') );
+var_dump($array_arg);
+
+// array of SimpleClass objects having more than one members
+$array_arg = array(
+ 0 => new SimpleClass2(2, 3.4, "mango"),
+ 1 => new SimpleClass2(10, 1.2, "apple"),
+ 2 => new SimpleClass2(5, 2.5, "orange"),
+);
+var_dump( uasort($array_arg, 'multiple_cmp') );
+var_dump($array_arg);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : object functionality ***
+bool(true)
+array(4) {
+ [1]=>
+ object(SimpleClass1)#%d (1) {
+ ["int_value:private"]=>
+ int(1)
+ }
+ [0]=>
+ object(SimpleClass1)#%d (1) {
+ ["int_value:private"]=>
+ int(10)
+ }
+ [3]=>
+ object(SimpleClass1)#%d (1) {
+ ["int_value:private"]=>
+ int(50)
+ }
+ [2]=>
+ object(SimpleClass1)#%d (1) {
+ ["int_value:private"]=>
+ int(100)
+ }
+}
+bool(true)
+array(3) {
+ [0]=>
+ object(SimpleClass2)#%d (3) {
+ ["int_value:private"]=>
+ int(2)
+ ["float_value:protected"]=>
+ float(3.4)
+ ["string_value"]=>
+ string(5) "mango"
+ }
+ [2]=>
+ object(SimpleClass2)#%d (3) {
+ ["int_value:private"]=>
+ int(5)
+ ["float_value:protected"]=>
+ float(2.5)
+ ["string_value"]=>
+ string(6) "orange"
+ }
+ [1]=>
+ object(SimpleClass2)#%d (3) {
+ ["int_value:private"]=>
+ int(10)
+ ["float_value:protected"]=>
+ float(1.2)
+ ["string_value"]=>
+ string(5) "apple"
+ }
+}
+Done
diff --git a/ext/standard/tests/array/uasort_object2.phpt b/ext/standard/tests/array/uasort_object2.phpt
new file mode 100644
index 000000000..cd32d8d94
--- /dev/null
+++ b/ext/standard/tests/array/uasort_object2.phpt
@@ -0,0 +1,187 @@
+--TEST--
+Test uasort() function : object functionality - sort diff. objects
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*
+
+/*
+ * This testcase tests uasort() functionality with differnt objects
+ * Objects of different classes:
+ * simple class,
+ * child class,
+ * empty class &
+ * static class
+ */
+
+echo "*** Testing uasort() : object functionality ***\n";
+
+// comparison function
+/* Prototype : int cmp_function(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp_function($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else
+ return -1;
+}
+
+
+// Simple class with single member variable
+class SimpleClass
+{
+ private $int_value;
+
+ public function __construct($value) {
+ $this->int_value = $value;
+ }
+
+}
+
+// Class without any member
+class EmptyClass
+{
+}
+
+// Class with static member
+class StaticClass
+{
+ public static $static_value;
+ public function __construct($value) {
+ StaticClass::$static_value = $value;
+ }
+}
+
+// Abstract class
+abstract class AbstractClass
+{
+ public $pub_value;
+ public abstract function abstractMethod();
+}
+
+// Child class extending abstract class
+class ChildClass extends AbstractClass
+{
+ public $child_value = 100;
+ public function abstractMethod() {
+ $pub_value = 5;
+ }
+ public function __construct($value) {
+ $this->child_value = $value;
+ }
+}
+
+// Testing uasort with StaticClass objects as elements of 'array_arg'
+echo "-- Testing uasort() with StaticClass objects --\n";
+$array_arg = array(
+ 0 => new StaticClass(20),
+ 1 => new StaticClass(50),
+ 2 => new StaticClass(15),
+ 3 => new StaticClass(70),
+);
+var_dump( uasort($array_arg, 'cmp_function') );
+var_dump($array_arg);
+
+// Testing uasort with EmptyClass objects as elements of 'array_arg'
+echo "-- Testing uasort() with EmptyClass objects --\n";
+$array_arg = array(
+ 0 => new EmptyClass(),
+ 1 => new EmptyClass(),
+ 2 => new EmptyClass(),
+ 3 => new EmptyClass(),
+);
+var_dump( uasort($array_arg, 'cmp_function') );
+var_dump($array_arg);
+
+// Testing uasort with ChildClass objects as elements of 'array_arg'
+echo "-- Testing uasort() with ChildClass objects --\n";
+$array_arg = array(
+ 0 => new ChildClass(20),
+ 1 => new ChildClass(500),
+ 2 => new ChildClass(15),
+ 3 => new ChildClass(700),
+);
+var_dump( uasort($array_arg, 'cmp_function') );
+var_dump($array_arg);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : object functionality ***
+-- Testing uasort() with StaticClass objects --
+bool(true)
+array(4) {
+ [3]=>
+ object(StaticClass)#%d (0) {
+ }
+ [2]=>
+ object(StaticClass)#%d (0) {
+ }
+ [1]=>
+ object(StaticClass)#%d (0) {
+ }
+ [0]=>
+ object(StaticClass)#%d (0) {
+ }
+}
+-- Testing uasort() with EmptyClass objects --
+bool(true)
+array(4) {
+ [3]=>
+ object(EmptyClass)#%d (0) {
+ }
+ [2]=>
+ object(EmptyClass)#%d (0) {
+ }
+ [1]=>
+ object(EmptyClass)#%d (0) {
+ }
+ [0]=>
+ object(EmptyClass)#%d (0) {
+ }
+}
+-- Testing uasort() with ChildClass objects --
+bool(true)
+array(4) {
+ [2]=>
+ object(ChildClass)#%d (2) {
+ ["child_value"]=>
+ int(15)
+ ["pub_value"]=>
+ NULL
+ }
+ [0]=>
+ object(ChildClass)#%d (2) {
+ ["child_value"]=>
+ int(20)
+ ["pub_value"]=>
+ NULL
+ }
+ [1]=>
+ object(ChildClass)#%d (2) {
+ ["child_value"]=>
+ int(500)
+ ["pub_value"]=>
+ NULL
+ }
+ [3]=>
+ object(ChildClass)#%d (2) {
+ ["child_value"]=>
+ int(700)
+ ["pub_value"]=>
+ NULL
+ }
+}
+Done
diff --git a/ext/standard/tests/array/uasort_variation1.phpt b/ext/standard/tests/array/uasort_variation1.phpt
new file mode 100644
index 000000000..cce86ee0b
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation1.phpt
@@ -0,0 +1,188 @@
+--TEST--
+Test uasort() function : usage variations - unexpected values for 'array_arg' argument
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing uasort() function by passing different scalar/nonscalar values as 'array_arg' argument
+*/
+
+echo "*** Testing uasort() : unexpected values for 'array_arg' ***\n";
+
+// Comparison function
+/* Prototype : int cmp_function(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp_function($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
+}
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get resource variable
+$fp = fopen(__FILE__,'r');
+
+//array of values to iterate over
+$input_values = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 10.1234567e8,
+ 10.7654321E-8,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+
+ // string data
+/*18*/ "string",
+ 'string',
+
+ // resource data
+/*20*/ $fp,
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+/*22*/ @$unset_var,
+);
+
+// loop through each value of input_values
+for($count = 0; $count < count($input_values); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( uasort($input_values[$count], 'cmp_function') );
+};
+
+//closing resource
+fclose($fp);
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : unexpected values for 'array_arg' ***
+-- Iteration 1 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 11 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 13 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 14 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 21 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+-- Iteration 22 --
+
+Warning: uasort(): The argument should be an array in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/uasort_variation10.phpt b/ext/standard/tests/array/uasort_variation10.phpt
new file mode 100644
index 000000000..809cb78f5
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation10.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Test uasort() function : usage variations - sort array with reference variables
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing uasort() with 'array_arg' containing different reference variables
+*/
+
+// comparision function
+/* Prototype : int cmp_function(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp_function($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
+}
+
+echo "*** Testing uasort() : 'array_arg' with elements as reference ***\n";
+
+// different variables which are used as elements of 'array_arg'
+$value1 = -5;
+$value2 = 100;
+$value3 = 0;
+$value4 = &$value1;
+
+// array_args an array containing elements with reference variables
+$array_arg = array(
+ 0 => 10,
+ 1 => &$value4,
+ 2 => &$value2,
+ 3 => 200,
+ 4 => &$value3,
+);
+
+echo "-- Sorting 'array_arg' containing different references --\n";
+var_dump( uasort($array_arg, 'cmp_function') ); // expecting: bool(true)
+var_dump($array_arg);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : 'array_arg' with elements as reference ***
+-- Sorting 'array_arg' containing different references --
+bool(true)
+array(5) {
+ [1]=>
+ &int(-5)
+ [4]=>
+ &int(0)
+ [0]=>
+ int(10)
+ [2]=>
+ &int(100)
+ [3]=>
+ int(200)
+}
+Done
diff --git a/ext/standard/tests/array/uasort_variation11.phpt b/ext/standard/tests/array/uasort_variation11.phpt
new file mode 100644
index 000000000..6d523eaed
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation11.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Test uasort() function : usage variations - different associative arrays
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/* Testing uasort() with different associative arrays having keys as
+ * string, integer, default & duplicate keys
+ */
+
+echo "*** Testing uasort() : sorting different associative arrays ***\n";
+
+// comparison function
+/* Prototype : int cmp(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else
+ return -1;
+}
+
+// Array with duplicate string and integer keys
+$array_arg = array(0 => 2, "a" => 8, "d" => 9, 3 => 3, 5 => 2, "o" => 6, "z" => -99, 0 => 1, "z" => 3);
+echo "-- Array with duplicate keys --\n";
+var_dump( uasort($array_arg, 'cmp') );
+var_dump($array_arg);
+
+// Array with default and assigned keys
+$array_arg = array(0 => "Banana", 1 => "Mango", "Orange", 2 => "Apple", "Pineapple");
+echo "-- Array with default/assigned keys --\n";
+var_dump( uasort($array_arg, 'cmp') );
+var_dump($array_arg);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : sorting different associative arrays ***
+-- Array with duplicate keys --
+bool(true)
+array(7) {
+ [0]=>
+ int(1)
+ [5]=>
+ int(2)
+ ["z"]=>
+ int(3)
+ [3]=>
+ int(3)
+ ["o"]=>
+ int(6)
+ ["a"]=>
+ int(8)
+ ["d"]=>
+ int(9)
+}
+-- Array with default/assigned keys --
+bool(true)
+array(4) {
+ [2]=>
+ string(5) "Apple"
+ [0]=>
+ string(6) "Banana"
+ [1]=>
+ string(5) "Mango"
+ [3]=>
+ string(9) "Pineapple"
+}
+Done
diff --git a/ext/standard/tests/array/uasort_variation2.phpt b/ext/standard/tests/array/uasort_variation2.phpt
new file mode 100644
index 000000000..af1b71c0e
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation2.phpt
@@ -0,0 +1,212 @@
+--TEST--
+Test uasort() function : usage variations - unexpected values for 'cmp_function' argument
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing uasort() function with different scalar and nonscalar values in place of 'cmp_function'
+*/
+
+echo "*** Testing uasort() : Unexpected values in place of comparison function ***\n";
+
+// Class definition for object variable
+class MyClass
+{
+ public function __toString()
+ {
+ return 'object';
+ }
+}
+
+$array_arg = array(0 => 1, 1 => -1, 2 => 3, 3 => 10, 4 => 4, 5 => 2, 6 => 8, 7 => 5);
+
+// Get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// Get resource variable
+$fp = fopen(__FILE__,'r');
+
+// different values for 'cmp_function'
+$cmp_values = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 10.1234567e8,
+ 10.7654321E-8,
+ .5,
+
+ // array data
+/*10*/ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+/*15*/ NULL,
+ null,
+
+ // boolean data
+/*17*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*21*/ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+/*25*/ new MyClass(),
+
+ // resource data
+ $fp,
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+/*28*/ @$unset_var,
+);
+
+// loop through each element of the cmp_values for 'cmp_function'
+for($count = 0; $count < count($cmp_values); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( uasort($array_arg, $cmp_values[$count]) );
+};
+
+//closing resource
+fclose($fp);
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : Unexpected values in place of comparison function ***
+-- Iteration 1 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 2 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 7 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 8 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 9 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 10 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 11 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 13 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 14 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 15 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 16 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 21 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 22 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 23 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 24 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 25 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 26 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 27 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Iteration 28 --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/uasort_variation3.phpt b/ext/standard/tests/array/uasort_variation3.phpt
new file mode 100644
index 000000000..9147d5991
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation3.phpt
Binary files differ
diff --git a/ext/standard/tests/array/uasort_variation4.phpt b/ext/standard/tests/array/uasort_variation4.phpt
new file mode 100644
index 000000000..c2844bfd2
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation4.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test uasort() function : usage variations - sort different numeric values
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* sorting different types of numeric arrays containing data of following type:
+* integer, octal, hexadecimal & float
+*/
+
+// comparision function
+/* Prototype : int cmp_function(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp_function($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
+}
+
+echo "*** Testing uasort() : different numeric arrays as 'array_arg' ***\n";
+
+// Int array
+$int_values = array(0 => 3, 1 => 2, 3 => 100, 4 => 150, 5 => 25, 6 => 350, 7 => 0, 8 => -3, 9 => -1200);
+echo "-- Sorting Integer array --\n";
+var_dump( uasort($int_values, 'cmp_function') ); // expecting: bool(true)
+var_dump($int_values);
+
+// Octal array
+$octal_values = array(0 => 056, 1 => 023, 2 => 090, 3 => 015, 4 => -045, 5 => 01, 6 => -078);
+echo "-- Sorting Octal array --\n";
+var_dump( uasort($octal_values, 'cmp_function') ); // expecting: bool(true)
+var_dump($octal_values);
+
+// Hexadecimal array
+$hex_values = array(0 => 0xAE, 1 => 0x2B, 2 => 0X10, 3 => -0xCF, 4 => 0X12, 5 => -0XF2);
+echo "-- Sorting Hex array --\n";
+var_dump( uasort($hex_values, 'cmp_function') ); // expecting: bool(true)
+var_dump($hex_values);
+
+// Float array
+$float_values = array( 0 => 10.2, 1 => 2.4, 2 => -3.4, 3 => 0, 4 => 0.5, 5 => 7.3e3, 6 => -9.34E-2);
+echo "-- Sorting Float array --\n";
+var_dump( uasort($float_values, 'cmp_function') ); // expecting: bool(true)
+var_dump($float_values);
+
+// empty array
+$empty_array = array();
+echo "-- Sorting empty array --\n";
+var_dump( uasort($empty_array, 'cmp_function') ); // expecting: bool(true)
+var_dump($empty_array);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : different numeric arrays as 'array_arg' ***
+-- Sorting Integer array --
+bool(true)
+array(9) {
+ [9]=>
+ int(-1200)
+ [8]=>
+ int(-3)
+ [7]=>
+ int(0)
+ [1]=>
+ int(2)
+ [0]=>
+ int(3)
+ [5]=>
+ int(25)
+ [3]=>
+ int(100)
+ [4]=>
+ int(150)
+ [6]=>
+ int(350)
+}
+-- Sorting Octal array --
+bool(true)
+array(7) {
+ [4]=>
+ int(-37)
+ [6]=>
+ int(-7)
+ [2]=>
+ int(0)
+ [5]=>
+ int(1)
+ [3]=>
+ int(13)
+ [1]=>
+ int(19)
+ [0]=>
+ int(46)
+}
+-- Sorting Hex array --
+bool(true)
+array(6) {
+ [5]=>
+ int(-242)
+ [3]=>
+ int(-207)
+ [2]=>
+ int(16)
+ [4]=>
+ int(18)
+ [1]=>
+ int(43)
+ [0]=>
+ int(174)
+}
+-- Sorting Float array --
+bool(true)
+array(7) {
+ [2]=>
+ float(-3.4)
+ [6]=>
+ float(-0.0934)
+ [3]=>
+ int(0)
+ [4]=>
+ float(0.5)
+ [1]=>
+ float(2.4)
+ [0]=>
+ float(10.2)
+ [5]=>
+ float(7300)
+}
+-- Sorting empty array --
+bool(true)
+array(0) {
+}
+Done
diff --git a/ext/standard/tests/array/uasort_variation5.phpt b/ext/standard/tests/array/uasort_variation5.phpt
new file mode 100644
index 000000000..22d9da31c
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation5.phpt
@@ -0,0 +1,145 @@
+--TEST--
+Test uasort() function : usage variations - sort diff. strings
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* sorting different strings:
+* single quoted, double quoted and heredoc strings
+*/
+
+// comparison function
+/* Prototype : int cmp_function(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp_function($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
+}
+
+// Different heredoc strings to be sorted
+$empty_heredoc =<<<EOT
+EOT;
+
+$simple_heredoc1 =<<<EOT
+Heredoc
+EOT;
+
+$simple_heredoc2 =<<<EOT
+HEREDOC
+EOT;
+
+$multiline_heredoc =<<<EOT
+heredoc string\twith!@# and 123
+Test this!!!
+EOT;
+
+
+echo "*** Testing uasort() : different string arrays as 'array_arg' ***\n";
+
+// Single quoted strings
+$single_quoted_values = array(
+ 0 => ' ', 1 => 'test', 3 => 'Hello', 4 => 'HELLO',
+ 5 => '', 6 => '\t', 7 => '0', 8 => '123Hello', 9 => '\'', 10 => '@#$%'
+);
+echo "-- Sorting Single Quoted String values --\n";
+var_dump( uasort($single_quoted_values, 'cmp_function') ); // expecting: bool(true)
+var_dump($single_quoted_values);
+
+// Double quoted strings
+$double_quoted_values = array(
+ 0 => " ", 1 => "test", 3 => "Hello", 4 => "HELLO",
+ 5 => "", 6 => "\t", 7 => "0", 8 => "123Hello", 9 => "\"", 10 => "@#$%"
+);
+echo "-- Sorting Double Quoted String values --\n";
+var_dump( uasort($double_quoted_values, 'cmp_function') ); // expecting: bool(true)
+var_dump($double_quoted_values);
+
+// Heredoc strings
+$heredoc_values = array(0 => $empty_heredoc, 1 => $simple_heredoc1, 2 => $simple_heredoc2, 3 => $multiline_heredoc);
+echo "-- Sorting Heredoc String values --\n";
+var_dump( uasort($heredoc_values, 'cmp_function') ); // expecting: bool(true)
+var_dump($heredoc_values);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : different string arrays as 'array_arg' ***
+-- Sorting Single Quoted String values --
+bool(true)
+array(10) {
+ [5]=>
+ string(0) ""
+ [0]=>
+ string(1) " "
+ [9]=>
+ string(1) "'"
+ [7]=>
+ string(1) "0"
+ [8]=>
+ string(8) "123Hello"
+ [10]=>
+ string(4) "@#$%"
+ [4]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "Hello"
+ [6]=>
+ string(2) "\t"
+ [1]=>
+ string(4) "test"
+}
+-- Sorting Double Quoted String values --
+bool(true)
+array(10) {
+ [5]=>
+ string(0) ""
+ [6]=>
+ string(1) " "
+ [0]=>
+ string(1) " "
+ [9]=>
+ string(1) """
+ [7]=>
+ string(1) "0"
+ [8]=>
+ string(8) "123Hello"
+ [10]=>
+ string(4) "@#$%"
+ [4]=>
+ string(5) "HELLO"
+ [3]=>
+ string(5) "Hello"
+ [1]=>
+ string(4) "test"
+}
+-- Sorting Heredoc String values --
+bool(true)
+array(4) {
+ [0]=>
+ string(0) ""
+ [2]=>
+ string(7) "HEREDOC"
+ [1]=>
+ string(7) "Heredoc"
+ [3]=>
+ string(43) "heredoc string with!@# and 123
+Test this!!!"
+}
+Done
diff --git a/ext/standard/tests/array/uasort_variation6.phpt b/ext/standard/tests/array/uasort_variation6.phpt
new file mode 100644
index 000000000..48d9c0357
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation6.phpt
@@ -0,0 +1,115 @@
+--TEST--
+Test uasort() function : usage variations - sort array having subarrays
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Testing uasort() with 'array_arg' having different subarrays as array elements
+*/
+
+// comparison function
+/* Prototype : int cmp_function(mixed $value1, mixed $value2)
+ * Parameters : $value1 and $value2 - values to be compared
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp_function($value1, $value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
+}
+
+echo "*** Testing uasort() : sorting array having different subarrays ***\n";
+
+$array_args = array(
+ 0 => array(2, 10, -1),
+ 1 => array(100),
+ 2 => array(),
+ 3 => array(0),
+ 4 => array(-1),
+ 5 => array(-9, 34, 54, 0, 20),
+ 6 => array(''),
+ 7 => array("apple", "Apple", "APPLE", "aPPle", "aPpLe")
+);
+$temp_array = $array_args;
+// sorting array_arg as whole array
+var_dump( uasort($temp_array, 'cmp_function') ); // expecting: bool(true)
+var_dump($temp_array);
+
+?>
+--EXPECTF--
+*** Testing uasort() : sorting array having different subarrays ***
+bool(true)
+array(8) {
+ [2]=>
+ array(0) {
+ }
+ [4]=>
+ array(1) {
+ [0]=>
+ int(-1)
+ }
+ [6]=>
+ array(1) {
+ [0]=>
+ string(0) ""
+ }
+ [3]=>
+ array(1) {
+ [0]=>
+ int(0)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(100)
+ }
+ [0]=>
+ array(3) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(10)
+ [2]=>
+ int(-1)
+ }
+ [5]=>
+ array(5) {
+ [0]=>
+ int(-9)
+ [1]=>
+ int(34)
+ [2]=>
+ int(54)
+ [3]=>
+ int(0)
+ [4]=>
+ int(20)
+ }
+ [7]=>
+ array(5) {
+ [0]=>
+ string(5) "apple"
+ [1]=>
+ string(5) "Apple"
+ [2]=>
+ string(5) "APPLE"
+ [3]=>
+ string(5) "aPPle"
+ [4]=>
+ string(5) "aPpLe"
+ }
+}
diff --git a/ext/standard/tests/array/uasort_variation7.phpt b/ext/standard/tests/array/uasort_variation7.phpt
new file mode 100644
index 000000000..44a2bb3a2
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation7.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test uasort() function : usage variations - anonymous function as 'cmp_function'
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing different anonymous functions as 'cmp_function'
+* arguments passed by value
+* arguments passed by reference
+*/
+
+echo "*** Testing uasort() : anonymous function as 'cmp_function' ***\n";
+
+$cmp_function = 'if($value1 == $value2) {return 0;} else if($value1 > $value2) {return 1;} else{return -1;}';
+
+$array_arg = array(0 => 100, 1 => 3, 2 => -70, 3 => 24, 4 => 90);
+echo "-- Anonymous 'cmp_function' with parameters passed by value --\n";
+var_dump( uasort($array_arg, create_function('$value1, $value2',$cmp_function) ) );
+var_dump($array_arg);
+
+$array_arg = array("b" => "Banana", "m" => "Mango", "a" => "Apple", "p" => "Pineapple");
+echo "-- Anonymous 'cmp_function' with parameters passed by reference --\n";
+var_dump( uasort($array_arg, create_function('&$value1, &$value2', $cmp_function) ) );
+var_dump($array_arg);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : anonymous function as 'cmp_function' ***
+-- Anonymous 'cmp_function' with parameters passed by value --
+bool(true)
+array(5) {
+ [2]=>
+ int(-70)
+ [1]=>
+ int(3)
+ [3]=>
+ int(24)
+ [4]=>
+ int(90)
+ [0]=>
+ int(100)
+}
+-- Anonymous 'cmp_function' with parameters passed by reference --
+bool(true)
+array(4) {
+ ["a"]=>
+ string(5) "Apple"
+ ["b"]=>
+ string(6) "Banana"
+ ["m"]=>
+ string(5) "Mango"
+ ["p"]=>
+ string(9) "Pineapple"
+}
+Done
diff --git a/ext/standard/tests/array/uasort_variation8.phpt b/ext/standard/tests/array/uasort_variation8.phpt
new file mode 100644
index 000000000..858ce2009
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation8.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Test uasort() function : usage variations - built-in function as 'cmp_function'
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/*
+* Passing different built-in library functions in place of 'cmp_function'
+* valid comparison functions: strcmp() & strcasecmp()
+* language constructs: echo & exit
+*/
+
+echo "*** Testing uasort() : built in function as 'cmp_function' ***\n";
+// Initializing variables
+$array_arg = array("b" => "Banana", "m" => "Mango", "a" => "apple", "p" => "Pineapple", "o" => "orange");
+$builtin_fun_arg = $array_arg;
+$languageConstruct_fun_arg = $array_arg;
+
+// Testing library functions as comparison function
+echo "-- Testing uasort() with built-in 'cmp_function': strcasecmp() --\n";
+var_dump( uasort($builtin_fun_arg, 'strcasecmp') ); // expecting: bool(true)
+var_dump($builtin_fun_arg);
+
+echo "-- Testing uasort() with built-in 'cmp_function': strcmp() --\n";
+var_dump( uasort($array_arg, 'strcmp') ); // expecting: bool(true)
+var_dump($array_arg);
+
+// Testing with language construct as comparison function
+echo "-- Testing uasort() with language construct as 'cmp_function' --\n";
+var_dump( uasort($languageConstruct_fun_arg, 'echo') ); // expecting: bool(false)
+
+echo "-- Testing uasort() with language construct as 'cmp_function' --\n";
+var_dump( uasort($languageConstruct_fun_arg, 'exit') ); // expecting: bool(false)
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : built in function as 'cmp_function' ***
+-- Testing uasort() with built-in 'cmp_function': strcasecmp() --
+bool(true)
+array(5) {
+ ["a"]=>
+ string(5) "apple"
+ ["b"]=>
+ string(6) "Banana"
+ ["m"]=>
+ string(5) "Mango"
+ ["o"]=>
+ string(6) "orange"
+ ["p"]=>
+ string(9) "Pineapple"
+}
+-- Testing uasort() with built-in 'cmp_function': strcmp() --
+bool(true)
+array(5) {
+ ["b"]=>
+ string(6) "Banana"
+ ["m"]=>
+ string(5) "Mango"
+ ["p"]=>
+ string(9) "Pineapple"
+ ["a"]=>
+ string(5) "apple"
+ ["o"]=>
+ string(6) "orange"
+}
+-- Testing uasort() with language construct as 'cmp_function' --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+-- Testing uasort() with language construct as 'cmp_function' --
+
+Warning: uasort(): Invalid comparison function in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/array/uasort_variation9.phpt b/ext/standard/tests/array/uasort_variation9.phpt
new file mode 100644
index 000000000..486042e5e
--- /dev/null
+++ b/ext/standard/tests/array/uasort_variation9.phpt
@@ -0,0 +1,81 @@
+--TEST--
+Test uasort() function : usage variations - 'cmp_function' with reference argument
+--FILE--
+<?php
+/* Prototype : bool uasort(array $array_arg, string $cmp_function)
+ * Description: Sort an array with a user-defined comparison function and maintain index association
+ * Source code: ext/standard/array.c
+*/
+
+/* Testing uasort() functionality with comparison function having arguments as reference
+ */
+
+echo "*** Testing uasort() : 'cmp_function' with reference arguments ***\n";
+
+// comparison function
+/* Prototype : int cmp(mixed &$value1, mixed &$value2)
+ * Parameters : $value1 and $value2 - values recieved by reference
+ * Return value : 0 - if both values are same
+ * 1 - if value1 is greater than value2
+ * -1 - if value1 is less than value2
+ * Description : compares value1 and value2
+ */
+function cmp(&$value1, &$value2)
+{
+ if($value1 == $value2) {
+ return 0;
+ }
+ else if($value1 > $value2) {
+ return 1;
+ }
+ else
+ return -1;
+}
+
+// Int array with default keys
+$int_values = array(1, 8, 9, 3, 2, 6, 7);
+echo "-- Passing integer values to 'cmp_function' --\n";
+var_dump( uasort($int_values, 'cmp') );
+var_dump($int_values);
+
+// String array with default keys
+$string_values = array("Mango", "Apple", "Orange", "Banana");
+echo "-- Passing string values to 'cmp_function' --\n";
+var_dump( uasort($string_values, 'cmp') );
+var_dump($string_values);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing uasort() : 'cmp_function' with reference arguments ***
+-- Passing integer values to 'cmp_function' --
+bool(true)
+array(7) {
+ [0]=>
+ int(1)
+ [4]=>
+ int(2)
+ [3]=>
+ int(3)
+ [5]=>
+ int(6)
+ [6]=>
+ int(7)
+ [1]=>
+ int(8)
+ [2]=>
+ int(9)
+}
+-- Passing string values to 'cmp_function' --
+bool(true)
+array(4) {
+ [1]=>
+ string(5) "Apple"
+ [3]=>
+ string(6) "Banana"
+ [0]=>
+ string(5) "Mango"
+ [2]=>
+ string(6) "Orange"
+}
+Done
diff --git a/ext/standard/tests/array/var_export2.phpt b/ext/standard/tests/array/var_export2.phpt
index 2b8a1f97e..6db44d5ca 100644
--- a/ext/standard/tests/array/var_export2.phpt
+++ b/ext/standard/tests/array/var_export2.phpt
Binary files differ
diff --git a/ext/standard/tests/class_object/class_exists_basic_001.phpt b/ext/standard/tests/class_object/class_exists_basic_001.phpt
new file mode 100644
index 000000000..4cb6cbd32
--- /dev/null
+++ b/ext/standard/tests/class_object/class_exists_basic_001.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test class_exists() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto bool class_exists(string classname [, bool autoload])
+ * Description: Checks if the class exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing class_exists() : basic functionality ***\n";
+
+function __autoload($className) {
+ echo "In __autoload($className)\n";
+}
+
+echo "Calling class_exists() on non-existent class with autoload explicitly enabled:\n";
+var_dump( class_exists('C', true) );
+echo "\nCalling class_exists() on existing class with autoload explicitly enabled:\n";
+var_dump( class_exists('stdclass', true) );
+
+echo "\nCalling class_exists() on non-existent class with autoload explicitly enabled:\n";
+var_dump( class_exists('D', false) );
+echo "\nCalling class_exists() on existing class with autoload explicitly disabled:\n";
+var_dump( class_exists('stdclass', false) );
+
+echo "\nCalling class_exists() on non-existent class with autoload unspecified:\n";
+var_dump( class_exists('E') );
+echo "\nCalling class_exists() on existing class with autoload unspecified:\n";
+var_dump( class_exists('stdclass') );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing class_exists() : basic functionality ***
+Calling class_exists() on non-existent class with autoload explicitly enabled:
+In __autoload(C)
+bool(false)
+
+Calling class_exists() on existing class with autoload explicitly enabled:
+bool(true)
+
+Calling class_exists() on non-existent class with autoload explicitly enabled:
+bool(false)
+
+Calling class_exists() on existing class with autoload explicitly disabled:
+bool(true)
+
+Calling class_exists() on non-existent class with autoload unspecified:
+In __autoload(E)
+bool(false)
+
+Calling class_exists() on existing class with autoload unspecified:
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/class_exists_error_001.phpt b/ext/standard/tests/class_object/class_exists_error_001.phpt
new file mode 100644
index 000000000..99c0b89b3
--- /dev/null
+++ b/ext/standard/tests/class_object/class_exists_error_001.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test class_exists() function : error conditions (wrong number of arguments)
+--FILE--
+<?php
+/* Prototype : proto bool class_exists(string classname [, bool autoload])
+ * Description: Checks if the class exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+/**
+ * Test wrong number of arguments
+ */
+
+echo "*** Testing class_exists() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing class_exists() function with Zero arguments --\n";
+var_dump( class_exists() );
+
+//Test class_exists with one more than the expected number of arguments
+echo "\n-- Testing class_exists() function with more than expected no. of arguments --\n";
+$classname = 'string_val';
+$autoload = true;
+$extra_arg = 10;
+var_dump( class_exists($classname, $autoload, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing class_exists() : error conditions ***
+
+-- Testing class_exists() function with Zero arguments --
+
+Warning: class_exists() expects at least 1 parameter, 0 given in %s on line 16
+NULL
+
+-- Testing class_exists() function with more than expected no. of arguments --
+
+Warning: class_exists() expects at most 2 parameters, 3 given in %s on line 23
+NULL
+Done
diff --git a/ext/standard/tests/class_object/class_exists_variation_001.phpt b/ext/standard/tests/class_object/class_exists_variation_001.phpt
new file mode 100644
index 000000000..2141d65eb
--- /dev/null
+++ b/ext/standard/tests/class_object/class_exists_variation_001.phpt
@@ -0,0 +1,182 @@
+--TEST--
+Test class_exists() function : usage variations - unexpected types for agument 1
+--FILE--
+<?php
+/* Prototype : proto bool class_exists(string classname [, bool autoload])
+ * Description: Checks if the class exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+function __autoload($className) {
+ echo "In __autoload($className)\n";
+}
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing class_exists() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$autoload = true;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for classname
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( class_exists($value, $autoload) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing class_exists() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(67)
+Error: 8 - Undefined variable: unset_var, %s(70)
+
+Arg value 0
+In __autoload(0)
+bool(false)
+
+Arg value 1
+In __autoload(1)
+bool(false)
+
+Arg value 12345
+In __autoload(12345)
+bool(false)
+
+Arg value -2345
+In __autoload(-2345)
+bool(false)
+
+Arg value 10.5
+In __autoload(10.5)
+bool(false)
+
+Arg value -10.5
+In __autoload(-10.5)
+bool(false)
+
+Arg value 101234567000
+In __autoload(101234567000)
+bool(false)
+
+Arg value 1.07654321E-9
+In __autoload(1.07654321E-9)
+bool(false)
+
+Arg value 0.5
+In __autoload(0.5)
+bool(false)
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
+NULL
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
+NULL
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
+NULL
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
+NULL
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77)
+NULL
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+In __autoload(1)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+In __autoload(1)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(76)
+
+Arg value
+Error: 2 - class_exists() expects parameter 1 to be string, object given, %s(77)
+NULL
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/class_exists_variation_002.phpt b/ext/standard/tests/class_object/class_exists_variation_002.phpt
new file mode 100644
index 000000000..da10cac90
--- /dev/null
+++ b/ext/standard/tests/class_object/class_exists_variation_002.phpt
@@ -0,0 +1,193 @@
+--TEST--
+Test class_exists() function : usage variations - unexpected types for agument 2
+--FILE--
+<?php
+/* Prototype : proto bool class_exists(string classname [, bool autoload])
+ * Description: Checks if the class exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+function __autoload($className) {
+ echo "In __autoload($className)\n";
+}
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing class_exists() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$classname = 'string_val';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for autoload
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( class_exists($classname, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing class_exists() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(71)
+Error: 8 - Undefined variable: unset_var, %s(74)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+In __autoload(string_val)
+bool(false)
+
+Arg value 12345
+In __autoload(string_val)
+bool(false)
+
+Arg value -2345
+In __autoload(string_val)
+bool(false)
+
+Arg value 10.5
+In __autoload(string_val)
+bool(false)
+
+Arg value -10.5
+In __autoload(string_val)
+bool(false)
+
+Arg value 101234567000
+In __autoload(string_val)
+bool(false)
+
+Arg value 1.07654321E-9
+In __autoload(string_val)
+bool(false)
+
+Arg value 0.5
+In __autoload(string_val)
+bool(false)
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 2 to be boolean, array given, %s(81)
+NULL
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 2 to be boolean, array given, %s(81)
+NULL
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 2 to be boolean, array given, %s(81)
+NULL
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 2 to be boolean, array given, %s(81)
+NULL
+
+Arg value Array
+Error: 2 - class_exists() expects parameter 2 to be boolean, array given, %s(81)
+NULL
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+In __autoload(string_val)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+In __autoload(string_val)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value string
+In __autoload(string_val)
+bool(false)
+
+Arg value string
+In __autoload(string_val)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(80)
+
+Arg value
+Error: 2 - class_exists() expects parameter 2 to be boolean, object given, %s(81)
+NULL
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/class_exists_variation_003.phpt b/ext/standard/tests/class_object/class_exists_variation_003.phpt
new file mode 100644
index 000000000..074560145
--- /dev/null
+++ b/ext/standard/tests/class_object/class_exists_variation_003.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test class_exists() function : usage variations - case sensitivity
+--FILE--
+<?php
+/* Prototype : proto bool class_exists(string classname [, bool autoload])
+ * Description: Checks if the class exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+class caseSensitivityTest {}
+var_dump(class_exists('casesensitivitytest'));
+
+echo "Done"
+?>
+--EXPECTF--
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_error_001.phpt b/ext/standard/tests/class_object/get_class_error_001.phpt
new file mode 100644
index 000000000..b563c3188
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_error_001.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Test get_class() function : error conditions - wrong number of arguments.
+--FILE--
+<?php
+/* Prototype : proto string get_class([object object])
+ * Description: Retrieves the class name
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing get_class() : error conditions ***\n";
+
+//Test get_class with one more than the expected number of arguments
+echo "\n-- Testing get_class() function with more than expected no. of arguments --\n";
+$object = new stdclass();
+$extra_arg = 10;
+var_dump( get_class($object, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_class() : error conditions ***
+
+-- Testing get_class() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for get_class() in %s on line 14
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_methods_basic_001.phpt b/ext/standard/tests/class_object/get_class_methods_basic_001.phpt
new file mode 100644
index 000000000..b2b87af4e
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_methods_basic_001.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Test get_class_methods() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto array get_class_methods(mixed class)
+ * Description: Returns an array of method names for class or class instance.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+/*
+ * Test basic behaviour with existing class and non-existent class.
+ */
+
+echo "*** Testing get_class_methods() : basic functionality ***\n";
+
+class C {
+ function f() {}
+ function g() {}
+ function h() {}
+}
+
+echo "Argument is class name:\n";
+var_dump( get_class_methods("C") );
+echo "Argument is class instance:\n";
+$c = new C;
+var_dump( get_class_methods($c) );
+
+class D {}
+echo "Argument is name of class which has no methods:\n";
+var_dump( get_class_methods("D") );
+
+echo "Argument is non existent class:\n";
+var_dump( get_class_methods("NonExistent") );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_class_methods() : basic functionality ***
+Argument is class name:
+array(3) {
+ [0]=>
+ string(1) "f"
+ [1]=>
+ string(1) "g"
+ [2]=>
+ string(1) "h"
+}
+Argument is class instance:
+array(3) {
+ [0]=>
+ string(1) "f"
+ [1]=>
+ string(1) "g"
+ [2]=>
+ string(1) "h"
+}
+Argument is name of class which has no methods:
+array(0) {
+}
+Argument is non existent class:
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_methods_basic_002.phpt b/ext/standard/tests/class_object/get_class_methods_basic_002.phpt
new file mode 100644
index 000000000..441bb45d6
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_methods_basic_002.phpt
@@ -0,0 +1,178 @@
+--TEST--
+Test get_class_methods() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto array get_class_methods(mixed class)
+ * Description: Returns an array of method names for class or class instance.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+/*
+ * Test behaviour with various visibility levels.
+ */
+
+class C {
+ private function privC() {}
+ protected function protC() {}
+ public function pubC() {}
+
+ public static function testFromC() {
+ echo "Accessing C from C:\n";
+ var_dump(get_class_methods("C"));
+ echo "Accessing D from C:\n";
+ var_dump(get_class_methods("D"));
+ echo "Accessing X from C:\n";
+ var_dump(get_class_methods("X"));
+ }
+}
+
+class D extends C {
+ private function privD() {}
+ protected function protD() {}
+ public function pubD() {}
+
+ public static function testFromD() {
+ echo "Accessing C from D:\n";
+ var_dump(get_class_methods("C"));
+ echo "Accessing D from D:\n";
+ var_dump(get_class_methods("D"));
+ echo "Accessing X from D:\n";
+ var_dump(get_class_methods("X"));
+ }
+}
+
+class X {
+ private function privX() {}
+ protected function protX() {}
+ public function pubX() {}
+
+ public static function testFromX() {
+ echo "Accessing C from X:\n";
+ var_dump(get_class_methods("C"));
+ echo "Accessing D from X:\n";
+ var_dump(get_class_methods("D"));
+ echo "Accessing X from X:\n";
+ var_dump(get_class_methods("X"));
+ }
+}
+
+echo "Accessing D from global scope:\n";
+var_dump(get_class_methods("D"));
+
+C::testFromC();
+D::testFromD();
+X::testFromX();
+
+echo "Done";
+?>
+--EXPECTF--
+Accessing D from global scope:
+array(4) {
+ [0]=>
+ string(4) "pubD"
+ [1]=>
+ string(9) "testFromD"
+ [2]=>
+ string(4) "pubC"
+ [3]=>
+ string(9) "testFromC"
+}
+Accessing C from C:
+array(4) {
+ [0]=>
+ string(5) "privC"
+ [1]=>
+ string(5) "protC"
+ [2]=>
+ string(4) "pubC"
+ [3]=>
+ string(9) "testFromC"
+}
+Accessing D from C:
+array(7) {
+ [0]=>
+ string(5) "protD"
+ [1]=>
+ string(4) "pubD"
+ [2]=>
+ string(9) "testFromD"
+ [3]=>
+ string(5) "privC"
+ [4]=>
+ string(5) "protC"
+ [5]=>
+ string(4) "pubC"
+ [6]=>
+ string(9) "testFromC"
+}
+Accessing X from C:
+array(2) {
+ [0]=>
+ string(4) "pubX"
+ [1]=>
+ string(9) "testFromX"
+}
+Accessing C from D:
+array(3) {
+ [0]=>
+ string(5) "protC"
+ [1]=>
+ string(4) "pubC"
+ [2]=>
+ string(9) "testFromC"
+}
+Accessing D from D:
+array(7) {
+ [0]=>
+ string(5) "privD"
+ [1]=>
+ string(5) "protD"
+ [2]=>
+ string(4) "pubD"
+ [3]=>
+ string(9) "testFromD"
+ [4]=>
+ string(5) "protC"
+ [5]=>
+ string(4) "pubC"
+ [6]=>
+ string(9) "testFromC"
+}
+Accessing X from D:
+array(2) {
+ [0]=>
+ string(4) "pubX"
+ [1]=>
+ string(9) "testFromX"
+}
+Accessing C from X:
+array(2) {
+ [0]=>
+ string(4) "pubC"
+ [1]=>
+ string(9) "testFromC"
+}
+Accessing D from X:
+array(4) {
+ [0]=>
+ string(4) "pubD"
+ [1]=>
+ string(9) "testFromD"
+ [2]=>
+ string(4) "pubC"
+ [3]=>
+ string(9) "testFromC"
+}
+Accessing X from X:
+array(4) {
+ [0]=>
+ string(5) "privX"
+ [1]=>
+ string(5) "protX"
+ [2]=>
+ string(4) "pubX"
+ [3]=>
+ string(9) "testFromX"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_methods_basic_003.phpt b/ext/standard/tests/class_object/get_class_methods_basic_003.phpt
new file mode 100644
index 000000000..b64f702b8
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_methods_basic_003.phpt
@@ -0,0 +1,76 @@
+--TEST--
+Test get_class_methods() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto array get_class_methods(mixed class)
+ * Description: Returns an array of method names for class or class instance.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+/*
+ * Test behaviour with interfaces.
+ */
+
+interface I {
+ public function pubI();
+
+}
+
+class C implements I {
+ public function pubI() {}
+
+ private function privC() {}
+ protected function protC() {}
+ public function pubC() {}
+
+ public static function testFromC() {
+ echo "Accessing I from C:\n";
+ var_dump(get_class_methods("I"));
+ echo "Accessing C from C:\n";
+ var_dump(get_class_methods("C"));
+ }
+}
+
+
+echo "Accessing I from global scope:\n";
+var_dump(get_class_methods("I"));
+echo "Accessing C from global scope:\n";
+var_dump(get_class_methods("C"));
+C::testFromC();
+echo "Done";
+?>
+--EXPECTF--
+Accessing I from global scope:
+array(1) {
+ [0]=>
+ string(4) "pubI"
+}
+Accessing C from global scope:
+array(3) {
+ [0]=>
+ string(4) "pubI"
+ [1]=>
+ string(4) "pubC"
+ [2]=>
+ string(9) "testFromC"
+}
+Accessing I from C:
+array(1) {
+ [0]=>
+ string(4) "pubI"
+}
+Accessing C from C:
+array(5) {
+ [0]=>
+ string(4) "pubI"
+ [1]=>
+ string(5) "privC"
+ [2]=>
+ string(5) "protC"
+ [3]=>
+ string(4) "pubC"
+ [4]=>
+ string(9) "testFromC"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_methods_error_001.phpt b/ext/standard/tests/class_object/get_class_methods_error_001.phpt
new file mode 100644
index 000000000..6edb10803
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_methods_error_001.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test get_class_methods() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto array get_class_methods(mixed class)
+ * Description: Returns an array of method names for class or class instance.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+/*
+ * Test wrong number of arguments.
+ */
+
+echo "*** Testing get_class_methods() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing get_class_methods() function with Zero arguments --\n";
+var_dump( get_class_methods() );
+
+//Test get_class_methods with one more than the expected number of arguments
+echo "\n-- Testing get_class_methods() function with more than expected no. of arguments --\n";
+$class = 1;
+$extra_arg = 10;
+var_dump( get_class_methods($class, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_class_methods() : error conditions ***
+
+-- Testing get_class_methods() function with Zero arguments --
+
+Warning: Wrong parameter count for get_class_methods() in %s on line 16
+NULL
+
+-- Testing get_class_methods() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for get_class_methods() in %s on line 22
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt
new file mode 100644
index 000000000..b881452b4
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt
@@ -0,0 +1,172 @@
+--TEST--
+Test get_class_methods() function : usage variations - unexpected types
+--FILE--
+<?php
+/* Prototype : proto array get_class_methods(mixed class)
+ * Description: Returns an array of method names for class or class instance.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing get_class_methods() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for class
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( get_class_methods($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_class_methods() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(67)
+Error: 8 - Undefined variable: unset_var, %s(70)
+
+Arg value 0
+NULL
+
+Arg value 1
+NULL
+
+Arg value 12345
+NULL
+
+Arg value -2345
+NULL
+
+Arg value 10.5
+NULL
+
+Arg value -10.5
+NULL
+
+Arg value 101234567000
+NULL
+
+Arg value 1.07654321E-9
+NULL
+
+Arg value 0.5
+NULL
+
+Arg value Array
+NULL
+
+Arg value Array
+NULL
+
+Arg value Array
+NULL
+
+Arg value Array
+NULL
+
+Arg value Array
+NULL
+
+Arg value
+NULL
+
+Arg value
+NULL
+
+Arg value 1
+NULL
+
+Arg value
+NULL
+
+Arg value 1
+NULL
+
+Arg value
+NULL
+
+Arg value
+NULL
+
+Arg value
+NULL
+
+Arg value string
+NULL
+
+Arg value string
+NULL
+Error: 4096 - Object of class stdClass could not be converted to string, %s(76)
+
+Arg value
+array(0) {
+}
+
+Arg value
+NULL
+
+Arg value
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_methods_variation_002.phpt b/ext/standard/tests/class_object/get_class_methods_variation_002.phpt
new file mode 100644
index 000000000..60b944c69
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_methods_variation_002.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test get_class_methods() function : usage variations - case sensitivity
+--FILE--
+<?php
+/* Prototype : proto array get_class_methods(mixed class)
+ * Description: Returns an array of method names for class or class instance.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing get_class_methods() : usage variations ***\n";
+
+class caseSensitivityTest {
+ function MyMeThOd() {}
+}
+
+var_dump( get_class_methods('CasesensitivitytesT') );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_class_methods() : usage variations ***
+array(1) {
+ [0]=>
+ string(8) "MyMeThOd"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_variation_001.phpt b/ext/standard/tests/class_object/get_class_variation_001.phpt
new file mode 100644
index 000000000..6cbe0b368
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_variation_001.phpt
@@ -0,0 +1,160 @@
+--TEST--
+Test get_class() function : usage variations - passing unexpected types.
+--FILE--
+<?php
+/* Prototype : proto string get_class([object object])
+ * Description: Retrieves the class name
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing get_class() : usage variations ***\n";
+
+// Note: basic use cases in Zend/tests/009.phpt
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for object
+
+foreach($values as $value) {
+ echo "\nArg value: $value (type: " . gettype($value) . ")\n";
+ var_dump( get_class($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_class() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line 58
+
+Notice: Undefined variable: unset_var in %s on line 61
+
+Arg value: 0 (type: integer)
+bool(false)
+
+Arg value: 1 (type: integer)
+bool(false)
+
+Arg value: 12345 (type: integer)
+bool(false)
+
+Arg value: -2345 (type: integer)
+bool(false)
+
+Arg value: 10.5 (type: double)
+bool(false)
+
+Arg value: -10.5 (type: double)
+bool(false)
+
+Arg value: 101234567000 (type: double)
+bool(false)
+
+Arg value: 1.07654321E-9 (type: double)
+bool(false)
+
+Arg value: 0.5 (type: double)
+bool(false)
+
+Arg value: Array (type: array)
+bool(false)
+
+Arg value: Array (type: array)
+bool(false)
+
+Arg value: Array (type: array)
+bool(false)
+
+Arg value: Array (type: array)
+bool(false)
+
+Arg value: Array (type: array)
+bool(false)
+
+Arg value: (type: NULL)
+bool(false)
+
+Arg value: (type: NULL)
+bool(false)
+
+Arg value: 1 (type: boolean)
+bool(false)
+
+Arg value: (type: boolean)
+bool(false)
+
+Arg value: 1 (type: boolean)
+bool(false)
+
+Arg value: (type: boolean)
+bool(false)
+
+Arg value: (type: string)
+bool(false)
+
+Arg value: (type: string)
+bool(false)
+
+Arg value: string (type: string)
+bool(false)
+
+Arg value: string (type: string)
+bool(false)
+
+Arg value: (type: NULL)
+bool(false)
+
+Arg value: (type: NULL)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_class_variation_002.phpt b/ext/standard/tests/class_object/get_class_variation_002.phpt
new file mode 100644
index 000000000..1ee352981
--- /dev/null
+++ b/ext/standard/tests/class_object/get_class_variation_002.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test get_class() function : usage variations - ensure class name case is preserved.
+--FILE--
+<?php
+/* Prototype : proto string get_class([object object])
+ * Description: Retrieves the class name
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+class caseSensitivityTest {}
+var_dump(get_class(new casesensitivitytest));
+
+echo "Done";
+?>
+--EXPECTF--
+string(19) "caseSensitivityTest"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_declared_classes_basic_001.phpt b/ext/standard/tests/class_object/get_declared_classes_basic_001.phpt
new file mode 100644
index 000000000..123e9772c
--- /dev/null
+++ b/ext/standard/tests/class_object/get_declared_classes_basic_001.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test get_declared_classes() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto array get_declared_classes()
+ * Description: Returns an array of all declared classes.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+
+echo "*** Testing get_declared_classes() : basic functionality ***\n";
+
+// Zero arguments
+echo "\n-- Testing get_declared_classes() function with Zero arguments --\n";
+var_dump(get_declared_classes());
+
+foreach (get_declared_classes() as $class) {
+ if (!class_exists($class)) {
+ echo "Error: $class is not a valid class.\n";
+ }
+}
+
+echo "\n-- Ensure userspace classes are listed --\n";
+Class C {}
+var_dump(in_array('C', get_declared_classes()));
+
+echo "\n-- Ensure userspace interfaces are not listed --\n";
+Interface I {}
+var_dump(in_array( 'I', get_declared_classes()));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_declared_classes() : basic functionality ***
+
+-- Testing get_declared_classes() function with Zero arguments --
+array(%d) {
+%a
+}
+
+-- Ensure userspace classes are listed --
+bool(true)
+
+-- Ensure userspace interfaces are not listed --
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_declared_classes_error_001.phpt b/ext/standard/tests/class_object/get_declared_classes_error_001.phpt
new file mode 100644
index 000000000..a50844367
--- /dev/null
+++ b/ext/standard/tests/class_object/get_declared_classes_error_001.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test get_declared_classes() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto array get_declared_classes()
+ * Description: Returns an array of all declared classes.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing get_declared_classes() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing get_declared_classes() function with one argument --\n";
+$extra_arg = 10;;
+var_dump( get_declared_classes($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_declared_classes() : error conditions ***
+
+-- Testing get_declared_classes() function with one argument --
+
+Warning: Wrong parameter count for get_declared_classes() in %s on line 13
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_declared_interfaces_basic_001.phpt b/ext/standard/tests/class_object/get_declared_interfaces_basic_001.phpt
new file mode 100644
index 000000000..a0ec71518
--- /dev/null
+++ b/ext/standard/tests/class_object/get_declared_interfaces_basic_001.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test get_declared_interfaces() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto array get_declared_interfaces()
+ * Description: Returns an array of all declared interfaces.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+
+echo "*** Testing get_declared_interfaces() : basic functionality ***\n";
+
+// Zero arguments
+echo "\n-- Testing get_declared_interfaces() function with Zero arguments --\n";
+var_dump(get_declared_interfaces());
+
+foreach (get_declared_interfaces() as $interface) {
+ if (!interface_exists($interface)) {
+ echo "Error: $interface is not a valid interface.\n";
+ }
+}
+
+echo "\n-- Ensure userspace classes are not listed --\n";
+Class C {}
+var_dump(in_array('C', get_declared_interfaces()));
+
+echo "\n-- Ensure userspace interfaces are listed --\n";
+Interface I {}
+var_dump(in_array('I', get_declared_interfaces()));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_declared_interfaces() : basic functionality ***
+
+-- Testing get_declared_interfaces() function with Zero arguments --
+array(%d) {
+%a
+}
+
+-- Ensure userspace classes are not listed --
+bool(false)
+
+-- Ensure userspace interfaces are listed --
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_declared_interfaces_error_001.phpt b/ext/standard/tests/class_object/get_declared_interfaces_error_001.phpt
new file mode 100644
index 000000000..93aabb6f6
--- /dev/null
+++ b/ext/standard/tests/class_object/get_declared_interfaces_error_001.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test get_declared_interfaces() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto array get_declared_interfaces()
+ * Description: Returns an array of all declared interfaces.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing get_declared_interfaces() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing get_declared_interfaces() function with one argument --\n";
+$extra_arg = 10;;
+var_dump( get_declared_interfaces($extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_declared_interfaces() : error conditions ***
+
+-- Testing get_declared_interfaces() function with one argument --
+
+Warning: Wrong parameter count for get_declared_interfaces() in %s on line 13
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_object_vars_basic_001.phpt b/ext/standard/tests/class_object/get_object_vars_basic_001.phpt
new file mode 100644
index 000000000..38ed74fb0
--- /dev/null
+++ b/ext/standard/tests/class_object/get_object_vars_basic_001.phpt
@@ -0,0 +1,107 @@
+--TEST--
+get_object_vars(): visibility from static methods (target object passed as arg)
+--FILE--
+<?php
+/* Prototype : proto array get_object_vars(object obj)
+ * Description: Returns an array of object properties
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+Class A {
+ private $hiddenPriv = 'A::hiddenPriv';
+
+ public static function test($b) {
+ echo __METHOD__ . "\n";
+ var_dump(get_object_vars($b));
+ }
+}
+
+Class B extends A {
+ private $hiddenPriv = 'B::hiddenPriv';
+ private $priv = 'B::priv';
+ protected $prot = 'B::prot';
+ public $pub = 'B::pub';
+
+ public static function test($b) {
+ echo __METHOD__ . "\n";
+ var_dump(get_object_vars($b));
+ }
+}
+
+Class C extends B {
+ private $hiddenPriv = 'C::hiddenPriv';
+
+ public static function test($b) {
+ echo __METHOD__ . "\n";
+ var_dump(get_object_vars($b));
+ }
+}
+
+Class X {
+ public static function test($b) {
+ echo __METHOD__ . "\n";
+ var_dump(get_object_vars($b));
+ }
+}
+
+
+$b = new B;
+echo "\n---( Global scope: )---\n";
+var_dump(get_object_vars($b));
+echo "\n---( Declaring class: )---\n";
+B::test($b);
+echo "\n---( Subclass: )---\n";
+C::test($b);
+echo "\n---( Superclass: )---\n";
+A::test($b);
+echo "\n---( Unrelated class: )---\n";
+X::test($b);
+?>
+--EXPECTF--
+
+---( Global scope: )---
+array(1) {
+ ["pub"]=>
+ string(6) "B::pub"
+}
+
+---( Declaring class: )---
+B::test
+array(4) {
+ ["hiddenPriv"]=>
+ string(13) "B::hiddenPriv"
+ ["priv"]=>
+ string(7) "B::priv"
+ ["prot"]=>
+ string(7) "B::prot"
+ ["pub"]=>
+ string(6) "B::pub"
+}
+
+---( Subclass: )---
+C::test
+array(2) {
+ ["prot"]=>
+ string(7) "B::prot"
+ ["pub"]=>
+ string(6) "B::pub"
+}
+
+---( Superclass: )---
+A::test
+array(3) {
+ ["prot"]=>
+ string(7) "B::prot"
+ ["pub"]=>
+ string(6) "B::pub"
+ ["hiddenPriv"]=>
+ string(13) "A::hiddenPriv"
+}
+
+---( Unrelated class: )---
+X::test
+array(1) {
+ ["pub"]=>
+ string(6) "B::pub"
+} \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_object_vars_basic_002.phpt b/ext/standard/tests/class_object/get_object_vars_basic_002.phpt
new file mode 100644
index 000000000..910926bc1
--- /dev/null
+++ b/ext/standard/tests/class_object/get_object_vars_basic_002.phpt
@@ -0,0 +1,64 @@
+--TEST--
+get_object_vars(): visibility from non static methods (target object passed as arg)
+--FILE--
+<?php
+/* Prototype : proto array get_object_vars(object obj)
+ * Description: Returns an array of object properties
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+Class A {
+ private $hiddenPriv = 'A::hiddenPriv';
+
+ public function testA($b) {
+ echo __METHOD__ . "\n";
+ var_dump(get_object_vars($b));
+ }
+}
+
+Class B extends A {
+ private $hiddenPriv = 'B::hiddenPriv';
+ private $priv = 'B::priv';
+ protected $prot = 'B::prot';
+ public $pub = 'B::pub';
+
+ public function testB($b) {
+ echo __METHOD__ . "\n";
+ var_dump(get_object_vars($b));
+ }
+}
+
+
+$b = new B;
+echo "\n---( Declaring class: )---\n";
+$b->testB($b);
+echo "\n---( Superclass: )---\n";
+$b->testA($b);
+
+?>
+--EXPECTF--
+
+---( Declaring class: )---
+B::testB
+array(4) {
+ ["hiddenPriv"]=>
+ string(13) "B::hiddenPriv"
+ ["priv"]=>
+ string(7) "B::priv"
+ ["prot"]=>
+ string(7) "B::prot"
+ ["pub"]=>
+ string(6) "B::pub"
+}
+
+---( Superclass: )---
+A::testA
+array(3) {
+ ["prot"]=>
+ string(7) "B::prot"
+ ["pub"]=>
+ string(6) "B::pub"
+ ["hiddenPriv"]=>
+ string(13) "A::hiddenPriv"
+} \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_object_vars_error_001.phpt b/ext/standard/tests/class_object/get_object_vars_error_001.phpt
new file mode 100644
index 000000000..67a2705d0
--- /dev/null
+++ b/ext/standard/tests/class_object/get_object_vars_error_001.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test get_object_vars() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto array get_object_vars(object obj)
+ * Description: Returns an array of object properties
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing get_object_vars() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing get_object_vars() function with Zero arguments --\n";
+var_dump( get_object_vars() );
+
+//Test get_object_vars with one more than the expected number of arguments
+echo "\n-- Testing get_object_vars() function with more than expected no. of arguments --\n";
+$obj = new stdclass();
+$extra_arg = 10;
+var_dump( get_object_vars($obj, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_object_vars() : error conditions ***
+
+-- Testing get_object_vars() function with Zero arguments --
+
+Warning: Wrong parameter count for get_object_vars() in %s on line 12
+NULL
+
+-- Testing get_object_vars() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for get_object_vars() in %s on line 18
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_object_vars_variation_001.phpt b/ext/standard/tests/class_object/get_object_vars_variation_001.phpt
new file mode 100644
index 000000000..89fbc53e9
--- /dev/null
+++ b/ext/standard/tests/class_object/get_object_vars_variation_001.phpt
@@ -0,0 +1,20 @@
+--TEST--
+get_object_vars() - ensure statics are not shown
+--FILE--
+<?php
+/* Prototype : proto array get_object_vars(object obj)
+ * Description: Returns an array of object properties
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+Class A {
+ public static $var = 'hello';
+}
+
+$a = new A;
+var_dump(get_object_vars($a));
+?>
+--EXPECTF--
+array(0) {
+} \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_object_vars_variation_002.phpt b/ext/standard/tests/class_object/get_object_vars_variation_002.phpt
new file mode 100644
index 000000000..73478de79
--- /dev/null
+++ b/ext/standard/tests/class_object/get_object_vars_variation_002.phpt
@@ -0,0 +1,47 @@
+--TEST--
+get_object_vars() - ensure references are preserved
+--FILE--
+<?php
+/* Prototype : proto array get_object_vars(object obj)
+ * Description: Returns an array of object properties
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+$obj = new stdClass;
+var_dump(get_object_vars($obj));
+
+$a='original.a';
+$obj->ref = &$a;
+$obj->val = $a;
+
+$arr = get_object_vars($obj);
+var_dump($arr);
+
+$arr['ref'] = 'changed.ref';
+$arr['val'] = 'changed.val';
+
+var_dump($arr, $obj, $a);
+?>
+--EXPECTF--
+array(0) {
+}
+array(2) {
+ ["ref"]=>
+ &string(10) "original.a"
+ ["val"]=>
+ string(10) "original.a"
+}
+array(2) {
+ ["ref"]=>
+ &string(11) "changed.ref"
+ ["val"]=>
+ string(11) "changed.val"
+}
+object(stdClass)#1 (2) {
+ ["ref"]=>
+ &string(11) "changed.ref"
+ ["val"]=>
+ string(10) "original.a"
+}
+string(11) "changed.ref" \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_object_vars_variation_003.phpt b/ext/standard/tests/class_object/get_object_vars_variation_003.phpt
new file mode 100644
index 000000000..70794e7d5
--- /dev/null
+++ b/ext/standard/tests/class_object/get_object_vars_variation_003.phpt
@@ -0,0 +1,158 @@
+--TEST--
+Test get_object_vars() function : usage variations - unexpected types for argument 1
+--FILE--
+<?php
+/* Prototype : proto array get_object_vars(object obj)
+ * Description: Returns an array of object properties
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing get_object_vars() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for obj
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( get_object_vars($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_object_vars() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line 56
+
+Notice: Undefined variable: unset_var in %s on line 59
+
+Arg value 0
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value string
+bool(false)
+
+Arg value string
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_parent_class_error_001.phpt b/ext/standard/tests/class_object/get_parent_class_error_001.phpt
new file mode 100644
index 000000000..cf9c3e867
--- /dev/null
+++ b/ext/standard/tests/class_object/get_parent_class_error_001.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Test get_parent_class() function : error conditions - wrong number of args.
+--FILE--
+<?php
+/* Prototype : proto string get_parent_class([mixed object])
+ * Description: Retrieves the parent class name for object or class or current scope.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing get_parent_class() : error conditions ***\n";
+
+
+//Test get_parent_class with one more than the expected number of arguments
+echo "\n-- Testing get_parent_class() function with more than expected no. of arguments --\n";
+$object = 1;
+$extra_arg = 10;
+var_dump( get_parent_class($object, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_parent_class() : error conditions ***
+
+-- Testing get_parent_class() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for get_parent_class() in %s on line 15
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_parent_class_variation_001.phpt b/ext/standard/tests/class_object/get_parent_class_variation_001.phpt
new file mode 100644
index 000000000..6f2e32805
--- /dev/null
+++ b/ext/standard/tests/class_object/get_parent_class_variation_001.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test get_parent_class() function : variation - case sensitivity
+--FILE--
+<?php
+/* Prototype : proto string get_parent_class([mixed object])
+ * Description: Retrieves the parent class name for object or class or current scope.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+// Note: basic use cases in Zend/tests/010.phpt
+
+echo "*** Testing get_parent_class() : variation ***\n";
+
+class caseSensitivityTest {}
+class caseSensitivityTestChild extends caseSensitivityTest {}
+
+var_dump(get_parent_class('CasesensitivitytestCHILD'));
+var_dump(get_parent_class(new CasesensitivitytestCHILD));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_parent_class() : variation ***
+string(19) "caseSensitivityTest"
+string(19) "caseSensitivityTest"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt
new file mode 100644
index 000000000..f7e5b9df3
--- /dev/null
+++ b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt
@@ -0,0 +1,174 @@
+--TEST--
+Test get_parent_class() function : usage variations - unexpected argument type.
+--FILE--
+<?php
+/* Prototype : proto string get_parent_class([mixed object])
+ * Description: Retrieves the parent class name for object or class or current scope.
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+function __autoload($className) {
+ echo "In __autoload($className)\n";
+}
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing get_parent_class() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'String',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for object
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( get_parent_class($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing get_parent_class() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(68)
+Error: 8 - Undefined variable: unset_var, %s(71)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value string
+In __autoload(string)
+bool(false)
+
+Arg value String
+In __autoload(String)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(77)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/is_a_error_001.phpt b/ext/standard/tests/class_object/is_a_error_001.phpt
new file mode 100644
index 000000000..0d1aedca0
--- /dev/null
+++ b/ext/standard/tests/class_object/is_a_error_001.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test is_a() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto bool is_a(object object, string class_name)
+ * Description: Returns true if the object is of this class or has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing is_a() : error conditions ***\n";
+
+
+//Test is_a with one more than the expected number of arguments
+echo "\n-- Testing is_a() function with more than expected no. of arguments --\n";
+$object = new stdclass();
+$class_name = 'string_val';
+$extra_arg = 10;
+var_dump( is_a($object, $class_name, $extra_arg) );
+
+// Testing is_a with one less than the expected number of arguments
+echo "\n-- Testing is_a() function with less than expected no. of arguments --\n";
+$object = new stdclass();
+var_dump( is_a($object) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing is_a() : error conditions ***
+
+-- Testing is_a() function with more than expected no. of arguments --
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 16
+
+Warning: Wrong parameter count for is_a() in %s on line 16
+NULL
+
+-- Testing is_a() function with less than expected no. of arguments --
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 21
+
+Warning: Wrong parameter count for is_a() in %s on line 21
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/is_a_variation_001.phpt b/ext/standard/tests/class_object/is_a_variation_001.phpt
new file mode 100644
index 000000000..d521502dc
--- /dev/null
+++ b/ext/standard/tests/class_object/is_a_variation_001.phpt
@@ -0,0 +1,213 @@
+--TEST--
+Test is_a() function : usage variations - wrong type for arg 1
+--FILE--
+<?php
+/* Prototype : proto bool is_a(object object, string class_name)
+ * Description: Returns true if the object is of this class or has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+// Note: basic use cases in Zend/tests/is_a.phpt
+echo "*** Testing is_a() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$class_name = 'stdClass';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'String',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for object
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( is_a($value, $class_name) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing is_a() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line 59
+
+Notice: Undefined variable: unset_var in %s on line 62
+
+Arg value 0
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value 1
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value 12345
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value -2345
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value 10.5
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value -10.5
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value 101234567000
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value 1.07654321E-9
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value 0.5
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value 1
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value 1
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value string
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value String
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 69
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/is_a_variation_002.phpt b/ext/standard/tests/class_object/is_a_variation_002.phpt
new file mode 100644
index 000000000..9835e7c68
--- /dev/null
+++ b/ext/standard/tests/class_object/is_a_variation_002.phpt
@@ -0,0 +1,223 @@
+--TEST--
+Test is_a() function : usage variations - wrong type for arg 2
+--FILE--
+<?php
+/* Prototype : proto bool is_a(object object, string class_name)
+ * Description: Returns true if the object is of this class or has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+class C {
+ function __toString() {
+ return "C Instance";
+ }
+}
+
+echo "*** Testing is_a() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$object = new stdclass();
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new C,
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for class_name
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( is_a($object, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing is_a() : usage variations ***
+
+Notice: Undefined variable: undefined_var in %s on line 64
+
+Notice: Undefined variable: unset_var in %s on line 67
+
+Arg value 0
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value 1
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value 12345
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value -2345
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value 10.5
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value -10.5
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value 101234567000
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value 1.07654321E-9
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value 0.5
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+
+Notice: Array to string conversion in %s on line 74
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+
+Notice: Array to string conversion in %s on line 74
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+
+Notice: Array to string conversion in %s on line 74
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+
+Notice: Array to string conversion in %s on line 74
+bool(false)
+
+Arg value Array
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+
+Notice: Array to string conversion in %s on line 74
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value 1
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value 1
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value C Instance
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+
+Arg value
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 74
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/is_a_variation_003.phpt b/ext/standard/tests/class_object/is_a_variation_003.phpt
new file mode 100644
index 000000000..9cc50f34b
--- /dev/null
+++ b/ext/standard/tests/class_object/is_a_variation_003.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test is_a() function : usage variations - case sensitivity
+--FILE--
+<?php
+/* Prototype : proto bool is_a(object object, string class_name)
+ * Description: Returns true if the object is of this class or has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing is_a() : usage variations ***\n";
+
+class caseSensitivityTest {}
+class caseSensitivityTestChild extends caseSensitivityTest {}
+
+var_dump(is_a(new caseSensitivityTestChild, 'caseSensitivityTEST'));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing is_a() : usage variations ***
+
+Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %s on line 13
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/is_subclass_of_error_001.phpt b/ext/standard/tests/class_object/is_subclass_of_error_001.phpt
new file mode 100644
index 000000000..4403bde4c
--- /dev/null
+++ b/ext/standard/tests/class_object/is_subclass_of_error_001.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test is_subclass_of() function : wrong number of args
+--FILE--
+<?php
+/* Prototype : proto bool is_subclass_of(object object, string class_name)
+ * Description: Returns true if the object has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing is_subclass_of() : error conditions ***\n";
+
+
+//Test is_subclass_of with one more than the expected number of arguments
+echo "\n-- Testing is_subclass_of() function with more than expected no. of arguments --\n";
+$object = new stdclass();
+$class_name = 'string_val';
+$extra_arg = 10;
+var_dump( is_subclass_of($object, $class_name, $extra_arg) );
+
+// Testing is_subclass_of with one less than the expected number of arguments
+echo "\n-- Testing is_subclass_of() function with less than expected no. of arguments --\n";
+$object = new stdclass();
+var_dump( is_subclass_of($object) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing is_subclass_of() : error conditions ***
+
+-- Testing is_subclass_of() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for is_subclass_of() in %s on line 16
+NULL
+
+-- Testing is_subclass_of() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for is_subclass_of() in %s on line 21
+NULL
+Done
diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt
new file mode 100644
index 000000000..f11183d48
--- /dev/null
+++ b/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt
@@ -0,0 +1,175 @@
+--TEST--
+Test is_subclass_of() function : usage variations - unexpected type for arg 1
+--FILE--
+<?php
+/* Prototype : proto bool is_subclass_of(object object, string class_name)
+ * Description: Returns true if the object has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+// Note: basic use cases in Zend/tests/is_a.phpt
+function __autoload($className) {
+ echo "In __autoload($className)\n";
+}
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+
+echo "*** Testing is_subclass_of() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$class_name = 'string_val';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'String',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for object
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( is_subclass_of($value, $class_name) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing is_subclass_of() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(69)
+Error: 8 - Undefined variable: unset_var, %s(72)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+Error: 2 - Unknown class passed as parameter, %s(79)
+bool(false)
+
+Arg value
+Error: 2 - Unknown class passed as parameter, %s(79)
+bool(false)
+
+Arg value string
+In __autoload(string)
+Error: 2 - Unknown class passed as parameter, %s(79)
+bool(false)
+
+Arg value String
+In __autoload(String)
+Error: 2 - Unknown class passed as parameter, %s(79)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt
new file mode 100644
index 000000000..a45583ce6
--- /dev/null
+++ b/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt
@@ -0,0 +1,172 @@
+--TEST--
+Test is_subclass_of() function : usage variations - unexpected type for arg 2
+--FILE--
+<?php
+/* Prototype : proto bool is_subclass_of(object object, string class_name)
+ * Description: Returns true if the object has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+function __autoload($className) {
+ echo "In __autoload($className)\n";
+}
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing is_subclass_of() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$object = new stdclass();
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for class_name
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( is_subclass_of($object, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing is_subclass_of() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(67)
+Error: 8 - Undefined variable: unset_var, %s(70)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(76)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(77)
+Error: 8 - Object of class stdClass to string conversion, %s(77)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_003.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_003.phpt
new file mode 100644
index 000000000..d4aef1234
--- /dev/null
+++ b/ext/standard/tests/class_object/is_subclass_of_variation_003.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Test is_subclass_of() function : usage variations - case sensitivity
+--FILE--
+<?php
+/* Prototype : proto bool is_subclass_of(object object, string class_name)
+ * Description: Returns true if the object has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing is_subclass_of() : usage variations ***\n";
+
+echo "*** Testing is_a() : usage variations ***\n";
+
+class caseSensitivityTest {}
+class caseSensitivityTestChild extends caseSensitivityTest {}
+
+var_dump(is_subclass_of('caseSensitivityTestCHILD', 'caseSensitivityTEST'));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing is_subclass_of() : usage variations ***
+*** Testing is_a() : usage variations ***
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/method_exists_basic_001.phpt b/ext/standard/tests/class_object/method_exists_basic_001.phpt
new file mode 100644
index 000000000..2f11e4c46
--- /dev/null
+++ b/ext/standard/tests/class_object/method_exists_basic_001.phpt
@@ -0,0 +1,83 @@
+--TEST--
+method_exists() on userspace classes; static & non-static methods with various visibilities.
+--FILE--
+<?php
+/* Prototype : proto bool is_subclass_of(object object, string class_name)
+ * Description: Returns true if the object has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+Class B {
+ public function inherit_pub() {}
+ protected function inherit_prot() {}
+ private function inherit_priv() {}
+ static public function inherit_static_pub() {}
+ static protected function inherit_static_prot() {}
+ static private function inherit_static_priv() {}
+}
+
+Class C extends B {
+ public function pub() {}
+ protected function prot() {}
+ private function priv() {}
+ static public function static_pub() {}
+ static protected function static_prot() {}
+ static private function static_priv() {}
+}
+
+
+$methods = array(
+ 'inherit_pub', 'inherit_prot', 'inherit_priv',
+ 'inherit_static_pub', 'inherit_static_prot', 'inherit_static_priv',
+ 'pub', 'prot', 'priv',
+ 'static_pub', 'static_prot', 'static_priv',
+ 'non_existent');
+
+echo "\n ---(Using string class name)---\n";
+foreach ($methods as $method) {
+ echo "Does C::$method exist? ";
+ var_dump(method_exists("C", $method));
+}
+
+echo "\n ---(Using object)---\n";
+$myC = new C;
+foreach ($methods as $method) {
+ echo "Does C::$method exist? ";
+ var_dump(method_exists($myC, $method));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+
+ ---(Using string class name)---
+Does C::inherit_pub exist? bool(true)
+Does C::inherit_prot exist? bool(true)
+Does C::inherit_priv exist? bool(true)
+Does C::inherit_static_pub exist? bool(true)
+Does C::inherit_static_prot exist? bool(true)
+Does C::inherit_static_priv exist? bool(true)
+Does C::pub exist? bool(true)
+Does C::prot exist? bool(true)
+Does C::priv exist? bool(true)
+Does C::static_pub exist? bool(true)
+Does C::static_prot exist? bool(true)
+Does C::static_priv exist? bool(true)
+Does C::non_existent exist? bool(false)
+
+ ---(Using object)---
+Does C::inherit_pub exist? bool(true)
+Does C::inherit_prot exist? bool(true)
+Does C::inherit_priv exist? bool(true)
+Does C::inherit_static_pub exist? bool(true)
+Does C::inherit_static_prot exist? bool(true)
+Does C::inherit_static_priv exist? bool(true)
+Does C::pub exist? bool(true)
+Does C::prot exist? bool(true)
+Does C::priv exist? bool(true)
+Does C::static_pub exist? bool(true)
+Does C::static_prot exist? bool(true)
+Does C::static_priv exist? bool(true)
+Does C::non_existent exist? bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/method_exists_basic_002.phpt b/ext/standard/tests/class_object/method_exists_basic_002.phpt
new file mode 100644
index 000000000..f6b62aa26
--- /dev/null
+++ b/ext/standard/tests/class_object/method_exists_basic_002.phpt
@@ -0,0 +1,33 @@
+--TEST--
+method_exists() on internal classes
+--FILE--
+<?php
+/* Prototype : proto bool is_subclass_of(object object, string class_name)
+ * Description: Returns true if the object has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo " ---(Internal classes, using string class name)---\n";
+echo "Does exception::getmessage exist? ";
+var_dump(method_exists("exception", "getmessage"));
+echo "Does stdclass::nonexistent exist? ";
+var_dump(method_exists("stdclass", "nonexistent"));
+
+echo "\n ---(Internal classes, using class instance)---\n";
+echo "Does exception::getmessage exist? ";
+var_dump(method_exists(new exception, "getmessage"));
+echo "Does stdclass::nonexistent exist? ";
+var_dump(method_exists(new stdclass, "nonexistent"));
+
+echo "Done";
+?>
+--EXPECTF--
+ ---(Internal classes, using string class name)---
+Does exception::getmessage exist? bool(true)
+Does stdclass::nonexistent exist? bool(false)
+
+ ---(Internal classes, using class instance)---
+Does exception::getmessage exist? bool(true)
+Does stdclass::nonexistent exist? bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/method_exists_basic_003.phpt b/ext/standard/tests/class_object/method_exists_basic_003.phpt
new file mode 100644
index 000000000..32f62b7e4
--- /dev/null
+++ b/ext/standard/tests/class_object/method_exists_basic_003.phpt
@@ -0,0 +1,22 @@
+--TEST--
+method_exists() on non-existent class, with __autoload().
+--FILE--
+<?php
+/* Prototype : proto bool is_subclass_of(object object, string class_name)
+ * Description: Returns true if the object has this class as one of its parents
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+function __autoload($name) {
+ echo "In __autoload($name)\n";
+}
+
+var_dump(method_exists('UndefC', 'func'));
+
+echo "Done";
+?>
+--EXPECTF--
+In __autoload(UndefC)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/method_exists_error_001.phpt b/ext/standard/tests/class_object/method_exists_error_001.phpt
new file mode 100644
index 000000000..203128c67
--- /dev/null
+++ b/ext/standard/tests/class_object/method_exists_error_001.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test method_exists() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto bool method_exists(object object, string method)
+ * Description: Checks if the class method exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing method_exists() : error conditions ***\n";
+
+
+//Test method_exists with one more than the expected number of arguments
+echo "\n-- Testing method_exists() function with more than expected no. of arguments --\n";
+$object = new stdclass();
+$method = 'string_val';
+$extra_arg = 10;
+var_dump( method_exists($object, $method, $extra_arg) );
+
+// Testing method_exists with one less than the expected number of arguments
+echo "\n-- Testing method_exists() function with less than expected no. of arguments --\n";
+$object = new stdclass();
+var_dump( method_exists($object) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing method_exists() : error conditions ***
+
+-- Testing method_exists() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for method_exists() in %s on line 16
+NULL
+
+-- Testing method_exists() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for method_exists() in %s on line 21
+NULL
+Done
diff --git a/ext/standard/tests/class_object/method_exists_variation_001.phpt b/ext/standard/tests/class_object/method_exists_variation_001.phpt
new file mode 100644
index 000000000..117c211d0
--- /dev/null
+++ b/ext/standard/tests/class_object/method_exists_variation_001.phpt
@@ -0,0 +1,170 @@
+--TEST--
+Test method_exists() function : usage variations - unexpected type for arg 1
+--FILE--
+<?php
+/* Prototype : proto bool method_exists(object object, string method)
+ * Description: Checks if the class method exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+function __autoload($className) {
+ echo "In __autoload($className)\n";
+}
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing method_exists() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$method = 'string_val';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'String',
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for object
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( method_exists($value, $method) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing method_exists() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(68)
+Error: 8 - Undefined variable: unset_var, %s(71)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value Array
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value string
+In __autoload(string)
+bool(false)
+
+Arg value String
+In __autoload(String)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/method_exists_variation_002.phpt b/ext/standard/tests/class_object/method_exists_variation_002.phpt
new file mode 100644
index 000000000..54d0ef94f
--- /dev/null
+++ b/ext/standard/tests/class_object/method_exists_variation_002.phpt
@@ -0,0 +1,172 @@
+--TEST--
+Test method_exists() function : usage variations - unexpected type for arg 2
+--FILE--
+<?php
+/* Prototype : proto bool method_exists(object object, string method)
+ * Description: Checks if the class method exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+function __autoload($className) {
+ echo "In __autoload($className)\n";
+}
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing method_exists() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$object = new stdclass();
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for method
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( method_exists($object, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing method_exists() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(67)
+Error: 8 - Undefined variable: unset_var, %s(70)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(77)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(76)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(77)
+Error: 8 - Object of class stdClass to string conversion, %s(77)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/class_object/method_exists_variation_003.phpt b/ext/standard/tests/class_object/method_exists_variation_003.phpt
new file mode 100644
index 000000000..debe5a35e
--- /dev/null
+++ b/ext/standard/tests/class_object/method_exists_variation_003.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Test method_exists() function : variation - Case sensitivity
+--FILE--
+<?php
+/* Prototype : proto bool method_exists(object object, string method)
+ * Description: Checks if the class method exists
+ * Source code: Zend/zend_builtin_functions.c
+ * Alias to functions:
+ */
+
+echo "*** Testing method_exists() : variation ***\n";
+
+Class caseSensitivityTest {
+ public function myMethod() {}
+}
+
+var_dump(method_exists(new casesensitivitytest, 'myMetHOD'));
+var_dump(method_exists('casesensiTivitytest', 'myMetHOD'));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing method_exists() : variation ***
+bool(true)
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/dir/chdir_basic.phpt b/ext/standard/tests/dir/chdir_basic.phpt
new file mode 100644
index 000000000..5fc0e5b88
--- /dev/null
+++ b/ext/standard/tests/dir/chdir_basic.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test chdir() function : basic functionality
+--FILE--
+<?php
+/* Prototype : bool chdir(string $directory)
+ * Description: Change the current directory
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Test basic functionality of chdir() with absolute and relative paths
+ */
+
+echo "*** Testing chdir() : basic functionality ***\n";
+$base_dir_path = dirname(__FILE__);
+
+$level_one_dir_name = "level_one";
+$level_one_dir_path = "$base_dir_path/$level_one_dir_name";
+
+$level_two_dir_name = "level_two";
+$level_two_dir_path = "$base_dir_path/$level_one_dir_name/$level_two_dir_name";
+
+// create directories
+mkdir($level_one_dir_path);
+mkdir($level_two_dir_path);
+
+echo "\n-- Testing chdir() with absolute path: --\n";
+chdir($base_dir_path);
+var_dump(chdir($level_one_dir_path));
+var_dump(getcwd());
+
+echo "\n-- Testing chdir() with relative paths: --\n";
+var_dump(chdir($level_two_dir_name));
+var_dump(getcwd());
+?>
+===DONE===
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+rmdir("$file_path/level_one/level_two");
+rmdir("$file_path/level_one");
+?>
+--EXPECTF--
+*** Testing chdir() : basic functionality ***
+
+-- Testing chdir() with absolute path: --
+bool(true)
+string(%d) "%slevel_one"
+
+-- Testing chdir() with relative paths: --
+bool(true)
+string(%d) "%slevel_one%elevel_two"
+===DONE===
diff --git a/ext/standard/tests/dir/chdir_error1.phpt b/ext/standard/tests/dir/chdir_error1.phpt
new file mode 100644
index 000000000..0f57ff5b2
--- /dev/null
+++ b/ext/standard/tests/dir/chdir_error1.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test chdir() function : error conditions - Incorrect number of arguments
+--FILE--
+<?php
+/* Prototype : bool chdir(string $directory)
+ * Description: Change the current directory
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass incorrect number of arguments to chdir() to test behaviour
+ */
+
+echo "*** Testing chdir() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing chdir() function with Zero arguments --\n";
+var_dump( chdir() );
+
+//Test chdir with one more than the expected number of arguments
+echo "\n-- Testing chdir() function with more than expected no. of arguments --\n";
+$directory = __FILE__;
+$extra_arg = 10;
+var_dump( chdir($directory, $extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing chdir() : error conditions ***
+
+-- Testing chdir() function with Zero arguments --
+
+Warning: chdir() expects exactly 1 parameter, 0 given in %s on line %d
+bool(false)
+
+-- Testing chdir() function with more than expected no. of arguments --
+
+Warning: chdir() expects exactly 1 parameter, 2 given in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/chdir_error2.phpt b/ext/standard/tests/dir/chdir_error2.phpt
new file mode 100644
index 000000000..a3bbb63e6
--- /dev/null
+++ b/ext/standard/tests/dir/chdir_error2.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Test chdir() function : error conditions - Non-existent directory
+--FILE--
+<?php
+/* Prototype : bool chdir(string $directory)
+ * Description: Change the current directory
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass a directory that does not exist as $directory to chdir() to test behaviour
+ */
+
+echo "*** Testing chdir() : error conditions ***\n";
+
+$directory = __FILE__ . '/idonotexist';
+
+var_dump(chdir($directory));
+?>
+===DONE===
+--EXPECTF--
+*** Testing chdir() : error conditions ***
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/chdir_variation1.phpt b/ext/standard/tests/dir/chdir_variation1.phpt
new file mode 100644
index 000000000..a7cf857f7
--- /dev/null
+++ b/ext/standard/tests/dir/chdir_variation1.phpt
@@ -0,0 +1,235 @@
+--TEST--
+Test chdir() function : usage variations - different data type as $directory arg
+--FILE--
+<?php
+/* Prototype : bool chdir(string $directory)
+ * Description: Change the current directory
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass different data types as $directory argument to test behaviour
+ */
+
+echo "*** Testing chdir() : usage variations ***\n";
+
+// create the temporary directory
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/chdir_basic";
+@mkdir($dir_path);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA {
+ var $dir_path;
+
+ function __construct($dir) {
+ $this->dir_path = $dir;
+ }
+
+ public function __toString() {
+ return "$this->dir_path";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+$dir_path
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $directory argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "$dir_path",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA($dir_path),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of chdir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( chdir($input) );
+ $iterator++;
+};
+
+fclose($fp);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/chdir_basic";
+
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing chdir() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: chdir() expects parameter 1 to be string, array given in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+bool(true)
+
+-- Iteration 20 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+bool(true)
+
+-- Iteration 22 --
+bool(true)
+
+-- Iteration 23 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: chdir(): %s (errno %d) in %s on line %d
+bool(false)
+
+-- Iteration 25 --
+
+Warning: chdir() expects parameter 1 to be string, resource given in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/chdir_variation2.phpt b/ext/standard/tests/dir/chdir_variation2.phpt
new file mode 100644
index 000000000..fa70f9e10
--- /dev/null
+++ b/ext/standard/tests/dir/chdir_variation2.phpt
@@ -0,0 +1,104 @@
+--TEST--
+Test chdir() function : usage variations - relative paths
+--FILE--
+<?php
+/* Prototype : bool chdir(string $directory)
+ * Description: Change the current directory
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Test chdir() with variations of relative paths
+ */
+
+echo "*** Testing chdir() : usage variations ***\n";
+
+$base_dir_path = dirname(__FILE__);
+
+$level_one_dir_name = "level_one";
+$level_one_dir_path = "$base_dir_path/$level_one_dir_name";
+
+$level_two_dir_name = "level_two";
+$level_two_dir_path = "$base_dir_path/$level_one_dir_name/$level_two_dir_name";
+
+// create directories
+mkdir($level_one_dir_path);
+mkdir($level_two_dir_path);
+
+echo "\n-- \$directory = './level_one': --\n";
+var_dump(chdir($base_dir_path));
+var_dump(chdir("./$level_one_dir_name"));
+var_dump(getcwd());
+
+echo "\n-- \$directory = 'level_one/level_two': --\n";
+var_dump(chdir($base_dir_path));
+var_dump(chdir("$level_one_dir_name/$level_two_dir_name"));
+var_dump(getcwd());
+
+echo "\n-- \$directory = '..': --\n";
+var_dump(chdir('..'));
+var_dump(getcwd());
+
+echo "\n-- \$directory = 'level_two', '.': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump(chdir('.'));
+var_dump(getcwd());
+
+echo "\n-- \$directory = '../': --\n";
+var_dump(chdir('../'));
+var_dump(getcwd());
+
+echo "\n-- \$directory = './': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump(chdir('./'));
+var_dump(getcwd());
+
+echo "\n-- \$directory = '../../'level_one': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump(chdir("../../$level_one_dir_name"));
+var_dump(getcwd());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+rmdir("$file_path/level_one/level_two");
+rmdir("$file_path/level_one");
+?>
+--EXPECTF--
+*** Testing chdir() : usage variations ***
+
+-- $directory = './level_one': --
+bool(true)
+bool(true)
+string(%d) "%slevel_one"
+
+-- $directory = 'level_one/level_two': --
+bool(true)
+bool(true)
+string(%d) "%slevel_one%elevel_two"
+
+-- $directory = '..': --
+bool(true)
+string(%d) "%slevel_one"
+
+-- $directory = 'level_two', '.': --
+bool(true)
+bool(true)
+string(%d) "%slevel_one%elevel_two"
+
+-- $directory = '../': --
+bool(true)
+string(%d) "%slevel_one"
+
+-- $directory = './': --
+bool(true)
+bool(true)
+string(%d) "%slevel_one%elevel_two"
+
+-- $directory = '../../'level_one': --
+bool(true)
+bool(true)
+string(%d) "%slevel_one"
+===DONE===
diff --git a/ext/standard/tests/dir/closedir_basic.phpt b/ext/standard/tests/dir/closedir_basic.phpt
new file mode 100644
index 000000000..49080bb6a
--- /dev/null
+++ b/ext/standard/tests/dir/closedir_basic.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test closedir() function : basic functionality
+--FILE--
+<?php
+/* Prototype : void closedir([resource $dir_handle])
+ * Description: Close directory connection identified by the dir_handle
+ * Source code: ext/standard/dir.c
+ * Alias to functions: close
+ */
+
+/*
+ * Test basic functionality of closedir()
+ */
+
+echo "*** Testing closedir() : basic functionality ***\n";
+
+$base_dir = dirname(__FILE__);
+$dir_path = $base_dir . '/closedir_basic';
+mkdir($dir_path);
+
+echo "\n-- Call closedir() with no arguments: --\n";
+$dh1 = opendir($dir_path);
+var_dump(closedir());
+echo "-- Check Directory Handle: --\n";
+var_dump($dh1);
+
+echo "\n-- Call closedir() with \$dir_handle argument supplied: --\n";
+$dh2 = opendir($dir_path);
+
+if ((int)$dh1 === (int)$dh2) {
+ echo "\nNo new resource created\n";
+}
+var_dump(closedir($dh2));
+echo "-- Check Directory Handle: --\n";
+var_dump($dh2);
+?>
+===DONE===
+--CLEAN--
+<?php
+$base_dir = dirname(__FILE__);
+$dir_path = $base_dir . '/closedir_basic';
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing closedir() : basic functionality ***
+
+-- Call closedir() with no arguments: --
+NULL
+-- Check Directory Handle: --
+resource(%d) of type (Unknown)
+
+-- Call closedir() with $dir_handle argument supplied: --
+NULL
+-- Check Directory Handle: --
+resource(%d) of type (Unknown)
+===DONE===
diff --git a/ext/standard/tests/dir/closedir_error.phpt b/ext/standard/tests/dir/closedir_error.phpt
new file mode 100644
index 000000000..1a8a043d0
--- /dev/null
+++ b/ext/standard/tests/dir/closedir_error.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test closedir() function : error conditions - Pass incorrect number of arguments
+--FILE--
+<?php
+/* Prototype : void closedir([resource $dir_handle])
+ * Description: Close directory connection identified by the dir_handle
+ * Source code: ext/standard/dir.c
+ * Alias to functions: close
+ */
+
+/*
+ * Pass incorrect number of arguments to closedir() to test behaviour
+ */
+
+echo "*** Testing closedir() : error conditions ***\n";
+
+
+//Test closedir with one more than the expected number of arguments
+echo "\n-- Testing closedir() function with more than expected no. of arguments --\n";
+
+$dir_path = dirname(__FILE__) . '\closedir_error';
+mkdir($dir_path);
+$dir_handle = opendir($dir_path);
+
+$extra_arg = 10;
+var_dump( closedir($dir_handle, $extra_arg) );
+
+//successfully close the directory handle so can delete in CLEAN section
+closedir($dir_handle);
+?>
+===DONE===
+--CLEAN--
+<?php
+$base_dir = dirname(__FILE__);
+$dir_path = $base_dir . '\closedir_error';
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing closedir() : error conditions ***
+
+-- Testing closedir() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for closedir() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/closedir_variation1.phpt b/ext/standard/tests/dir/closedir_variation1.phpt
new file mode 100644
index 000000000..d5c843996
--- /dev/null
+++ b/ext/standard/tests/dir/closedir_variation1.phpt
@@ -0,0 +1,212 @@
+--TEST--
+Test closedir() function : usage variations - different data types as $dir_handle arg
+--FILE--
+<?php
+/* Prototype : void closedir([resource $dir_handle])
+ * Description: Close directory connection identified by the dir_handle
+ * Source code: ext/standard/dir.c
+ * Alias to functions: close
+ */
+
+/*
+ * Pass different data types as $dir_handle argument to closedir() to test behaviour
+ */
+
+echo "*** Testing closedir() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed to $dir_handle argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+);
+
+// loop through each element of $inputs to check the behavior of closedir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( closedir($input) );
+ $iterator++;
+};
+
+?>
+===DONE===
+--EXPECTF--
+*** Testing closedir() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: closedir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/closedir_variation2.phpt b/ext/standard/tests/dir/closedir_variation2.phpt
new file mode 100644
index 000000000..015176c84
--- /dev/null
+++ b/ext/standard/tests/dir/closedir_variation2.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test closedir() function : usage variations - close directory handle twice
+--FILE--
+<?php
+/* Prototype : void closedir([resource $dir_handle])
+ * Description: Close directory connection identified by the dir_handle
+ * Source code: ext/standard/dir.c
+ * Alias to functions: close
+ */
+
+/*
+ * close the directory handle twice using closedir() to test behaviour
+ */
+
+echo "*** Testing closedir() : usage variations ***\n";
+
+//create temporary directory for test, removed in CLEAN section
+$directory = dirname(__FILE__) . "/closedir_variation2";
+mkdir($directory);
+
+$dh = opendir($directory);
+
+echo "\n-- Close directory handle first time: --\n";
+var_dump(closedir($dh));
+echo "Directory Handle: ";
+var_dump($dh);
+
+echo "\n-- Close directory handle second time: --\n";
+var_dump(closedir($dh));
+echo "Directory Handle: ";
+var_dump($dh);
+?>
+===DONE===
+--CLEAN--
+<?php
+$directory = dirname(__FILE__) . "/closedir_variation2";
+rmdir($directory);
+?>
+--EXPECTF--
+*** Testing closedir() : usage variations ***
+
+-- Close directory handle first time: --
+NULL
+Directory Handle: resource(%d) of type (Unknown)
+
+-- Close directory handle second time: --
+
+Warning: closedir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
+Directory Handle: resource(%d) of type (Unknown)
+===DONE===
diff --git a/ext/standard/tests/dir/closedir_variation3.phpt b/ext/standard/tests/dir/closedir_variation3.phpt
new file mode 100644
index 000000000..b9b5e67e7
--- /dev/null
+++ b/ext/standard/tests/dir/closedir_variation3.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test closedir() function : usage variations - close a file pointer
+--FILE--
+<?php
+/* Prototype : void closedir([resource $dir_handle])
+ * Description: Close directory connection identified by the dir_handle
+ * Source code: ext/standard/dir.c
+ * Alias to functions: close
+ */
+
+/*
+ * Create a file pointer using fopen() then try to close it using closedir()
+ */
+
+echo "*** Testing closedir() : usage variations ***\n";
+
+echo "\n-- Open a file using fopen() --\n";
+var_dump($fp = fopen(__FILE__, 'r'));
+
+echo "\n-- Try to close the file pointer using closedir() --\n";
+var_dump(closedir($fp));
+
+echo "\n-- Check file pointer: --\n";
+var_dump($fp);
+
+if(is_resource($fp)) {
+ fclose($fp);
+}
+?>
+===DONE===
+--EXPECTF--
+*** Testing closedir() : usage variations ***
+
+-- Open a file using fopen() --
+resource(%d) of type (stream)
+
+-- Try to close the file pointer using closedir() --
+
+Warning: closedir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Check file pointer: --
+resource(%d) of type (stream)
+===DONE===
diff --git a/ext/standard/tests/dir/dir_basic.phpt b/ext/standard/tests/dir/dir_basic.phpt
new file mode 100644
index 000000000..dba49dba0
--- /dev/null
+++ b/ext/standard/tests/dir/dir_basic.phpt
@@ -0,0 +1,86 @@
+--TEST--
+Test dir() function : basic functionality
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+echo "*** Testing dir() : basic functionality ***\n";
+
+// include the file.inc for Function: function create_files()
+include(dirname(__FILE__)."/../file/file.inc");
+
+// create the temporary directory
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_basic";
+@mkdir($dir_path);
+
+// create files within the temporary directory
+create_files($dir_path, 3, "alphanumeric", 0755, 1, "w", "dir_basic");
+
+echo "Get Directory instance:\n";
+$d = dir($dir_path);
+var_dump( $d );
+
+echo "\nRead and rewind:\n";
+var_dump( $d->read() );
+var_dump( $d->read() );
+var_dump( $d->rewind() );
+
+echo "\nTest using handle directly:\n";
+var_dump( readdir($d->handle) );
+var_dump( readdir($d->handle) );
+
+echo "\nClose directory:\n";
+var_dump( $d->close() );
+var_dump( $d );
+
+echo "\nTest read after closing the dir:";
+var_dump( $d->read() );
+
+// delete temp files
+delete_files($dir_path, 3, "dir_basic", 1, ".tmp");
+echo "Done";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_basic";
+
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing dir() : basic functionality ***
+Get Directory instance:
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_basic"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+
+Read and rewind:
+string(%d) "%s"
+string(%d) "%s"
+NULL
+
+Test using handle directly:
+string(%d) "%s"
+string(%d) "%s"
+
+Close directory:
+NULL
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_basic"
+ ["handle"]=>
+ resource(%d) of type (Unknown)
+}
+
+Test read after closing the dir:
+Warning: Directory::read(): %d is not a valid Directory resource in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/dir/dir_error.phpt b/ext/standard/tests/dir/dir_error.phpt
new file mode 100644
index 000000000..f2ef25cc8
--- /dev/null
+++ b/ext/standard/tests/dir/dir_error.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test dir() function : error conditions
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+echo "*** Testing dir() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing dir() function with zero arguments --";
+var_dump( dir() );
+
+// With one more than expected number of arguments
+echo "\n-- Testing dir() function with one more than expected number of arguments --";
+$extra_arg = 10;
+var_dump( dir(getcwd(), "stream", $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing dir() : error conditions ***
+
+-- Testing dir() function with zero arguments --
+Warning: dir() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing dir() function with one more than expected number of arguments --
+Warning: dir() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/dir/dir_variation1.phpt b/ext/standard/tests/dir/dir_variation1.phpt
new file mode 100644
index 000000000..ad912c008
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation1.phpt
@@ -0,0 +1,160 @@
+--TEST--
+Test dir() function : usage variations - unexpected value for 'dir' argument
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Passing non string values to 'directory' argument of dir() and see
+ * that the function outputs proper warning messages wherever expected.
+ */
+
+echo "*** Testing dir() : unexpected values for \$directory argument ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset($unset_var);
+
+class A
+{
+ public $var;
+ public function init() {
+ $this->var = 10;
+ }
+}
+
+// get a resource variable
+$fp = fopen(__FILE__, "r"); // get a file handle
+$dfp = opendir( dirname(__FILE__) ); // get a dir handle
+
+// unexpected values to be passed to $directory argument
+$unexpected_values = array (
+
+ // array data
+/*1*/ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+/*6*/ NULL,
+ null,
+
+ // boolean data
+/*8*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*12*/ "",
+ '',
+
+ // undefined data
+/*14*/ @$undefined_var,
+
+ // unset data
+/*15*/ @$unset_var,
+
+ // resource variable(dir and file handle)
+/*16*/ $fp,
+ $dfp,
+
+ // object data
+/*18*/ new A()
+);
+
+// loop through various elements of $unexpected_values to check the behavior of dir()
+$iterator = 1;
+foreach( $unexpected_values as $unexpected_value ) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( dir($unexpected_value) );
+ $iterator++;
+}
+
+fclose($fp);
+closedir($dfp);
+echo "Done";
+?>
+--EXPECTF--
+*** Testing dir() : unexpected values for $directory argument ***
+
+-- Iteration 1 --
+
+Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+
+-- Iteration 8 --
+
+Warning: dir(1): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+bool(false)
+
+-- Iteration 10 --
+
+Warning: dir(1): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+
+Warning: dir() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: dir() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: dir() expects parameter 1 to be string, object given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/dir/dir_variation2.phpt b/ext/standard/tests/dir/dir_variation2.phpt
new file mode 100644
index 000000000..ee42900ee
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation2.phpt
@@ -0,0 +1,223 @@
+--TEST--
+Test dir() function : usage variations - unexpected value for 'context' argument
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Passing non resource values to 'context' argument of dir() and see
+ * that the function outputs proper warning messages wherever expected.
+ */
+
+echo "*** Testing dir() : unexpected values for \$context argument ***\n";
+
+// create the temporary directory
+$file_path = dirname(__FILE__);
+$directory = $file_path."/dir_variation2";
+@mkdir($directory);
+
+// get an unset variable
+$unset_var = stream_context_create();
+unset($unset_var);
+
+class classA
+{
+ public $var;
+ public function init() {
+ $this->var = 10;
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed to $directory argument
+$unexpected_values = array (
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // array data
+/*10*/ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+
+ // null data
+/*15*/ NULL,
+ null,
+
+ // boolean data
+/*17*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*21*/ "",
+ '',
+
+ // string data
+/*23*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*26*/ new classA(),
+
+ // undefined data
+/*27*/ @$undefined_var,
+
+ // unset data
+/*28*/ @$unset_var
+);
+
+// loop through various elements of $unexpected_values to check the behavior of dir()
+$iterator = 1;
+foreach( $unexpected_values as $unexpected_value ) {
+ echo "\n-- Iteration $iterator --";
+ var_dump( dir($directory, $unexpected_value) );
+ $iterator++;
+}
+
+echo "Done";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+$directory = $file_path."/dir_variation2";
+
+rmdir($directory);
+?>
+--EXPECTF--
+*** Testing dir() : unexpected values for $context argument ***
+
+-- Iteration 1 --
+Warning: dir() expects parameter 2 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 2 --
+Warning: dir() expects parameter 2 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 3 --
+Warning: dir() expects parameter 2 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 4 --
+Warning: dir() expects parameter 2 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 5 --
+Warning: dir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 6 --
+Warning: dir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 7 --
+Warning: dir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 8 --
+Warning: dir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 9 --
+Warning: dir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 10 --
+Warning: dir() expects parameter 2 to be resource, array given in %s on line %d
+NULL
+
+-- Iteration 11 --
+Warning: dir() expects parameter 2 to be resource, array given in %s on line %d
+NULL
+
+-- Iteration 12 --
+Warning: dir() expects parameter 2 to be resource, array given in %s on line %d
+NULL
+
+-- Iteration 13 --
+Warning: dir() expects parameter 2 to be resource, array given in %s on line %d
+NULL
+
+-- Iteration 14 --
+Warning: dir() expects parameter 2 to be resource, array given in %s on line %d
+NULL
+
+-- Iteration 15 --
+Warning: dir() expects parameter 2 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 16 --
+Warning: dir() expects parameter 2 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 17 --
+Warning: dir() expects parameter 2 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 18 --
+Warning: dir() expects parameter 2 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 19 --
+Warning: dir() expects parameter 2 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 20 --
+Warning: dir() expects parameter 2 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 21 --
+Warning: dir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 22 --
+Warning: dir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 23 --
+Warning: dir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 24 --
+Warning: dir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 25 --
+Warning: dir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 26 --
+Warning: dir() expects parameter 2 to be resource, object given in %s on line %d
+NULL
+
+-- Iteration 27 --
+Warning: dir() expects parameter 2 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 28 --
+Warning: dir() expects parameter 2 to be resource, null given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/dir/dir_variation3.phpt b/ext/standard/tests/dir/dir_variation3.phpt
new file mode 100644
index 000000000..f8d325874
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation3.phpt
@@ -0,0 +1,204 @@
+--TEST--
+Test dir() function : usage variations - different directory permissions
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not for Windows');
+}
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__)."/dir_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Providing various permissions to the directory to be opened and checking
+ * to see if dir() function opens the directory successfully.
+ */
+
+echo "*** Testing dir() : different directory permissions ***";
+
+// create the temporary directory
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_variation3";
+@mkdir($dir_path);
+
+/* different values for directory permissions */
+$permission_values = array(
+/*1*/ 0477, // owner has read only, other and group has rwx
+ 0677, // owner has rw only, other and group has rwx
+
+/*3*/ 0444, // all have read only
+ 0666, // all have rw only
+
+/*5*/ 0400, // owner has read only, group and others have no permission
+ 0600, // owner has rw only, group and others have no permission
+
+/*7*/ 0470, // owner has read only, group has rwx & others have no permission
+ 0407, // owner has read only, other has rwx & group has no permission
+
+/*9*/ 0670, // owner has rw only, group has rwx & others have no permission
+/*10*/ 0607 // owner has rw only, group has no permission and others have rwx
+);
+
+// Open directory with different permission values, read and close, expected: none of them to succeed.
+for($count = 0; $count < count($permission_values); $count++) {
+ echo "\n-- Iteration ".($count + 1)." --\n";
+
+ // try to remove the dir if exists & create
+ $file_path = dirname(__FILE__);
+ $dir_path = $file_path."/dir_variation3";
+ @chmod ($dir_path, 0777); // change dir permission to allow all operation
+ @rmdir ($dir_path); // try n delete the dir
+
+ // create the dir now
+ @mkdir($dir_path);
+
+ // change the dir permisson to test dir on it
+ var_dump( chmod($dir_path, $permission_values[$count]) );
+
+ // try to get dir handle
+ $d = dir($dir_path);
+ var_dump($d); // dump the handle
+
+ // try read directory, expected : false
+ echo "-- reading contents --\n";
+ var_dump($d->read());
+
+ // close directory
+ $d->close();
+}
+
+echo "Done";
+?>
+--CLEAN--
+<?php
+// deleting temporary directory
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_variation3";
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing dir() : different directory permissions ***
+-- Iteration 1 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 2 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 3 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 4 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 5 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 6 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 7 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 8 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 9 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+
+-- Iteration 10 --
+bool(true)
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation3"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading contents --
+string(%d) "%s"
+Done
diff --git a/ext/standard/tests/dir/dir_variation4.phpt b/ext/standard/tests/dir/dir_variation4.phpt
new file mode 100644
index 000000000..62b10b2a8
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation4.phpt
@@ -0,0 +1,72 @@
+--TEST--
+Test dir() function : usage variations - operate on previously opened directory
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Testing the behavior of dir() function by trying to open a
+ * directory which is already open.
+ */
+
+echo "*** Testing dir() : operate on previously opened directory ***\n";
+
+// include the file.inc for Function: function create_files()
+include( dirname(__FILE__)."/../file/file.inc");
+
+// create the temporary directory
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_variation4";
+@mkdir($dir_path);
+
+// create files within the temporary directory
+create_files($dir_path, 3, "alphanumeric", 0755, 1, "w", "dir_variation4");
+
+// open the directory
+$d = dir($dir_path);
+var_dump( $d );
+
+// open the same directory again without closing it
+$e = dir($dir_path);
+var_dump( $e );
+
+echo "-- reading directory contents with previous handle --\n";
+var_dump( $d->read() ); // with previous handle
+
+echo "-- reading directory contents with current handle --\n";
+var_dump( $e->read() ); // with current handle
+
+// delete temporary files
+delete_files($dir_path, 3, "dir_variation4");
+echo "Done";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_variation4";
+
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing dir() : operate on previously opened directory ***
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation4"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation4"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+-- reading directory contents with previous handle --
+string(%d) "%s"
+-- reading directory contents with current handle --
+string(%d) "%s"
+Done
diff --git a/ext/standard/tests/dir/dir_variation5.phpt b/ext/standard/tests/dir/dir_variation5.phpt
new file mode 100644
index 000000000..2399c634c
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation5.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Test dir() function : usage variations - open a file instead of directory
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Passing a file as argument to dir() function instead of a directory
+ * and checking if proper warning message is generated.
+ */
+
+echo "*** Testing dir() : open a file instead of a directory ***\n";
+
+// open the file instead of directory
+$d = dir(__FILE__);
+var_dump( $d );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing dir() : open a file instead of a directory ***
+
+Warning: dir(%s): failed to open dir: %s in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/dir/dir_variation6.phpt b/ext/standard/tests/dir/dir_variation6.phpt
new file mode 100644
index 000000000..e42057ed1
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation6.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test dir() function : usage variations - non-existent directory
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Passing a non-existent directory as argument to dir() function
+ * and checking to see if proper warning message is output.
+ */
+echo "*** Testing dir() : open a non-existent directory ***\n";
+
+// create the temporary directory
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_variation6";
+@mkdir($dir_path);
+
+// open existent directory
+$d = dir($dir_path);
+$d->close(); //close the dir
+
+// remove directory and try to open the same(non-existent) directory again
+rmdir($dir_path);
+clearstatcache();
+
+echo "-- opening previously removed directory --\n";
+var_dump( dir($dir_path) );
+
+// point to a non-existent directory
+$non_existent_dir = $file_path."/non_existent_dir";
+echo "-- opening non-existent directory --\n";
+$d = dir($non_existent_dir);
+var_dump( $d );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing dir() : open a non-existent directory ***
+-- opening previously removed directory --
+
+Warning: dir(%s): failed to open dir: %s in %s on line %d
+bool(false)
+-- opening non-existent directory --
+
+Warning: dir(%s): failed to open dir: %s in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/dir/dir_variation7.phpt b/ext/standard/tests/dir/dir_variation7.phpt
new file mode 100644
index 000000000..ca168f90a
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation7.phpt
@@ -0,0 +1,94 @@
+--TEST--
+Test dir() function : usage variations - directories with restricted permissions
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not for Windows');
+}
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__)."/dir_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * remove the execute permission from the parent dir and test dir() on child dir
+ * 1) remove write & execute permission from the 1st parent and test dir()
+ * 2) remove execute permission from 2nd parent and test dir()
+ */
+
+echo "*** Testing dir() : remove execute permission from the parent dir ***\n";
+
+/* create the temporary directory :
+ dir_variation7 ( parent )
+ |-> sub_dir ( sub parent )
+ |-> child_dir ( child dir)
+*/
+$file_path = dirname(__FILE__);
+$parent_dir_path = $file_path."/dir_variation7";
+@mkdir($parent_dir_path);
+chmod($parent_dir_path, 0777);
+
+// create sub_dir
+$sub_dir_path = $parent_dir_path."/sub_dir";
+@mkdir($sub_dir_path);
+chmod($sub_dir_path, 0777);
+
+//create sub_sub_dir
+$child_dir_path = $sub_dir_path."/child_dir";
+@mkdir($child_dir_path);
+
+// remove the write and execute permisson from sub parent
+chmod($sub_dir_path, 0444);
+echo "-- After restricting 1st level parent directory --\n";
+$d = dir($child_dir_path); // try to open, expected failure
+var_dump( $d ); // dump it
+
+// remove the execute permisson from parent dir, allowing all permission for sub dir
+chmod($sub_dir_path, 0777); // all permisson to sub dir
+chmod($parent_dir_path, 0666); // restricting parent directory
+echo "-- After restricting parent directory --\n";
+$d = dir($child_dir_path); // try to open, expected failure
+var_dump( $d ); // dump it
+
+echo "Done";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+$parent_dir_path = $file_path."/dir_variation7";
+$sub_dir_path = $parent_dir_path."/sub_dir";
+$child_dir_path = $sub_dir_path."/child_dir";
+
+// changing permissions for each temporary directory to delete them
+chmod($parent_dir_path, 0777);
+chmod($sub_dir_path, 0777);
+chmod($child_dir_path, 0777);
+
+rmdir($child_dir_path);
+rmdir($sub_dir_path);
+rmdir($parent_dir_path);
+?>
+--EXPECTF--
+*** Testing dir() : remove execute permission from the parent dir ***
+-- After restricting 1st level parent directory --
+
+Warning: dir(%s/dir_variation7/sub_dir/child_dir): failed to open dir: %s in %s on line %d
+bool(false)
+-- After restricting parent directory --
+
+Warning: dir(%s/dir_variation7/sub_dir/child_dir): failed to open dir: %s in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/dir/dir_variation8.phpt b/ext/standard/tests/dir/dir_variation8.phpt
new file mode 100644
index 000000000..41217500d
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation8.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Test dir() function : usage variations - checking with wildcard characters
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Create more than one temporary directory & subdirectory and check if dir() function can open
+ * those directories when wildcard characters are used to refer to them.
+ */
+
+echo "*** Testing dir() : checking with wildcard characters ***\n";
+
+// create the temporary directories
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_variation81";
+$sub_dir_path = $dir_path."/sub_dir1";
+
+@mkdir($dir_path1);
+@mkdir($sub_dir_path);
+
+/* with different wildcard characters */
+
+echo "-- wildcard = '*' --\n";
+var_dump( dir($file_path."/dir_var*") );
+var_dump( dir($file_path."/*") );
+
+echo "-- wildcard = '?' --\n";
+var_dump( dir($dir_path."/sub_dir?") );
+var_dump( dir($dir_path."/sub?dir1") );
+
+echo "Done";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+$dir_path = $file_path."/dir_variation81";
+$sub_dir_path = $dir_path."/sub_dir1";
+
+rmdir($dir_path1);
+rmdir($dir_path2);
+?>
+--EXPECTF--
+*** Testing dir() : checking with wildcard characters ***
+-- wildcard = '*' --
+
+Warning: dir(%s/dir_var*): failed to open dir: %s in %s on line %d
+bool(false)
+
+Warning: dir(%s/*): failed to open dir: %s in %s on line %d
+bool(false)
+-- wildcard = '?' --
+
+Warning: dir(%s/dir_variation81/sub_dir?): failed to open dir: %s in %s on line %d
+bool(false)
+
+Warning: dir(%s/dir_variation81/sub?dir1): failed to open dir: %s in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/dir/dir_variation9.phpt b/ext/standard/tests/dir/dir_variation9.phpt
new file mode 100644
index 000000000..22f3d5baa
--- /dev/null
+++ b/ext/standard/tests/dir/dir_variation9.phpt
@@ -0,0 +1,111 @@
+--TEST--
+Test dir() function : usage variations - relative valid and invalid paths
+--FILE--
+<?php
+/*
+ * Prototype : object dir(string $directory[, resource $context])
+ * Description: Directory class with properties, handle and class and methods read, rewind and close
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Checking the behavior of dir() function by passing directories which
+ * have valid and invalid relative path.
+ */
+
+echo "*** Testing dir() : checking with valid and invalid paths ***\n";
+
+/* create the temporary directories */
+
+$file_path = dirname(__FILE__);
+
+// directory dir_variation91 with one sub-directory sub_dir11 and sub-sub-directory sub_dir111
+$dir_path1 = $file_path."/dir_variation91";
+$sub_dir11 = $dir_path1."/sub_dir11";
+$sub_dir111 = $sub_dir11."/sub_dir111";
+
+// directory dir_variation92 with one sub-directory sub_dir21
+$dir_path2 = $file_path."/dir_variation92";
+$sub_dir21 = $dir_path2."/sub_dir21";
+
+@mkdir($dir_path1);
+@mkdir($dir_path2);
+@mkdir($sub_dir11);
+@mkdir($sub_dir111);
+@mkdir($sub_dir21);
+
+// open the directory with valid paths
+echo "\n-- With valid paths --\n";
+var_dump( dir("$dir_path1/sub_dir11/sub_dir111/..") );
+var_dump( dir("$dir_path2/sub_dir21/../../dir_variation91") );
+var_dump( dir("$dir_path2/sub_dir21/../../dir_variation91/sub_dir11/..") );
+var_dump( dir("$dir_path1/sub_dir11/sub_dir111/../../../dir_variation92/sub_dir21/..") );
+
+// open the directory with invalid path
+echo "\n-- With invalid paths --\n";
+var_dump( dir("$dir_path1/sub_dir12/sub_dir111/..") );
+var_dump( dir("$dir_path2/sub_dir21/../dir_variation91") );
+var_dump( dir("$dir_path2/sub_dir21/../../dir_variation91/sub_dir12/..") );
+var_dump( dir("$dir_path1/sub_dir11/sub_dir111/../../dir_variation92/sub_dir21/..") );
+
+echo "Done";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+
+$dir_path1 = $file_path."/dir_variation91";
+$sub_dir11 = $dir_path1."/sub_dir11";
+$sub_dir111 = $sub_dir11."/sub_dir111";
+$dir_path2 = $file_path."/dir_variation92";
+$sub_dir21 = $dir_path2."/sub_dir21";
+
+rmdir($sub_dir21);
+rmdir($sub_dir111);
+rmdir($sub_dir11);
+rmdir($dir_path1);
+rmdir($dir_path2);
+?>
+--EXPECTF--
+*** Testing dir() : checking with valid and invalid paths ***
+
+-- With valid paths --
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation91/sub_dir11/sub_dir111/.."
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation92/sub_dir21/../../dir_variation91"
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation92/sub_dir21/../../dir_variation91/sub_dir11/.."
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+object(Directory)#%d (2) {
+ ["path"]=>
+ string(%d) "%s/dir_variation91/sub_dir11/sub_dir111/../../../dir_variation92/sub_dir21/.."
+ ["handle"]=>
+ resource(%d) of type (stream)
+}
+
+-- With invalid paths --
+
+Warning: dir(%s/dir_variation91/sub_dir12/sub_dir111/..): failed to open dir: %s in %s on line %d
+bool(false)
+
+Warning: dir(%s/dir_variation92/sub_dir21/../dir_variation91): failed to open dir: %s in %s on line %d
+bool(false)
+
+Warning: dir(%s/dir_variation92/sub_dir21/../../dir_variation91/sub_dir12/..): failed to open dir: %s in %s on line %d
+bool(false)
+
+Warning: dir(%s/dir_variation91/sub_dir11/sub_dir111/../../dir_variation92/sub_dir21/..): failed to open dir: %s in %s on line %d
+bool(false)
+Done
diff --git a/ext/standard/tests/dir/getcwd_basic.phpt b/ext/standard/tests/dir/getcwd_basic.phpt
new file mode 100644
index 000000000..ef720d095
--- /dev/null
+++ b/ext/standard/tests/dir/getcwd_basic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test getcwd() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed getcwd(void)
+ * Description: Gets the current directory
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Test basic functionality of getcwd()
+ */
+
+echo "*** Testing getcwd() : basic functionality ***\n";
+
+//create temporary directory for test, removed in CLEAN section
+$directory = dirname(__FILE__) . "/getcwd_basic";
+mkdir($directory);
+
+var_dump(getcwd());
+chdir($directory);
+var_dump(getcwd());
+?>
+===DONE===
+--CLEAN--
+<?php
+$directory = dirname(__FILE__) . "/getcwd_basic";
+rmdir($directory);
+?>
+--EXPECTF--
+*** Testing getcwd() : basic functionality ***
+string(%d) "%s"
+string(%d) "%s%egetcwd_basic"
+===DONE===
diff --git a/ext/standard/tests/dir/getcwd_error.phpt b/ext/standard/tests/dir/getcwd_error.phpt
new file mode 100644
index 000000000..09ee25481
--- /dev/null
+++ b/ext/standard/tests/dir/getcwd_error.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Test getcwd() function : error conditions - Incorrect number of arguments
+--FILE--
+<?php
+/* Prototype : mixed getcwd(void)
+ * Description: Gets the current directory
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass incorrect number of arguments to getcwd() to test behaviour
+ */
+
+echo "*** Testing getcwd() : error conditions ***\n";
+
+// One argument
+echo "\n-- Testing getcwd() function with one argument --\n";
+$extra_arg = 10;
+var_dump( getcwd($extra_arg) );
+?>
+===DONE===
+--EXPECTF--
+*** Testing getcwd() : error conditions ***
+
+-- Testing getcwd() function with one argument --
+
+Warning: Wrong parameter count for getcwd() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_basic.phpt b/ext/standard/tests/dir/opendir_basic.phpt
new file mode 100644
index 000000000..17ada17ea
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_basic.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test opendir() function : basic functionality
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Test basic functionality of opendir() with absolute and relative paths as $path argument
+ */
+
+echo "*** Testing opendir() : basic functionality ***\n";
+
+$base_dir_path = dirname(__FILE__);
+
+$level_one_dir_name = "level_one";
+$level_one_dir_path = "$base_dir_path/$level_one_dir_name";
+
+$level_two_dir_name = "level_two";
+$level_two_dir_path = "$base_dir_path/$level_one_dir_name/$level_two_dir_name";
+
+// create temporary directories - will remove in CLEAN section
+mkdir($level_one_dir_path);
+mkdir($level_two_dir_path);
+
+echo "\n-- Testing opendir() with absolute path: --\n";
+var_dump($dh1 = opendir($level_one_dir_path));
+
+
+echo "\n-- Testing opendir() with relative paths: --\n";
+var_dump(chdir($level_one_dir_path));
+var_dump($dh2 = opendir($level_two_dir_name));
+
+echo "\n-- Close directory handles: --\n";
+closedir($dh1);
+var_dump($dh1);
+closedir($dh2);
+var_dump($dh2);
+?>
+===DONE===
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+rmdir("$file_path/level_one/level_two");
+rmdir("$file_path/level_one");
+?>
+--EXPECTF--
+*** Testing opendir() : basic functionality ***
+
+-- Testing opendir() with absolute path: --
+resource(%d) of type (stream)
+
+-- Testing opendir() with relative paths: --
+bool(true)
+resource(%d) of type (stream)
+
+-- Close directory handles: --
+resource(%d) of type (Unknown)
+resource(%d) of type (Unknown)
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_error1.phpt b/ext/standard/tests/dir/opendir_error1.phpt
new file mode 100644
index 000000000..92b8eee1b
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_error1.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test opendir() function : error conditions - Incorrect number of args
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass incorrect number of arguments to opendir() to test behaviour
+ */
+
+echo "*** Testing opendir() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing opendir() function with Zero arguments --\n";
+var_dump( opendir() );
+
+//Test opendir with one more than the expected number of arguments
+echo "\n-- Testing opendir() function with more than expected no. of arguments --\n";
+$path = dirname(__FILE__) . "/opendir_error";
+mkdir($path);
+$context = stream_context_create();
+
+$extra_arg = 10;
+var_dump( opendir($path, $context, $extra_arg) );
+?>
+===DONE===
+--CLEAN--
+<?php
+$path = dirname(__FILE__) . "/opendir_error";
+rmdir($path);
+?>
+--EXPECTF--
+*** Testing opendir() : error conditions ***
+
+-- Testing opendir() function with Zero arguments --
+
+Warning: opendir() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing opendir() function with more than expected no. of arguments --
+
+Warning: opendir() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_error2.phpt b/ext/standard/tests/dir/opendir_error2.phpt
new file mode 100644
index 000000000..0762be2ad
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_error2.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test opendir() function : error conditions - Non-existent directory
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass a non-existent directory as $path argument to opendir() to test behaviour
+ */
+
+echo "*** Testing opendir() : error conditions ***\n";
+
+echo "\n-- Pass a non-existent absolute path: --\n";
+$path = dirname(__FILE__) . "/idonotexist";
+var_dump(opendir($path));
+
+echo "\n-- Pass a non-existent relative path: --\n";
+chdir(dirname(__FILE__));
+var_dump(opendir('idonotexist'));
+?>
+===DONE===
+--EXPECTF--
+*** Testing opendir() : error conditions ***
+
+-- Pass a non-existent absolute path: --
+
+Warning: opendir(%s/idonotexist): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Pass a non-existent relative path: --
+
+Warning: opendir(idonotexist): failed to open dir: %s in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation1.phpt b/ext/standard/tests/dir/opendir_variation1.phpt
new file mode 100644
index 000000000..dc10356f5
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_variation1.phpt
@@ -0,0 +1,218 @@
+--TEST--
+Test opendir() function : usage variations - different data types as $path arg
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass different data types as $path argument to opendir() to test behaviour
+ * Where possible, an existing directory has been entered as a string value
+ */
+
+echo "*** Testing opendir() : usage variations ***\n";
+
+// create directory to be passed as string value where possible
+$path = dirname(__FILE__) . "/opendir_variation1";
+mkdir($path);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA {
+
+ var $path;
+ function __construct($path) {
+ $this->path = $path;
+ }
+ public function __toString() {
+ return $this->path;
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+$path
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $path argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "$path",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA($path),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of opendir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( $dh = opendir($input) );
+ if ($dh) {
+ closedir($dh);
+ }
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--CLEAN--
+<?php
+$path = dirname(__FILE__) . "/opendir_variation1";
+rmdir($path);
+?>
+--EXPECTF--
+*** Testing opendir() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: opendir(0): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: opendir(1): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: opendir(12345): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: opendir(-2345): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: opendir(10.5): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: opendir(-10.5): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: opendir(123456789000): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: opendir(1.23456789E-9): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: opendir(0.5): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+bool(false)
+
+-- Iteration 11 --
+bool(false)
+
+-- Iteration 12 --
+
+Warning: opendir(1): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+bool(false)
+
+-- Iteration 14 --
+
+Warning: opendir(1): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+bool(false)
+
+-- Iteration 16 --
+bool(false)
+
+-- Iteration 17 --
+bool(false)
+
+-- Iteration 18 --
+
+Warning: opendir() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 19 --
+resource(%d) of type (stream)
+
+-- Iteration 20 --
+
+Warning: opendir(string): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+resource(%d) of type (stream)
+
+-- Iteration 22 --
+resource(%d) of type (stream)
+
+-- Iteration 23 --
+bool(false)
+
+-- Iteration 24 --
+bool(false)
+
+-- Iteration 25 --
+
+Warning: opendir() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation2.phpt b/ext/standard/tests/dir/opendir_variation2.phpt
new file mode 100644
index 000000000..4236bec84
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_variation2.phpt
@@ -0,0 +1,239 @@
+--TEST--
+Test opendir() function : usage variations - different data types as $context arg
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass different data types as $context argument to opendir() to test behaviour
+ */
+
+echo "*** Testing opendir() : usage variation ***\n";
+
+
+// Initialise function arguments not being substituted (if any)
+// create temporary directory for test, removed in CLEAN section
+$path = dirname(__FILE__) . "/opendir_variation2";
+mkdir($path);
+
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString()
+ {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $context argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of opendir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump($dh = opendir($path, $input) );#
+ if ($dh) {
+ closedir($dh);
+ }
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--CLEAN--
+<?php
+$path = dirname(__FILE__) . "/opendir_variation2";
+rmdir($path);
+?>
+--EXPECTF--
+*** Testing opendir() : usage variation ***
+
+-- Iteration 1 --
+
+Warning: opendir() expects parameter 2 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: opendir() expects parameter 2 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: opendir() expects parameter 2 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: opendir() expects parameter 2 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: opendir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: opendir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: opendir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: opendir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: opendir() expects parameter 2 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: opendir() expects parameter 2 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: opendir() expects parameter 2 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: opendir() expects parameter 2 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: opendir() expects parameter 2 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: opendir() expects parameter 2 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: opendir() expects parameter 2 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: opendir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: opendir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: opendir() expects parameter 2 to be resource, array given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: opendir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: opendir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: opendir() expects parameter 2 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: opendir() expects parameter 2 to be resource, object given in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: opendir() expects parameter 2 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: opendir() expects parameter 2 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: opendir(): supplied resource is not a valid Stream-Context resource in %s on line %d
+resource(%d) of type (stream)
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation3.phpt b/ext/standard/tests/dir/opendir_variation3.phpt
new file mode 100644
index 000000000..3de0dd370
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_variation3.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Test opendir() function : usage variations - open a directory twice
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Call opendir() twice with the same directory as $path argument
+ */
+
+echo "*** Testing opendir() : usage variation ***\n";
+
+$path = dirname(__FILE__) . "/opendir_variation3";
+mkdir($path);
+
+echo "\n-- Open directory first time: --\n";
+var_dump($dh1 = opendir($path));
+
+echo "\n-- Open directory second time: --\n";
+var_dump($dh2 = opendir($path));
+
+if ($dh1 !== $dh2) {
+ echo "\nNew resource created\n";
+} else {
+ echo "\nNo new resource created\n";
+}
+
+closedir($dh1);
+closedir($dh2);
+?>
+===DONE===
+--CLEAN--
+<?php
+$path = dirname(__FILE__) . "/opendir_variation3";
+rmdir($path);
+?>
+--EXPECTF--
+*** Testing opendir() : usage variation ***
+
+-- Open directory first time: --
+resource(%d) of type (stream)
+
+-- Open directory second time: --
+resource(%d) of type (stream)
+
+New resource created
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation4.phpt b/ext/standard/tests/dir/opendir_variation4.phpt
new file mode 100644
index 000000000..b20641740
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_variation4.phpt
@@ -0,0 +1,107 @@
+--TEST--
+Test opendir() function : usage variations - different relative paths
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Test opendir() with different relative paths as $path argument
+ */
+
+echo "*** Testing opendir() : usage variation ***\n";
+
+$base_dir_path = dirname(__FILE__);
+
+$level_one_dir_name = "level_one";
+$level_one_dir_path = "$base_dir_path/$level_one_dir_name";
+
+$level_two_dir_name = "level_two";
+$level_two_dir_path = "$base_dir_path/$level_one_dir_name/$level_two_dir_name";
+
+// create directories
+mkdir($level_one_dir_path);
+mkdir($level_two_dir_path);
+
+echo "\n-- \$path = './level_one': --\n";
+var_dump(chdir($base_dir_path));
+var_dump($dh = opendir("./$level_one_dir_name"));
+clean_dh($dh);
+
+echo "\n-- \$path = 'level_one/level_two': --\n";
+var_dump(chdir($base_dir_path));
+var_dump($dh = opendir("$level_one_dir_name/$level_two_dir_name"));
+clean_dh($dh);
+
+echo "\n-- \$path = '..': --\n";
+var_dump($dh = opendir('..'));
+clean_dh($dh);
+
+echo "\n-- \$path = 'level_two', '.': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump($dh = opendir('.'));
+clean_dh($dh);
+
+echo "\n-- \$path = '../': --\n";
+var_dump($dh = opendir('../'));
+clean_dh($dh);
+
+echo "\n-- \$path = './': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump($dh = opendir('./'));
+clean_dh($dh);
+
+echo "\n-- \$path = '../../'level_one': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump($dh = opendir("../../$level_one_dir_name"));
+clean_dh($dh);
+
+/*
+ * function to remove directory handle before re-using variable name in test
+ * and to ensure directory is not in use at CLEAN section so can me removed
+ */
+function clean_dh($dh){
+ if (is_resource($dh)) {
+ closedir($dh);
+ }
+ unset($dh);
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+rmdir("$file_path/level_one/level_two");
+rmdir("$file_path/level_one");
+?>
+--EXPECTF--
+*** Testing opendir() : usage variation ***
+
+-- $path = './level_one': --
+bool(true)
+resource(%d) of type (stream)
+
+-- $path = 'level_one/level_two': --
+bool(true)
+resource(%d) of type (stream)
+
+-- $path = '..': --
+resource(%d) of type (stream)
+
+-- $path = 'level_two', '.': --
+bool(true)
+resource(%d) of type (stream)
+
+-- $path = '../': --
+resource(%d) of type (stream)
+
+-- $path = './': --
+bool(true)
+resource(%d) of type (stream)
+
+-- $path = '../../'level_one': --
+bool(true)
+resource(%d) of type (stream)
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation5.phpt b/ext/standard/tests/dir/opendir_variation5.phpt
new file mode 100644
index 000000000..f9bb38c68
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_variation5.phpt
@@ -0,0 +1,103 @@
+--TEST--
+Test opendir() function : usage variations - directories with restricted permissions
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not for Windows');
+}
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__)."/dir_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * remove the execute permission from the parent dir and test opendir() on child dir
+ * 1) remove write & execute permission from the 1st parent and test opendir()
+ * 2) remove execute permission from 2nd parent and test opendir()
+ */
+
+echo "*** Testing opendir() : usage variations ***\n";
+
+/* create the temporary directory :
+ * opendir_variation5 ( parent )
+ * |-> sub_dir ( sub parent )
+ * |-> child_dir ( child dir)
+ */
+
+$parent_dir_path = dirname(__FILE__) . "/opendir_variation5";
+mkdir($parent_dir_path);
+chmod($parent_dir_path, 0777);
+
+// create sub_dir
+$sub_dir_path = $parent_dir_path . "/sub_dir";
+mkdir($sub_dir_path);
+chmod($sub_dir_path, 0777);
+
+//create sub_sub_dir
+$child_dir_path = $sub_dir_path."/child_dir";
+mkdir($child_dir_path);
+
+// remove the write and execute permisson from sub parent
+chmod($sub_dir_path, 0444);
+
+echo "\n-- After restricting 1st level parent directory --\n";
+$dir_handle1 = opendir($child_dir_path);
+var_dump( $dir_handle1 );
+
+// remove the execute permisson from parent dir, allowing all permission for sub dir
+chmod($sub_dir_path, 0777); // all permisson to sub dir
+chmod($parent_dir_path, 0666); // restricting parent directory
+
+echo "\n-- After restricting parent directory --\n";
+$dir_handle2 = opendir($child_dir_path); // try to open, expected failure
+var_dump( $dir_handle2 ); // dump it
+
+if (is_resource($dir_handle1)) {
+ closedir($dir_handle1);
+}
+if (is_resource($dir_handle2)) {
+ closedir($dir_handle2);
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+$parent_dir_path = dirname(__FILE__) . "/opendir_variation5";
+$sub_dir_path = $parent_dir_path."/sub_dir";
+$child_dir_path = $sub_dir_path."/child_dir";
+
+// changing permissions for each temporary directory to delete them
+chmod($parent_dir_path, 0777);
+chmod($sub_dir_path, 0777);
+chmod($child_dir_path, 0777);
+
+rmdir($child_dir_path);
+rmdir($sub_dir_path);
+rmdir($parent_dir_path);
+?>
+
+--EXPECTF--
+*** Testing opendir() : usage variations ***
+
+-- After restricting 1st level parent directory --
+
+Warning: opendir(%s/opendir_variation5/sub_dir/child_dir): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- After restricting parent directory --
+
+Warning: opendir(%s/opendir_variation5/sub_dir/child_dir): failed to open dir: %s in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation6.phpt b/ext/standard/tests/dir/opendir_variation6.phpt
new file mode 100644
index 000000000..01e8225d5
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_variation6.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test opendir() function : usage variations - Different wildcards
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass paths containing wildcards to test if opendir() recognises them
+ */
+
+echo "*** Testing opendir() : usage variations ***\n";
+// create the temporary directories
+$file_path = dirname(__FILE__);
+$dir_path = $file_path . "/opendir_variation6";
+$sub_dir_path = $dir_path . "/sub_dir1";
+
+mkdir($dir_path);
+mkdir($sub_dir_path);
+
+// with different wildcard characters
+
+echo "\n-- Wildcard = '*' --\n";
+var_dump( opendir($file_path . "/opendir_var*") );
+var_dump( opendir($file_path . "/*") );
+
+echo "\n-- Wildcard = '?' --\n";
+var_dump( opendir($dir_path . "/sub_dir?") );
+var_dump( opendir($dir_path . "/sub?dir1") );
+
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . "/opendir_variation6";
+$sub_dir_path = $dir_path . "/sub_dir1";
+
+rmdir($sub_dir_path);
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing opendir() : usage variations ***
+
+-- Wildcard = '*' --
+
+Warning: opendir(%s/opendir_var*): failed to open dir: %s in %s on line %d
+bool(false)
+
+Warning: opendir(%s/*): failed to open dir: %s in %s on line %d
+bool(false)
+
+-- Wildcard = '?' --
+
+Warning: opendir(%s/opendir_variation6/sub_dir?): failed to open dir: %s in %s on line %d
+bool(false)
+
+Warning: opendir(%s/opendir_variation6/sub?dir1): failed to open dir: %s in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation7.phpt b/ext/standard/tests/dir/opendir_variation7.phpt
new file mode 100644
index 000000000..2ad41b1d3
--- /dev/null
+++ b/ext/standard/tests/dir/opendir_variation7.phpt
@@ -0,0 +1,127 @@
+--TEST--
+Test opendir() function : usage variations - different directory permissions
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not for Windows');
+}
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__) . "/opendir_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/* Prototype : mixed opendir(string $path[, resource $context])
+ * Description: Open a directory and return a dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Open a directory using opendir() with different directory permissions
+ */
+
+echo "*** Testing opendir() : usage variations ***\n";
+
+// create the temporary directory
+$file_path = dirname(__FILE__);
+$dir_path = $file_path . "/opendir_variation7";
+mkdir($dir_path);
+
+/* different values for directory permissions */
+$permission_values = array(
+/*1*/ 0477, // owner has read only, other and group has rwx
+ 0677, // owner has rw only, other and group has rwx
+
+/*3*/ 0444, // all have read only
+ 0666, // all have rw only
+
+/*5*/ 0400, // owner has read only, group and others have no permission
+ 0600, // owner has rw only, group and others have no permission
+
+/*7*/ 0470, // owner has read only, group has rwx & others have no permission
+ 0407, // owner has read only, other has rwx & group has no permission
+
+/*9*/ 0670, // owner has rw only, group has rwx & others have no permission
+/*10*/ 0607 // owner has rw only, group has no permission and others have rwx
+);
+
+// Open directory with different permission values, read and close, expected: none of them to succeed.
+
+$iterator = 1;
+foreach ($permission_values as $perm) {
+
+ echo "\n-- Iteration $iterator --\n";
+ // try to remove the dir if exists & create
+ if (is_dir($dir_path)){
+ chmod ($dir_path, 0777); // change dir permission to allow all operation
+ rmdir ($dir_path);
+ }
+ mkdir($dir_path);
+
+ // change the dir permisson to test dir on it
+ var_dump( chmod($dir_path, $perm) );
+
+ var_dump($dh = opendir($dir_path));
+
+ if (is_resource($dh)) {
+ closedir($dh);
+ }
+ $iterator++;
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+// deleting temporary directory
+$dir_path = dirname(__FILE__) . "/opendir_variation7";
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing opendir() : usage variations ***
+
+-- Iteration 1 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 2 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 3 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 4 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 5 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 6 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 7 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 8 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 9 --
+bool(true)
+resource(%d) of type (stream)
+
+-- Iteration 10 --
+bool(true)
+resource(%d) of type (stream)
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_basic.phpt b/ext/standard/tests/dir/readdir_basic.phpt
new file mode 100644
index 000000000..572a9a079
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_basic.phpt
@@ -0,0 +1,73 @@
+--TEST--
+Test readdir() function : basic functionality
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.C
+ */
+
+/*
+ * Test basic functionality of readdir()
+ */
+
+echo "*** Testing readdir() : basic functionality ***\n";
+
+// include the file.inc for Function: function create_files()
+chdir(dirname(__FILE__));
+include(dirname(__FILE__)."/../file/file.inc");
+
+$path = dirname(__FILE__) . '/readdir_basic';
+mkdir($path);
+create_files($path, 3);
+
+echo "\n-- Call readdir() with \$path argument --\n";
+var_dump($dh = opendir($path));
+$a = array();
+while( FALSE !== ($file = readdir($dh)) ) {
+ $a[] = $file;
+}
+sort($a);
+foreach($a as $file) {
+ var_dump($file);
+}
+
+echo "\n-- Call readdir() without \$path argument --\n";
+var_dump($dh = opendir($path));
+$a = array();
+while( FALSE !== ( $file = readdir() ) ) {
+ $a[] = $file;
+}
+sort($a);
+foreach($a as $file) {
+ var_dump($file);
+}
+
+delete_files($path, 3);
+closedir($dh);
+?>
+===DONE===
+--CLEAN--
+<?php
+$path = dirname(__FILE__) . '/readdir_basic';
+rmdir($path);
+?>
+--EXPECTF--
+*** Testing readdir() : basic functionality ***
+
+-- Call readdir() with $path argument --
+resource(%d) of type (stream)
+string(1) "."
+string(2) ".."
+string(9) "file1.tmp"
+string(9) "file2.tmp"
+string(9) "file3.tmp"
+
+-- Call readdir() without $path argument --
+resource(%d) of type (stream)
+string(1) "."
+string(2) ".."
+string(9) "file1.tmp"
+string(9) "file2.tmp"
+string(9) "file3.tmp"
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_error.phpt b/ext/standard/tests/dir/readdir_error.phpt
new file mode 100644
index 000000000..4b4011a13
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test readdir() function : error conditions - Incorrect number of args
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass incorrect number of arguments to readdir() to test behaviour
+ */
+
+echo "*** Testing readdir() : error conditions ***\n";
+
+
+//Test readdir with one more than the expected number of arguments
+echo "\n-- Testing readdir() function with more than expected no. of arguments --\n";
+
+$path = dirname(__FILE__) . "/readdir_error";
+mkdir($path);
+$dir_handle = opendir($path);
+$extra_arg = 10;
+
+var_dump( readdir($dir_handle, $extra_arg) );
+
+// close the handle so can remove dir in CLEAN section
+closedir($dir_handle);
+?>
+===DONE===
+--CLEAN--
+<?php
+$path = dirname(__FILE__) . "/readdir_error";
+rmdir($path);
+?>
+--EXPECTF--
+*** Testing readdir() : error conditions ***
+
+-- Testing readdir() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for readdir() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation1.phpt b/ext/standard/tests/dir/readdir_variation1.phpt
new file mode 100644
index 000000000..b9cd85b28
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_variation1.phpt
@@ -0,0 +1,210 @@
+--TEST--
+Test readdir() function : usage variations - different data types as $dir_handle arg
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass different data types as $dir_handle argument to readdir() to test behaviour
+ */
+
+echo "*** Testing readdir() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed to $dir_handle argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+);
+
+// loop through each element of $inputs to check the behavior of readdir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( readdir($input) );
+ $iterator++;
+};
+?>
+===DONE===
+--EXPECTF--
+*** Testing readdir() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: readdir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation2.phpt b/ext/standard/tests/dir/readdir_variation2.phpt
new file mode 100644
index 000000000..6809ac2f2
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_variation2.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test readdir() function : usage variations - empty directories
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass readdir() a directory handle pointing to an empty directory to test behaviour
+ */
+
+echo "*** Testing readdir() : usage variations ***\n";
+
+$path = dirname(__FILE__) . '/readdir_variation2';
+mkdir($path);
+$dir_handle = opendir($path);
+
+echo "\n-- Pass an empty directory to readdir() --\n";
+while(FALSE !== ($file = readdir($dir_handle))){
+ var_dump($file);
+}
+
+closedir($dir_handle);
+?>
+===DONE===
+--CLEAN--
+<?php
+$path = dirname(__FILE__) . '/readdir_variation2';
+rmdir($path);
+?>
+--EXPECTF--
+*** Testing readdir() : usage variations ***
+
+-- Pass an empty directory to readdir() --
+string(1) "."
+string(2) ".."
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation3.phpt b/ext/standard/tests/dir/readdir_variation3.phpt
new file mode 100644
index 000000000..a598462e3
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_variation3.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Test readdir() function : usage variations - sub-directories
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass a directory handle pointing to a directory that has a sub-directory
+ * to test behaviour of readdir()
+ */
+
+echo "*** Testing readdir() : usage variations ***\n";
+
+// include the file.inc for Function: function create_files()
+chdir(dirname(__FILE__));
+include(dirname(__FILE__)."/../file/file.inc");
+
+$path_top = dirname(__FILE__) . '/readdir_variation3';
+$path_sub = $path_top . '/sub_folder';
+mkdir($path_top);
+mkdir($path_sub);
+
+create_files($path_top, 2);
+create_files($path_sub, 2);
+
+$dir_handle = opendir($path_top);
+$contents = array();
+while(FALSE !== ($file = readdir($dir_handle))) {
+ // different OS order files differently so will
+ // store file names into an array so can use sorted in expected output
+ $contents[] = $file;
+}
+
+// more important to check that all contents are present than order they are returned in
+sort($contents);
+var_dump($contents);
+
+delete_files($path_top, 2);
+delete_files($path_sub, 2);
+
+closedir($dir_handle);
+?>
+===DONE===
+--CLEAN--
+<?php
+$path_top = dirname(__FILE__) . '/readdir_variation3';
+$path_sub = $path_top . '/sub_folder';
+rmdir($path_sub);
+rmdir($path_top);
+?>
+--EXPECTF--
+*** Testing readdir() : usage variations ***
+array(5) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(9) "file1.tmp"
+ [3]=>
+ string(9) "file2.tmp"
+ [4]=>
+ string(10) "sub_folder"
+}
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation4.phpt b/ext/standard/tests/dir/readdir_variation4.phpt
new file mode 100644
index 000000000..770cdf6b0
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_variation4.phpt
@@ -0,0 +1,179 @@
+--TEST--
+Test readdir() function : usage variations - different file names
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass a directory handle pointing to a directory that contains
+ * files with different file names to test how readdir() reads them
+ */
+
+echo "*** Testing readdir() : usage variations ***\n";
+
+$dir_path = dirname(__FILE__) . "/readdir_variation4/";
+mkdir($dir_path);
+
+// heredoc string
+$heredoc = <<<EOT
+hd_file
+EOT;
+
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // empty data
+/*10*/ "",
+ array(),
+
+ // string data
+/*12*/ "double_file",
+ 'single_file',
+ $heredoc,
+);
+
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator --\n";
+ $handle = "fp{$iterator}";
+ var_dump( $$handle = fopen($dir_path . $input . '.tmp', 'w') );
+ var_dump( fwrite($$handle, $key));
+ fclose($$handle);
+ $iterator++;
+};
+
+echo "\n-- Call to readdir() --\n";
+$dir_handle = opendir($dir_path);
+$contents = array();
+while(FALSE !== ($file = readdir($dir_handle))){
+
+ // different OS order files differently so will
+ // store file names into an array so can use sorted in expected output
+ $contents[] = $file;
+
+ // remove files while going through directory
+ @unlink($dir_path . $file);
+}
+
+// more important to check that all contents are present than order they are returned in
+sort($contents);
+var_dump($contents);
+
+closedir($dir_handle);
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . "/readdir_variation4/";
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing readdir() : usage variations ***
+
+-- Iteration 1 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 2 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 3 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 4 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 5 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 6 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 7 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 8 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 9 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 10 --
+resource(%d) of type (stream)
+int(1)
+
+-- Iteration 11 --
+resource(%d) of type (stream)
+int(2)
+
+-- Iteration 12 --
+resource(%d) of type (stream)
+int(2)
+
+-- Iteration 13 --
+resource(%d) of type (stream)
+int(2)
+
+-- Iteration 14 --
+resource(%d) of type (stream)
+int(2)
+
+-- Call to readdir() --
+array(16) {
+ [0]=>
+ string(9) "-10.5.tmp"
+ [1]=>
+ string(9) "-2345.tmp"
+ [2]=>
+ string(1) "."
+ [3]=>
+ string(2) ".."
+ [4]=>
+ string(4) ".tmp"
+ [5]=>
+ string(7) "0.5.tmp"
+ [6]=>
+ string(5) "0.tmp"
+ [7]=>
+ string(17) "1.23456789E-9.tmp"
+ [8]=>
+ string(5) "1.tmp"
+ [9]=>
+ string(8) "10.5.tmp"
+ [10]=>
+ string(9) "12345.tmp"
+ [11]=>
+ string(16) "123456789000.tmp"
+ [12]=>
+ string(9) "Array.tmp"
+ [13]=>
+ string(15) "double_file.tmp"
+ [14]=>
+ string(11) "hd_file.tmp"
+ [15]=>
+ string(15) "single_file.tmp"
+}
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation5.phpt b/ext/standard/tests/dir/readdir_variation5.phpt
new file mode 100644
index 000000000..8c12f13df
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_variation5.phpt
@@ -0,0 +1,144 @@
+--TEST--
+Test readdir() function : usage variations - different permissions
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not for Windows');
+}
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__)."/readdir_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Open a directory with different premissions then try to read it
+ * to test behaviour of readdir()
+ */
+
+echo "*** Testing readdir() : usage variations ***\n";
+
+// create the temporary directory
+$dir_path = dirname(__FILE__) . "/readdir_variation5";
+mkdir($dir_path);
+
+/* different values for directory permissions */
+$permission_values = array(
+/*1*/ 0477, // owner has read only, other and group has rwx
+ 0677, // owner has rw only, other and group has rwx
+
+/*3*/ 0444, // all have read only
+ 0666, // all have rw only
+
+/*5*/ 0400, // owner has read only, group and others have no permission
+ 0600, // owner has rw only, group and others have no permission
+
+/*7*/ 0470, // owner has read only, group has rwx & others have no permission
+ 0407, // owner has read only, other has rwx & group has no permission
+
+/*9*/ 0670, // owner has rw only, group has rwx & others have no permission
+/*10*/ 0607 // owner has rw only, group has no permission and others have rwx
+);
+
+// Open directory with different permission values, read and close, expected: none of them to succeed.
+$iterator = 1;
+foreach($permission_values as $perm) {
+ echo "\n-- Iteration $iterator --\n";
+
+ if (is_dir($dir_path)) {
+ chmod ($dir_path, 0777); // change dir permission to allow all operation
+ rmdir ($dir_path);
+ }
+ mkdir($dir_path);
+
+ // change the dir permisson to test dir on it
+ var_dump( chmod($dir_path, $perm) );
+ var_dump($dh = opendir($dir_path));
+
+ echo "-- Calling readdir() --\n";
+ var_dump(readdir($dh));
+
+ closedir($dh);
+ $iterator++;
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . "/readdir_variation5";
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing readdir() : usage variations ***
+
+-- Iteration 1 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 2 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 3 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 4 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 5 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 6 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 7 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 8 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 9 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+
+-- Iteration 10 --
+bool(true)
+resource(%d) of type (stream)
+-- Calling readdir() --
+string(%d) "%s"
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation6.phpt b/ext/standard/tests/dir/readdir_variation6.phpt
new file mode 100644
index 000000000..eec673e73
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_variation6.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Test readdir() function : usage variations - operate on previously opened directory
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Open two directory handles on the same directory and pass both
+ * to readdir() to test behaviour
+ */
+
+echo "*** Testing readdir() : usage variations ***\n";
+
+// include the file.inc for Function: function create_files()
+include( dirname(__FILE__)."/../file/file.inc");
+
+// create the temporary directory
+$dir_path = dirname(__FILE__) . "/readdir_variation6";
+mkdir($dir_path);
+
+// create files within the temporary directory
+create_files($dir_path, 3, "alphanumeric", 0755, 1, "w", "readdir_variation6");
+
+// open the directory
+$dir_handle1 = opendir($dir_path);
+
+// open the same directory again without closing it
+opendir($dir_path);
+
+echo "\n-- Reading Directory Contents with Previous Handle --\n";
+$a = array();
+while (FALSE !== ($file = readdir($dir_handle1))) {
+ $a[] = $file;
+}
+sort($a);
+foreach ($a as $file) {
+ var_dump($file);
+}
+
+echo "\n-- Reading Directory Contents with Current Handle (no arguments supplied) --\n";
+$a = array();
+while (FALSE !== ($file = readdir())) {
+ $a[] = $file;
+}
+sort($a);
+foreach ($a as $file) {
+ var_dump($file);
+}
+
+// delete temporary files
+delete_files($dir_path, 3, "readdir_variation6");
+closedir($dir_handle1);
+closedir();
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . "/readdir_variation6";
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing readdir() : usage variations ***
+
+-- Reading Directory Contents with Previous Handle --
+string(1) "."
+string(2) ".."
+string(23) "readdir_variation61.tmp"
+string(23) "readdir_variation62.tmp"
+string(23) "readdir_variation63.tmp"
+
+-- Reading Directory Contents with Current Handle (no arguments supplied) --
+string(1) "."
+string(2) ".."
+string(23) "readdir_variation61.tmp"
+string(23) "readdir_variation62.tmp"
+string(23) "readdir_variation63.tmp"
+===DONE===
diff --git a/ext/standard/tests/dir/readdir_variation7.phpt b/ext/standard/tests/dir/readdir_variation7.phpt
new file mode 100644
index 000000000..86bd43061
--- /dev/null
+++ b/ext/standard/tests/dir/readdir_variation7.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test readdir() function : usage variations - use file pointers
+--FILE--
+<?php
+/* Prototype : string readdir([resource $dir_handle])
+ * Description: Read directory entry from dir_handle
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Open a file pointer using fopen and pass to readdir() to test behaviour
+ */
+
+echo "*** Testing readdir() : usage variations ***\n";
+
+// get a resource variable
+var_dump($fp = fopen(__FILE__, "r"));
+var_dump( readdir($fp) );
+
+// get file length over 256 characters
+<<<EOT
+123456789012345678901234567890
+123456789012345678901234567890
+123456789012345678901234567890
+123456789012345678901234567890
+123456789012345678901234567890
+EOT;
+?>
+===DONE===
+--EXPECTF--
+*** Testing readdir() : usage variations ***
+resource(%d) of type (stream)
+
+Warning: readdir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/rewinddir_basic.phpt b/ext/standard/tests/dir/rewinddir_basic.phpt
new file mode 100644
index 000000000..e9c027818
--- /dev/null
+++ b/ext/standard/tests/dir/rewinddir_basic.phpt
@@ -0,0 +1,94 @@
+--TEST--
+Test rewinddir() function : basic functionality
+--FILE--
+<?php
+/* Prototype : void rewinddir([resource $dir_handle])
+ * Description: Rewind dir_handle back to the start
+ * Source code: ext/standard/dir.c
+ * Alias to functions: rewind
+ */
+
+/*
+ * Test basic functionality of rewinddir()
+ */
+
+echo "*** Testing rewinddir() : basic functionality ***\n";
+
+// include file.inc for create_files function
+include(dirname(__FILE__) . "/../file/file.inc");
+
+$dir_path1 = dirname(__FILE__) . "/rewinddir_basic_dir1";
+$dir_path2 = dirname(__FILE__) . "/rewinddir_basic_dir2";
+mkdir($dir_path1);
+mkdir($dir_path2);
+
+@create_files($dir_path1, 1);
+@create_files($dir_path2, 1, 'numeric', 0755, 1, 'w', 'file', 2);
+var_dump($dh1 = opendir($dir_path1));
+var_dump($dh2 = opendir($dir_path2));
+
+$data = array();
+echo "\n-- Read and rewind first directory (argument supplied) --\n";
+while(FALSE !== $file1 = readdir($dh1)) {
+ $data[] = $file1;
+}
+sort($data);
+var_dump($data);
+
+var_dump(rewinddir($dh1));
+var_dump(readdir($dh1));
+
+$data = array();
+echo "\n-- Read and rewind second directory (no argument supplied) --\n";
+while(FALSE !== $file2 = readdir()) {
+ $data[] = $file2;
+}
+sort($data);
+var_dump($data);
+
+var_dump(rewinddir());
+var_dump(readdir());
+
+closedir($dh1);
+closedir($dh2);
+
+delete_files($dir_path1, 1);
+delete_files($dir_path2, 1, 'file', 2);
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path1 = dirname(__FILE__) . "/rewinddir_basic_dir1";
+$dir_path2 = dirname(__FILE__) . "/rewinddir_basic_dir2";
+rmdir($dir_path1);
+rmdir($dir_path2);
+?>
+--EXPECTF--
+*** Testing rewinddir() : basic functionality ***
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+
+-- Read and rewind first directory (argument supplied) --
+array(3) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(9) "file1.tmp"
+}
+NULL
+string(1) "."
+
+-- Read and rewind second directory (no argument supplied) --
+array(3) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(9) "file2.tmp"
+}
+NULL
+string(1) "."
+===DONE===
diff --git a/ext/standard/tests/dir/rewinddir_error.phpt b/ext/standard/tests/dir/rewinddir_error.phpt
new file mode 100644
index 000000000..d66b24b93
--- /dev/null
+++ b/ext/standard/tests/dir/rewinddir_error.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test rewinddir() function : error conditions - incorrect number of args
+--FILE--
+<?php
+/* Prototype : void rewinddir([resource $dir_handle])
+ * Description: Rewind dir_handle back to the start
+ * Source code: ext/standard/dir.c
+ * Alias to functions: rewind
+ */
+
+/*
+ * Pass incorrect number of arguments to rewinddir() to test behaviour
+ */
+
+echo "*** Testing rewinddir() : error conditions ***\n";
+
+
+//Test rewinddir with one more than the expected number of arguments
+echo "\n-- Testing rewinddir() function with more than expected no. of arguments --\n";
+
+$dir_path = dirname(__FILE__) . "/rewinddir_error";
+mkdir($dir_path);
+$dir_handle = opendir($dir_path);
+$extra_arg = 10;
+
+var_dump( rewinddir($dir_handle, $extra_arg) );
+closedir($dir_handle);
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . "/rewinddir_error";
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing rewinddir() : error conditions ***
+
+-- Testing rewinddir() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for rewinddir() in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/rewinddir_variation1.phpt b/ext/standard/tests/dir/rewinddir_variation1.phpt
new file mode 100644
index 000000000..e1fa002c1
--- /dev/null
+++ b/ext/standard/tests/dir/rewinddir_variation1.phpt
@@ -0,0 +1,211 @@
+--TEST--
+Test rewinddir() function : usage variations - different data types as $dir_handle arg
+--FILE--
+<?php
+/* Prototype : void rewinddir([resource $dir_handle])
+ * Description: Rewind dir_handle back to the start
+ * Source code: ext/standard/dir.c
+ * Alias to functions: rewind
+ */
+
+/*
+ * Pass different data types as $dir_handle argument to rewinddir() to test behaviour
+ */
+
+echo "*** Testing rewinddir() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// unexpected values to be passed to $dir_handle argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+);
+
+// loop through each element of $inputs to check the behavior of rewinddir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( rewinddir($input) );
+ $iterator++;
+};
+?>
+===DONE===
+--EXPECTF--
+*** Testing rewinddir() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 19 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: rewinddir(): supplied argument is not a valid Directory resource in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/rewinddir_variation2.phpt b/ext/standard/tests/dir/rewinddir_variation2.phpt
new file mode 100644
index 000000000..37ff324ee
--- /dev/null
+++ b/ext/standard/tests/dir/rewinddir_variation2.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test rewinddir() function : usage variations - operate on a closed directory
+--FILE--
+<?php
+/* Prototype : void rewinddir([resource $dir_handle])
+ * Description: Rewind dir_handle back to the start
+ * Source code: ext/standard/dir.c
+ * Alias to functions: rewind
+ */
+
+/*
+ * Open and close a directory handle then call rewinddir() to test behaviour
+ */
+
+echo "*** Testing rewinddir() : usage variations ***\n";
+
+$dir_path = dirname(__FILE__) . '/rewinddir_variation2';
+mkdir($dir_path);
+
+echo "\n-- Create the directory handle, read and close the directory --\n";
+var_dump($dir_handle = opendir($dir_path));
+var_dump(readdir($dir_handle));
+closedir($dir_handle);
+
+echo "\n-- Call to rewinddir() --\n";
+var_dump(rewinddir($dir_handle));
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . '/rewinddir_variation2';
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing rewinddir() : usage variations ***
+
+-- Create the directory handle, read and close the directory --
+resource(%d) of type (stream)
+string(1) "."
+
+-- Call to rewinddir() --
+
+Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/rewinddir_variation3.phpt b/ext/standard/tests/dir/rewinddir_variation3.phpt
new file mode 100644
index 000000000..2a2af89e6
--- /dev/null
+++ b/ext/standard/tests/dir/rewinddir_variation3.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test rewinddir() function : usage variations - file pointers
+--FILE--
+<?php
+/* Prototype : void rewinddir([resource $dir_handle])
+ * Description: Rewind dir_handle back to the start
+ * Source code: ext/standard/dir.c
+ * Alias to functions: rewind
+ */
+
+/*
+ * Pass a file pointer to rewinddir() to test behaviour
+ */
+
+echo "*** Testing rewinddir() : usage variations ***\n";
+
+echo "\n-- Open a file using fopen --\n";
+var_dump($fp = fopen(__FILE__, 'r'));
+
+$result1 = fread($fp, 5);
+var_dump(rewinddir($fp));
+$result2 = fread($fp, 5);
+
+echo "\n-- Check if rewinddir() has repositioned the file pointer --\n";
+if ($result1 === $result2) {
+ echo "rewinddir() works on file pointers\n";
+} else {
+ echo "rewinddir() does not work on file pointers\n";
+}
+?>
+===DONE===
+--EXPECTF--
+*** Testing rewinddir() : usage variations ***
+
+-- Open a file using fopen --
+resource(%d) of type (stream)
+
+Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
+
+-- Check if rewinddir() has repositioned the file pointer --
+rewinddir() does not work on file pointers
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_basic.phpt b/ext/standard/tests/dir/scandir_basic.phpt
new file mode 100644
index 000000000..25700a7a4
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_basic.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test scandir() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Test basic functionality of scandir()
+ */
+
+echo "*** Testing scandir() : basic functionality ***\n";
+
+// include file.inc for create_files function
+include (dirname(__FILE__) . '/../file/file.inc');
+
+// set up directory
+$directory = dirname(__FILE__) . '/scandir_basic';
+mkdir($directory);
+create_files($directory, 3);
+
+echo "\n-- scandir() with mandatory arguments --\n";
+var_dump(scandir($directory));
+
+echo "\n-- scandir() with all arguments --\n";
+$sorting_order = 1;
+$context = stream_context_create();
+var_dump(scandir($directory, $sorting_order, $context));
+
+delete_files($directory, 3);
+?>
+===DONE===
+--CLEAN--
+<?php
+$directory = dirname(__FILE__) . '/scandir_basic';
+rmdir($directory);
+?>
+--EXPECTF--
+*** Testing scandir() : basic functionality ***
+
+-- scandir() with mandatory arguments --
+array(5) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(9) "file1.tmp"
+ [3]=>
+ string(9) "file2.tmp"
+ [4]=>
+ string(9) "file3.tmp"
+}
+
+-- scandir() with all arguments --
+array(5) {
+ [0]=>
+ string(9) "file3.tmp"
+ [1]=>
+ string(9) "file2.tmp"
+ [2]=>
+ string(9) "file1.tmp"
+ [3]=>
+ string(2) ".."
+ [4]=>
+ string(1) "."
+}
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_error1.phpt b/ext/standard/tests/dir/scandir_error1.phpt
new file mode 100644
index 000000000..7fbffba0c
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_error1.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test scandir() function : error conditions - Incorrect number of args
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass incorrect number of arguments to scandir() to test behaviour
+ */
+
+echo "*** Testing scandir() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing scandir() function with Zero arguments --\n";
+var_dump( scandir() );
+
+//Test scandir with one more than the expected number of arguments
+echo "\n-- Testing scandir() function with more than expected no. of arguments --\n";
+$dir = dirname(__FILE__) . '/scandir_error';
+mkdir($dir);
+$sorting_order = 10;
+$context = stream_context_create();
+$extra_arg = 10;
+var_dump( scandir($dir, $sorting_order, $context, $extra_arg) );
+?>
+===DONE===
+--CLEAN--
+<?php
+$directory = dirname(__FILE__) . '/scandir_error';
+rmdir($directory);
+?>
+--EXPECTF--
+*** Testing scandir() : error conditions ***
+
+-- Testing scandir() function with Zero arguments --
+
+Warning: scandir() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing scandir() function with more than expected no. of arguments --
+
+Warning: scandir() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_error2.phpt b/ext/standard/tests/dir/scandir_error2.phpt
new file mode 100644
index 000000000..1e99a578a
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_error2.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test scandir() function : error conditions - Non-existent directory
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass a directory that does not exist to scandir() to test error messages
+ */
+
+echo "*** Testing scandir() : error conditions ***\n";
+
+$directory = dirname(__FILE__) . '/idonotexist';
+
+echo "\n-- Pass scandir() an absolute path that does not exist --\n";
+var_dump(scandir($directory));
+
+echo "\n-- Pass scandir() a relative path that does not exist --\n";
+var_dump(scandir('/idonotexist'));
+?>
+===DONE===
+--EXPECTF--
+*** Testing scandir() : error conditions ***
+
+-- Pass scandir() an absolute path that does not exist --
+
+Warning: scandir(%s/idonotexist): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Pass scandir() a relative path that does not exist --
+
+Warning: scandir(/idonotexist): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation1.phpt b/ext/standard/tests/dir/scandir_variation1.phpt
new file mode 100644
index 000000000..84b3565f7
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation1.phpt
@@ -0,0 +1,253 @@
+--TEST--
+Test scandir() function : usage variations - different data types as $dir arg
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass different data types as $dir argument to test behaviour of scandir()
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $dir argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of scandir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( scandir($input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: scandir(0): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 2 --
+
+Warning: scandir(1): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 3 --
+
+Warning: scandir(12345): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 4 --
+
+Warning: scandir(-2345): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 5 --
+
+Warning: scandir(10.5): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 6 --
+
+Warning: scandir(-10.5): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 7 --
+
+Warning: scandir(123456789000): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 8 --
+
+Warning: scandir(1.23456789E-9): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 9 --
+
+Warning: scandir(0.5): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 10 --
+
+Warning: scandir(): Directory name cannot be empty in %s on line %d
+bool(false)
+
+-- Iteration 11 --
+
+Warning: scandir(): Directory name cannot be empty in %s on line %d
+bool(false)
+
+-- Iteration 12 --
+
+Warning: scandir(1): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 13 --
+
+Warning: scandir(): Directory name cannot be empty in %s on line %d
+bool(false)
+
+-- Iteration 14 --
+
+Warning: scandir(1): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 15 --
+
+Warning: scandir(): Directory name cannot be empty in %s on line %d
+bool(false)
+
+-- Iteration 16 --
+
+Warning: scandir(): Directory name cannot be empty in %s on line %d
+bool(false)
+
+-- Iteration 17 --
+
+Warning: scandir(): Directory name cannot be empty in %s on line %d
+bool(false)
+
+-- Iteration 18 --
+
+Warning: scandir() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: scandir(string): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 20 --
+
+Warning: scandir(string): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 21 --
+
+Warning: scandir(hello world): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 22 --
+
+Warning: scandir(Class A object): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Iteration 23 --
+
+Warning: scandir(): Directory name cannot be empty in %s on line %d
+bool(false)
+
+-- Iteration 24 --
+
+Warning: scandir(): Directory name cannot be empty in %s on line %d
+bool(false)
+
+-- Iteration 25 --
+
+Warning: scandir() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation2.phpt b/ext/standard/tests/dir/scandir_variation2.phpt
new file mode 100644
index 000000000..e6033f256
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation2.phpt
@@ -0,0 +1,283 @@
+--TEST--
+Test scandir() function : usage variations - diff data types as $sorting_order arg
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass different data types as $sorting_order argument to test how scandir() behaves
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$dir = dirname(__FILE__) . '/scandir_variation2';
+mkdir($dir);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $sorting_order argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of scandir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( scandir($dir, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir = dirname(__FILE__) . '/scandir_variation2';
+rmdir($dir);
+?>
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+
+-- Iteration 1 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 2 --
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "."
+}
+
+-- Iteration 3 --
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "."
+}
+
+-- Iteration 4 --
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "."
+}
+
+-- Iteration 5 --
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "."
+}
+
+-- Iteration 6 --
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "."
+}
+
+-- Iteration 7 --
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "."
+}
+
+-- Iteration 8 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 9 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 10 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 11 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 12 --
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "."
+}
+
+-- Iteration 13 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 14 --
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "."
+}
+
+-- Iteration 15 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 16 --
+
+Warning: scandir() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: scandir() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: scandir() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: scandir() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: scandir() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: scandir() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: scandir() expects parameter 2 to be long, object given in %s on line %d
+NULL
+
+-- Iteration 23 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 24 --
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 25 --
+
+Warning: scandir() expects parameter 2 to be long, resource given in %s on line %d
+NULL
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation3.phpt b/ext/standard/tests/dir/scandir_variation3.phpt
new file mode 100644
index 000000000..8e23faf2d
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation3.phpt
@@ -0,0 +1,238 @@
+--TEST--
+Test scandir() function : usage variations - diff data types as $context arg
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass different data types as $context argument to test how scandir() behaves
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+// Initialise function arguments not being substituted
+$dir = dirname(__FILE__) . '/scandir_variation3';
+mkdir($dir);
+$sorting_order = 0;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// unexpected values to be passed to $context argument
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // null data
+/*10*/ NULL,
+ null,
+
+ // boolean data
+/*12*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+/*16*/ "",
+ '',
+ array(),
+
+ // string data
+/*19*/ "string",
+ 'string',
+ $heredoc,
+
+ // object data
+/*22*/ new classA(),
+
+ // undefined data
+/*23*/ @$undefined_var,
+
+ // unset data
+/*24*/ @$unset_var,
+
+ // resource variable
+/*25*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of scandir()
+$iterator = 1;
+foreach($inputs as $input) {
+ echo "\n-- Iteration $iterator --\n";
+ var_dump( scandir($dir, $sorting_order, $input) );
+ $iterator++;
+};
+
+fclose($fp);
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir = dirname(__FILE__) . '/scandir_variation3';
+rmdir($dir);
+?>
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: scandir() expects parameter 3 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: scandir() expects parameter 3 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: scandir() expects parameter 3 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 4 --
+
+Warning: scandir() expects parameter 3 to be resource, integer given in %s on line %d
+NULL
+
+-- Iteration 5 --
+
+Warning: scandir() expects parameter 3 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 6 --
+
+Warning: scandir() expects parameter 3 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: scandir() expects parameter 3 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 8 --
+
+Warning: scandir() expects parameter 3 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 9 --
+
+Warning: scandir() expects parameter 3 to be resource, double given in %s on line %d
+NULL
+
+-- Iteration 10 --
+
+Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: scandir() expects parameter 3 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: scandir() expects parameter 3 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: scandir() expects parameter 3 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: scandir() expects parameter 3 to be resource, boolean given in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: scandir() expects parameter 3 to be resource, array given in %s on line %d
+NULL
+
+-- Iteration 19 --
+
+Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 20 --
+
+Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 21 --
+
+Warning: scandir() expects parameter 3 to be resource, string given in %s on line %d
+NULL
+
+-- Iteration 22 --
+
+Warning: scandir() expects parameter 3 to be resource, object given in %s on line %d
+NULL
+
+-- Iteration 23 --
+
+Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 24 --
+
+Warning: scandir() expects parameter 3 to be resource, null given in %s on line %d
+NULL
+
+-- Iteration 25 --
+
+Warning: scandir(): supplied resource is not a valid Stream-Context resource in %s on line %d
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation4.phpt b/ext/standard/tests/dir/scandir_variation4.phpt
new file mode 100644
index 000000000..f756cf1ee
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation4.phpt
@@ -0,0 +1,169 @@
+--TEST--
+Test scandir() function : usage variations - different relative paths
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Test scandir() with relative paths as $dir argument
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+// include for create_files/delete_files functions
+include (dirname(__FILE__) . '/../file/file.inc');
+
+$base_dir_path = dirname(__FILE__);
+
+$level_one_dir_path = "$base_dir_path/level_one";
+$level_two_dir_path = "$level_one_dir_path/level_two";
+
+// create directories and files
+mkdir($level_one_dir_path);
+create_files($level_one_dir_path, 2, 'numeric', 0755, 1, 'w', 'level_one', 1);
+mkdir($level_two_dir_path);
+create_files($level_two_dir_path, 2, 'numeric', 0755, 1, 'w', 'level_two', 1);
+
+echo "\n-- \$path = './level_one': --\n";
+var_dump(chdir($base_dir_path));
+var_dump(scandir('./level_one'));
+
+echo "\n-- \$path = 'level_one/level_two': --\n";
+var_dump(chdir($base_dir_path));
+var_dump(scandir('level_one/level_two'));
+
+echo "\n-- \$path = '..': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump(scandir('..'));
+
+echo "\n-- \$path = 'level_two', '.': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump(scandir('.'));
+
+echo "\n-- \$path = '../': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump(scandir('../'));
+
+echo "\n-- \$path = './': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump(scandir('./'));
+
+echo "\n-- \$path = '../../'level_one': --\n";
+var_dump(chdir($level_two_dir_path));
+var_dump(scandir('../../level_one'));
+
+@delete_files($level_one_dir_path, 2, 'level_one');
+@delete_files($level_two_dir_path, 2, 'level_two');
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__);
+rmdir("$dir_path/level_one/level_two");
+rmdir("$dir_path/level_one");
+?>
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+
+-- $path = './level_one': --
+bool(true)
+array(5) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(14) "level_one1.tmp"
+ [3]=>
+ string(14) "level_one2.tmp"
+ [4]=>
+ string(9) "level_two"
+}
+
+-- $path = 'level_one/level_two': --
+bool(true)
+array(4) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(14) "level_two1.tmp"
+ [3]=>
+ string(14) "level_two2.tmp"
+}
+
+-- $path = '..': --
+bool(true)
+array(5) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(14) "level_one1.tmp"
+ [3]=>
+ string(14) "level_one2.tmp"
+ [4]=>
+ string(9) "level_two"
+}
+
+-- $path = 'level_two', '.': --
+bool(true)
+array(4) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(14) "level_two1.tmp"
+ [3]=>
+ string(14) "level_two2.tmp"
+}
+
+-- $path = '../': --
+bool(true)
+array(5) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(14) "level_one1.tmp"
+ [3]=>
+ string(14) "level_one2.tmp"
+ [4]=>
+ string(9) "level_two"
+}
+
+-- $path = './': --
+bool(true)
+array(4) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(14) "level_two1.tmp"
+ [3]=>
+ string(14) "level_two2.tmp"
+}
+
+-- $path = '../../'level_one': --
+bool(true)
+array(5) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(14) "level_one1.tmp"
+ [3]=>
+ string(14) "level_one2.tmp"
+ [4]=>
+ string(9) "level_two"
+}
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation5.phpt b/ext/standard/tests/dir/scandir_variation5.phpt
new file mode 100644
index 000000000..d6d3c79e4
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation5.phpt
@@ -0,0 +1,98 @@
+--TEST--
+Test scandir() function : usage variations - different directory permissions
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not for Windows');
+}
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__)."/dir_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * remove the execute permission from the parent dir and test scandir() on child dir
+ * 1. remove write & execute permission from the 1st parent and test scandir()
+ * 2. remove execute permission from 2nd parent and test scandir()
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+/*
+ * create the temporary directory :
+ * scandir_variation5 ( parent )
+ * |-> sub_dir ( sub parent )
+ * |-> child_dir ( child dir)
+ */
+
+$parent_dir_path = dirname(__FILE__) . "/scandir_variation5";
+mkdir($parent_dir_path);
+chmod($parent_dir_path, 0777);
+
+// create sub_dir
+$sub_dir_path = $parent_dir_path . "/sub_dir";
+mkdir($sub_dir_path);
+chmod($sub_dir_path, 0777);
+
+//create sub_sub_dir
+$child_dir_path = $sub_dir_path."/child_dir";
+mkdir($child_dir_path);
+
+// remove the write and execute permisson from sub parent
+chmod($sub_dir_path, 0444);
+
+echo "\n-- After restricting 1st level parent directory --\n";
+var_dump(scandir($child_dir_path));
+
+// remove the execute permisson from parent dir, allowing all permission for sub dir
+chmod($sub_dir_path, 0777); // all permisson to sub dir
+chmod($parent_dir_path, 0666); // restricting parent directory
+
+echo "\n-- After restricting parent directory --\n";
+var_dump(scandir($child_dir_path));
+?>
+===DONE===
+--CLEAN--
+<?php
+$parent_dir_path = dirname(__FILE__) . "/scandir_variation5";
+$sub_dir_path = $parent_dir_path."/sub_dir";
+$child_dir_path = $sub_dir_path."/child_dir";
+
+// changing permissions for each temporary directory to delete them
+chmod($parent_dir_path, 0777);
+chmod($sub_dir_path, 0777);
+chmod($child_dir_path, 0777);
+
+rmdir($child_dir_path);
+rmdir($sub_dir_path);
+rmdir($parent_dir_path);
+?>
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+
+-- After restricting 1st level parent directory --
+
+Warning: scandir(%s/scandir_variation5/sub_dir/child_dir): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- After restricting parent directory --
+
+Warning: scandir(%s/scandir_variation5/sub_dir/child_dir): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation6.phpt b/ext/standard/tests/dir/scandir_variation6.phpt
new file mode 100644
index 000000000..5cb595fe7
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation6.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test scandir() function : usage variations - Wildcards in directory path
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass a directory path using wildcards as $dir argument to test how scandir() behaves
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+// create the temporary directories
+$file_path = dirname(__FILE__);
+$dir_path = $file_path . "/scandir_variation6";
+$sub_dir_path = $dir_path . "/sub_dir1";
+
+mkdir($dir_path);
+mkdir($sub_dir_path);
+
+// with different wildcard characters
+
+echo "\n-- Wildcard = '*' --\n";
+var_dump( scandir($file_path . "/scandir_var*") );
+var_dump( scandir($file_path . "/*") );
+
+echo "\n-- Wildcard = '?' --\n";
+var_dump( scandir($dir_path . "/sub_dir?") );
+var_dump( scandir($dir_path . "/sub?dir1") );
+
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . "/scandir_variation6";
+$sub_dir_path = $dir_path . "/sub_dir1";
+
+rmdir($sub_dir_path);
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+
+-- Wildcard = '*' --
+
+Warning: scandir(%s/scandir_var*): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+Warning: scandir(%s/*): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+-- Wildcard = '?' --
+
+Warning: scandir(%s/scandir_variation6/sub_dir?): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+
+Warning: scandir(%s/scandir_variation6/sub?dir1): failed to open dir: %s in %s on line %d
+
+Warning: scandir(): (errno %d): %s in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation7.phpt b/ext/standard/tests/dir/scandir_variation7.phpt
new file mode 100644
index 000000000..c7f77651d
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation7.phpt
@@ -0,0 +1,169 @@
+--TEST--
+Test scandir() function : usage variations - different directory permissions
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not for Windows');
+}
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__) . "/dir_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Create directories with different permissions to test whether scandir() can access them
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+// create the temporary directory
+$dir_path = dirname(__FILE__) . "/scandir_variation7";
+mkdir($dir_path);
+
+// different values for directory permissions
+$permission_values = array(
+/*1*/ 0477, // owner has read only, other and group has rwx
+ 0677, // owner has rw only, other and group has rwx
+
+/*3*/ 0444, // all have read only
+ 0666, // all have rw only
+
+/*5*/ 0400, // owner has read only, group and others have no permission
+ 0600, // owner has rw only, group and others have no permission
+
+/*7*/ 0470, // owner has read only, group has rwx & others have no permission
+ 0407, // owner has read only, other has rwx & group has no permission
+
+/*9*/ 0670, // owner has rw only, group has rwx & others have no permission
+/*10*/ 0607 // owner has rw only, group has no permission and others have rwx
+);
+
+$iterator = 1;
+foreach ($permission_values as $perm) {
+ echo "\n-- Iteration $iterator --\n";
+
+ // Remove the directory if already exists
+ if (is_dir($dir_path)){
+ chmod ($dir_path, 0777); // change dir permission to allow all operation
+ rmdir ($dir_path);
+ }
+ mkdir($dir_path);
+
+ // change the dir permisson to test dir on it
+ var_dump( chmod($dir_path, $perm) );
+
+ var_dump(scandir($dir_path));
+ $iterator++;
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . "/scandir_variation7";
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+
+-- Iteration 1 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 2 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 3 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 4 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 5 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 6 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 7 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 8 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 9 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+
+-- Iteration 10 --
+bool(true)
+array(2) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+}
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation8.phpt b/ext/standard/tests/dir/scandir_variation8.phpt
new file mode 100644
index 000000000..36ae88c8f
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation8.phpt
@@ -0,0 +1,154 @@
+--TEST--
+Test scandir() function : usage variations - different file names
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass a directory containing files with different types of names to test how scandir()
+ * reads them
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+$dir_path = dirname(__FILE__) . "/scandir_variation8/";
+mkdir($dir_path);
+
+// heredoc string
+$heredoc = <<<EOT
+hd_file
+EOT;
+
+$inputs = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 12.3456789000e10,
+ 12.3456789000E-10,
+ .5,
+
+ // empty data
+/*10*/ "",
+ array(),
+
+ // string data
+/*12*/ "double_file",
+ 'single_file',
+ $heredoc,
+);
+
+$iterator = 1;
+foreach($inputs as $key => $input) {
+ echo "\n-- Iteration $iterator --\n";
+ $handle = "fp{$iterator}";
+ var_dump( $$handle = fopen($dir_path . $input . '.tmp', 'w') );
+ fclose($$handle);
+ $iterator++;
+};
+
+echo "\n-- Call to scandir() --\n";
+var_dump($content = scandir($dir_path));
+
+// remove all files in directory so can remove directory in CLEAN section
+foreach ($content as $file_name) {
+ // suppress errors as won't be able to remove "." and ".." entries
+ @unlink($dir_path . $file_name);
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir_path = dirname(__FILE__) . "/scandir_variation8";
+rmdir($dir_path);
+?>
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+
+-- Iteration 1 --
+resource(%d) of type (stream)
+
+-- Iteration 2 --
+resource(%d) of type (stream)
+
+-- Iteration 3 --
+resource(%d) of type (stream)
+
+-- Iteration 4 --
+resource(%d) of type (stream)
+
+-- Iteration 5 --
+resource(%d) of type (stream)
+
+-- Iteration 6 --
+resource(%d) of type (stream)
+
+-- Iteration 7 --
+resource(%d) of type (stream)
+
+-- Iteration 8 --
+resource(%d) of type (stream)
+
+-- Iteration 9 --
+resource(%d) of type (stream)
+
+-- Iteration 10 --
+resource(%d) of type (stream)
+
+-- Iteration 11 --
+resource(%d) of type (stream)
+
+-- Iteration 12 --
+resource(%d) of type (stream)
+
+-- Iteration 13 --
+resource(%d) of type (stream)
+
+-- Iteration 14 --
+resource(%d) of type (stream)
+
+-- Call to scandir() --
+array(16) {
+ [0]=>
+ string(9) "-10.5.tmp"
+ [1]=>
+ string(9) "-2345.tmp"
+ [2]=>
+ string(1) "."
+ [3]=>
+ string(2) ".."
+ [4]=>
+ string(4) ".tmp"
+ [5]=>
+ string(7) "0.5.tmp"
+ [6]=>
+ string(5) "0.tmp"
+ [7]=>
+ string(17) "1.23456789E-9.tmp"
+ [8]=>
+ string(5) "1.tmp"
+ [9]=>
+ string(8) "10.5.tmp"
+ [10]=>
+ string(9) "12345.tmp"
+ [11]=>
+ string(16) "123456789000.tmp"
+ [12]=>
+ string(9) "Array.tmp"
+ [13]=>
+ string(15) "double_file.tmp"
+ [14]=>
+ string(11) "hd_file.tmp"
+ [15]=>
+ string(15) "single_file.tmp"
+}
+===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation9.phpt b/ext/standard/tests/dir/scandir_variation9.phpt
new file mode 100644
index 000000000..2b1904c98
--- /dev/null
+++ b/ext/standard/tests/dir/scandir_variation9.phpt
@@ -0,0 +1,72 @@
+--TEST--
+Test scandir() function : usage variations - different ints as $sorting_order arg
+--FILE--
+<?php
+/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
+ * Description: List files & directories inside the specified path
+ * Source code: ext/standard/dir.c
+ */
+
+/*
+ * Pass different integers as $sorting_order argument to test how scandir()
+ * re-orders the array
+ */
+
+echo "*** Testing scandir() : usage variations ***\n";
+
+// include for create_files/delete_files functions
+include(dirname(__FILE__) . '/../file/file.inc');
+
+// create directory and files
+$dir = dirname(__FILE__) . '/scandir_variation9';
+mkdir($dir);
+@create_files($dir, 2);
+
+// different ints to pass as $sorting_order argument
+$ints = array (PHP_INT_MAX, -PHP_INT_MAX, 0);
+
+foreach($ints as $sorting_order) {
+ var_dump( scandir($dir, $sorting_order) );
+}
+
+delete_files($dir, 2);
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir = dirname(__FILE__) . '/scandir_variation9';
+rmdir($dir);
+?>
+--EXPECTF--
+*** Testing scandir() : usage variations ***
+array(4) {
+ [0]=>
+ string(9) "file2.tmp"
+ [1]=>
+ string(9) "file1.tmp"
+ [2]=>
+ string(2) ".."
+ [3]=>
+ string(1) "."
+}
+array(4) {
+ [0]=>
+ string(9) "file2.tmp"
+ [1]=>
+ string(9) "file1.tmp"
+ [2]=>
+ string(2) ".."
+ [3]=>
+ string(1) "."
+}
+array(4) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(9) "file1.tmp"
+ [3]=>
+ string(9) "file2.tmp"
+}
+===DONE===
diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt
index b60b865e7..f5036daa8 100644
--- a/ext/standard/tests/file/bug22414.phpt
+++ b/ext/standard/tests/file/bug22414.phpt
@@ -8,20 +8,21 @@ output_handler=
$php = getenv('TEST_PHP_EXECUTABLE');
$tmpfile = tempnam('/tmp', 'phpt');
+ $args = ' -n -dsafe_mode=off ';
/* Regular Data Test */
- passthru($php . ' -n -r " echo \"HELLO\"; "');
+ passthru($php . $args . ' -r " echo \"HELLO\"; "');
echo "\n";
/* Binary Data Test */
if (substr(PHP_OS, 0, 3) != 'WIN') {
- $cmd = $php . ' -n -r \"readfile(@getenv(\'TEST_PHP_EXECUTABLE\')); \"';
- $cmd = $php . ' -n -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ;
+ $cmd = $php . $args . ' -r \"readfile(@getenv(\'TEST_PHP_EXECUTABLE\')); \"';
+ $cmd = $php . $args . ' -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ;
} else {
- $cmd = $php . ' -n -r \"readfile(@getenv(\\\\\\"TEST_PHP_EXECUTABLE\\\\\\")); \"';
- $cmd = $php . ' -n -r " passthru(\''.$cmd.'\');" > '.$tmpfile ;
+ $cmd = $php . $args . ' -r \"readfile(@getenv(\\\\\\"TEST_PHP_EXECUTABLE\\\\\\")); \"';
+ $cmd = $php . $args . ' -r " passthru(\''.$cmd.'\');" > '.$tmpfile ;
}
exec($cmd);
diff --git a/ext/standard/tests/file/bug41655_2.phpt b/ext/standard/tests/file/bug41655_2.phpt
index 23086661f..d406f1ba0 100644
--- a/ext/standard/tests/file/bug41655_2.phpt
+++ b/ext/standard/tests/file/bug41655_2.phpt
@@ -5,13 +5,11 @@ open_basedir=/
--FILE--
<?php
$dir = dirname(__FILE__);
- $a=glob($dir . "/bug41655*.*");
+ $a=glob($dir . "/test.*");
print_r($a);
?>
--EXPECTF--
Array
(
- [0] => %sbug41655_1.phpt
- [1] => %sbug41655_2.php
- [2] => %sbug41655_2.phpt
+ [0] => %stest.csv
)
diff --git a/ext/standard/tests/file/bug43216.phpt b/ext/standard/tests/file/bug43216.phpt
new file mode 100755
index 000000000..b7e42534c
--- /dev/null
+++ b/ext/standard/tests/file/bug43216.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #43216 (stream_is_local() returns false on file://)
+--FILE--
+<?php
+var_dump(stream_is_local("file://"));
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/standard/tests/file/bug43248.phpt b/ext/standard/tests/file/bug43248.phpt
new file mode 100755
index 000000000..a20e0e06c
--- /dev/null
+++ b/ext/standard/tests/file/bug43248.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #43248 backward compatibility break in realpath()
+--FILE--
+<?php
+echo realpath(dirname(__FILE__) . '/../file/');
+?>
+--EXPECTF--
+%sfile
diff --git a/ext/standard/tests/file/bug43522.phpt b/ext/standard/tests/file/bug43522.phpt
new file mode 100644
index 000000000..10e44fc35
--- /dev/null
+++ b/ext/standard/tests/file/bug43522.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #43522 (stream_get_line() eats additional characters)
+--FILE--
+<?php // 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
+
+$fp = fopen(__FILE__, 'r'); // Open self
+
+DoTest($fp, 'ZZZ'); // test multi-char delimiter
+DoTest($fp, "Z"); // test single-char delimiter
+
+function DoTest($fp, $delim) {
+ echo "Delimiter: " . $delim . "\n";
+ rewind($fp);
+ echo "\t" . stream_get_line($fp, 10, $delim) . "\n";
+ echo "\t" . stream_get_line($fp, 10, $delim) . "\n";
+}
+
+?>
+--EXPECT--
+Delimiter: ZZZ
+ <?php // 1
+ 234567890A
+Delimiter: Z
+ <?php // 1
+ 234567890A
diff --git a/ext/standard/tests/file/fgetc_basic.phpt b/ext/standard/tests/file/fgetc_basic.phpt
index d82110f78..7851e432f 100644
--- a/ext/standard/tests/file/fgetc_basic.phpt
+++ b/ext/standard/tests/file/fgetc_basic.phpt
@@ -69,475 +69,475 @@ echo "Done\n";
string(1) "2"
int(1)
bool(false)
-resource(8) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(2)
bool(false)
-resource(8) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(3)
bool(false)
-resource(8) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(4)
bool(false)
-resource(8) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(5)
bool(false)
-resource(8) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(6)
bool(false)
-resource(8) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 2 of Outerloop Iteration 1 --
-- Testing fgetc() : file opened using rb mode --
string(1) "2"
int(1)
bool(false)
-resource(9) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(2)
bool(false)
-resource(9) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(3)
bool(false)
-resource(9) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(4)
bool(false)
-resource(9) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(5)
bool(false)
-resource(9) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(6)
bool(false)
-resource(9) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 3 of Outerloop Iteration 1 --
-- Testing fgetc() : file opened using rt mode --
string(1) "2"
int(1)
bool(false)
-resource(10) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(2)
bool(false)
-resource(10) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(3)
bool(false)
-resource(10) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(4)
bool(false)
-resource(10) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(5)
bool(false)
-resource(10) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(6)
bool(false)
-resource(10) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 4 of Outerloop Iteration 1 --
-- Testing fgetc() : file opened using r+ mode --
string(1) "2"
int(1)
bool(false)
-resource(11) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(2)
bool(false)
-resource(11) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(3)
bool(false)
-resource(11) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(4)
bool(false)
-resource(11) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(5)
bool(false)
-resource(11) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(6)
bool(false)
-resource(11) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 5 of Outerloop Iteration 1 --
-- Testing fgetc() : file opened using r+b mode --
string(1) "2"
int(1)
bool(false)
-resource(12) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(2)
bool(false)
-resource(12) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(3)
bool(false)
-resource(12) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(4)
bool(false)
-resource(12) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(5)
bool(false)
-resource(12) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(6)
bool(false)
-resource(12) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 6 of Outerloop Iteration 1 --
-- Testing fgetc() : file opened using r+t mode --
string(1) "2"
int(1)
bool(false)
-resource(13) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(2)
bool(false)
-resource(13) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(3)
bool(false)
-resource(13) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(4)
bool(false)
-resource(13) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(5)
bool(false)
-resource(13) of type (stream)
+resource(%d) of type (stream)
string(1) "2"
int(6)
bool(false)
-resource(13) of type (stream)
+resource(%d) of type (stream)
--- Outerloop iteration 2 ---
-- Innerloop iteration 1 of Outerloop Iteration 2 --
-- Testing fgetc() : file opened using r mode --
string(1) "t"
int(1)
bool(false)
-resource(16) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(2)
bool(false)
-resource(16) of type (stream)
+resource(%d) of type (stream)
string(1) "x"
int(3)
bool(false)
-resource(16) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(4)
bool(false)
-resource(16) of type (stream)
+resource(%d) of type (stream)
string(1) " "
int(5)
bool(false)
-resource(16) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(6)
bool(false)
-resource(16) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 2 of Outerloop Iteration 2 --
-- Testing fgetc() : file opened using rb mode --
string(1) "t"
int(1)
bool(false)
-resource(17) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(2)
bool(false)
-resource(17) of type (stream)
+resource(%d) of type (stream)
string(1) "x"
int(3)
bool(false)
-resource(17) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(4)
bool(false)
-resource(17) of type (stream)
+resource(%d) of type (stream)
string(1) " "
int(5)
bool(false)
-resource(17) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(6)
bool(false)
-resource(17) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 3 of Outerloop Iteration 2 --
-- Testing fgetc() : file opened using rt mode --
string(1) "t"
int(1)
bool(false)
-resource(18) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(2)
bool(false)
-resource(18) of type (stream)
+resource(%d) of type (stream)
string(1) "x"
int(3)
bool(false)
-resource(18) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(4)
bool(false)
-resource(18) of type (stream)
+resource(%d) of type (stream)
string(1) " "
int(5)
bool(false)
-resource(18) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(6)
bool(false)
-resource(18) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 4 of Outerloop Iteration 2 --
-- Testing fgetc() : file opened using r+ mode --
string(1) "t"
int(1)
bool(false)
-resource(19) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(2)
bool(false)
-resource(19) of type (stream)
+resource(%d) of type (stream)
string(1) "x"
int(3)
bool(false)
-resource(19) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(4)
bool(false)
-resource(19) of type (stream)
+resource(%d) of type (stream)
string(1) " "
int(5)
bool(false)
-resource(19) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(6)
bool(false)
-resource(19) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 5 of Outerloop Iteration 2 --
-- Testing fgetc() : file opened using r+b mode --
string(1) "t"
int(1)
bool(false)
-resource(20) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(2)
bool(false)
-resource(20) of type (stream)
+resource(%d) of type (stream)
string(1) "x"
int(3)
bool(false)
-resource(20) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(4)
bool(false)
-resource(20) of type (stream)
+resource(%d) of type (stream)
string(1) " "
int(5)
bool(false)
-resource(20) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(6)
bool(false)
-resource(20) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 6 of Outerloop Iteration 2 --
-- Testing fgetc() : file opened using r+t mode --
string(1) "t"
int(1)
bool(false)
-resource(21) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(2)
bool(false)
-resource(21) of type (stream)
+resource(%d) of type (stream)
string(1) "x"
int(3)
bool(false)
-resource(21) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(4)
bool(false)
-resource(21) of type (stream)
+resource(%d) of type (stream)
string(1) " "
int(5)
bool(false)
-resource(21) of type (stream)
+resource(%d) of type (stream)
string(1) "t"
int(6)
bool(false)
-resource(21) of type (stream)
+resource(%d) of type (stream)
--- Outerloop iteration 3 ---
-- Innerloop iteration 1 of Outerloop Iteration 3 --
-- Testing fgetc() : file opened using r mode --
string(1) "l"
int(1)
bool(false)
-resource(24) of type (stream)
+resource(%d) of type (stream)
string(1) "i"
int(2)
bool(false)
-resource(24) of type (stream)
+resource(%d) of type (stream)
string(1) "n"
int(3)
bool(false)
-resource(24) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(4)
bool(false)
-resource(24) of type (stream)
+resource(%d) of type (stream)
string(1) "
"
int(5)
bool(false)
-resource(24) of type (stream)
+resource(%d) of type (stream)
string(1) "l"
int(6)
bool(false)
-resource(24) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 2 of Outerloop Iteration 3 --
-- Testing fgetc() : file opened using rb mode --
string(1) "l"
int(1)
bool(false)
-resource(25) of type (stream)
+resource(%d) of type (stream)
string(1) "i"
int(2)
bool(false)
-resource(25) of type (stream)
+resource(%d) of type (stream)
string(1) "n"
int(3)
bool(false)
-resource(25) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(4)
bool(false)
-resource(25) of type (stream)
+resource(%d) of type (stream)
string(1) "
"
int(5)
bool(false)
-resource(25) of type (stream)
+resource(%d) of type (stream)
string(1) "l"
int(6)
bool(false)
-resource(25) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 3 of Outerloop Iteration 3 --
-- Testing fgetc() : file opened using rt mode --
string(1) "l"
int(1)
bool(false)
-resource(26) of type (stream)
+resource(%d) of type (stream)
string(1) "i"
int(2)
bool(false)
-resource(26) of type (stream)
+resource(%d) of type (stream)
string(1) "n"
int(3)
bool(false)
-resource(26) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(4)
bool(false)
-resource(26) of type (stream)
+resource(%d) of type (stream)
string(1) "
"
int(5)
bool(false)
-resource(26) of type (stream)
+resource(%d) of type (stream)
string(1) "l"
int(6)
bool(false)
-resource(26) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 4 of Outerloop Iteration 3 --
-- Testing fgetc() : file opened using r+ mode --
string(1) "l"
int(1)
bool(false)
-resource(27) of type (stream)
+resource(%d) of type (stream)
string(1) "i"
int(2)
bool(false)
-resource(27) of type (stream)
+resource(%d) of type (stream)
string(1) "n"
int(3)
bool(false)
-resource(27) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(4)
bool(false)
-resource(27) of type (stream)
+resource(%d) of type (stream)
string(1) "
"
int(5)
bool(false)
-resource(27) of type (stream)
+resource(%d) of type (stream)
string(1) "l"
int(6)
bool(false)
-resource(27) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 5 of Outerloop Iteration 3 --
-- Testing fgetc() : file opened using r+b mode --
string(1) "l"
int(1)
bool(false)
-resource(28) of type (stream)
+resource(%d) of type (stream)
string(1) "i"
int(2)
bool(false)
-resource(28) of type (stream)
+resource(%d) of type (stream)
string(1) "n"
int(3)
bool(false)
-resource(28) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(4)
bool(false)
-resource(28) of type (stream)
+resource(%d) of type (stream)
string(1) "
"
int(5)
bool(false)
-resource(28) of type (stream)
+resource(%d) of type (stream)
string(1) "l"
int(6)
bool(false)
-resource(28) of type (stream)
+resource(%d) of type (stream)
-- Innerloop iteration 6 of Outerloop Iteration 3 --
-- Testing fgetc() : file opened using r+t mode --
string(1) "l"
int(1)
bool(false)
-resource(29) of type (stream)
+resource(%d) of type (stream)
string(1) "i"
int(2)
bool(false)
-resource(29) of type (stream)
+resource(%d) of type (stream)
string(1) "n"
int(3)
bool(false)
-resource(29) of type (stream)
+resource(%d) of type (stream)
string(1) "e"
int(4)
bool(false)
-resource(29) of type (stream)
+resource(%d) of type (stream)
string(1) "
"
int(5)
bool(false)
-resource(29) of type (stream)
+resource(%d) of type (stream)
string(1) "l"
int(6)
bool(false)
-resource(29) of type (stream)
+resource(%d) of type (stream)
Done \ No newline at end of file
diff --git a/ext/standard/tests/file/fgetc_variation2.phpt b/ext/standard/tests/file/fgetc_variation2.phpt
index d733c2909..e7f22b304 100644
--- a/ext/standard/tests/file/fgetc_variation2.phpt
+++ b/ext/standard/tests/file/fgetc_variation2.phpt
@@ -41,20 +41,7 @@ echo "Done";
*** Testing fgetc() : usage variations ***
-- Testing fgetc() with closed handle --
-Warning: fgetc(): 6 is not a valid stream resource in %s on line %d
-bool(false)
--- Testing fgetc() with unset handle --
-
-Notice: Undefined variable: file_handle in %s on line %d
-
-Warning: fgetc(): supplied argument is not a valid stream resource in %s on line %d
-bool(false)
-Done
---UEXPECTF--
-*** Testing fgetc() : usage variations ***
--- Testing fgetc() with closed handle --
-
-Warning: fgetc(): 6 is not a valid stream resource in %s on line %d
+Warning: fgetc(): %d is not a valid stream resource in %s on line %d
bool(false)
-- Testing fgetc() with unset handle --
diff --git a/ext/standard/tests/file/fopen_variation1.phpt b/ext/standard/tests/file/fopen_variation1.phpt
new file mode 100644
index 000000000..53f635b6e
--- /dev/null
+++ b/ext/standard/tests/file/fopen_variation1.phpt
@@ -0,0 +1,14 @@
+--TEST--
+fopen() with relative path on a file in the script directory
+--FILE--
+<?php
+
+$file = basename(__FILE__);
+
+$fd = fopen($file, "r", true);
+var_dump($fd);
+fclose($fd);
+
+?>
+--EXPECTF--
+resource(%d) of type (stream)
diff --git a/ext/standard/tests/file/fread_socket_variation1.phpt b/ext/standard/tests/file/fread_socket_variation1.phpt
new file mode 100644
index 000000000..bd3d23ac5
--- /dev/null
+++ b/ext/standard/tests/file/fread_socket_variation1.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Testing fread() on a TCP server socket
+--FILE--
+<?php
+
+$tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');
+
+socket_set_timeout($tcp_socket, 1);
+
+var_dump(fread($tcp_socket, 1));
+
+fclose($tcp_socket);
+
+?>
+--EXPECT--
+string(0) ""
diff --git a/ext/standard/tests/file/fseek_dir_basic.phpt b/ext/standard/tests/file/fseek_dir_basic.phpt
new file mode 100644
index 000000000..c6d0816e9
--- /dev/null
+++ b/ext/standard/tests/file/fseek_dir_basic.phpt
@@ -0,0 +1,96 @@
+--TEST--
+Testing fseek() on a directory stream
+--FILE--
+<?php
+
+// include the file.inc for Function: function create_files()
+require(dirname(__FILE__) . '/file.inc');
+
+$path = dirname(__FILE__) . '/fseek_dir_basic';
+mkdir($path);
+create_files($path, 3);
+
+echo "call readdir():\n";
+var_dump($dh = opendir($path));
+$files = array();
+while( FALSE !== ($files[] = readdir($dh)) ) {}
+sort($files);
+var_dump($files);
+$files = array();
+
+echo "\ncall fseek() on directory resource:\n";
+var_dump(fseek($dh, 20));
+
+echo "call readdir():\n";
+while( FALSE !== ($files[] = readdir($dh)) ) {}
+sort($files);
+var_dump($files);
+$files = array();
+
+echo "\ncall fseek() with different arguments on directory resource:\n";
+var_dump(fseek($dh, 20, SEEK_END));
+
+echo "call readdir():\n";
+while( FALSE !== ($files[] = readdir($dh)) ) {}
+sort($files);
+var_dump($files);
+
+delete_files($path, 3);
+closedir($dh);
+var_dump(rmdir($path));
+
+?>
+--EXPECTF--
+call readdir():
+resource(12) of type (stream)
+array(6) {
+ [0]=>
+ bool(false)
+ [1]=>
+ string(1) "."
+ [2]=>
+ string(2) ".."
+ [3]=>
+ string(9) "file1.tmp"
+ [4]=>
+ string(9) "file2.tmp"
+ [5]=>
+ string(9) "file3.tmp"
+}
+
+call fseek() on directory resource:
+int(0)
+call readdir():
+array(6) {
+ [0]=>
+ bool(false)
+ [1]=>
+ string(1) "."
+ [2]=>
+ string(2) ".."
+ [3]=>
+ string(9) "file1.tmp"
+ [4]=>
+ string(9) "file2.tmp"
+ [5]=>
+ string(9) "file3.tmp"
+}
+
+call fseek() with different arguments on directory resource:
+int(0)
+call readdir():
+array(6) {
+ [0]=>
+ bool(false)
+ [1]=>
+ string(1) "."
+ [2]=>
+ string(2) ".."
+ [3]=>
+ string(9) "file1.tmp"
+ [4]=>
+ string(9) "file2.tmp"
+ [5]=>
+ string(9) "file3.tmp"
+}
+bool(true)
diff --git a/ext/standard/tests/file/glob_variation2.phpt b/ext/standard/tests/file/glob_variation2.phpt
new file mode 100644
index 000000000..f95fd17e7
--- /dev/null
+++ b/ext/standard/tests/file/glob_variation2.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test glob() function with relative path
+--FILE--
+<?php
+/* Prototype: array glob ( string $pattern [, int $flags] );
+ Description: Find pathnames matching a pattern
+*/
+
+$file_path = dirname(__FILE__);
+
+// temp dirname used here
+$dir_name = 'glob_test';
+
+// create temp directory
+mkdir("$file_path/$dir_name");
+
+// create temp file
+$fp = fopen("$file_path/$dir_name/file.text", "w");
+fclose($fp);
+
+echo "Testing glob() with relative paths:\n";
+
+chdir("$file_path/$dir_name");
+var_dump( glob("./*") );
+var_dump( glob("../$dir_name/*"));
+
+chdir("$file_path");
+var_dump( glob("$dir_name/*"));
+var_dump( glob("$dir_name"));
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+unlink("$file_path/glob_test/file.text");
+rmdir("$file_path/glob_test/");
+?>
+--EXPECT--
+Testing glob() with relative paths:
+array(1) {
+ [0]=>
+ string(11) "./file.text"
+}
+array(1) {
+ [0]=>
+ string(22) "../glob_test/file.text"
+}
+array(1) {
+ [0]=>
+ string(19) "glob_test/file.text"
+}
+array(1) {
+ [0]=>
+ string(9) "glob_test"
+}
+Done
diff --git a/ext/standard/tests/file/is_dir_variation2.phpt b/ext/standard/tests/file/is_dir_variation2.phpt
index df2464d3c..70fe94e44 100644
--- a/ext/standard/tests/file/is_dir_variation2.phpt
+++ b/ext/standard/tests/file/is_dir_variation2.phpt
@@ -70,7 +70,7 @@ bool(true)
-- With symlink --
bool(true)
-- With hardlink --
-Warning: link(): Operation not permitted in %s on line %d
+Warning: link(): %s in %s on line %d
bool(false)
*** Testing is_dir() with file and links to a file ***
diff --git a/ext/standard/tests/file/open_basedir.inc b/ext/standard/tests/file/open_basedir.inc
new file mode 100644
index 000000000..7fd0afc8b
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir.inc
@@ -0,0 +1,133 @@
+<?php
+
+// This file contains helper functions for testing open_basedir configuration
+// Care must be taken with where the directories are created because different
+// SAPIs set the working directory differently. So simply creating a directory
+// relative to the current working directory like this: mkdir("blah") might
+// actually create it in several different places depending on the SAPI..!
+//
+// Note also depending on the version of php being tested, so the open_basedir
+// configuration may or may not be changeable from a script (PHP_INI_SYSTEM).
+//
+// For this reason we set the open_basedir to . (current directory) and then
+// move around to various directories for testing using chdir(). This is NOT
+// recommended for production use as . bypasses all semblence of security..!
+//
+// Although safe mode has been removed in php 6.0, open_basedir is still valid.
+// See http://www.php.net/features.safe-mode for more information
+
+function recursive_delete_directory($directory) {
+
+ // Remove any trailing slash first
+ if (substr($directory, -1) == '/') {
+ $directory = substr($directory, 0, -1);
+ }
+
+ // Make sure the directory is valid
+ if (is_dir($directory) == FALSE) {
+ return FALSE;
+ }
+
+ // Check we can access the directory
+ if (is_readable($directory) == FALSE) {
+ return FALSE;
+ }
+
+ $handle = opendir($directory);
+
+ // Scan through the directory contents
+ while (FALSE !== ($item = readdir($handle))) {
+ if ($item != '.') {
+ if ($item != '..') {
+ $path = ($directory.'/'.$item);
+ if (is_dir($path) == TRUE) {
+ recursive_delete_directory($path);
+ } else {
+ @chmod($path, 0777);
+ unlink($path);
+ }
+ }
+ }
+ }
+
+ closedir($handle);
+ @chmod($directory, 0777);
+ rmdir($directory);
+
+ return TRUE;
+}
+
+function create_directories() {
+ delete_directories();
+ $directory = dirname(__FILE__);
+
+ var_dump(mkdir($directory."/test"));
+ var_dump(mkdir($directory."/test/ok"));
+ var_dump(mkdir($directory."/test/bad"));
+ file_put_contents($directory."/test/ok/ok.txt", "Hello World!");
+ file_put_contents($directory."/test/bad/bad.txt", "Hello World!");
+}
+
+function delete_directories() {
+ $directory = (dirname(__FILE__)."/test");
+ recursive_delete_directory($directory);
+}
+
+function test_open_basedir_error($function) {
+ var_dump($function("../bad"));
+ var_dump($function("../bad/bad.txt"));
+ var_dump($function(".."));
+ var_dump($function("../"));
+ var_dump($function("/"));
+ var_dump($function("../bad/."));
+ $directory = dirname(__FILE__);
+ var_dump($function($directory."/test/bad/bad.txt"));
+ var_dump($function($directory."/test/bad/../bad/bad.txt"));
+}
+
+function test_open_basedir_before($function, $change = TRUE) {
+ echo "*** Testing open_basedir configuration [$function] ***\n";
+ $directory = dirname(__FILE__);
+ var_dump(chdir($directory));
+ create_directories();
+
+ // Optionally change directory
+ if ($change == TRUE) {
+ var_dump(chdir($directory."/test/ok"));
+ }
+}
+
+// Delete directories using a --CLEAN-- section!
+function test_open_basedir_after($function) {
+ echo "*** Finished testing open_basedir configuration [$function] ***\n";
+}
+
+// This is used by functions that return an array on success
+function test_open_basedir_array($function) {
+ test_open_basedir_before($function);
+ test_open_basedir_error($function);
+ var_dump(is_array($function("./../.")));
+ var_dump(is_array($function("../ok")));
+ var_dump(is_array($function("ok.txt")));
+ var_dump(is_array($function("../ok/ok.txt")));
+ $directory = dirname(__FILE__);
+ var_dump(is_array($function($directory."/test/ok/ok.txt")));
+ var_dump(is_array($function($directory."/test/ok/../ok/ok.txt")));
+ test_open_basedir_after($function);
+}
+
+function test_open_basedir($function) {
+ test_open_basedir_before($function);
+ test_open_basedir_error($function);
+ var_dump($function("./../."));
+ var_dump($function("../ok"));
+ var_dump($function("ok.txt"));
+ var_dump($function("../ok/ok.txt"));
+ $directory = dirname(__FILE__);
+ var_dump($function($directory."/test/ok/ok.txt"));
+ var_dump($function($directory."/test/ok/../ok/ok.txt"));
+ test_open_basedir_after($function);
+}
+
+?>
+
diff --git a/ext/standard/tests/file/open_basedir_chdir.phpt b/ext/standard/tests/file/open_basedir_chdir.phpt
new file mode 100644
index 000000000..32ed4eb1e
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_chdir.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("chdir");
+$directory = dirname(__FILE__);
+
+var_dump(chdir("../bad"));
+var_dump(chdir(".."));
+var_dump(chdir("../"));
+var_dump(chdir("/"));
+var_dump(chdir("../bad/."));
+var_dump(chdir("./../."));
+
+test_open_basedir_after("chdir");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [chdir] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: chdir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chdir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chdir(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chdir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chdir(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chdir(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+*** Finished testing open_basedir configuration [chdir] ***
+
diff --git a/ext/standard/tests/file/open_basedir_chmod.phpt b/ext/standard/tests/file/open_basedir_chmod.phpt
new file mode 100644
index 000000000..02fdce5a1
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_chmod.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("chmod");
+$directory = dirname(__FILE__);
+
+var_dump(chmod("../bad", 0600));
+var_dump(chmod("../bad/bad.txt", 0600));
+var_dump(chmod("..", 0600));
+var_dump(chmod("../", 0600));
+var_dump(chmod("/", 0600));
+var_dump(chmod("../bad/.", 0600));
+var_dump(chmod("../bad/./bad.txt", 0600));
+var_dump(chmod("./../.", 0600));
+
+var_dump(chmod($directory."/test/ok/ok.txt", 0600));
+var_dump(chmod("./ok.txt", 0600));
+var_dump(chmod("ok.txt", 0600));
+var_dump(chmod("../ok/ok.txt", 0600));
+var_dump(chmod("../ok/./ok.txt", 0600));
+chmod($directory."/test/ok/ok.txt", 0777);
+
+test_open_basedir_after("chmod");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [chmod] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: chmod(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chmod(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chmod(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chmod(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chmod(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chmod(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chmod(): open_basedir restriction in effect. File(../bad/./bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: chmod(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [chmod] ***
+
diff --git a/ext/standard/tests/file/open_basedir_copy.phpt b/ext/standard/tests/file/open_basedir_copy.phpt
new file mode 100644
index 000000000..8f0f7a91f
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_copy.phpt
@@ -0,0 +1,79 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("copy");
+$directory = dirname(__FILE__);
+
+var_dump(copy("ok.txt", "../bad"));
+var_dump(copy("ok.txt", "../bad/bad.txt"));
+var_dump(copy("ok.txt", ".."));
+var_dump(copy("ok.txt", "../"));
+var_dump(copy("ok.txt", "/"));
+var_dump(copy("ok.txt", "../bad/."));
+var_dump(copy("ok.txt", "../bad/./bad.txt"));
+var_dump(copy("ok.txt", "./../."));
+
+var_dump(copy("ok.txt", "copy.txt"));
+var_dump(unlink("copy.txt"));
+test_open_basedir_after("copy");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [copy] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: copy(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: copy(../bad): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: copy(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: copy(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: copy(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: copy(..): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: copy(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: copy(../): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: copy(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: copy(/): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: copy(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: copy(../bad/.): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: copy(): open_basedir restriction in effect. File(../bad/./bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: copy(../bad/./bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: copy(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: copy(./../.): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [copy] ***
+
diff --git a/ext/standard/tests/file/open_basedir_copy_variation1.phpt b/ext/standard/tests/file/open_basedir_copy_variation1.phpt
new file mode 100644
index 000000000..de532e12c
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_copy_variation1.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("copy");
+$directory = dirname(__FILE__);
+
+var_dump(copy("../bad/bad.txt", "copy.txt"));
+var_dump(unlink("copy.txt"));
+
+test_open_basedir_after("copy");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [copy] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: copy(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: unlink(copy.txt): No such file or directory in %s on line %d
+bool(false)
+*** Finished testing open_basedir configuration [copy] ***
+
diff --git a/ext/standard/tests/file/open_basedir_disk_free_space.phpt b/ext/standard/tests/file/open_basedir_disk_free_space.phpt
new file mode 100644
index 000000000..e3e36e670
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_disk_free_space.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+
+test_open_basedir_before("disk_free_space");
+test_open_basedir_error("disk_free_space");
+$directory = dirname(__FILE__);
+var_dump(disk_free_space($directory."/test/ok"));
+test_open_basedir_after("disk_free_space");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [disk_free_space] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: disk_free_space(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: disk_free_space(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: disk_free_space(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: disk_free_space(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: disk_free_space(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: disk_free_space(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: disk_free_space(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: disk_free_space(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+float(%s)
+*** Finished testing open_basedir configuration [disk_free_space] ***
diff --git a/ext/standard/tests/file/open_basedir_file.phpt b/ext/standard/tests/file/open_basedir_file.phpt
new file mode 100644
index 000000000..fbc841e3f
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_file.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+$directory = dirname(__FILE__);
+test_open_basedir_before("file");
+test_open_basedir_error("file");
+
+var_dump(file("ok.txt"));
+var_dump(file("../ok/ok.txt"));
+var_dump(file($directory."/test/ok/ok.txt"));
+var_dump(file($directory."/test/ok/../ok/ok.txt"));
+
+test_open_basedir_after("file");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [file] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: file(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file(../bad): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file(..): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file(../): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file(/): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file(../bad/.): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file(%s/test/bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file(%s/test/bad/../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+array(1) {
+ [0]=>
+ string(12) "Hello World!"
+}
+array(1) {
+ [0]=>
+ string(12) "Hello World!"
+}
+array(1) {
+ [0]=>
+ string(12) "Hello World!"
+}
+array(1) {
+ [0]=>
+ string(12) "Hello World!"
+}
+*** Finished testing open_basedir configuration [file] ***
+
diff --git a/ext/standard/tests/file/open_basedir_file_exists.phpt b/ext/standard/tests/file/open_basedir_file_exists.phpt
new file mode 100644
index 000000000..c249fc116
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_file_exists.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("file_exists");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [file_exists] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: file_exists(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: file_exists(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: file_exists(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: file_exists(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: file_exists(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: file_exists(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: file_exists(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: file_exists(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: file_exists(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [file_exists] ***
+
diff --git a/ext/standard/tests/file/open_basedir_file_get_contents.phpt b/ext/standard/tests/file/open_basedir_file_get_contents.phpt
new file mode 100644
index 000000000..637c499ea
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_file_get_contents.phpt
@@ -0,0 +1,75 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+$directory = dirname(__FILE__);
+test_open_basedir_before("file_get_contents");
+test_open_basedir_error("file_get_contents");
+
+var_dump(file_get_contents("ok.txt"));
+var_dump(file_get_contents("../ok/ok.txt"));
+var_dump(file_get_contents($directory."/test/ok/ok.txt"));
+var_dump(file_get_contents($directory."/test/ok/../ok/ok.txt"));
+
+test_open_basedir_after("file_get_contents");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [file_get_contents] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: file_get_contents(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_get_contents(../bad): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_get_contents(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_get_contents(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_get_contents(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_get_contents(..): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_get_contents(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_get_contents(../): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_get_contents(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_get_contents(/): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_get_contents(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_get_contents(../bad/.): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_get_contents(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_get_contents(%s/test/bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_get_contents(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_get_contents(%s/test/bad/../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+string(12) "Hello World!"
+string(12) "Hello World!"
+string(12) "Hello World!"
+string(12) "Hello World!"
+*** Finished testing open_basedir configuration [file_get_contents] ***
diff --git a/ext/standard/tests/file/open_basedir_file_put_contents.phpt b/ext/standard/tests/file/open_basedir_file_put_contents.phpt
new file mode 100644
index 000000000..d4bd417b5
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_file_put_contents.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("file_put_contents");
+$directory = dirname(__FILE__);
+
+var_dump(file_put_contents("../bad/bad.txt", "Hello World!"));
+var_dump(file_put_contents(".././bad/bad.txt", "Hello World!"));
+var_dump(file_put_contents("../bad/../bad/bad.txt", "Hello World!"));
+var_dump(file_put_contents("./.././bad/bad.txt", "Hello World!"));
+var_dump(file_put_contents($directory."/test/bad/bad.txt", "Hello World!"));
+
+test_open_basedir_after("file_put_contents");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [file_put_contents] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: file_put_contents(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_put_contents(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_put_contents(): open_basedir restriction in effect. File(.././bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_put_contents(.././bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_put_contents(): open_basedir restriction in effect. File(../bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_put_contents(../bad/../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_put_contents(): open_basedir restriction in effect. File(./.././bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_put_contents(./.././bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: file_put_contents(): open_basedir restriction in effect. File%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: file_put_contents%s/test/bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+*** Finished testing open_basedir configuration [file_put_contents] ***
+
diff --git a/ext/standard/tests/file/open_basedir_fileatime.phpt b/ext/standard/tests/file/open_basedir_fileatime.phpt
new file mode 100644
index 000000000..02cc94f83
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_fileatime.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("fileatime");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [fileatime] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: fileatime(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileatime(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileatime(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileatime(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileatime(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileatime(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileatime(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileatime(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileatime(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+*** Finished testing open_basedir configuration [fileatime] ***
+
diff --git a/ext/standard/tests/file/open_basedir_filectime.phpt b/ext/standard/tests/file/open_basedir_filectime.phpt
new file mode 100644
index 000000000..542c8423e
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_filectime.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("filectime");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [filectime] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: filectime(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filectime(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filectime(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filectime(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filectime(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filectime(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filectime(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filectime(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filectime(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+*** Finished testing open_basedir configuration [filectime] ***
+
diff --git a/ext/standard/tests/file/open_basedir_filegroup.phpt b/ext/standard/tests/file/open_basedir_filegroup.phpt
new file mode 100644
index 000000000..5f6279aa8
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_filegroup.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("filegroup");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [filegroup] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: filegroup(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filegroup(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filegroup(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filegroup(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filegroup(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filegroup(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filegroup(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filegroup(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filegroup(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+*** Finished testing open_basedir configuration [filegroup] ***
+
diff --git a/ext/standard/tests/file/open_basedir_fileinode.phpt b/ext/standard/tests/file/open_basedir_fileinode.phpt
new file mode 100644
index 000000000..070c2c806
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_fileinode.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("fileinode");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [fileinode] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: fileinode(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileinode(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileinode(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileinode(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileinode(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileinode(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileinode(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileinode(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileinode(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+*** Finished testing open_basedir configuration [fileinode] ***
+
diff --git a/ext/standard/tests/file/open_basedir_filemtime.phpt b/ext/standard/tests/file/open_basedir_filemtime.phpt
new file mode 100644
index 000000000..7213ddb5b
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_filemtime.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("filemtime");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [filemtime] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: filemtime(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filemtime(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filemtime(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filemtime(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filemtime(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filemtime(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filemtime(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filemtime(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filemtime(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+*** Finished testing open_basedir configuration [filemtime] ***
+
diff --git a/ext/standard/tests/file/open_basedir_fileowner.phpt b/ext/standard/tests/file/open_basedir_fileowner.phpt
new file mode 100644
index 000000000..b363b7e0e
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_fileowner.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("fileowner");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [fileowner] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: fileowner(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileowner(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileowner(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileowner(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileowner(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileowner(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileowner(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileowner(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileowner(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+*** Finished testing open_basedir configuration [fileowner] ***
+
diff --git a/ext/standard/tests/file/open_basedir_fileperms.phpt b/ext/standard/tests/file/open_basedir_fileperms.phpt
new file mode 100644
index 000000000..a1e6511b0
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_fileperms.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("fileperms");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [fileperms] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: fileperms(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileperms(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileperms(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileperms(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileperms(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileperms(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileperms(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileperms(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: fileperms(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+*** Finished testing open_basedir configuration [fileperms] ***
+
diff --git a/ext/standard/tests/file/open_basedir_filesize.phpt b/ext/standard/tests/file/open_basedir_filesize.phpt
new file mode 100644
index 000000000..a335dfd17
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_filesize.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("filesize");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [filesize] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: filesize(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filesize(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filesize(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filesize(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filesize(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filesize(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filesize(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filesize(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filesize(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+*** Finished testing open_basedir configuration [filesize] ***
+
diff --git a/ext/standard/tests/file/open_basedir_filetype.phpt b/ext/standard/tests/file/open_basedir_filetype.phpt
new file mode 100644
index 000000000..5091db56f
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_filetype.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("filetype");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [filetype] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: filetype(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filetype(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filetype(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filetype(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filetype(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filetype(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filetype(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filetype(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: filetype(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+string(3) "dir"
+string(4) "file"
+string(4) "file"
+string(4) "file"
+string(4) "file"
+*** Finished testing open_basedir configuration [filetype] ***
+
diff --git a/ext/standard/tests/file/open_basedir_fopen.phpt b/ext/standard/tests/file/open_basedir_fopen.phpt
new file mode 100644
index 000000000..c6c9a253f
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_fopen.phpt
@@ -0,0 +1,86 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("fopen");
+$directory = dirname(__FILE__);
+
+var_dump(fopen("../bad", "r"));
+var_dump(fopen("../bad/bad.txt", "r"));
+var_dump(fopen("..", "r"));
+var_dump(fopen("../", "r"));
+var_dump(fopen("/", "r"));
+var_dump(fopen("../bad/.", "r"));
+var_dump(fopen("../bad/./bad.txt", "r"));
+var_dump(fopen("./../.", "r"));
+
+var_dump(fopen($directory."/test/ok/ok.txt", "r"));
+var_dump(fopen("./ok.txt", "r"));
+var_dump(fopen("ok.txt", "r"));
+var_dump(fopen("../ok/ok.txt", "r"));
+var_dump(fopen("../ok/./ok.txt", "r"));
+
+test_open_basedir_after("fopen");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [fopen] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: fopen(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: fopen(../bad): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: fopen(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: fopen(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: fopen(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: fopen(..): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: fopen(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: fopen(../): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: fopen(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: fopen(/): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: fopen(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: fopen(../bad/.): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+
+Warning: fopen(): open_basedir restriction in effect. File(../bad/./bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: fopen(../bad/./bad.txt): failed to open stream: Operation not permitted in %s on line 12
+bool(false)
+
+Warning: fopen(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: fopen(./../.): failed to open stream: Operation not permitted in %s on line %d
+bool(false)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+*** Finished testing open_basedir configuration [fopen] ***
+
diff --git a/ext/standard/tests/file/open_basedir_glob-win32.phpt b/ext/standard/tests/file/open_basedir_glob-win32.phpt
new file mode 100644
index 000000000..3fa19afa3
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_glob-win32.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test open_basedir configuration
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip Windows only variation');
+}
+?>
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("glob");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [glob] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+array(0) {
+}
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+array(1) {
+ [0]=>
+ string(5) "../ok"
+}
+array(1) {
+ [0]=>
+ string(6) "ok.txt"
+}
+array(1) {
+ [0]=>
+ string(12) "../ok/ok.txt"
+}
+array(1) {
+ [0]=>
+ string(%d) "%s/test/ok/ok.txt"
+}
+array(1) {
+ [0]=>
+ string(%d) "%s/test/ok/../ok/ok.txt"
+}
+*** Finished testing open_basedir configuration [glob] ***
+
diff --git a/ext/standard/tests/file/open_basedir_glob.phpt b/ext/standard/tests/file/open_basedir_glob.phpt
new file mode 100644
index 000000000..591cd8f4f
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_glob.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Test open_basedir configuration
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not for Windows variation');
+}
+?>
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("glob");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [glob] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+array(1) {
+ [0]=>
+ string(5) "../ok"
+}
+array(1) {
+ [0]=>
+ string(6) "ok.txt"
+}
+array(1) {
+ [0]=>
+ string(12) "../ok/ok.txt"
+}
+array(1) {
+ [0]=>
+ string(%d) "%s/test/ok/ok.txt"
+}
+array(1) {
+ [0]=>
+ string(%d) "%s/test/ok/../ok/ok.txt"
+}
+*** Finished testing open_basedir configuration [glob] ***
+
diff --git a/ext/standard/tests/file/open_basedir_is_dir.phpt b/ext/standard/tests/file/open_basedir_is_dir.phpt
new file mode 100644
index 000000000..e4ad620d7
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_is_dir.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("is_dir");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [is_dir] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: is_dir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_dir(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_dir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_dir(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_dir(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_dir(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_dir(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_dir(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+*** Finished testing open_basedir configuration [is_dir] ***
+
diff --git a/ext/standard/tests/file/open_basedir_is_executable.phpt b/ext/standard/tests/file/open_basedir_is_executable.phpt
new file mode 100644
index 000000000..1bab86055
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_is_executable.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("is_executable");
+test_open_basedir_error("is_executable");
+
+var_dump(is_executable("ok.txt"));
+var_dump(is_executable("../ok/ok.txt"));
+$directory = dirname(__FILE__);
+var_dump(is_executable($directory."/test/ok/ok.txt"));
+var_dump(is_executable($directory."/test/ok/../ok/ok.txt"));
+
+test_open_basedir_after("is_executable");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [is_executable] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: is_executable(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_executable(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_executable(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_executable(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_executable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_executable(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_executable(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_executable(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+*** Finished testing open_basedir configuration [is_executable] ***
diff --git a/ext/standard/tests/file/open_basedir_is_file.phpt b/ext/standard/tests/file/open_basedir_is_file.phpt
new file mode 100644
index 000000000..51ef0a2d1
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_is_file.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("is_file");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [is_file] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: is_file(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_file(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_file(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_file(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_file(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_file(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_file(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_file(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_file(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [is_file] ***
+
diff --git a/ext/standard/tests/file/open_basedir_is_link.phpt b/ext/standard/tests/file/open_basedir_is_link.phpt
new file mode 100644
index 000000000..5d12148d8
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_is_link.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("is_link");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [is_link] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: is_link(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_link(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_link(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_link(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_link(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_link(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_link(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_link(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_link(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+*** Finished testing open_basedir configuration [is_link] ***
+
diff --git a/ext/standard/tests/file/open_basedir_is_readable.phpt b/ext/standard/tests/file/open_basedir_is_readable.phpt
new file mode 100644
index 000000000..951a19ac7
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_is_readable.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("is_readable");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [is_readable] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: is_readable(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_readable(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_readable(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_readable(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_readable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_readable(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_readable(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_readable(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_readable(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [is_readable] ***
+
diff --git a/ext/standard/tests/file/open_basedir_is_writable.phpt b/ext/standard/tests/file/open_basedir_is_writable.phpt
new file mode 100644
index 000000000..25ce1c63a
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_is_writable.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("is_writable");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [is_writable] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: is_writable(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_writable(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_writable(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_writable(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_writable(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_writable(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_writable(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: is_writable(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [is_writable] ***
+
diff --git a/ext/standard/tests/file/open_basedir_link.phpt b/ext/standard/tests/file/open_basedir_link.phpt
new file mode 100644
index 000000000..a54c22f4b
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_link.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Test open_basedir configuration
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip no links on Windows');
+}
+?>
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("link");
+$directory = dirname(__FILE__);
+
+$target = ($directory."/test/ok/ok.txt");
+var_dump(link($target, "../bad/link.txt"));
+var_dump(link($target, "../link.txt"));
+var_dump(link($target, "../bad/./link.txt"));
+var_dump(link($target, "./.././link.txt"));
+
+$link = ($directory."/test/ok/link.txt");
+var_dump(link("../bad/bad.txt", $link));
+var_dump(link("../bad", $link));
+var_dump(link("../bad/./bad.txt", $link));
+var_dump(link("../bad/bad.txt", $link));
+var_dump(link("./.././bad", $link));
+
+$target = ($directory."/test/ok/ok.txt");
+
+var_dump(link($target, $link));
+var_dump(unlink($link));
+test_open_basedir_after("link");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [link] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/bad/link.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/link.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/bad/link.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/link.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: link(): open_basedir restriction in effect. File(%s/test/bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [link] ***
+
diff --git a/ext/standard/tests/file/open_basedir_linkinfo.phpt b/ext/standard/tests/file/open_basedir_linkinfo.phpt
new file mode 100644
index 000000000..ab12a5149
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_linkinfo.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Test open_basedir configuration
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip no symlinks on Windows');
+}
+?>
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("linkinfo", FALSE);
+$directory = dirname(__FILE__);
+
+chdir($directory);
+
+$target = ($directory."/test/bad/bad.txt");
+$symlink = ($directory."/test/ok/symlink.txt");
+var_dump(symlink($target, $symlink));
+
+chdir($directory."/test/ok");
+
+var_dump(linkinfo("symlink.txt"));
+var_dump(linkinfo("../ok/symlink.txt"));
+var_dump(linkinfo("../ok/./symlink.txt"));
+var_dump(linkinfo("./symlink.txt"));
+var_dump(linkinfo($directory."/test/ok/symlink.txt"));
+
+$target = ($directory."/test/ok/ok.txt");
+$symlink = ($directory."/test/ok/symlink.txt");
+var_dump(symlink($target, $symlink));
+var_dump(linkinfo($symlink));
+var_dump(unlink($symlink));
+
+test_open_basedir_after("linkinfo");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [linkinfo] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+int(%d)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+int(%d)
+
+Warning: unlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+*** Finished testing open_basedir configuration [linkinfo] ***
+
diff --git a/ext/standard/tests/file/open_basedir_lstat.phpt b/ext/standard/tests/file/open_basedir_lstat.phpt
new file mode 100644
index 000000000..35e5a2201
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_lstat.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_array("lstat");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [lstat] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: lstat(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: lstat(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: lstat(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: lstat(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: lstat(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: lstat(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: lstat(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: lstat(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: lstat(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [lstat] ***
+
diff --git a/ext/standard/tests/file/open_basedir_mkdir.phpt b/ext/standard/tests/file/open_basedir_mkdir.phpt
new file mode 100644
index 000000000..253818ccf
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_mkdir.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test open_basedir configuration
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip Windows only variation');
+}
+?>
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("mkdir");
+$directory = dirname(__FILE__);
+
+var_dump(mkdir("../bad/blah"));
+var_dump(mkdir("../blah"));
+var_dump(mkdir("../bad/./blah"));
+var_dump(mkdir("./.././blah"));
+
+var_dump(mkdir($directory."/test/ok/blah"));
+var_dump(rmdir($directory."/test/ok/blah"));
+test_open_basedir_after("mkdir");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [mkdir] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: mkdir(): open_basedir restriction in effect. File(../bad/blah) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: mkdir(): open_basedir restriction in effect. File(../blah) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: mkdir(): open_basedir restriction in effect. File(../bad/./blah) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: mkdir(): open_basedir restriction in effect. File(./.././blah) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [mkdir] ***
diff --git a/ext/standard/tests/file/open_basedir_parse_ini_file.phpt b/ext/standard/tests/file/open_basedir_parse_ini_file.phpt
new file mode 100644
index 000000000..dadddac98
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_parse_ini_file.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("parse_ini_file");
+$directory = dirname(__FILE__);
+
+var_dump(parse_ini_file("../bad"));
+var_dump(parse_ini_file("../bad/bad.txt"));
+var_dump(parse_ini_file(".."));
+var_dump(parse_ini_file("../"));
+var_dump(parse_ini_file("../bad/."));
+var_dump(parse_ini_file("../bad/./bad.txt"));
+var_dump(parse_ini_file("./../."));
+
+test_open_basedir_after("parse_ini_file");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [parse_ini_file] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: parse_ini_file(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: parse_ini_file(../bad): failed to open stream: Operation not permitted in %s on line %d
+array(0) {
+}
+
+Warning: parse_ini_file(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: parse_ini_file(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
+array(0) {
+}
+
+Warning: parse_ini_file(..): failed to open stream: Operation not permitted in %s on line %d
+array(0) {
+}
+
+Warning: parse_ini_file(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: parse_ini_file(../): failed to open stream: Operation not permitted in %s on line %d
+array(0) {
+}
+
+Warning: parse_ini_file(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: parse_ini_file(../bad/.): failed to open stream: Operation not permitted in %s on line %d
+array(0) {
+}
+
+Warning: parse_ini_file(): open_basedir restriction in effect. File(../bad/./bad.txt) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: parse_ini_file(../bad/./bad.txt): failed to open stream: Operation not permitted in %s on line %d
+array(0) {
+}
+
+Warning: parse_ini_file(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+
+Warning: parse_ini_file(./../.): failed to open stream: Operation not permitted in %s on line %d
+array(0) {
+}
+*** Finished testing open_basedir configuration [parse_ini_file] ***
+
diff --git a/ext/standard/tests/file/open_basedir_readlink.phpt b/ext/standard/tests/file/open_basedir_readlink.phpt
new file mode 100644
index 000000000..cbba4307e
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_readlink.phpt
@@ -0,0 +1,76 @@
+--TEST--
+Test open_basedir configuration
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip no symlinks on Windows');
+}
+?>
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("readlink", FALSE);
+$directory = dirname(__FILE__);
+
+chdir($directory);
+
+$target = ($directory."/test/bad/bad.txt");
+$symlink = ($directory."/test/ok/symlink.txt");
+var_dump(symlink($target, $symlink));
+
+chdir($directory."/test/ok");
+
+var_dump(readlink("symlink.txt"));
+var_dump(readlink("../ok/symlink.txt"));
+var_dump(readlink("../ok/./symlink.txt"));
+var_dump(readlink("./symlink.txt"));
+var_dump(readlink($directory."/test/ok/symlink.txt"));
+
+$target = ($directory."/test/ok/ok.txt");
+$symlink = ($directory."/test/ok/symlink.txt");
+var_dump(symlink($target, $symlink));
+var_dump(readlink($symlink));
+var_dump(unlink($symlink));
+
+test_open_basedir_after("readlink");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [readlink] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: readlink(): open_basedir restriction in effect. File(symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: readlink(): open_basedir restriction in effect. File(../ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: readlink(): open_basedir restriction in effect. File(../ok/./symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: readlink(): open_basedir restriction in effect. File(./symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: readlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: readlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: unlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+*** Finished testing open_basedir configuration [readlink] ***
+
diff --git a/ext/standard/tests/file/open_basedir_realpath.phpt b/ext/standard/tests/file/open_basedir_realpath.phpt
new file mode 100644
index 000000000..8cae890e9
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_realpath.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test open_basedir configuration
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip only run on Windows');
+}
+?>
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir("realpath");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [realpath] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\test\bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\test\bad\bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\test) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\test) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\test\bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\test\bad\bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\test\bad\bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: realpath(): open_basedir restriction in effect. File(%s\test) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+string(%d) "%s\test\ok"
+string(%d) "%s\test\ok\ok.txt"
+string(%d) "%s\test\ok\ok.txt"
+string(%d) "%s\test\ok\ok.txt"
+string(%d) "%s\test\ok\ok.txt"
+*** Finished testing open_basedir configuration [realpath] ***
+
diff --git a/ext/standard/tests/file/open_basedir_rename.phpt b/ext/standard/tests/file/open_basedir_rename.phpt
new file mode 100644
index 000000000..428e7a070
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_rename.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("rename");
+$directory = dirname(__FILE__);
+
+var_dump(rename("../bad/bad.txt", "rename.txt"));
+var_dump(rename(".././bad/bad.txt", "rename.txt"));
+var_dump(rename("../bad/../bad/bad.txt", "rename.txt"));
+var_dump(rename("./.././bad/bad.txt", "rename.txt"));
+var_dump(rename($directory."/test/bad/bad.txt", "rename.txt"));
+
+test_open_basedir_after("rename");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [rename] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: rename(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: rename(): open_basedir restriction in effect. File(.././bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: rename(): open_basedir restriction in effect. File(../bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: rename(): open_basedir restriction in effect. File(./.././bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: rename(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+*** Finished testing open_basedir configuration [rename] ***
+
diff --git a/ext/standard/tests/file/open_basedir_rmdir.phpt b/ext/standard/tests/file/open_basedir_rmdir.phpt
new file mode 100644
index 000000000..b4d61f8b7
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_rmdir.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("rmdir");
+$directory = dirname(__FILE__);
+
+var_dump(rmdir("../bad"));
+var_dump(rmdir(".././bad"));
+var_dump(rmdir("../bad/../bad"));
+var_dump(rmdir("./.././bad"));
+var_dump(rmdir($directory."/test/bad"));
+
+test_open_basedir_after("rmdir");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [rmdir] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: rmdir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: rmdir(): open_basedir restriction in effect. File(.././bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: rmdir(): open_basedir restriction in effect. File(../bad/../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: rmdir(): open_basedir restriction in effect. File(./.././bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: rmdir(): open_basedir restriction in effect. File(%s/test/bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+*** Finished testing open_basedir configuration [rmdir] ***
+
diff --git a/ext/standard/tests/file/open_basedir_stat.phpt b/ext/standard/tests/file/open_basedir_stat.phpt
new file mode 100644
index 000000000..b80b854d6
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_stat.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_array("stat");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [stat] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: stat(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: stat(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: stat(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: stat(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: stat(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: stat(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: stat(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: stat(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: stat(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [stat] ***
+
diff --git a/ext/standard/tests/file/open_basedir_symlink.phpt b/ext/standard/tests/file/open_basedir_symlink.phpt
new file mode 100644
index 000000000..3b3f1d571
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_symlink.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Test open_basedir configuration
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip no symlinks on Windows');
+}
+?>
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("symlink");
+$directory = dirname(__FILE__);
+
+$target = ($directory."/test/ok/ok.txt");
+var_dump(symlink($target, "../bad/symlink.txt"));
+var_dump(symlink($target, "../symlink.txt"));
+var_dump(symlink($target, "../bad/./symlink.txt"));
+var_dump(symlink($target, "./.././symlink.txt"));
+
+$symlink = ($directory."/test/ok/symlink.txt");
+var_dump(symlink("../bad/bad.txt", $symlink));
+var_dump(symlink("../bad", $symlink));
+var_dump(symlink("../bad/./bad.txt", $symlink));
+var_dump(symlink("../bad/bad.txt", $symlink));
+var_dump(symlink("./.././bad", $symlink));
+
+$target = ($directory."/test/ok/ok.txt");
+
+var_dump(symlink($target, $symlink));
+var_dump(unlink($symlink));
+test_open_basedir_after("symlink");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [symlink] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [symlink] ***
+
diff --git a/ext/standard/tests/file/open_basedir_tempnam.phpt b/ext/standard/tests/file/open_basedir_tempnam.phpt
new file mode 100644
index 000000000..247ac88d5
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_tempnam.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("tempnam");
+$directory = dirname(__FILE__);
+
+var_dump(tempnam("../bad", "test"));
+var_dump(tempnam("..", "test"));
+var_dump(tempnam("../", "test"));
+var_dump(tempnam("/", "test"));
+var_dump(tempnam("../bad/.", "test"));
+var_dump(tempnam("./../.", "test"));
+
+$file = tempnam($directory."/test/ok", "test");
+var_dump($file);
+var_dump(unlink($file));
+
+test_open_basedir_after("tempnam");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [tempnam] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: tempnam(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: tempnam(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: tempnam(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: tempnam(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: tempnam(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: tempnam(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+string(%d) "%s"
+bool(true)
+*** Finished testing open_basedir configuration [tempnam] ***
+
diff --git a/ext/standard/tests/file/open_basedir_touch.phpt b/ext/standard/tests/file/open_basedir_touch.phpt
new file mode 100644
index 000000000..b0a5aee61
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_touch.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("touch");
+$directory = dirname(__FILE__);
+
+var_dump(touch("../bad"));
+var_dump(touch("../bad/bad.txt"));
+var_dump(touch(".."));
+var_dump(touch("../"));
+var_dump(touch("/"));
+var_dump(touch("../bad/."));
+var_dump(touch("../bad/./bad.txt"));
+var_dump(touch("./../."));
+
+var_dump(touch($directory."/test/ok/ok.txt"));
+var_dump(touch("./ok.txt"));
+var_dump(touch("ok.txt"));
+var_dump(touch("../ok/ok.txt"));
+var_dump(touch("../ok/./ok.txt"));
+
+test_open_basedir_after("touch");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [touch] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: touch(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: touch(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: touch(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: touch(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: touch(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: touch(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: touch(): open_basedir restriction in effect. File(../bad/./bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: touch(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+*** Finished testing open_basedir configuration [touch] ***
+
diff --git a/ext/standard/tests/file/open_basedir_unlink.phpt b/ext/standard/tests/file/open_basedir_unlink.phpt
new file mode 100644
index 000000000..75b0f3f4a
--- /dev/null
+++ b/ext/standard/tests/file/open_basedir_unlink.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test open_basedir configuration
+--INI--
+open_basedir=.
+--FILE--
+<?php
+require_once "open_basedir.inc";
+test_open_basedir_before("unlink");
+$directory = dirname(__FILE__);
+
+var_dump(unlink("../bad/bad.txt"));
+var_dump(unlink(".././bad/bad.txt"));
+var_dump(unlink("../bad/../bad/bad.txt"));
+var_dump(unlink("./.././bad/bad.txt"));
+var_dump(unlink($directory."/test/bad/bad.txt"));
+
+test_open_basedir_after("unlink");
+?>
+--CLEAN--
+<?php
+require_once "open_basedir.inc";
+delete_directories();
+?>
+--EXPECTF--
+*** Testing open_basedir configuration [unlink] ***
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+
+Warning: unlink(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: unlink(): open_basedir restriction in effect. File(.././bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: unlink(): open_basedir restriction in effect. File(../bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: unlink(): open_basedir restriction in effect. File(./.././bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+
+Warning: unlink(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
+bool(false)
+*** Finished testing open_basedir configuration [unlink] ***
+
diff --git a/ext/standard/tests/file/parse_ini_file_error.phpt b/ext/standard/tests/file/parse_ini_file_error.phpt
new file mode 100644
index 000000000..65a6ac1d8
--- /dev/null
+++ b/ext/standard/tests/file/parse_ini_file_error.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test parse_ini_file() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto array parse_ini_file(string filename [, bool process_sections])
+ * Description: Parse configuration file
+ * Source code: ext/standard/basic_functions.c
+ * Alias to functions:
+ */
+
+/*
+ * add a comment here to say what the test is supposed to do
+ */
+
+echo "*** Testing parse_ini_file() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing parse_ini_file() function with Zero arguments --\n";
+var_dump( parse_ini_file() );
+
+//Test parse_ini_file with one more than the expected number of arguments
+echo "\n-- Testing parse_ini_file() function with more than expected no. of arguments --\n";
+$filename = 'string_val';
+$process_sections = true;
+$extra_arg = 10;
+var_dump( parse_ini_file($filename, $process_sections, $extra_arg) );
+
+echo "\n-- Testing parse_ini_file() function with a non-existent file --\n";
+$filename = __FILE__ . 'invalidfilename';
+var_dump( parse_ini_file($filename, $process_sections) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing parse_ini_file() : error conditions ***
+
+-- Testing parse_ini_file() function with Zero arguments --
+
+Warning: Wrong parameter count for parse_ini_file() in %s on line %d
+NULL
+
+-- Testing parse_ini_file() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for parse_ini_file() in %s on line %d
+NULL
+
+-- Testing parse_ini_file() function with a non-existent file --
+
+Warning: parse_ini_file(%s): failed to open stream: No such file or directory in %s on line %d
+array(0) {
+}
+Done
diff --git a/ext/standard/tests/file/realpath_basic2.phpt b/ext/standard/tests/file/realpath_basic2.phpt
new file mode 100644
index 000000000..b71feb98b
--- /dev/null
+++ b/ext/standard/tests/file/realpath_basic2.phpt
@@ -0,0 +1,13 @@
+--TEST--
+realpath() with relative directory
+--FILE--
+<?php
+
+var_dump(realpath('.') == getcwd());
+chdir('..');
+var_dump(realpath('.') == getcwd());
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/standard/tests/file/realpath_basic3.phpt b/ext/standard/tests/file/realpath_basic3.phpt
new file mode 100644
index 000000000..ce9385591
--- /dev/null
+++ b/ext/standard/tests/file/realpath_basic3.phpt
@@ -0,0 +1,86 @@
+--TEST--
+Test realpath() with relative paths
+--FILE--
+<?php
+/* Prototype: string realpath ( string $path );
+ Description: Returns canonicalized absolute pathname
+*/
+
+echo "\n*** Testing basic functions of realpath() with files ***\n";
+
+/* creating directories and files */
+$file_path = dirname(__FILE__);
+mkdir("$file_path/realpath_basic/home/test/", 0777, true);
+
+$file_handle1 = fopen("$file_path/realpath_basic/home/test/realpath_basic.tmp", "w");
+$file_handle2 = fopen("$file_path/realpath_basic/home/realpath_basic.tmp", "w");
+$file_handle3 = fopen("$file_path/realpath_basic/realpath_basic.tmp", "w");
+fclose($file_handle1);
+fclose($file_handle2);
+fclose($file_handle3);
+
+echo "\n*** Testing realpath() on filenames ***\n";
+$filenames = array (
+ /* filenames resulting in valid paths */
+ "./realpath_basic/home/realpath_basic.tmp",
+ "./realpath_basic/realpath_basic.tmp",
+ "./realpath_basic//home/test//../test/./realpath_basic.tmp",
+ "./realpath_basic/home//../././realpath_basic.tmp",
+
+ /* filenames with invalid path */
+ // checking for binary safe
+ "./realpath_basicx000/home/realpath_basic.tmp",
+
+ ".///realpath_basic/home//..//././test//realpath_basic.tmp",
+ "./realpath_basic/home/../home/../test/..realpath_basic.tmp"
+);
+
+chdir("$file_path/..");
+chdir($file_path);
+
+$counter = 1;
+/* loop through $files to read the filepath of $file in the above array */
+foreach($filenames as $file) {
+ echo "\n-- Iteration $counter --\n";
+ var_dump( realpath($file) );
+ $counter++;
+}
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+$name_prefix = dirname(__FILE__)."/realpath_basic";
+unlink("$name_prefix/home/test/realpath_basic.tmp");
+unlink("$name_prefix/home/realpath_basic.tmp");
+unlink("$name_prefix/realpath_basic.tmp");
+rmdir("$name_prefix/home/test/");
+rmdir("$name_prefix/home/");
+rmdir("$name_prefix/");
+?>
+--EXPECTF--
+*** Testing basic functions of realpath() with files ***
+
+*** Testing realpath() on filenames ***
+
+-- Iteration 1 --
+string(%d) "%srealpath_basic%shome%srealpath_basic.tmp"
+
+-- Iteration 2 --
+string(%d) "%srealpath_basic%srealpath_basic.tmp"
+
+-- Iteration 3 --
+string(%d) "%srealpath_basic%shome%stest%srealpath_basic.tmp"
+
+-- Iteration 4 --
+string(%d) "%srealpath_basic%srealpath_basic.tmp"
+
+-- Iteration 5 --
+bool(false)
+
+-- Iteration 6 --
+bool(false)
+
+-- Iteration 7 --
+bool(false)
+Done
diff --git a/ext/standard/tests/file/rename_basic.phpt b/ext/standard/tests/file/rename_basic.phpt
index 8a255ca6e..28d3b1988 100755
--- a/ext/standard/tests/file/rename_basic.phpt
+++ b/ext/standard/tests/file/rename_basic.phpt
@@ -6,7 +6,7 @@ Test rename() function: basic functionality
Description: Renames a file or directory
*/
-echo "*** Testing rename() for basic functions on existing file ***\n";
+echo "*** Testing rename() on non-existing file ***\n";
$file_path = dirname(__FILE__);
$src_name = "$file_path/rename_basic.tmp";
$dest_name = "$file_path/rename_basic_new.tmp";
@@ -16,103 +16,30 @@ $fp = fopen($src_name, "w");
$s1 = stat($src_name);
fclose($fp);
-var_dump( rename($src_name, $dest_name) );
-// ensure that $dest_name didn't get created
-var_dump( file_exists($src_name) ); // expecting false
+var_dump( rename($src_name, $dest_name) ); // expecting true
+var_dump( file_exists($src_name) ); // expecting false
var_dump( file_exists($dest_name) ); // expecting true
$s2 = stat("$file_path/rename_basic_new.tmp");
-// checking statistics of old and renamed file
-// both should be same
+
+// checking statistics of old and renamed file - both should be same
for ($i = 0; $i <= 12; $i++) {
if ($s1[$i] != $s2[$i]) {
echo "rename_basic.tmp and rename_basic_new.tmp stat differ at element $i\n";
}
}
-echo "\n*** Testing rename() on non-existing file ***\n";
-// try renaming a non existing file
-$src_name = $file_path."/non_existent_file.tmp";
-$dest_name = $file_path."/rename_basic_new1.tmp";
-var_dump( rename($src_name, $dest_name) );
-// ensure that $dest_name didn't get created
-var_dump( file_exists($src_name) ); // expecting false
-var_dump( file_exists($dest_name) ); // expecting false
-
-// rename a existing dir to new name
-echo "\n*** Testing rename() on existing directory ***\n";
-$dir_name = $file_path."/rename_basic_dir";
-mkdir($dir_name);
-$new_dir_name = $file_path."/rename_basic_dir1";
-var_dump( rename($dir_name, $new_dir_name) );
-//ensure that $new_dir_name got created
-var_dump( file_exists($dir_name) ); // expecting false
-var_dump( file_exists($new_dir_name) ); // expecting true
-
-// try to rename an non_existing dir
-echo "\n*** Testing rename() on non-existing directory ***\n";
-$non_existent_dir_name = $file_path."/non_existent_dir";
-$new_dir_name = "$file_path/rename_basic_dir2";
-var_dump( rename($non_existent_dir_name, $new_dir_name) );
-// ensure that $new_dir_name didn't get created
-var_dump( file_exists($non_existent_dir_name) ); // expecting flase
-var_dump( file_exists($new_dir_name) ); // expecting false
-
-echo "\n*** Testing rename() by giving stream context as third argument ***\n";
-$context = stream_context_create();
-// on directory
-$dir_name = "$file_path/rename_basic_dir1";
-$new_dir_name = "$file_path/rename_basic_dir3";
-var_dump( rename($dir_name, $new_dir_name, $context) );
-// ensure that $new_dir_name got created
-var_dump( file_exists($dir_name) ); // expecting flase
-var_dump( file_exists($new_dir_name) ); // expecting true
-
-//on file
-$src_name = "$file_path/rename_basic_new.tmp";
-$dest_name = "$file_path/rename_basic_new2.tmp";
-var_dump( rename($src_name, $dest_name, $context) );
-// ensure that $dest_name got created
-var_dump( file_exists($src_name) ); // expecting false
-var_dump( file_exists($dest_name) ); // expecting true
-
echo "Done\n";
?>
--CLEAN--
<?php
-unlink(dirname(__FILE__)."/rename_basic_new2.tmp");
-rmdir(dirname(__FILE__)."/rename_basic_dir3");
+unlink(dirname(__FILE__)."/rename_basic.tmp");
+unlink(dirname(__FILE__)."/rename_basic_new.tmp");
?>
--EXPECTF--
-*** Testing rename() for basic functions on existing file ***
-bool(true)
-bool(false)
-bool(true)
-
*** Testing rename() on non-existing file ***
-
-Warning: rename(%s/non_existent_file.tmp,%s/rename_basic_new1.tmp): No such file or directory in %s on line %d
-bool(false)
-bool(false)
-bool(false)
-
-*** Testing rename() on existing directory ***
-bool(true)
-bool(false)
-bool(true)
-
-*** Testing rename() on non-existing directory ***
-
-Warning: rename(%s/non_existent_dir,%s/rename_basic_dir2): No such file or directory in %s on line %d
-bool(false)
-bool(false)
-bool(false)
-
-*** Testing rename() by giving stream context as third argument ***
-bool(true)
-bool(false)
-bool(true)
bool(true)
bool(false)
bool(true)
Done
+
diff --git a/ext/standard/tests/file/rename_variation-win32.phpt b/ext/standard/tests/file/rename_variation-win32.phpt
index 3cac5ccad..ae9555760 100644
--- a/ext/standard/tests/file/rename_variation-win32.phpt
+++ b/ext/standard/tests/file/rename_variation-win32.phpt
@@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
require dirname(__FILE__).'/file.inc';
-/* creating directory */
+/* create directory */
$file_path = dirname(__FILE__);
mkdir("$file_path/rename_variation");
@@ -30,7 +30,9 @@ $src_filenames = array(
"$file_path/rename_variation//rename_variation.tmp",
"$file_path//rename_variation//rename_variation.tmp",
);
+
$counter = 1;
+
/* loop through each $file and rename it to rename_variation2.tmp */
foreach($src_filenames as $src_filename) {
echo "-- Iteration $counter --\n";
@@ -38,6 +40,7 @@ foreach($src_filenames as $src_filename) {
fclose($fp);
$dest_filename = "$file_path/rename_variation2.tmp";
var_dump( rename($src_filename, $dest_filename) );
+
// ensure that file got renamed to new name
var_dump( file_exists($src_filename) ); // expecting false
var_dump( file_exists($dest_filename) ); // expecting true
@@ -47,90 +50,8 @@ foreach($src_filenames as $src_filename) {
unlink($dest_filename);
}
-// clean the temp dir and file
rmdir("$file_path/rename_variation");
-// rename dirs across directories
-echo "\n*** Testing rename() : renaming directory across directories ***\n";
-$src_dirs = array (
- /* Testing simple directory tree */
- "$file_path/rename_variation/",
-
- /* Testing a dir with trailing slash */
- "$file_path/rename_variation/",
-
- /* Testing dir with double trailing slashes */
- "$file_path//rename_variation//",
-);
-
-$dest_dir = "$file_path/rename_variation_dir";
-// create the $dest_dir
-mkdir($dest_dir);
-
-$counter = 1;
-/* loop through each $src_dirs and rename it to $dest_dir */
-foreach($src_dirs as $src_dir) {
- echo "-- Iteration $counter --\n";
-
- // create the src dir
- mkdir("$file_path/rename_variation/");
- // rename the src dir to a new dir in dest dir
- var_dump( rename($src_dir, $dest_dir."/new_dir") );
- // ensure that dir was renamed
- var_dump( file_exists($src_dir) ); // expecting false
- var_dump( file_exists($dest_dir."/new_dir") ); // expecting true
-
- // remove the new dir
- rmdir($dest_dir."/new_dir");
- $counter++;
-}
-
-/* Renaming a file and directory to numeric name */
-echo "\n*** Testing rename() by renaming a file and directory to numeric name ***\n";
-$fp = fopen($file_path."/rename_variation.tmp", "w");
-fclose($fp);
-// renaming existing file to numeric name
-var_dump( rename($file_path."/rename_variation.tmp", $file_path."/12345") );
-// ensure that rename worked fine
-var_dump( file_exists($file_path."/rename_variation.tmp" ) ); // expecting false
-var_dump( file_exists($file_path."/12345" ) ); // expecting true
-// remove the file
-unlink($file_path."/12345");
-
-// renaming a directory to numeric name
-var_dump( rename($file_path."/rename_variation_dir/", $file_path."/12345") );
-// ensure that rename worked fine
-var_dump( file_exists($file_path."/rename_variation_dir" ) ); // expecting false
-var_dump( file_exists($file_path."/12345" ) ); // expecting true
-
-// delete the file and dir
-rmdir($file_path."/12345");
-
-/* test rename() by trying to rename an existing file/dir to the same name
- and one another */
-// create a dir
-$file_path = dirname(__FILE__);
-$dirname = "$file_path/rename_variation_dir";
-mkdir($dirname);
-//create a file
-$filename = "$file_path/rename_variation.tmp";
-$fp = fopen($filename, "w");
-fclose($fp);
-
-echo "\n-- Renaming file to same file name --\n";
-var_dump( rename($filename, $filename) );
-
-echo "\n-- Renaming directory to same directory name --\n";
-var_dump( rename($dirname, $dirname) );
-
-echo "\n-- Renaming existing file to existing directory name --\n";
-var_dump( rename($filename, $dirname) );
-
-echo "\n-- Renaming existing directory to existing file name --\n";
-$fp = fopen($filename, "w");
-fclose($fp);
-var_dump( rename($dirname, $filename) );
-
echo "Done\n";
?>
--CLEAN--
@@ -147,53 +68,20 @@ bool(true)
bool(false)
bool(true)
-- Iteration 2 --
-bool(true)
-bool(false)
-bool(true)
--- Iteration 3 --
-bool(true)
-bool(false)
-bool(true)
--- Iteration 4 --
-bool(true)
-bool(false)
-bool(true)
-*** Testing rename() : renaming directory across directories ***
--- Iteration 1 --
-bool(true)
+Warning: rename(%s/rename_variation/rename_variation.tmp/,%s/rename_variation2.tmp): Invalid argument in %s on line %d
bool(false)
bool(true)
--- Iteration 2 --
-bool(true)
bool(false)
-bool(true)
--- Iteration 3 --
-bool(true)
-bool(false)
-bool(true)
-*** Testing rename() by renaming a file and directory to numeric name ***
+Warning: unlink(%s/rename_variation2.tmp): No such file or directory in %s on line %d
+-- Iteration 3 --
bool(true)
bool(false)
bool(true)
+-- Iteration 4 --
bool(true)
bool(false)
bool(true)
+Done
--- Renaming file to same file name --
-bool(true)
-
--- Renaming directory to same directory name --
-bool(true)
-
--- Renaming existing file to existing directory name --
-
-Warning: rename(%s,%s): File exists in %s on line %d
-bool(false)
-
--- Renaming existing directory to existing file name --
-
-Warning: rename(%s,%s): File exists in %s on line %d
-bool(false)
-Done \ No newline at end of file
diff --git a/ext/standard/tests/file/rename_variation1-win32.phpt b/ext/standard/tests/file/rename_variation1-win32.phpt
new file mode 100644
index 000000000..0955096d7
--- /dev/null
+++ b/ext/standard/tests/file/rename_variation1-win32.phpt
@@ -0,0 +1,81 @@
+--TEST--
+Test rename() function: usage variations
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip.. only for Windows');
+}
+?>
+--FILE--
+<?php
+/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] );
+ Description: Renames a file or directory
+*/
+
+require dirname(__FILE__).'/file.inc';
+
+/* creating directory */
+$file_path = dirname(__FILE__);
+
+// rename dirs across directories
+echo "\n*** Testing rename() : renaming directory across directories ***\n";
+$src_dirs = array (
+ /* Testing simple directory tree */
+ "$file_path/rename_variation/",
+
+ /* Testing a dir with trailing slash */
+ "$file_path/rename_variation/",
+
+ /* Testing dir with double trailing slashes */
+ "$file_path//rename_variation//",
+);
+
+$dest_dir = "$file_path/rename_variation_dir";
+
+// create the $dest_dir
+mkdir($dest_dir);
+
+$counter = 1;
+
+/* loop through each $src_dirs and rename it to $dest_dir */
+foreach($src_dirs as $src_dir) {
+ echo "-- Iteration $counter --\n";
+
+ // create the src dir
+ mkdir("$file_path/rename_variation/");
+ // rename the src dir to a new dir in dest dir
+ var_dump( rename($src_dir, $dest_dir."/new_dir") );
+ // ensure that dir was renamed
+ var_dump( file_exists($src_dir) ); // expecting false
+ var_dump( file_exists($dest_dir."/new_dir") ); // expecting true
+
+ // remove the new dir
+ rmdir($dest_dir."/new_dir");
+ $counter++;
+}
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+unlink($file_path."/rename_variation_link.tmp");
+unlink($file_path."/rename_variation.tmp");
+rmdir($file_path."/rename_variation_dir");
+?>
+--EXPECTF--
+*** Testing rename() : renaming directory across directories ***
+-- Iteration 1 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 2 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 3 --
+bool(true)
+bool(false)
+bool(true)
+Done
+
diff --git a/ext/standard/tests/file/rename_variation2-win32.phpt b/ext/standard/tests/file/rename_variation2-win32.phpt
new file mode 100644
index 000000000..87f4e7ddb
--- /dev/null
+++ b/ext/standard/tests/file/rename_variation2-win32.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Test rename() function: usage variations
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip.. only for Windows');
+}
+?>
+--FILE--
+<?php
+/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] );
+ Description: Renames a file or directory
+*/
+
+require dirname(__FILE__).'/file.inc';
+
+$file_path = dirname(__FILE__);
+mkdir("$file_path/rename_variation_dir");
+
+/* Renaming a file and directory to numeric name */
+echo "\n*** Testing rename() by renaming a file and directory to numeric name ***\n";
+$fp = fopen($file_path."/rename_variation.tmp", "w");
+fclose($fp);
+
+// renaming existing file to numeric name
+var_dump( rename($file_path."/rename_variation.tmp", $file_path."/12345") );
+
+// ensure that rename worked fine
+var_dump( file_exists($file_path."/rename_variation.tmp" ) ); // expecting false
+var_dump( file_exists($file_path."/12345" ) ); // expecting true
+
+unlink($file_path."/12345");
+
+// renaming a directory to numeric name
+var_dump( rename($file_path."/rename_variation_dir/", $file_path."/12345") );
+
+// ensure that rename worked fine
+var_dump( file_exists($file_path."/rename_variation_dir" ) ); // expecting false
+var_dump( file_exists($file_path."/12345" ) ); // expecting true
+
+rmdir($file_path."/12345");
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+unlink($file_path."/rename_variation_link.tmp");
+unlink($file_path."/rename_variation.tmp");
+rmdir($file_path."/rename_variation_dir");
+?>
+--EXPECTF--
+*** Testing rename() by renaming a file and directory to numeric name ***
+bool(true)
+bool(false)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+Done
+
diff --git a/ext/standard/tests/file/rename_variation3-win32.phpt b/ext/standard/tests/file/rename_variation3-win32.phpt
new file mode 100644
index 000000000..7ad17093d
--- /dev/null
+++ b/ext/standard/tests/file/rename_variation3-win32.phpt
@@ -0,0 +1,69 @@
+--TEST--
+Test rename() function: usage variations
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip.. only for Windows');
+}
+?>
+--FILE--
+<?php
+/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] );
+ Description: Renames a file or directory
+*/
+
+require dirname(__FILE__).'/file.inc';
+
+/* creating directory */
+$file_path = dirname(__FILE__);
+$dirname = "$file_path/rename_variation_dir";
+mkdir($dirname);
+
+/* test rename() by trying to rename an existing file/dir to the same name
+ and one another */
+
+$filename = "$file_path/rename_variation.tmp";
+$fp = fopen($filename, "w");
+fclose($fp);
+
+echo "\n-- Renaming file to same file name --\n";
+var_dump( rename($filename, $filename) );
+
+echo "\n-- Renaming directory to same directory name --\n";
+var_dump( rename($dirname, $dirname) );
+
+echo "\n-- Renaming existing file to existing directory name --\n";
+var_dump( rename($filename, $dirname) );
+
+echo "\n-- Renaming existing directory to existing file name --\n";
+$fp = fopen($filename, "w");
+fclose($fp);
+var_dump( rename($dirname, $filename) );
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+$file_path = dirname(__FILE__);
+unlink($file_path."/rename_variation_link.tmp");
+unlink($file_path."/rename_variation.tmp");
+rmdir($file_path."/rename_variation_dir");
+?>
+--EXPECTF--
+-- Renaming file to same file name --
+bool(true)
+
+-- Renaming directory to same directory name --
+bool(true)
+
+-- Renaming existing file to existing directory name --
+
+Warning: rename(%s/rename_variation.tmp,%s/rename_variation_dir): File exists in %s on line %d
+bool(false)
+
+-- Renaming existing directory to existing file name --
+
+Warning: rename(%s/rename_variation_dir,%s/rename_variation.tmp): File exists in %s on line %d
+bool(false)
+Done
+
diff --git a/ext/standard/tests/file/rename_variation8.phpt b/ext/standard/tests/file/rename_variation8.phpt
new file mode 100644
index 000000000..650b6c990
--- /dev/null
+++ b/ext/standard/tests/file/rename_variation8.phpt
@@ -0,0 +1,67 @@
+--TEST--
+Test rename() function: variation
+--FILE--
+<?php
+/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] );
+ Description: Renames a file or directory
+*/
+
+echo "\n*** Testing rename() on non-existing file ***\n";
+$file_path = dirname(__FILE__);
+
+// try renaming a non existing file
+$src_name = $file_path."/non_existent_file.tmp";
+$dest_name = $file_path."/rename_variation8_new.tmp";
+var_dump( rename($src_name, $dest_name) );
+
+// ensure that $dest_name didn't get created
+var_dump( file_exists($src_name) ); // expecting false
+var_dump( file_exists($dest_name) ); // expecting false
+
+// rename a existing dir to new name
+echo "\n*** Testing rename() on existing directory ***\n";
+$dir_name = $file_path."/rename_basic_dir";
+mkdir($dir_name);
+$new_dir_name = $file_path."/rename_basic_dir1";
+var_dump( rename($dir_name, $new_dir_name) );
+//ensure that $new_dir_name got created
+var_dump( file_exists($dir_name) ); // expecting false
+var_dump( file_exists($new_dir_name) ); // expecting true
+
+// try to rename an non_existing dir
+echo "\n*** Testing rename() on non-existing directory ***\n";
+$non_existent_dir_name = $file_path."/non_existent_dir";
+$new_dir_name = "$file_path/rename_basic_dir2";
+var_dump( rename($non_existent_dir_name, $new_dir_name) );
+// ensure that $new_dir_name didn't get created
+var_dump( file_exists($non_existent_dir_name) ); // expecting flase
+var_dump( file_exists($new_dir_name) ); // expecting false
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+unlink(dirname(__FILE__)."/rename_basic_new2.tmp");
+rmdir(dirname(__FILE__)."/rename_basic_dir1");
+?>
+--EXPECTF--
+*** Testing rename() on non-existing file ***
+
+Warning: rename(%s/non_existent_file.tmp,%s/rename_variation8_new.tmp): No such file or directory in %s on line %d
+bool(false)
+bool(false)
+bool(false)
+
+*** Testing rename() on existing directory ***
+bool(true)
+bool(false)
+bool(true)
+
+*** Testing rename() on non-existing directory ***
+
+Warning: rename(%s/non_existent_dir,%s/rename_basic_dir2): No such file or directory in %s on line %d
+bool(false)
+bool(false)
+bool(false)
+Done
+
diff --git a/ext/standard/tests/file/rename_variation9.phpt b/ext/standard/tests/file/rename_variation9.phpt
new file mode 100644
index 000000000..d923e4a3d
--- /dev/null
+++ b/ext/standard/tests/file/rename_variation9.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test rename() function: basic functionality
+--FILE--
+<?php
+/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] );
+ Description: Renames a file or directory
+*/
+
+echo "\n*** Testing rename() by giving stream context as third argument ***\n";
+$file_path = dirname(__FILE__);
+
+$context = stream_context_create();
+
+// on directory
+$dir_name = "$file_path/rename_variation_dir9";
+$new_dir_name = "$file_path/rename_variation_dir9_new";
+
+mkdir($dir_name);
+
+var_dump( rename($dir_name, $new_dir_name, $context) );
+var_dump( file_exists($dir_name) ); // expecting flase
+var_dump( file_exists($new_dir_name) ); // expecting true
+
+//on file
+$src_name = "$file_path/rename_variation9.tmp";
+$dest_name = "$file_path/rename_variation9_new.tmp";
+
+// create the file
+$fp = fopen($src_name, "w");
+$s1 = stat($src_name);
+fclose($fp);
+
+var_dump( rename($src_name, $dest_name, $context) );
+var_dump( file_exists($src_name) ); // expecting false
+var_dump( file_exists($dest_name) ); // expecting true
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+unlink(dirname(__FILE__)."/rename_variation9_new.tmp");
+rmdir(dirname(__FILE__)."/rename_variation_dir9_new");
+?>
+--EXPECTF--
+*** Testing rename() by giving stream context as third argument ***
+bool(true)
+bool(false)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+Done
+
diff --git a/ext/standard/tests/general_functions/bug42272.phpt b/ext/standard/tests/general_functions/bug42272.phpt
new file mode 100644
index 000000000..5a455d725
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug42272.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #42272: var_export() incorrectly escapes char(0).
+--FILE--
+<?php
+$foo = var_export("\0", true );
+echo $foo, "\n";
+var_export("a\0b");
+?>
+--EXPECT--
+'' . "\0" . ''
+'a' . "\0" . 'b'
diff --git a/ext/standard/tests/general_functions/bug43293_1.phpt b/ext/standard/tests/general_functions/bug43293_1.phpt
new file mode 100644
index 000000000..b4be25233
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug43293_1.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug#43293 (Multiple segfaults in getopt())
+--INI--
+register_argc_argv=Off
+--FILE--
+<?php
+$argv = array(1, 2, 3);
+var_dump(getopt("abcd"));
+var_dump($argv);
+$argv = null;
+var_dump(getopt("abcd"));
+?>
+--EXPECT--
+array(0) {
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+bool(false)
+
diff --git a/ext/standard/tests/general_functions/bug43293_2.phpt b/ext/standard/tests/general_functions/bug43293_2.phpt
new file mode 100644
index 000000000..a91beebac
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug43293_2.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug#43293 (Multiple segfaults in getopt())
+--INI--
+register_argc_argv=Off
+--FILE--
+<?php
+$argv = array(true, false);
+var_dump(getopt("abcd"));
+?>
+--EXPECT--
+array(0) {
+}
+
diff --git a/ext/standard/tests/general_functions/bug43293_3.phpt b/ext/standard/tests/general_functions/bug43293_3.phpt
new file mode 100644
index 000000000..6c846610b
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug43293_3.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug#43293 (Multiple segfaults in getopt())
+--SKIPIF--
+<?php
+@getopt(null, array());
+if(error_get_last() !== null) {
+ echo "skip: longopts not enabled";
+}
+?>
+--ARGS--
+-f --f
+--INI--
+register_argc_argv=On
+--FILE--
+<?php
+$args = array(true, false, "f");
+var_dump(getopt("f", $args), $args);
+?>
+--EXPECT--
+array(1) {
+ ["f"]=>
+ array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+ }
+}
+array(3) {
+ [0]=>
+ bool(true)
+ [1]=>
+ bool(false)
+ [2]=>
+ string(1) "f"
+}
+
diff --git a/ext/standard/tests/general_functions/bug44394.phpt b/ext/standard/tests/general_functions/bug44394.phpt
new file mode 100644
index 000000000..3a619283c
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug44394.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #44394 Last two bytes missing from output
+--FILE--
+<?php
+
+$string = "<a href='a?q=1'>asd</a>";
+
+output_add_rewrite_var('a', 'b');
+
+echo $string;
+
+ob_flush();
+
+ob_end_clean();
+
+?>
+--EXPECT--
+<a href='a?q=1&a=b'>asd</a>
diff --git a/ext/standard/tests/general_functions/bug44394_2.phpt b/ext/standard/tests/general_functions/bug44394_2.phpt
new file mode 100644
index 000000000..68fae55d6
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug44394_2.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #44394 (Last two bytes missing from output) with session.use_trans_id
+--SKIPIF--
+<?php if (!extension_loaded("session")) print "skip"; ?>
+--FILE--
+<?php
+
+ini_set('session.use_trans_sid', 1);
+
+session_start();
+
+ob_start();
+
+$string = "<a href='a?q=1'>asd</a>";
+
+output_add_rewrite_var('a', 'b');
+
+echo $string;
+
+ob_flush();
+
+ob_end_clean();
+
+?>
+--EXPECTF--
+<a href='a?q=1&PHPSESSID=%s&a=b'>asd</a>
diff --git a/ext/standard/tests/general_functions/bug44487.phpt b/ext/standard/tests/general_functions/bug44487.phpt
new file mode 100644
index 000000000..10c52c6b3
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug44487.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #44487 (call_user_method_array issues a warning when throwing an exception)
+--INI--
+error_reporting = E_ALL & ~E_DEPRECATED
+--FILE--
+<?php
+
+class Foo
+{
+ public function test()
+ {
+ print 'test';
+ throw new Exception();
+ }
+}
+
+try {
+ $bar = new Foo();
+ call_user_method_array('test', $bar, array()) ;
+} catch (Exception $e) {
+}
+?>
+--EXPECT--
+test
diff --git a/ext/standard/tests/general_functions/bug44667.phpt b/ext/standard/tests/general_functions/bug44667.phpt
new file mode 100644
index 000000000..49183cc58
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug44667.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Bug #44667 (proc_open() does not handle pipes with the mode 'wb' correctly)
+--SKIPIF--
+<?php if (!is_executable('/bin/cat')) echo 'skip cat not found'; ?>
+--FILE--
+<?php
+
+$pipes = array();
+
+$descriptor_spec = array(
+ 0 => array('pipe', 'rb'),
+ 1 => array('pipe', 'wb'),
+);
+
+$proc = proc_open('cat', $descriptor_spec, $pipes);
+
+fwrite($pipes[0], 'Hello', 5);
+fflush($pipes[0]);
+fclose($pipes[0]);
+
+$result = fread($pipes[1], 5);
+fclose($pipes[1]);
+
+proc_close($proc);
+
+echo "Result is: ", $result, "\n";
+
+echo "Done\n";
+
+?>
+--EXPECTF--
+Result is: Hello
+Done
diff --git a/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt b/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt
index f8cb94fb5..b90d22636 100755
--- a/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt
+++ b/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt
@@ -1,5 +1,7 @@
--TEST--
dl() filename length checks (CVE-2007-4887)
+--INI--
+enable_dl=On
--FILE--
<?php
var_dump(dl(str_repeat("a", 8376757)));
diff --git a/ext/standard/tests/general_functions/getopt_002.phpt b/ext/standard/tests/general_functions/getopt_002.phpt
new file mode 100644
index 000000000..3912ec87c
--- /dev/null
+++ b/ext/standard/tests/general_functions/getopt_002.phpt
@@ -0,0 +1,42 @@
+--TEST--
+getopt#002
+--ARGS--
+-vvv -a value -1111 -2 -v
+--INI--
+register_argc_argv=On
+variables_order=GPS
+--FILE--
+<?php
+ var_dump(getopt("2a:vcd1"));
+?>
+--EXPECT--
+array(4) {
+ ["v"]=>
+ array(4) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+ [2]=>
+ bool(false)
+ [3]=>
+ bool(false)
+ }
+ ["a"]=>
+ string(5) "value"
+ [1]=>
+ array(4) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+ [2]=>
+ bool(false)
+ [3]=>
+ bool(false)
+ }
+ [2]=>
+ bool(false)
+}
+
+
diff --git a/ext/standard/tests/general_functions/import_request.phpt b/ext/standard/tests/general_functions/import_request.phpt
index c48a8f3ed..d9f43e93b 100644
--- a/ext/standard/tests/general_functions/import_request.phpt
+++ b/ext/standard/tests/general_functions/import_request.phpt
@@ -4,6 +4,8 @@ import_request_variables() tests
a=1&b=heh&c=3&d[]=5&GLOBALS=test&1=hm
--POST--
ap=25&bp=test&cp=blah3&dp[]=ar
+--INI--
+register_globals=off
--FILE--
<?php
diff --git a/ext/standard/tests/general_functions/phpinfo.phpt b/ext/standard/tests/general_functions/phpinfo.phpt
index 32125bfce..5b787ab55 100644
--- a/ext/standard/tests/general_functions/phpinfo.phpt
+++ b/ext/standard/tests/general_functions/phpinfo.phpt
@@ -24,7 +24,7 @@ Configure Command => %s
Server API => Command Line Interface
Virtual Directory Support => %s
Configuration File (php.ini) Path => %s
-Loaded Configuration File => %s
+Loaded Configuration File => %a
PHP API => %d
PHP Extension => %d
Zend Extension => %d
diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt
index 6d2df8542..81896550b 100644
--- a/ext/standard/tests/general_functions/var_export-locale.phpt
+++ b/ext/standard/tests/general_functions/var_export-locale.phpt
@@ -572,9 +572,9 @@ string(3) "' '"
Iteration 12
-'\000'
-'\000'
-string(6) "'\000'"
+'' . "\0" . ''
+'' . "\0" . ''
+string(14) "'' . "\0" . ''"
Iteration 13
diff --git a/ext/standard/tests/general_functions/var_export.phpt b/ext/standard/tests/general_functions/var_export.phpt
index 2a99c5bd8..b5cc886e4 100644
--- a/ext/standard/tests/general_functions/var_export.phpt
+++ b/ext/standard/tests/general_functions/var_export.phpt
@@ -565,9 +565,9 @@ string(3) "' '"
Iteration 12
-'\000'
-'\000'
-string(6) "'\000'"
+'' . "\0" . ''
+'' . "\0" . ''
+string(14) "'' . "\0" . ''"
Iteration 13
diff --git a/ext/standard/tests/math/acos_error.phpt b/ext/standard/tests/math/acos_error.phpt
index 6e3f2ecfd..dd42fbb58 100644
--- a/ext/standard/tests/math/acos_error.phpt
+++ b/ext/standard/tests/math/acos_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for acos()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/acosh_error.phpt b/ext/standard/tests/math/acosh_error.phpt
index 8a4b9730e..fd2f92118 100644
--- a/ext/standard/tests/math/acosh_error.phpt
+++ b/ext/standard/tests/math/acosh_error.phpt
@@ -5,7 +5,6 @@ Test wrong number of arguments for acosh()
if(substr(PHP_OS, 0, 3) == "WIN" )
die ("skip - function not supported on Windows");
?>
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/asin_error.phpt b/ext/standard/tests/math/asin_error.phpt
index 21c824b55..ef2a322e0 100644
--- a/ext/standard/tests/math/asin_error.phpt
+++ b/ext/standard/tests/math/asin_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for asin()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/asinh_error.phpt b/ext/standard/tests/math/asinh_error.phpt
index e6439d1bd..96f7ba061 100644
--- a/ext/standard/tests/math/asinh_error.phpt
+++ b/ext/standard/tests/math/asinh_error.phpt
@@ -5,7 +5,6 @@ Test wrong number of arguments for asinh()
if(substr(PHP_OS, 0, 3) == "WIN" )
die ("skip - function not supported on Windows");
?>
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/atan2_basic.phpt b/ext/standard/tests/math/atan2_basic.phpt
new file mode 100644
index 000000000..65a0622c6
--- /dev/null
+++ b/ext/standard/tests/math/atan2_basic.phpt
@@ -0,0 +1,185 @@
+--TEST--
+Test atan2() - basic function test of atan2()
+--INI--
+precision=14
+--FILE--
+<?php
+$valuesy = array(23,
+ -23,
+ 2.345e1,
+ -2.345e1,
+ 0x17,
+ 027,
+ "23",
+ "23.45",
+ "2.345e1",
+ null,
+ true,
+ false);
+
+$valuesx = array(23,
+ -23,
+ 2.345e1,
+ -2.345e1,
+ 0x17,
+ 027,
+ "23",
+ "23.45",
+ "2.345e1",
+ null,
+ true,
+ false);
+
+for ($i = 0; $i < count($valuesy); $i++) {
+ for ($j = 0; $j < count($valuesx); $j++) {
+ $res = atan2($valuesy[$i], $valuesx[$j]);
+ echo "Y:$valuesy[$i] X:$valuesx[$j] ";
+ var_dump($res);
+ }
+}
+?>
+--EXPECTF--
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:-23 float(2.3561944901923)
+Y:23 X:23.45 float(0.77571063007847)
+Y:23 X:-23.45 float(2.3658820235113)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23.45 float(0.77571063007847)
+Y:23 X:2.345e1 float(0.77571063007847)
+Y:23 X: float(1.5707963267949)
+Y:23 X:1 float(1.5273454314034)
+Y:23 X: float(1.5707963267949)
+Y:-23 X:23 float(-0.78539816339745)
+Y:-23 X:-23 float(-2.3561944901923)
+Y:-23 X:23.45 float(-0.77571063007847)
+Y:-23 X:-23.45 float(-2.3658820235113)
+Y:-23 X:23 float(-0.78539816339745)
+Y:-23 X:23 float(-0.78539816339745)
+Y:-23 X:23 float(-0.78539816339745)
+Y:-23 X:23.45 float(-0.77571063007847)
+Y:-23 X:2.345e1 float(-0.77571063007847)
+Y:-23 X: float(-1.5707963267949)
+Y:-23 X:1 float(-1.5273454314034)
+Y:-23 X: float(-1.5707963267949)
+Y:23.45 X:23 float(0.79508569671643)
+Y:23.45 X:-23 float(2.3465069568734)
+Y:23.45 X:23.45 float(0.78539816339745)
+Y:23.45 X:-23.45 float(2.3561944901923)
+Y:23.45 X:23 float(0.79508569671643)
+Y:23.45 X:23 float(0.79508569671643)
+Y:23.45 X:23 float(0.79508569671643)
+Y:23.45 X:23.45 float(0.78539816339745)
+Y:23.45 X:2.345e1 float(0.78539816339745)
+Y:23.45 X: float(1.5707963267949)
+Y:23.45 X:1 float(1.5281782247706)
+Y:23.45 X: float(1.5707963267949)
+Y:-23.45 X:23 float(-0.79508569671643)
+Y:-23.45 X:-23 float(-2.3465069568734)
+Y:-23.45 X:23.45 float(-0.78539816339745)
+Y:-23.45 X:-23.45 float(-2.3561944901923)
+Y:-23.45 X:23 float(-0.79508569671643)
+Y:-23.45 X:23 float(-0.79508569671643)
+Y:-23.45 X:23 float(-0.79508569671643)
+Y:-23.45 X:23.45 float(-0.78539816339745)
+Y:-23.45 X:2.345e1 float(-0.78539816339745)
+Y:-23.45 X: float(-1.5707963267949)
+Y:-23.45 X:1 float(-1.5281782247706)
+Y:-23.45 X: float(-1.5707963267949)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:-23 float(2.3561944901923)
+Y:23 X:23.45 float(0.77571063007847)
+Y:23 X:-23.45 float(2.3658820235113)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23.45 float(0.77571063007847)
+Y:23 X:2.345e1 float(0.77571063007847)
+Y:23 X: float(1.5707963267949)
+Y:23 X:1 float(1.5273454314034)
+Y:23 X: float(1.5707963267949)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:-23 float(2.3561944901923)
+Y:23 X:23.45 float(0.77571063007847)
+Y:23 X:-23.45 float(2.3658820235113)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23.45 float(0.77571063007847)
+Y:23 X:2.345e1 float(0.77571063007847)
+Y:23 X: float(1.5707963267949)
+Y:23 X:1 float(1.5273454314034)
+Y:23 X: float(1.5707963267949)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:-23 float(2.3561944901923)
+Y:23 X:23.45 float(0.77571063007847)
+Y:23 X:-23.45 float(2.3658820235113)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23 float(0.78539816339745)
+Y:23 X:23.45 float(0.77571063007847)
+Y:23 X:2.345e1 float(0.77571063007847)
+Y:23 X: float(1.5707963267949)
+Y:23 X:1 float(1.5273454314034)
+Y:23 X: float(1.5707963267949)
+Y:23.45 X:23 float(0.79508569671643)
+Y:23.45 X:-23 float(2.3465069568734)
+Y:23.45 X:23.45 float(0.78539816339745)
+Y:23.45 X:-23.45 float(2.3561944901923)
+Y:23.45 X:23 float(0.79508569671643)
+Y:23.45 X:23 float(0.79508569671643)
+Y:23.45 X:23 float(0.79508569671643)
+Y:23.45 X:23.45 float(0.78539816339745)
+Y:23.45 X:2.345e1 float(0.78539816339745)
+Y:23.45 X: float(1.5707963267949)
+Y:23.45 X:1 float(1.5281782247706)
+Y:23.45 X: float(1.5707963267949)
+Y:2.345e1 X:23 float(0.79508569671643)
+Y:2.345e1 X:-23 float(2.3465069568734)
+Y:2.345e1 X:23.45 float(0.78539816339745)
+Y:2.345e1 X:-23.45 float(2.3561944901923)
+Y:2.345e1 X:23 float(0.79508569671643)
+Y:2.345e1 X:23 float(0.79508569671643)
+Y:2.345e1 X:23 float(0.79508569671643)
+Y:2.345e1 X:23.45 float(0.78539816339745)
+Y:2.345e1 X:2.345e1 float(0.78539816339745)
+Y:2.345e1 X: float(1.5707963267949)
+Y:2.345e1 X:1 float(1.5281782247706)
+Y:2.345e1 X: float(1.5707963267949)
+Y: X:23 float(0)
+Y: X:-23 float(3.1415926535898)
+Y: X:23.45 float(0)
+Y: X:-23.45 float(3.1415926535898)
+Y: X:23 float(0)
+Y: X:23 float(0)
+Y: X:23 float(0)
+Y: X:23.45 float(0)
+Y: X:2.345e1 float(0)
+Y: X: float(0)
+Y: X:1 float(0)
+Y: X: float(0)
+Y:1 X:23 float(0.043450895391531)
+Y:1 X:-23 float(3.0981417581983)
+Y:1 X:23.45 float(0.042618102024328)
+Y:1 X:-23.45 float(3.0989745515655)
+Y:1 X:23 float(0.043450895391531)
+Y:1 X:23 float(0.043450895391531)
+Y:1 X:23 float(0.043450895391531)
+Y:1 X:23.45 float(0.042618102024328)
+Y:1 X:2.345e1 float(0.042618102024328)
+Y:1 X: float(1.5707963267949)
+Y:1 X:1 float(0.78539816339745)
+Y:1 X: float(1.5707963267949)
+Y: X:23 float(0)
+Y: X:-23 float(3.1415926535898)
+Y: X:23.45 float(0)
+Y: X:-23.45 float(3.1415926535898)
+Y: X:23 float(0)
+Y: X:23 float(0)
+Y: X:23 float(0)
+Y: X:23.45 float(0)
+Y: X:2.345e1 float(0)
+Y: X: float(0)
+Y: X:1 float(0)
+Y: X: float(0)
diff --git a/ext/standard/tests/math/atan2_error.phpt b/ext/standard/tests/math/atan2_error.phpt
new file mode 100644
index 000000000..b56843e3a
--- /dev/null
+++ b/ext/standard/tests/math/atan2_error.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Test atan2() - wrong params atan2()
+--FILE--
+<?php
+atan2();
+atan2(36);
+atan2(36,25,0);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for atan2() in %s on line 2
+
+Warning: Wrong parameter count for atan2() in %s on line 3
+
+Warning: Wrong parameter count for atan2() in %s on line 4
diff --git a/ext/standard/tests/math/atan_error.phpt b/ext/standard/tests/math/atan_error.phpt
index 07cc93aea..c1cbc7c3c 100644
--- a/ext/standard/tests/math/atan_error.phpt
+++ b/ext/standard/tests/math/atan_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for atan()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/atanh_error.phpt b/ext/standard/tests/math/atanh_error.phpt
index cb6fb6def..3201eef20 100644
--- a/ext/standard/tests/math/atanh_error.phpt
+++ b/ext/standard/tests/math/atanh_error.phpt
@@ -5,7 +5,6 @@ Test wrong number of arguments for atanh()
if(substr(PHP_OS, 0, 3) == "WIN" )
die ("skip - function not supported on Windows");
?>
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/base_convert_basic.phpt b/ext/standard/tests/math/base_convert_basic.phpt
new file mode 100644
index 000000000..327f47c75
--- /dev/null
+++ b/ext/standard/tests/math/base_convert_basic.phpt
@@ -0,0 +1,316 @@
+--TEST--
+Test base_convert() - basic function tests base_convert()
+--FILE--
+<?php
+$frombase = array(2,8,10,16,36);
+$tobase = array(2,8,10,16,36);
+
+$values = array(10,
+ 27,
+ 39,
+ 039,
+ 0x5F,
+ "10",
+ "27",
+ "39",
+ "5F",
+ "3XYZ"
+ );
+
+for ($f= 0; $f < count($frombase); $f++) {
+ echo "\n...from base is ", $frombase[$f], "\n";
+ for ($t= 0; $t < count($tobase); $t++) {
+ echo "......to base is ", $tobase[$t], "\n";
+ for ($i =0; $i < count($values); $i++){
+ $res = base_convert($values[$i],$frombase[$f],$tobase[$t]);
+ echo ".........value= ", $values[$i], " res = ", $res, "\n";
+ }
+ }
+}
+?>
+
+--EXPECTF--
+...from base is 2
+......to base is 2
+.........value= 10 res = 10
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 3 res = 0
+.........value= 95 res = 0
+.........value= 10 res = 10
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 5F res = 0
+.........value= 3XYZ res = 0
+......to base is 8
+.........value= 10 res = 2
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 3 res = 0
+.........value= 95 res = 0
+.........value= 10 res = 2
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 5F res = 0
+.........value= 3XYZ res = 0
+......to base is 10
+.........value= 10 res = 2
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 3 res = 0
+.........value= 95 res = 0
+.........value= 10 res = 2
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 5F res = 0
+.........value= 3XYZ res = 0
+......to base is 16
+.........value= 10 res = 2
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 3 res = 0
+.........value= 95 res = 0
+.........value= 10 res = 2
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 5F res = 0
+.........value= 3XYZ res = 0
+......to base is 36
+.........value= 10 res = 2
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 3 res = 0
+.........value= 95 res = 0
+.........value= 10 res = 2
+.........value= 27 res = 0
+.........value= 39 res = 0
+.........value= 5F res = 0
+.........value= 3XYZ res = 0
+
+...from base is 8
+......to base is 2
+.........value= 10 res = 1000
+.........value= 27 res = 10111
+.........value= 39 res = 11
+.........value= 3 res = 11
+.........value= 95 res = 101
+.........value= 10 res = 1000
+.........value= 27 res = 10111
+.........value= 39 res = 11
+.........value= 5F res = 101
+.........value= 3XYZ res = 11
+......to base is 8
+.........value= 10 res = 10
+.........value= 27 res = 27
+.........value= 39 res = 3
+.........value= 3 res = 3
+.........value= 95 res = 5
+.........value= 10 res = 10
+.........value= 27 res = 27
+.........value= 39 res = 3
+.........value= 5F res = 5
+.........value= 3XYZ res = 3
+......to base is 10
+.........value= 10 res = 8
+.........value= 27 res = 23
+.........value= 39 res = 3
+.........value= 3 res = 3
+.........value= 95 res = 5
+.........value= 10 res = 8
+.........value= 27 res = 23
+.........value= 39 res = 3
+.........value= 5F res = 5
+.........value= 3XYZ res = 3
+......to base is 16
+.........value= 10 res = 8
+.........value= 27 res = 17
+.........value= 39 res = 3
+.........value= 3 res = 3
+.........value= 95 res = 5
+.........value= 10 res = 8
+.........value= 27 res = 17
+.........value= 39 res = 3
+.........value= 5F res = 5
+.........value= 3XYZ res = 3
+......to base is 36
+.........value= 10 res = 8
+.........value= 27 res = n
+.........value= 39 res = 3
+.........value= 3 res = 3
+.........value= 95 res = 5
+.........value= 10 res = 8
+.........value= 27 res = n
+.........value= 39 res = 3
+.........value= 5F res = 5
+.........value= 3XYZ res = 3
+
+...from base is 10
+......to base is 2
+.........value= 10 res = 1010
+.........value= 27 res = 11011
+.........value= 39 res = 100111
+.........value= 3 res = 11
+.........value= 95 res = 1011111
+.........value= 10 res = 1010
+.........value= 27 res = 11011
+.........value= 39 res = 100111
+.........value= 5F res = 101
+.........value= 3XYZ res = 11
+......to base is 8
+.........value= 10 res = 12
+.........value= 27 res = 33
+.........value= 39 res = 47
+.........value= 3 res = 3
+.........value= 95 res = 137
+.........value= 10 res = 12
+.........value= 27 res = 33
+.........value= 39 res = 47
+.........value= 5F res = 5
+.........value= 3XYZ res = 3
+......to base is 10
+.........value= 10 res = 10
+.........value= 27 res = 27
+.........value= 39 res = 39
+.........value= 3 res = 3
+.........value= 95 res = 95
+.........value= 10 res = 10
+.........value= 27 res = 27
+.........value= 39 res = 39
+.........value= 5F res = 5
+.........value= 3XYZ res = 3
+......to base is 16
+.........value= 10 res = a
+.........value= 27 res = 1b
+.........value= 39 res = 27
+.........value= 3 res = 3
+.........value= 95 res = 5f
+.........value= 10 res = a
+.........value= 27 res = 1b
+.........value= 39 res = 27
+.........value= 5F res = 5
+.........value= 3XYZ res = 3
+......to base is 36
+.........value= 10 res = a
+.........value= 27 res = r
+.........value= 39 res = 13
+.........value= 3 res = 3
+.........value= 95 res = 2n
+.........value= 10 res = a
+.........value= 27 res = r
+.........value= 39 res = 13
+.........value= 5F res = 5
+.........value= 3XYZ res = 3
+
+...from base is 16
+......to base is 2
+.........value= 10 res = 10000
+.........value= 27 res = 100111
+.........value= 39 res = 111001
+.........value= 3 res = 11
+.........value= 95 res = 10010101
+.........value= 10 res = 10000
+.........value= 27 res = 100111
+.........value= 39 res = 111001
+.........value= 5F res = 1011111
+.........value= 3XYZ res = 11
+......to base is 8
+.........value= 10 res = 20
+.........value= 27 res = 47
+.........value= 39 res = 71
+.........value= 3 res = 3
+.........value= 95 res = 225
+.........value= 10 res = 20
+.........value= 27 res = 47
+.........value= 39 res = 71
+.........value= 5F res = 137
+.........value= 3XYZ res = 3
+......to base is 10
+.........value= 10 res = 16
+.........value= 27 res = 39
+.........value= 39 res = 57
+.........value= 3 res = 3
+.........value= 95 res = 149
+.........value= 10 res = 16
+.........value= 27 res = 39
+.........value= 39 res = 57
+.........value= 5F res = 95
+.........value= 3XYZ res = 3
+......to base is 16
+.........value= 10 res = 10
+.........value= 27 res = 27
+.........value= 39 res = 39
+.........value= 3 res = 3
+.........value= 95 res = 95
+.........value= 10 res = 10
+.........value= 27 res = 27
+.........value= 39 res = 39
+.........value= 5F res = 5f
+.........value= 3XYZ res = 3
+......to base is 36
+.........value= 10 res = g
+.........value= 27 res = 13
+.........value= 39 res = 1l
+.........value= 3 res = 3
+.........value= 95 res = 45
+.........value= 10 res = g
+.........value= 27 res = 13
+.........value= 39 res = 1l
+.........value= 5F res = 2n
+.........value= 3XYZ res = 3
+
+...from base is 36
+......to base is 2
+.........value= 10 res = 100100
+.........value= 27 res = 1001111
+.........value= 39 res = 1110101
+.........value= 3 res = 11
+.........value= 95 res = 101001001
+.........value= 10 res = 100100
+.........value= 27 res = 1001111
+.........value= 39 res = 1110101
+.........value= 5F res = 11000011
+.........value= 3XYZ res = 101100111010111011
+......to base is 8
+.........value= 10 res = 44
+.........value= 27 res = 117
+.........value= 39 res = 165
+.........value= 3 res = 3
+.........value= 95 res = 511
+.........value= 10 res = 44
+.........value= 27 res = 117
+.........value= 39 res = 165
+.........value= 5F res = 303
+.........value= 3XYZ res = 547273
+......to base is 10
+.........value= 10 res = 36
+.........value= 27 res = 79
+.........value= 39 res = 117
+.........value= 3 res = 3
+.........value= 95 res = 329
+.........value= 10 res = 36
+.........value= 27 res = 79
+.........value= 39 res = 117
+.........value= 5F res = 195
+.........value= 3XYZ res = 183995
+......to base is 16
+.........value= 10 res = 24
+.........value= 27 res = 4f
+.........value= 39 res = 75
+.........value= 3 res = 3
+.........value= 95 res = 149
+.........value= 10 res = 24
+.........value= 27 res = 4f
+.........value= 39 res = 75
+.........value= 5F res = c3
+.........value= 3XYZ res = 2cebb
+......to base is 36
+.........value= 10 res = 10
+.........value= 27 res = 27
+.........value= 39 res = 39
+.........value= 3 res = 3
+.........value= 95 res = 95
+.........value= 10 res = 10
+.........value= 27 res = 27
+.........value= 39 res = 39
+.........value= 5F res = 5f
+.........value= 3XYZ res = 3xyz \ No newline at end of file
diff --git a/ext/standard/tests/math/base_convert_error.phpt b/ext/standard/tests/math/base_convert_error.phpt
new file mode 100644
index 000000000..7806c5648
--- /dev/null
+++ b/ext/standard/tests/math/base_convert_error.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test base_convert() - wrong params base_convert()
+--FILE--
+<?php
+base_convert();
+base_convert(35);
+base_convert(35,2);
+base_convert(1234, 1, 10);
+base_convert(1234, 10, 37);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for base_convert() in %s on line 2
+
+Warning: Wrong parameter count for base_convert() in %s on line 3
+
+Warning: Wrong parameter count for base_convert() in %s on line 4
+
+Warning: base_convert(): Invalid `from base' (1) in %s on line 5
+
+Warning: base_convert(): Invalid `to base' (37) in %s on line 6
diff --git a/ext/standard/tests/math/bindec_basic.phpt b/ext/standard/tests/math/bindec_basic.phpt
new file mode 100644
index 000000000..e50dc8d48
--- /dev/null
+++ b/ext/standard/tests/math/bindec_basic.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test bindec() - basic function test bindec()
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+$values = array(111000111,
+ 011100000,
+ 1111111111111111111111111111111,
+ 10000000000000000000000000000000,
+ 100002001,
+ '111000111',
+ '011100000',
+ '1111111111111111111111111111111',
+ '10000000000000000000000000000000',
+ '100002001',
+ 'abcdefg',
+ 311015,
+ 31101.3,
+ 31.1013e5,
+ 0x111ABC,
+ 011237,
+ true,
+ false,
+ null);
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = bindec($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+int(455)
+int(0)
+int(32766)
+int(5)
+int(129)
+int(455)
+int(224)
+int(2147483647)
+float(2147483648)
+int(129)
+int(0)
+int(13)
+int(13)
+int(26)
+int(6)
+int(0)
+int(1)
+int(0)
+int(0)
diff --git a/ext/standard/tests/math/bindec_basic_64bit.phpt b/ext/standard/tests/math/bindec_basic_64bit.phpt
new file mode 100644
index 000000000..006983717
--- /dev/null
+++ b/ext/standard/tests/math/bindec_basic_64bit.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Test bindec() - basic function test bindec()
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+$values = array(111000111,
+ 011100000,
+ 1111111111111111111111111111111,
+ 10000000000000000000000000000000,
+ 100002001,
+ '111000111',
+ '011100000',
+ '1111111111111111111111111111111',
+ '10000000000000000000000000000000',
+ '100002001',
+ 'abcdefg',
+ 311015,
+ 31101.3,
+ 31.1013e5,
+ 0x111ABC,
+ 011237,
+ true,
+ false,
+ null);
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = bindec($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+int(455)
+int(0)
+int(32766)
+int(5)
+int(129)
+int(455)
+int(224)
+int(2147483647)
+int(2147483648)
+int(129)
+int(0)
+int(13)
+int(13)
+int(26)
+int(6)
+int(0)
+int(1)
+int(0)
+int(0)
diff --git a/ext/standard/tests/math/bindec_error.phpt b/ext/standard/tests/math/bindec_error.phpt
new file mode 100644
index 000000000..36193b63e
--- /dev/null
+++ b/ext/standard/tests/math/bindec_error.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Test bindec() - basic function test bindec()
+--FILE--
+<?php
+bindec();
+bindec('01010101111',true);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for bindec() in %s on line 2
+
+Warning: Wrong parameter count for bindec() in %s on line 3
diff --git a/ext/standard/tests/math/constants_basic.phpt b/ext/standard/tests/math/constants_basic.phpt
new file mode 100644
index 000000000..0220d9335
--- /dev/null
+++ b/ext/standard/tests/math/constants_basic.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Test for pre-defined math constants
+--INI--
+precision=14
+--FILE--
+<?php
+echo "M_E= ";
+var_dump(M_E);
+echo "M_LOG2E= ";
+var_dump(M_LOG2E);
+echo "M_LOG10E= ";
+var_dump(M_LOG10E);
+echo "M_LN2= ";
+var_dump(M_LN2);
+echo "M_LN10= ";
+var_dump(M_LN10);
+echo "M_PI= ";
+var_dump(M_PI);
+echo "M_PI_2= ";
+var_dump(M_PI_2);
+echo "M_PI_4= ";
+var_dump(M_PI_4);
+echo "M_1_PI= ";
+var_dump(M_1_PI);
+echo "M_2_PI= ";
+var_dump(M_2_PI);
+echo "M_SQRTPI= ";
+var_dump(M_SQRTPI);
+echo "M_2_SQRTPI= ";
+var_dump(M_2_SQRTPI);
+echo "M_LNPI= ";
+var_dump(M_LNPI);
+echo "M_EULER= ";
+var_dump(M_EULER);
+echo "M_SQRT2= ";
+var_dump(M_SQRT2);
+echo "M_SQRT1_2= ";
+var_dump(M_SQRT1_2);
+echo "M_SQRT3= ";
+var_dump(M_SQRT3);
+echo "INF= ";
+var_dump(INF);
+echo "NAN= ";
+var_dump(NAN);
+?>
+--EXPECT--
+M_E= float(2.718281828459)
+M_LOG2E= float(1.442695040889)
+M_LOG10E= float(0.43429448190325)
+M_LN2= float(0.69314718055995)
+M_LN10= float(2.302585092994)
+M_PI= float(3.1415926535898)
+M_PI_2= float(1.5707963267949)
+M_PI_4= float(0.78539816339745)
+M_1_PI= float(0.31830988618379)
+M_2_PI= float(0.63661977236758)
+M_SQRTPI= float(1.7724538509055)
+M_2_SQRTPI= float(1.1283791670955)
+M_LNPI= float(1.1447298858494)
+M_EULER= float(0.57721566490153)
+M_SQRT2= float(1.4142135623731)
+M_SQRT1_2= float(0.70710678118655)
+M_SQRT3= float(1.7320508075689)
+INF= float(INF)
+NAN= float(NAN)
diff --git a/ext/standard/tests/math/cos_error.phpt b/ext/standard/tests/math/cos_error.phpt
index 1a9a26ce6..3198b9e82 100644
--- a/ext/standard/tests/math/cos_error.phpt
+++ b/ext/standard/tests/math/cos_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for cos()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/cosh_error.phpt b/ext/standard/tests/math/cosh_error.phpt
index f91cb256a..f4552e61c 100644
--- a/ext/standard/tests/math/cosh_error.phpt
+++ b/ext/standard/tests/math/cosh_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for cosh()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/decbin_basic.phpt b/ext/standard/tests/math/decbin_basic.phpt
new file mode 100644
index 000000000..e6fc5dc30
--- /dev/null
+++ b/ext/standard/tests/math/decbin_basic.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test decbin() - basic function test
+--FILE--
+<?php
+$values = array(10,
+ 3950.5,
+ 3.9505e3,
+ 039,
+ 0x5F,
+ "10",
+ "3950.5",
+ "3.9505e3",
+ "039",
+ "0x5F",
+ true,
+ false,
+ null,
+ );
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = decbin($values[$i]);
+ var_dump($res);
+}
+?>
+
+--EXPECTF--
+string(4) "1010"
+string(12) "111101101110"
+string(12) "111101101110"
+string(2) "11"
+string(7) "1011111"
+string(4) "1010"
+string(12) "111101101110"
+string(2) "11"
+string(6) "100111"
+string(1) "0"
+string(1) "1"
+string(1) "0"
+string(1) "0" \ No newline at end of file
diff --git a/ext/standard/tests/math/decbin_error.phpt b/ext/standard/tests/math/decbin_error.phpt
new file mode 100644
index 000000000..a350cee7f
--- /dev/null
+++ b/ext/standard/tests/math/decbin_error.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Test decbin() - wrong params
+--FILE--
+<?php
+decbin();
+decbin(23,2,true);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for decbin() in %s on line 2
+
+Warning: Wrong parameter count for decbin() in %s on line 3
+
diff --git a/ext/standard/tests/math/dechex_basic.phpt b/ext/standard/tests/math/dechex_basic.phpt
new file mode 100644
index 000000000..cba4aa632
--- /dev/null
+++ b/ext/standard/tests/math/dechex_basic.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test dechex() - basic function dechex()
+--FILE--
+<?php
+$values = array(10,
+ 3950.5,
+ 3.9505e3,
+ 039,
+ 0x5F,
+ "10",
+ "3950.5",
+ "3.9505e3",
+ "039",
+ "0x5F",
+ true,
+ false,
+ null,
+ );
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = dechex($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+string(1) "a"
+string(3) "f6e"
+string(3) "f6e"
+string(1) "3"
+string(2) "5f"
+string(1) "a"
+string(3) "f6e"
+string(1) "3"
+string(2) "27"
+string(1) "0"
+string(1) "1"
+string(1) "0"
+string(1) "0" \ No newline at end of file
diff --git a/ext/standard/tests/math/dechex_error.phpt b/ext/standard/tests/math/dechex_error.phpt
new file mode 100644
index 000000000..f83afb346
--- /dev/null
+++ b/ext/standard/tests/math/dechex_error.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Test dechex() - wrong params dechex()
+--FILE--
+<?php
+dechex();
+dechex(23,2,true);
+?>
+
+--EXPECTF--
+
+Warning: Wrong parameter count for dechex() in %s on line 2
+
+Warning: Wrong parameter count for dechex() in %s on line 3
diff --git a/ext/standard/tests/math/decoct_basic.phpt b/ext/standard/tests/math/decoct_basic.phpt
new file mode 100644
index 000000000..3021e6be1
--- /dev/null
+++ b/ext/standard/tests/math/decoct_basic.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test decoct() - basic function test decoct()
+--FILE--
+<?php
+$values = array(10,
+ 3950.5,
+ 3.9505e3,
+ 039,
+ 0x5F,
+ "10",
+ "3950.5",
+ "3.9505e3",
+ "039",
+ "0x5F",
+ true,
+ false,
+ null,
+ );
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = decoct($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+string(2) "12"
+string(4) "7556"
+string(4) "7556"
+string(1) "3"
+string(3) "137"
+string(2) "12"
+string(4) "7556"
+string(1) "3"
+string(2) "47"
+string(1) "0"
+string(1) "1"
+string(1) "0"
+string(1) "0"
diff --git a/ext/standard/tests/math/decoct_error.phpt b/ext/standard/tests/math/decoct_error.phpt
new file mode 100644
index 000000000..48c30644f
--- /dev/null
+++ b/ext/standard/tests/math/decoct_error.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Test decoct() - wrong params decoct()
+--FILE--
+<?php
+decoct();
+decoct(23,2,true);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for decoct() in %s on line 2
+
+Warning: Wrong parameter count for decoct() in %s on line 3
+
diff --git a/ext/standard/tests/math/deg2rad_basic.phpt b/ext/standard/tests/math/deg2rad_basic.phpt
new file mode 100644
index 000000000..64771b998
--- /dev/null
+++ b/ext/standard/tests/math/deg2rad_basic.phpt
@@ -0,0 +1,67 @@
+--TEST--
+Test return type and value for expected input deg2rad()
+--INI--
+precision = 14
+--FILE--
+<?php
+/*
+ * proto float deg2rad(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+$file_path = dirname(__FILE__);
+require($file_path."/allowed_rounding_error.inc");
+
+$arg_0 = 0.0;
+$arg_1 = 90.0;
+$arg_2 = 180.0;
+$arg_3 = 360.0;
+
+
+echo "deg2rad $arg_0 = ";
+$r0 = deg2rad($arg_0);
+var_dump($r0);
+if (allowed_rounding_error($r0 ,0 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+
+echo "deg2rad $arg_1 = ";
+$r1 = deg2rad($arg_1);
+var_dump($r1);
+if (allowed_rounding_error($r1 ,1.5707963267949 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+echo "deg2rad $arg_2 = ";
+$r2 = deg2rad($arg_2);
+var_dump($r2);
+if (allowed_rounding_error($r2 ,3.1415926535898 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+echo "deg2rad $arg_3 = ";
+$r3 = deg2rad($arg_3);
+var_dump($r3);
+if (allowed_rounding_error($r3 ,6.2831853071796 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+?>
+--EXPECTF--
+deg2rad 0 = float(%f)
+Pass
+deg2rad 90 = float(%f)
+Pass
+deg2rad 180 = float(%f)
+Pass
+deg2rad 360 = float(%f)
+Pass
diff --git a/ext/standard/tests/math/deg2rad_error.phpt b/ext/standard/tests/math/deg2rad_error.phpt
new file mode 100644
index 000000000..3cfdfc304
--- /dev/null
+++ b/ext/standard/tests/math/deg2rad_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test wrong number of arguments for deg2rad()
+--INI--
+precision = 14
+--FILE--
+<?php
+/*
+ * proto float deg2rad(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+$arg_0 = 1.0;
+$extra_arg = 1;
+
+echo "\nToo many arguments\n";
+var_dump(deg2rad($arg_0, $extra_arg));
+
+echo "\nToo few arguments\n";
+var_dump(deg2rad());
+
+?>
+--EXPECTF--
+Too many arguments
+
+Warning: Wrong parameter count for deg2rad() in %s on line 11
+NULL
+
+Too few arguments
+
+Warning: Wrong parameter count for deg2rad() in %s on line 14
+NULL
diff --git a/ext/standard/tests/math/deg2rad_variation.phpt b/ext/standard/tests/math/deg2rad_variation.phpt
new file mode 100644
index 000000000..4ce8900a9
--- /dev/null
+++ b/ext/standard/tests/math/deg2rad_variation.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test variations in usage of deg2rad()
+--INI--
+precision = 10
+--FILE--
+<?php
+/*
+ * proto float deg2rad(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+
+//Test deg2rad with a different input values
+
+$values = array(23,
+ -23,
+ 2.345e1,
+ -2.345e1,
+ 0x17,
+ 027,
+ "23",
+ "23.45",
+ "2.345e1",
+ "nonsense",
+ "1000",
+ "1000ABC",
+ null,
+ true,
+ false);
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = deg2rad($values[$i]);
+ var_dump($res);
+}
+
+?>
+--EXPECT--
+float(0.401425728)
+float(-0.401425728)
+float(0.4092797096)
+float(-0.4092797096)
+float(0.401425728)
+float(0.401425728)
+float(0.401425728)
+float(0.4092797096)
+float(0.4092797096)
+float(0)
+float(17.45329252)
+float(17.45329252)
+float(0)
+float(0.01745329252)
+float(0)
diff --git a/ext/standard/tests/math/exp_error.phpt b/ext/standard/tests/math/exp_error.phpt
new file mode 100644
index 000000000..21949f4a7
--- /dev/null
+++ b/ext/standard/tests/math/exp_error.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Test exp() - wrong params for exp()
+--INI--
+precision=14
+--FILE--
+<?php
+exp();
+exp(23,true);
+?>
+--EXPECTF--
+
+Warning: exp() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: exp() expects exactly 1 parameter, 2 given in %s on line %d
diff --git a/ext/standard/tests/math/fmod_basic.phpt b/ext/standard/tests/math/fmod_basic.phpt
new file mode 100644
index 000000000..c29abca9d
--- /dev/null
+++ b/ext/standard/tests/math/fmod_basic.phpt
@@ -0,0 +1,209 @@
+--TEST--
+Test fmod() - basic function test fmod()
+--INI--
+precision=14
+--FILE--
+<?php
+$values1 = array(234,
+ -234,
+ 23.45e1,
+ -23.45e1,
+ 0xEA,
+ 0352,
+ "234",
+ "234.5",
+ "23.45e1",
+ null,
+ true,
+ false);
+
+$values2 = array(2,
+ -2,
+ 2.3e1,
+ -2.3e1,
+ 0x2,
+ 02,
+ "2",
+ "2.3",
+ "2.3e1",
+ null,
+ true,
+ false);
+for ($i = 0; $i < count($values1); $i++) {
+ echo "\niteration ", $i, "\n";
+
+ for ($j = 0; $j < count($values2); $j++) {
+ $res = fmod($values1[$i], $values2[$j]);
+ var_dump($res);
+ }
+}
+?>
+--EXPECTF--
+
+iteration 0
+float(0)
+float(0)
+float(4)
+float(4)
+float(0)
+float(0)
+float(0)
+float(1.7)
+float(4)
+float(NAN)
+float(0)
+float(NAN)
+
+iteration 1
+float(-0)
+float(-0)
+float(-4)
+float(-4)
+float(-0)
+float(-0)
+float(-0)
+float(-1.7)
+float(-4)
+float(NAN)
+float(-0)
+float(NAN)
+
+iteration 2
+float(0.5)
+float(0.5)
+float(4.5)
+float(4.5)
+float(0.5)
+float(0.5)
+float(0.5)
+float(2.2)
+float(4.5)
+float(NAN)
+float(0.5)
+float(NAN)
+
+iteration 3
+float(-0.5)
+float(-0.5)
+float(-4.5)
+float(-4.5)
+float(-0.5)
+float(-0.5)
+float(-0.5)
+float(-2.2)
+float(-4.5)
+float(NAN)
+float(-0.5)
+float(NAN)
+
+iteration 4
+float(0)
+float(0)
+float(4)
+float(4)
+float(0)
+float(0)
+float(0)
+float(1.7)
+float(4)
+float(NAN)
+float(0)
+float(NAN)
+
+iteration 5
+float(0)
+float(0)
+float(4)
+float(4)
+float(0)
+float(0)
+float(0)
+float(1.7)
+float(4)
+float(NAN)
+float(0)
+float(NAN)
+
+iteration 6
+float(0)
+float(0)
+float(4)
+float(4)
+float(0)
+float(0)
+float(0)
+float(1.7)
+float(4)
+float(NAN)
+float(0)
+float(NAN)
+
+iteration 7
+float(0.5)
+float(0.5)
+float(4.5)
+float(4.5)
+float(0.5)
+float(0.5)
+float(0.5)
+float(2.2)
+float(4.5)
+float(NAN)
+float(0.5)
+float(NAN)
+
+iteration 8
+float(0.5)
+float(0.5)
+float(4.5)
+float(4.5)
+float(0.5)
+float(0.5)
+float(0.5)
+float(2.2)
+float(4.5)
+float(NAN)
+float(0.5)
+float(NAN)
+
+iteration 9
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(NAN)
+float(0)
+float(NAN)
+
+iteration 10
+float(1)
+float(1)
+float(1)
+float(1)
+float(1)
+float(1)
+float(1)
+float(1)
+float(1)
+float(NAN)
+float(0)
+float(NAN)
+
+iteration 11
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(0)
+float(NAN)
+float(0)
+float(NAN)
diff --git a/ext/standard/tests/math/fmod_error.phpt b/ext/standard/tests/math/fmod_error.phpt
new file mode 100644
index 000000000..42a6ad1a0
--- /dev/null
+++ b/ext/standard/tests/math/fmod_error.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test fmod() - wrong params test fmod()
+--INI--
+precision=14
+--FILE--
+<?php
+fmod();
+fmod(23);
+fmod(23,2,true);
+?>
+--EXPECTF--
+
+Warning: fmod() expects exactly 2 parameters, 0 given in %s on line 2
+
+Warning: fmod() expects exactly 2 parameters, 1 given in %s on line 3
+
+Warning: fmod() expects exactly 2 parameters, 3 given in %s on line 4
diff --git a/ext/standard/tests/math/getrandmax_basic.phpt b/ext/standard/tests/math/getrandmax_basic.phpt
new file mode 100644
index 000000000..4e52c192d
--- /dev/null
+++ b/ext/standard/tests/math/getrandmax_basic.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Test getrandmax() - basic function test getrandmax()
+--FILE--
+<?php
+$biggest_int = getrandmax();
+var_dump($biggest_int);
+?>
+--EXPECTF--
+int(%d) \ No newline at end of file
diff --git a/ext/standard/tests/math/getrandmax_error.phpt b/ext/standard/tests/math/getrandmax_error.phpt
new file mode 100644
index 000000000..9f244a2a6
--- /dev/null
+++ b/ext/standard/tests/math/getrandmax_error.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Test getrandmax() - wrong params test getrandmax()
+--FILE--
+<?php
+var_dump($biggest_int = getrandmax(true));
+?>
+--EXPECTF--
+Warning: Wrong parameter count for getrandmax() in %s on line 2
+NULL
diff --git a/ext/standard/tests/math/hexdec_basic.phpt b/ext/standard/tests/math/hexdec_basic.phpt
new file mode 100644
index 000000000..1c42ae7e4
--- /dev/null
+++ b/ext/standard/tests/math/hexdec_basic.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Test hexdec() - basic function test hexdec()
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+$values = array(0x123abc,
+ 0x789DEF,
+ 0x7FFFFFFF,
+ 0x80000000,
+ '0x123abc',
+ '0x789DEF',
+ '0x7FFFFFFF',
+ '0x80000000',
+ '0x123XYZABC',
+ 311015,
+ '311015',
+ 31101.3,
+ 31.1013e5,
+ 011237,
+ '011237',
+ true,
+ false,
+ null);
+for ($i = 0; $i < count($values); $i++) {
+ $res = hexdec($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+int(18433668)
+int(126895953)
+float(142929835591)
+float(142929835592)
+int(1194684)
+int(7904751)
+int(2147483647)
+float(2147483648)
+int(1194684)
+int(3215381)
+int(3215381)
+int(3215379)
+int(51446064)
+int(18279)
+int(70199)
+int(1)
+int(0)
+int(0)
diff --git a/ext/standard/tests/math/hexdec_error.phpt b/ext/standard/tests/math/hexdec_error.phpt
new file mode 100644
index 000000000..06ce3fb20
--- /dev/null
+++ b/ext/standard/tests/math/hexdec_error.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Test hexdec() - wrong params test hexdec()
+--FILE--
+<?php
+hexdec();
+hexdec('0x123abc',true);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for hexdec() in %s on line 2
+
+Warning: Wrong parameter count for hexdec() in %s on line 3
diff --git a/ext/standard/tests/math/hypot_error.phpt b/ext/standard/tests/math/hypot_error.phpt
new file mode 100644
index 000000000..19a9ee085
--- /dev/null
+++ b/ext/standard/tests/math/hypot_error.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test hypot() - wrong params test hypot()
+--INI--
+precision=14
+--FILE--
+<?php
+hypot();
+hypot(36);
+hypot(36,25,0);
+?>
+--EXPECTF--
+
+
+Warning: Wrong parameter count for hypot() in %s on line 2
+
+Warning: Wrong parameter count for hypot() in %s on line 3
+
+Warning: Wrong parameter count for hypot() in %s on line 4
diff --git a/ext/standard/tests/math/is_finite_basic.phpt b/ext/standard/tests/math/is_finite_basic.phpt
new file mode 100644
index 000000000..85d268527
--- /dev/null
+++ b/ext/standard/tests/math/is_finite_basic.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test is_finite() - basic function test is_finite()
+--FILE--
+<?php
+$values = array(234,
+ -234,
+ 23.45e1,
+ -23.45e1,
+ 0xEA,
+ 0352,
+ "234",
+ "234.5",
+ "23.45e1",
+ null,
+ true,
+ false,
+ pow(0, -2),
+ acos(1.01));
+;
+for ($i = 0; $i < count($values); $i++) {
+ $res = is_finite($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+
+
diff --git a/ext/standard/tests/math/is_finite_error.phpt b/ext/standard/tests/math/is_finite_error.phpt
new file mode 100644
index 000000000..e26563079
--- /dev/null
+++ b/ext/standard/tests/math/is_finite_error.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Test is_finite() - wrong params test is_finite()
+--FILE--
+<?php
+is_finite();
+is_finite(23,2,true);
+?>
+--EXPECTF--
+
+Warning: is_finite() expects exactly 1 parameter, 0 given in %s on line 2
+
+Warning: is_finite() expects exactly 1 parameter, 3 given in %s on line 3
+
diff --git a/ext/standard/tests/math/is_infinite_basic.phpt b/ext/standard/tests/math/is_infinite_basic.phpt
new file mode 100644
index 000000000..ca7992228
--- /dev/null
+++ b/ext/standard/tests/math/is_infinite_basic.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test is_infinite() - basic function test is_infinite()
+--FILE--
+<?php
+$values = array(234,
+ -234,
+ 23.45e1,
+ -23.45e1,
+ 0xEA,
+ 0352,
+ "234",
+ "234.5",
+ "23.45e1",
+ null,
+ true,
+ false,
+ pow(0, -2),
+ acos(1.01));
+;
+for ($i = 0; $i < count($values); $i++) {
+ $res = is_infinite($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+
+
+
diff --git a/ext/standard/tests/math/is_infinite_error.phpt b/ext/standard/tests/math/is_infinite_error.phpt
new file mode 100644
index 000000000..5d6ad9d42
--- /dev/null
+++ b/ext/standard/tests/math/is_infinite_error.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Test is_infinite() - wrong params test is_infinite()
+--FILE--
+<?php
+is_infinite();
+is_infinite(23,2,true);
+?>
+--EXPECTF--
+
+Warning: is_infinite() expects exactly 1 parameter, 0 given in %s on line 2
+
+Warning: is_infinite() expects exactly 1 parameter, 3 given in %s on line 3
diff --git a/ext/standard/tests/math/is_nan_basic.phpt b/ext/standard/tests/math/is_nan_basic.phpt
new file mode 100644
index 000000000..fb10737ce
--- /dev/null
+++ b/ext/standard/tests/math/is_nan_basic.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test is_nan() - basic function test is_nan()
+--FILE--
+<?php
+$values = array(234,
+ -234,
+ 23.45e1,
+ -23.45e1,
+ 0xEA,
+ 0352,
+ "234",
+ "234.5",
+ "23.45e1",
+ null,
+ true,
+ false,
+ pow(0, -2),
+ acos(1.01));
+
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = is_nan($values[$i]);
+ var_dump($res);
+}
+
+?>
+
+--EXPECTF--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+
+
+
diff --git a/ext/standard/tests/math/is_nan_error.phpt b/ext/standard/tests/math/is_nan_error.phpt
new file mode 100644
index 000000000..7749e4e40
--- /dev/null
+++ b/ext/standard/tests/math/is_nan_error.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Test is_nan() - wrong params test is_nan()
+--FILE--
+<?php
+is_nan();
+is_nan(23,2,true);
+?>
+--EXPECTF--
+
+Warning: is_nan() expects exactly 1 parameter, 0 given in %s on line 2
+
+Warning: is_nan() expects exactly 1 parameter, 3 given in %s on line 3
+
+
+
+
diff --git a/ext/standard/tests/math/lcg_value_basic.phpt b/ext/standard/tests/math/lcg_value_basic.phpt
new file mode 100644
index 000000000..6d624d84a
--- /dev/null
+++ b/ext/standard/tests/math/lcg_value_basic.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Maths test for xapic versions of lcg_value()
+--FILE--
+<?php
+
+echo "MATHS test script started\n";
+
+
+echo "\n lcg_value tests...\n";
+for ($i = 0; $i < 100; $i++) {
+ $res = lcg_value();
+
+ if (!is_float($res) || $res < 0 || $res > 1) {
+ break;
+ }
+}
+
+if ($i != 100) {
+ echo "FAILED\n";
+} else {
+ echo "PASSED\n";
+}
+
+echo "\n lcg_value error cases..spurious args get ignored\n";
+$res = lcg_value(23);
+
+if (!is_float($res) || $res < 0 || $res > 1) {
+ echo "FAILED\n";
+} else {
+ echo "PASSED\n";
+}
+
+$res = lcg_value(10,false);
+if (!is_float($res) || $res < 0 || $res > 1) {
+ echo "FAILED\n";
+} else {
+ echo "PASSED\n";
+}
+
+echo "MATHS test script completed\n";
+
+?>
+
+--EXPECT--
+MATHS test script started
+
+ lcg_value tests...
+PASSED
+
+ lcg_value error cases..spurious args get ignored
+PASSED
+PASSED
+MATHS test script completed
+
+
+
diff --git a/ext/standard/tests/math/log10_basic.phpt b/ext/standard/tests/math/log10_basic.phpt
new file mode 100644
index 000000000..0877df23d
--- /dev/null
+++ b/ext/standard/tests/math/log10_basic.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Test return type and value for expected input log10()
+--INI--
+precision = 14
+--FILE--
+<?php
+/*
+ * proto float log10(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+$file_path = dirname(__FILE__);
+require($file_path."/allowed_rounding_error.inc");
+
+$arg_0 = 1.0;
+$arg_1 = 10.0;
+$arg_2 = 100.0;
+
+echo "log10 $arg_0 = ";
+$r0 = log10($arg_0);
+var_dump($r0);
+if (allowed_rounding_error($r0 ,0.0 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+
+echo "log10 $arg_1 = ";
+$r1 = log10($arg_1);
+var_dump($r1);
+if (allowed_rounding_error($r1 ,1.0 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+
+echo "log10 $arg_2 = ";
+$r2 = log10($arg_2);
+var_dump($r2);
+if (allowed_rounding_error($r2 ,2.0 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+?>
+--EXPECTF--
+log10 1 = float(%f)
+Pass
+log10 10 = float(%f)
+Pass
+log10 100 = float(%f)
+Pass
diff --git a/ext/standard/tests/math/log10_error.phpt b/ext/standard/tests/math/log10_error.phpt
new file mode 100644
index 000000000..083494a84
--- /dev/null
+++ b/ext/standard/tests/math/log10_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test wrong number of arguments for log10()
+--INI--
+precision = 14
+--FILE--
+<?php
+/*
+ * proto float log10(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+$arg_0 = 1.0;
+$extra_arg = 1;
+
+echo "\nToo many arguments\n";
+var_dump(log10($arg_0, $extra_arg));
+
+echo "\nToo few arguments\n";
+var_dump(log10());
+
+?>
+--EXPECTF--
+Too many arguments
+
+Warning: Wrong parameter count for log10() in %s on line 11
+NULL
+
+Too few arguments
+
+Warning: Wrong parameter count for log10() in %s on line 14
+NULL
diff --git a/ext/standard/tests/math/log10_variation.phpt b/ext/standard/tests/math/log10_variation.phpt
new file mode 100644
index 000000000..746412a44
--- /dev/null
+++ b/ext/standard/tests/math/log10_variation.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test variations in usage of log10()
+--INI--
+precision = 10
+--FILE--
+<?php
+/*
+ * proto float log10(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+
+//Test log10 with a different input values
+
+$values = array(23,
+ -23,
+ 2.345e1,
+ -2.345e1,
+ 0x17,
+ 027,
+ "23",
+ "23.45",
+ "2.345e1",
+ "nonsense",
+ "1000",
+ "1000ABC",
+ null,
+ true,
+ false);
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = log10($values[$i]);
+ var_dump($res);
+}
+
+?>
+--EXPECT--
+float(1.361727836)
+float(NAN)
+float(1.370142847)
+float(NAN)
+float(1.361727836)
+float(1.361727836)
+float(1.361727836)
+float(1.370142847)
+float(1.370142847)
+float(-INF)
+float(3)
+float(3)
+float(-INF)
+float(0)
+float(-INF)
diff --git a/ext/standard/tests/math/log_basic.phpt b/ext/standard/tests/math/log_basic.phpt
new file mode 100644
index 000000000..e2f9c9fe7
--- /dev/null
+++ b/ext/standard/tests/math/log_basic.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test log() - basic function test log()
+--INI--
+precision=14
+--FILE--
+<?php
+$values = array(23,
+ -23,
+ 2.345e1,
+ -2.345e1,
+ 0x17,
+ 027,
+ "23",
+ "23.45",
+ "2.345e1",
+ null,
+ true,
+ false);
+
+echo "\n LOG tests...no base\n";
+for ($i = 0; $i < count($values); $i++) {
+ $res = log($values[$i]);
+ var_dump($res);
+}
+
+echo "\n LOG tests...base\n";
+for ($i = 0; $i < count($values); $i++) {
+ $res = log($values[$i], 4);
+ var_dump($res);
+}
+?>
+
+--EXPECTF--
+ LOG tests...no base
+float(3.1354942159291)
+float(NAN)
+float(3.1548704948923)
+float(NAN)
+float(3.1354942159291)
+float(3.1354942159291)
+float(3.1354942159291)
+float(3.1548704948923)
+float(3.1548704948923)
+float(-INF)
+float(0)
+float(-INF)
+
+ LOG tests...base
+float(2.2617809780285)
+float(NAN)
+float(2.275758008814)
+float(NAN)
+float(2.2617809780285)
+float(2.2617809780285)
+float(2.2617809780285)
+float(2.275758008814)
+float(2.275758008814)
+float(-INF)
+float(0)
+float(-INF)
diff --git a/ext/standard/tests/math/log_error.phpt b/ext/standard/tests/math/log_error.phpt
new file mode 100644
index 000000000..77084a4ec
--- /dev/null
+++ b/ext/standard/tests/math/log_error.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test log() - wrong params test log()
+--INI--
+precision=14
+--FILE--
+<?php
+log();
+log(36,4,true);
+log(36, -4);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for log() in %s on line 2
+
+Warning: Wrong parameter count for log() in %s on line 3
+
+Warning: log(): base must be greater than 0 in %s on line 4
diff --git a/ext/standard/tests/math/mt_getrandmax_basic.phpt b/ext/standard/tests/math/mt_getrandmax_basic.phpt
new file mode 100644
index 000000000..29a30d088
--- /dev/null
+++ b/ext/standard/tests/math/mt_getrandmax_basic.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Test mt_getrandmax() - basic function test mt_getrandmax()
+--FILE--
+<?php
+var_dump(mt_getrandmax());
+?>
+--EXPECTF--
+int(%d) \ No newline at end of file
diff --git a/ext/standard/tests/math/mt_getrandmax_error.phpt b/ext/standard/tests/math/mt_getrandmax_error.phpt
new file mode 100644
index 000000000..b30da3a91
--- /dev/null
+++ b/ext/standard/tests/math/mt_getrandmax_error.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Test mt_getrandmax() - wrong paramas mt_getrandmax()
+--FILE--
+<?php
+var_dump(mt_getrandmax(true));
+?>
+--EXPECTF--
+Warning: Wrong parameter count for mt_getrandmax() in %s on line 2
+NULL \ No newline at end of file
diff --git a/ext/standard/tests/math/mt_rand_basic.phpt b/ext/standard/tests/math/mt_rand_basic.phpt
new file mode 100644
index 000000000..8b6b3cb2c
--- /dev/null
+++ b/ext/standard/tests/math/mt_rand_basic.phpt
@@ -0,0 +1,102 @@
+--TEST--
+Test mt_rand() - basic function test mt_rand()
+--FILE--
+<?php
+$default_max = mt_getrandmax();
+
+echo "\nmt_rand() tests with default min and max value (i.e 0 thru ", $default_max, ")\n";
+for ($i = 0; $i < 100; $i++) {
+ $res = mt_rand();
+
+// By default RAND_MAX is 32768 although no constant is defined for it for user space apps
+ if (!is_int($res) || $res < 0 || $res > $default_max) {
+ break;
+ }
+}
+
+if ($i != 100) {
+ echo "FAILED: res = ", $res, " min = 0 max = ", $default_max, "\n";
+} else {
+ echo "PASSED: range min = 0 max = ", $default_max, "\n";
+}
+
+echo "\nmt_rand() tests with defined min and max value\n";
+
+$min = array(10,
+ 100,
+ 10.5,
+ 10.5e3,
+ 0x10,
+ 0400);
+
+$max = array(100,
+ 1000,
+ 19.5,
+ 10.5e5,
+ 0x10000,
+ 0700);
+
+for ($x = 0; $x < count($min); $x++) {
+ for ($i = 0; $i < 100; $i++) {
+ $res = mt_rand($min[$x], $max[$x]);
+
+ if (!is_int($res) || $res < intval($min[$x]) || $res > intval($max[$x])) {
+ echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
+ break;
+ }
+ }
+
+ if ($i == 100) {
+ echo "PASSED: range min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
+ }
+}
+
+echo "\nNon-numeric cases\n";
+$min = array(true,
+ false,
+ null,
+ "10",
+ "0x10",
+ "10.5");
+
+// Eexepcted numerical equivalent of above non-numerics
+$minval = array(1,
+ 0,
+ 0,
+ 10,
+ 0,
+ 10);
+for ($x = 0; $x < count($min); $x++) {
+ for ($i = 0; $i < 100; $i++) {
+ $res = mt_rand($min[$x], 100);
+
+ if (!is_int($res) || $res < intval($minval[$x]) || $res > 100) {
+ echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
+ break;
+ }
+ }
+
+ if ($i == 100) {
+ echo "PASSED range min = ", intval($min[$x]), " max = 100\n";
+ }
+}
+?>
+--EXPECTF--
+mt_rand() tests with default min and max value (i.e 0 thru 2147483647)
+PASSED: range min = 0 max = 2147483647
+
+mt_rand() tests with defined min and max value
+PASSED: range min = 10 max = 100
+PASSED: range min = 100 max = 1000
+PASSED: range min = 10 max = 19
+PASSED: range min = 10500 max = 1050000
+PASSED: range min = 16 max = 65536
+PASSED: range min = 256 max = 448
+
+Non-numeric cases
+PASSED range min = 1 max = 100
+PASSED range min = 0 max = 100
+PASSED range min = 0 max = 100
+PASSED range min = 10 max = 100
+PASSED range min = 0 max = 100
+PASSED range min = 10 max = 100
diff --git a/ext/standard/tests/math/mt_rand_error.phpt b/ext/standard/tests/math/mt_rand_error.phpt
new file mode 100644
index 000000000..e0a80586e
--- /dev/null
+++ b/ext/standard/tests/math/mt_rand_error.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Test mt_rand() - wrong params test mt_rand()
+--FILE--
+<?php
+mt_rand(25);
+mt_rand(10,100,false);
+mt_rand("one", 100);
+mt_rand(1, "hundered");
+?>
+
+--EXPECTF--
+
+Warning: mt_rand() expects exactly 2 parameters, 1 given in %s on line 2
+
+Warning: mt_rand() expects exactly 2 parameters, 3 given in %s on line 3
+
+Warning: mt_rand() expects parameter 1 to be long, string given in %s on line 4
+
+Warning: mt_rand() expects parameter 2 to be long, string given in %s on line 5
diff --git a/ext/standard/tests/math/mt_srand_basic.phpt b/ext/standard/tests/math/mt_srand_basic.phpt
new file mode 100644
index 000000000..e28b1b9ea
--- /dev/null
+++ b/ext/standard/tests/math/mt_srand_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Test mt_srand() - basic function (return values) mt_srand()
+--FILE--
+<?php
+// Should return NULL if given anything that it can convert to long
+// This doesn't actually test what it does with the input :-\
+var_dump(mt_srand());
+var_dump(mt_srand(500));
+var_dump(mt_srand(500.1));
+var_dump(mt_srand("500"));
+var_dump(mt_srand("500E3"));
+var_dump(mt_srand(true));
+var_dump(mt_srand(false));
+var_dump(mt_srand(NULL));
+?>
+--EXPECTF--
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL \ No newline at end of file
diff --git a/ext/standard/tests/math/mt_srand_error.phpt b/ext/standard/tests/math/mt_srand_error.phpt
new file mode 100644
index 000000000..5543d7841
--- /dev/null
+++ b/ext/standard/tests/math/mt_srand_error.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Test mt_srand() - wrong params test mt_srand()
+--FILE--
+<?php
+var_dump(mt_srand(500, true));
+var_dump(mt_srand("fivehundred"));
+var_dump(mt_srand("500ABC"));
+?>
+--EXPECTF--
+Warning: mt_srand() expects at most 1 parameter, 2 given in %s on line 2
+NULL
+
+Warning: mt_srand() expects parameter 1 to be long, string given in %s on line 3
+NULL
+
+Notice: A non well formed numeric value encountered in %s on line 4
+NULL
+
+
+
diff --git a/ext/standard/tests/math/number_format_error.phpt b/ext/standard/tests/math/number_format_error.phpt
new file mode 100644
index 000000000..5ebe12931
--- /dev/null
+++ b/ext/standard/tests/math/number_format_error.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Test number_format() - wrong params test number_format()
+--FILE--
+<?php
+number_format();
+number_format(23,2,true);
+number_format(23,2,true,false,36);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for number_format() in %s on line 2
+
+Warning: Wrong parameter count for number_format() in %s on line 3
+
+Warning: Wrong parameter count for number_format() in %s on line 4
+
diff --git a/ext/standard/tests/math/octdec_basic.phpt b/ext/standard/tests/math/octdec_basic.phpt
new file mode 100644
index 000000000..8fd57ecfe
--- /dev/null
+++ b/ext/standard/tests/math/octdec_basic.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test octdec() - basic function test octdec()
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+$values = array(01234567,
+ 0567,
+ 017777777777,
+ 020000000000,
+ 0x1234ABC,
+ 12345,
+ '01234567',
+ '0567',
+ '017777777777',
+ '020000000000',
+ '0x1234ABC',
+ '12345',
+ 31101.3,
+ 31.1013e5,
+ true,
+ false,
+ null);
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = octdec($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+int(14489)
+int(253)
+int(36947879)
+int(4618484)
+int(4104)
+int(5349)
+int(342391)
+int(375)
+int(2147483647)
+float(2147483648)
+int(668)
+int(5349)
+int(102923)
+int(823384)
+int(1)
+int(0)
+int(0) \ No newline at end of file
diff --git a/ext/standard/tests/math/octdec_error.phpt b/ext/standard/tests/math/octdec_error.phpt
new file mode 100644
index 000000000..8a3d1759a
--- /dev/null
+++ b/ext/standard/tests/math/octdec_error.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Test octdec() - wrong params test octdec()
+--FILE--
+<?php
+octdec();
+octdec('0123567',true);
+?>
+--EXPECTF--
+
+Warning: Wrong parameter count for octdec() in %s on line 2
+
+Warning: Wrong parameter count for octdec() in %s on line 3
diff --git a/ext/standard/tests/math/pi_basic.phpt b/ext/standard/tests/math/pi_basic.phpt
new file mode 100644
index 000000000..fec569137
--- /dev/null
+++ b/ext/standard/tests/math/pi_basic.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Test pi() - basic function test pi()
+--INI--
+precision=14
+--FILE--
+<?php
+echo pi(), "\n";
+echo M_PI, "\n";
+// N.B pi() ignores all specified arguments no error
+// messages are produced if arguments are spcified.
+?>
+--EXPECTF--
+3.1415926535898
+3.1415926535898
diff --git a/ext/standard/tests/math/pow_basic.phpt b/ext/standard/tests/math/pow_basic.phpt
new file mode 100644
index 000000000..96864e0ab
--- /dev/null
+++ b/ext/standard/tests/math/pow_basic.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test pow() - basic function test pow()
+--INI--
+precision=14
+--FILE--
+<?php
+$values = array(23,
+ -23,
+ 2.345e1,
+ -2.345e1,
+ 0x17,
+ 027,
+ "23",
+ "23.45",
+ "2.345e1",
+ null,
+ true,
+ false);
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = pow($values[$i], 4);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+int(279841)
+int(279841)
+float(302392.75950625)
+float(302392.75950625)
+int(279841)
+int(279841)
+int(279841)
+float(302392.75950625)
+float(302392.75950625)
+int(0)
+int(1)
+int(0) \ No newline at end of file
diff --git a/ext/standard/tests/math/pow_error.phpt b/ext/standard/tests/math/pow_error.phpt
new file mode 100644
index 000000000..d00173eb4
--- /dev/null
+++ b/ext/standard/tests/math/pow_error.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Test pow() - wrong params test pow()
+--INI--
+precision=14
+--FILE--
+<?php
+pow();
+pow(36);
+pow(36,4,true);
+?>
+--EXPECTF--
+
+Warning: pow() expects exactly 2 parameters, 0 given in %s line 2
+
+Warning: pow() expects exactly 2 parameters, 1 given in %s line 3
+
+Warning: pow() expects exactly 2 parameters, 3 given in %s line 4
+
+
diff --git a/ext/standard/tests/math/rad2deg_basic.phpt b/ext/standard/tests/math/rad2deg_basic.phpt
new file mode 100644
index 000000000..0256ffbd9
--- /dev/null
+++ b/ext/standard/tests/math/rad2deg_basic.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Test return type and value for expected input rad2deg()
+--INI--
+precision = 14
+--FILE--
+<?php
+/*
+ * proto float rad2deg(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+$file_path = dirname(__FILE__);
+require($file_path."/allowed_rounding_error.inc");
+
+$arg_0 = 0.0;
+$arg_1 = 1.570796327;
+$arg_2 = 3.141592654;
+$arg_3 = 6.283185307;
+
+echo "rad2deg $arg_0= ";
+$r0 = rad2deg($arg_0);
+var_dump($r0);
+if (allowed_rounding_error($r0 ,0 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+echo "rad2deg $arg_1 = ";
+$r1 = rad2deg($arg_1);
+var_dump($r1);
+if (allowed_rounding_error($r1 ,90.000000011752)) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+echo "rad2deg $arg_2 = ";
+$r2 = rad2deg($arg_2);
+var_dump($r2);
+if (allowed_rounding_error($r2 ,180.0000000235 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+echo "rad2deg $arg_3 = ";
+$r3 = rad2deg($arg_3);
+var_dump($r3);
+if (allowed_rounding_error($r3 ,359.99999998971 )) {
+ echo "Pass\n";
+}
+else {
+ echo "Fail\n";
+}
+?>
+--EXPECTF--
+rad2deg 0= float(%f)
+Pass
+rad2deg 1.570796327 = float(%f)
+Pass
+rad2deg 3.141592654 = float(%f)
+Pass
+rad2deg 6.283185307 = float(%f)
+Pass
diff --git a/ext/standard/tests/math/rad2deg_error.phpt b/ext/standard/tests/math/rad2deg_error.phpt
new file mode 100644
index 000000000..989232106
--- /dev/null
+++ b/ext/standard/tests/math/rad2deg_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test wrong number of arguments for rad2deg()
+--INI--
+precision = 14
+--FILE--
+<?php
+/*
+ * proto float rad2deg(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+$arg_0 = 1.0;
+$extra_arg = 1;
+
+echo "\nToo many arguments\n";
+var_dump(rad2deg($arg_0, $extra_arg));
+
+echo "\nToo few arguments\n";
+var_dump(rad2deg());
+
+?>
+--EXPECTF--
+Too many arguments
+
+Warning: Wrong parameter count for rad2deg() in %s on line 11
+NULL
+
+Too few arguments
+
+Warning: Wrong parameter count for rad2deg() in %s on line 14
+NULL
diff --git a/ext/standard/tests/math/rad2deg_variation.phpt b/ext/standard/tests/math/rad2deg_variation.phpt
new file mode 100644
index 000000000..3fd6ec8cf
--- /dev/null
+++ b/ext/standard/tests/math/rad2deg_variation.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test variations in usage of rad2deg()
+--INI--
+precision = 10
+--FILE--
+<?php
+/*
+ * proto float rad2deg(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+
+//Test rad2deg with a different input values
+
+$values = array(23,
+ -23,
+ 2.345e1,
+ -2.345e1,
+ 0x17,
+ 027,
+ "23",
+ "23.45",
+ "2.345e1",
+ "nonsense",
+ "1000",
+ "1000ABC",
+ null,
+ true,
+ false);
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = rad2deg($values[$i]);
+ var_dump($res);
+}
+
+?>
+--EXPECT--
+float(1317.802929)
+float(-1317.802929)
+float(1343.58603)
+float(-1343.58603)
+float(1317.802929)
+float(1317.802929)
+float(1317.802929)
+float(1343.58603)
+float(1343.58603)
+float(0)
+float(57295.77951)
+float(57295.77951)
+float(0)
+float(57.29577951)
+float(0)
diff --git a/ext/standard/tests/math/rand_basic.phpt b/ext/standard/tests/math/rand_basic.phpt
new file mode 100644
index 000000000..525956017
--- /dev/null
+++ b/ext/standard/tests/math/rand_basic.phpt
@@ -0,0 +1,103 @@
+--TEST--
+Test rand() - basic function test rand()
+--FILE--
+<?php
+$default_max = getrandmax();
+
+echo "\nrand() tests with default min and max value (i.e 0 thru ", $default_max, ")\n";
+for ($i = 0; $i < 100; $i++) {
+ $res = rand();
+
+// By default RAND_MAX is 32768 although no constant is defined for it for user space apps
+ if (!is_int($res) || $res < 0 || $res > $default_max) {
+ break;
+ }
+}
+
+if ($i != 100) {
+ echo "FAILED: res = ", $res, " min = 0 max = ", $default_max, "\n";
+} else {
+ echo "PASSED: range min = 0 max = ", $default_max, "\n";
+}
+
+echo "\nrand() tests with defined min and max value\n";
+
+$min = array(10,
+ 100,
+ 10.5,
+ 10.5e3,
+ 0x10,
+ 0400);
+
+$max = array(100,
+ 1000,
+ 19.5,
+ 10.5e5,
+ 0x10000,
+ 0700);
+
+for ($x = 0; $x < count($min); $x++) {
+ for ($i = 0; $i < 100; $i++) {
+ $res = rand($min[$x], $max[$x]);
+
+ if (!is_int($res) || $res < intval($min[$x]) || $res > intval($max[$x])) {
+ echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
+ break;
+ }
+ }
+
+ if ($i == 100) {
+ echo "PASSED: range min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
+ }
+}
+
+echo "\nNon-numeric cases\n";
+$min = array(true,
+ false,
+ null,
+ "10",
+ "0x10",
+ "10.5");
+
+// Eexepcted numerical equivalent of above non-numerics
+$minval = array(1,
+ 0,
+ 0,
+ 10,
+ 0,
+ 10);
+for ($x = 0; $x < count($min); $x++) {
+ for ($i = 0; $i < 100; $i++) {
+ $res = rand($min[$x], 100);
+
+ if (!is_int($res) || $res < intval($minval[$x]) || $res > 100) {
+ echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
+ break;
+ }
+ }
+
+ if ($i == 100) {
+ echo "PASSED range min = ", intval($min[$x]), " max = 100\n";
+ }
+}
+?>
+--EXPECTF--
+
+rand() tests with default min and max value (i.e 0 thru %i)
+PASSED: range min = 0 max = %i
+
+rand() tests with defined min and max value
+PASSED: range min = 10 max = 100
+PASSED: range min = 100 max = 1000
+PASSED: range min = 10 max = 19
+PASSED: range min = 10500 max = 1050000
+PASSED: range min = 16 max = 65536
+PASSED: range min = 256 max = 448
+
+Non-numeric cases
+PASSED range min = 1 max = 100
+PASSED range min = 0 max = 100
+PASSED range min = 0 max = 100
+PASSED range min = 10 max = 100
+PASSED range min = 0 max = 100
+PASSED range min = 10 max = 100
diff --git a/ext/standard/tests/math/rand_error.phpt b/ext/standard/tests/math/rand_error.phpt
new file mode 100644
index 000000000..79aa0112d
--- /dev/null
+++ b/ext/standard/tests/math/rand_error.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test rand() - wrong params test rand()
+--FILE--
+<?php
+rand(25);
+rand(10,100,false);
+rand("one", 100);
+rand(1, "hundered");
+?>
+--EXPECTF--
+
+Warning: rand() expects exactly 2 parameters, 1 given in %s on line 2
+
+Warning: rand() expects exactly 2 parameters, 3 given in %s on line 3
+
+Warning: rand() expects parameter 1 to be long, string given in %s on line 4
+
+Warning: rand() expects parameter 2 to be long, string given in %s on line 5
diff --git a/ext/standard/tests/math/sin_error.phpt b/ext/standard/tests/math/sin_error.phpt
index e2693ea8f..3fdb10af1 100644
--- a/ext/standard/tests/math/sin_error.phpt
+++ b/ext/standard/tests/math/sin_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for sin()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/sinh_error.phpt b/ext/standard/tests/math/sinh_error.phpt
index 415d6b09b..8a3584dfc 100644
--- a/ext/standard/tests/math/sinh_error.phpt
+++ b/ext/standard/tests/math/sinh_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for sinh()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/sqrt_basic.phpt b/ext/standard/tests/math/sqrt_basic.phpt
new file mode 100644
index 000000000..076a11301
--- /dev/null
+++ b/ext/standard/tests/math/sqrt_basic.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test return type and value for expected input sqrt()
+--INI--
+precision = 14
+--FILE--
+<?php
+/*
+ * proto float sqrt(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+$arg_0 = 9.0;
+
+var_dump(sqrt($arg_0));
+
+?>
+--EXPECT--
+float(3)
diff --git a/ext/standard/tests/math/sqrt_error.phpt b/ext/standard/tests/math/sqrt_error.phpt
new file mode 100644
index 000000000..318a18a35
--- /dev/null
+++ b/ext/standard/tests/math/sqrt_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test wrong number of arguments for sqrt()
+--INI--
+precision = 14
+--FILE--
+<?php
+/*
+ * proto float sqrt(float number)
+ * Function is implemented in ext/standard/math.c
+*/
+
+$arg_0 = 1.0;
+$extra_arg = 1;
+
+echo "\nToo many arguments\n";
+var_dump(sqrt($arg_0, $extra_arg));
+
+echo "\nToo few arguments\n";
+var_dump(sqrt());
+
+?>
+--EXPECTF--
+Too many arguments
+
+Warning: Wrong parameter count for sqrt() in %s on line 11
+NULL
+
+Too few arguments
+
+Warning: Wrong parameter count for sqrt() in %s on line 14
+NULL
diff --git a/ext/standard/tests/math/srand_basic.phpt b/ext/standard/tests/math/srand_basic.phpt
new file mode 100644
index 000000000..16aa2dd69
--- /dev/null
+++ b/ext/standard/tests/math/srand_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Maths test for xapic versions of srand()
+--FILE--
+<?php
+// Should return NULL if given anything that it can convert to long
+// This doesn't actually test what it does with the input :-\
+var_dump(srand());
+var_dump(srand(500));
+var_dump(srand(500.1));
+var_dump(srand("500"));
+var_dump(srand("500E3"));
+var_dump(srand(true));
+var_dump(srand(false));
+var_dump(srand(NULL));
+?>
+--EXPECTF--
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL \ No newline at end of file
diff --git a/ext/standard/tests/math/srand_error.phpt b/ext/standard/tests/math/srand_error.phpt
new file mode 100644
index 000000000..852867222
--- /dev/null
+++ b/ext/standard/tests/math/srand_error.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test srand() - wrong params test srand()
+--FILE--
+<?php
+var_dump(mt_srand(500, true));
+var_dump(mt_srand("fivehundred"));
+var_dump(mt_srand("500ABC"));
+?>
+--EXPECTF--
+Warning: mt_srand() expects at most 1 parameter, 2 given in %s on line 2
+NULL
+
+Warning: mt_srand() expects parameter 1 to be long, string given in %s on line 3
+NULL
+
+Notice: A non well formed numeric value encountered in %s on line 4
+NULL
diff --git a/ext/standard/tests/math/tan_error.phpt b/ext/standard/tests/math/tan_error.phpt
index 58dcc2a43..3508f0e78 100644
--- a/ext/standard/tests/math/tan_error.phpt
+++ b/ext/standard/tests/math/tan_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for tan()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/math/tanh_error.phpt b/ext/standard/tests/math/tanh_error.phpt
index 8ce3e9131..f90de5eb5 100644
--- a/ext/standard/tests/math/tanh_error.phpt
+++ b/ext/standard/tests/math/tanh_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test wrong number of arguments for tanh()
---INI--
--FILE--
<?php
/*
diff --git a/ext/standard/tests/network/gethostbyaddr_error.phpt b/ext/standard/tests/network/gethostbyaddr_error.phpt
new file mode 100644
index 000000000..2c54ae994
--- /dev/null
+++ b/ext/standard/tests/network/gethostbyaddr_error.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test gethostbyaddr() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto string gethostbyaddr(string ip_address)
+ * Description: Get the Internet host name corresponding to a given IP address
+ * Source code: ext/standard/dns.c
+ * Alias to functions:
+ */
+
+
+echo "Testing gethostbyaddr : error conditions\n";
+
+// Zero arguments
+echo "\n-- Testing gethostbyaddr function with Zero arguments --\n";
+var_dump( gethostbyaddr() );
+
+//Test gethostbyaddr with one more than the expected number of arguments
+echo "\n-- Testing gethostbyaddr function with more than expected no. of arguments --\n";
+$ip_address = 'string_val';
+$extra_arg = 10;
+var_dump( gethostbyaddr($ip_address, $extra_arg) );
+
+echo "\n-- Testing gethostbyaddr function with invalid addresses --\n";
+
+$ip_address = 'invalid';
+var_dump( gethostbyaddr($ip_address) );
+
+$ip_address = '300.1.2.3';
+var_dump( gethostbyaddr($ip_address) );
+
+$ip_address = '256.1.2.3';
+var_dump( gethostbyaddr($ip_address) );
+
+echo "Done";
+?>
+--EXPECTREGEX--
+Testing gethostbyaddr : error conditions
+
+-- Testing gethostbyaddr function with Zero arguments --
+
+Warning: Wrong parameter count for gethostbyaddr\(\) in .* on line \d+
+NULL
+
+-- Testing gethostbyaddr function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for gethostbyaddr\(\) in .* on line \d+
+NULL
+
+-- Testing gethostbyaddr function with invalid addresses --
+
+Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or IPv6 address) in .* on line \d+
+bool\(false\)
+
+Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or IPv6 address) in .* on line \d+
+bool\(false\)
+
+Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or IPv6 address) in .* on line \d+
+bool\(false\)
+Done
diff --git a/ext/standard/tests/network/gethostbynamel_error.phpt b/ext/standard/tests/network/gethostbynamel_error.phpt
new file mode 100644
index 000000000..7e58d5ad5
--- /dev/null
+++ b/ext/standard/tests/network/gethostbynamel_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test gethostbynamel() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto array gethostbynamel(string hostname)
+ * Description: Return a list of IP addresses that a given hostname resolves to.
+ * Source code: ext/standard/dns.c
+ * Alias to functions:
+ */
+
+echo "*** Testing gethostbynamel() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing gethostbynamel() function with Zero arguments --\n";
+var_dump( gethostbynamel() );
+
+//Test gethostbynamel with one more than the expected number of arguments
+echo "\n-- Testing gethostbynamel() function with more than expected no. of arguments --\n";
+$hostname = 'string_val';
+$extra_arg = 10;
+var_dump( gethostbynamel($hostname, $extra_arg) );
+
+echo "\n-- Testing gethostbynamel() with an unknown host --\n";
+$hostname = 'unknownhost_zzz_xxx_yyy';
+var_dump( gethostbynamel($hostname) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing gethostbynamel() : error conditions ***
+
+-- Testing gethostbynamel() function with Zero arguments --
+
+Warning: Wrong parameter count for gethostbynamel() in %s on line %d
+NULL
+
+-- Testing gethostbynamel() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for gethostbynamel() in %s on line %d
+NULL
+
+-- Testing gethostbynamel() with an unknown host --
+bool(false)
+Done
diff --git a/ext/standard/tests/reg/ereg_basic_001.phpt b/ext/standard/tests/reg/ereg_basic_001.phpt
new file mode 100644
index 000000000..485b2d26e
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_basic_001.phpt
@@ -0,0 +1,127 @@
+--TEST--
+Test ereg() function : basic functionality (with $regs)
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple, valid matches with ereg, specifying $regs
+ */
+
+echo "*** Testing ereg() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+foreach ($expressions as $re) {
+ list($pattern,$string) = $re;
+ echo "--> Pattern: '$pattern'; string: '$string'\n";
+ var_dump(ereg($pattern, $string, $regs));
+ var_dump($regs);
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : basic functionality ***
+--> Pattern: '..(a|b|c)(a|b|c)..'; string: '--- ab ---'
+int(6)
+array(3) {
+ [0]=>
+ string(6) "- ab -"
+ [1]=>
+ string(1) "a"
+ [2]=>
+ string(1) "b"
+}
+--> Pattern: '()'; string: ''
+int(1)
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+}
+--> Pattern: '()'; string: 'abcdef'
+int(1)
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+}
+--> Pattern: '[x]|[^x]'; string: 'abcdef'
+int(1)
+array(1) {
+ [0]=>
+ string(1) "a"
+}
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; string: '--- aaa bbb ccc ddd ---'
+int(15)
+array(6) {
+ [0]=>
+ string(15) "aaa bbb ccc ddd"
+ [1]=>
+ string(1) "a"
+ [2]=>
+ string(2) "aa"
+ [3]=>
+ string(3) "bbb"
+ [4]=>
+ string(3) "ccc"
+ [5]=>
+ string(3) "ddd"
+}
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; string: '\`^.[$()|*+?{''
+int(14)
+array(1) {
+ [0]=>
+ string(14) "\`^.[$()|*+?{'"
+}
+--> Pattern: '\a'; string: 'a'
+int(1)
+array(1) {
+ [0]=>
+ string(1) "a"
+}
+--> Pattern: '[0-9][^0-9]'; string: '2a'
+int(2)
+array(1) {
+ [0]=>
+ string(2) "2a"
+}
+--> Pattern: '^[[:alnum:]]{62,62}$'; string: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+int(62)
+array(1) {
+ [0]=>
+ string(62) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+}
+--> Pattern: '^[[:digit:]]{5}'; string: '0123456789'
+int(5)
+array(1) {
+ [0]=>
+ string(5) "01234"
+}
+--> Pattern: '[[:digit:]]{5}$'; string: '0123456789'
+int(5)
+array(1) {
+ [0]=>
+ string(5) "56789"
+}
+--> Pattern: '[[:blank:]]{1,10}'; string: '
+ '
+int(2)
+array(1) {
+ [0]=>
+ string(2) " "
+}
+--> Pattern: '[[:print:]]{3}'; string: ' a '
+int(3)
+array(1) {
+ [0]=>
+ string(3) " a "
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_basic_002.phpt b/ext/standard/tests/reg/ereg_basic_002.phpt
new file mode 100644
index 000000000..672632fc7
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_basic_002.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test ereg() function : basic functionality (without $regs)
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple, valid matches with ereg, without specifying $regs
+ */
+
+echo "*** Testing ereg() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+foreach ($expressions as $re) {
+ list($pattern,$string) = $re;
+ echo "--> Pattern: '$pattern'; string: '$string'\n";
+ var_dump(ereg($pattern, $string));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : basic functionality ***
+--> Pattern: '..(a|b|c)(a|b|c)..'; string: '--- ab ---'
+int(1)
+--> Pattern: '()'; string: ''
+int(1)
+--> Pattern: '()'; string: 'abcdef'
+int(1)
+--> Pattern: '[x]|[^x]'; string: 'abcdef'
+int(1)
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; string: '--- aaa bbb ccc ddd ---'
+int(1)
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; string: '\`^.[$()|*+?{''
+int(1)
+--> Pattern: '\a'; string: 'a'
+int(1)
+--> Pattern: '[0-9][^0-9]'; string: '2a'
+int(1)
+--> Pattern: '^[[:alnum:]]{62,62}$'; string: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+int(1)
+--> Pattern: '^[[:digit:]]{5}'; string: '0123456789'
+int(1)
+--> Pattern: '[[:digit:]]{5}$'; string: '0123456789'
+int(1)
+--> Pattern: '[[:blank:]]{1,10}'; string: '
+ '
+int(1)
+--> Pattern: '[[:print:]]{3}'; string: ' a '
+int(1)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_basic_003.phpt b/ext/standard/tests/reg/ereg_basic_003.phpt
new file mode 100644
index 000000000..8c1473883
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_basic_003.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test ereg() function : basic functionality - long RE
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a long RE with lots of matches
+ */
+
+var_dump(ereg(str_repeat('(.)', 2048), str_repeat('x', 2048)));
+var_dump(ereg(str_repeat('(.)', 2048), str_repeat('x', 2048), $regs));
+var_dump(count($regs));
+
+echo "Done";
+?>
+--EXPECTF--
+int(1)
+int(2048)
+int(2049)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_basic_004.phpt b/ext/standard/tests/reg/ereg_basic_004.phpt
new file mode 100644
index 000000000..1356eaf63
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_basic_004.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test ereg() function : basic functionality - a few non-matches
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+$regs = 'original';
+
+var_dump(ereg('A', 'a', $regs));
+var_dump(ereg('[A-Z]', '0', $regs));
+var_dump(ereg('(a){4}', 'aaa', $regs));
+var_dump(ereg('^a', 'ba', $regs));
+var_dump(ereg('b$', 'ba', $regs));
+var_dump(ereg('[:alpha:]', 'x', $regs));
+
+// Ensure $regs is unchanged
+var_dump($regs);
+
+echo "Done";
+?>
+--EXPECTF--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+string(8) "original"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_error_001.phpt b/ext/standard/tests/reg/ereg_error_001.phpt
new file mode 100644
index 000000000..44bb1f965
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_error_001.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test ereg() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test wrong number of args
+ */
+
+echo "*** Testing ereg() : error conditions ***\n";
+
+
+//Test ereg with one more than the expected number of arguments
+echo "\n-- Testing ereg() function with more than expected no. of arguments --\n";
+$pattern = 'string_val';
+$string = 'string_val';
+$registers = array(1, 2);
+$extra_arg = 10;
+var_dump( ereg($pattern, $string, $registers, $extra_arg) );
+
+// Testing ereg with one less than the expected number of arguments
+echo "\n-- Testing ereg() function with less than expected no. of arguments --\n";
+$pattern = 'string_val';
+var_dump( ereg($pattern) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : error conditions ***
+
+-- Testing ereg() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for ereg() in %s on line 21
+NULL
+
+-- Testing ereg() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for ereg() in %s on line 26
+NULL
+Done
diff --git a/ext/standard/tests/reg/ereg_error_002.phpt b/ext/standard/tests/reg/ereg_error_002.phpt
new file mode 100644
index 000000000..61166ee97
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_error_002.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Test ereg() function : error conditions - test bad regular expressions
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test bad regular expressions
+ */
+
+echo "*** Testing ereg() : error conditions ***\n";
+
+$regs = 'original';
+
+var_dump(ereg("", "hello"));
+var_dump(ereg("c(d", "hello"));
+var_dump(ereg("a[b", "hello"));
+var_dump(ereg("c(d", "hello"));
+var_dump(ereg("*", "hello"));
+var_dump(ereg("+", "hello"));
+var_dump(ereg("?", "hello"));
+var_dump(ereg("(+?*)", "hello", $regs));
+var_dump(ereg("h{256}", "hello"));
+var_dump(ereg("h|", "hello"));
+var_dump(ereg("h{0}", "hello"));
+var_dump(ereg("h{2,1}", "hello"));
+var_dump(ereg('[a-c-e]', 'd'));
+var_dump(ereg('\\', 'x'));
+var_dump(ereg('([9-0])', '1', $regs));
+
+//ensure $regs unchanged
+var_dump($regs);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : error conditions ***
+
+Warning: ereg(): REG_EMPTY in %s on line 16
+bool(false)
+
+Warning: ereg(): REG_EPAREN in %s on line 17
+bool(false)
+
+Warning: ereg(): REG_EBRACK in %s on line 18
+bool(false)
+
+Warning: ereg(): REG_EPAREN in %s on line 19
+bool(false)
+
+Warning: ereg(): REG_BADRPT in %s on line 20
+bool(false)
+
+Warning: ereg(): REG_BADRPT in %s on line 21
+bool(false)
+
+Warning: ereg(): REG_BADRPT in %s on line 22
+bool(false)
+
+Warning: ereg(): REG_BADRPT in %s on line 23
+bool(false)
+
+Warning: ereg(): REG_BADBR in %s on line 24
+bool(false)
+
+Warning: ereg(): REG_EMPTY in %s on line 25
+bool(false)
+
+Warning: ereg(): REG_EMPTY in %s on line 26
+bool(false)
+
+Warning: ereg(): REG_BADBR in %s on line 27
+bool(false)
+
+Warning: ereg(): REG_ERANGE in %s on line 28
+bool(false)
+
+Warning: ereg(): REG_EESCAPE in %s on line 29
+bool(false)
+
+Warning: ereg(): REG_ERANGE in %s on line 30
+bool(false)
+string(8) "original"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_replace_basic_001.phpt b/ext/standard/tests/reg/ereg_replace_basic_001.phpt
new file mode 100644
index 000000000..e0a5dfb7b
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_replace_basic_001.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test ereg_replace() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto string ereg_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple, valid matches with ereg_replace
+ */
+
+echo "*** Testing ereg() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+$replacement = '[this is a replacement]';
+
+foreach ($expressions as $re) {
+ list($pattern, $match) = $re;
+ echo "--> Pattern: '$pattern'; match: '$match'\n";
+ var_dump(ereg_replace($pattern, $replacement, $match . ' this contains some matches ' . $match));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : basic functionality ***
+--> Pattern: '..(a|b|c)(a|b|c)..'; match: '--- ab ---'
+string(82) "--[this is a replacement]-- this contains some matches --[this is a replacement]--"
+--> Pattern: '()'; match: ''
+string(695) "[this is a replacement] [this is a replacement]t[this is a replacement]h[this is a replacement]i[this is a replacement]s[this is a replacement] [this is a replacement]c[this is a replacement]o[this is a replacement]n[this is a replacement]t[this is a replacement]a[this is a replacement]i[this is a replacement]n[this is a replacement]s[this is a replacement] [this is a replacement]s[this is a replacement]o[this is a replacement]m[this is a replacement]e[this is a replacement] [this is a replacement]m[this is a replacement]a[this is a replacement]t[this is a replacement]c[this is a replacement]h[this is a replacement]e[this is a replacement]s[this is a replacement] [this is a replacement]"
+--> Pattern: '()'; match: 'abcdef'
+string(983) "[this is a replacement]a[this is a replacement]b[this is a replacement]c[this is a replacement]d[this is a replacement]e[this is a replacement]f[this is a replacement] [this is a replacement]t[this is a replacement]h[this is a replacement]i[this is a replacement]s[this is a replacement] [this is a replacement]c[this is a replacement]o[this is a replacement]n[this is a replacement]t[this is a replacement]a[this is a replacement]i[this is a replacement]n[this is a replacement]s[this is a replacement] [this is a replacement]s[this is a replacement]o[this is a replacement]m[this is a replacement]e[this is a replacement] [this is a replacement]m[this is a replacement]a[this is a replacement]t[this is a replacement]c[this is a replacement]h[this is a replacement]e[this is a replacement]s[this is a replacement] [this is a replacement]a[this is a replacement]b[this is a replacement]c[this is a replacement]d[this is a replacement]e[this is a replacement]f[this is a replacement]"
+--> Pattern: '[x]|[^x]'; match: 'abcdef'
+string(920) "[this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement]"
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; match: '--- aaa bbb ccc ddd ---'
+string(90) "--- [this is a replacement] --- this contains some matches --- [this is a replacement] ---"
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; match: '\`^.[$()|*+?{''
+string(74) "[this is a replacement] this contains some matches [this is a replacement]"
+--> Pattern: '\a'; match: 'a'
+string(118) "[this is a replacement] this cont[this is a replacement]ins some m[this is a replacement]tches [this is a replacement]"
+--> Pattern: '[0-9][^0-9]'; match: '2a'
+string(74) "[this is a replacement] this contains some matches [this is a replacement]"
+--> Pattern: '^[[:alnum:]]{62,62}$'; match: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+string(152) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ this contains some matches 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+--> Pattern: '^[[:digit:]]{5}'; match: '0123456789'
+string(66) "[this is a replacement]56789 this contains some matches 0123456789"
+--> Pattern: '[[:digit:]]{5}$'; match: '0123456789'
+string(66) "0123456789 this contains some matches 01234[this is a replacement]"
+--> Pattern: '[[:blank:]]{1,10}'; match: '
+ '
+string(163) "
+[this is a replacement]this[this is a replacement]contains[this is a replacement]some[this is a replacement]matches[this is a replacement]
+[this is a replacement]"
+--> Pattern: '[[:print:]]{3}'; match: ' a '
+string(254) "[this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement] "
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_replace_basic_002.phpt b/ext/standard/tests/reg/ereg_replace_basic_002.phpt
new file mode 100644
index 000000000..4ef9c4109
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_replace_basic_002.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Test ereg_replace() function : basic functionality - a few non-matches
+--FILE--
+<?php
+/* Prototype : proto string ereg_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+$replacement = 'r';
+
+var_dump(ereg_replace('A', $replacement, 'a'));
+var_dump(ereg_replace('[A-Z]', $replacement, '0'));
+var_dump(ereg_replace('(a){4}', $replacement, 'aaa'));
+var_dump(ereg_replace('^a', $replacement, 'ba'));
+var_dump(ereg_replace('b$', $replacement, 'ba'));
+var_dump(ereg_replace('[:alpha:]', $replacement, 'x'));
+
+
+echo "Done";
+?>
+--EXPECTF--
+string(1) "a"
+string(1) "0"
+string(3) "aaa"
+string(2) "ba"
+string(2) "ba"
+string(1) "x"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_replace_error_001.phpt b/ext/standard/tests/reg/ereg_replace_error_001.phpt
new file mode 100644
index 000000000..e6aedf47e
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_replace_error_001.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test ereg_replace() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto string ereg_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+echo "*** Testing ereg_replace() : error conditions ***\n";
+
+
+//Test ereg_replace with one more than the expected number of arguments
+echo "\n-- Testing ereg_replace() function with more than expected no. of arguments --\n";
+$pattern = 'string_val';
+$replacement = 'string_val';
+$string = 'string_val';
+$extra_arg = 10;
+var_dump( ereg_replace($pattern, $replacement, $string, $extra_arg) );
+
+// Testing ereg_replace with one less than the expected number of arguments
+echo "\n-- Testing ereg_replace() function with less than expected no. of arguments --\n";
+$pattern = 'string_val';
+$replacement = 'string_val';
+var_dump( ereg_replace($pattern, $replacement) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg_replace() : error conditions ***
+
+-- Testing ereg_replace() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for ereg_replace() in %s on line 17
+NULL
+
+-- Testing ereg_replace() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for ereg_replace() in %s on line 23
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_replace_error_002.phpt b/ext/standard/tests/reg/ereg_replace_error_002.phpt
new file mode 100644
index 000000000..6e7183c42
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_replace_error_002.phpt
@@ -0,0 +1,76 @@
+--TEST--
+Test ereg_replace() function : error conditions - bad regular expressions
+--FILE--
+<?php
+/* Prototype : proto string ereg_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+echo "*** Testing ereg_replace() : bad REs ***\n";
+var_dump(ereg_replace("", "hello", "some string"));
+var_dump(ereg_replace("c(d", "hello", "some string"));
+var_dump(ereg_replace("a[b", "hello", "some string"));
+var_dump(ereg_replace("c(d", "hello", "some string"));;
+var_dump(ereg_replace("*", "hello", "some string"));
+var_dump(ereg_replace("+", "hello", "some string"));
+var_dump(ereg_replace("?", "hello", "some string"));
+var_dump(ereg_replace("(+?*)", "hello", "some string"));
+var_dump(ereg_replace("h{256}", "hello", "some string"));
+var_dump(ereg_replace("h|", "hello", "some string"));
+var_dump(ereg_replace("h{0}", "hello", "some string"));
+var_dump(ereg_replace("h{2,1}", "hello", "some string"));
+var_dump(ereg_replace('[a-c-e]', 'd', "some string"));
+var_dump(ereg_replace('\\', 'x', "some string"));
+var_dump(ereg_replace('([9-0])', '1', "some string"));
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg_replace() : bad REs ***
+
+Warning: ereg_replace(): REG_EMPTY in %s on line 9
+bool(false)
+
+Warning: ereg_replace(): REG_EPAREN in %s on line 10
+bool(false)
+
+Warning: ereg_replace(): REG_EBRACK in %s on line 11
+bool(false)
+
+Warning: ereg_replace(): REG_EPAREN in %s on line 12
+bool(false)
+
+Warning: ereg_replace(): REG_BADRPT in %s on line 13
+bool(false)
+
+Warning: ereg_replace(): REG_BADRPT in %s on line 14
+bool(false)
+
+Warning: ereg_replace(): REG_BADRPT in %s on line 15
+bool(false)
+
+Warning: ereg_replace(): REG_BADRPT in %s on line 16
+bool(false)
+
+Warning: ereg_replace(): REG_BADBR in %s on line 17
+bool(false)
+
+Warning: ereg_replace(): REG_EMPTY in %s on line 18
+bool(false)
+
+Warning: ereg_replace(): REG_EMPTY in %s on line 19
+bool(false)
+
+Warning: ereg_replace(): REG_BADBR in %s on line 20
+bool(false)
+
+Warning: ereg_replace(): REG_ERANGE in %s on line 21
+bool(false)
+
+Warning: ereg_replace(): REG_EESCAPE in %s on line 22
+bool(false)
+
+Warning: ereg_replace(): REG_ERANGE in %s on line 23
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_replace_variation_001.phpt b/ext/standard/tests/reg/ereg_replace_variation_001.phpt
new file mode 100644
index 000000000..446ac86e0
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_replace_variation_001.phpt
@@ -0,0 +1,175 @@
+--TEST--
+Test ereg_replace() function : usage variations - unexpected type arg 1
+--FILE--
+<?php
+/* Prototype : proto string ereg_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing ereg_replace() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$replacement = 'new';
+$string = 'original';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for pattern
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( ereg_replace($value, $replacement, $string) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg_replace() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+string(8) "original"
+
+Arg value 12345
+string(8) "original"
+
+Arg value -2345
+string(8) "original"
+
+Arg value 10.5
+string(8) "original"
+
+Arg value -10.5
+string(8) "original"
+
+Arg value 101234567000
+string(8) "original"
+
+Arg value 1.07654321E-9
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 0.5
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value Array
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value Array
+string(8) "original"
+
+Arg value Array
+string(8) "original"
+
+Arg value Array
+string(8) "original"
+
+Arg value Array
+string(8) "original"
+
+Arg value
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+string(8) "original"
+
+Arg value
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+string(8) "original"
+
+Arg value
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 8 - Object of class stdClass could not be converted to int, %s(74)
+string(8) "original"
+
+Arg value
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - ereg_replace(): REG_EMPTY, %s(74)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_replace_variation_002.phpt b/ext/standard/tests/reg/ereg_replace_variation_002.phpt
new file mode 100644
index 000000000..bd55dbcde
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_replace_variation_002.phpt
@@ -0,0 +1,163 @@
+--TEST--
+Test ereg_replace() function : usage variations - unexpected type arg 2
+--FILE--
+<?php
+/* Prototype : proto string ereg_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing ereg_replace() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = 'ell';
+$string = 'hello!';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for replacement
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump(urlencode(ereg_replace($pattern, $value, $string)));
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg_replace() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+string(5) "ho%21"
+
+Arg value 1
+string(8) "h%01o%21"
+
+Arg value 12345
+string(6) "h9o%21"
+
+Arg value -2345
+string(8) "h%D7o%21"
+
+Arg value 10.5
+string(8) "h%0Ao%21"
+
+Arg value -10.5
+string(8) "h%F6o%21"
+
+Arg value 101234567000
+string(%d) "h%so%21"
+
+Arg value 1.07654321E-9
+string(5) "ho%21"
+
+Arg value 0.5
+string(5) "ho%21"
+
+Arg value Array
+string(5) "ho%21"
+
+Arg value Array
+string(8) "h%01o%21"
+
+Arg value Array
+string(8) "h%01o%21"
+
+Arg value Array
+string(8) "h%01o%21"
+
+Arg value Array
+string(8) "h%01o%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value 1
+string(8) "h%01o%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value 1
+string(8) "h%01o%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value
+string(5) "ho%21"
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 8 - Object of class stdClass could not be converted to int, %s(74)
+string(8) "h%01o%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value
+string(5) "ho%21"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_replace_variation_003.phpt b/ext/standard/tests/reg/ereg_replace_variation_003.phpt
new file mode 100644
index 000000000..1d8353599
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_replace_variation_003.phpt
@@ -0,0 +1,169 @@
+--TEST--
+Test ereg_replace() function : usage variations - unexpected type arg 3
+--FILE--
+<?php
+/* Prototype : proto string ereg_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing ereg_replace() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = '1';
+$replacement = 'new value';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for string
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( ereg_replace($pattern, $replacement, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg_replace() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+string(1) "0"
+
+Arg value 1
+string(9) "new value"
+
+Arg value 12345
+string(13) "new value2345"
+
+Arg value -2345
+string(5) "-2345"
+
+Arg value 10.5
+string(12) "new value0.5"
+
+Arg value -10.5
+string(13) "-new value0.5"
+
+Arg value 101234567000
+string(28) "new value0new value234567000"
+
+Arg value 1.07654321E-9
+string(29) "new value.0765432new valueE-9"
+
+Arg value 0.5
+string(3) "0.5"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(9) "new value"
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(9) "new value"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+Error: 8 - Object of class stdClass to string conversion, %s(74)
+string(6) "Object"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_variation_001.phpt b/ext/standard/tests/reg/ereg_variation_001.phpt
new file mode 100644
index 000000000..977404d05
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_variation_001.phpt
@@ -0,0 +1,178 @@
+--TEST--
+Test ereg() function : usage variations - unexpected type arg 1
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+
+echo "*** Testing ereg() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$string = '1';
+$registers = array(1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for pattern
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( ereg($value, $string, $registers) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(65)
+Error: 8 - Undefined variable: unset_var, %s(68)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - ereg(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - ereg(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value
+Error: 2 - ereg(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value
+Error: 2 - ereg(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - ereg(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - ereg(): REG_EMPTY, %s(75)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(75)
+Error: 8 - Object of class stdClass to string conversion, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - ereg(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - ereg(): REG_EMPTY, %s(75)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_variation_002.phpt b/ext/standard/tests/reg/ereg_variation_002.phpt
new file mode 100644
index 000000000..c5f4e8e01
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_variation_002.phpt
@@ -0,0 +1,169 @@
+--TEST--
+Test ereg() function : usage variations - unexpected type arg 2
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing ereg() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = '1';
+$registers = array();
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for string
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( ereg($pattern, $value, $registers) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value 12345
+int(1)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+int(1)
+
+Arg value -10.5
+int(1)
+
+Arg value 101234567000
+int(1)
+
+Arg value 1.07654321E-9
+int(1)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+Error: 8 - Object of class stdClass to string conversion, %s(74)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_variation_003.phpt b/ext/standard/tests/reg/ereg_variation_003.phpt
new file mode 100644
index 000000000..42c1ae1bb
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_variation_003.phpt
@@ -0,0 +1,283 @@
+--TEST--
+Test ereg() function : usage variations - unexpected type for arg 3
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing ereg() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = 'h(.*)lo!';
+$string = 'hello!';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for registers
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( ereg($pattern, $string, $value) );
+ var_dump($value);
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(61)
+Error: 8 - Undefined variable: unset_var, %s(64)
+
+Arg value 0
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 1
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 12345
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value -2345
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 10.5
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value -10.5
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 101234567000
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 1.07654321E-9
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 0.5
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 1
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 1
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value string
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value string
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+Error: 4096 - Object of class stdClass could not be converted to string, %s(70)
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/ereg_variation_004.phpt b/ext/standard/tests/reg/ereg_variation_004.phpt
new file mode 100644
index 000000000..cbbb3c15e
--- /dev/null
+++ b/ext/standard/tests/reg/ereg_variation_004.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test ereg() function : usage variations - pass non-variable as arg 3, which is pass-by-ref.
+--FILE--
+<?php
+/* Prototype : proto int ereg(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+var_dump(ereg('l{2}', 'hello', str_repeat('x',1)));
+echo "Done";
+?>
+--EXPECTF--
+
+Strict Standards: Only variables should be passed by reference in %s on line 8
+int(2)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_basic.phpt b/ext/standard/tests/reg/eregi_basic.phpt
new file mode 100644
index 000000000..de1db0ed4
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_basic.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test eregi() function : basic functionality - confirm case insensitivity
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Case-insensitive regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test basic funtionality of eregi()
+ */
+
+echo "*** Testing eregi() : basic functionality ***\n";
+$string = <<<END
+UPPERCASE WORDS
+lowercase words
+MIxED CaSe woRdS
+END;
+
+var_dump(eregi('words', $string, $match1));
+var_dump($match1);
+
+var_dump(eregi('[[:lower:]]+[[:space:]]case', $string, $match2)); //character class lower should just match [a-z] but in case insensitive search matches [a-zA-Z]
+var_dump($match2);
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi() : basic functionality ***
+int(5)
+array(1) {
+ [0]=>
+ string(5) "WORDS"
+}
+int(10)
+array(1) {
+ [0]=>
+ string(10) "MIxED CaSe"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_basic_001.phpt b/ext/standard/tests/reg/eregi_basic_001.phpt
new file mode 100644
index 000000000..8557b8111
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_basic_001.phpt
@@ -0,0 +1,127 @@
+--TEST--
+Test eregi() function : basic functionality (with $regs)
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple, valid matches with eregi, specifying $regs
+ */
+
+echo "*** Testing eregi() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+foreach ($expressions as $re) {
+ list($pattern,$string) = $re;
+ echo "--> Pattern: '$pattern'; string: '$string'\n";
+ var_dump(eregi($pattern, $string, $regs));
+ var_dump($regs);
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi() : basic functionality ***
+--> Pattern: '..(a|b|c)(a|b|c)..'; string: '--- ab ---'
+int(6)
+array(3) {
+ [0]=>
+ string(6) "- ab -"
+ [1]=>
+ string(1) "a"
+ [2]=>
+ string(1) "b"
+}
+--> Pattern: '()'; string: ''
+int(1)
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+}
+--> Pattern: '()'; string: 'abcdef'
+int(1)
+array(2) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+}
+--> Pattern: '[x]|[^x]'; string: 'abcdef'
+int(1)
+array(1) {
+ [0]=>
+ string(1) "a"
+}
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; string: '--- aaa bbb ccc ddd ---'
+int(15)
+array(6) {
+ [0]=>
+ string(15) "aaa bbb ccc ddd"
+ [1]=>
+ string(1) "a"
+ [2]=>
+ string(2) "aa"
+ [3]=>
+ string(3) "bbb"
+ [4]=>
+ string(3) "ccc"
+ [5]=>
+ string(3) "ddd"
+}
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; string: '\`^.[$()|*+?{''
+int(14)
+array(1) {
+ [0]=>
+ string(14) "\`^.[$()|*+?{'"
+}
+--> Pattern: '\a'; string: 'a'
+int(1)
+array(1) {
+ [0]=>
+ string(1) "a"
+}
+--> Pattern: '[0-9][^0-9]'; string: '2a'
+int(2)
+array(1) {
+ [0]=>
+ string(2) "2a"
+}
+--> Pattern: '^[[:alnum:]]{62,62}$'; string: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+int(62)
+array(1) {
+ [0]=>
+ string(62) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+}
+--> Pattern: '^[[:digit:]]{5}'; string: '0123456789'
+int(5)
+array(1) {
+ [0]=>
+ string(5) "01234"
+}
+--> Pattern: '[[:digit:]]{5}$'; string: '0123456789'
+int(5)
+array(1) {
+ [0]=>
+ string(5) "56789"
+}
+--> Pattern: '[[:blank:]]{1,10}'; string: '
+ '
+int(2)
+array(1) {
+ [0]=>
+ string(2) " "
+}
+--> Pattern: '[[:print:]]{3}'; string: ' a '
+int(3)
+array(1) {
+ [0]=>
+ string(3) " a "
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_basic_002.phpt b/ext/standard/tests/reg/eregi_basic_002.phpt
new file mode 100644
index 000000000..8c5d0e471
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_basic_002.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test eregi() function : basic functionality (without $regs)
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple, valid matches with eregi, without specifying $regs
+ */
+
+echo "*** Testing eregi() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+foreach ($expressions as $re) {
+ list($pattern,$string) = $re;
+ echo "--> Pattern: '$pattern'; string: '$string'\n";
+ var_dump(eregi($pattern, $string));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi() : basic functionality ***
+--> Pattern: '..(a|b|c)(a|b|c)..'; string: '--- ab ---'
+int(1)
+--> Pattern: '()'; string: ''
+int(1)
+--> Pattern: '()'; string: 'abcdef'
+int(1)
+--> Pattern: '[x]|[^x]'; string: 'abcdef'
+int(1)
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; string: '--- aaa bbb ccc ddd ---'
+int(1)
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; string: '\`^.[$()|*+?{''
+int(1)
+--> Pattern: '\a'; string: 'a'
+int(1)
+--> Pattern: '[0-9][^0-9]'; string: '2a'
+int(1)
+--> Pattern: '^[[:alnum:]]{62,62}$'; string: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+int(1)
+--> Pattern: '^[[:digit:]]{5}'; string: '0123456789'
+int(1)
+--> Pattern: '[[:digit:]]{5}$'; string: '0123456789'
+int(1)
+--> Pattern: '[[:blank:]]{1,10}'; string: '
+ '
+int(1)
+--> Pattern: '[[:print:]]{3}'; string: ' a '
+int(1)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_basic_003.phpt b/ext/standard/tests/reg/eregi_basic_003.phpt
new file mode 100644
index 000000000..a4861caa8
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_basic_003.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test eregi() function : basic functionality - long RE
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a long RE with lots of matches
+ */
+
+var_dump(eregi(str_repeat('(.)', 2048), str_repeat('x', 2048)));
+var_dump(eregi(str_repeat('(.)', 2048), str_repeat('x', 2048), $regs));
+var_dump(count($regs));
+
+echo "Done";
+?>
+--EXPECTF--
+int(1)
+int(2048)
+int(2049)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_basic_004.phpt b/ext/standard/tests/reg/eregi_basic_004.phpt
new file mode 100644
index 000000000..ad411e21f
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_basic_004.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test eregi() function : basic functionality - a few non-matches
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+$regs = 'original';
+
+var_dump(eregi('[A-Z]', '0', $regs));
+var_dump(eregi('(a){4}', 'aaa', $regs));
+var_dump(eregi('^a', 'ba', $regs));
+var_dump(eregi('b$', 'ba', $regs));
+var_dump(eregi('[:alpha:]', 'x', $regs));
+
+// Ensure $regs is unchanged
+var_dump($regs);
+
+echo "Done";
+?>
+--EXPECTF--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+string(8) "original"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_error_001.phpt b/ext/standard/tests/reg/eregi_error_001.phpt
new file mode 100644
index 000000000..a767e24b5
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_error_001.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test eregi() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test wrong number of args
+ */
+
+echo "*** Testing eregi() : error conditions ***\n";
+
+
+//Test eregi with one more than the expected number of arguments
+echo "\n-- Testing eregi() function with more than expected no. of arguments --\n";
+$pattern = 'string_val';
+$string = 'string_val';
+$registers = array(1, 2);
+$extra_arg = 10;
+var_dump( eregi($pattern, $string, $registers, $extra_arg) );
+
+// Testing eregi with one less than the expected number of arguments
+echo "\n-- Testing eregi() function with less than expected no. of arguments --\n";
+$pattern = 'string_val';
+var_dump( eregi($pattern) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi() : error conditions ***
+
+-- Testing eregi() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for eregi() in %s on line 21
+NULL
+
+-- Testing eregi() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for eregi() in %s on line 26
+NULL
+Done
diff --git a/ext/standard/tests/reg/eregi_error_002.phpt b/ext/standard/tests/reg/eregi_error_002.phpt
new file mode 100644
index 000000000..3c3bd7c99
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_error_002.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Test eregi() function : error conditions - test bad regular expressions
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test bad regular expressions
+ */
+
+echo "*** Testing eregi() : error conditions ***\n";
+
+$regs = 'original';
+
+var_dump(eregi("", "hello"));
+var_dump(eregi("c(d", "hello"));
+var_dump(eregi("a[b", "hello"));
+var_dump(eregi("c(d", "hello"));
+var_dump(eregi("*", "hello"));
+var_dump(eregi("+", "hello"));
+var_dump(eregi("?", "hello"));
+var_dump(eregi("(+?*)", "hello", $regs));
+var_dump(eregi("h{256}", "hello"));
+var_dump(eregi("h|", "hello"));
+var_dump(eregi("h{0}", "hello"));
+var_dump(eregi("h{2,1}", "hello"));
+var_dump(eregi('[a-c-e]', 'd'));
+var_dump(eregi('\\', 'x'));
+var_dump(eregi('([9-0])', '1', $regs));
+
+//ensure $regs unchanged
+var_dump($regs);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi() : error conditions ***
+
+Warning: eregi(): REG_EMPTY in %s on line 16
+bool(false)
+
+Warning: eregi(): REG_EPAREN in %s on line 17
+bool(false)
+
+Warning: eregi(): REG_EBRACK in %s on line 18
+bool(false)
+
+Warning: eregi(): REG_EPAREN in %s on line 19
+bool(false)
+
+Warning: eregi(): REG_BADRPT in %s on line 20
+bool(false)
+
+Warning: eregi(): REG_BADRPT in %s on line 21
+bool(false)
+
+Warning: eregi(): REG_BADRPT in %s on line 22
+bool(false)
+
+Warning: eregi(): REG_BADRPT in %s on line 23
+bool(false)
+
+Warning: eregi(): REG_BADBR in %s on line 24
+bool(false)
+
+Warning: eregi(): REG_EMPTY in %s on line 25
+bool(false)
+
+Warning: eregi(): REG_EMPTY in %s on line 26
+bool(false)
+
+Warning: eregi(): REG_BADBR in %s on line 27
+bool(false)
+
+Warning: eregi(): REG_ERANGE in %s on line 28
+bool(false)
+
+Warning: eregi(): REG_EESCAPE in %s on line 29
+bool(false)
+
+Warning: eregi(): REG_ERANGE in %s on line 30
+bool(false)
+string(8) "original"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_replace_basic.phpt b/ext/standard/tests/reg/eregi_replace_basic.phpt
new file mode 100644
index 000000000..f9f025fe9
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_replace_basic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Test eregi_replace() function : basic functionality - confirm case insensitivity
+--FILE--
+
+<?php
+/* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
+ * Description: Case insensitive replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test basic functionality of eregi_replace()
+ */
+
+echo "*** Testing eregi_replace() : basic functionality ***\n";
+
+$string = 'UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS';
+
+echo "String Before...\n";
+var_dump($string);
+echo "\nString after...\n";
+
+var_dump(eregi_replace('([[:lower:]]+) word', '\\1_character', $string));
+
+echo "Done";
+?>
+
+--EXPECTF--
+*** Testing eregi_replace() : basic functionality ***
+String Before...
+string(50) "UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS"
+
+String after...
+string(65) "UPPERCASE_characterS, lowercase_characters, MIxED CaSe_characterS"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_replace_basic_001.phpt b/ext/standard/tests/reg/eregi_replace_basic_001.phpt
new file mode 100644
index 000000000..bffcd0637
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_replace_basic_001.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test ereg() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple, valid matches with eregi_replace
+ */
+
+echo "*** Testing ereg() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+$replacement = '[this is a replacement]';
+
+foreach ($expressions as $re) {
+ list($pattern, $match) = $re;
+ echo "--> Pattern: '$pattern'; match: '$match'\n";
+ var_dump(eregi_replace($pattern, $replacement, $match . ' this contains some matches ' . $match));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : basic functionality ***
+--> Pattern: '..(a|b|c)(a|b|c)..'; match: '--- ab ---'
+string(82) "--[this is a replacement]-- this contains some matches --[this is a replacement]--"
+--> Pattern: '()'; match: ''
+string(695) "[this is a replacement] [this is a replacement]t[this is a replacement]h[this is a replacement]i[this is a replacement]s[this is a replacement] [this is a replacement]c[this is a replacement]o[this is a replacement]n[this is a replacement]t[this is a replacement]a[this is a replacement]i[this is a replacement]n[this is a replacement]s[this is a replacement] [this is a replacement]s[this is a replacement]o[this is a replacement]m[this is a replacement]e[this is a replacement] [this is a replacement]m[this is a replacement]a[this is a replacement]t[this is a replacement]c[this is a replacement]h[this is a replacement]e[this is a replacement]s[this is a replacement] [this is a replacement]"
+--> Pattern: '()'; match: 'abcdef'
+string(983) "[this is a replacement]a[this is a replacement]b[this is a replacement]c[this is a replacement]d[this is a replacement]e[this is a replacement]f[this is a replacement] [this is a replacement]t[this is a replacement]h[this is a replacement]i[this is a replacement]s[this is a replacement] [this is a replacement]c[this is a replacement]o[this is a replacement]n[this is a replacement]t[this is a replacement]a[this is a replacement]i[this is a replacement]n[this is a replacement]s[this is a replacement] [this is a replacement]s[this is a replacement]o[this is a replacement]m[this is a replacement]e[this is a replacement] [this is a replacement]m[this is a replacement]a[this is a replacement]t[this is a replacement]c[this is a replacement]h[this is a replacement]e[this is a replacement]s[this is a replacement] [this is a replacement]a[this is a replacement]b[this is a replacement]c[this is a replacement]d[this is a replacement]e[this is a replacement]f[this is a replacement]"
+--> Pattern: '[x]|[^x]'; match: 'abcdef'
+string(920) "[this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement]"
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; match: '--- aaa bbb ccc ddd ---'
+string(90) "--- [this is a replacement] --- this contains some matches --- [this is a replacement] ---"
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; match: '\`^.[$()|*+?{''
+string(74) "[this is a replacement] this contains some matches [this is a replacement]"
+--> Pattern: '\a'; match: 'a'
+string(118) "[this is a replacement] this cont[this is a replacement]ins some m[this is a replacement]tches [this is a replacement]"
+--> Pattern: '[0-9][^0-9]'; match: '2a'
+string(74) "[this is a replacement] this contains some matches [this is a replacement]"
+--> Pattern: '^[[:alnum:]]{62,62}$'; match: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+string(152) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ this contains some matches 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+--> Pattern: '^[[:digit:]]{5}'; match: '0123456789'
+string(66) "[this is a replacement]56789 this contains some matches 0123456789"
+--> Pattern: '[[:digit:]]{5}$'; match: '0123456789'
+string(66) "0123456789 this contains some matches 01234[this is a replacement]"
+--> Pattern: '[[:blank:]]{1,10}'; match: '
+ '
+string(163) "
+[this is a replacement]this[this is a replacement]contains[this is a replacement]some[this is a replacement]matches[this is a replacement]
+[this is a replacement]"
+--> Pattern: '[[:print:]]{3}'; match: ' a '
+string(254) "[this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement][this is a replacement] "
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_replace_basic_002.phpt b/ext/standard/tests/reg/eregi_replace_basic_002.phpt
new file mode 100644
index 000000000..7a4bd3d84
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_replace_basic_002.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Test eregi_replace() function : basic functionality - a few non-matches
+--FILE--
+<?php
+/* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+$replacement = 'r';
+
+var_dump(eregi_replace('[A-Z]', $replacement, '0'));
+var_dump(eregi_replace('(a){4}', $replacement, 'aaa'));
+var_dump(eregi_replace('^a', $replacement, 'ba'));
+var_dump(eregi_replace('b$', $replacement, 'ba'));
+var_dump(eregi_replace('[:alpha:]', $replacement, 'x'));
+
+
+echo "Done";
+?>
+--EXPECTF--
+string(1) "0"
+string(3) "aaa"
+string(2) "ba"
+string(2) "ba"
+string(1) "x"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_replace_error_001.phpt b/ext/standard/tests/reg/eregi_replace_error_001.phpt
new file mode 100644
index 000000000..8b7f90d9a
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_replace_error_001.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test eregi_replace() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+echo "*** Testing eregi_replace() : error conditions ***\n";
+
+
+//Test eregi_replace with one more than the expected number of arguments
+echo "\n-- Testing eregi_replace() function with more than expected no. of arguments --\n";
+$pattern = 'string_val';
+$replacement = 'string_val';
+$string = 'string_val';
+$extra_arg = 10;
+var_dump( eregi_replace($pattern, $replacement, $string, $extra_arg) );
+
+// Testing eregi_replace with one less than the expected number of arguments
+echo "\n-- Testing eregi_replace() function with less than expected no. of arguments --\n";
+$pattern = 'string_val';
+$replacement = 'string_val';
+var_dump( eregi_replace($pattern, $replacement) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi_replace() : error conditions ***
+
+-- Testing eregi_replace() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for eregi_replace() in %s on line 17
+NULL
+
+-- Testing eregi_replace() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for eregi_replace() in %s on line 23
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_replace_error_002.phpt b/ext/standard/tests/reg/eregi_replace_error_002.phpt
new file mode 100644
index 000000000..35684b8bd
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_replace_error_002.phpt
@@ -0,0 +1,76 @@
+--TEST--
+Test eregi_replace() function : error conditions - bad regular expressions
+--FILE--
+<?php
+/* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+echo "*** Testing eregi_replace() : bad REs ***\n";
+var_dump(eregi_replace("", "hello", "some string"));
+var_dump(eregi_replace("c(d", "hello", "some string"));
+var_dump(eregi_replace("a[b", "hello", "some string"));
+var_dump(eregi_replace("c(d", "hello", "some string"));;
+var_dump(eregi_replace("*", "hello", "some string"));
+var_dump(eregi_replace("+", "hello", "some string"));
+var_dump(eregi_replace("?", "hello", "some string"));
+var_dump(eregi_replace("(+?*)", "hello", "some string"));
+var_dump(eregi_replace("h{256}", "hello", "some string"));
+var_dump(eregi_replace("h|", "hello", "some string"));
+var_dump(eregi_replace("h{0}", "hello", "some string"));
+var_dump(eregi_replace("h{2,1}", "hello", "some string"));
+var_dump(eregi_replace('[a-c-e]', 'd', "some string"));
+var_dump(eregi_replace('\\', 'x', "some string"));
+var_dump(eregi_replace('([9-0])', '1', "some string"));
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi_replace() : bad REs ***
+
+Warning: eregi_replace(): REG_EMPTY in %s on line 9
+bool(false)
+
+Warning: eregi_replace(): REG_EPAREN in %s on line 10
+bool(false)
+
+Warning: eregi_replace(): REG_EBRACK in %s on line 11
+bool(false)
+
+Warning: eregi_replace(): REG_EPAREN in %s on line 12
+bool(false)
+
+Warning: eregi_replace(): REG_BADRPT in %s on line 13
+bool(false)
+
+Warning: eregi_replace(): REG_BADRPT in %s on line 14
+bool(false)
+
+Warning: eregi_replace(): REG_BADRPT in %s on line 15
+bool(false)
+
+Warning: eregi_replace(): REG_BADRPT in %s on line 16
+bool(false)
+
+Warning: eregi_replace(): REG_BADBR in %s on line 17
+bool(false)
+
+Warning: eregi_replace(): REG_EMPTY in %s on line 18
+bool(false)
+
+Warning: eregi_replace(): REG_EMPTY in %s on line 19
+bool(false)
+
+Warning: eregi_replace(): REG_BADBR in %s on line 20
+bool(false)
+
+Warning: eregi_replace(): REG_ERANGE in %s on line 21
+bool(false)
+
+Warning: eregi_replace(): REG_EESCAPE in %s on line 22
+bool(false)
+
+Warning: eregi_replace(): REG_ERANGE in %s on line 23
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_replace_variation_001.phpt b/ext/standard/tests/reg/eregi_replace_variation_001.phpt
new file mode 100644
index 000000000..87f9aa277
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_replace_variation_001.phpt
@@ -0,0 +1,175 @@
+--TEST--
+Test eregi_replace() function : usage variations - unexpected type arg 1
+--FILE--
+<?php
+/* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing eregi_replace() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$replacement = 'new';
+$string = 'original';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for pattern
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( eregi_replace($value, $replacement, $string) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi_replace() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+string(8) "original"
+
+Arg value 12345
+string(8) "original"
+
+Arg value -2345
+string(8) "original"
+
+Arg value 10.5
+string(8) "original"
+
+Arg value -10.5
+string(8) "original"
+
+Arg value 101234567000
+string(8) "original"
+
+Arg value 1.07654321E-9
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 0.5
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value Array
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value Array
+string(8) "original"
+
+Arg value Array
+string(8) "original"
+
+Arg value Array
+string(8) "original"
+
+Arg value Array
+string(8) "original"
+
+Arg value
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+string(8) "original"
+
+Arg value
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+string(8) "original"
+
+Arg value
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 8 - Object of class stdClass could not be converted to int, %s(74)
+string(8) "original"
+
+Arg value
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - eregi_replace(): REG_EMPTY, %s(74)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_replace_variation_002.phpt b/ext/standard/tests/reg/eregi_replace_variation_002.phpt
new file mode 100644
index 000000000..786de9978
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_replace_variation_002.phpt
@@ -0,0 +1,163 @@
+--TEST--
+Test eregi_replace() function : usage variations - unexpected type arg 2
+--FILE--
+<?php
+/* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing eregi_replace() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = 'ell';
+$string = 'hello!';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for replacement
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump(urlencode(eregi_replace($pattern, $value, $string)));
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi_replace() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+string(5) "ho%21"
+
+Arg value 1
+string(8) "h%01o%21"
+
+Arg value 12345
+string(6) "h9o%21"
+
+Arg value -2345
+string(8) "h%D7o%21"
+
+Arg value 10.5
+string(8) "h%0Ao%21"
+
+Arg value -10.5
+string(8) "h%F6o%21"
+
+Arg value 101234567000
+string(%d) "h%so%21"
+
+Arg value 1.07654321E-9
+string(5) "ho%21"
+
+Arg value 0.5
+string(5) "ho%21"
+
+Arg value Array
+string(5) "ho%21"
+
+Arg value Array
+string(8) "h%01o%21"
+
+Arg value Array
+string(8) "h%01o%21"
+
+Arg value Array
+string(8) "h%01o%21"
+
+Arg value Array
+string(8) "h%01o%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value 1
+string(8) "h%01o%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value 1
+string(8) "h%01o%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value
+string(5) "ho%21"
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 8 - Object of class stdClass could not be converted to int, %s(74)
+string(8) "h%01o%21"
+
+Arg value
+string(5) "ho%21"
+
+Arg value
+string(5) "ho%21"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_replace_variation_003.phpt b/ext/standard/tests/reg/eregi_replace_variation_003.phpt
new file mode 100644
index 000000000..f4426fd3c
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_replace_variation_003.phpt
@@ -0,0 +1,169 @@
+--TEST--
+Test eregi_replace() function : usage variations - unexpected type arg 3
+--FILE--
+<?php
+/* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
+ * Description: Replace regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing eregi_replace() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = '1';
+$replacement = 'new value';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for string
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( eregi_replace($pattern, $replacement, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi_replace() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+string(1) "0"
+
+Arg value 1
+string(9) "new value"
+
+Arg value 12345
+string(13) "new value2345"
+
+Arg value -2345
+string(5) "-2345"
+
+Arg value 10.5
+string(12) "new value0.5"
+
+Arg value -10.5
+string(13) "-new value0.5"
+
+Arg value 101234567000
+string(28) "new value0new value234567000"
+
+Arg value 1.07654321E-9
+string(29) "new value.0765432new valueE-9"
+
+Arg value 0.5
+string(3) "0.5"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+string(5) "Array"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(9) "new value"
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(9) "new value"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+Error: 8 - Object of class stdClass to string conversion, %s(74)
+string(6) "Object"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_variation_001.phpt b/ext/standard/tests/reg/eregi_variation_001.phpt
new file mode 100644
index 000000000..ea8b8440d
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_variation_001.phpt
@@ -0,0 +1,178 @@
+--TEST--
+Test eregi() function : usage variations - unexpected type arg 1
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+
+echo "*** Testing eregi() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$string = '1';
+$registers = array(1, 2);
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for pattern
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( eregi($value, $string, $registers) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(65)
+Error: 8 - Undefined variable: unset_var, %s(68)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - eregi(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - eregi(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value
+Error: 2 - eregi(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value
+Error: 2 - eregi(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - eregi(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - eregi(): REG_EMPTY, %s(75)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(75)
+Error: 8 - Object of class stdClass to string conversion, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - eregi(): REG_EMPTY, %s(75)
+bool(false)
+
+Arg value
+Error: 2 - eregi(): REG_EMPTY, %s(75)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_variation_002.phpt b/ext/standard/tests/reg/eregi_variation_002.phpt
new file mode 100644
index 000000000..766a48abd
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_variation_002.phpt
@@ -0,0 +1,169 @@
+--TEST--
+Test eregi() function : usage variations - unexpected type arg 2
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing eregi() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = '1';
+$registers = array();
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for string
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( eregi($pattern, $value, $registers) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value 12345
+int(1)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+int(1)
+
+Arg value -10.5
+int(1)
+
+Arg value 101234567000
+int(1)
+
+Arg value 1.07654321E-9
+int(1)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value
+bool(false)
+
+Arg value 1
+int(1)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+Error: 8 - Object of class stdClass to string conversion, %s(74)
+bool(false)
+
+Arg value
+bool(false)
+
+Arg value
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_variation_003.phpt b/ext/standard/tests/reg/eregi_variation_003.phpt
new file mode 100644
index 000000000..43785871a
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_variation_003.phpt
@@ -0,0 +1,283 @@
+--TEST--
+Test eregi() function : usage variations - unexpected type for arg 3
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing eregi() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = 'h(.*)lo!';
+$string = 'hello!';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for registers
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( eregi($pattern, $string, $value) );
+ var_dump($value);
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing eregi() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(61)
+Error: 8 - Undefined variable: unset_var, %s(64)
+
+Arg value 0
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 1
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 12345
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value -2345
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 10.5
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value -10.5
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 101234567000
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 1.07654321E-9
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 0.5
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 1
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value 1
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value string
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value string
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+Error: 4096 - Object of class stdClass could not be converted to string, %s(70)
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+
+Arg value
+int(6)
+array(2) {
+ [0]=>
+ string(6) "hello!"
+ [1]=>
+ string(2) "el"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/eregi_variation_004.phpt b/ext/standard/tests/reg/eregi_variation_004.phpt
new file mode 100644
index 000000000..bf4f03695
--- /dev/null
+++ b/ext/standard/tests/reg/eregi_variation_004.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test eregi() function : usage variations - pass non-variable as arg 3, which is pass-by-ref.
+--FILE--
+<?php
+/* Prototype : proto int eregi(string pattern, string string [, array registers])
+ * Description: Regular expression match
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+var_dump(eregi('l{2}', 'hello', str_repeat('x',1)));
+echo "Done";
+?>
+--EXPECTF--
+
+Strict Standards: Only variables should be passed by reference in %s on line 8
+int(2)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/regular_expressions.inc b/ext/standard/tests/reg/regular_expressions.inc
new file mode 100644
index 000000000..98fae4b11
--- /dev/null
+++ b/ext/standard/tests/reg/regular_expressions.inc
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * POSIX regular expressions each coupled with a string that they match,
+ * based on documentation on http://www.tin.org/bin/man.cgi?section=7&topic=regex .
+ */
+$expressions = array(
+ //array(pattern, string to match)
+ array('..(a|b|c)(a|b|c)..', '--- ab ---'),
+ array('()', ''),
+ array('()', 'abcdef'),
+ array('[x]|[^x]', 'abcdef'),
+ array('(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)', '--- aaa bbb ccc ddd ---'),
+ array('\\\\\`\^\.\[\$\(\)\|\*\+\?\{\\\'', '\\`^.[$()|*+?{\''),
+ array('\\a', 'a'),
+ array('[0-9][^0-9]', '2a'),
+ array('^[[:alnum:]]{62,62}$', '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+ array('^[[:digit:]]{5}', '0123456789'),
+ array('[[:digit:]]{5}$', '0123456789'),
+ array('[[:blank:]]{1,10}', "\n \t"),
+ array('[[:print:]]{3}', " a "),
+);
+
+?> \ No newline at end of file
diff --git a/ext/standard/tests/reg/split_basic_001.phpt b/ext/standard/tests/reg/split_basic_001.phpt
new file mode 100644
index 000000000..e122e2c15
--- /dev/null
+++ b/ext/standard/tests/reg/split_basic_001.phpt
@@ -0,0 +1,129 @@
+--TEST--
+Test split() function : basic functionality - test a number of simple split, specifying a limit
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: Split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple split, specifying a limit
+ */
+
+echo "*** Testing ereg() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+foreach ($expressions as $re) {
+ list($pattern,$string) = $re;
+ echo "\n--> Pattern: '$pattern'; match: '$string'\n";
+ var_dump(split($pattern, $string . ' |1| ' . $string . ' |2| ' . $string, 2));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : basic functionality ***
+
+--> Pattern: '..(a|b|c)(a|b|c)..'; match: '--- ab ---'
+array(2) {
+ [0]=>
+ string(2) "--"
+ [1]=>
+ string(32) "-- |1| --- ab --- |2| --- ab ---"
+}
+
+--> Pattern: '()'; match: ''
+
+Warning: split(): Invalid Regular Expression in %s on line 19
+bool(false)
+
+--> Pattern: '()'; match: 'abcdef'
+
+Warning: split(): Invalid Regular Expression in %s on line 19
+bool(false)
+
+--> Pattern: '[x]|[^x]'; match: 'abcdef'
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(27) "bcdef |1| abcdef |2| abcdef"
+}
+
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; match: '--- aaa bbb ccc ddd ---'
+array(2) {
+ [0]=>
+ string(4) "--- "
+ [1]=>
+ string(60) " --- |1| --- aaa bbb ccc ddd --- |2| --- aaa bbb ccc ddd ---"
+}
+
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; match: '\`^.[$()|*+?{''
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(38) " |1| \`^.[$()|*+?{' |2| \`^.[$()|*+?{'"
+}
+
+--> Pattern: '\a'; match: 'a'
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(12) " |1| a |2| a"
+}
+
+--> Pattern: '[0-9][^0-9]'; match: '2a'
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(14) " |1| 2a |2| 2a"
+}
+
+--> Pattern: '^[[:alnum:]]{62,62}$'; match: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+array(1) {
+ [0]=>
+ string(196) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |1| 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |2| 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+}
+
+--> Pattern: '^[[:digit:]]{5}'; match: '0123456789'
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(35) "56789 |1| 0123456789 |2| 0123456789"
+}
+
+--> Pattern: '[[:digit:]]{5}$'; match: '0123456789'
+array(2) {
+ [0]=>
+ string(35) "0123456789 |1| 0123456789 |2| 01234"
+ [1]=>
+ string(0) ""
+}
+
+--> Pattern: '[[:blank:]]{1,10}'; match: '
+ '
+array(2) {
+ [0]=>
+ string(1) "
+"
+ [1]=>
+ string(15) "|1|
+ |2|
+ "
+}
+
+--> Pattern: '[[:print:]]{3}'; match: ' a '
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(16) " |1| a |2| a "
+}
+Done
diff --git a/ext/standard/tests/reg/split_basic_002.phpt b/ext/standard/tests/reg/split_basic_002.phpt
new file mode 100644
index 000000000..110007d3e
--- /dev/null
+++ b/ext/standard/tests/reg/split_basic_002.phpt
@@ -0,0 +1,227 @@
+--TEST--
+Test split() function : basic functionality - test a number of simple split, without specifying a limit
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: Split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple split, without specifying a limit
+ */
+
+echo "*** Testing ereg() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+foreach ($expressions as $re) {
+ list($pattern,$string) = $re;
+ echo "\n--> Pattern: '$pattern'; match: '$string'\n";
+ var_dump(split($pattern, $string . ' |1| ' . $string . ' |2| ' . $string));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : basic functionality ***
+
+--> Pattern: '..(a|b|c)(a|b|c)..'; match: '--- ab ---'
+array(4) {
+ [0]=>
+ string(2) "--"
+ [1]=>
+ string(9) "-- |1| --"
+ [2]=>
+ string(9) "-- |2| --"
+ [3]=>
+ string(2) "--"
+}
+
+--> Pattern: '()'; match: ''
+
+Warning: split(): Invalid Regular Expression in %s on line 19
+bool(false)
+
+--> Pattern: '()'; match: 'abcdef'
+
+Warning: split(): Invalid Regular Expression in %s on line 19
+bool(false)
+
+--> Pattern: '[x]|[^x]'; match: 'abcdef'
+array(29) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(0) ""
+ [3]=>
+ string(0) ""
+ [4]=>
+ string(0) ""
+ [5]=>
+ string(0) ""
+ [6]=>
+ string(0) ""
+ [7]=>
+ string(0) ""
+ [8]=>
+ string(0) ""
+ [9]=>
+ string(0) ""
+ [10]=>
+ string(0) ""
+ [11]=>
+ string(0) ""
+ [12]=>
+ string(0) ""
+ [13]=>
+ string(0) ""
+ [14]=>
+ string(0) ""
+ [15]=>
+ string(0) ""
+ [16]=>
+ string(0) ""
+ [17]=>
+ string(0) ""
+ [18]=>
+ string(0) ""
+ [19]=>
+ string(0) ""
+ [20]=>
+ string(0) ""
+ [21]=>
+ string(0) ""
+ [22]=>
+ string(0) ""
+ [23]=>
+ string(0) ""
+ [24]=>
+ string(0) ""
+ [25]=>
+ string(0) ""
+ [26]=>
+ string(0) ""
+ [27]=>
+ string(0) ""
+ [28]=>
+ string(0) ""
+}
+
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; match: '--- aaa bbb ccc ddd ---'
+array(4) {
+ [0]=>
+ string(4) "--- "
+ [1]=>
+ string(13) " --- |1| --- "
+ [2]=>
+ string(13) " --- |2| --- "
+ [3]=>
+ string(4) " ---"
+}
+
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; match: '\`^.[$()|*+?{''
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(5) " |1| "
+ [2]=>
+ string(5) " |2| "
+ [3]=>
+ string(0) ""
+}
+
+--> Pattern: '\a'; match: 'a'
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(5) " |1| "
+ [2]=>
+ string(5) " |2| "
+ [3]=>
+ string(0) ""
+}
+
+--> Pattern: '[0-9][^0-9]'; match: '2a'
+array(6) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(2) " |"
+ [2]=>
+ string(1) " "
+ [3]=>
+ string(2) " |"
+ [4]=>
+ string(1) " "
+ [5]=>
+ string(0) ""
+}
+
+--> Pattern: '^[[:alnum:]]{62,62}$'; match: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+array(1) {
+ [0]=>
+ string(196) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |1| 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |2| 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+}
+
+--> Pattern: '^[[:digit:]]{5}'; match: '0123456789'
+array(3) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(30) " |1| 0123456789 |2| 0123456789"
+}
+
+--> Pattern: '[[:digit:]]{5}$'; match: '0123456789'
+array(2) {
+ [0]=>
+ string(35) "0123456789 |1| 0123456789 |2| 01234"
+ [1]=>
+ string(0) ""
+}
+
+--> Pattern: '[[:blank:]]{1,10}'; match: '
+ '
+array(6) {
+ [0]=>
+ string(1) "
+"
+ [1]=>
+ string(3) "|1|"
+ [2]=>
+ string(1) "
+"
+ [3]=>
+ string(3) "|2|"
+ [4]=>
+ string(1) "
+"
+ [5]=>
+ string(0) ""
+}
+
+--> Pattern: '[[:print:]]{3}'; match: ' a '
+array(7) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(0) ""
+ [3]=>
+ string(0) ""
+ [4]=>
+ string(0) ""
+ [5]=>
+ string(0) ""
+ [6]=>
+ string(1) " "
+}
+Done
diff --git a/ext/standard/tests/reg/split_basic_003.phpt b/ext/standard/tests/reg/split_basic_003.phpt
new file mode 100644
index 000000000..4d36fcddb
--- /dev/null
+++ b/ext/standard/tests/reg/split_basic_003.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test split() function : basic functionality - a few non-matches
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+$replacement = 'r';
+
+var_dump(split('A', '-- a --'));
+var_dump(split('[A-Z]', '-- 0 --'));
+var_dump(split('(a){4}', '--- aaa ---'));
+var_dump(split('^a', '--- ba ---'));
+var_dump(split('b$', '--- ba ---'));
+var_dump(split('[:alpha:]', '--- x ---'));
+
+
+echo "Done";
+?>
+--EXPECTF--
+array(1) {
+ [0]=>
+ string(7) "-- a --"
+}
+array(1) {
+ [0]=>
+ string(7) "-- 0 --"
+}
+array(1) {
+ [0]=>
+ string(11) "--- aaa ---"
+}
+array(1) {
+ [0]=>
+ string(10) "--- ba ---"
+}
+array(1) {
+ [0]=>
+ string(10) "--- ba ---"
+}
+array(1) {
+ [0]=>
+ string(9) "--- x ---"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/split_error_001.phpt b/ext/standard/tests/reg/split_error_001.phpt
new file mode 100644
index 000000000..ff8e6cbdd
--- /dev/null
+++ b/ext/standard/tests/reg/split_error_001.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test split() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: Split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+echo "*** Testing split() : error conditions - wrong number of args ***\n";
+
+
+//Test split with one more than the expected number of arguments
+echo "\n-- Testing split() function with more than expected no. of arguments --\n";
+$pattern = 'string_val';
+$string = 'string_val';
+$limit = 10;
+$extra_arg = 10;
+var_dump( split($pattern, $string, $limit, $extra_arg) );
+
+// Testing split with one less than the expected number of arguments
+echo "\n-- Testing split() function with less than expected no. of arguments --\n";
+$pattern = 'string_val';
+var_dump( split($pattern) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing split() : error conditions - wrong number of args ***
+
+-- Testing split() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for split() in %s on line 17
+NULL
+
+-- Testing split() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for split() in %s on line 22
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/split_error_002.phpt b/ext/standard/tests/reg/split_error_002.phpt
new file mode 100644
index 000000000..8c4ce345d
--- /dev/null
+++ b/ext/standard/tests/reg/split_error_002.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Test split() function : error conditions - test bad regular expressions
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: Split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test bad regular expressions
+ */
+
+echo "*** Testing split() : error conditions ***\n";
+
+$regs = 'original';
+
+var_dump(split("", "hello"));
+var_dump(split("c(d", "hello"));
+var_dump(split("a[b", "hello"));
+var_dump(split("c(d", "hello"));
+var_dump(split("*", "hello"));
+var_dump(split("+", "hello"));
+var_dump(split("?", "hello"));
+var_dump(split("(+?*)", "hello", $regs));
+var_dump(split("h{256}", "hello"));
+var_dump(split("h|", "hello"));
+var_dump(split("h{0}", "hello"));
+var_dump(split("h{2,1}", "hello"));
+var_dump(split('[a-c-e]', 'd'));
+var_dump(split('\\', 'x'));
+var_dump(split('([9-0])', '1', $regs));
+
+//ensure $regs unchanged
+var_dump($regs);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing split() : error conditions ***
+
+Warning: split(): REG_EMPTY in %s on line 16
+bool(false)
+
+Warning: split(): REG_EPAREN in %s on line 17
+bool(false)
+
+Warning: split(): REG_EBRACK in %s on line 18
+bool(false)
+
+Warning: split(): REG_EPAREN in %s on line 19
+bool(false)
+
+Warning: split(): REG_BADRPT in %s on line 20
+bool(false)
+
+Warning: split(): REG_BADRPT in %s on line 21
+bool(false)
+
+Warning: split(): REG_BADRPT in %s on line 22
+bool(false)
+
+Warning: split(): REG_BADRPT in %s on line 23
+bool(false)
+
+Warning: split(): REG_BADBR in %s on line 24
+bool(false)
+
+Warning: split(): REG_EMPTY in %s on line 25
+bool(false)
+
+Warning: split(): REG_EMPTY in %s on line 26
+bool(false)
+
+Warning: split(): REG_BADBR in %s on line 27
+bool(false)
+
+Warning: split(): REG_ERANGE in %s on line 28
+bool(false)
+
+Warning: split(): REG_EESCAPE in %s on line 29
+bool(false)
+
+Warning: split(): REG_ERANGE in %s on line 30
+bool(false)
+string(8) "original"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/split_variation_001.phpt b/ext/standard/tests/reg/split_variation_001.phpt
new file mode 100644
index 000000000..625bf0625
--- /dev/null
+++ b/ext/standard/tests/reg/split_variation_001.phpt
@@ -0,0 +1,256 @@
+--TEST--
+Test split() function : usage variations - unexpected type for arg 1
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: Split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing split() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$string = '1 a 1 Array 1 c ';
+$limit = 5;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for pattern
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( split($value, $string, $limit) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing split() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 1
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(3) " a "
+ [2]=>
+ string(7) " Array "
+ [3]=>
+ string(3) " c "
+}
+
+Arg value 12345
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value -2345
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 10.5
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value -10.5
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 101234567000
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 1.07654321E-9
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 0.5
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value
+Error: 2 - split(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - split(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(3) " a "
+ [2]=>
+ string(7) " Array "
+ [3]=>
+ string(3) " c "
+}
+
+Arg value
+Error: 2 - split(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(3) " a "
+ [2]=>
+ string(7) " Array "
+ [3]=>
+ string(3) " c "
+}
+
+Arg value
+Error: 2 - split(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - split(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - split(): REG_EMPTY, %s(74)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+Error: 8 - Object of class stdClass to string conversion, %s(74)
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value
+Error: 2 - split(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - split(): REG_EMPTY, %s(74)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/split_variation_002.phpt b/ext/standard/tests/reg/split_variation_002.phpt
new file mode 100644
index 000000000..d7fa8445b
--- /dev/null
+++ b/ext/standard/tests/reg/split_variation_002.phpt
@@ -0,0 +1,268 @@
+--TEST--
+Test split() function : usage variations - unexpected type for arg 2
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: Split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing split() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = 'r|j|E';
+$limit = 5;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for string
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( split($pattern, $value, $limit) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing split() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+array(1) {
+ [0]=>
+ string(1) "0"
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(1) "1"
+}
+
+Arg value 12345
+array(1) {
+ [0]=>
+ string(5) "12345"
+}
+
+Arg value -2345
+array(1) {
+ [0]=>
+ string(5) "-2345"
+}
+
+Arg value 10.5
+array(1) {
+ [0]=>
+ string(4) "10.5"
+}
+
+Arg value -10.5
+array(1) {
+ [0]=>
+ string(5) "-10.5"
+}
+
+Arg value 101234567000
+array(1) {
+ [0]=>
+ string(12) "101234567000"
+}
+
+Arg value 1.07654321E-9
+array(2) {
+ [0]=>
+ string(10) "1.07654321"
+ [1]=>
+ string(2) "-9"
+}
+
+Arg value 0.5
+array(1) {
+ [0]=>
+ string(3) "0.5"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(1) "1"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(1) "1"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+Error: 8 - Object of class stdClass to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(2) "Ob"
+ [1]=>
+ string(3) "ect"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+Done
diff --git a/ext/standard/tests/reg/split_variation_003.phpt b/ext/standard/tests/reg/split_variation_003.phpt
new file mode 100644
index 000000000..7686c0886
--- /dev/null
+++ b/ext/standard/tests/reg/split_variation_003.phpt
@@ -0,0 +1,225 @@
+--TEST--
+Test split() function : usage variations - unexpected type for arg 3
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: Split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ if (error_reporting() != 0) {
+ // report non-silenced errors
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+ }
+}
+set_error_handler('test_error_handler');
+echo "*** Testing split() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = '[[:space:]]';
+$string = '1 2 3 4 5';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+ @$unset_var,
+);
+
+// loop through each element of the array for limit
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( split($pattern, $string, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing split() : usage variations ***
+
+Arg value 10.5
+array(5) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ string(1) "2"
+ [2]=>
+ string(1) "3"
+ [3]=>
+ string(1) "4"
+ [4]=>
+ string(1) "5"
+}
+
+Arg value -10.5
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value 1.07654321E-9
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value 0.5
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value string
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value string
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+Error: 4096 - Object of class stdClass could not be converted to string, %s(72)
+
+Arg value
+Error: 8 - Object of class stdClass could not be converted to int, %s(73)
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/split_variation_004.phpt b/ext/standard/tests/reg/split_variation_004.phpt
new file mode 100644
index 000000000..537070908
--- /dev/null
+++ b/ext/standard/tests/reg/split_variation_004.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test split() function : usage variations - out-of-range values for limit
+--FILE--
+<?php
+/* Prototype : proto array split(string pattern, string string [, int limit])
+ * Description: Split string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+echo "*** Testing split() : usage variations ***\n";
+
+$pattern = '[[:space:]]';
+$string = '1 2 3 4 5';
+var_dump(split($pattern, $string, 0));
+var_dump(split($pattern, $string, -10));
+var_dump(split($pattern, $string, 10E20));
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing split() : usage variations ***
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/spliti_basic_001.phpt b/ext/standard/tests/reg/spliti_basic_001.phpt
new file mode 100644
index 000000000..04f138d4e
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_basic_001.phpt
@@ -0,0 +1,129 @@
+--TEST--
+Test spliti() function : basic functionality - test a number of simple spliti, specifying a limit
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple spliti, specifying a limit
+ */
+
+echo "*** Testing ereg() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+foreach ($expressions as $re) {
+ list($pattern,$string) = $re;
+ echo "\n--> Pattern: '$pattern'; match: '$string'\n";
+ var_dump(spliti($pattern, $string . ' |1| ' . $string . ' |2| ' . $string, 2));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : basic functionality ***
+
+--> Pattern: '..(a|b|c)(a|b|c)..'; match: '--- ab ---'
+array(2) {
+ [0]=>
+ string(2) "--"
+ [1]=>
+ string(32) "-- |1| --- ab --- |2| --- ab ---"
+}
+
+--> Pattern: '()'; match: ''
+
+Warning: spliti(): Invalid Regular Expression in %s on line 19
+bool(false)
+
+--> Pattern: '()'; match: 'abcdef'
+
+Warning: spliti(): Invalid Regular Expression in %s on line 19
+bool(false)
+
+--> Pattern: '[x]|[^x]'; match: 'abcdef'
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(27) "bcdef |1| abcdef |2| abcdef"
+}
+
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; match: '--- aaa bbb ccc ddd ---'
+array(2) {
+ [0]=>
+ string(4) "--- "
+ [1]=>
+ string(60) " --- |1| --- aaa bbb ccc ddd --- |2| --- aaa bbb ccc ddd ---"
+}
+
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; match: '\`^.[$()|*+?{''
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(38) " |1| \`^.[$()|*+?{' |2| \`^.[$()|*+?{'"
+}
+
+--> Pattern: '\a'; match: 'a'
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(12) " |1| a |2| a"
+}
+
+--> Pattern: '[0-9][^0-9]'; match: '2a'
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(14) " |1| 2a |2| 2a"
+}
+
+--> Pattern: '^[[:alnum:]]{62,62}$'; match: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+array(1) {
+ [0]=>
+ string(196) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |1| 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |2| 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+}
+
+--> Pattern: '^[[:digit:]]{5}'; match: '0123456789'
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(35) "56789 |1| 0123456789 |2| 0123456789"
+}
+
+--> Pattern: '[[:digit:]]{5}$'; match: '0123456789'
+array(2) {
+ [0]=>
+ string(35) "0123456789 |1| 0123456789 |2| 01234"
+ [1]=>
+ string(0) ""
+}
+
+--> Pattern: '[[:blank:]]{1,10}'; match: '
+ '
+array(2) {
+ [0]=>
+ string(1) "
+"
+ [1]=>
+ string(15) "|1|
+ |2|
+ "
+}
+
+--> Pattern: '[[:print:]]{3}'; match: ' a '
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(16) " |1| a |2| a "
+}
+Done
diff --git a/ext/standard/tests/reg/spliti_basic_002.phpt b/ext/standard/tests/reg/spliti_basic_002.phpt
new file mode 100644
index 000000000..79784d324
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_basic_002.phpt
@@ -0,0 +1,227 @@
+--TEST--
+Test spliti() function : basic functionality - test a number of simple spliti, without specifying a limit
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test a number of simple spliti, without specifying a limit
+ */
+
+echo "*** Testing ereg() : basic functionality ***\n";
+
+include(dirname(__FILE__) . '/regular_expressions.inc');
+
+foreach ($expressions as $re) {
+ list($pattern,$string) = $re;
+ echo "\n--> Pattern: '$pattern'; match: '$string'\n";
+ var_dump(spliti($pattern, $string . ' |1| ' . $string . ' |2| ' . $string));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing ereg() : basic functionality ***
+
+--> Pattern: '..(a|b|c)(a|b|c)..'; match: '--- ab ---'
+array(4) {
+ [0]=>
+ string(2) "--"
+ [1]=>
+ string(9) "-- |1| --"
+ [2]=>
+ string(9) "-- |2| --"
+ [3]=>
+ string(2) "--"
+}
+
+--> Pattern: '()'; match: ''
+
+Warning: spliti(): Invalid Regular Expression in %s on line 19
+bool(false)
+
+--> Pattern: '()'; match: 'abcdef'
+
+Warning: spliti(): Invalid Regular Expression in %s on line 19
+bool(false)
+
+--> Pattern: '[x]|[^x]'; match: 'abcdef'
+array(29) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(0) ""
+ [3]=>
+ string(0) ""
+ [4]=>
+ string(0) ""
+ [5]=>
+ string(0) ""
+ [6]=>
+ string(0) ""
+ [7]=>
+ string(0) ""
+ [8]=>
+ string(0) ""
+ [9]=>
+ string(0) ""
+ [10]=>
+ string(0) ""
+ [11]=>
+ string(0) ""
+ [12]=>
+ string(0) ""
+ [13]=>
+ string(0) ""
+ [14]=>
+ string(0) ""
+ [15]=>
+ string(0) ""
+ [16]=>
+ string(0) ""
+ [17]=>
+ string(0) ""
+ [18]=>
+ string(0) ""
+ [19]=>
+ string(0) ""
+ [20]=>
+ string(0) ""
+ [21]=>
+ string(0) ""
+ [22]=>
+ string(0) ""
+ [23]=>
+ string(0) ""
+ [24]=>
+ string(0) ""
+ [25]=>
+ string(0) ""
+ [26]=>
+ string(0) ""
+ [27]=>
+ string(0) ""
+ [28]=>
+ string(0) ""
+}
+
+--> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; match: '--- aaa bbb ccc ddd ---'
+array(4) {
+ [0]=>
+ string(4) "--- "
+ [1]=>
+ string(13) " --- |1| --- "
+ [2]=>
+ string(13) " --- |2| --- "
+ [3]=>
+ string(4) " ---"
+}
+
+--> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; match: '\`^.[$()|*+?{''
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(5) " |1| "
+ [2]=>
+ string(5) " |2| "
+ [3]=>
+ string(0) ""
+}
+
+--> Pattern: '\a'; match: 'a'
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(5) " |1| "
+ [2]=>
+ string(5) " |2| "
+ [3]=>
+ string(0) ""
+}
+
+--> Pattern: '[0-9][^0-9]'; match: '2a'
+array(6) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(2) " |"
+ [2]=>
+ string(1) " "
+ [3]=>
+ string(2) " |"
+ [4]=>
+ string(1) " "
+ [5]=>
+ string(0) ""
+}
+
+--> Pattern: '^[[:alnum:]]{62,62}$'; match: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+array(1) {
+ [0]=>
+ string(196) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |1| 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |2| 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+}
+
+--> Pattern: '^[[:digit:]]{5}'; match: '0123456789'
+array(3) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(30) " |1| 0123456789 |2| 0123456789"
+}
+
+--> Pattern: '[[:digit:]]{5}$'; match: '0123456789'
+array(2) {
+ [0]=>
+ string(35) "0123456789 |1| 0123456789 |2| 01234"
+ [1]=>
+ string(0) ""
+}
+
+--> Pattern: '[[:blank:]]{1,10}'; match: '
+ '
+array(6) {
+ [0]=>
+ string(1) "
+"
+ [1]=>
+ string(3) "|1|"
+ [2]=>
+ string(1) "
+"
+ [3]=>
+ string(3) "|2|"
+ [4]=>
+ string(1) "
+"
+ [5]=>
+ string(0) ""
+}
+
+--> Pattern: '[[:print:]]{3}'; match: ' a '
+array(7) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(0) ""
+ [3]=>
+ string(0) ""
+ [4]=>
+ string(0) ""
+ [5]=>
+ string(0) ""
+ [6]=>
+ string(1) " "
+}
+Done
diff --git a/ext/standard/tests/reg/spliti_basic_003.phpt b/ext/standard/tests/reg/spliti_basic_003.phpt
new file mode 100644
index 000000000..143f1a196
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_basic_003.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test spliti() function : basic functionality - a few non-matches
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+$replacement = 'r';
+
+var_dump(spliti('[A-Z]', '-- 0 --'));
+var_dump(spliti('(a){4}', '--- aaa ---'));
+var_dump(spliti('^a', '--- ba ---'));
+var_dump(spliti('b$', '--- ba ---'));
+var_dump(spliti('[:alpha:]', '--- x ---'));
+
+
+echo "Done";
+?>
+--EXPECTF--
+array(1) {
+ [0]=>
+ string(7) "-- 0 --"
+}
+array(1) {
+ [0]=>
+ string(11) "--- aaa ---"
+}
+array(1) {
+ [0]=>
+ string(10) "--- ba ---"
+}
+array(1) {
+ [0]=>
+ string(10) "--- ba ---"
+}
+array(1) {
+ [0]=>
+ string(9) "--- x ---"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/spliti_basic_004.phpt b/ext/standard/tests/reg/spliti_basic_004.phpt
new file mode 100644
index 000000000..95edc158d
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_basic_004.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test spliti() function : basic functionality - confirm case insensitivity
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+$replacement = 'r';
+
+var_dump(spliti('[a-z]', '--- A ---'));
+var_dump(spliti('[A-Z]', '--- a ---'));
+var_dump(spliti('[[:lower:]]', '--- A ---'));
+var_dump(spliti('[[:upper:]]', '--- a ---'));
+
+echo "Done";
+?>
+--EXPECTF--
+array(2) {
+ [0]=>
+ string(4) "--- "
+ [1]=>
+ string(4) " ---"
+}
+array(2) {
+ [0]=>
+ string(4) "--- "
+ [1]=>
+ string(4) " ---"
+}
+array(2) {
+ [0]=>
+ string(4) "--- "
+ [1]=>
+ string(4) " ---"
+}
+array(2) {
+ [0]=>
+ string(4) "--- "
+ [1]=>
+ string(4) " ---"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/spliti_error_001.phpt b/ext/standard/tests/reg/spliti_error_001.phpt
new file mode 100644
index 000000000..44d2be618
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_error_001.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test spliti() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+echo "*** Testing spliti() : error conditions - wrong number of args ***\n";
+
+
+//Test spliti with one more than the expected number of arguments
+echo "\n-- Testing spliti() function with more than expected no. of arguments --\n";
+$pattern = 'string_val';
+$string = 'string_val';
+$limit = 10;
+$extra_arg = 10;
+var_dump( spliti($pattern, $string, $limit, $extra_arg) );
+
+// Testing spliti with one less than the expected number of arguments
+echo "\n-- Testing spliti() function with less than expected no. of arguments --\n";
+$pattern = 'string_val';
+var_dump( spliti($pattern) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing spliti() : error conditions - wrong number of args ***
+
+-- Testing spliti() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for spliti() in %s on line 17
+NULL
+
+-- Testing spliti() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for spliti() in %s on line 22
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/spliti_error_002.phpt b/ext/standard/tests/reg/spliti_error_002.phpt
new file mode 100644
index 000000000..030fb2b24
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_error_002.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Test spliti() function : error conditions - test bad regular expressions
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+/*
+ * Test bad regular expressions
+ */
+
+echo "*** Testing spliti() : error conditions ***\n";
+
+$regs = 'original';
+
+var_dump(spliti("", "hello"));
+var_dump(spliti("c(d", "hello"));
+var_dump(spliti("a[b", "hello"));
+var_dump(spliti("c(d", "hello"));
+var_dump(spliti("*", "hello"));
+var_dump(spliti("+", "hello"));
+var_dump(spliti("?", "hello"));
+var_dump(spliti("(+?*)", "hello", $regs));
+var_dump(spliti("h{256}", "hello"));
+var_dump(spliti("h|", "hello"));
+var_dump(spliti("h{0}", "hello"));
+var_dump(spliti("h{2,1}", "hello"));
+var_dump(spliti('[a-c-e]', 'd'));
+var_dump(spliti('\\', 'x'));
+var_dump(spliti('([9-0])', '1', $regs));
+
+//ensure $regs unchanged
+var_dump($regs);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing spliti() : error conditions ***
+
+Warning: spliti(): REG_EMPTY in %s on line 16
+bool(false)
+
+Warning: spliti(): REG_EPAREN in %s on line 17
+bool(false)
+
+Warning: spliti(): REG_EBRACK in %s on line 18
+bool(false)
+
+Warning: spliti(): REG_EPAREN in %s on line 19
+bool(false)
+
+Warning: spliti(): REG_BADRPT in %s on line 20
+bool(false)
+
+Warning: spliti(): REG_BADRPT in %s on line 21
+bool(false)
+
+Warning: spliti(): REG_BADRPT in %s on line 22
+bool(false)
+
+Warning: spliti(): REG_BADRPT in %s on line 23
+bool(false)
+
+Warning: spliti(): REG_BADBR in %s on line 24
+bool(false)
+
+Warning: spliti(): REG_EMPTY in %s on line 25
+bool(false)
+
+Warning: spliti(): REG_EMPTY in %s on line 26
+bool(false)
+
+Warning: spliti(): REG_BADBR in %s on line 27
+bool(false)
+
+Warning: spliti(): REG_ERANGE in %s on line 28
+bool(false)
+
+Warning: spliti(): REG_EESCAPE in %s on line 29
+bool(false)
+
+Warning: spliti(): REG_ERANGE in %s on line 30
+bool(false)
+string(8) "original"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/spliti_variation_001.phpt b/ext/standard/tests/reg/spliti_variation_001.phpt
new file mode 100644
index 000000000..b9b15b589
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_variation_001.phpt
@@ -0,0 +1,256 @@
+--TEST--
+Test spliti() function : usage variations - unexpected type for arg 1
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing spliti() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$string = '1 a 1 Array 1 c ';
+$limit = 5;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for pattern
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( spliti($value, $string, $limit) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing spliti() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 1
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(3) " a "
+ [2]=>
+ string(7) " Array "
+ [3]=>
+ string(3) " c "
+}
+
+Arg value 12345
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value -2345
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 10.5
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value -10.5
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 101234567000
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 1.07654321E-9
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value 0.5
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(2) {
+ [0]=>
+ string(6) "1 a 1 "
+ [1]=>
+ string(5) " 1 c "
+}
+
+Arg value
+Error: 2 - spliti(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - spliti(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(3) " a "
+ [2]=>
+ string(7) " Array "
+ [3]=>
+ string(3) " c "
+}
+
+Arg value
+Error: 2 - spliti(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value 1
+array(4) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(3) " a "
+ [2]=>
+ string(7) " Array "
+ [3]=>
+ string(3) " c "
+}
+
+Arg value
+Error: 2 - spliti(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - spliti(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - spliti(): REG_EMPTY, %s(74)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+Error: 8 - Object of class stdClass to string conversion, %s(74)
+array(1) {
+ [0]=>
+ string(16) "1 a 1 Array 1 c "
+}
+
+Arg value
+Error: 2 - spliti(): REG_EMPTY, %s(74)
+bool(false)
+
+Arg value
+Error: 2 - spliti(): REG_EMPTY, %s(74)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/spliti_variation_002.phpt b/ext/standard/tests/reg/spliti_variation_002.phpt
new file mode 100644
index 000000000..a1e51bdb6
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_variation_002.phpt
@@ -0,0 +1,270 @@
+--TEST--
+Test spliti() function : usage variations - unexpected type for arg 2
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing spliti() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = 'r|j|E';
+$limit = 5;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for string
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( spliti($pattern, $value, $limit) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing spliti() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+array(1) {
+ [0]=>
+ string(1) "0"
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(1) "1"
+}
+
+Arg value 12345
+array(1) {
+ [0]=>
+ string(5) "12345"
+}
+
+Arg value -2345
+array(1) {
+ [0]=>
+ string(5) "-2345"
+}
+
+Arg value 10.5
+array(1) {
+ [0]=>
+ string(4) "10.5"
+}
+
+Arg value -10.5
+array(1) {
+ [0]=>
+ string(5) "-10.5"
+}
+
+Arg value 101234567000
+array(1) {
+ [0]=>
+ string(12) "101234567000"
+}
+
+Arg value 1.07654321E-9
+array(2) {
+ [0]=>
+ string(10) "1.07654321"
+ [1]=>
+ string(2) "-9"
+}
+
+Arg value 0.5
+array(1) {
+ [0]=>
+ string(3) "0.5"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(1) "A"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ay"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(1) "1"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(1) "1"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(74)
+Error: 8 - Object of class stdClass to string conversion, %s(74)
+array(3) {
+ [0]=>
+ string(2) "Ob"
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(2) "ct"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(0) ""
+}
+Done
diff --git a/ext/standard/tests/reg/spliti_variation_003.phpt b/ext/standard/tests/reg/spliti_variation_003.phpt
new file mode 100644
index 000000000..e6c8f10b5
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_variation_003.phpt
@@ -0,0 +1,225 @@
+--TEST--
+Test spliti() function : usage variations - unexpected type for arg 3
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ if (error_reporting() != 0) {
+ // report non-silenced errors
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+ }
+}
+set_error_handler('test_error_handler');
+echo "*** Testing spliti() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$pattern = '[[:space:]]';
+$string = '1 2 3 4 5';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+ @$unset_var,
+);
+
+// loop through each element of the array for limit
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( spliti($pattern, $string, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing spliti() : usage variations ***
+
+Arg value 10.5
+array(5) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ string(1) "2"
+ [2]=>
+ string(1) "3"
+ [3]=>
+ string(1) "4"
+ [4]=>
+ string(1) "5"
+}
+
+Arg value -10.5
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value 1.07654321E-9
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value 0.5
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value Array
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value 1
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value string
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value string
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+Error: 4096 - Object of class stdClass could not be converted to string, %s(72)
+
+Arg value
+Error: 8 - Object of class stdClass could not be converted to int, %s(73)
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+
+Arg value
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/spliti_variation_004.phpt b/ext/standard/tests/reg/spliti_variation_004.phpt
new file mode 100644
index 000000000..e6c8e3c21
--- /dev/null
+++ b/ext/standard/tests/reg/spliti_variation_004.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test spliti() function : usage variations - out-of-range values for limit
+--FILE--
+<?php
+/* Prototype : proto array spliti(string pattern, string string [, int limit])
+ * Description: spliti string into array by regular expression
+ * Source code: ext/standard/reg.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+echo "*** Testing spliti() : usage variations ***\n";
+
+$pattern = '[[:space:]]';
+$string = '1 2 3 4 5';
+var_dump(spliti($pattern, $string, 0));
+var_dump(spliti($pattern, $string, -10));
+var_dump(spliti($pattern, $string, 10E20));
+
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing spliti() : usage variations ***
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+array(1) {
+ [0]=>
+ string(9) "1 2 3 4 5"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/sql_regcase_basic_001.phpt b/ext/standard/tests/reg/sql_regcase_basic_001.phpt
new file mode 100644
index 000000000..7657fa28c
--- /dev/null
+++ b/ext/standard/tests/reg/sql_regcase_basic_001.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test sql_regcase() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto string sql_regcase(string string)
+ * Description: Make regular expression for case insensitive match
+ * Source code: ext/standard/reg.c
+ * Alias to functions: msql_regcase
+ */
+
+echo "*** Testing sql_regcase() : basic functionality ***\n";
+
+
+// Initialise all required variables
+$string = 'string_Val-0';
+
+// Calling sql_regcase() with all possible arguments
+var_dump( sql_regcase($string) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sql_regcase() : basic functionality ***
+string(39) "[Ss][Tt][Rr][Ii][Nn][Gg]_[Vv][Aa][Ll]-0"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/sql_regcase_error_001.phpt b/ext/standard/tests/reg/sql_regcase_error_001.phpt
new file mode 100644
index 000000000..3ab9fd8db
--- /dev/null
+++ b/ext/standard/tests/reg/sql_regcase_error_001.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test sql_regcase() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto string sql_regcase(string string)
+ * Description: Make regular expression for case insensitive match
+ * Source code: ext/standard/reg.c
+ * Alias to functions: msql_regcase
+ */
+
+echo "*** Testing sql_regcase() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing sql_regcase() function with Zero arguments --\n";
+var_dump( sql_regcase() );
+
+//Test sql_regcase with one more than the expected number of arguments
+echo "\n-- Testing sql_regcase() function with more than expected no. of arguments --\n";
+$string = 'string_val';
+$extra_arg = 10;
+var_dump( sql_regcase($string, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sql_regcase() : error conditions ***
+
+-- Testing sql_regcase() function with Zero arguments --
+
+Warning: Wrong parameter count for sql_regcase() in %s on line 12
+NULL
+
+-- Testing sql_regcase() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for sql_regcase() in %s on line 18
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/reg/sql_regcase_variation_001.phpt b/ext/standard/tests/reg/sql_regcase_variation_001.phpt
new file mode 100644
index 000000000..ed0bef06d
--- /dev/null
+++ b/ext/standard/tests/reg/sql_regcase_variation_001.phpt
@@ -0,0 +1,167 @@
+--TEST--
+Test sql_regcase() function : usage variations - unexpected arg type
+--FILE--
+<?php
+/* Prototype : proto string sql_regcase(string string)
+ * Description: Make regular expression for case insensitive match
+ * Source code: ext/standard/reg.c
+ * Alias to functions: msql_regcase
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing sql_regcase() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for string
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( sql_regcase($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing sql_regcase() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(62)
+Error: 8 - Undefined variable: unset_var, %s(65)
+
+Arg value 0
+string(1) "0"
+
+Arg value 1
+string(1) "1"
+
+Arg value 12345
+string(5) "12345"
+
+Arg value -2345
+string(5) "-2345"
+
+Arg value 10.5
+string(4) "10.5"
+
+Arg value -10.5
+string(5) "-10.5"
+
+Arg value 101234567000
+string(12) "101234567000"
+
+Arg value 1.07654321E-9
+string(16) "1.07654321[Ee]-9"
+
+Arg value 0.5
+string(3) "0.5"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(72)
+string(20) "[Aa][Rr][Rr][Aa][Yy]"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(72)
+string(20) "[Aa][Rr][Rr][Aa][Yy]"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(72)
+string(20) "[Aa][Rr][Rr][Aa][Yy]"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(72)
+string(20) "[Aa][Rr][Rr][Aa][Yy]"
+
+Arg value Array
+Error: 8 - Array to string conversion, %s(72)
+string(20) "[Aa][Rr][Rr][Aa][Yy]"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(71)
+
+Arg value
+Error: 4096 - Object of class stdClass could not be converted to string, %s(72)
+Error: 8 - Object of class stdClass to string conversion, %s(72)
+string(24) "[Oo][Bb][Jj][Ee][Cc][Tt]"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt
index d67f6fbf7..e7b23db70 100755
--- a/ext/standard/tests/serialize/005.phpt
+++ b/ext/standard/tests/serialize/005.phpt
@@ -179,7 +179,7 @@ do_autoload(autoload_not_available)
do_autoload(autoload_not_available)
Warning: unserialize(): Function unserializer() hasn't defined the class it was called for in %s005.php on line %d
-object(__PHP_Incomplete_Class)#1 (1) {
+object(__PHP_Incomplete_Class)#%d (1) {
["__PHP_Incomplete_Class_Name"]=>
string(22) "autoload_not_available"
}
diff --git a/ext/standard/tests/serialize/bug43614.phpt b/ext/standard/tests/serialize/bug43614.phpt
new file mode 100644
index 000000000..127dfba58
--- /dev/null
+++ b/ext/standard/tests/serialize/bug43614.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #43614 (incorrect processing of numerical string keys of array in arbitrary serialized data)
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+var_dump($a = unserialize('a:2:{s:2:"10";i:1;s:2:"01";i:2;}'));
+var_dump($a['10']);
+var_dump($a['01']);
+
+?>
+--EXPECT--
+array(2) {
+ [10]=>
+ int(1)
+ ["01"]=>
+ int(2)
+}
+int(1)
+int(2)
diff --git a/ext/standard/tests/serialize/serialization_arrays_001.phpt b/ext/standard/tests/serialize/serialization_arrays_001.phpt
new file mode 100644
index 000000000..e39954277
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_arrays_001.phpt
@@ -0,0 +1,108 @@
+--TEST--
+Test serialize() & unserialize() functions: arrays (circular references)
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+echo "\n--- Testing Circular reference of an array ---\n";
+
+echo "-- Normal array --\n";
+$arr_circ = array(0, 1, -2, 3.333333, "a", array(), &$arr_circ);
+$serialize_data = serialize($arr_circ);
+$arr_circ[6] = null;
+var_dump( $serialize_data );
+$arr_circ = unserialize($serialize_data);
+var_dump( $arr_circ );
+$arr_circ[6] = null;
+
+echo "\n-- Associative array --\n";
+$arr_asso = array("a" => "test");
+$arr_asso[ "b" ] = &$arr_asso[ "a" ];
+var_dump($arr_asso);
+$serialize_data = serialize($arr_asso);
+var_dump($serialize_data);
+$arr_asso = unserialize($serialize_data);
+var_dump($arr_asso);
+
+echo "\nDone";
+?>
+--EXPECTF--
+
+--- Testing Circular reference of an array ---
+-- Normal array --
+string(238) "a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.333333000000000101437080957111902534961700439453125;i:4;s:1:"a";i:5;a:0:{}i:6;a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.333333000000000101437080957111902534961700439453125;i:4;s:1:"a";i:5;a:0:{}i:6;R:8;}}"
+array(7) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(-2)
+ [3]=>
+ float(3.333333)
+ [4]=>
+ string(1) "a"
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ &array(7) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(-2)
+ [3]=>
+ float(3.333333)
+ [4]=>
+ string(1) "a"
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ &array(7) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(-2)
+ [3]=>
+ float(3.333333)
+ [4]=>
+ string(1) "a"
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ *RECURSION*
+ }
+ }
+}
+
+-- Associative array --
+array(2) {
+ ["a"]=>
+ &string(4) "test"
+ ["b"]=>
+ &string(4) "test"
+}
+string(37) "a:2:{s:1:"a";s:4:"test";s:1:"b";R:2;}"
+array(2) {
+ ["a"]=>
+ &string(4) "test"
+ ["b"]=>
+ &string(4) "test"
+}
+
+Done
diff --git a/ext/standard/tests/serialize/serialization_arrays_002.phpt b/ext/standard/tests/serialize/serialization_arrays_002.phpt
new file mode 100644
index 000000000..f8cef7818
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_arrays_002.phpt
@@ -0,0 +1,544 @@
+--TEST--
+serialization: arrays with references amonst elements
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+function check(&$a) {
+ var_dump($a);
+ $ser = serialize($a);
+ var_dump($ser);
+
+ $b = unserialize($ser);
+ var_dump($b);
+ $b[0] = "b0.changed";
+ var_dump($b);
+ $b[1] = "b1.changed";
+ var_dump($b);
+ $b[2] = "b2.changed";
+ var_dump($b);
+}
+
+echo "\n\n--- No references:\n";
+$a = array();
+$a[0] = 1;
+$a[1] = 1;
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 0 refs 1:\n";
+$a = array();
+$a[0] = &$a[1];
+$a[1] = 1;
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 0 refs 2:\n";
+$a = array();
+$a[0] = &$a[2];
+$a[1] = 1;
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 1 refs 0:\n";
+$a = array();
+$a[0] = 1;
+$a[1] = &$a[0];
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 1 refs 2:\n";
+$a = array();
+$a[0] = 1;
+$a[1] = &$a[2];
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 2 refs 0:\n";
+$a = array();
+$a[0] = 1;
+$a[1] = 1;
+$a[2] = &$a[0];
+check($a);
+
+echo "\n\n--- 2 refs 1:\n";
+$a = array();
+$a[0] = 1;
+$a[1] = 1;
+$a[2] = &$a[1];
+check($a);
+
+echo "\n\n--- 0,1 ref 2:\n";
+$a = array();
+$a[0] = &$a[2];
+$a[1] = &$a[2];
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 0,2 ref 1:\n";
+$a = array();
+$a[0] = &$a[1];
+$a[1] = 1;
+$a[2] = &$a[1];
+check($a);
+
+echo "\n\n--- 1,2 ref 0:\n";
+$a = array();
+$a[0] = 1;
+$a[1] = &$a[0];
+$a[2] = &$a[0];
+check($a);
+
+echo "Done";
+?>
+--EXPECTF--
+
+
+--- No references:
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;i:1;i:2;i:1;}"
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 0 refs 1:
+array(3) {
+ [1]=>
+ &int(1)
+ [0]=>
+ &int(1)
+ [2]=>
+ int(1)
+}
+string(30) "a:3:{i:1;i:1;i:0;R:2;i:2;i:1;}"
+array(3) {
+ [1]=>
+ &int(1)
+ [0]=>
+ &int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [1]=>
+ &string(10) "b0.changed"
+ [0]=>
+ &string(10) "b0.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [1]=>
+ &string(10) "b1.changed"
+ [0]=>
+ &string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [1]=>
+ &string(10) "b1.changed"
+ [0]=>
+ &string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 0 refs 2:
+array(3) {
+ [2]=>
+ &int(1)
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+}
+string(30) "a:3:{i:2;i:1;i:0;R:2;i:1;i:1;}"
+array(3) {
+ [2]=>
+ &int(1)
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+}
+array(3) {
+ [2]=>
+ &string(10) "b0.changed"
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ int(1)
+}
+array(3) {
+ [2]=>
+ &string(10) "b0.changed"
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+}
+array(3) {
+ [2]=>
+ &string(10) "b2.changed"
+ [0]=>
+ &string(10) "b2.changed"
+ [1]=>
+ string(10) "b1.changed"
+}
+
+
+--- 1 refs 0:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;R:2;i:2;i:1;}"
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b0.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 1 refs 2:
+array(3) {
+ [0]=>
+ int(1)
+ [2]=>
+ &int(1)
+ [1]=>
+ &int(1)
+}
+string(30) "a:3:{i:0;i:1;i:2;i:1;i:1;R:3;}"
+array(3) {
+ [0]=>
+ int(1)
+ [2]=>
+ &int(1)
+ [1]=>
+ &int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [2]=>
+ &int(1)
+ [1]=>
+ &int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [2]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [2]=>
+ &string(10) "b2.changed"
+ [1]=>
+ &string(10) "b2.changed"
+}
+
+
+--- 2 refs 0:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;i:1;i:2;R:2;}"
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ int(1)
+ [2]=>
+ &string(10) "b0.changed"
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ &string(10) "b0.changed"
+}
+array(3) {
+ [0]=>
+ &string(10) "b2.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ &string(10) "b2.changed"
+}
+
+
+--- 2 refs 1:
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;i:1;i:2;R:3;}"
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ &string(10) "b1.changed"
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ &string(10) "b2.changed"
+ [2]=>
+ &string(10) "b2.changed"
+}
+
+
+--- 0,1 ref 2:
+array(3) {
+ [2]=>
+ &int(1)
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+}
+string(30) "a:3:{i:2;i:1;i:0;R:2;i:1;R:2;}"
+array(3) {
+ [2]=>
+ &int(1)
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+}
+array(3) {
+ [2]=>
+ &string(10) "b0.changed"
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b0.changed"
+}
+array(3) {
+ [2]=>
+ &string(10) "b1.changed"
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+}
+array(3) {
+ [2]=>
+ &string(10) "b2.changed"
+ [0]=>
+ &string(10) "b2.changed"
+ [1]=>
+ &string(10) "b2.changed"
+}
+
+
+--- 0,2 ref 1:
+array(3) {
+ [1]=>
+ &int(1)
+ [0]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+string(30) "a:3:{i:1;i:1;i:0;R:2;i:2;R:2;}"
+array(3) {
+ [1]=>
+ &int(1)
+ [0]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+array(3) {
+ [1]=>
+ &string(10) "b0.changed"
+ [0]=>
+ &string(10) "b0.changed"
+ [2]=>
+ &string(10) "b0.changed"
+}
+array(3) {
+ [1]=>
+ &string(10) "b1.changed"
+ [0]=>
+ &string(10) "b1.changed"
+ [2]=>
+ &string(10) "b1.changed"
+}
+array(3) {
+ [1]=>
+ &string(10) "b2.changed"
+ [0]=>
+ &string(10) "b2.changed"
+ [2]=>
+ &string(10) "b2.changed"
+}
+
+
+--- 1,2 ref 0:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;R:2;i:2;R:2;}"
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b0.changed"
+ [2]=>
+ &string(10) "b0.changed"
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ &string(10) "b1.changed"
+}
+array(3) {
+ [0]=>
+ &string(10) "b2.changed"
+ [1]=>
+ &string(10) "b2.changed"
+ [2]=>
+ &string(10) "b2.changed"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_arrays_003.phpt b/ext/standard/tests/serialize/serialization_arrays_003.phpt
new file mode 100644
index 000000000..8d664fccf
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_arrays_003.phpt
@@ -0,0 +1,294 @@
+--TEST--
+serialization: arrays with references to an external variable
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+function check(&$a) {
+ var_dump($a);
+ $ser = serialize($a);
+ var_dump($ser);
+
+ $b = unserialize($ser);
+ var_dump($b);
+ $b[0] = "b0.changed";
+ var_dump($b);
+ $b[1] = "b1.changed";
+ var_dump($b);
+ $b[2] = "b2.changed";
+ var_dump($b);
+}
+
+echo "\n\n--- 0 refs external:\n";
+$ext = 1;
+$a = array();
+$a[0] = &$ext;
+$a[1] = 1;
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 1 refs external:\n";
+$ext = 1;
+$a = array();
+$a[0] = 1;
+$a[1] = &$ext;
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 2 refs external:\n";
+$ext = 1;
+$a = array();
+$a[0] = 1;
+$a[1] = 1;
+$a[2] = &$ext;
+check($a);
+
+echo "\n\n--- 1,2 ref external:\n";
+$ext = 1;
+$a = array();
+$a[0] = &$ext;
+$a[1] = &$ext;
+$a[2] = 1;
+check($a);
+
+echo "\n\n--- 1,2,3 ref external:\n";
+$ext = 1;
+$a = array();
+$a[0] = &$ext;
+$a[1] = &$ext;
+$a[2] = &$ext;
+check($a);
+
+echo "Done";
+?>
+--EXPECTF--
+
+
+--- 0 refs external:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;i:1;i:2;i:1;}"
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 1 refs external:
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;i:1;i:2;i:1;}"
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 2 refs external:
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;i:1;i:2;i:1;}"
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 1,2 ref external:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;R:2;i:2;i:1;}"
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b0.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 1,2,3 ref external:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+string(30) "a:3:{i:0;i:1;i:1;R:2;i:2;R:2;}"
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b0.changed"
+ [2]=>
+ &string(10) "b0.changed"
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ &string(10) "b1.changed"
+}
+array(3) {
+ [0]=>
+ &string(10) "b2.changed"
+ [1]=>
+ &string(10) "b2.changed"
+ [2]=>
+ &string(10) "b2.changed"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_arrays_004.phpt b/ext/standard/tests/serialize/serialization_arrays_004.phpt
new file mode 100644
index 000000000..b6dfc733a
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_arrays_004.phpt
@@ -0,0 +1,474 @@
+--TEST--
+serialization: arrays with references to the containing array
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+function check(&$a) {
+ var_dump($a);
+ $ser = serialize($a);
+ var_dump($ser);
+
+ $b = unserialize($ser);
+ var_dump($b);
+ $b[0] = "b0.changed";
+ var_dump($b);
+ $b[1] = "b1.changed";
+ var_dump($b);
+ $b[2] = "b2.changed";
+ var_dump($b);
+}
+
+echo "\n\n--- 1 refs container:\n";
+$a = array();
+$a[0] = &$a;
+$a[1] = 1;
+$a[2] = 1;
+check($a);
+$a[0] = null;
+
+echo "\n\n--- 1,2 ref container:\n";
+$a = array();
+$a[0] = &$a;
+$a[1] = &$a;
+$a[2] = 1;
+check($a);
+$a[0] = null;
+$a[1] = null;
+
+echo "\n\n--- 1,2,3 ref container:\n";
+$a = array();
+$a[0] = &$a;
+$a[1] = &$a;
+$a[2] = &$a;
+check($a);
+$a[0] = null;
+$a[1] = null;
+$a[2] = null;
+
+
+echo "Done";
+?>
+--EXPECTF--
+
+
+--- 1 refs container:
+array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+string(56) "a:3:{i:0;a:3:{i:0;R:2;i:1;i:1;i:2;i:1;}i:1;i:1;i:2;i:1;}"
+array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ %string(10) "b0.changed"
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ %string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ %string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 1,2 ref container:
+array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ int(1)
+}
+string(56) "a:3:{i:0;a:3:{i:0;R:2;i:1;R:2;i:2;i:1;}i:1;R:2;i:2;i:1;}"
+array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b0.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- 1,2,3 ref container:
+array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [2]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [2]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ }
+ [2]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [2]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ }
+}
+string(56) "a:3:{i:0;a:3:{i:0;R:2;i:1;R:2;i:2;R:2;}i:1;R:2;i:2;R:2;}"
+array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [2]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [2]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ }
+ [2]=>
+ &array(3) {
+ [0]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [1]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ [2]=>
+ &array(3) {
+ [0]=>
+ *RECURSION*
+ [1]=>
+ *RECURSION*
+ [2]=>
+ *RECURSION*
+ }
+ }
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b0.changed"
+ [2]=>
+ &string(10) "b0.changed"
+}
+array(3) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ &string(10) "b1.changed"
+}
+array(3) {
+ [0]=>
+ &string(10) "b2.changed"
+ [1]=>
+ &string(10) "b2.changed"
+ [2]=>
+ &string(10) "b2.changed"
+}
+Done
diff --git a/ext/standard/tests/serialize/serialization_arrays_005.phpt b/ext/standard/tests/serialize/serialization_arrays_005.phpt
new file mode 100644
index 000000000..c291ed764
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_arrays_005.phpt
@@ -0,0 +1,571 @@
+--TEST--
+serialization: arrays with references, nested
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+function check(&$a) {
+ var_dump($a);
+ $ser = serialize($a);
+ var_dump($ser);
+
+ $b = unserialize($ser);
+
+ // Change each element and dump result.
+ foreach($b as $k=>$v) {
+ if (is_array($v)){
+ foreach($b[$k] as $sk=>$sv) {
+ $b[$k][$sk] = "b$k.$sk.changed";
+ var_dump($b);
+ }
+ } else {
+ $b[$k] = "b$k.changed";
+ var_dump($b);
+ }
+ }
+}
+
+echo "\n\n--- Nested array references 1 element in containing array:\n";
+$a = array();
+$c = array(1,1,&$a);
+$a[0] = &$c[0];
+$a[1] = 1;
+check($c);
+
+echo "\n\n--- Nested array references 1 element in containing array (slightly different):\n";
+$a = array();
+$c = array(1,&$a,1);
+$a[0] = 1;
+$a[1] = &$c[0];
+check($c);
+
+echo "\n\n--- Nested array references 2 elements in containing array:\n";
+$a = array();
+$c = array(1,1,&$a);
+$a[0] = &$c[0];
+$a[1] = &$c[1];
+check($c);
+
+echo "\n\n--- Containing array references 1 element in nested array:\n";
+$a = array();
+$a[0] = 1;
+$a[1] = 1;
+$c = array(1,&$a[0],&$a);
+check($c);
+
+echo "\n\n--- Containing array references 2 elements in nested array:\n";
+$a = array();
+$a[0] = 1;
+$a[1] = 1;
+$c = array(&$a[0],&$a[1],&$a);
+check($c);
+
+echo "\n\n--- Nested array references container:\n";
+$a = array();
+$c = array(1,1,&$a);
+$a[0] = 1;
+$a[1] = &$c;
+check($c);
+$a[1] = null;
+
+?>
+--EXPECTF--
+
+
+--- Nested array references 1 element in containing array:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+ }
+}
+string(48) "a:3:{i:0;i:1;i:1;i:1;i:2;a:2:{i:0;R:2;i:1;i:1;}}"
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ int(1)
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ int(1)
+ }
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ int(1)
+ }
+}
+array(3) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ int(1)
+ }
+}
+array(3) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ string(12) "b2.1.changed"
+ }
+}
+
+
+--- Nested array references 1 element in containing array (slightly different):
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ &int(1)
+ }
+ [2]=>
+ int(1)
+}
+string(48) "a:3:{i:0;i:1;i:1;a:2:{i:0;i:1;i:1;R:2;}i:2;i:1;}"
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ &string(10) "b0.changed"
+ }
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ array(2) {
+ [0]=>
+ string(12) "b1.0.changed"
+ [1]=>
+ &string(10) "b0.changed"
+ }
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(12) "b1.1.changed"
+ [1]=>
+ array(2) {
+ [0]=>
+ string(12) "b1.0.changed"
+ [1]=>
+ &string(12) "b1.1.changed"
+ }
+ [2]=>
+ int(1)
+}
+array(3) {
+ [0]=>
+ &string(12) "b1.1.changed"
+ [1]=>
+ array(2) {
+ [0]=>
+ string(12) "b1.0.changed"
+ [1]=>
+ &string(12) "b1.1.changed"
+ }
+ [2]=>
+ string(10) "b2.changed"
+}
+
+
+--- Nested array references 2 elements in containing array:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ }
+}
+string(48) "a:3:{i:0;i:1;i:1;i:1;i:2;a:2:{i:0;R:2;i:1;R:3;}}"
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &int(1)
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &int(1)
+ }
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ }
+}
+array(3) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ }
+}
+array(3) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ &string(12) "b2.1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ &string(12) "b2.1.changed"
+ }
+}
+
+
+--- Containing array references 1 element in nested array:
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+ }
+}
+string(48) "a:3:{i:0;i:1;i:1;i:1;i:2;a:2:{i:0;R:3;i:1;i:1;}}"
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ &int(1)
+ [2]=>
+ array(2) {
+ [0]=>
+ &int(1)
+ [1]=>
+ int(1)
+ }
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(10) "b1.changed"
+ [1]=>
+ int(1)
+ }
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ &string(12) "b2.0.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ int(1)
+ }
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ &string(12) "b2.0.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ string(12) "b2.1.changed"
+ }
+}
+
+
+--- Containing array references 2 elements in nested array:
+array(3) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+ }
+}
+string(48) "a:3:{i:0;i:1;i:1;i:1;i:2;a:2:{i:0;R:2;i:1;R:3;}}"
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &int(1)
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &int(1)
+ }
+}
+array(3) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(10) "b0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ }
+}
+array(3) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ &string(10) "b1.changed"
+ }
+}
+array(3) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ &string(12) "b2.1.changed"
+ [2]=>
+ array(2) {
+ [0]=>
+ &string(12) "b2.0.changed"
+ [1]=>
+ &string(12) "b2.1.changed"
+ }
+}
+
+
+--- Nested array references container:
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ *RECURSION*
+ }
+ }
+ }
+ }
+}
+string(74) "a:3:{i:0;i:1;i:1;i:1;i:2;a:2:{i:0;i:1;i:1;a:3:{i:0;i:1;i:1;i:1;i:2;R:4;}}}"
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ *RECURSION*
+ }
+ }
+ }
+ }
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ *RECURSION*
+ }
+ }
+ }
+ }
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ &array(2) {
+ [0]=>
+ string(12) "b2.0.changed"
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ &array(2) {
+ [0]=>
+ string(12) "b2.0.changed"
+ [1]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ *RECURSION*
+ }
+ }
+ }
+ }
+}
+array(3) {
+ [0]=>
+ string(10) "b0.changed"
+ [1]=>
+ string(10) "b1.changed"
+ [2]=>
+ &array(2) {
+ [0]=>
+ string(12) "b2.0.changed"
+ [1]=>
+ string(12) "b2.1.changed"
+ }
+}
diff --git a/ext/standard/tests/serialize/serialization_error_001.phpt b/ext/standard/tests/serialize/serialization_error_001.phpt
new file mode 100644
index 000000000..3f530580d
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_error_001.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test serialize() & unserialize() functions: error conditions - wrong number of args.
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+echo "*** Testing serialize()/unserialize() : error conditions ***\n";
+
+// Zero arguments
+var_dump( serialize() );
+var_dump( unserialize() );
+
+//Test serialize with one more than the expected number of arguments
+var_dump( serialize(1,2) );
+var_dump( unserialize(1,2) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing serialize()/unserialize() : error conditions ***
+
+Warning: Wrong parameter count for serialize() in %s on line 16
+NULL
+
+Warning: unserialize() expects exactly 1 parameter, 0 given in %s on line 17
+bool(false)
+
+Warning: Wrong parameter count for serialize() in %s on line 20
+NULL
+
+Warning: unserialize() expects exactly 1 parameter, 2 given in %s on line 21
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
new file mode 100644
index 000000000..276913524
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
Binary files differ
diff --git a/ext/standard/tests/serialize/serialization_objects_001.phpt b/ext/standard/tests/serialize/serialization_objects_001.phpt
new file mode 100644
index 000000000..5eba5304b
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_001.phpt
Binary files differ
diff --git a/ext/standard/tests/serialize/serialization_objects_002.phpt b/ext/standard/tests/serialize/serialization_objects_002.phpt
new file mode 100644
index 000000000..aeca6d81a
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_002.phpt
Binary files differ
diff --git a/ext/standard/tests/serialize/serialization_objects_003.phpt b/ext/standard/tests/serialize/serialization_objects_003.phpt
new file mode 100644
index 000000000..c20590b79
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_003.phpt
@@ -0,0 +1,67 @@
+--TEST--
+Test serialize() & unserialize() functions: objects (abstract classes)
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+echo "\n--- Testing Abstract Class ---\n";
+// abstract class
+abstract class Name
+{
+ public function Name() {
+ $this->a = 10;
+ $this->b = 12.222;
+ $this->c = "string";
+ }
+ abstract protected function getClassName();
+ public function printClassName () {
+ return $this->getClassName();
+ }
+}
+// implement abstract class
+class extendName extends Name
+{
+ var $a, $b, $c;
+
+ protected function getClassName() {
+ return "extendName";
+ }
+}
+
+$obj_extendName = new extendName();
+$serialize_data = serialize($obj_extendName);
+var_dump( $serialize_data );
+$unserialize_data = unserialize($serialize_data);
+var_dump( $unserialize_data );
+
+$serialize_data = serialize($obj_extendName->printClassName());
+var_dump( $serialize_data );
+$unserialize_data = unserialize($serialize_data);
+var_dump( $unserialize_data );
+
+echo "\nDone";
+?>
+--EXPECTF--
+--- Testing Abstract Class ---
+string(119) "O:10:"extendName":3:{s:1:"a";i:10;s:1:"b";d:12.2219999999999995310417943983338773250579833984375;s:1:"c";s:6:"string";}"
+object(extendName)#%d (3) {
+ ["a"]=>
+ int(10)
+ ["b"]=>
+ float(12.222)
+ ["c"]=>
+ string(6) "string"
+}
+string(18) "s:10:"extendName";"
+string(10) "extendName"
+
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_004.phpt b/ext/standard/tests/serialize/serialization_objects_004.phpt
new file mode 100644
index 000000000..6b826a398
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_004.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Test serialize() & unserialize() functions: objects - ensure that COW references of objects are not serialized separately (unlike other types).
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+$x = new stdClass;
+$ref = &$x;
+var_dump(serialize(array($x, $x)));
+
+$x = 1;
+$ref = &$x;
+var_dump(serialize(array($x, $x)));
+
+$x = "a";
+$ref = &$x;
+var_dump(serialize(array($x, $x)));
+
+$x = true;
+$ref = &$x;
+var_dump(serialize(array($x, $x)));
+
+$x = null;
+$ref = &$x;
+var_dump(serialize(array($x, $x)));
+
+$x = array();
+$ref = &$x;
+var_dump(serialize(array($x, $x)));
+
+echo "Done";
+?>
+--EXPECTF--
+string(37) "a:2:{i:0;O:8:"stdClass":0:{}i:1;r:2;}"
+string(22) "a:2:{i:0;i:1;i:1;i:1;}"
+string(30) "a:2:{i:0;s:1:"a";i:1;s:1:"a";}"
+string(22) "a:2:{i:0;b:1;i:1;b:1;}"
+string(18) "a:2:{i:0;N;i:1;N;}"
+string(26) "a:2:{i:0;a:0:{}i:1;a:0:{}}"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_005.phpt b/ext/standard/tests/serialize/serialization_objects_005.phpt
new file mode 100644
index 000000000..35b159387
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_005.phpt
@@ -0,0 +1,120 @@
+--TEST--
+Check behaviour of incomplete class
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+$serialized = 'O:1:"C":1:{s:1:"p";i:1;}';
+
+$incomplete = unserialize($serialized);
+eval('Class C {}');
+$complete = unserialize($serialized);
+
+
+echo "\n\n---> Various types of access on complete class:\n" ;
+var_dump($complete);
+var_dump(is_object($complete));
+var_dump($complete->p);
+
+$ref1 = "ref1.original";
+$complete->p = &$ref1;
+var_dump($complete->p);
+$ref1 = "ref1.changed";
+var_dump($complete->p);
+$complete->p = "p.changed";
+var_dump($ref1);
+
+var_dump(isset($complete->x));
+$complete->x = "x.new";
+var_dump(isset($complete->x));
+unset($complete->x);
+var_dump($complete->x);
+
+
+echo "\n\n---> Same types of access on incomplete class:\n" ;
+var_dump($incomplete);
+var_dump(is_object($incomplete));
+var_dump($incomplete->p);
+
+$ref2 = "ref1.original";
+$incomplete->p = &$ref2;
+var_dump($incomplete->p);
+$ref2 = "ref1.changed";
+var_dump($incomplete->p);
+$incomplete->p = "p.changed";
+var_dump($ref1);
+
+var_dump(isset($incomplete->x));
+$incomplete->x = "x.new";
+var_dump(isset($incomplete->x));
+unset($incomplete->x);
+var_dump($incomplete->x);
+
+$incomplete->f();
+
+echo "Done";
+?>
+--EXPECTF--
+---> Various types of access on complete class:
+object(C)#%d (1) {
+ ["p"]=>
+ int(1)
+}
+bool(true)
+int(1)
+string(13) "ref1.original"
+string(12) "ref1.changed"
+string(9) "p.changed"
+bool(false)
+bool(true)
+
+Notice: Undefined property: C::$x in %s on line 37
+NULL
+
+
+---> Same types of access on incomplete class:
+object(__PHP_Incomplete_Class)#%d (2) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(1) "C"
+ ["p"]=>
+ int(1)
+}
+bool(false)
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 43
+NULL
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 46
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 47
+NULL
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 49
+NULL
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 50
+string(9) "p.changed"
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 53
+bool(false)
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 54
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 55
+bool(false)
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 56
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 57
+NULL
+
+Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 59 \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_006.phpt b/ext/standard/tests/serialize/serialization_objects_006.phpt
new file mode 100644
index 000000000..e223f4ee1
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_006.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Behaviour of incomplete class is preserved even when it was not created by unserialize().
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+$a = new __PHP_Incomplete_Class;
+var_dump($a);
+var_dump($a->p);
+
+echo "Done";
+?>
+--EXPECTF--
+object(__PHP_Incomplete_Class)#%d (0) {
+}
+
+Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line 15
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_007.phpt b/ext/standard/tests/serialize/serialization_objects_007.phpt
new file mode 100644
index 000000000..9cba9d13b
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_007.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Ensure __autoload is called twice if unserialize_callback_func is defined.
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+function __autoload($name) {
+ echo "in __autoload($name)\n";
+}
+
+ini_set('unserialize_callback_func','check');
+
+function check($name) {
+ echo "in check($name)\n";
+}
+
+$o = unserialize('O:3:"FOO":0:{}');
+
+var_dump($o);
+
+echo "Done";
+?>
+--EXPECTF--
+in __autoload(FOO)
+in check(FOO)
+in __autoload(FOO)
+
+Warning: unserialize(): Function check() hasn't defined the class it was called for in %s on line 23
+object(__PHP_Incomplete_Class)#%d (1) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(3) "FOO"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_008.phpt b/ext/standard/tests/serialize/serialization_objects_008.phpt
new file mode 100644
index 000000000..b963872f2
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_008.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bad unserialize_callback_func
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+ini_set('unserialize_callback_func','Nonexistent');
+$o = unserialize('O:3:"FOO":0:{}');
+var_dump($o);
+echo "Done";
+?>
+--EXPECTF--
+
+Warning: unserialize(): defined (Nonexistent) but not found in %s on line 14
+object(__PHP_Incomplete_Class)#%d (1) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(3) "FOO"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_009.phpt b/ext/standard/tests/serialize/serialization_objects_009.phpt
new file mode 100644
index 000000000..2e8b2dc80
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_009.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Custom unserialization of classes with no custom unserializer.
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+$ser = 'C:1:"C":6:{dasdas}';
+$a = unserialize($ser);
+eval('class C {}');
+$b = unserialize($ser);
+
+var_dump($a, $b);
+
+echo "Done";
+?>
+--EXPECTF--
+
+Warning: Class __PHP_Incomplete_Class has no unserializer in %s on line 14
+
+Notice: unserialize(): Error at offset 6 of 18 bytes in %s on line 14
+
+Warning: Class C has no unserializer in %s on line 16
+
+Notice: unserialize(): Error at offset 6 of 18 bytes in %s on line 16
+bool(false)
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_010.phpt b/ext/standard/tests/serialize/serialization_objects_010.phpt
new file mode 100644
index 000000000..0fbf0723d
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_010.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Serialize() must return a string or NULL
+--SKIPIF--
+<?php if (!interface_exists('Serializable')) die('skip Interface Serialzable not defined'); ?>
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+Class C implements Serializable {
+ public function serialize() {
+ return $this;
+ }
+
+ public function unserialize($blah) {
+ }
+}
+
+try {
+ var_dump(serialize(new C));
+} catch (Exception $e) {
+ echo $e->getMessage(). "\n";
+}
+
+echo "Done";
+?>
+--EXPECTF--
+C::serialize() must return a string or NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_011.phpt b/ext/standard/tests/serialize/serialization_objects_011.phpt
new file mode 100644
index 000000000..870793780
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_011.phpt
@@ -0,0 +1,196 @@
+--TEST--
+Object serialization / unserialization with inherited and hidden properties.
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+Class A {
+ private $APriv = "A.APriv";
+ protected $AProt = "A.AProt";
+ public $APub = "A.APub";
+
+ function audit() {
+ return isset($this->APriv, $this->AProt, $this->APub);
+ }
+}
+
+Class B extends A {
+ private $BPriv = "B.BPriv";
+ protected $BProt = "B.BProt";
+ public $BPub = "B.BPub";
+
+ function audit() {
+ return parent::audit() && isset($this->AProt, $this->APub,
+ $this->BPriv, $this->BProt, $this->BPub);
+ }
+}
+
+Class C extends B {
+ private $APriv = "C.APriv";
+ protected $AProt = "C.AProt";
+ public $APub = "C.APub";
+
+ private $CPriv = "C.CPriv";
+ protected $CProt = "C.BProt";
+ public $CPub = "C.CPub";
+
+ function audit() {
+ return parent::audit() && isset($this->APriv, $this->AProt, $this->APub,
+ $this->BProt, $this->BPub,
+ $this->CPriv, $this->CProt, $this->CPub);
+ }
+}
+
+function prettyPrint($obj) {
+ echo "\n\nBefore serialization:\n";
+ var_dump($obj);
+
+ echo "Serialized form:\n";
+ $ser = serialize($obj);
+ $serPrintable = str_replace("\0", '\0', $ser);
+ var_dump($serPrintable);
+
+ echo "Unserialized:\n";
+ $uobj = unserialize($ser);
+ var_dump($uobj);
+
+ echo "Sanity check: ";
+ var_dump($uobj->audit());
+}
+
+echo "-- Test instance of A --\n";
+prettyPrint(new A);
+echo "\n\n-- Test instance of B --\n";
+prettyPrint(new B);
+echo "\n\n-- Test instance of C --\n";
+prettyPrint(new C);
+
+echo "Done";
+?>
+--EXPECTF--
+-- Test instance of A --
+
+
+Before serialization:
+object(A)#%d (3) {
+ ["APriv:private"]=>
+ string(7) "A.APriv"
+ ["AProt:protected"]=>
+ string(7) "A.AProt"
+ ["APub"]=>
+ string(6) "A.APub"
+}
+Serialized form:
+string(98) "O:1:"A":3:{s:8:"\0A\0APriv";s:7:"A.APriv";s:8:"\0*\0AProt";s:7:"A.AProt";s:4:"APub";s:6:"A.APub";}"
+Unserialized:
+object(A)#%d (3) {
+ ["APriv:private"]=>
+ string(7) "A.APriv"
+ ["AProt:protected"]=>
+ string(7) "A.AProt"
+ ["APub"]=>
+ string(6) "A.APub"
+}
+Sanity check: bool(true)
+
+
+-- Test instance of B --
+
+
+Before serialization:
+object(B)#%d (6) {
+ ["BPriv:private"]=>
+ string(7) "B.BPriv"
+ ["BProt:protected"]=>
+ string(7) "B.BProt"
+ ["BPub"]=>
+ string(6) "B.BPub"
+ ["APriv:private"]=>
+ string(7) "A.APriv"
+ ["AProt:protected"]=>
+ string(7) "A.AProt"
+ ["APub"]=>
+ string(6) "A.APub"
+}
+Serialized form:
+string(184) "O:1:"B":6:{s:8:"\0B\0BPriv";s:7:"B.BPriv";s:8:"\0*\0BProt";s:7:"B.BProt";s:4:"BPub";s:6:"B.BPub";s:8:"\0A\0APriv";s:7:"A.APriv";s:8:"\0*\0AProt";s:7:"A.AProt";s:4:"APub";s:6:"A.APub";}"
+Unserialized:
+object(B)#%d (6) {
+ ["BPriv:private"]=>
+ string(7) "B.BPriv"
+ ["BProt:protected"]=>
+ string(7) "B.BProt"
+ ["BPub"]=>
+ string(6) "B.BPub"
+ ["APriv:private"]=>
+ string(7) "A.APriv"
+ ["AProt:protected"]=>
+ string(7) "A.AProt"
+ ["APub"]=>
+ string(6) "A.APub"
+}
+Sanity check: bool(true)
+
+
+-- Test instance of C --
+
+
+Before serialization:
+object(C)#%d (10) {
+ ["APriv:private"]=>
+ string(7) "C.APriv"
+ ["AProt:protected"]=>
+ string(7) "C.AProt"
+ ["APub"]=>
+ string(6) "C.APub"
+ ["CPriv:private"]=>
+ string(7) "C.CPriv"
+ ["CProt:protected"]=>
+ string(7) "C.BProt"
+ ["CPub"]=>
+ string(6) "C.CPub"
+ ["BPriv:private"]=>
+ string(7) "B.BPriv"
+ ["BProt:protected"]=>
+ string(7) "B.BProt"
+ ["BPub"]=>
+ string(6) "B.BPub"
+ ["APriv:private"]=>
+ string(7) "A.APriv"
+}
+Serialized form:
+string(302) "O:1:"C":10:{s:8:"\0C\0APriv";s:7:"C.APriv";s:8:"\0*\0AProt";s:7:"C.AProt";s:4:"APub";s:6:"C.APub";s:8:"\0C\0CPriv";s:7:"C.CPriv";s:8:"\0*\0CProt";s:7:"C.BProt";s:4:"CPub";s:6:"C.CPub";s:8:"\0B\0BPriv";s:7:"B.BPriv";s:8:"\0*\0BProt";s:7:"B.BProt";s:4:"BPub";s:6:"B.BPub";s:8:"\0A\0APriv";s:7:"A.APriv";}"
+Unserialized:
+object(C)#%d (10) {
+ ["APriv:private"]=>
+ string(7) "C.APriv"
+ ["AProt:protected"]=>
+ string(7) "C.AProt"
+ ["APub"]=>
+ string(6) "C.APub"
+ ["CPriv:private"]=>
+ string(7) "C.CPriv"
+ ["CProt:protected"]=>
+ string(7) "C.BProt"
+ ["CPub"]=>
+ string(6) "C.CPub"
+ ["BPriv:private"]=>
+ string(7) "B.BPriv"
+ ["BProt:protected"]=>
+ string(7) "B.BProt"
+ ["BPub"]=>
+ string(6) "B.BPub"
+ ["APriv:private"]=>
+ string(7) "A.APriv"
+}
+Sanity check: bool(true)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_012.phpt b/ext/standard/tests/serialize/serialization_objects_012.phpt
new file mode 100644
index 000000000..f994d8e26
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_012.phpt
@@ -0,0 +1,244 @@
+--TEST--
+Object serialization / unserialization: real references and COW references
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+echo "\n\nArray containing same object twice:\n";
+$obj = new stdclass;
+$a[0] = $obj;
+$a[1] = $a[0];
+var_dump($a);
+
+$ser = serialize($a);
+var_dump($ser);
+
+$ua = unserialize($ser);
+var_dump($ua);
+$ua[0]->a = "newProp";
+var_dump($ua);
+$ua[0] = "a0.changed";
+var_dump($ua);
+
+
+echo "\n\nArray containing object and reference to that object:\n";
+$obj = new stdclass;
+$a[0] = $obj;
+$a[1] = &$a[0];
+var_dump($a);
+
+$ser = serialize($a);
+var_dump($ser);
+
+$ua = unserialize($ser);
+var_dump($ua);
+$ua[0]->a = "newProp";
+var_dump($ua);
+$ua[0] = "a0.changed";
+var_dump($ua);
+
+echo "\n\nObject containing same object twice:";
+$obj = new stdclass;
+$contaner = new stdclass;
+$contaner->a = $obj;
+$contaner->b = $contaner->a;
+var_dump($contaner);
+
+$ser = serialize($contaner);
+var_dump($ser);
+
+$ucontainer = unserialize($ser);
+var_dump($ucontainer);
+$ucontainer->a->a = "newProp";
+var_dump($ucontainer);
+$ucontainer->a = "container->a.changed";
+var_dump($ucontainer);
+
+
+echo "\n\nObject containing object and reference to that object:\n";
+$obj = new stdclass;
+$contaner = new stdclass;
+$contaner->a = $obj;
+$contaner->b = &$contaner->a;
+var_dump($contaner);
+
+$ser = serialize($contaner);
+var_dump($ser);
+
+$ucontainer = unserialize($ser);
+var_dump($ucontainer);
+$ucontainer->a->a = "newProp";
+var_dump($ucontainer);
+$ucontainer->b = "container->a.changed";
+var_dump($ucontainer);
+
+echo "Done";
+?>
+--EXPECTF--
+
+
+Array containing same object twice:
+array(2) {
+ [0]=>
+ object(stdClass)#%d (0) {
+ }
+ [1]=>
+ object(stdClass)#%d (0) {
+ }
+}
+string(37) "a:2:{i:0;O:8:"stdClass":0:{}i:1;r:2;}"
+array(2) {
+ [0]=>
+ object(stdClass)#%d (0) {
+ }
+ [1]=>
+ object(stdClass)#%d (0) {
+ }
+}
+array(2) {
+ [0]=>
+ object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+ [1]=>
+ object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+}
+array(2) {
+ [0]=>
+ string(10) "a0.changed"
+ [1]=>
+ object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+}
+
+
+Array containing object and reference to that object:
+array(2) {
+ [0]=>
+ &object(stdClass)#%d (0) {
+ }
+ [1]=>
+ &object(stdClass)#%d (0) {
+ }
+}
+string(37) "a:2:{i:0;O:8:"stdClass":0:{}i:1;R:2;}"
+array(2) {
+ [0]=>
+ &object(stdClass)#%d (0) {
+ }
+ [1]=>
+ &object(stdClass)#%d (0) {
+ }
+}
+array(2) {
+ [0]=>
+ &object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+ [1]=>
+ &object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+}
+array(2) {
+ [0]=>
+ &string(10) "a0.changed"
+ [1]=>
+ &string(10) "a0.changed"
+}
+
+
+Object containing same object twice:object(stdClass)#%d (2) {
+ ["a"]=>
+ object(stdClass)#%d (0) {
+ }
+ ["b"]=>
+ object(stdClass)#%d (0) {
+ }
+}
+string(58) "O:8:"stdClass":2:{s:1:"a";O:8:"stdClass":0:{}s:1:"b";r:2;}"
+object(stdClass)#%d (2) {
+ ["a"]=>
+ object(stdClass)#%d (0) {
+ }
+ ["b"]=>
+ object(stdClass)#%d (0) {
+ }
+}
+object(stdClass)#%d (2) {
+ ["a"]=>
+ object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+ ["b"]=>
+ object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+}
+object(stdClass)#%d (2) {
+ ["a"]=>
+ string(20) "container->a.changed"
+ ["b"]=>
+ object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+}
+
+
+Object containing object and reference to that object:
+object(stdClass)#%d (2) {
+ ["a"]=>
+ &object(stdClass)#%d (0) {
+ }
+ ["b"]=>
+ &object(stdClass)#%d (0) {
+ }
+}
+string(58) "O:8:"stdClass":2:{s:1:"a";O:8:"stdClass":0:{}s:1:"b";R:2;}"
+object(stdClass)#%d (2) {
+ ["a"]=>
+ &object(stdClass)#%d (0) {
+ }
+ ["b"]=>
+ &object(stdClass)#%d (0) {
+ }
+}
+object(stdClass)#%d (2) {
+ ["a"]=>
+ &object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+ ["b"]=>
+ &object(stdClass)#%d (1) {
+ ["a"]=>
+ string(7) "newProp"
+ }
+}
+object(stdClass)#%d (2) {
+ ["a"]=>
+ &string(20) "container->a.changed"
+ ["b"]=>
+ &string(20) "container->a.changed"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_013.phpt b/ext/standard/tests/serialize/serialization_objects_013.phpt
new file mode 100644
index 000000000..01b623cb0
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_013.phpt
@@ -0,0 +1,494 @@
+--TEST--
+Object serialization / unserialization: references amongst properties
+--INI--
+error_reporting = E_ALL & ~E_STRICT
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+function check(&$obj) {
+ var_dump($obj);
+ $ser = serialize($obj);
+ var_dump($ser);
+
+ $uobj = unserialize($ser);
+ var_dump($uobj);
+ $uobj->a = "obj->a.changed";
+ var_dump($uobj);
+ $uobj->b = "obj->b.changed";
+ var_dump($uobj);
+ $uobj->c = "obj->c.changed";
+ var_dump($uobj);
+}
+
+echo "\n\n--- a refs b:\n";
+$obj = new stdClass;
+$obj->a = &$obj->b;
+$obj->b = 1;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- a refs c:\n";
+$obj = new stdClass;
+$obj->a = &$obj->c;
+$obj->b = 1;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- b refs a:\n";
+$obj = new stdClass;
+$obj->a = 1;
+$obj->b = &$obj->a;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- b refs c:\n";
+$obj = new stdClass;
+$obj->a = 1;
+$obj->b = &$obj->c;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- c refs a:\n";
+$obj = new stdClass;
+$obj->a = 1;
+$obj->b = 1;
+$obj->c = &$obj->a;
+check($obj);
+
+echo "\n\n--- c refs b:\n";
+$obj = new stdClass;
+$obj->a = 1;
+$obj->b = 1;
+$obj->c = &$obj->b;
+check($obj);
+
+echo "\n\n--- a,b refs c:\n";
+$obj = new stdClass;
+$obj->a = &$obj->c;
+$obj->b = &$obj->c;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- a,c refs b:\n";
+$obj = new stdClass;
+$obj->a = &$obj->b;
+$obj->b = 1;
+$obj->c = &$obj->b;
+check($obj);
+
+echo "\n\n--- b,c refs a:\n";
+$obj = new stdClass;
+$obj->a = 1;
+$obj->b = &$obj->a;
+$obj->c = &$obj->a;
+check($obj);
+
+echo "Done";
+?>
+--EXPECTF--
+
+--- a refs b:
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &int(1)
+ ["a"]=>
+ &int(1)
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"b";i:1;s:1:"a";R:2;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &int(1)
+ ["a"]=>
+ &int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &string(14) "obj->a.changed"
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- a refs c:
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &int(1)
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"c";i:1;s:1:"a";R:2;s:1:"b";i:1;}"
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &int(1)
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &string(14) "obj->a.changed"
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &string(14) "obj->a.changed"
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+}
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &string(14) "obj->c.changed"
+ ["a"]=>
+ &string(14) "obj->c.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+}
+
+
+--- b refs a:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";R:2;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->a.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- b refs c:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["c"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"c";i:1;s:1:"b";R:3;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["c"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["c"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["c"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["c"]=>
+ &string(14) "obj->c.changed"
+ ["b"]=>
+ &string(14) "obj->c.changed"
+}
+
+
+--- c refs a:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ &int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";i:1;s:1:"c";R:2;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ &string(14) "obj->a.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ &string(14) "obj->a.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->c.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ &string(14) "obj->c.changed"
+}
+
+
+--- c refs b:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";i:1;s:1:"c";R:3;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ &string(14) "obj->b.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->c.changed"
+ ["c"]=>
+ &string(14) "obj->c.changed"
+}
+
+
+--- a,b refs c:
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &int(1)
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"c";i:1;s:1:"a";R:2;s:1:"b";R:2;}"
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &int(1)
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &string(14) "obj->a.changed"
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->a.changed"
+}
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &string(14) "obj->b.changed"
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+}
+object(stdClass)#%d (3) {
+ ["c"]=>
+ &string(14) "obj->c.changed"
+ ["a"]=>
+ &string(14) "obj->c.changed"
+ ["b"]=>
+ &string(14) "obj->c.changed"
+}
+
+
+--- a,c refs b:
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &int(1)
+ ["a"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"b";i:1;s:1:"a";R:2;s:1:"c";R:2;}"
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &int(1)
+ ["a"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &string(14) "obj->a.changed"
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["c"]=>
+ &string(14) "obj->a.changed"
+}
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ &string(14) "obj->b.changed"
+}
+object(stdClass)#%d (3) {
+ ["b"]=>
+ &string(14) "obj->c.changed"
+ ["a"]=>
+ &string(14) "obj->c.changed"
+ ["c"]=>
+ &string(14) "obj->c.changed"
+}
+
+
+--- b,c refs a:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";R:2;s:1:"c";R:2;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->a.changed"
+ ["c"]=>
+ &string(14) "obj->a.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ &string(14) "obj->b.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->c.changed"
+ ["b"]=>
+ &string(14) "obj->c.changed"
+ ["c"]=>
+ &string(14) "obj->c.changed"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_014.phpt b/ext/standard/tests/serialize/serialization_objects_014.phpt
new file mode 100644
index 000000000..234f5e084
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_014.phpt
@@ -0,0 +1,295 @@
+--TEST--
+Object serialization / unserialization: references to external values
+--INI--
+error_reporting = E_ALL & ~E_STRICT
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+function check(&$obj) {
+ var_dump($obj);
+ $ser = serialize($obj);
+ var_dump($ser);
+
+ $uobj = unserialize($ser);
+ var_dump($uobj);
+ $uobj->a = "obj->a.changed";
+ var_dump($uobj);
+ $uobj->b = "obj->b.changed";
+ var_dump($uobj);
+ $uobj->c = "obj->c.changed";
+ var_dump($uobj);
+}
+
+echo "\n\n--- a refs external:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = &$ext;
+$obj->b = 1;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- b refs external:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = 1;
+$obj->b = &$ext;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- c refs external:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = 1;
+$obj->b = 1;
+$obj->c = &$ext;
+check($obj);
+
+echo "\n\n--- a,b ref external:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = &$ext;
+$obj->b = &$ext;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- a,b,c ref external:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = &$ext;
+$obj->b = &$ext;
+$obj->c = &$ext;
+check($obj);
+
+echo "Done";
+?>
+--EXPECTF--
+
+--- a refs external:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";i:1;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- b refs external:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";i:1;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- c refs external:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ &int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";i:1;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- a,b ref external:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";R:2;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->a.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- a,b,c ref external:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";i:1;s:1:"b";R:2;s:1:"c";R:2;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &int(1)
+ ["b"]=>
+ &int(1)
+ ["c"]=>
+ &int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->a.changed"
+ ["c"]=>
+ &string(14) "obj->a.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ &string(14) "obj->b.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->c.changed"
+ ["b"]=>
+ &string(14) "obj->c.changed"
+ ["c"]=>
+ &string(14) "obj->c.changed"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_objects_015.phpt b/ext/standard/tests/serialize/serialization_objects_015.phpt
new file mode 100644
index 000000000..02e8279c4
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_objects_015.phpt
@@ -0,0 +1,532 @@
+--TEST--
+Object serialization / unserialization: properties reference containing object
+--INI--
+error_reporting = E_ALL & ~E_STRICT
+--FILE--
+<?php
+
+function check(&$obj) {
+ var_dump($obj);
+ $ser = serialize($obj);
+ var_dump($ser);
+
+ $uobj = unserialize($ser);
+ var_dump($uobj);
+ $uobj->a = "obj->a.changed";
+ var_dump($uobj);
+ $uobj->b = "obj->b.changed";
+ var_dump($uobj);
+ $uobj->c = "obj->c.changed";
+ var_dump($uobj);
+}
+
+echo "\n\n--- a refs container:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = &$obj;
+$obj->b = 1;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- a eqs container:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = $obj;
+$obj->b = 1;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- a,b ref container:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = &$obj;
+$obj->b = &$obj;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- a,b eq container:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = $obj;
+$obj->b = $obj;
+$obj->c = 1;
+check($obj);
+
+echo "\n\n--- a,b,c ref container:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = &$obj;
+$obj->b = &$obj;
+$obj->c = &$obj;
+check($obj);
+
+echo "\n\n--- a,b,c eq container:\n";
+$ext = 1;
+$obj = new stdClass;
+$obj->a = $obj;
+$obj->b = $obj;
+$obj->c = $obj;
+check($obj);
+
+echo "Done";
+?>
+--EXPECTF--
+--- a refs container:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+ }
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";R:1;s:1:"b";i:1;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+ }
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- a eqs container:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+ }
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";r:1;s:1:"b";i:1;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+ }
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ int(1)
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- a,b ref container:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["b"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";R:1;s:1:"b";R:1;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["b"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->a.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- a,b eq container:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["b"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["c"]=>
+ int(1)
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";r:1;s:1:"b";r:1;s:1:"c";i:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["b"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ int(1)
+ }
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ int(1)
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+
+
+--- a,b,c ref container:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["b"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["c"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";R:1;s:1:"b";R:1;s:1:"c";R:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["b"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["c"]=>
+ &object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->a.changed"
+ ["b"]=>
+ &string(14) "obj->a.changed"
+ ["c"]=>
+ &string(14) "obj->a.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->b.changed"
+ ["b"]=>
+ &string(14) "obj->b.changed"
+ ["c"]=>
+ &string(14) "obj->b.changed"
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ &string(14) "obj->c.changed"
+ ["b"]=>
+ &string(14) "obj->c.changed"
+ ["c"]=>
+ &string(14) "obj->c.changed"
+}
+
+
+--- a,b,c eq container:
+object(stdClass)#%d (3) {
+ ["a"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["b"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["c"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+}
+string(55) "O:8:"stdClass":3:{s:1:"a";r:1;s:1:"b";r:1;s:1:"c";r:1;}"
+object(stdClass)#%d (3) {
+ ["a"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["b"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["c"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ *RECURSION*
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+ ["c"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ *RECURSION*
+ ["c"]=>
+ *RECURSION*
+ }
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ *RECURSION*
+ }
+}
+object(stdClass)#%d (3) {
+ ["a"]=>
+ string(14) "obj->a.changed"
+ ["b"]=>
+ string(14) "obj->b.changed"
+ ["c"]=>
+ string(14) "obj->c.changed"
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_precision_001.phpt b/ext/standard/tests/serialize/serialization_precision_001.phpt
new file mode 100644
index 000000000..eb633beb7
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_precision_001.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test serialize_precision (part 1)
+--INI--
+serialize_precision=10
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+var_dump(serialize(0.1));
+?>
+--EXPECTF--
+string(6) "d:0.1;" \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_precision_002.phpt b/ext/standard/tests/serialize/serialization_precision_002.phpt
new file mode 100644
index 000000000..653fabea3
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_precision_002.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test serialize_precision (part 2)
+--INI--
+serialize_precision=75
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+var_dump(serialize(0.1));
+?>
+--EXPECTF--
+string(60) "d:0.1000000000000000055511151231257827021181583404541015625;" \ No newline at end of file
diff --git a/ext/standard/tests/serialize/serialization_resources_001.phpt b/ext/standard/tests/serialize/serialization_resources_001.phpt
new file mode 100644
index 000000000..dbb7d3d3e
--- /dev/null
+++ b/ext/standard/tests/serialize/serialization_resources_001.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Test serialize() & unserialize() functions: resources
+--FILE--
+<?php
+/* Prototype : proto string serialize(mixed variable)
+ * Description: Returns a string representation of variable (which can later be unserialized)
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+/* Prototype : proto mixed unserialize(string variable_representation)
+ * Description: Takes a string representation of variable and recreates it
+ * Source code: ext/standard/var.c
+ * Alias to functions:
+ */
+
+echo "\n--- Testing Resource ---\n";
+$file_handle = fopen( __FILE__, "r" );
+$serialized_data = serialize( $file_handle );
+fclose($file_handle);
+var_dump($serialized_data);
+var_dump(unserialize($serialized_data));
+
+echo "\nDone";
+?>
+--EXPECTF--
+--- Testing Resource ---
+string(4) "i:%d;"
+int(%d)
+
+Done \ No newline at end of file
diff --git a/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt
new file mode 100644
index 000000000..f46c8fd70
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt
@@ -0,0 +1,50 @@
+--TEST--
+stream_get_meta_data() on directories
+--FILE--
+<?php
+
+$dir = opendir(dirname(__FILE__));
+var_dump(stream_get_meta_data($dir));
+closedir($dir);
+
+$dirObject = dir(dirname(__FILE__));
+var_dump(stream_get_meta_data($dirObject->handle));
+
+?>
+--EXPECT--
+array(8) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(3) "dir"
+ ["mode"]=>
+ string(1) "r"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(8) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(3) "dir"
+ ["mode"]=>
+ string(1) "r"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt
new file mode 100644
index 000000000..4758c750f
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+stream_get_meta_data() basic functionality
+--FILE--
+<?php
+
+$fp = fopen(__FILE__, "r");
+
+var_dump(stream_get_meta_data($fp));
+
+fclose($fp);
+
+?>
+--EXPECTF--
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(1) "r"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%sstream_get_meta_data_file_basic.php"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
new file mode 100644
index 000000000..912c4055a
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_error.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Test stream_get_meta_data() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto array stream_get_meta_data(resource fp)
+ * Description: Retrieves header/meta data from streams/file pointers
+ * Source code: ext/standard/streamsfuncs.c
+ * Alias to functions: socket_get_status
+ */
+
+echo "*** Testing stream_get_meta_data() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing stream_get_meta_data() function with Zero arguments --\n";
+var_dump( stream_get_meta_data() );
+
+//Test stream_get_meta_data with one more than the expected number of arguments
+echo "\n-- Testing stream_get_meta_data() function with more than expected no. of arguments --\n";
+
+$fp = null;
+$extra_arg = 10;
+var_dump( stream_get_meta_data($fp, $extra_arg) );
+
+echo "\n-- Testing stream_get_meta_data() function with invalid stream resource --\n";
+$fp = null;
+var_dump(stream_get_meta_data($fp));
+
+echo "\n-- Testing stream_get_meta_data() function with closed stream resource --\n";
+$fp = fopen(__FILE__, 'r');
+fclose($fp);
+var_dump(stream_get_meta_data($fp));
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing stream_get_meta_data() : error conditions ***
+
+-- Testing stream_get_meta_data() function with Zero arguments --
+
+Warning: Wrong parameter count for stream_get_meta_data() in %s on line %i
+NULL
+
+-- Testing stream_get_meta_data() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for stream_get_meta_data() in %s on line %i
+NULL
+
+-- Testing stream_get_meta_data() function with invalid stream resource --
+
+Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in %s on line %i
+bool(false)
+
+-- Testing stream_get_meta_data() function with closed stream resource --
+
+Warning: stream_get_meta_data(): %i is not a valid stream resource in %s on line %i
+bool(false)
+Done
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt
new file mode 100644
index 000000000..572653e3d
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt
@@ -0,0 +1,510 @@
+--TEST--
+stream_get_meta_data() with differing file access modes
+--FILE--
+<?php
+
+// array of all file access modes
+$filemodes = array('r', 'r+', 'w', 'w+', 'a', 'a+', 'x', 'x+',
+ 'rb', 'rb+', 'wb', 'wb+', 'ab', 'ab+', 'xb', 'xb+',
+ 'rt', 'rt+', 'wt', 'wt+', 'at', 'at+', 'xt', 'xt+');
+
+//create a file
+$filename = __FILE__ . '.tmp';
+$fp = fopen($filename, 'w+');
+fclose($fp);
+
+// open file in each access mode and get meta data
+foreach ($filemodes as $mode) {
+ if (strncmp($mode, 'x', 1) == 0) {
+ // x modes require that file does not exist
+ unlink($filename);
+ }
+ $fp = fopen($filename, $mode);
+ var_dump(stream_get_meta_data($fp));
+ fclose($fp);
+}
+
+unlink($filename);
+
+?>
+--EXPECTF--
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(1) "r"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(1) "w"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "w+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(1) "a"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "a+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(1) "x"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "x+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "rb"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(3) "rb+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "wb"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(3) "wb+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "ab"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(3) "ab+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "xb"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(3) "xb+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "rt"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(3) "rt+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "wt"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(3) "wt+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "at"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(3) "at+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "xt"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(3) "xt+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt
new file mode 100644
index 000000000..d186cb7e9
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt
@@ -0,0 +1,135 @@
+--TEST--
+Testing stream_get_meta_data() "unread_bytes" field
+--FILE--
+<?php
+
+$filename = __FILE__ . '.tmp';
+
+$fp = fopen($filename, "w+");
+
+echo "Write some data to the file:\n";
+$i = 0;
+while ($i++ < 20) {
+ fwrite($fp, "a line of data\n");
+}
+
+var_dump(stream_get_meta_data($fp));
+
+//seek to start of file
+rewind($fp);
+
+echo "\n\nRead a line of the file, causing data to be buffered:\n";
+var_dump(fgets($fp));
+
+var_dump(stream_get_meta_data($fp));
+
+echo "\n\nRead 20 bytes from the file:\n";
+fread($fp, 20);
+
+var_dump(stream_get_meta_data($fp));
+
+echo "\n\nRead entire file:\n";
+while(!feof($fp)) {
+ fread($fp, 1);
+}
+
+var_dump(stream_get_meta_data($fp));
+
+fclose($fp);
+
+unlink($filename);
+
+?>
+--EXPECTF--
+Write some data to the file:
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "w+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Read a line of the file, causing data to be buffered:
+string(15) "a line of data
+"
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "w+"
+ ["unread_bytes"]=>
+ int(285)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Read 20 bytes from the file:
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "w+"
+ ["unread_bytes"]=>
+ int(265)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Read entire file:
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "w+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(true)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt
new file mode 100644
index 000000000..c51d9bd08
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt
@@ -0,0 +1,71 @@
+--TEST--
+stream_get_meta_data() with a relative file path
+--FILE--
+<?php
+
+echo "Create a file:\n";
+$filename = __FILE__ . '.tmp';
+$fp = fopen('File://' . $filename, 'w+');
+
+var_dump(stream_get_meta_data($fp));
+
+fclose($fp);
+
+echo "\nChange to file's directory and open with a relative path:\n";
+
+$dirname = dirname($filename);
+chdir($dirname);
+$relative_filename = basename($filename);
+
+$fp = fopen($relative_filename, 'r');
+var_dump(stream_get_meta_data($fp));
+
+fclose($fp);
+
+unlink($filename);
+
+?>
+--EXPECTF--
+Create a file:
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "w+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "File://%sstream_get_meta_data_file_variation4.php.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+Change to file's directory and open with a relative path:
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(1) "r"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "stream_get_meta_data_file_variation4.php.tmp"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt
new file mode 100644
index 000000000..386b92f42
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt
@@ -0,0 +1,77 @@
+--TEST--
+testing stream_get_meta_data() "eof" field for a file stream
+--FILE--
+<?php
+
+$filename = __FILE__ . '.tmp';
+
+$fp = fopen($filename, "w+");
+
+echo "Write some data to the file:\n";
+$i = 0;
+while ($i++ < 20) {
+ fwrite($fp, "a line of data\n");
+}
+
+var_dump(stream_get_meta_data($fp));
+
+//seek to start of file
+rewind($fp);
+
+echo "\n\nRead entire file:\n";
+while(!feof($fp)) {
+ fread($fp, 1);
+}
+
+var_dump(stream_get_meta_data($fp));
+
+fclose($fp);
+
+unlink($filename);
+
+?>
+--EXPECTF--
+Write some data to the file:
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "w+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Read entire file:
+array(9) {
+ ["wrapper_type"]=>
+ string(9) "plainfile"
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "w+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+ ["uri"]=>
+ string(%i) "%s"
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(true)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_process_basic-win32.phpt b/ext/standard/tests/streams/stream_get_meta_data_process_basic-win32.phpt
new file mode 100644
index 000000000..97b7d780a
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_process_basic-win32.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Testing stream_get_meta_data() on a process stream.
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ // windows retains the 'b' in the mode string
+ die('skip.. only for Windows');
+}
+?>
+--FILE--
+<?php
+
+$output_file = __FILE__.'.tmp';
+$cmd = "echo here is some output";
+$mode = 'rb';
+$handle = popen($cmd, $mode);
+$data = fread($handle, 100);
+
+var_dump(stream_get_meta_data($handle));
+
+pclose($handle);
+
+echo "Done";
+
+?>
+--EXPECT--
+array(7) {
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(2) "rb"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+Done
diff --git a/ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt
new file mode 100644
index 000000000..6b383e75d
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Testing stream_get_meta_data() on a process stream.
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ // non-windows platforms discard the 'b' from the mode string
+ die('skip Not valid for Windows');
+}
+?>
+--FILE--
+<?php
+
+$output_file = __FILE__.'.tmp';
+$cmd = "echo here is some output";
+$mode = 'rb';
+$handle = popen($cmd, $mode);
+$data = fread($handle, 100);
+
+var_dump(stream_get_meta_data($handle));
+
+pclose($handle);
+
+echo "Done";
+
+?>
+--EXPECT--
+array(7) {
+ ["stream_type"]=>
+ string(5) "STDIO"
+ ["mode"]=>
+ string(1) "r"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+Done
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt
new file mode 100644
index 000000000..86056114b
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+stream_get_meta_data() on a udp socket
+--FILE--
+<?php
+
+$tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');
+var_dump(stream_get_meta_data($tcp_socket));
+fclose($tcp_socket);
+
+?>
+--EXPECTF--
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt
new file mode 100644
index 000000000..649311039
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt
@@ -0,0 +1,110 @@
+--TEST--
+Testing stream_get_meta_data() "unread_bytes" field on a udp socket
+--FILE--
+<?php
+
+/* Setup socket server */
+$server = stream_socket_server('tcp://127.0.0.1:31337');
+
+/* Connect to it */
+$client = fsockopen('tcp://127.0.0.1:31337');
+
+/* Accept that connection */
+$socket = stream_socket_accept($server);
+
+echo "Write some data:\n";
+fwrite($socket, "abcdefg\n1234567\nxyzxyz\n");
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nRead a line from the client, causing data to be buffered:\n";
+fgets($client);
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nRead 3 bytes of data from the client:\n";
+fread($client, 3);
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nClose the server side socket and read the remaining data from the client:\n";
+fclose($socket);
+fclose($server);
+while(!feof($client)) {
+ fread($client, 1);
+}
+var_dump(stream_get_meta_data($client));
+
+?>
+--EXPECTF--
+Write some data:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Read a line from the client, causing data to be buffered:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(15)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Read 3 bytes of data from the client:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(12)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Close the server side socket and read the remaining data from the client:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(true)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt
new file mode 100644
index 000000000..c04f3cb5d
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt
@@ -0,0 +1,108 @@
+--TEST--
+Testing stream_get_meta_data() "timed_out" field on a udp socket
+--FILE--
+<?php
+
+/* Setup socket server */
+$server = stream_socket_server('tcp://127.0.0.1:31337');
+
+/* Connect to it */
+$client = fsockopen('tcp://127.0.0.1:31337');
+
+/* Accept that connection */
+$socket = stream_socket_accept($server);
+
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nSet a timeout on the client and attempt a read:\n";
+socket_set_timeout($client, 0, 1000);
+fread($client, 1);
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nWrite some data from the server:\n";
+fwrite($socket, "12345");
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nRead some data from the client:\n";
+fread($client, 5);
+var_dump(stream_get_meta_data($client));
+
+fclose($client);
+fclose($socket);
+fclose($server);
+
+?>
+--EXPECTF--
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Set a timeout on the client and attempt a read:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(true)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Write some data from the server:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(true)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Read some data from the client:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt
new file mode 100644
index 000000000..4ec00b3fd
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt
@@ -0,0 +1,86 @@
+--TEST--
+Testing stream_get_meta_data() "blocked" field on a udp socket
+--FILE--
+<?php
+
+/* Setup socket server */
+$server = stream_socket_server('tcp://127.0.0.1:31337');
+
+/* Connect to it */
+$client = fsockopen('tcp://127.0.0.1:31337');
+
+/* Accept that connection */
+$socket = stream_socket_accept($server);
+
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nSet blocking to false:\n";
+var_dump(socket_set_blocking($client, 0));
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nSet blocking to true:\n";
+var_dump(socket_set_blocking($client, 1));
+var_dump(stream_get_meta_data($client));
+
+fclose($client);
+fclose($socket);
+fclose($server);
+
+?>
+--EXPECTF--
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Set blocking to false:
+bool(true)
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(false)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Set blocking to true:
+bool(true)
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt
new file mode 100644
index 000000000..dae4f470f
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt
@@ -0,0 +1,89 @@
+--TEST--
+Testing stream_get_meta_data() "eof" field on a udp socket
+--FILE--
+<?php
+
+/* Setup socket server */
+$server = stream_socket_server('tcp://127.0.0.1:31337');
+
+/* Connect to it */
+$client = fsockopen('tcp://127.0.0.1:31337');
+
+/* Accept that connection */
+$socket = stream_socket_accept($server);
+
+echo "Write some data:\n";
+fwrite($socket, "abcdefg\n1234567\nxyzxyz\n");
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nRead a line from the client:\n";
+fgets($client);
+var_dump(stream_get_meta_data($client));
+
+echo "\n\nClose the server side socket and read the remaining data from the client:\n";
+fclose($socket);
+fclose($server);
+while(!feof($client)) {
+ fread($client, 1);
+}
+var_dump(stream_get_meta_data($client));
+
+fclose($client);
+
+?>
+--EXPECTF--
+Write some data:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(%i)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Read a line from the client:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(%i)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
+}
+
+
+Close the server side socket and read the remaining data from the client:
+array(7) {
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(%i)
+ ["seekable"]=>
+ bool(false)
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(true)
+}
diff --git a/ext/standard/tests/streams/stream_set_timeout_error.phpt b/ext/standard/tests/streams/stream_set_timeout_error.phpt
new file mode 100644
index 000000000..1e8e60bd2
--- /dev/null
+++ b/ext/standard/tests/streams/stream_set_timeout_error.phpt
@@ -0,0 +1,79 @@
+--TEST--
+Test stream_set_timeout() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto bool stream_set_timeout(resource stream, int seconds, int microseconds)
+ * Description: Set timeout on stream read to seconds + microseonds
+ * Source code: ext/standard/streamsfuncs.c
+ * Alias to functions: socket_set_timeout
+ */
+
+/*
+ * add a comment here to say what the test is supposed to do
+ */
+
+echo "*** Testing stream_set_timeout() : error conditions ***\n";
+
+
+//Test stream_set_timeout with one more than the expected number of arguments
+echo "\n-- Testing stream_set_timeout() function with more than expected no. of arguments --\n";
+
+/* Setup socket server */
+$server = stream_socket_server('tcp://127.0.0.1:31337');
+/* Connect to it */
+$client = fsockopen('tcp://127.0.0.1:31337');
+
+$seconds = 10;
+$microseconds = 10;
+$extra_arg = 10;
+var_dump( stream_set_timeout($client, $seconds, $microseconds, $extra_arg) );
+
+// Testing stream_set_timeout with one less than the expected number of arguments
+echo "\n-- Testing stream_set_timeout() function with less than expected no. of arguments --\n";
+
+$seconds = 10;
+var_dump( stream_set_timeout($client) );
+
+
+echo "\n-- Testing stream_set_timeout() function with a closed socket --\n";
+fclose($client);
+var_dump( stream_set_timeout($client, $seconds) );
+
+echo "\n-- Testing stream_set_timeout() function with an invalid stream --\n";
+var_dump( stream_set_timeout($seconds, $seconds) );
+
+echo "\n-- Testing stream_set_timeout() function with a stream that does not support timeouts --\n";
+$filestream = fopen(__FILE__, "r");
+var_dump( stream_set_timeout($filestream, $seconds) );
+
+fclose($filestream);
+fclose($server);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing stream_set_timeout() : error conditions ***
+
+-- Testing stream_set_timeout() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for stream_set_timeout() in %s on line %i
+NULL
+
+-- Testing stream_set_timeout() function with less than expected no. of arguments --
+
+Warning: Wrong parameter count for stream_set_timeout() in %s on line %i
+NULL
+
+-- Testing stream_set_timeout() function with a closed socket --
+
+Warning: stream_set_timeout(): %i is not a valid stream resource in %s on line %i
+bool(false)
+
+-- Testing stream_set_timeout() function with an invalid stream --
+
+Warning: stream_set_timeout(): supplied argument is not a valid stream resource in %s on line %i
+bool(false)
+
+-- Testing stream_set_timeout() function with a stream that does not support timeouts --
+bool(false)
+Done
diff --git a/ext/standard/tests/strings/bug37262.phpt b/ext/standard/tests/strings/bug37262.phpt
index 474251a81..6fe2d9f37 100644
--- a/ext/standard/tests/strings/bug37262.phpt
+++ b/ext/standard/tests/strings/bug37262.phpt
@@ -6,4 +6,4 @@ $func = create_function('$a', 'return $a;');
var_export($func);
?>
--EXPECT--
-'\000lambda_1'
+'' . "\0" . 'lambda_1'
diff --git a/ext/standard/tests/strings/bug43927.phpt b/ext/standard/tests/strings/bug43927.phpt
new file mode 100644
index 000000000..b780c4aac
--- /dev/null
+++ b/ext/standard/tests/strings/bug43927.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #43927 (koi8r is missing from html_entity_decode())
+--FILE--
+<?php
+var_dump(html_entity_decode("&amp;lt;", ENT_COMPAT, 'koi8-r'));
+var_dump(html_entity_decode("&amp;#38;", ENT_COMPAT, 'koi8-r'));
+var_dump(html_entity_decode("&amp;#38;lt;", ENT_COMPAT, 'koi8-r'));
+?>
+--EXPECT--
+string(4) "&lt;"
+string(5) "&#38;"
+string(8) "&#38;lt;"
diff --git a/ext/standard/tests/strings/bug44242.phpt b/ext/standard/tests/strings/bug44242.phpt
new file mode 100644
index 000000000..00adda2be
--- /dev/null
+++ b/ext/standard/tests/strings/bug44242.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #44242 (metaphone('CMXFXM') crashes PHP)
+--FILE--
+<?php
+
+echo metaphone('CMXFXZ'), "\n";
+echo metaphone('CMXFXV'), "\n";
+echo metaphone('CMXFXZXZ'), "\n";
+
+?>
+--EXPECT--
+KMKSFKSS
+KMKSFKSF
+KMKSFKSSKSS
diff --git a/ext/standard/tests/strings/bug44703.phpt b/ext/standard/tests/strings/bug44703.phpt
new file mode 100644
index 000000000..d2cdce9bf
--- /dev/null
+++ b/ext/standard/tests/strings/bug44703.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Bug #44703 (htmlspecialchars() does not detect bad character set argument)
+--FILE--
+<?php
+
+var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 1));
+var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 12));
+var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 125));
+var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 1252));
+var_dump(htmlspecialchars("<a href='test'>Test</a>", ENT_COMPAT, 12526));
+
+var_dump(htmlspecialchars("<>", ENT_COMPAT, 866));
+var_dump(htmlspecialchars("<>", ENT_COMPAT, 8666));
+
+var_dump(htmlspecialchars("<>", ENT_COMPAT, NULL));
+
+
+var_dump(htmlspecialchars("<>", ENT_COMPAT, 'SJIS'));
+var_dump(htmlspecialchars("<>", ENT_COMPAT, 'SjiS'));
+
+var_dump(htmlspecialchars("<>", ENT_COMPAT, str_repeat('a', 100)));
+
+?>
+--EXPECTF--
+Warning: htmlspecialchars(): charset `1' not supported, assuming iso-8859-1 in %s on line %d
+string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
+
+Warning: htmlspecialchars(): charset `12' not supported, assuming iso-8859-1 in %s on line %d
+string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
+
+Warning: htmlspecialchars(): charset `125' not supported, assuming iso-8859-1 in %s on line %d
+string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
+string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
+
+Warning: htmlspecialchars(): charset `12526' not supported, assuming iso-8859-1 in %s on line %d
+string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
+string(8) "&lt;&gt;"
+
+Warning: htmlspecialchars(): charset `8666' not supported, assuming iso-8859-1 in %s on line %d
+string(8) "&lt;&gt;"
+string(8) "&lt;&gt;"
+string(8) "&lt;&gt;"
+string(8) "&lt;&gt;"
+
+Warning: htmlspecialchars(): charset `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' not supported, assuming iso-8859-1 in %s on line %d
+string(8) "&lt;&gt;"
+
+
diff --git a/ext/standard/tests/strings/chunk_split_variation1.phpt b/ext/standard/tests/strings/chunk_split_variation1.phpt
index 58cb0515c..e34ce3a51 100644
--- a/ext/standard/tests/strings/chunk_split_variation1.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation1.phpt
@@ -1,167 +1,167 @@
---TEST--
-Test chunk_split() function : usage variations - with unexpected values for 'str' argument
---FILE--
-<?php
-/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
- * Description: Returns split line %d%d
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing chunk_split() : with unexpected values for 'str' argument ***\n";
-
-// Initialising variables
-$chunklen = 2;
-$ending = ' ';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//class for object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//resource variable
-$fp = fopen(__FILE__, 'r');
-
-//different values for 'str'
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource data
- $fp
-);
-
-// loop through each element of the array for 'str'
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- var_dump( chunk_split($values[$count], $chunklen, $ending) );
-};
-
-echo "Done";
-
-// close the resource
-fclose($fp);
-
-?>
---EXPECTF--
-*** Testing chunk_split() : with unexpected values for 'str' argument ***
--- Iteration 1 --
-string(2) "0 "
--- Iteration 2 --
-string(2) "1 "
--- Iteration 3 --
-string(8) "12 34 5 "
--- Iteration 4 --
-string(8) "-2 34 5 "
--- Iteration 5 --
-string(6) "10 .5 "
--- Iteration 6 --
-string(8) "-1 0. 5 "
--- Iteration 7 --
-string(18) "10 50 00 00 00 00 "
--- Iteration 8 --
-string(11) "1. 06 E- 9 "
--- Iteration 9 --
-string(5) "0. 5 "
--- Iteration 10 --
-
-Notice: Array to string conversion in %s on line %d
-string(8) "Ar ra y "
--- Iteration 11 --
-
-Notice: Array to string conversion in %s on line %d
-string(8) "Ar ra y "
--- Iteration 12 --
-
-Notice: Array to string conversion in %s on line %d
-string(8) "Ar ra y "
--- Iteration 13 --
-
-Notice: Array to string conversion in %s on line %d
-string(8) "Ar ra y "
--- Iteration 14 --
-
-Notice: Array to string conversion in %s on line %d
-string(8) "Ar ra y "
--- Iteration 15 --
-string(1) " "
--- Iteration 16 --
-string(1) " "
--- Iteration 17 --
-string(2) "1 "
--- Iteration 18 --
-string(1) " "
--- Iteration 19 --
-string(2) "1 "
--- Iteration 20 --
-string(1) " "
--- Iteration 21 --
-string(1) " "
--- Iteration 22 --
-string(1) " "
--- Iteration 23 --
-string(9) "st ri ng "
--- Iteration 24 --
-string(9) "st ri ng "
--- Iteration 25 --
-string(9) "ob je ct "
--- Iteration 26 --
-string(1) " "
--- Iteration 27 --
-string(1) " "
--- Iteration 28 --
-string(%d) "Re so ur ce i d #%d "
-Done
+--TEST--
+Test chunk_split() function : usage variations - with unexpected values for 'str' argument
+--FILE--
+<?php
+/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
+ * Description: Returns split line %d%d
+ * Source code: ext/standard/string.c
+ * Alias to functions: none
+*/
+
+echo "*** Testing chunk_split() : with unexpected values for 'str' argument ***\n";
+
+// Initialising variables
+$chunklen = 2;
+$ending = ' ';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//class for object variable
+class MyClass
+{
+ public function __toString()
+ {
+ return "object";
+ }
+}
+
+//resource variable
+$fp = fopen(__FILE__, 'r');
+
+//different values for 'str'
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new MyClass(),
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+ @$unset_var,
+
+ // resource data
+ $fp
+);
+
+// loop through each element of the array for 'str'
+for($count = 0; $count < count($values); $count++) {
+ echo "-- Iteration ".($count+1)." --\n";
+ var_dump( chunk_split($values[$count], $chunklen, $ending) );
+};
+
+echo "Done";
+
+// close the resource
+fclose($fp);
+
+?>
+--EXPECTF--
+*** Testing chunk_split() : with unexpected values for 'str' argument ***
+-- Iteration 1 --
+string(2) "0 "
+-- Iteration 2 --
+string(2) "1 "
+-- Iteration 3 --
+string(8) "12 34 5 "
+-- Iteration 4 --
+string(8) "-2 34 5 "
+-- Iteration 5 --
+string(6) "10 .5 "
+-- Iteration 6 --
+string(8) "-1 0. 5 "
+-- Iteration 7 --
+string(18) "10 12 34 56 70 00 "
+-- Iteration 8 --
+string(20) "1. 07 65 43 21 E- 9 "
+-- Iteration 9 --
+string(5) "0. 5 "
+-- Iteration 10 --
+
+Notice: Array to string conversion in %s on line 87
+string(8) "Ar ra y "
+-- Iteration 11 --
+
+Notice: Array to string conversion in %s on line 87
+string(8) "Ar ra y "
+-- Iteration 12 --
+
+Notice: Array to string conversion in %s on line 87
+string(8) "Ar ra y "
+-- Iteration 13 --
+
+Notice: Array to string conversion in %s on line 87
+string(8) "Ar ra y "
+-- Iteration 14 --
+
+Notice: Array to string conversion in %s on line 87
+string(8) "Ar ra y "
+-- Iteration 15 --
+string(1) " "
+-- Iteration 16 --
+string(1) " "
+-- Iteration 17 --
+string(2) "1 "
+-- Iteration 18 --
+string(1) " "
+-- Iteration 19 --
+string(2) "1 "
+-- Iteration 20 --
+string(1) " "
+-- Iteration 21 --
+string(1) " "
+-- Iteration 22 --
+string(1) " "
+-- Iteration 23 --
+string(9) "st ri ng "
+-- Iteration 24 --
+string(9) "st ri ng "
+-- Iteration 25 --
+string(9) "ob je ct "
+-- Iteration 26 --
+string(1) " "
+-- Iteration 27 --
+string(1) " "
+-- Iteration 28 --
+string(%d) "Re so ur ce i d #%s "
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/chunk_split_variation2.phpt b/ext/standard/tests/strings/chunk_split_variation2.phpt
index 3498f5fce..a6d876df0 100644
--- a/ext/standard/tests/strings/chunk_split_variation2.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation2.phpt
@@ -1,172 +1,174 @@
---TEST--
-Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument(Bug#42796)
---FILE--
-<?php
-/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
- * Description: Returns split line
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing chunk_split() : with unexpected values for 'chunklen' argument ***\n";
-
-// Initialise function arguments
-$str = 'This is chuklen variation';
-$ending = '*';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//get resource variable
-$fp = fopen(__FILE__, 'r');
-
-//Class to get object variable
-class MyClass
-{
- public function __toString() {
- return "object";
- }
-}
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
- $fp
-);
-
-// loop through each element of the values for 'chunklen'
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- var_dump( chunk_split($str, $values[$count], $ending) );
-}
-
-echo "Done";
-
-//closing resource
-fclose($fp);
-
-?>
---EXPECTF--
-*** Testing chunk_split() : with unexpected values for 'chunklen' argument ***
--- Iteration 1 --
-string(28) "This is ch*uklen vari*ation*"
--- Iteration 2 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 3 --
-string(26) "This is chuklen variation*"
--- Iteration 4 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 7 --
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 8 --
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 9 --
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 10 --
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 11 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 13 --
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 14 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 15 --
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 16 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Notice: Object of class MyClass could not be converted to int in %s on line %d
-string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
--- Iteration 22 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
--- Iteration 24 --
-string(30) "This *is ch*uklen* vari*ation*"
-Done
+--TEST--
+Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument(Bug#42796)
+--FILE--
+<?php
+/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
+ * Description: Returns split line
+ * Source code: ext/standard/string.c
+ * Alias to functions: none
+*/
+
+echo "*** Testing chunk_split() : with unexpected values for 'chunklen' argument ***\n";
+
+// Initialise function arguments
+$str = 'This is chuklen variation';
+$ending = '*';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//get resource variable
+$fp = fopen(__FILE__, 'r');
+
+//Class to get object variable
+class MyClass
+{
+ public function __toString() {
+ return "object";
+ }
+}
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new MyClass(),
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+ @$unset_var,
+
+ // resource variable
+ $fp
+);
+
+// loop through each element of the values for 'chunklen'
+for($count = 0; $count < count($values); $count++) {
+ echo "-- Iteration ".($count+1)." --\n";
+ var_dump( chunk_split($str, $values[$count], $ending) );
+}
+
+echo "Done";
+
+//closing resource
+fclose($fp);
+
+?>
+--EXPECTF--
+*** Testing chunk_split() : with unexpected values for 'chunklen' argument ***
+-- Iteration 1 --
+string(28) "This is ch*uklen vari*ation*"
+-- Iteration 2 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 3 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 4 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 5 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 6 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 7 --
+string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
+-- Iteration 8 --
+string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
+-- Iteration 9 --
+string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
+-- Iteration 10 --
+string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
+-- Iteration 11 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 12 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 13 --
+string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
+-- Iteration 14 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 15 --
+string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
+-- Iteration 16 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 17 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 18 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 19 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 20 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 21 --
+
+Notice: Object of class MyClass could not be converted to int in %s on line %d
+string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
+-- Iteration 22 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 23 --
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
+-- Iteration 24 --
+string(%d) "%s"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/chunk_split_variation3.phpt b/ext/standard/tests/strings/chunk_split_variation3.phpt
index 00dbbdeee..947cdefde 100644
--- a/ext/standard/tests/strings/chunk_split_variation3.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation3.phpt
@@ -1,158 +1,158 @@
---TEST--
-Test chunk_split() function : usage variations - unexpected values for 'ending' argument
---FILE--
-<?php
-/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
- * Description: Returns split line
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-echo "*** Testing chunk_split() : unexpected values for 'ending' ***\n";
-
-// Initializing variables
-$str = 'This is simple string.';
-$chunklen = 4.9;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//resource variable
-$fp = fopen(__FILE__,'r');
-
-//Class to get object variable
-class MyClass
-{
- public function __toString()
- {
- return "object";
- }
-}
-
-//different values for 'ending'
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new MyClass(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource data
- $fp
-);
-
-// loop through each element of values for 'ending'
-for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count+1)." --\n";
- var_dump( chunk_split($str, $chunklen, $values[$count]) );
-}
-
-echo "Done";
-
-//closing resource
-fclose($fp);
-?>
---EXPECTF--
-*** Testing chunk_split() : unexpected values for 'ending' ***
--- Iteration 1 --
-string(28) "This0 is 0simp0le s0trin0g.0"
--- Iteration 2 --
-string(28) "This1 is 1simp1le s1trin1g.1"
--- Iteration 3 --
-string(52) "This12345 is 12345simp12345le s12345trin12345g.12345"
--- Iteration 4 --
-string(52) "This-2345 is -2345simp-2345le s-2345trin-2345g.-2345"
--- Iteration 5 --
-string(46) "This10.5 is 10.5simp10.5le s10.5trin10.5g.10.5"
--- Iteration 6 --
-string(52) "This-10.5 is -10.5simp-10.5le s-10.5trin-10.5g.-10.5"
--- Iteration 7 --
-string(94) "This105000000000 is 105000000000simp105000000000le s105000000000trin105000000000g.105000000000"
--- Iteration 8 --
-string(64) "This1.06E-9 is 1.06E-9simp1.06E-9le s1.06E-9trin1.06E-9g.1.06E-9"
--- Iteration 9 --
-string(40) "This0.5 is 0.5simp0.5le s0.5trin0.5g.0.5"
--- Iteration 10 --
-
-Notice: Array to string conversion in %s on line %d
-string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
--- Iteration 11 --
-
-Notice: Array to string conversion in %s on line %d
-string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
--- Iteration 12 --
-
-Notice: Array to string conversion in %s on line %d
-string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
--- Iteration 13 --
-
-Notice: Array to string conversion in %s on line %d
-string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
--- Iteration 14 --
-
-Notice: Array to string conversion in %s on line %d
-string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
--- Iteration 15 --
-string(22) "This is simple string."
--- Iteration 16 --
-string(22) "This is simple string."
--- Iteration 17 --
-string(28) "This1 is 1simp1le s1trin1g.1"
--- Iteration 18 --
-string(22) "This is simple string."
--- Iteration 19 --
-string(28) "This1 is 1simp1le s1trin1g.1"
--- Iteration 20 --
-string(22) "This is simple string."
--- Iteration 21 --
-string(22) "This is simple string."
--- Iteration 22 --
-string(22) "This is simple string."
--- Iteration 23 --
-string(58) "Thisobject is objectsimpobjectle sobjecttrinobjectg.object"
--- Iteration 24 --
-string(22) "This is simple string."
--- Iteration 25 --
-string(22) "This is simple string."
--- Iteration 26 --
-string(%d) "ThisResource id #%d is Resource id #%dsimpResource id #%dle sResource id #%dtrinResource id #%dg.Resource id #%d"
-Done
+--TEST--
+Test chunk_split() function : usage variations - unexpected values for 'ending' argument
+--FILE--
+<?php
+/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]])
+ * Description: Returns split line
+ * Source code: ext/standard/string.c
+ * Alias to functions: none
+*/
+
+echo "*** Testing chunk_split() : unexpected values for 'ending' ***\n";
+
+// Initializing variables
+$str = 'This is simple string.';
+$chunklen = 4.9;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//resource variable
+$fp = fopen(__FILE__,'r');
+
+//Class to get object variable
+class MyClass
+{
+ public function __toString()
+ {
+ return "object";
+ }
+}
+
+//different values for 'ending'
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.123456e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new MyClass(),
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+ @$unset_var,
+
+ // resource data
+ $fp
+);
+
+// loop through each element of values for 'ending'
+for($count = 0; $count < count($values); $count++) {
+ echo "-- Iteration ".($count+1)." --\n";
+ var_dump( chunk_split($str, $chunklen, $values[$count]) );
+}
+
+echo "Done";
+
+//closing resource
+fclose($fp);
+?>
+--EXPECTF--
+*** Testing chunk_split() : unexpected values for 'ending' ***
+-- Iteration 1 --
+string(28) "This0 is 0simp0le s0trin0g.0"
+-- Iteration 2 --
+string(28) "This1 is 1simp1le s1trin1g.1"
+-- Iteration 3 --
+string(52) "This12345 is 12345simp12345le s12345trin12345g.12345"
+-- Iteration 4 --
+string(52) "This-2345 is -2345simp-2345le s-2345trin-2345g.-2345"
+-- Iteration 5 --
+string(46) "This10.5 is 10.5simp10.5le s10.5trin10.5g.10.5"
+-- Iteration 6 --
+string(52) "This-10.5 is -10.5simp-10.5le s-10.5trin-10.5g.-10.5"
+-- Iteration 7 --
+string(94) "This101234560000 is 101234560000simp101234560000le s101234560000trin101234560000g.101234560000"
+-- Iteration 8 --
+string(100) "This1.07654321E-9 is 1.07654321E-9simp1.07654321E-9le s1.07654321E-9trin1.07654321E-9g.1.07654321E-9"
+-- Iteration 9 --
+string(40) "This0.5 is 0.5simp0.5le s0.5trin0.5g.0.5"
+-- Iteration 10 --
+
+Notice: Array to string conversion in %s on line %d
+string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
+-- Iteration 11 --
+
+Notice: Array to string conversion in %s on line %d
+string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
+-- Iteration 12 --
+
+Notice: Array to string conversion in %s on line %d
+string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
+-- Iteration 13 --
+
+Notice: Array to string conversion in %s on line %d
+string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
+-- Iteration 14 --
+
+Notice: Array to string conversion in %s on line %d
+string(52) "ThisArray is ArraysimpArrayle sArraytrinArrayg.Array"
+-- Iteration 15 --
+string(22) "This is simple string."
+-- Iteration 16 --
+string(22) "This is simple string."
+-- Iteration 17 --
+string(28) "This1 is 1simp1le s1trin1g.1"
+-- Iteration 18 --
+string(22) "This is simple string."
+-- Iteration 19 --
+string(28) "This1 is 1simp1le s1trin1g.1"
+-- Iteration 20 --
+string(22) "This is simple string."
+-- Iteration 21 --
+string(22) "This is simple string."
+-- Iteration 22 --
+string(22) "This is simple string."
+-- Iteration 23 --
+string(58) "Thisobject is objectsimpobjectle sobjecttrinobjectg.object"
+-- Iteration 24 --
+string(22) "This is simple string."
+-- Iteration 25 --
+string(22) "This is simple string."
+-- Iteration 26 --
+string(%d) "ThisResource id #%d is Resource id #%dsimpResource id #%dle sResource id #%dtrinResource id #%dg.Resource id #%d"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/crc32_variation1.phpt b/ext/standard/tests/strings/crc32_variation1.phpt
index de7ca5d25..ef0729c21 100644
--- a/ext/standard/tests/strings/crc32_variation1.phpt
+++ b/ext/standard/tests/strings/crc32_variation1.phpt
@@ -1,196 +1,197 @@
---TEST--
-Test crc32() function : usage variations - unexpected values
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4)
- die("skip this test is for 32bit platform only");
-?>
-
---FILE--
-<?php
-/* Prototype : string crc32(string $str)
- * Description: Calculate the crc32 polynomial of a string
- * Source code: ext/standard/crc32.c
- * Alias to functions: none
-*/
-
-/*
- * Testing crc32() : with unexpected values for str argument
-*/
-
-echo "*** Testing crc32() : with unexpected values for str argument ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for str
-
-$count = 1;
-foreach($values as $value) {
- echo "\n-- Iteration $count --\n";
- var_dump( crc32($value) );
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing crc32() : with unexpected values for str argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration 1 --
-int(-186917087)
-
--- Iteration 1 --
-int(-2082672713)
-
--- Iteration 1 --
-int(-873121252)
-
--- Iteration 1 --
-int(1860518047)
-
--- Iteration 1 --
-int(269248583)
-
--- Iteration 1 --
-int(-834950157)
-
--- Iteration 1 --
-int(-638440228)
-
--- Iteration 1 --
-int(-742287383)
-
--- Iteration 1 --
-int(-2036403827)
-
--- Iteration 1 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 1 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 1 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 1 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 1 --
-
-Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 1 --
-int(0)
-
--- Iteration 1 --
-int(0)
-
--- Iteration 1 --
-int(-2082672713)
-
--- Iteration 1 --
-int(0)
-
--- Iteration 1 --
-int(-2082672713)
-
--- Iteration 1 --
-int(0)
-
--- Iteration 1 --
-int(0)
-
--- Iteration 1 --
-int(0)
-
--- Iteration 1 --
-int(-1465013268)
-
--- Iteration 1 --
-int(0)
-
--- Iteration 1 --
-int(0)
-
--- Iteration 1 --
-
-Warning: crc32() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
+--TEST--
+Test crc32() function : usage variations - unexpected values
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4)
+ die("skip this test is for 32bit platform only");
+?>
+
+--FILE--
+<?php
+/* Prototype : string crc32(string $str)
+ * Description: Calculate the crc32 polynomial of a string
+ * Source code: ext/standard/crc32.c
+ * Alias to functions: none
+*/
+
+/*
+ * Testing crc32() : with unexpected values for str argument
+*/
+
+echo "*** Testing crc32() : with unexpected values for str argument ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// declaring class
+class sample {
+ public function __toString() {
+ return "object";
+ }
+}
+
+// creating a file resource
+$file_handle = fopen(__FILE__, 'r');
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new sample(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // resource
+ $file_handle
+);
+
+// loop through each element of the array for str
+
+$count = 1;
+foreach($values as $value) {
+ echo "\n-- Iteration $count --\n";
+ var_dump( crc32($value) );
+ $count++;
+};
+
+// closing the resource
+fclose($file_handle);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing crc32() : with unexpected values for str argument ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+-- Iteration 1 --
+int(-186917087)
+
+-- Iteration 2 --
+int(-2082672713)
+
+-- Iteration 3 --
+int(-873121252)
+
+-- Iteration 4 --
+int(1860518047)
+
+-- Iteration 5 --
+int(269248583)
+
+-- Iteration 6 --
+int(-834950157)
+
+-- Iteration 7 --
+int(-965354630)
+
+-- Iteration 8 --
+int(1376932222)
+
+-- Iteration 9 --
+int(-2036403827)
+
+-- Iteration 10 --
+
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 11 --
+
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 12 --
+
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 13 --
+
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 14 --
+
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration 15 --
+int(0)
+
+-- Iteration 16 --
+int(0)
+
+-- Iteration 17 --
+int(-2082672713)
+
+-- Iteration 18 --
+int(0)
+
+-- Iteration 19 --
+int(-2082672713)
+
+-- Iteration 20 --
+int(0)
+
+-- Iteration 21 --
+int(0)
+
+-- Iteration 22 --
+int(0)
+
+-- Iteration 23 --
+int(-1465013268)
+
+-- Iteration 24 --
+int(0)
+
+-- Iteration 25 --
+int(0)
+
+-- Iteration 26 --
+
+Warning: crc32() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/explode.phpt b/ext/standard/tests/strings/explode.phpt
index defb79c22..6d54b6609 100644
--- a/ext/standard/tests/strings/explode.phpt
+++ b/ext/standard/tests/strings/explode.phpt
@@ -5,6 +5,7 @@ error_reporting=2047
--FILE--
<?php
/* From http://bugs.php.net/19865 */
+echo var_export(explode("\1", "a". chr(1). "b". chr(0). "d" . chr(1) . "f" . chr(1). "1" . chr(1) . "d"), TRUE);
echo md5(var_export(explode("\1", "a". chr(1). "b". chr(0). "d" . chr(1) . "f" . chr(1). "1" . chr(1) . "d"), TRUE));
echo "\n";
var_dump(@explode("", ""));
@@ -29,7 +30,13 @@ var_dump(explode(":^:","a lazy dog:^:jumps::over:^:",-1));
var_dump(explode(":^:","a lazy dog:^:jumps::over:^:",-2));
?>
--EXPECTF--
-6e5d59d5afd6693547a733219d079658
+array (
+ 0 => 'a',
+ 1 => 'b' . "\0" . 'd',
+ 2 => 'f',
+ 3 => '1',
+ 4 => 'd',
+)d6bee42a771449205344c0938ad4f035
bool(false)
bool(false)
bool(false)
diff --git a/ext/standard/tests/strings/join_variation1.phpt b/ext/standard/tests/strings/join_variation1.phpt
index a42c543b5..4cebcf2fe 100644
--- a/ext/standard/tests/strings/join_variation1.phpt
+++ b/ext/standard/tests/strings/join_variation1.phpt
@@ -1,167 +1,167 @@
---TEST--
-Test join() function : usage variations - unexpected values for 'glue' argument
---FILE--
-<?php
-/* Prototype : string join( string $glue, array $pieces )
- * Description: Join array elements with a string
- * Source code: ext/standard/string.c
- * Alias of function: implode()
-*/
-
-/*
- * testing join() by passing different unexpected value for glue argument
-*/
-
-echo "*** Testing join() : usage variations ***\n";
-// initialize all required variables
-$pieces = array("element1", "element2");
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// define a class
-class test
-{
- var $t = 10;
- function __toString() {
- return "testObject";
- }
-}
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new test(),
-
- // empty string
- "",
- '',
-
- // null vlaues
- NULL,
- null,
-
- // resource variable
- $fp,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-
-// loop through each element of the array and check the working of join()
-// when $glue arugment is supplied with different values
-echo "\n--- Testing join() by supplying different values for 'glue' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $glue = $values [$index];
-
- var_dump( join($glue, $pieces) );
-
- $counter ++;
-}
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing join() : usage variations ***
-
---- Testing join() by supplying different values for 'glue' argument ---
--- Iteration 1 --
-string(17) "element10element2"
--- Iteration 2 --
-string(17) "element11element2"
--- Iteration 3 --
-string(21) "element112345element2"
--- Iteration 4 --
-string(21) "element1-2345element2"
--- Iteration 5 --
-string(20) "element110.5element2"
--- Iteration 6 --
-string(21) "element1-10.5element2"
--- Iteration 7 --
-string(28) "element1105000000000element2"
--- Iteration 8 --
-string(23) "element11.06E-9element2"
--- Iteration 9 --
-string(19) "element10.5element2"
--- Iteration 10 --
-
-Notice: Array to string conversion in %s on line %d
-string(0) ""
--- Iteration 11 --
-
-Notice: Array to string conversion in %s on line %d
-string(1) "0"
--- Iteration 12 --
-
-Notice: Array to string conversion in %s on line %d
-string(1) "1"
--- Iteration 13 --
-
-Notice: Array to string conversion in %s on line %d
-string(7) "1Array2"
--- Iteration 14 --
-
-Notice: Array to string conversion in %s on line %d
-string(11) "redArraypen"
--- Iteration 15 --
-string(17) "element11element2"
--- Iteration 16 --
-string(16) "element1element2"
--- Iteration 17 --
-string(17) "element11element2"
--- Iteration 18 --
-string(16) "element1element2"
--- Iteration 19 --
-string(26) "element1testObjectelement2"
--- Iteration 20 --
-string(16) "element1element2"
--- Iteration 21 --
-string(16) "element1element2"
--- Iteration 22 --
-string(16) "element1element2"
--- Iteration 23 --
-string(16) "element1element2"
--- Iteration 24 --
-string(%d) "element1Resource id #%delement2"
--- Iteration 25 --
-string(16) "element1element2"
--- Iteration 26 --
-string(16) "element1element2"
-Done
+--TEST--
+Test join() function : usage variations - unexpected values for 'glue' argument
+--FILE--
+<?php
+/* Prototype : string join( string $glue, array $pieces )
+ * Description: Join array elements with a string
+ * Source code: ext/standard/string.c
+ * Alias of function: implode()
+*/
+
+/*
+ * testing join() by passing different unexpected value for glue argument
+*/
+
+echo "*** Testing join() : usage variations ***\n";
+// initialize all required variables
+$pieces = array("element1", "element2");
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, "r");
+
+// define a class
+class test
+{
+ var $t = 10;
+ function __toString() {
+ return "testObject";
+ }
+}
+
+// array with different values
+$values = array (
+
+ // integer values
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float values
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array values
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // boolean values
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // objects
+ new test(),
+
+ // empty string
+ "",
+ '',
+
+ // null vlaues
+ NULL,
+ null,
+
+ // resource variable
+ $fp,
+
+ // undefined variable
+ @$undefined_var,
+
+ // unset variable
+ @$unset_var
+);
+
+
+// loop through each element of the array and check the working of join()
+// when $glue arugment is supplied with different values
+echo "\n--- Testing join() by supplying different values for 'glue' argument ---\n";
+$counter = 1;
+for($index = 0; $index < count($values); $index ++) {
+ echo "-- Iteration $counter --\n";
+ $glue = $values [$index];
+
+ var_dump( join($glue, $pieces) );
+
+ $counter ++;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing join() : usage variations ***
+
+--- Testing join() by supplying different values for 'glue' argument ---
+-- Iteration 1 --
+string(17) "element10element2"
+-- Iteration 2 --
+string(17) "element11element2"
+-- Iteration 3 --
+string(21) "element112345element2"
+-- Iteration 4 --
+string(21) "element1-2345element2"
+-- Iteration 5 --
+string(20) "element110.5element2"
+-- Iteration 6 --
+string(21) "element1-10.5element2"
+-- Iteration 7 --
+string(28) "element1101234567000element2"
+-- Iteration 8 --
+string(29) "element11.07654321E-9element2"
+-- Iteration 9 --
+string(19) "element10.5element2"
+-- Iteration 10 --
+
+Notice: Array to string conversion in %s on line %d
+string(0) ""
+-- Iteration 11 --
+
+Notice: Array to string conversion in %s on line %d
+string(1) "0"
+-- Iteration 12 --
+
+Notice: Array to string conversion in %s on line %d
+string(1) "1"
+-- Iteration 13 --
+
+Notice: Array to string conversion in %s on line %d
+string(7) "1Array2"
+-- Iteration 14 --
+
+Notice: Array to string conversion in %s on line %d
+string(11) "redArraypen"
+-- Iteration 15 --
+string(17) "element11element2"
+-- Iteration 16 --
+string(16) "element1element2"
+-- Iteration 17 --
+string(17) "element11element2"
+-- Iteration 18 --
+string(16) "element1element2"
+-- Iteration 19 --
+string(26) "element1testObjectelement2"
+-- Iteration 20 --
+string(16) "element1element2"
+-- Iteration 21 --
+string(16) "element1element2"
+-- Iteration 22 --
+string(16) "element1element2"
+-- Iteration 23 --
+string(16) "element1element2"
+-- Iteration 24 --
+string(%d) "element1Resource id #%delement2"
+-- Iteration 25 --
+string(16) "element1element2"
+-- Iteration 26 --
+string(16) "element1element2"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/setlocale_basic1.phpt b/ext/standard/tests/strings/setlocale_basic1.phpt
index 28bea0bf8..f75311175 100644
--- a/ext/standard/tests/strings/setlocale_basic1.phpt
+++ b/ext/standard/tests/strings/setlocale_basic1.phpt
@@ -47,8 +47,8 @@ echo "*** Testing setlocale() : basic functionality - set to a specific locale *
//set of locales to be used
$common_locales = array(
- "english_US"=> "en_US.utf8gfd",
- "english_AU" => "en_AU.utf8hgg",
+ "english_US"=> "en_US.utf8",
+ "english_AU" => "en_AU.utf8",
"korean_KR" => "ko_KR.utf8",
"Chinese_zh" => "zh_CN.utf8",
"germen_DE" => "de_DE.utf8",
diff --git a/ext/standard/tests/strings/setlocale_variation4.phpt b/ext/standard/tests/strings/setlocale_variation4.phpt
index 3968be102..4ab1db7ad 100644
--- a/ext/standard/tests/strings/setlocale_variation4.phpt
+++ b/ext/standard/tests/strings/setlocale_variation4.phpt
@@ -5,6 +5,9 @@ Test setlocale() function : usage variations - setting system locale as null
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
+if (setlocale(LC_ALL,'en_US.utf8') === false || setlocale(LC_ALL,'en_AU.utf8') === false) {
+ die('skip en_US.utf8/en_AU.utf8 locales not available');
+}
?>
--ENV--
LC_ALL=en_US.utf8;
diff --git a/ext/standard/tests/strings/setlocale_variation5.phpt b/ext/standard/tests/strings/setlocale_variation5.phpt
index d2c3cf08a..c8e947b09 100644
--- a/ext/standard/tests/strings/setlocale_variation5.phpt
+++ b/ext/standard/tests/strings/setlocale_variation5.phpt
@@ -5,6 +5,9 @@ Test setlocale() function : usage variations - Setting system locale as empty st
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
+if (setlocale(LC_ALL,'en_AU.utf8') === false || setlocale(LC_ALL,'en_US.utf8') === false) {
+ die('skip en_AU.utf8/en_US.utf8 locales not available');
+}
?>
--ENV--
LC_ALL=en_US.utf8;
diff --git a/ext/standard/tests/strings/sprintf_variation1.phpt b/ext/standard/tests/strings/sprintf_variation1.phpt
index a226bba7e..2a5bdfdec 100644
--- a/ext/standard/tests/strings/sprintf_variation1.phpt
+++ b/ext/standard/tests/strings/sprintf_variation1.phpt
@@ -44,8 +44,8 @@ $values = array(
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
@@ -139,14 +139,14 @@ string(5) "-10.5"
string(5) "-10.5"
-- Iteration 7 --
-string(12) "105000000000"
-string(12) "105000000000"
-string(12) "105000000000"
+string(12) "101234567000"
+string(12) "101234567000"
+string(12) "101234567000"
-- Iteration 8 --
-string(7) "1.06E-9"
-string(7) "1.06E-9"
-string(7) "1.06E-9"
+string(13) "1.07654321E-9"
+string(13) "1.07654321E-9"
+string(13) "1.07654321E-9"
-- Iteration 9 --
string(3) "0.5"
@@ -267,4 +267,4 @@ string(0) ""
string(%d) "Resource id #%d"
string(%d) "Resource id #%d"
string(%d) "Resource id #%d"
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/sprintf_variation11.phpt b/ext/standard/tests/strings/sprintf_variation11.phpt
index d15928dd9..31097d8dd 100644
--- a/ext/standard/tests/strings/sprintf_variation11.phpt
+++ b/ext/standard/tests/strings/sprintf_variation11.phpt
@@ -40,7 +40,7 @@ foreach($resource_values as $resource_value) {
// closing the resources
fclose($fp);
-fclose($dfp);
+closedir($dfp);
echo "Done";
?>
@@ -58,8 +58,8 @@ string(%d) " %d.000000"
string(%d) "
%d.000000"
string(%d) "%d.000000"
-string(%d) " %d.000000"
-string(4) "0-9]"
+string(%d) "%s%d.000000"
+string(%d) "0-9]"
string(1) "f"
-- Iteration 2 --
@@ -73,7 +73,7 @@ string(%d) " %d.000000"
string(%d) "
%d.000000"
string(%d) "%d.000000"
-string(%d) " %d.000000"
-string(4) "0-9]"
+string(%d) "%s%d.000000"
+string(%d) "0-9]"
string(1) "f"
Done
diff --git a/ext/standard/tests/strings/sprintf_variation16.phpt b/ext/standard/tests/strings/sprintf_variation16.phpt
index 523eb5fb9..57965315e 100644
--- a/ext/standard/tests/strings/sprintf_variation16.phpt
+++ b/ext/standard/tests/strings/sprintf_variation16.phpt
@@ -20,12 +20,12 @@ $float_values = array(
0.0,
-0.1,
1.0,
- 1e5,
- -1e6,
- 1E8,
- -1E9,
+ 1e3,
+ -1e2,
+ 1.23456E8,
+ -1.234567E9,
10.0000000000000000005,
- 10.5e+5
+ 10.123e+5
);
// array of string formats
@@ -187,62 +187,62 @@ string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 10 --
-string(6) "100000"
+string(4) "1000"
string(1) "s"
-string(6) "100000"
+string(4) "1000"
string(1) "s"
-string(7) " 100000"
-string(7) "100000 "
-string(7) " 100000"
-string(7) "
-100000"
-string(6) "100000"
-string(30) " 100000"
+string(5) " 1000"
+string(5) "1000 "
+string(5) " 1000"
+string(5) "
+1000"
+string(4) "1000"
+string(30) " 1000"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 11 --
-string(8) "-1000000"
+string(4) "-100"
string(1) "s"
-string(8) "-1000000"
+string(4) "-100"
string(1) "s"
-string(9) " -1000000"
-string(9) "-1000000 "
-string(9) " -1000000"
-string(9) "
--1000000"
-string(8) "-1000000"
-string(30) " -1000000"
+string(5) " -100"
+string(5) "-100 "
+string(5) " -100"
+string(5) "
+-100"
+string(4) "-100"
+string(30) " -100"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 12 --
-string(9) "100000000"
+string(9) "123456000"
string(1) "s"
-string(9) "100000000"
+string(9) "123456000"
string(1) "s"
-string(10) " 100000000"
-string(10) "100000000 "
-string(10) " 100000000"
+string(10) " 123456000"
+string(10) "123456000 "
+string(10) " 123456000"
string(10) "
-100000000"
-string(9) "100000000"
-string(30) " 100000000"
+123456000"
+string(9) "123456000"
+string(30) " 123456000"
string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 13 --
-string(11) "-1000000000"
+string(11) "-1234567000"
string(1) "s"
-string(11) "-1000000000"
+string(11) "-1234567000"
string(1) "s"
-string(12) " -1000000000"
-string(12) "-1000000000 "
-string(12) " -1000000000"
+string(12) " -1234567000"
+string(12) "-1234567000 "
+string(12) " -1234567000"
string(12) "
--1000000000"
-string(11) "-1000000000"
-string(30) " -1000000000"
+-1234567000"
+string(11) "-1234567000"
+string(30) " -1234567000"
string(10) "a-zA-Z0-9]"
string(1) "s"
@@ -262,17 +262,17 @@ string(10) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 15 --
-string(7) "1050000"
+string(7) "1012300"
string(1) "s"
-string(7) "1050000"
+string(7) "1012300"
string(1) "s"
-string(8) " 1050000"
-string(8) "1050000 "
-string(8) " 1050000"
+string(8) " 1012300"
+string(8) "1012300 "
+string(8) " 1012300"
string(8) "
-1050000"
-string(7) "1050000"
-string(30) " 1050000"
+1012300"
+string(7) "1012300"
+string(30) " 1012300"
string(10) "a-zA-Z0-9]"
string(1) "s"
-Done \ No newline at end of file
+Done
diff --git a/ext/standard/tests/strings/sprintf_variation17.phpt b/ext/standard/tests/strings/sprintf_variation17.phpt
index 08028f8fe..4d9cc6de9 100644
--- a/ext/standard/tests/strings/sprintf_variation17.phpt
+++ b/ext/standard/tests/strings/sprintf_variation17.phpt
@@ -39,7 +39,7 @@ foreach($resource_values as $resource_value) {
// closing the resources
fclose($fp);
-fclose($dfp);
+closedir($dfp);
echo "Done";
?>
@@ -57,8 +57,8 @@ string(%d) " Resource id #%d"
string(%d) "
Resource id #%d"
string(%d) "Resource id #%d"
-string(%d) " Resource id #%d"
-string(10) "a-zA-Z0-9]"
+string(%d) "%sResource id #%d"
+string(%d) "a-zA-Z0-9]"
string(1) "s"
-- Iteration 2 --
@@ -72,7 +72,7 @@ string(%d) " Resource id #%d"
string(%d) "
Resource id #%d"
string(%d) "Resource id #%d"
-string(%d) " Resource id #%d"
-string(10) "a-zA-Z0-9]"
+string(%d) "%sResource id #%d"
+string(%d) "a-zA-Z0-9]"
string(1) "s"
Done
diff --git a/ext/standard/tests/strings/sprintf_variation18.phpt b/ext/standard/tests/strings/sprintf_variation18.phpt
index b0013a4e9..960bcd0e7 100644
--- a/ext/standard/tests/strings/sprintf_variation18.phpt
+++ b/ext/standard/tests/strings/sprintf_variation18.phpt
@@ -7,6 +7,8 @@ Test sprintf() function : usage variations - string formats with array values
* Source code: ext/standard/formatted_print.c
*/
+error_reporting(E_ALL & ~E_NOTICE);
+
echo "*** Testing sprintf() : string formats with array values ***\n";
// different arrays used to test he function
diff --git a/ext/standard/tests/strings/sprintf_variation2.phpt b/ext/standard/tests/strings/sprintf_variation2.phpt
index fcd3f2123..a663df444 100644
--- a/ext/standard/tests/strings/sprintf_variation2.phpt
+++ b/ext/standard/tests/strings/sprintf_variation2.phpt
@@ -7,6 +7,8 @@ Test sprintf() function : usage variations - with all types of values for arg1 a
* Source code: ext/standard/formatted_print.c
*/
+error_reporting(E_ALL & ~E_NOTICE);
+
echo "*** Testing sprintf() : with different types of values passed for arg1 argument ***\n";
// initialing required variables
@@ -40,8 +42,8 @@ $values = array(
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
@@ -130,12 +132,12 @@ string(5) "-10.5"
string(5) "-10.5"
-- Iteration 7 --
-string(12) "105000000000"
-string(12) "105000000000"
+string(12) "101234567000"
+string(12) "101234567000"
-- Iteration 8 --
-string(7) "1.06E-9"
-string(7) "1.06E-9"
+string(13) "1.07654321E-9"
+string(13) "1.07654321E-9"
-- Iteration 9 --
string(3) "0.5"
@@ -216,4 +218,4 @@ string(0) ""
-- Iteration 28 --
string(%d) "Resource id #%d"
string(%d) "Resource id #%d"
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/sprintf_variation30.phpt b/ext/standard/tests/strings/sprintf_variation30.phpt
index 57c5abbd8..cc80d7bb4 100644
--- a/ext/standard/tests/strings/sprintf_variation30.phpt
+++ b/ext/standard/tests/strings/sprintf_variation30.phpt
@@ -39,7 +39,7 @@ foreach($resource_values as $resource_value) {
// closing the resources
fclose($fp);
-fclose($dfp);
+closedir($dfp);
echo "Done";
?>
@@ -56,9 +56,9 @@ string(%d) "%d "
string(%d) " %d"
string(%d) "
%d"
-string(%d) " %d"
-string(%d) " %d"
-string(4) "0-7]"
+string(%d) "%s%d"
+string(%d) "%s%d"
+string(%d) "0-7]"
string(1) "o"
-- Iteration 2 --
@@ -71,8 +71,8 @@ string(%d) "%d "
string(%d) " %d"
string(%d) "
%d"
-string(%d) " %d"
-string(%d) " %d"
-string(4) "0-7]"
+string(%d) "%s%d"
+string(%d) "%s%d"
+string(%d) "0-7]"
string(1) "o"
Done
diff --git a/ext/standard/tests/strings/sprintf_variation42.phpt b/ext/standard/tests/strings/sprintf_variation42.phpt
index a1c01ff6b..3c5bd1f1b 100644
--- a/ext/standard/tests/strings/sprintf_variation42.phpt
+++ b/ext/standard/tests/strings/sprintf_variation42.phpt
@@ -40,7 +40,7 @@ foreach($resource_values as $resource_value) {
// closing the resources
fclose($fp);
-fclose($dfp);
+closedir($dfp);
echo "Done";
?>
@@ -57,9 +57,9 @@ string(%d) "%d "
string(%d) " %d"
string(%d) "
%d"
-string(%d) " %d"
-string(%d) " %d"
-string(4) "0-9]"
+string(%d) "%s%d"
+string(%d) "%s%d"
+string(%d) "0-9]"
string(1) "u"
-- Iteration 2 --
@@ -72,8 +72,8 @@ string(%d) "%d "
string(%d) " %d"
string(%d) "
%d"
-string(%d) " %d"
-string(%d) " %d"
-string(4) "0-9]"
+string(%d) "%s%d"
+string(%d) "%s%d"
+string(%d) "0-9]"
string(1) "u"
Done
diff --git a/ext/standard/tests/strings/sprintf_variation48.phpt b/ext/standard/tests/strings/sprintf_variation48.phpt
index df28784eb..ce7bdf8ae 100644
--- a/ext/standard/tests/strings/sprintf_variation48.phpt
+++ b/ext/standard/tests/strings/sprintf_variation48.phpt
@@ -39,7 +39,7 @@ foreach($resource_values as $resource_value) {
// closing the resources
fclose($fp);
-fclose($dfp);
+closedir($dfp);
echo "Done";
@@ -48,32 +48,32 @@ echo "Done";
*** Testing sprintf() : scientific formats with resource values ***
-- Iteration 1 --
-string(%d) "%d.000000e+0"
+string(%d) "%f"
string(1) "e"
-string(%d) "%d.000000e+0"
+string(%d) "%f"
string(1) "e"
-string(%d) " %d.000000e+0"
-string(%d) "%d.000000e+0 "
-string(%d) " %d.000000e+0"
+string(%d) " %f"
+string(%d) "%f "
+string(%d) " %f"
string(%d) "
-%d.000000e+0"
-string(%d) "%d.000000e+0"
-string(%d) " %d.000000e+0"
-string(4) "0-1]"
+%f"
+string(%d) "%f"
+string(%d) "%s%f"
+string(%d) "0-1]"
string(1) "e"
-- Iteration 2 --
-string(%d) "%d.000000e+0"
+string(%d) "%f"
string(1) "e"
-string(%d) "%d.000000e+0"
+string(%d) "%f"
string(1) "e"
-string(%d) " %d.000000e+0"
-string(%d) "%d.000000e+0 "
-string(%d) " %d.000000e+0"
+string(%d) " %f"
+string(%d) "%f "
+string(%d) " %f"
string(%d) "
-%d.000000e+0"
-string(%d) "%d.000000e+0"
-string(%d) " %d.000000e+0"
-string(4) "0-1]"
+%f"
+string(%d) "%f"
+string(%d) "%s%f"
+string(%d) "0-1]"
string(1) "e"
Done
diff --git a/ext/standard/tests/strings/sprintf_variation5.phpt b/ext/standard/tests/strings/sprintf_variation5.phpt
index b703d749f..ee13d3d64 100644
--- a/ext/standard/tests/strings/sprintf_variation5.phpt
+++ b/ext/standard/tests/strings/sprintf_variation5.phpt
@@ -12,11 +12,14 @@ echo "*** Testing sprintf() : integer formats with resource values ***\n";
// resource type variable
$fp = fopen (__FILE__, "r");
$dfp = opendir ( dirname(__FILE__) );
+
+$fp_copy = $fp;
+$dfp_copy = $dfp;
// array of resource types
$resource_types = array (
- $fp,
- $dfp
+ $fp_copy,
+ $dfp_copy
);
// various integer formats
@@ -38,7 +41,7 @@ foreach($resource_types as $res) {
// closing the resources
fclose($fp);
-fclose($dfp);
+closedir($dfp);
echo "Done";
@@ -53,8 +56,8 @@ string(%d) " %d"
string(%d) " %d"
string(%d) "
%d"
-string(%d) " %d"
-string(4) "0-9]"
+string(%d) "%s%d"
+string(%d) "0-9]"
string(1) "d"
-- Iteration 2 --
@@ -64,7 +67,7 @@ string(%d) " %d"
string(%d) " %d"
string(%d) "
%d"
-string(%d) " %d"
-string(4) "0-9]"
+string(%d) "%s%d"
+string(%d) "0-9]"
string(1) "d"
Done
diff --git a/ext/standard/tests/strings/str_replace.phpt b/ext/standard/tests/strings/str_replace.phpt
index ae71aaaf5..2408c82f0 100644
--- a/ext/standard/tests/strings/str_replace.phpt
+++ b/ext/standard/tests/strings/str_replace.phpt
@@ -27,8 +27,10 @@ var_dump( str_replace("long string here", "", "", $count) );
var_dump( $count );
$fp = fopen( __FILE__, "r" );
-var_dump( str_replace($fp, $fp, $fp, $fp) );
-var_dump( $fp );
+$fp_copy = $fp;
+var_dump( str_replace($fp_copy, $fp_copy, $fp_copy, $fp_copy) );
+var_dump( $fp_copy );
+fclose($fp);
echo "\n*** Testing str_replace() with various search values ***";
$search_arr = array( TRUE, FALSE, 1, 0, -1, "1", "0", "-1", NULL,
@@ -230,12 +232,9 @@ var_dump( str_replace(NULL) );
var_dump( str_replace(1, 2) );
var_dump( str_replace(1,2,3,$var,5) );
-echo "Done\n";
-
---CLEAN--
-fclose($fp);
fclose($resource1);
closedir($resource2);
+echo "Done\n";
?>
--EXPECTF--
@@ -248,7 +247,7 @@ string(1) "q"
int(1)
string(0) ""
int(0)
-string(14) "Resource id #5"
+string(%d) "Resource id #%d"
int(1)
*** Testing str_replace() with various search values ***
@@ -910,9 +909,9 @@ array(2) {
int(1)
-- Testing Resources --
-string(14) "Resource id #6"
+string(%d) "Resource id #%d"
int(0)
-string(14) "Resource id #7"
+string(%d) "Resource id #%d"
int(0)
-- Testing a longer and heredoc string --
diff --git a/ext/standard/tests/strings/strcspn_variation1.phpt b/ext/standard/tests/strings/strcspn_variation1.phpt
index f80e4615e..6a1c6d669 100644
--- a/ext/standard/tests/strings/strcspn_variation1.phpt
+++ b/ext/standard/tests/strings/strcspn_variation1.phpt
@@ -1,276 +1,273 @@
---TEST--
-Test strcspn() function : usage variations - unexpected values for str argument
---FILE--
-<?php
-/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters not found in mask.
- If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-
-/*
-* Testing strspn() : with different unexpected values for str argument
-*/
-
-echo "*** Testing strcspn() : with unexpected values for str argument ***\n";
-
-// Initialise function arguments not being substititued (if any)
-$mask = 'abons1234567890';
-$start = 1;
-$len = 10;
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\n-- Iteration with str value as \"$value\" \n";
- var_dump( strcspn($value,$mask) ); // with default args
- var_dump( strcspn($value,$mask,$start) ); // with default len value
- var_dump( strcspn($value,$mask,$start,$len) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strcspn() : with unexpected values for str argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with str value as "0"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "1"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "12345"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "-2345"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "10.5"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "-10.5"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "105000000000"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as "1.06E-9"
-int(0)
-int(1)
-int(1)
-
--- Iteration with str value as "0.5"
-int(0)
-int(1)
-int(1)
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "1"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "1"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "object"
-int(0)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "Resource id #%d"
-
-Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
+--TEST--
+Test strcspn() function : usage variations - unexpected values for str argument
+--FILE--
+<?php
+/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
+ * Description: Finds length of initial segment consisting entirely of characters not found in mask.
+ If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
+ * Source code: ext/standard/string.c
+ * Alias to functions: none
+*/
+
+error_reporting(E_ALL & ~E_NOTICE);
+
+/*
+* Testing strspn() : with different unexpected values for str argument
+*/
+
+echo "*** Testing strcspn() : with unexpected values for str argument ***\n";
+
+// Initialise function arguments not being substititued (if any)
+$mask = 'abons1234567890';
+$start = 1;
+$len = 10;
+
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// declaring class
+class sample {
+ public function __toString() {
+ return "object";
+ }
+}
+
+// creating a file resource
+$file_handle = fopen(__FILE__, 'r');
+
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new sample,
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // resource
+ $file_handle
+);
+
+// loop through each element of the array for str
+
+foreach($values as $value) {
+ echo "\n-- Iteration with str value as \"$value\"\n";
+ var_dump( strcspn($value,$mask) ); // with default args
+ var_dump( strcspn($value,$mask,$start) ); // with default len value
+ var_dump( strcspn($value,$mask,$start,$len) ); // with all args
+};
+
+// closing the resource
+fclose($file_handle);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing strcspn() : with unexpected values for str argument ***
+
+-- Iteration with str value as "0"
+int(0)
+int(0)
+int(0)
+
+-- Iteration with str value as "1"
+int(0)
+int(0)
+int(0)
+
+-- Iteration with str value as "12345"
+int(0)
+int(0)
+int(0)
+
+-- Iteration with str value as "-2345"
+int(1)
+int(0)
+int(0)
+
+-- Iteration with str value as "10.5"
+int(0)
+int(0)
+int(0)
+
+-- Iteration with str value as "-10.5"
+int(1)
+int(0)
+int(0)
+
+-- Iteration with str value as "101234567000"
+int(0)
+int(0)
+int(0)
+
+-- Iteration with str value as "1.07654321E-9"
+int(0)
+int(1)
+int(1)
+
+-- Iteration with str value as "0.5"
+int(0)
+int(1)
+int(1)
+
+-- Iteration with str value as "Array"
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as "Array"
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as "Array"
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as "Array"
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as "Array"
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as "1"
+int(0)
+int(0)
+int(0)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as "1"
+int(0)
+int(0)
+int(0)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as "object"
+int(0)
+int(0)
+int(0)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as "Resource id #%d"
+
+Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strcspn_variation2.phpt b/ext/standard/tests/strings/strcspn_variation2.phpt
index df79e9afd..0924e4598 100644
--- a/ext/standard/tests/strings/strcspn_variation2.phpt
+++ b/ext/standard/tests/strings/strcspn_variation2.phpt
@@ -1,274 +1,272 @@
---TEST--
-Test strcspn() function : usage variations - unexpected values for mask argument
---FILE--
-<?php
-/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters not found in mask.
- If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-/*
-* Testing strcspn() : with different unexpected values for mask argument
-*/
-
-echo "*** Testing strcspn() : with diferent unexpected values of mask argument ***\n";
-
-$str = 'string_val';
-$start = 1;
-$len = 10;
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for mask
-
-foreach($values as $value) {
- echo "\n-- Iteration with mask value as \"$value\" -- \n";
- var_dump( strcspn($str,$value) ); // with defalut args
- var_dump( strcspn($str,$value,$start) ); // with default len value
- var_dump( strcspn($str,$value,$start,$len) ); // with all args
-};
-
-// close the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strcspn() : with diferent unexpected values of mask argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with mask value as "0" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "1" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "12345" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "-2345" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "10.5" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "-10.5" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "105000000000" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "1.06E-9" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "0.5" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "Array" --
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
-NULL
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "1" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "1" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "object" --
-int(1)
-int(0)
-int(0)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "" --
-int(10)
-int(9)
-int(9)
-
--- Iteration with mask value as "Resource id #%d" --
-
-Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-Done
+--TEST--
+Test strcspn() function : usage variations - unexpected values for mask argument
+--FILE--
+<?php
+/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
+ * Description: Finds length of initial segment consisting entirely of characters not found in mask.
+ If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
+ * Source code: ext/standard/string.c
+ * Alias to functions: none
+*/
+
+error_reporting(E_ALL & ~E_NOTICE);
+
+/*
+* Testing strcspn() : with different unexpected values for mask argument
+*/
+
+echo "*** Testing strcspn() : with diferent unexpected values of mask argument ***\n";
+
+$str = 'string_val';
+$start = 1;
+$len = 10;
+
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// declaring class
+class sample {
+ public function __toString() {
+ return "object";
+ }
+}
+
+// creating a file resource
+$file_handle = fopen(__FILE__, 'r');
+
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new sample(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // resource
+ $file_handle
+);
+
+// loop through each element of the array for mask
+
+foreach($values as $value) {
+ echo "\n-- Iteration with mask value as \"$value\" --\n";
+ var_dump( strcspn($str,$value) ); // with defalut args
+ var_dump( strcspn($str,$value,$start) ); // with default len value
+ var_dump( strcspn($str,$value,$start,$len) ); // with all args
+};
+
+// close the resource
+fclose($file_handle);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing strcspn() : with diferent unexpected values of mask argument ***
+
+-- Iteration with mask value as "0" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "1" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "12345" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "-2345" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "10.5" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "-10.5" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "101234567000" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "1.07654321E-9" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "0.5" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "1" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "1" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "object" --
+int(1)
+int(0)
+int(0)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "Resource id #%d" --
+
+Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strcspn_variation3.phpt b/ext/standard/tests/strings/strcspn_variation3.phpt
index 869f46537..8b1923efd 100644
--- a/ext/standard/tests/strings/strcspn_variation3.phpt
+++ b/ext/standard/tests/strings/strcspn_variation3.phpt
@@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values of start argument
* Alias to functions: none
*/
+error_reporting(E_ALL & ~E_NOTICE);
+
/*
* Testing strcspn() : with unexpected values of start argument
*/
@@ -41,8 +43,8 @@ $values = array(
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e8,
+ 10.7654321E-8,
.5,
// array data
@@ -99,10 +101,6 @@ echo "Done"
--EXPECTF--
*** Testing strcspn() : with unexpected values of start argument ***
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-- Iteration with start value as "10.5" --
int(0)
int(0)
@@ -111,11 +109,11 @@ int(0)
int(0)
int(0)
--- Iteration with start value as "105000000000" --
+-- Iteration with start value as "1012345670" --
bool(false)
bool(false)
--- Iteration with start value as "1.06E-9" --
+-- Iteration with start value as "1.07654321E-7" --
int(0)
int(0)
@@ -242,4 +240,4 @@ NULL
Warning: strcspn() expects parameter 3 to be long, resource given in %s on line %d
NULL
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strcspn_variation4.phpt b/ext/standard/tests/strings/strcspn_variation4.phpt
index 6ea48219c..eabc0696e 100644
--- a/ext/standard/tests/strings/strcspn_variation4.phpt
+++ b/ext/standard/tests/strings/strcspn_variation4.phpt
@@ -1,198 +1,196 @@
---TEST--
-Test strcspn() function : usage variations - unexpected values of len argument
---FILE--
-<?php
-/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters not found in mask.
- If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-/*
-* Testing strcspn() : with unexpected values of len argument
-*/
-
-echo "*** Testing strcspn() : with unexpected values of len argument ***\n";
-
-// initialing required variables
-$str = 'string_val';
-$mask = 'soibtFTf1234567890';
-$start = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // object data
- new sample(),
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for start
-
-foreach($values as $value) {
- echo "\n-- Iteration with len value as \"$value\" --\n";
- var_dump( strcspn($str,$mask,$start,$value) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strcspn() : with unexpected values of len argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with len value as "10.5" --
-int(0)
-
--- Iteration with len value as "-10.5" --
-int(0)
-
--- Iteration with len value as "105000000000" --
-int(0)
-
--- Iteration with len value as "1.06E-9" --
-int(0)
-
--- Iteration with len value as "0.5" --
-int(0)
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
-NULL
-
--- Iteration with len value as "Array" --
-
-Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "1" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "1" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-
-Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-
-Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
-NULL
-
--- Iteration with len value as "string" --
-
-Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
-NULL
-
--- Iteration with len value as "string" --
-
-Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
-NULL
-
--- Iteration with len value as "object" --
-
-Warning: strcspn() expects parameter 4 to be long, object given in %s on line %d
-NULL
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "" --
-int(0)
-
--- Iteration with len value as "Resource id #%d" --
-
-Warning: strcspn() expects parameter 4 to be long, resource given in %s on line %d
-NULL
-Done
+--TEST--
+Test strcspn() function : usage variations - unexpected values of len argument
+--FILE--
+<?php
+/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]])
+ * Description: Finds length of initial segment consisting entirely of characters not found in mask.
+ If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars)
+ * Source code: ext/standard/string.c
+ * Alias to functions: none
+*/
+
+error_reporting(E_ALL & ~E_NOTICE);
+
+/*
+* Testing strcspn() : with unexpected values of len argument
+*/
+
+echo "*** Testing strcspn() : with unexpected values of len argument ***\n";
+
+// initialing required variables
+$str = 'string_val';
+$mask = 'soibtFTf1234567890';
+$start = 0;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// declaring class
+class sample {
+ public function __toString() {
+ return "object";
+ }
+}
+
+// creating a file resource
+$file_handle = fopen(__FILE__, 'r');
+
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new sample(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // resource
+ $file_handle
+);
+
+// loop through each element of the array for start
+
+foreach($values as $value) {
+ echo "\n-- Iteration with len value as \"$value\" --\n";
+ var_dump( strcspn($str,$mask,$start,$value) ); // with all args
+};
+
+// closing the resource
+fclose($file_handle);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing strcspn() : with unexpected values of len argument ***
+
+-- Iteration with len value as "10.5" --
+int(0)
+
+-- Iteration with len value as "-10.5" --
+int(0)
+
+-- Iteration with len value as "101234567000" --
+int(0)
+
+-- Iteration with len value as "1.07654321E-9" --
+int(0)
+
+-- Iteration with len value as "0.5" --
+int(0)
+
+-- Iteration with len value as "Array" --
+
+Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+NULL
+
+-- Iteration with len value as "Array" --
+
+Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+NULL
+
+-- Iteration with len value as "Array" --
+
+Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+NULL
+
+-- Iteration with len value as "Array" --
+
+Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+NULL
+
+-- Iteration with len value as "Array" --
+
+Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
+NULL
+
+-- Iteration with len value as "" --
+int(0)
+
+-- Iteration with len value as "" --
+int(0)
+
+-- Iteration with len value as "1" --
+int(0)
+
+-- Iteration with len value as "" --
+int(0)
+
+-- Iteration with len value as "1" --
+int(0)
+
+-- Iteration with len value as "" --
+int(0)
+
+-- Iteration with len value as "" --
+
+Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
+NULL
+
+-- Iteration with len value as "" --
+
+Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
+NULL
+
+-- Iteration with len value as "string" --
+
+Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
+NULL
+
+-- Iteration with len value as "string" --
+
+Warning: strcspn() expects parameter 4 to be long, string given in %s on line %d
+NULL
+
+-- Iteration with len value as "object" --
+
+Warning: strcspn() expects parameter 4 to be long, object given in %s on line %d
+NULL
+
+-- Iteration with len value as "" --
+int(0)
+
+-- Iteration with len value as "" --
+int(0)
+
+-- Iteration with len value as "Resource id #%d" --
+
+Warning: strcspn() expects parameter 4 to be long, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/stripos_variation10.phpt b/ext/standard/tests/strings/stripos_variation10.phpt
index efdbb5238..963545cf2 100644
--- a/ext/standard/tests/strings/stripos_variation10.phpt
+++ b/ext/standard/tests/strings/stripos_variation10.phpt
@@ -41,8 +41,8 @@ $needles = array (
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
@@ -182,7 +182,7 @@ bool(false)
-- Iteration 24 --
Warning: stripos(): needle is not a string or an integer in %s on line %d
-bool(false)
+%s
-- Iteration 25 --
diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt
index e64468135..566ef6c75 100644
--- a/ext/standard/tests/strings/strpos.phpt
+++ b/ext/standard/tests/strings/strpos.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strpos_number.phpt b/ext/standard/tests/strings/strpos_number.phpt
new file mode 100644
index 000000000..73da09500
--- /dev/null
+++ b/ext/standard/tests/strings/strpos_number.phpt
@@ -0,0 +1,15 @@
+--TEST--
+strpos() matching numbers
+--FILE--
+<?php
+// Integer is handles as an octal representation, so nothing to match
+var_dump(strpos("foo 11", 11));
+// int(111) is string("o") in octal. Match expected
+var_dump(strpos("foo bar", 111));
+// string("11") is contained
+var_dump(strpos("foo 11", "11"));
+?>
+--EXPECT--
+bool(false)
+int(1)
+int(4)
diff --git a/ext/standard/tests/strings/strrchr_variation10.phpt b/ext/standard/tests/strings/strrchr_variation10.phpt
index 5de3b22ff..c807dd449 100644
--- a/ext/standard/tests/strings/strrchr_variation10.phpt
+++ b/ext/standard/tests/strings/strrchr_variation10.phpt
@@ -79,8 +79,8 @@ $needles = array (
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
@@ -180,7 +180,7 @@ bool(false)
-- Iteration 23 --
bool(false)
-- Iteration 24 --
-bool(false)
+%s
-- Iteration 25 --
bool(false)
-- Iteration 26 --
diff --git a/ext/standard/tests/strings/strrchr_variation11.phpt b/ext/standard/tests/strings/strrchr_variation11.phpt
index d04710d7d..a179c4089 100644
--- a/ext/standard/tests/strings/strrchr_variation11.phpt
+++ b/ext/standard/tests/strings/strrchr_variation11.phpt
@@ -37,8 +37,8 @@ $values = array (
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
@@ -80,8 +80,6 @@ $values = array (
$counter = 1;
for($index = 0; $index < count($values); $index ++) {
echo "-- Iteration $counter --\n";
- $haystack = $values[$index];
-
var_dump( strrchr($values[$index], $values[$index]) );
$counter ++;
}
@@ -151,7 +149,7 @@ bool(false)
-- Iteration 23 --
bool(false)
-- Iteration 24 --
-bool(false)
+%s
-- Iteration 25 --
bool(false)
-- Iteration 26 --
diff --git a/ext/standard/tests/strings/strrpos_variation10.phpt b/ext/standard/tests/strings/strrpos_variation10.phpt
index abdc5e2f4..f3adb3ee9 100644
--- a/ext/standard/tests/strings/strrpos_variation10.phpt
+++ b/ext/standard/tests/strings/strrpos_variation10.phpt
@@ -41,8 +41,8 @@ $needles = array (
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
@@ -142,7 +142,7 @@ bool(false)
-- Iteration 23 --
bool(false)
-- Iteration 24 --
-bool(false)
+%s
-- Iteration 25 --
bool(false)
-- Iteration 26 --
diff --git a/ext/standard/tests/strings/strspn_variation1.phpt b/ext/standard/tests/strings/strspn_variation1.phpt
index 513046b62..e8fd9d3ac 100644
--- a/ext/standard/tests/strings/strspn_variation1.phpt
+++ b/ext/standard/tests/strings/strspn_variation1.phpt
@@ -1,275 +1,273 @@
---TEST--
-Test strspn() function : usage variations - unexpected values for str argument
---FILE--
-<?php
-/* Prototype : proto int strspn(string str, string mask [, int start [, int len]])
- * Description: Finds length of initial segment consisting entirely of characters found in mask.
- If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)
- * Source code: ext/standard/string.c
- * Alias to functions: none
-*/
-
-/*
-* Testing strspn() : with different unexpected values for str argument
-*/
-
-echo "*** Testing strspn() : with unexpected values for str argument ***\n";
-
-// Initialise function arguments not being substititued (if any)
-$mask = 'abons1234567890';
-$start = 1;
-$len = 10;
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample {
- public function __toString() {
- return "object";
- }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
- // int data
- 0,
- 1,
- 12345,
- -2345,
-
- // float data
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // object data
- new sample,
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // resource
- $file_handle
-);
-
-// loop through each element of the array for str
-
-foreach($values as $value) {
- echo "\n-- Iteration with str value as \"$value\" \n";
- var_dump( strspn($value,$mask) ); // with default args
- var_dump( strspn($value,$mask,$start) ); // with default len value
- var_dump( strspn($value,$mask,$start,$len) ); // with all args
-};
-
-// closing the resource
-fclose($file_handle);
-
-echo "Done"
-?>
---EXPECTF--
-*** Testing strspn() : with unexpected values for str argument ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with str value as "0"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "1"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "12345"
-int(5)
-int(4)
-int(4)
-
--- Iteration with str value as "-2345"
-int(0)
-int(4)
-int(4)
-
--- Iteration with str value as "10.5"
-int(2)
-int(1)
-int(1)
-
--- Iteration with str value as "-10.5"
-int(0)
-int(2)
-int(2)
-
--- Iteration with str value as "105000000000"
-int(12)
-int(11)
-int(10)
-
--- Iteration with str value as "1.06E-9"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "0.5"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as "Array"
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "1"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "1"
-int(1)
-int(0)
-int(0)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "object"
-int(2)
-int(1)
-int(1)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as ""
-int(0)
-bool(false)
-bool(false)
-
--- Iteration with str value as "Resource id #%d"
-
-Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
-Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
+--TEST--
+Test strspn() function : usage variations - unexpected values for str argument
+--FILE--
+<?php
+/* Prototype : proto int strspn(string str, string mask [, int start [, int len]])
+ * Description: Finds length of initial segment consisting entirely of characters found in mask.
+ If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)
+ * Source code: ext/standard/string.c
+ * Alias to functions: none
+*/
+
+error_reporting(E_ALL & ~E_NOTICE);
+
+/*
+* Testing strspn() : with different unexpected values for str argument
+*/
+
+echo "*** Testing strspn() : with unexpected values for str argument ***\n";
+
+// Initialise function arguments not being substititued (if any)
+$mask = 'abons1234567890';
+$start = 1;
+$len = 10;
+
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// declaring class
+class sample {
+ public function __toString() {
+ return "object";
+ }
+}
+
+// creating a file resource
+$file_handle = fopen(__FILE__, 'r');
+
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new sample,
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+
+ // resource
+ $file_handle
+);
+
+// loop through each element of the array for str
+
+foreach($values as $value) {
+ echo "\n-- Iteration with str value as \"$value\"\n";
+ var_dump( strspn($value,$mask) ); // with default args
+ var_dump( strspn($value,$mask,$start) ); // with default len value
+ var_dump( strspn($value,$mask,$start,$len) ); // with all args
+};
+
+// closing the resource
+fclose($file_handle);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing strspn() : with unexpected values for str argument ***
+
+-- Iteration with str value as "0"
+int(1)
+int(0)
+int(0)
+
+-- Iteration with str value as "1"
+int(1)
+int(0)
+int(0)
+
+-- Iteration with str value as "12345"
+int(5)
+int(4)
+int(4)
+
+-- Iteration with str value as "-2345"
+int(0)
+int(4)
+int(4)
+
+-- Iteration with str value as "10.5"
+int(2)
+int(1)
+int(1)
+
+-- Iteration with str value as "-10.5"
+int(0)
+int(2)
+int(2)
+
+-- Iteration with str value as "101234567000"
+int(12)
+int(11)
+int(10)
+
+-- Iteration with str value as "1.07654321E-9"
+int(1)
+int(0)
+int(0)
+
+-- Iteration with str value as "0.5"
+int(1)
+int(0)
+int(0)
+
+-- Iteration with str value as "Array"
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as "Array"
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as "Array"
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as "Array"
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as "Array"
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as "1"
+int(1)
+int(0)
+int(0)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as "1"
+int(1)
+int(0)
+int(0)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as "object"
+int(2)
+int(1)
+int(1)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as ""
+int(0)
+bool(false)
+bool(false)
+
+-- Iteration with str value as "Resource id #%d"
+
+Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+
+Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strspn_variation2.phpt b/ext/standard/tests/strings/strspn_variation2.phpt
index b8891a590..7af61e559 100644
--- a/ext/standard/tests/strings/strspn_variation2.phpt
+++ b/ext/standard/tests/strings/strspn_variation2.phpt
@@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values for mask argument
* Alias to functions: none
*/
+error_reporting(E_ALL & ~E_NOTICE);
+
/*
* Testing strspn() : with different unexpected values for mask argument
*/
@@ -47,8 +49,8 @@ $values = array(
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
@@ -88,7 +90,7 @@ $values = array(
// loop through each element of the array for mask
foreach($values as $value) {
- echo "\n-- Iteration with mask value as \"$value\" -- \n";
+ echo "\n-- Iteration with mask value as \"$value\" --\n";
var_dump( strspn($str,$value) ); // with defalut args
var_dump( strspn($str,$value,$start) ); // with default len value
var_dump( strspn($str,$value,$start,$len) ); // with all args
@@ -102,56 +104,52 @@ echo "Done"
--EXPECTF--
*** Testing strspn() : with diferent unexpected values of mask argument ***
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with mask value as "0" --
+-- Iteration with mask value as "0" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "1" --
+-- Iteration with mask value as "1" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "12345" --
+-- Iteration with mask value as "12345" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "-2345" --
+-- Iteration with mask value as "-2345" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "10.5" --
+-- Iteration with mask value as "10.5" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "-10.5" --
+-- Iteration with mask value as "-10.5" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "105000000000" --
+-- Iteration with mask value as "101234567000" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "1.06E-9" --
+-- Iteration with mask value as "1.07654321E-9" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "0.5" --
+-- Iteration with mask value as "0.5" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "Array" --
+-- Iteration with mask value as "Array" --
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
@@ -162,7 +160,7 @@ NULL
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
--- Iteration with mask value as "Array" --
+-- Iteration with mask value as "Array" --
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
@@ -173,7 +171,7 @@ NULL
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
--- Iteration with mask value as "Array" --
+-- Iteration with mask value as "Array" --
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
@@ -184,7 +182,7 @@ NULL
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
--- Iteration with mask value as "Array" --
+-- Iteration with mask value as "Array" --
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
@@ -195,7 +193,7 @@ NULL
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
--- Iteration with mask value as "Array" --
+-- Iteration with mask value as "Array" --
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
@@ -206,62 +204,62 @@ NULL
Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
NULL
--- Iteration with mask value as "" --
+-- Iteration with mask value as "" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "" --
+-- Iteration with mask value as "" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "1" --
+-- Iteration with mask value as "1" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "" --
+-- Iteration with mask value as "" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "1" --
+-- Iteration with mask value as "1" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "" --
+-- Iteration with mask value as "" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "" --
+-- Iteration with mask value as "" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "" --
+-- Iteration with mask value as "" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "object" --
+-- Iteration with mask value as "object" --
int(0)
int(1)
int(1)
--- Iteration with mask value as "" --
+-- Iteration with mask value as "" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "" --
+-- Iteration with mask value as "" --
int(0)
int(0)
int(0)
--- Iteration with mask value as "Resource id #%d" --
+-- Iteration with mask value as "Resource id #%d" --
Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d
NULL
@@ -271,4 +269,4 @@ NULL
Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d
NULL
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strspn_variation3.phpt b/ext/standard/tests/strings/strspn_variation3.phpt
index 0773bd3ad..3195220de 100644
--- a/ext/standard/tests/strings/strspn_variation3.phpt
+++ b/ext/standard/tests/strings/strspn_variation3.phpt
@@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values of start argument
* Alias to functions: none
*/
+error_reporting(E_ALL & ~E_NOTICE);
+
/*
* Testing strspn() : with unexpected values of start argument
*/
@@ -41,8 +43,8 @@ $values = array(
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e8,
+ 10.7654321E-8,
.5,
// array data
@@ -99,10 +101,6 @@ echo "Done"
--EXPECTF--
*** Testing strspn() : with unexpected values of start argument ***
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-- Iteration with start value as "10.5" --
int(0)
int(0)
@@ -111,11 +109,11 @@ int(0)
int(2)
int(2)
--- Iteration with start value as "105000000000" --
+-- Iteration with start value as "1012345670" --
bool(false)
bool(false)
--- Iteration with start value as "1.06E-9" --
+-- Iteration with start value as "1.07654321E-7" --
int(2)
int(2)
@@ -242,4 +240,4 @@ NULL
Warning: strspn() expects parameter 3 to be long, resource given in %s on line %d
NULL
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strspn_variation4.phpt b/ext/standard/tests/strings/strspn_variation4.phpt
index dd21a1d0f..87dceac3b 100644
--- a/ext/standard/tests/strings/strspn_variation4.phpt
+++ b/ext/standard/tests/strings/strspn_variation4.phpt
@@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values of len argument
* Alias to functions: none
*/
+error_reporting(E_ALL & ~E_NOTICE);
+
/*
* Testing strspn() : with unexpected values of len argument
*/
@@ -41,8 +43,8 @@ $values = array(
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e8,
+ 10.7654321E-8,
.5,
// array data
@@ -98,20 +100,16 @@ echo "Done"
--EXPECTF--
*** Testing strspn() : with unexpected values of len argument ***
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-- Iteration with len value as "10.5" --
int(2)
-- Iteration with len value as "-10.5" --
int(0)
--- Iteration with len value as "105000000000" --
+-- Iteration with len value as "1012345670" --
int(2)
--- Iteration with len value as "1.06E-9" --
+-- Iteration with len value as "1.07654321E-7" --
int(0)
-- Iteration with len value as "0.5" --
@@ -195,4 +193,4 @@ int(0)
Warning: strspn() expects parameter 4 to be long, resource given in %s on line %d
NULL
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt
index ab10c9efb..8c76c65d7 100644
--- a/ext/standard/tests/strings/strstr.phpt
+++ b/ext/standard/tests/strings/strstr.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/strtok_variation1.phpt b/ext/standard/tests/strings/strtok_variation1.phpt
index 3c754c88a..426ab535b 100644
--- a/ext/standard/tests/strings/strtok_variation1.phpt
+++ b/ext/standard/tests/strings/strtok_variation1.phpt
@@ -1,172 +1,172 @@
---TEST--
-Test strtok() function : usage variations - first argument as non-string
---FILE--
-<?php
-/* Prototype : string strtok ( string $str, string $token )
- * Description: splits a string (str) into smaller strings (tokens), with each token being delimited by any character from token
- * Source code: ext/standard/string.c
-*/
-
-/*
- * Testing strtok() : with first argument as non-string
-*/
-
-echo "*** Testing strtok() : with first argument as non-string ***\n";
-// initialize all required variables
-$token = '-';
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample {
- public function __toString() {
- return "obj-ect";
- }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-// array with different values
-$values = array (
-
- // integer values
- 0,
- 1,
- 12345,
- -2345,
-
- // float values
- 10.5,
- -10.5,
- 10.5e10,
- 10.6E-10,
- .5,
-
- // array values
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red-color', 'item' => 'pen-color'),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // objects
- new sample(),
-
- // empty string
- "",
- '',
-
- // null vlaues
- NULL,
- null,
-
- // undefined variable
- $undefined_var,
-
- // unset variable
- $unset_var,
-
- // resource
- $file_handle
-);
-
-
-// loop through each element of the array and check the working of strtok()
-// when $str arugment is supplied with different values
-
-echo "\n--- Testing strtok() by supplying different values for 'str' argument ---\n";
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
- echo "-- Iteration $counter --\n";
- $str = $values [$index];
-
- var_dump( strtok($str, $token) );
-
- $counter ++;
-}
-
-//closing the resource
-fclose($file_handle);
-
-echo "Done\n";
-?>
---EXPECTF--
-*** Testing strtok() : with first argument as non-string ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
---- Testing strtok() by supplying different values for 'str' argument ---
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-string(5) "12345"
--- Iteration 4 --
-string(4) "2345"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(4) "10.5"
--- Iteration 7 --
-string(12) "105000000000"
--- Iteration 8 --
-string(5) "1.06E"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-
-Notice: Array to string conversion in %s on line %d
-string(5) "Array"
--- Iteration 11 --
-
-Notice: Array to string conversion in %s on line %d
-string(5) "Array"
--- Iteration 12 --
-
-Notice: Array to string conversion in %s on line %d
-string(5) "Array"
--- Iteration 13 --
-
-Notice: Array to string conversion in %s on line %d
-string(5) "Array"
--- Iteration 14 --
-
-Notice: Array to string conversion in %s on line %d
-string(5) "Array"
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-string(3) "obj"
--- Iteration 20 --
-bool(false)
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
--- Iteration 23 --
-bool(false)
--- Iteration 24 --
-bool(false)
--- Iteration 25 --
-bool(false)
--- Iteration 26 --
-string(%d) "Resource id #%d"
-Done
+--TEST--
+Test strtok() function : usage variations - first argument as non-string
+--FILE--
+<?php
+/* Prototype : string strtok ( string $str, string $token )
+ * Description: splits a string (str) into smaller strings (tokens), with each token being delimited by any character from token
+ * Source code: ext/standard/string.c
+*/
+
+/*
+ * Testing strtok() : with first argument as non-string
+*/
+
+echo "*** Testing strtok() : with first argument as non-string ***\n";
+// initialize all required variables
+$token = '-';
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// declaring a class
+class sample {
+ public function __toString() {
+ return "obj-ect";
+ }
+}
+
+// Defining resource
+$file_handle = fopen(__FILE__, 'r');
+
+// array with different values
+$values = array (
+
+ // integer values
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float values
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array values
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red-color', 'item' => 'pen-color'),
+
+ // boolean values
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // objects
+ new sample(),
+
+ // empty string
+ "",
+ '',
+
+ // null vlaues
+ NULL,
+ null,
+
+ // undefined variable
+ $undefined_var,
+
+ // unset variable
+ $unset_var,
+
+ // resource
+ $file_handle
+);
+
+
+// loop through each element of the array and check the working of strtok()
+// when $str arugment is supplied with different values
+
+echo "\n--- Testing strtok() by supplying different values for 'str' argument ---\n";
+$counter = 1;
+for($index = 0; $index < count($values); $index ++) {
+ echo "-- Iteration $counter --\n";
+ $str = $values [$index];
+
+ var_dump( strtok($str, $token) );
+
+ $counter ++;
+}
+
+//closing the resource
+fclose($file_handle);
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing strtok() : with first argument as non-string ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+--- Testing strtok() by supplying different values for 'str' argument ---
+-- Iteration 1 --
+string(1) "0"
+-- Iteration 2 --
+string(1) "1"
+-- Iteration 3 --
+string(5) "12345"
+-- Iteration 4 --
+string(4) "2345"
+-- Iteration 5 --
+string(4) "10.5"
+-- Iteration 6 --
+string(4) "10.5"
+-- Iteration 7 --
+string(12) "101234567000"
+-- Iteration 8 --
+string(11) "1.07654321E"
+-- Iteration 9 --
+string(3) "0.5"
+-- Iteration 10 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) "Array"
+-- Iteration 11 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) "Array"
+-- Iteration 12 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) "Array"
+-- Iteration 13 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) "Array"
+-- Iteration 14 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) "Array"
+-- Iteration 15 --
+string(1) "1"
+-- Iteration 16 --
+bool(false)
+-- Iteration 17 --
+string(1) "1"
+-- Iteration 18 --
+bool(false)
+-- Iteration 19 --
+string(3) "obj"
+-- Iteration 20 --
+bool(false)
+-- Iteration 21 --
+bool(false)
+-- Iteration 22 --
+bool(false)
+-- Iteration 23 --
+bool(false)
+-- Iteration 24 --
+bool(false)
+-- Iteration 25 --
+bool(false)
+-- Iteration 26 --
+string(%d) "Resource id #%d"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/ucwords_variation1.phpt b/ext/standard/tests/strings/ucwords_variation1.phpt
index 2a3ceeeb8..b7d61ab5d 100644
--- a/ext/standard/tests/strings/ucwords_variation1.phpt
+++ b/ext/standard/tests/strings/ucwords_variation1.phpt
@@ -49,8 +49,8 @@ $values = array (
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
@@ -139,9 +139,9 @@ string(4) "10.5"
-- Iteration 12 --
string(5) "-10.5"
-- Iteration 13 --
-string(12) "105000000000"
+string(12) "101234567000"
-- Iteration 14 --
-string(7) "1.06E-9"
+string(13) "1.07654321E-9"
-- Iteration 15 --
string(3) "0.5"
-- Iteration 16 --
@@ -162,7 +162,7 @@ Notice: Array to string conversion in %s on line %d
string(5) "Array"
-- Iteration 20 --
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %s on line 101
string(5) "Array"
-- Iteration 21 --
string(1) "1"
@@ -196,4 +196,4 @@ string(0) ""
string(0) ""
-- Iteration 36 --
string(%d) "Resource Id #%d"
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/vsprintf_variation1.phpt b/ext/standard/tests/strings/vsprintf_variation1.phpt
index eb0284540..391158762 100644
--- a/ext/standard/tests/strings/vsprintf_variation1.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation1.phpt
@@ -45,8 +45,8 @@ $values = array(
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
@@ -120,10 +120,10 @@ string(4) "10.5"
string(5) "-10.5"
-- Iteration 7 --
-string(12) "105000000000"
+string(12) "101234567000"
-- Iteration 8 --
-string(7) "1.06E-9"
+string(13) "1.07654321E-9"
-- Iteration 9 --
string(3) "0.5"
diff --git a/ext/standard/tests/strings/vsprintf_variation2.phpt b/ext/standard/tests/strings/vsprintf_variation2.phpt
index fbc1e8634..acf4bea9e 100644
--- a/ext/standard/tests/strings/vsprintf_variation2.phpt
+++ b/ext/standard/tests/strings/vsprintf_variation2.phpt
@@ -45,8 +45,8 @@ $values = array(
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// null data
@@ -115,10 +115,10 @@ string(4) "10.5"
string(5) "-10.5"
-- Iteration 7 --
-string(12) "105000000000"
+string(12) "101234567000"
-- Iteration 8 --
-string(7) "1.06E-9"
+string(13) "1.07654321E-9"
-- Iteration 9 --
string(3) "0.5"
@@ -174,4 +174,4 @@ bool(false)
-- Iteration 23 --
string(%d) "Resource id #%d"
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/wordwrap_variation1.phpt b/ext/standard/tests/strings/wordwrap_variation1.phpt
index f5a172e9a..d13e7dee2 100644
--- a/ext/standard/tests/strings/wordwrap_variation1.phpt
+++ b/ext/standard/tests/strings/wordwrap_variation1.phpt
@@ -36,8 +36,8 @@ $values = array (
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
@@ -143,17 +143,17 @@ string(5) "-10.5"
string(5) "-10.5"
string(13) "-10<br />\n.5"
-- Iteration 7 --
-string(12) "105000000000"
-string(12) "105000000000"
-string(12) "105000000000"
-string(12) "105000000000"
-string(36) "105<br />\n000<br />\n000<br />\n000"
+string(12) "101234567000"
+string(12) "101234567000"
+string(12) "101234567000"
+string(12) "101234567000"
+string(36) "101<br />\n234<br />\n567<br />\n000"
-- Iteration 8 --
-string(7) "1.06E-9"
-string(7) "1.06E-9"
-string(7) "1.06E-9"
-string(7) "1.06E-9"
-string(23) "1.0<br />\n6E-<br />\n9"
+string(13) "1.07654321E-9"
+string(13) "1.07654321E-9"
+string(13) "1.07654321E-9"
+string(13) "1.07654321E-9"
+string(45) "1.0<br />\n765<br />\n432<br />\n1E-<br />\n9"
-- Iteration 9 --
string(3) "0.5"
string(3) "0.5"
@@ -332,4 +332,4 @@ string(0) ""
string(0) ""
string(0) ""
string(0) ""
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/tests/strings/wordwrap_variation3.phpt b/ext/standard/tests/strings/wordwrap_variation3.phpt
index 0a71944b4..2f83add7b 100644
--- a/ext/standard/tests/strings/wordwrap_variation3.phpt
+++ b/ext/standard/tests/strings/wordwrap_variation3.phpt
@@ -37,8 +37,8 @@ $values = array (
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
@@ -130,13 +130,13 @@ string(33) "testing-10.5wordwrap-10.5function"
string(33) "testing-10.5wordwrap-10.5function"
string(33) "testing-10.5wordwrap-10.5function"
-- Iteration 7 --
-string(47) "testing105000000000wordwrap105000000000function"
-string(47) "testing105000000000wordwrap105000000000function"
-string(47) "testing105000000000wordwrap105000000000function"
+string(47) "testing101234567000wordwrap101234567000function"
+string(47) "testing101234567000wordwrap101234567000function"
+string(47) "testing101234567000wordwrap101234567000function"
-- Iteration 8 --
-string(37) "testing1.06E-9wordwrap1.06E-9function"
-string(37) "testing1.06E-9wordwrap1.06E-9function"
-string(37) "testing1.06E-9wordwrap1.06E-9function"
+string(49) "testing1.07654321E-9wordwrap1.07654321E-9function"
+string(49) "testing1.07654321E-9wordwrap1.07654321E-9function"
+string(49) "testing1.07654321E-9wordwrap1.07654321E-9function"
-- Iteration 9 --
string(29) "testing0.5wordwrap0.5function"
string(29) "testing0.5wordwrap0.5function"
diff --git a/ext/standard/tests/url/base64_decode_basic_001.phpt b/ext/standard/tests/url/base64_decode_basic_001.phpt
new file mode 100644
index 000000000..7aba807e1
--- /dev/null
+++ b/ext/standard/tests/url/base64_decode_basic_001.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Test base64_decode() function : basic functionality - ensure all base64 alphabet is supported.
+--FILE--
+<?php
+/* Prototype : proto string base64_decode(string str[, bool strict])
+ * Description: Decodes string using MIME base64 algorithm
+ * Source code: ext/standard/base64.c
+ * Alias to functions:
+ */
+
+echo "Decode an input string containing the whole base64 alphabet:\n";
+$allbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+var_dump(bin2hex(base64_decode($allbase64)));
+var_dump(bin2hex(base64_decode($allbase64, false)));
+var_dump(bin2hex(base64_decode($allbase64, true)));
+
+echo "Done";
+?>
+--EXPECTF--
+Decode an input string containing the whole base64 alphabet:
+string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf"
+string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf"
+string(96) "00108310518720928b30d38f41149351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf3dfbf"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/base64_decode_basic_002.phpt b/ext/standard/tests/url/base64_decode_basic_002.phpt
new file mode 100644
index 000000000..1289894f4
--- /dev/null
+++ b/ext/standard/tests/url/base64_decode_basic_002.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test base64_decode() function : basic functionality - strict vs non-strict with non-base64 chars.
+--FILE--
+<?php
+/* Prototype : proto string base64_decode(string str[, bool strict])
+ * Description: Decodes string using MIME base64 algorithm
+ * Source code: ext/standard/base64.c
+ * Alias to functions:
+ */
+
+echo "Decode 'hello world!':\n";
+$noWhiteSpace = "aGVsbG8gd29ybGQh";
+var_dump(base64_decode($noWhiteSpace));
+var_dump(base64_decode($noWhiteSpace, false));
+var_dump(base64_decode($noWhiteSpace, true));
+
+echo "\nWhitespace does not affect base64_decode, even with \$strict===true:\n";
+$withWhiteSpace = "a GVs bG8gd2
+ 9ybGQh";
+var_dump(base64_decode($withWhiteSpace));
+var_dump(base64_decode($withWhiteSpace, false));
+var_dump(base64_decode($withWhiteSpace, true));
+
+echo "\nOther chars outside the base64 alphabet are ignored when \$strict===false, but cause failure with \$strict===true:\n";
+$badChars = $noWhiteSpace . '*';
+var_dump(base64_decode($badChars));
+var_dump(base64_decode($badChars, false));
+var_dump(base64_decode($badChars, true));
+
+echo "Done";
+?>
+--EXPECTF--
+Decode 'hello world!':
+string(12) "hello world!"
+string(12) "hello world!"
+string(12) "hello world!"
+
+Whitespace does not affect base64_decode, even with $strict===true:
+string(12) "hello world!"
+string(12) "hello world!"
+string(12) "hello world!"
+
+Other chars outside the base64 alphabet are ignored when $strict===false, but cause failure with $strict===true:
+string(12) "hello world!"
+string(12) "hello world!"
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/base64_decode_error_001.phpt b/ext/standard/tests/url/base64_decode_error_001.phpt
new file mode 100644
index 000000000..272516446
--- /dev/null
+++ b/ext/standard/tests/url/base64_decode_error_001.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test base64_decode() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto string base64_decode(string str[, bool strict])
+ * Description: Decodes string using MIME base64 algorithm
+ * Source code: ext/standard/base64.c
+ * Alias to functions:
+ */
+
+echo "*** Testing base64_decode() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing base64_decode() function with Zero arguments --\n";
+var_dump( base64_decode() );
+
+//Test base64_decode with one more than the expected number of arguments
+echo "\n-- Testing base64_decode() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$strict = true;
+$extra_arg = 10;
+var_dump( base64_decode($str, $strict, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing base64_decode() : error conditions ***
+
+-- Testing base64_decode() function with Zero arguments --
+
+Warning: base64_decode() expects at least 1 parameter, 0 given in %s on line 12
+NULL
+
+-- Testing base64_decode() function with more than expected no. of arguments --
+
+Warning: base64_decode() expects at most 2 parameters, 3 given in %s on line 19
+NULL
+Done
diff --git a/ext/standard/tests/url/base64_decode_variation_001.phpt b/ext/standard/tests/url/base64_decode_variation_001.phpt
new file mode 100644
index 000000000..b01cd23e5
--- /dev/null
+++ b/ext/standard/tests/url/base64_decode_variation_001.phpt
@@ -0,0 +1,167 @@
+--TEST--
+Test base64_decode() function : usage variations - unexpected types for arg 1
+--FILE--
+<?php
+/* Prototype : proto string base64_decode(string str[, bool strict])
+ * Description: Decodes string using MIME base64 algorithm
+ * Source code: ext/standard/base64.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing base64_decode() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$strict = true;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for str
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( base64_decode($value, $strict) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing base64_decode() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(63)
+Error: 8 - Undefined variable: unset_var, %s(66)
+
+Arg value 0
+string(0) ""
+
+Arg value 1
+string(0) ""
+
+Arg value 12345
+string(3) "×mø"
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+string(9) "×MvߎzïM4"
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(72)
+
+Arg value
+Error: 2 - base64_decode() expects parameter 1 to be string, object given, %s(73)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done
diff --git a/ext/standard/tests/url/base64_decode_variation_002.phpt b/ext/standard/tests/url/base64_decode_variation_002.phpt
new file mode 100644
index 000000000..145784a4e
--- /dev/null
+++ b/ext/standard/tests/url/base64_decode_variation_002.phpt
@@ -0,0 +1,177 @@
+--TEST--
+Test base64_decode() function : usage variations - unexpected types for arg 2
+--FILE--
+<?php
+/* Prototype : proto string base64_decode(string str[, bool strict])
+ * Description: Decodes string using MIME base64 algorithm
+ * Source code: ext/standard/base64.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing base64_decode() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$str = 'aGVsbG8gd29ybGQh!';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for strict
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( base64_decode($str, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing base64_decode() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(67)
+Error: 8 - Undefined variable: unset_var, %s(70)
+
+Arg value 0
+string(12) "hello world!"
+
+Arg value 1
+bool(false)
+
+Arg value 12345
+bool(false)
+
+Arg value -2345
+bool(false)
+
+Arg value 10.5
+bool(false)
+
+Arg value -10.5
+bool(false)
+
+Arg value 101234567000
+bool(false)
+
+Arg value 1.07654321E-9
+bool(false)
+
+Arg value 0.5
+bool(false)
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 2 to be boolean, array given, %s(77)
+NULL
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 2 to be boolean, array given, %s(77)
+NULL
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 2 to be boolean, array given, %s(77)
+NULL
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 2 to be boolean, array given, %s(77)
+NULL
+
+Arg value Array
+Error: 2 - base64_decode() expects parameter 2 to be boolean, array given, %s(77)
+NULL
+
+Arg value
+string(12) "hello world!"
+
+Arg value
+string(12) "hello world!"
+
+Arg value 1
+bool(false)
+
+Arg value
+string(12) "hello world!"
+
+Arg value 1
+bool(false)
+
+Arg value
+string(12) "hello world!"
+
+Arg value
+string(12) "hello world!"
+
+Arg value
+string(12) "hello world!"
+
+Arg value string
+bool(false)
+
+Arg value string
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(76)
+
+Arg value
+Error: 2 - base64_decode() expects parameter 2 to be boolean, object given, %s(77)
+NULL
+
+Arg value
+string(12) "hello world!"
+
+Arg value
+string(12) "hello world!"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/base64_encode_basic_001.phpt b/ext/standard/tests/url/base64_encode_basic_001.phpt
new file mode 100644
index 000000000..6ab57f4c5
--- /dev/null
+++ b/ext/standard/tests/url/base64_encode_basic_001.phpt
@@ -0,0 +1,283 @@
+--TEST--
+Test base64_encode() function : basic functionality
+--FILE--
+<?php
+/* Prototype : proto string base64_encode(string str)
+ * Description: Encodes string using MIME base64 algorithm
+ * Source code: ext/standard/base64.c
+ * Alias to functions:
+ */
+
+/*
+ * Test base64_encode with single byte values.
+ */
+
+echo "*** Testing base64_encode() : basic functionality ***\n";
+
+for ($i=0; $i<256; $i++) {
+ $str = pack("c", $i);
+ $enc = base64_encode($str);
+ printf("0x%X: %s\n", $i, $enc);
+}
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing base64_encode() : basic functionality ***
+0x0: AA==
+0x1: AQ==
+0x2: Ag==
+0x3: Aw==
+0x4: BA==
+0x5: BQ==
+0x6: Bg==
+0x7: Bw==
+0x8: CA==
+0x9: CQ==
+0xA: Cg==
+0xB: Cw==
+0xC: DA==
+0xD: DQ==
+0xE: Dg==
+0xF: Dw==
+0x10: EA==
+0x11: EQ==
+0x12: Eg==
+0x13: Ew==
+0x14: FA==
+0x15: FQ==
+0x16: Fg==
+0x17: Fw==
+0x18: GA==
+0x19: GQ==
+0x1A: Gg==
+0x1B: Gw==
+0x1C: HA==
+0x1D: HQ==
+0x1E: Hg==
+0x1F: Hw==
+0x20: IA==
+0x21: IQ==
+0x22: Ig==
+0x23: Iw==
+0x24: JA==
+0x25: JQ==
+0x26: Jg==
+0x27: Jw==
+0x28: KA==
+0x29: KQ==
+0x2A: Kg==
+0x2B: Kw==
+0x2C: LA==
+0x2D: LQ==
+0x2E: Lg==
+0x2F: Lw==
+0x30: MA==
+0x31: MQ==
+0x32: Mg==
+0x33: Mw==
+0x34: NA==
+0x35: NQ==
+0x36: Ng==
+0x37: Nw==
+0x38: OA==
+0x39: OQ==
+0x3A: Og==
+0x3B: Ow==
+0x3C: PA==
+0x3D: PQ==
+0x3E: Pg==
+0x3F: Pw==
+0x40: QA==
+0x41: QQ==
+0x42: Qg==
+0x43: Qw==
+0x44: RA==
+0x45: RQ==
+0x46: Rg==
+0x47: Rw==
+0x48: SA==
+0x49: SQ==
+0x4A: Sg==
+0x4B: Sw==
+0x4C: TA==
+0x4D: TQ==
+0x4E: Tg==
+0x4F: Tw==
+0x50: UA==
+0x51: UQ==
+0x52: Ug==
+0x53: Uw==
+0x54: VA==
+0x55: VQ==
+0x56: Vg==
+0x57: Vw==
+0x58: WA==
+0x59: WQ==
+0x5A: Wg==
+0x5B: Ww==
+0x5C: XA==
+0x5D: XQ==
+0x5E: Xg==
+0x5F: Xw==
+0x60: YA==
+0x61: YQ==
+0x62: Yg==
+0x63: Yw==
+0x64: ZA==
+0x65: ZQ==
+0x66: Zg==
+0x67: Zw==
+0x68: aA==
+0x69: aQ==
+0x6A: ag==
+0x6B: aw==
+0x6C: bA==
+0x6D: bQ==
+0x6E: bg==
+0x6F: bw==
+0x70: cA==
+0x71: cQ==
+0x72: cg==
+0x73: cw==
+0x74: dA==
+0x75: dQ==
+0x76: dg==
+0x77: dw==
+0x78: eA==
+0x79: eQ==
+0x7A: eg==
+0x7B: ew==
+0x7C: fA==
+0x7D: fQ==
+0x7E: fg==
+0x7F: fw==
+0x80: gA==
+0x81: gQ==
+0x82: gg==
+0x83: gw==
+0x84: hA==
+0x85: hQ==
+0x86: hg==
+0x87: hw==
+0x88: iA==
+0x89: iQ==
+0x8A: ig==
+0x8B: iw==
+0x8C: jA==
+0x8D: jQ==
+0x8E: jg==
+0x8F: jw==
+0x90: kA==
+0x91: kQ==
+0x92: kg==
+0x93: kw==
+0x94: lA==
+0x95: lQ==
+0x96: lg==
+0x97: lw==
+0x98: mA==
+0x99: mQ==
+0x9A: mg==
+0x9B: mw==
+0x9C: nA==
+0x9D: nQ==
+0x9E: ng==
+0x9F: nw==
+0xA0: oA==
+0xA1: oQ==
+0xA2: og==
+0xA3: ow==
+0xA4: pA==
+0xA5: pQ==
+0xA6: pg==
+0xA7: pw==
+0xA8: qA==
+0xA9: qQ==
+0xAA: qg==
+0xAB: qw==
+0xAC: rA==
+0xAD: rQ==
+0xAE: rg==
+0xAF: rw==
+0xB0: sA==
+0xB1: sQ==
+0xB2: sg==
+0xB3: sw==
+0xB4: tA==
+0xB5: tQ==
+0xB6: tg==
+0xB7: tw==
+0xB8: uA==
+0xB9: uQ==
+0xBA: ug==
+0xBB: uw==
+0xBC: vA==
+0xBD: vQ==
+0xBE: vg==
+0xBF: vw==
+0xC0: wA==
+0xC1: wQ==
+0xC2: wg==
+0xC3: ww==
+0xC4: xA==
+0xC5: xQ==
+0xC6: xg==
+0xC7: xw==
+0xC8: yA==
+0xC9: yQ==
+0xCA: yg==
+0xCB: yw==
+0xCC: zA==
+0xCD: zQ==
+0xCE: zg==
+0xCF: zw==
+0xD0: 0A==
+0xD1: 0Q==
+0xD2: 0g==
+0xD3: 0w==
+0xD4: 1A==
+0xD5: 1Q==
+0xD6: 1g==
+0xD7: 1w==
+0xD8: 2A==
+0xD9: 2Q==
+0xDA: 2g==
+0xDB: 2w==
+0xDC: 3A==
+0xDD: 3Q==
+0xDE: 3g==
+0xDF: 3w==
+0xE0: 4A==
+0xE1: 4Q==
+0xE2: 4g==
+0xE3: 4w==
+0xE4: 5A==
+0xE5: 5Q==
+0xE6: 5g==
+0xE7: 5w==
+0xE8: 6A==
+0xE9: 6Q==
+0xEA: 6g==
+0xEB: 6w==
+0xEC: 7A==
+0xED: 7Q==
+0xEE: 7g==
+0xEF: 7w==
+0xF0: 8A==
+0xF1: 8Q==
+0xF2: 8g==
+0xF3: 8w==
+0xF4: 9A==
+0xF5: 9Q==
+0xF6: 9g==
+0xF7: 9w==
+0xF8: +A==
+0xF9: +Q==
+0xFA: +g==
+0xFB: +w==
+0xFC: /A==
+0xFD: /Q==
+0xFE: /g==
+0xFF: /w==
+Done
diff --git a/ext/standard/tests/url/base64_encode_error_001.phpt b/ext/standard/tests/url/base64_encode_error_001.phpt
new file mode 100644
index 000000000..a8883ac8f
--- /dev/null
+++ b/ext/standard/tests/url/base64_encode_error_001.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test base64_encode() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto string base64_encode(string str)
+ * Description: Encodes string using MIME base64 algorithm
+ * Source code: ext/standard/base64.c
+ * Alias to functions:
+ */
+
+echo "*** Testing base64_encode() : error conditions - wrong number of args ***\n";
+
+// Zero arguments
+echo "\n-- Testing base64_encode() function with Zero arguments --\n";
+var_dump( base64_encode() );
+
+//Test base64_encode with one more than the expected number of arguments
+echo "\n-- Testing base64_encode() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$extra_arg = 10;
+var_dump( base64_encode($str, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing base64_encode() : error conditions - wrong number of args ***
+
+-- Testing base64_encode() function with Zero arguments --
+
+Warning: base64_encode() expects exactly 1 parameter, 0 given in %s on line 12
+NULL
+
+-- Testing base64_encode() function with more than expected no. of arguments --
+
+Warning: base64_encode() expects exactly 1 parameter, 2 given in %s on line 18
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/base64_encode_variation_001.phpt b/ext/standard/tests/url/base64_encode_variation_001.phpt
new file mode 100644
index 000000000..30da145a8
--- /dev/null
+++ b/ext/standard/tests/url/base64_encode_variation_001.phpt
@@ -0,0 +1,167 @@
+--TEST--
+Test base64_encode() function : usage variations - unexpected types for argument 1
+--FILE--
+<?php
+/* Prototype : proto string base64_encode(string str)
+ * Description: Encodes string using MIME base64 algorithm
+ * Source code: ext/standard/base64.c
+ * Alias to functions:
+ */
+
+echo "*** Testing base64_encode() : usage variations ***\n";
+
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for str
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( base64_encode($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing base64_encode() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(63)
+Error: 8 - Undefined variable: unset_var, %s(66)
+
+Arg value 0
+string(4) "MA=="
+
+Arg value 1
+string(4) "MQ=="
+
+Arg value 12345
+string(8) "MTIzNDU="
+
+Arg value -2345
+string(8) "LTIzNDU="
+
+Arg value 10.5
+string(8) "MTAuNQ=="
+
+Arg value -10.5
+string(8) "LTEwLjU="
+
+Arg value 101234567000
+string(16) "MTAxMjM0NTY3MDAw"
+
+Arg value 1.07654321E-9
+string(20) "MS4wNzY1NDMyMUUtOQ=="
+
+Arg value 0.5
+string(4) "MC41"
+
+Arg value Array
+Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value Array
+Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value Array
+Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value Array
+Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value Array
+Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(4) "MQ=="
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(4) "MQ=="
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(72)
+
+Arg value
+Error: 2 - base64_encode() expects parameter 1 to be string, object given, %s(73)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done
diff --git a/ext/standard/tests/url/parse_url_basic_001.phpt b/ext/standard/tests/url/parse_url_basic_001.phpt
new file mode 100644
index 000000000..3d50689a4
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_001.phpt
@@ -0,0 +1,899 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying the component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying the component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "\n--> $url: ";
+ var_dump(parse_url($url));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+
+--> 64.246.30.37: array(1) {
+ ["path"]=>
+ string(12) "64.246.30.37"
+}
+
+--> http://64.246.30.37: array(2) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(12) "64.246.30.37"
+}
+
+--> http://64.246.30.37/: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(12) "64.246.30.37"
+ ["path"]=>
+ string(1) "/"
+}
+
+--> 64.246.30.37/: array(1) {
+ ["path"]=>
+ string(13) "64.246.30.37/"
+}
+
+--> 64.246.30.37:80/: array(3) {
+ ["host"]=>
+ string(12) "64.246.30.37"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(1) "/"
+}
+
+--> php.net: array(1) {
+ ["path"]=>
+ string(7) "php.net"
+}
+
+--> php.net/: array(1) {
+ ["path"]=>
+ string(8) "php.net/"
+}
+
+--> http://php.net: array(2) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(7) "php.net"
+}
+
+--> http://php.net/: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(7) "php.net"
+ ["path"]=>
+ string(1) "/"
+}
+
+--> www.php.net: array(1) {
+ ["path"]=>
+ string(11) "www.php.net"
+}
+
+--> www.php.net/: array(1) {
+ ["path"]=>
+ string(12) "www.php.net/"
+}
+
+--> http://www.php.net: array(2) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+}
+
+--> http://www.php.net/: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["path"]=>
+ string(1) "/"
+}
+
+--> www.php.net:80: array(2) {
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+}
+
+--> http://www.php.net:80: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+}
+
+--> http://www.php.net:80/: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(1) "/"
+}
+
+--> http://www.php.net/index.php: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["path"]=>
+ string(10) "/index.php"
+}
+
+--> www.php.net/?: array(1) {
+ ["path"]=>
+ string(12) "www.php.net/"
+}
+
+--> www.php.net:80/?: array(3) {
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(1) "/"
+}
+
+--> http://www.php.net/?: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["path"]=>
+ string(1) "/"
+}
+
+--> http://www.php.net:80/?: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(1) "/"
+}
+
+--> http://www.php.net:80/index.php: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(10) "/index.php"
+}
+
+--> http://www.php.net:80/foo/bar/index.php: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(18) "/foo/bar/index.php"
+}
+
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
+}
+
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5: array(5) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
+ ["query"]=>
+ string(37) "lots=1&of=2&parameters=3&too=4&here=5"
+}
+
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(45) "/this/is/a/very/deep/directory/structure/and/"
+}
+
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
+}
+
+--> http://www.php.net:80/this/../a/../deep/directory: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(28) "/this/../a/../deep/directory"
+}
+
+--> http://www.php.net:80/this/../a/../deep/directory/: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(29) "/this/../a/../deep/directory/"
+}
+
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(42) "/this/is/a/very/deep/directory/../file.php"
+}
+
+--> http://www.php.net:80/index.php: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(10) "/index.php"
+}
+
+--> http://www.php.net:80/index.php?: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(10) "/index.php"
+}
+
+--> http://www.php.net:80/#foo: array(5) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(1) "/"
+ ["fragment"]=>
+ string(3) "foo"
+}
+
+--> http://www.php.net:80/?#: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(1) "/"
+}
+
+--> http://www.php.net:80/?test=1: array(5) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(1) "/"
+ ["query"]=>
+ string(6) "test=1"
+}
+
+--> http://www.php.net/?test=1&: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["path"]=>
+ string(1) "/"
+ ["query"]=>
+ string(7) "test=1&"
+}
+
+--> http://www.php.net:80/?&: array(5) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(1) "/"
+ ["query"]=>
+ string(1) "&"
+}
+
+--> http://www.php.net:80/index.php?test=1&: array(5) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(7) "test=1&"
+}
+
+--> http://www.php.net/index.php?&: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(1) "&"
+}
+
+--> http://www.php.net:80/index.php?foo&: array(5) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(4) "foo&"
+}
+
+--> http://www.php.net/index.php?&foo: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(4) "&foo"
+}
+
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI: array(5) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+}
+
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(5) {
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["user"]=>
+ string(6) "secret"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(6) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["user"]=>
+ string(6) "secret"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["pass"]=>
+ string(7) "hideout"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["user"]=>
+ string(6) "secret"
+ ["pass"]=>
+ string(7) "hideout"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["user"]=>
+ string(14) "secret@hideout"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(8) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["user"]=>
+ string(6) "secret"
+ ["pass"]=>
+ string(7) "hid:out"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+--> nntp://news.php.net: array(2) {
+ ["scheme"]=>
+ string(4) "nntp"
+ ["host"]=>
+ string(12) "news.php.net"
+}
+
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz: array(3) {
+ ["scheme"]=>
+ string(3) "ftp"
+ ["host"]=>
+ string(11) "ftp.gnu.org"
+ ["path"]=>
+ string(22) "/gnu/glic/glibc.tar.gz"
+}
+
+--> zlib:http://foo@bar: array(2) {
+ ["scheme"]=>
+ string(4) "zlib"
+ ["path"]=>
+ string(14) "http://foo@bar"
+}
+
+--> zlib:filename.txt: array(2) {
+ ["scheme"]=>
+ string(4) "zlib"
+ ["path"]=>
+ string(12) "filename.txt"
+}
+
+--> zlib:/path/to/my/file/file.txt: array(2) {
+ ["scheme"]=>
+ string(4) "zlib"
+ ["path"]=>
+ string(25) "/path/to/my/file/file.txt"
+}
+
+--> foo://foo@bar: array(3) {
+ ["scheme"]=>
+ string(3) "foo"
+ ["host"]=>
+ string(3) "bar"
+ ["user"]=>
+ string(3) "foo"
+}
+
+--> mailto:me@mydomain.com: array(2) {
+ ["scheme"]=>
+ string(6) "mailto"
+ ["path"]=>
+ string(15) "me@mydomain.com"
+}
+
+--> /foo.php?a=b&c=d: array(2) {
+ ["path"]=>
+ string(8) "/foo.php"
+ ["query"]=>
+ string(7) "a=b&c=d"
+}
+
+--> foo.php?a=b&c=d: array(2) {
+ ["path"]=>
+ string(7) "foo.php"
+ ["query"]=>
+ string(7) "a=b&c=d"
+}
+
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0: array(6) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(15) "www.example.com"
+ ["port"]=>
+ int(8080)
+ ["user"]=>
+ string(4) "user"
+ ["pass"]=>
+ string(6) "passwd"
+ ["query"]=>
+ string(12) "bar=1&boom=0"
+}
+
+--> file:///path/to/file: array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(13) "/path/to/file"
+}
+
+--> file://path/to/file: array(3) {
+ ["scheme"]=>
+ string(4) "file"
+ ["host"]=>
+ string(4) "path"
+ ["path"]=>
+ string(8) "/to/file"
+}
+
+--> file:/path/to/file: array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(13) "/path/to/file"
+}
+
+--> http://1.2.3.4:/abc.asp?a=1&b=2: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(7) "1.2.3.4"
+ ["path"]=>
+ string(8) "/abc.asp"
+ ["query"]=>
+ string(7) "a=1&b=2"
+}
+
+--> http://foo.com#bar: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(7) "foo.com"
+ ["fragment"]=>
+ string(3) "bar"
+}
+
+--> scheme:: array(1) {
+ ["scheme"]=>
+ string(6) "scheme"
+}
+
+--> foo+bar://baz@bang/bla: array(4) {
+ ["scheme"]=>
+ string(7) "foo+bar"
+ ["host"]=>
+ string(4) "bang"
+ ["user"]=>
+ string(3) "baz"
+ ["path"]=>
+ string(4) "/bla"
+}
+
+--> gg:9130731: array(2) {
+ ["scheme"]=>
+ string(2) "gg"
+ ["path"]=>
+ string(7) "9130731"
+}
+
+--> http://user:@pass@host/path?argument?value#etc: array(7) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(4) "host"
+ ["user"]=>
+ string(4) "user"
+ ["pass"]=>
+ string(5) "@pass"
+ ["path"]=>
+ string(5) "/path"
+ ["query"]=>
+ string(14) "argument?value"
+ ["fragment"]=>
+ string(3) "etc"
+}
+
+--> http://10.10.10.10/:80: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "10.10.10.10"
+ ["path"]=>
+ string(4) "/:80"
+}
+
+--> http://x:?: array(2) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(1) "x"
+}
+
+--> x:blah.com: array(2) {
+ ["scheme"]=>
+ string(1) "x"
+ ["path"]=>
+ string(8) "blah.com"
+}
+
+--> x:/blah.com: array(2) {
+ ["scheme"]=>
+ string(1) "x"
+ ["path"]=>
+ string(9) "/blah.com"
+}
+
+--> x://::abc/?: array(3) {
+ ["scheme"]=>
+ string(1) "x"
+ ["host"]=>
+ string(1) ":"
+ ["path"]=>
+ string(1) "/"
+}
+
+--> http://::?: array(2) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(1) ":"
+}
+
+--> x://::6.5: array(3) {
+ ["scheme"]=>
+ string(1) "x"
+ ["host"]=>
+ string(1) ":"
+ ["port"]=>
+ int(6)
+}
+
+--> http://?:/: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(1) "?"
+ ["path"]=>
+ string(1) "/"
+}
+
+--> http://@?:/: array(4) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(1) "?"
+ ["user"]=>
+ string(0) ""
+ ["path"]=>
+ string(1) "/"
+}
+
+--> file:///:: array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(2) "/:"
+}
+
+--> file:///a:/: array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(3) "a:/"
+}
+
+--> file:///ab:/: array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(5) "/ab:/"
+}
+
+--> file:///a:/: array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(3) "a:/"
+}
+
+--> file:///@:/: array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(3) "@:/"
+}
+
+--> file:///:80/: array(2) {
+ ["scheme"]=>
+ string(4) "file"
+ ["path"]=>
+ string(5) "/:80/"
+}
+
+--> []: array(1) {
+ ["path"]=>
+ string(2) "[]"
+}
+
+--> http://[x:80]/: array(3) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(6) "[x:80]"
+ ["path"]=>
+ string(1) "/"
+}
+
+--> : array(1) {
+ ["path"]=>
+ string(0) ""
+}
+
+--> /: array(1) {
+ ["path"]=>
+ string(1) "/"
+}
+
+--> http:///blah.com:
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://:80:
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://user@:80:
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://user:pass@:80:
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://::
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://@/:
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://@:/:
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://:/:
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://?:
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://?::
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://:?:
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://blah.com:123456:
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+
+--> http://blah.com:abcdef:
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_002.phpt b/ext/standard/tests/url/parse_url_basic_002.phpt
new file mode 100644
index 000000000..e25ab8dcd
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_002.phpt
@@ -0,0 +1,151 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying PHP_URL_SCHEME as the URL component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying PHP_URL_SCHEME as the URL component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "--> $url : ";
+ var_dump(parse_url($url, PHP_URL_SCHEME));
+
+}
+
+echo "Done";
+?>
+--EXPECTF--
+--> 64.246.30.37 : NULL
+--> http://64.246.30.37 : string(4) "http"
+--> http://64.246.30.37/ : string(4) "http"
+--> 64.246.30.37/ : NULL
+--> 64.246.30.37:80/ : NULL
+--> php.net : NULL
+--> php.net/ : NULL
+--> http://php.net : string(4) "http"
+--> http://php.net/ : string(4) "http"
+--> www.php.net : NULL
+--> www.php.net/ : NULL
+--> http://www.php.net : string(4) "http"
+--> http://www.php.net/ : string(4) "http"
+--> www.php.net:80 : NULL
+--> http://www.php.net:80 : string(4) "http"
+--> http://www.php.net:80/ : string(4) "http"
+--> http://www.php.net/index.php : string(4) "http"
+--> www.php.net/? : NULL
+--> www.php.net:80/? : NULL
+--> http://www.php.net/? : string(4) "http"
+--> http://www.php.net:80/? : string(4) "http"
+--> http://www.php.net:80/index.php : string(4) "http"
+--> http://www.php.net:80/foo/bar/index.php : string(4) "http"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : string(4) "http"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5 : string(4) "http"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/ : string(4) "http"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : string(4) "http"
+--> http://www.php.net:80/this/../a/../deep/directory : string(4) "http"
+--> http://www.php.net:80/this/../a/../deep/directory/ : string(4) "http"
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : string(4) "http"
+--> http://www.php.net:80/index.php : string(4) "http"
+--> http://www.php.net:80/index.php? : string(4) "http"
+--> http://www.php.net:80/#foo : string(4) "http"
+--> http://www.php.net:80/?# : string(4) "http"
+--> http://www.php.net:80/?test=1 : string(4) "http"
+--> http://www.php.net/?test=1& : string(4) "http"
+--> http://www.php.net:80/?& : string(4) "http"
+--> http://www.php.net:80/index.php?test=1& : string(4) "http"
+--> http://www.php.net/index.php?& : string(4) "http"
+--> http://www.php.net:80/index.php?foo& : string(4) "http"
+--> http://www.php.net/index.php?&foo : string(4) "http"
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI : string(4) "http"
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
+--> nntp://news.php.net : string(4) "nntp"
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : string(3) "ftp"
+--> zlib:http://foo@bar : string(4) "zlib"
+--> zlib:filename.txt : string(4) "zlib"
+--> zlib:/path/to/my/file/file.txt : string(4) "zlib"
+--> foo://foo@bar : string(3) "foo"
+--> mailto:me@mydomain.com : string(6) "mailto"
+--> /foo.php?a=b&c=d : NULL
+--> foo.php?a=b&c=d : NULL
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0 : string(4) "http"
+--> file:///path/to/file : string(4) "file"
+--> file://path/to/file : string(4) "file"
+--> file:/path/to/file : string(4) "file"
+--> http://1.2.3.4:/abc.asp?a=1&b=2 : string(4) "http"
+--> http://foo.com#bar : string(4) "http"
+--> scheme: : string(6) "scheme"
+--> foo+bar://baz@bang/bla : string(7) "foo+bar"
+--> gg:9130731 : string(2) "gg"
+--> http://user:@pass@host/path?argument?value#etc : string(4) "http"
+--> http://10.10.10.10/:80 : string(4) "http"
+--> http://x:? : string(4) "http"
+--> x:blah.com : string(1) "x"
+--> x:/blah.com : string(1) "x"
+--> x://::abc/? : string(1) "x"
+--> http://::? : string(4) "http"
+--> x://::6.5 : string(1) "x"
+--> http://?:/ : string(4) "http"
+--> http://@?:/ : string(4) "http"
+--> file:///: : string(4) "file"
+--> file:///a:/ : string(4) "file"
+--> file:///ab:/ : string(4) "file"
+--> file:///a:/ : string(4) "file"
+--> file:///@:/ : string(4) "file"
+--> file:///:80/ : string(4) "file"
+--> [] : NULL
+--> http://[x:80]/ : string(4) "http"
+--> : NULL
+--> / : NULL
+--> http:///blah.com :
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:80 :
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user@:80 :
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user:pass@:80 :
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://: :
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@/ :
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@:/ :
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:/ :
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://? :
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://?: :
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:? :
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:123456 :
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:abcdef :
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_003.phpt b/ext/standard/tests/url/parse_url_basic_003.phpt
new file mode 100644
index 000000000..e34dc2d19
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_003.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying PHP_URL_HOST as the URL component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying PHP_URL_HOST as the URL component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "--> $url : ";
+ var_dump(parse_url($url, PHP_URL_HOST));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+--> 64.246.30.37 : NULL
+--> http://64.246.30.37 : string(12) "64.246.30.37"
+--> http://64.246.30.37/ : string(12) "64.246.30.37"
+--> 64.246.30.37/ : NULL
+--> 64.246.30.37:80/ : string(12) "64.246.30.37"
+--> php.net : NULL
+--> php.net/ : NULL
+--> http://php.net : string(7) "php.net"
+--> http://php.net/ : string(7) "php.net"
+--> www.php.net : NULL
+--> www.php.net/ : NULL
+--> http://www.php.net : string(11) "www.php.net"
+--> http://www.php.net/ : string(11) "www.php.net"
+--> www.php.net:80 : string(11) "www.php.net"
+--> http://www.php.net:80 : string(11) "www.php.net"
+--> http://www.php.net:80/ : string(11) "www.php.net"
+--> http://www.php.net/index.php : string(11) "www.php.net"
+--> www.php.net/? : NULL
+--> www.php.net:80/? : string(11) "www.php.net"
+--> http://www.php.net/? : string(11) "www.php.net"
+--> http://www.php.net:80/? : string(11) "www.php.net"
+--> http://www.php.net:80/index.php : string(11) "www.php.net"
+--> http://www.php.net:80/foo/bar/index.php : string(11) "www.php.net"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : string(11) "www.php.net"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5 : string(11) "www.php.net"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/ : string(11) "www.php.net"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : string(11) "www.php.net"
+--> http://www.php.net:80/this/../a/../deep/directory : string(11) "www.php.net"
+--> http://www.php.net:80/this/../a/../deep/directory/ : string(11) "www.php.net"
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : string(11) "www.php.net"
+--> http://www.php.net:80/index.php : string(11) "www.php.net"
+--> http://www.php.net:80/index.php? : string(11) "www.php.net"
+--> http://www.php.net:80/#foo : string(11) "www.php.net"
+--> http://www.php.net:80/?# : string(11) "www.php.net"
+--> http://www.php.net:80/?test=1 : string(11) "www.php.net"
+--> http://www.php.net/?test=1& : string(11) "www.php.net"
+--> http://www.php.net:80/?& : string(11) "www.php.net"
+--> http://www.php.net:80/index.php?test=1& : string(11) "www.php.net"
+--> http://www.php.net/index.php?& : string(11) "www.php.net"
+--> http://www.php.net:80/index.php?foo& : string(11) "www.php.net"
+--> http://www.php.net/index.php?&foo : string(11) "www.php.net"
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI : string(11) "www.php.net"
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
+--> nntp://news.php.net : string(12) "news.php.net"
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : string(11) "ftp.gnu.org"
+--> zlib:http://foo@bar : NULL
+--> zlib:filename.txt : NULL
+--> zlib:/path/to/my/file/file.txt : NULL
+--> foo://foo@bar : string(3) "bar"
+--> mailto:me@mydomain.com : NULL
+--> /foo.php?a=b&c=d : NULL
+--> foo.php?a=b&c=d : NULL
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0 : string(15) "www.example.com"
+--> file:///path/to/file : NULL
+--> file://path/to/file : string(4) "path"
+--> file:/path/to/file : NULL
+--> http://1.2.3.4:/abc.asp?a=1&b=2 : string(7) "1.2.3.4"
+--> http://foo.com#bar : string(7) "foo.com"
+--> scheme: : NULL
+--> foo+bar://baz@bang/bla : string(4) "bang"
+--> gg:9130731 : NULL
+--> http://user:@pass@host/path?argument?value#etc : string(4) "host"
+--> http://10.10.10.10/:80 : string(11) "10.10.10.10"
+--> http://x:? : string(1) "x"
+--> x:blah.com : NULL
+--> x:/blah.com : NULL
+--> x://::abc/? : string(1) ":"
+--> http://::? : string(1) ":"
+--> x://::6.5 : string(1) ":"
+--> http://?:/ : string(1) "?"
+--> http://@?:/ : string(1) "?"
+--> file:///: : NULL
+--> file:///a:/ : NULL
+--> file:///ab:/ : NULL
+--> file:///a:/ : NULL
+--> file:///@:/ : NULL
+--> file:///:80/ : NULL
+--> [] : NULL
+--> http://[x:80]/ : string(6) "[x:80]"
+--> : NULL
+--> / : NULL
+--> http:///blah.com :
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:80 :
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user@:80 :
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user:pass@:80 :
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://: :
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@/ :
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@:/ :
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:/ :
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://? :
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://?: :
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:? :
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:123456 :
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:abcdef :
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_004.phpt b/ext/standard/tests/url/parse_url_basic_004.phpt
new file mode 100644
index 000000000..af3279547
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_004.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PORT as the URL component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying PHP_URL_PORT as the URL component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "--> $url : ";
+ var_dump(parse_url($url, PHP_URL_PORT));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+--> 64.246.30.37 : NULL
+--> http://64.246.30.37 : NULL
+--> http://64.246.30.37/ : NULL
+--> 64.246.30.37/ : NULL
+--> 64.246.30.37:80/ : int(80)
+--> php.net : NULL
+--> php.net/ : NULL
+--> http://php.net : NULL
+--> http://php.net/ : NULL
+--> www.php.net : NULL
+--> www.php.net/ : NULL
+--> http://www.php.net : NULL
+--> http://www.php.net/ : NULL
+--> www.php.net:80 : int(80)
+--> http://www.php.net:80 : int(80)
+--> http://www.php.net:80/ : int(80)
+--> http://www.php.net/index.php : NULL
+--> www.php.net/? : NULL
+--> www.php.net:80/? : int(80)
+--> http://www.php.net/? : NULL
+--> http://www.php.net:80/? : int(80)
+--> http://www.php.net:80/index.php : int(80)
+--> http://www.php.net:80/foo/bar/index.php : int(80)
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : int(80)
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5 : int(80)
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/ : int(80)
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : int(80)
+--> http://www.php.net:80/this/../a/../deep/directory : int(80)
+--> http://www.php.net:80/this/../a/../deep/directory/ : int(80)
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : int(80)
+--> http://www.php.net:80/index.php : int(80)
+--> http://www.php.net:80/index.php? : int(80)
+--> http://www.php.net:80/#foo : int(80)
+--> http://www.php.net:80/?# : int(80)
+--> http://www.php.net:80/?test=1 : int(80)
+--> http://www.php.net/?test=1& : NULL
+--> http://www.php.net:80/?& : int(80)
+--> http://www.php.net:80/index.php?test=1& : int(80)
+--> http://www.php.net/index.php?& : NULL
+--> http://www.php.net:80/index.php?foo& : int(80)
+--> http://www.php.net/index.php?&foo : NULL
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI : int(80)
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : int(80)
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : int(80)
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : int(80)
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : int(80)
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : int(80)
+--> nntp://news.php.net : NULL
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
+--> zlib:http://foo@bar : NULL
+--> zlib:filename.txt : NULL
+--> zlib:/path/to/my/file/file.txt : NULL
+--> foo://foo@bar : NULL
+--> mailto:me@mydomain.com : NULL
+--> /foo.php?a=b&c=d : NULL
+--> foo.php?a=b&c=d : NULL
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0 : int(8080)
+--> file:///path/to/file : NULL
+--> file://path/to/file : NULL
+--> file:/path/to/file : NULL
+--> http://1.2.3.4:/abc.asp?a=1&b=2 : NULL
+--> http://foo.com#bar : NULL
+--> scheme: : NULL
+--> foo+bar://baz@bang/bla : NULL
+--> gg:9130731 : NULL
+--> http://user:@pass@host/path?argument?value#etc : NULL
+--> http://10.10.10.10/:80 : NULL
+--> http://x:? : NULL
+--> x:blah.com : NULL
+--> x:/blah.com : NULL
+--> x://::abc/? : NULL
+--> http://::? : NULL
+--> x://::6.5 : int(6)
+--> http://?:/ : NULL
+--> http://@?:/ : NULL
+--> file:///: : NULL
+--> file:///a:/ : NULL
+--> file:///ab:/ : NULL
+--> file:///a:/ : NULL
+--> file:///@:/ : NULL
+--> file:///:80/ : NULL
+--> [] : NULL
+--> http://[x:80]/ : NULL
+--> : NULL
+--> / : NULL
+--> http:///blah.com :
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:80 :
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user@:80 :
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user:pass@:80 :
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://: :
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@/ :
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@:/ :
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:/ :
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://? :
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://?: :
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:? :
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:123456 :
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:abcdef :
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_005.phpt b/ext/standard/tests/url/parse_url_basic_005.phpt
new file mode 100644
index 000000000..5eb2541c1
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_005.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying PHP_URL_USER as the URL component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying PHP_URL_USER as the URL component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "--> $url : ";
+ var_dump(parse_url($url, PHP_URL_USER));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+--> 64.246.30.37 : NULL
+--> http://64.246.30.37 : NULL
+--> http://64.246.30.37/ : NULL
+--> 64.246.30.37/ : NULL
+--> 64.246.30.37:80/ : NULL
+--> php.net : NULL
+--> php.net/ : NULL
+--> http://php.net : NULL
+--> http://php.net/ : NULL
+--> www.php.net : NULL
+--> www.php.net/ : NULL
+--> http://www.php.net : NULL
+--> http://www.php.net/ : NULL
+--> www.php.net:80 : NULL
+--> http://www.php.net:80 : NULL
+--> http://www.php.net:80/ : NULL
+--> http://www.php.net/index.php : NULL
+--> www.php.net/? : NULL
+--> www.php.net:80/? : NULL
+--> http://www.php.net/? : NULL
+--> http://www.php.net:80/? : NULL
+--> http://www.php.net:80/index.php : NULL
+--> http://www.php.net:80/foo/bar/index.php : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5 : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/ : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : NULL
+--> http://www.php.net:80/this/../a/../deep/directory : NULL
+--> http://www.php.net:80/this/../a/../deep/directory/ : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : NULL
+--> http://www.php.net:80/index.php : NULL
+--> http://www.php.net:80/index.php? : NULL
+--> http://www.php.net:80/#foo : NULL
+--> http://www.php.net:80/?# : NULL
+--> http://www.php.net:80/?test=1 : NULL
+--> http://www.php.net/?test=1& : NULL
+--> http://www.php.net:80/?& : NULL
+--> http://www.php.net:80/index.php?test=1& : NULL
+--> http://www.php.net/index.php?& : NULL
+--> http://www.php.net:80/index.php?foo& : NULL
+--> http://www.php.net/index.php?&foo : NULL
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI : NULL
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(6) "secret"
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(6) "secret"
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(6) "secret"
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(14) "secret@hideout"
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(6) "secret"
+--> nntp://news.php.net : NULL
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
+--> zlib:http://foo@bar : NULL
+--> zlib:filename.txt : NULL
+--> zlib:/path/to/my/file/file.txt : NULL
+--> foo://foo@bar : string(3) "foo"
+--> mailto:me@mydomain.com : NULL
+--> /foo.php?a=b&c=d : NULL
+--> foo.php?a=b&c=d : NULL
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0 : string(4) "user"
+--> file:///path/to/file : NULL
+--> file://path/to/file : NULL
+--> file:/path/to/file : NULL
+--> http://1.2.3.4:/abc.asp?a=1&b=2 : NULL
+--> http://foo.com#bar : NULL
+--> scheme: : NULL
+--> foo+bar://baz@bang/bla : string(3) "baz"
+--> gg:9130731 : NULL
+--> http://user:@pass@host/path?argument?value#etc : string(4) "user"
+--> http://10.10.10.10/:80 : NULL
+--> http://x:? : NULL
+--> x:blah.com : NULL
+--> x:/blah.com : NULL
+--> x://::abc/? : NULL
+--> http://::? : NULL
+--> x://::6.5 : NULL
+--> http://?:/ : NULL
+--> http://@?:/ : string(0) ""
+--> file:///: : NULL
+--> file:///a:/ : NULL
+--> file:///ab:/ : NULL
+--> file:///a:/ : NULL
+--> file:///@:/ : NULL
+--> file:///:80/ : NULL
+--> [] : NULL
+--> http://[x:80]/ : NULL
+--> : NULL
+--> / : NULL
+--> http:///blah.com :
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:80 :
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user@:80 :
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user:pass@:80 :
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://: :
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@/ :
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@:/ :
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:/ :
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://? :
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://?: :
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:? :
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:123456 :
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:abcdef :
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_006.phpt b/ext/standard/tests/url/parse_url_basic_006.phpt
new file mode 100644
index 000000000..926200a1a
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_006.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PASS as the URL component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying PHP_URL_PASS as the URL component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "--> $url : ";
+ var_dump(parse_url($url, PHP_URL_PASS));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+--> 64.246.30.37 : NULL
+--> http://64.246.30.37 : NULL
+--> http://64.246.30.37/ : NULL
+--> 64.246.30.37/ : NULL
+--> 64.246.30.37:80/ : NULL
+--> php.net : NULL
+--> php.net/ : NULL
+--> http://php.net : NULL
+--> http://php.net/ : NULL
+--> www.php.net : NULL
+--> www.php.net/ : NULL
+--> http://www.php.net : NULL
+--> http://www.php.net/ : NULL
+--> www.php.net:80 : NULL
+--> http://www.php.net:80 : NULL
+--> http://www.php.net:80/ : NULL
+--> http://www.php.net/index.php : NULL
+--> www.php.net/? : NULL
+--> www.php.net:80/? : NULL
+--> http://www.php.net/? : NULL
+--> http://www.php.net:80/? : NULL
+--> http://www.php.net:80/index.php : NULL
+--> http://www.php.net:80/foo/bar/index.php : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5 : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/ : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : NULL
+--> http://www.php.net:80/this/../a/../deep/directory : NULL
+--> http://www.php.net:80/this/../a/../deep/directory/ : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : NULL
+--> http://www.php.net:80/index.php : NULL
+--> http://www.php.net:80/index.php? : NULL
+--> http://www.php.net:80/#foo : NULL
+--> http://www.php.net:80/?# : NULL
+--> http://www.php.net:80/?test=1 : NULL
+--> http://www.php.net/?test=1& : NULL
+--> http://www.php.net:80/?& : NULL
+--> http://www.php.net:80/index.php?test=1& : NULL
+--> http://www.php.net/index.php?& : NULL
+--> http://www.php.net:80/index.php?foo& : NULL
+--> http://www.php.net/index.php?&foo : NULL
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI : NULL
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(7) "hideout"
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(7) "hideout"
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(7) "hid:out"
+--> nntp://news.php.net : NULL
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
+--> zlib:http://foo@bar : NULL
+--> zlib:filename.txt : NULL
+--> zlib:/path/to/my/file/file.txt : NULL
+--> foo://foo@bar : NULL
+--> mailto:me@mydomain.com : NULL
+--> /foo.php?a=b&c=d : NULL
+--> foo.php?a=b&c=d : NULL
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0 : string(6) "passwd"
+--> file:///path/to/file : NULL
+--> file://path/to/file : NULL
+--> file:/path/to/file : NULL
+--> http://1.2.3.4:/abc.asp?a=1&b=2 : NULL
+--> http://foo.com#bar : NULL
+--> scheme: : NULL
+--> foo+bar://baz@bang/bla : NULL
+--> gg:9130731 : NULL
+--> http://user:@pass@host/path?argument?value#etc : string(5) "@pass"
+--> http://10.10.10.10/:80 : NULL
+--> http://x:? : NULL
+--> x:blah.com : NULL
+--> x:/blah.com : NULL
+--> x://::abc/? : NULL
+--> http://::? : NULL
+--> x://::6.5 : NULL
+--> http://?:/ : NULL
+--> http://@?:/ : NULL
+--> file:///: : NULL
+--> file:///a:/ : NULL
+--> file:///ab:/ : NULL
+--> file:///a:/ : NULL
+--> file:///@:/ : NULL
+--> file:///:80/ : NULL
+--> [] : NULL
+--> http://[x:80]/ : NULL
+--> : NULL
+--> / : NULL
+--> http:///blah.com :
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:80 :
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user@:80 :
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user:pass@:80 :
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://: :
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@/ :
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@:/ :
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:/ :
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://? :
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://?: :
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:? :
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:123456 :
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:abcdef :
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_007.phpt b/ext/standard/tests/url/parse_url_basic_007.phpt
new file mode 100644
index 000000000..d99ccb667
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_007.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PATH as the URL component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying PHP_URL_PATH as the URL component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "--> $url : ";
+ var_dump(parse_url($url, PHP_URL_PATH));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+--> 64.246.30.37 : string(12) "64.246.30.37"
+--> http://64.246.30.37 : NULL
+--> http://64.246.30.37/ : string(1) "/"
+--> 64.246.30.37/ : string(13) "64.246.30.37/"
+--> 64.246.30.37:80/ : string(1) "/"
+--> php.net : string(7) "php.net"
+--> php.net/ : string(8) "php.net/"
+--> http://php.net : NULL
+--> http://php.net/ : string(1) "/"
+--> www.php.net : string(11) "www.php.net"
+--> www.php.net/ : string(12) "www.php.net/"
+--> http://www.php.net : NULL
+--> http://www.php.net/ : string(1) "/"
+--> www.php.net:80 : NULL
+--> http://www.php.net:80 : NULL
+--> http://www.php.net:80/ : string(1) "/"
+--> http://www.php.net/index.php : string(10) "/index.php"
+--> www.php.net/? : string(12) "www.php.net/"
+--> www.php.net:80/? : string(1) "/"
+--> http://www.php.net/? : string(1) "/"
+--> http://www.php.net:80/? : string(1) "/"
+--> http://www.php.net:80/index.php : string(10) "/index.php"
+--> http://www.php.net:80/foo/bar/index.php : string(18) "/foo/bar/index.php"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5 : string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/ : string(45) "/this/is/a/very/deep/directory/structure/and/"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
+--> http://www.php.net:80/this/../a/../deep/directory : string(28) "/this/../a/../deep/directory"
+--> http://www.php.net:80/this/../a/../deep/directory/ : string(29) "/this/../a/../deep/directory/"
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : string(42) "/this/is/a/very/deep/directory/../file.php"
+--> http://www.php.net:80/index.php : string(10) "/index.php"
+--> http://www.php.net:80/index.php? : string(10) "/index.php"
+--> http://www.php.net:80/#foo : string(1) "/"
+--> http://www.php.net:80/?# : string(1) "/"
+--> http://www.php.net:80/?test=1 : string(1) "/"
+--> http://www.php.net/?test=1& : string(1) "/"
+--> http://www.php.net:80/?& : string(1) "/"
+--> http://www.php.net:80/index.php?test=1& : string(10) "/index.php"
+--> http://www.php.net/index.php?& : string(10) "/index.php"
+--> http://www.php.net:80/index.php?foo& : string(10) "/index.php"
+--> http://www.php.net/index.php?&foo : string(10) "/index.php"
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI : string(10) "/index.php"
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
+--> nntp://news.php.net : NULL
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : string(22) "/gnu/glic/glibc.tar.gz"
+--> zlib:http://foo@bar : string(14) "http://foo@bar"
+--> zlib:filename.txt : string(12) "filename.txt"
+--> zlib:/path/to/my/file/file.txt : string(25) "/path/to/my/file/file.txt"
+--> foo://foo@bar : NULL
+--> mailto:me@mydomain.com : string(15) "me@mydomain.com"
+--> /foo.php?a=b&c=d : string(8) "/foo.php"
+--> foo.php?a=b&c=d : string(7) "foo.php"
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0 : NULL
+--> file:///path/to/file : string(13) "/path/to/file"
+--> file://path/to/file : string(8) "/to/file"
+--> file:/path/to/file : string(13) "/path/to/file"
+--> http://1.2.3.4:/abc.asp?a=1&b=2 : string(8) "/abc.asp"
+--> http://foo.com#bar : NULL
+--> scheme: : NULL
+--> foo+bar://baz@bang/bla : string(4) "/bla"
+--> gg:9130731 : string(7) "9130731"
+--> http://user:@pass@host/path?argument?value#etc : string(5) "/path"
+--> http://10.10.10.10/:80 : string(4) "/:80"
+--> http://x:? : NULL
+--> x:blah.com : string(8) "blah.com"
+--> x:/blah.com : string(9) "/blah.com"
+--> x://::abc/? : string(1) "/"
+--> http://::? : NULL
+--> x://::6.5 : NULL
+--> http://?:/ : string(1) "/"
+--> http://@?:/ : string(1) "/"
+--> file:///: : string(2) "/:"
+--> file:///a:/ : string(3) "a:/"
+--> file:///ab:/ : string(5) "/ab:/"
+--> file:///a:/ : string(3) "a:/"
+--> file:///@:/ : string(3) "@:/"
+--> file:///:80/ : string(5) "/:80/"
+--> [] : string(2) "[]"
+--> http://[x:80]/ : string(1) "/"
+--> : string(0) ""
+--> / : string(1) "/"
+--> http:///blah.com :
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:80 :
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user@:80 :
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user:pass@:80 :
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://: :
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@/ :
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@:/ :
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:/ :
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://? :
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://?: :
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:? :
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:123456 :
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:abcdef :
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_008.phpt b/ext/standard/tests/url/parse_url_basic_008.phpt
new file mode 100644
index 000000000..d2d2ebb59
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_008.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying PHP_URL_QUERY as the URL component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying PHP_URL_QUERY as the URL component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "--> $url : ";
+ var_dump(parse_url($url, PHP_URL_QUERY));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+--> 64.246.30.37 : NULL
+--> http://64.246.30.37 : NULL
+--> http://64.246.30.37/ : NULL
+--> 64.246.30.37/ : NULL
+--> 64.246.30.37:80/ : NULL
+--> php.net : NULL
+--> php.net/ : NULL
+--> http://php.net : NULL
+--> http://php.net/ : NULL
+--> www.php.net : NULL
+--> www.php.net/ : NULL
+--> http://www.php.net : NULL
+--> http://www.php.net/ : NULL
+--> www.php.net:80 : NULL
+--> http://www.php.net:80 : NULL
+--> http://www.php.net:80/ : NULL
+--> http://www.php.net/index.php : NULL
+--> www.php.net/? : NULL
+--> www.php.net:80/? : NULL
+--> http://www.php.net/? : NULL
+--> http://www.php.net:80/? : NULL
+--> http://www.php.net:80/index.php : NULL
+--> http://www.php.net:80/foo/bar/index.php : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5 : string(37) "lots=1&of=2&parameters=3&too=4&here=5"
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/ : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : NULL
+--> http://www.php.net:80/this/../a/../deep/directory : NULL
+--> http://www.php.net:80/this/../a/../deep/directory/ : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : NULL
+--> http://www.php.net:80/index.php : NULL
+--> http://www.php.net:80/index.php? : NULL
+--> http://www.php.net:80/#foo : NULL
+--> http://www.php.net:80/?# : NULL
+--> http://www.php.net:80/?test=1 : string(6) "test=1"
+--> http://www.php.net/?test=1& : string(7) "test=1&"
+--> http://www.php.net:80/?& : string(1) "&"
+--> http://www.php.net:80/index.php?test=1& : string(7) "test=1&"
+--> http://www.php.net/index.php?& : string(1) "&"
+--> http://www.php.net:80/index.php?foo& : string(4) "foo&"
+--> http://www.php.net/index.php?&foo : string(4) "&foo"
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI : string(31) "test=1&test2=char&test3=mixesCI"
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
+--> nntp://news.php.net : NULL
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
+--> zlib:http://foo@bar : NULL
+--> zlib:filename.txt : NULL
+--> zlib:/path/to/my/file/file.txt : NULL
+--> foo://foo@bar : NULL
+--> mailto:me@mydomain.com : NULL
+--> /foo.php?a=b&c=d : string(7) "a=b&c=d"
+--> foo.php?a=b&c=d : string(7) "a=b&c=d"
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0 : string(12) "bar=1&boom=0"
+--> file:///path/to/file : NULL
+--> file://path/to/file : NULL
+--> file:/path/to/file : NULL
+--> http://1.2.3.4:/abc.asp?a=1&b=2 : string(7) "a=1&b=2"
+--> http://foo.com#bar : NULL
+--> scheme: : NULL
+--> foo+bar://baz@bang/bla : NULL
+--> gg:9130731 : NULL
+--> http://user:@pass@host/path?argument?value#etc : string(14) "argument?value"
+--> http://10.10.10.10/:80 : NULL
+--> http://x:? : NULL
+--> x:blah.com : NULL
+--> x:/blah.com : NULL
+--> x://::abc/? : NULL
+--> http://::? : NULL
+--> x://::6.5 : NULL
+--> http://?:/ : NULL
+--> http://@?:/ : NULL
+--> file:///: : NULL
+--> file:///a:/ : NULL
+--> file:///ab:/ : NULL
+--> file:///a:/ : NULL
+--> file:///@:/ : NULL
+--> file:///:80/ : NULL
+--> [] : NULL
+--> http://[x:80]/ : NULL
+--> : NULL
+--> / : NULL
+--> http:///blah.com :
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:80 :
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user@:80 :
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user:pass@:80 :
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://: :
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@/ :
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@:/ :
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:/ :
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://? :
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://?: :
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:? :
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:123456 :
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:abcdef :
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_009.phpt b/ext/standard/tests/url/parse_url_basic_009.phpt
new file mode 100644
index 000000000..b23a30edf
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_009.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Test parse_url() function: Parse a load of URLs without specifying PHP_URL_FRAGMENT as the URL component
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * Parse a load of URLs without specifying PHP_URL_FRAGMENT as the URL component
+ */
+include_once(dirname(__FILE__) . '/urls.inc');
+
+foreach ($urls as $url) {
+ echo "--> $url : ";
+ var_dump(parse_url($url, PHP_URL_FRAGMENT));
+}
+
+echo "Done";
+?>
+--EXPECTF--
+--> 64.246.30.37 : NULL
+--> http://64.246.30.37 : NULL
+--> http://64.246.30.37/ : NULL
+--> 64.246.30.37/ : NULL
+--> 64.246.30.37:80/ : NULL
+--> php.net : NULL
+--> php.net/ : NULL
+--> http://php.net : NULL
+--> http://php.net/ : NULL
+--> www.php.net : NULL
+--> www.php.net/ : NULL
+--> http://www.php.net : NULL
+--> http://www.php.net/ : NULL
+--> www.php.net:80 : NULL
+--> http://www.php.net:80 : NULL
+--> http://www.php.net:80/ : NULL
+--> http://www.php.net/index.php : NULL
+--> www.php.net/? : NULL
+--> www.php.net:80/? : NULL
+--> http://www.php.net/? : NULL
+--> http://www.php.net:80/? : NULL
+--> http://www.php.net:80/index.php : NULL
+--> http://www.php.net:80/foo/bar/index.php : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5 : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/ : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php : NULL
+--> http://www.php.net:80/this/../a/../deep/directory : NULL
+--> http://www.php.net:80/this/../a/../deep/directory/ : NULL
+--> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : NULL
+--> http://www.php.net:80/index.php : NULL
+--> http://www.php.net:80/index.php? : NULL
+--> http://www.php.net:80/#foo : string(3) "foo"
+--> http://www.php.net:80/?# : NULL
+--> http://www.php.net:80/?test=1 : NULL
+--> http://www.php.net/?test=1& : NULL
+--> http://www.php.net:80/?& : NULL
+--> http://www.php.net:80/index.php?test=1& : NULL
+--> http://www.php.net/index.php?& : NULL
+--> http://www.php.net:80/index.php?foo& : NULL
+--> http://www.php.net/index.php?&foo : NULL
+--> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI : NULL
+--> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
+--> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
+--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
+--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
+--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
+--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
+--> nntp://news.php.net : NULL
+--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
+--> zlib:http://foo@bar : NULL
+--> zlib:filename.txt : NULL
+--> zlib:/path/to/my/file/file.txt : NULL
+--> foo://foo@bar : NULL
+--> mailto:me@mydomain.com : NULL
+--> /foo.php?a=b&c=d : NULL
+--> foo.php?a=b&c=d : NULL
+--> http://user:passwd@www.example.com:8080?bar=1&boom=0 : NULL
+--> file:///path/to/file : NULL
+--> file://path/to/file : NULL
+--> file:/path/to/file : NULL
+--> http://1.2.3.4:/abc.asp?a=1&b=2 : NULL
+--> http://foo.com#bar : string(3) "bar"
+--> scheme: : NULL
+--> foo+bar://baz@bang/bla : NULL
+--> gg:9130731 : NULL
+--> http://user:@pass@host/path?argument?value#etc : string(3) "etc"
+--> http://10.10.10.10/:80 : NULL
+--> http://x:? : NULL
+--> x:blah.com : NULL
+--> x:/blah.com : NULL
+--> x://::abc/? : NULL
+--> http://::? : NULL
+--> x://::6.5 : NULL
+--> http://?:/ : NULL
+--> http://@?:/ : NULL
+--> file:///: : NULL
+--> file:///a:/ : NULL
+--> file:///ab:/ : NULL
+--> file:///a:/ : NULL
+--> file:///@:/ : NULL
+--> file:///:80/ : NULL
+--> [] : NULL
+--> http://[x:80]/ : NULL
+--> : NULL
+--> / : NULL
+--> http:///blah.com :
+Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:80 :
+Warning: parse_url(http://:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user@:80 :
+Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://user:pass@:80 :
+Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15
+bool(false)
+--> http://: :
+Warning: parse_url(http://:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@/ :
+Warning: parse_url(http://@/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://@:/ :
+Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:/ :
+Warning: parse_url(http://:/): Unable to parse URL in %s on line 15
+bool(false)
+--> http://? :
+Warning: parse_url(http://?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://?: :
+Warning: parse_url(http://?:): Unable to parse URL in %s on line 15
+bool(false)
+--> http://:? :
+Warning: parse_url(http://:?): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:123456 :
+Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15
+bool(false)
+--> http://blah.com:abcdef :
+Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_basic_010.phpt b/ext/standard/tests/url/parse_url_basic_010.phpt
new file mode 100644
index 000000000..3bb2dba14
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_basic_010.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test parse_url() function : check values of URL related constants
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+/*
+ * check values of URL related constants
+ */
+foreach(get_defined_constants() as $constantName => $constantValue) {
+ if (strpos($constantName, 'PHP_URL')===0) {
+ echo "$constantName: $constantValue \n";
+ }
+}
+
+echo "Done";
+?>
+--EXPECTF--
+PHP_URL_SCHEME: 0
+PHP_URL_HOST: 1
+PHP_URL_PORT: 2
+PHP_URL_USER: 3
+PHP_URL_PASS: 4
+PHP_URL_PATH: 5
+PHP_URL_QUERY: 6
+PHP_URL_FRAGMENT: 7
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_error_001.phpt b/ext/standard/tests/url/parse_url_error_001.phpt
new file mode 100644
index 000000000..0280a87cb
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_error_001.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test parse_url() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+echo "*** Testing parse_url() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing parse_url() function with Zero arguments --\n";
+var_dump( parse_url() );
+
+//Test parse_url with one more than the expected number of arguments
+echo "\n-- Testing parse_url() function with more than expected no. of arguments --\n";
+$url = 'string_val';
+$url_component = 10;
+$extra_arg = 10;
+var_dump( parse_url($url, $url_component, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing parse_url() : error conditions ***
+
+-- Testing parse_url() function with Zero arguments --
+
+Warning: parse_url() expects at least 1 parameter, 0 given in %s on line 12
+NULL
+
+-- Testing parse_url() function with more than expected no. of arguments --
+
+Warning: parse_url() expects at most 2 parameters, 3 given in %s on line 19
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_error_002.phpt b/ext/standard/tests/url/parse_url_error_002.phpt
new file mode 100644
index 000000000..45c20f410
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_error_002.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test parse_url() function: url component specifier out of range
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+echo "*** Testing parse_url() : error conditions: url component specifier out of range ***\n";
+$url = 'http://secret:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123';
+
+echo "--> Below range:";
+var_dump(parse_url($url, -1));
+
+echo "\n\n--> Above range:";
+var_dump(parse_url($url, 99));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing parse_url() : error conditions: url component specifier out of range ***
+--> Below range:array(8) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["user"]=>
+ string(6) "secret"
+ ["pass"]=>
+ string(7) "hideout"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+
+--> Above range:
+Warning: parse_url(): Invalid URL component identifier 99 in %s on line 15
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_variation_001.phpt b/ext/standard/tests/url/parse_url_variation_001.phpt
new file mode 100644
index 000000000..18ef0a547
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_variation_001.phpt
@@ -0,0 +1,221 @@
+--TEST--
+Test parse_url() function : usage variations - unexpected type for arg 1.
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing parse_url() : usage variations ***\n";
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for url
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( parse_url($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing parse_url() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(60)
+Error: 8 - Undefined variable: unset_var, %s(63)
+
+Arg value 0
+array(1) {
+ ["path"]=>
+ string(1) "0"
+}
+
+Arg value 1
+array(1) {
+ ["path"]=>
+ string(1) "1"
+}
+
+Arg value 12345
+array(1) {
+ ["path"]=>
+ string(5) "12345"
+}
+
+Arg value -2345
+array(1) {
+ ["path"]=>
+ string(5) "-2345"
+}
+
+Arg value 10.5
+array(1) {
+ ["path"]=>
+ string(4) "10.5"
+}
+
+Arg value -10.5
+array(1) {
+ ["path"]=>
+ string(5) "-10.5"
+}
+
+Arg value 101234567000
+array(1) {
+ ["path"]=>
+ string(12) "101234567000"
+}
+
+Arg value 1.07654321E-9
+array(1) {
+ ["path"]=>
+ string(13) "1.07654321E-9"
+}
+
+Arg value 0.5
+array(1) {
+ ["path"]=>
+ string(3) "0.5"
+}
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70)
+NULL
+
+Arg value
+array(1) {
+ ["path"]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ ["path"]=>
+ string(0) ""
+}
+
+Arg value 1
+array(1) {
+ ["path"]=>
+ string(1) "1"
+}
+
+Arg value
+array(1) {
+ ["path"]=>
+ string(0) ""
+}
+
+Arg value 1
+array(1) {
+ ["path"]=>
+ string(1) "1"
+}
+
+Arg value
+array(1) {
+ ["path"]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ ["path"]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ ["path"]=>
+ string(0) ""
+}
+Error: 4096 - Object of class stdClass could not be converted to string, %s(69)
+
+Arg value
+Error: 2 - parse_url() expects parameter 1 to be string, object given, %s(70)
+NULL
+
+Arg value
+array(1) {
+ ["path"]=>
+ string(0) ""
+}
+
+Arg value
+array(1) {
+ ["path"]=>
+ string(0) ""
+}
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_variation_002_32bit.phpt b/ext/standard/tests/url/parse_url_variation_002_32bit.phpt
new file mode 100644
index 000000000..88971e964
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_variation_002_32bit.phpt
@@ -0,0 +1,200 @@
+--TEST--
+Test parse_url() function : usage variations - unexpected type for arg 2.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only"); ?>
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing parse_url() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$url = 'http://secret:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for url_component
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( parse_url($url, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing parse_url() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(61)
+Error: 8 - Undefined variable: unset_var, %s(64)
+
+Arg value 10.5
+Error: 2 - parse_url(): Invalid URL component identifier 10, %s(71)
+bool(false)
+
+Arg value -10.5
+array(8) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["user"]=>
+ string(6) "secret"
+ ["pass"]=>
+ string(7) "hideout"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+Arg value 101234567000
+array(8) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["user"]=>
+ string(6) "secret"
+ ["pass"]=>
+ string(7) "hideout"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+Arg value 1.07654321E-9
+string(4) "http"
+
+Arg value 0.5
+string(4) "http"
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value
+string(4) "http"
+
+Arg value
+string(4) "http"
+
+Arg value 1
+string(11) "www.php.net"
+
+Arg value
+string(4) "http"
+
+Arg value 1
+string(11) "www.php.net"
+
+Arg value
+string(4) "http"
+
+Arg value
+Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
+NULL
+
+Arg value
+Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
+NULL
+
+Arg value string
+Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
+NULL
+
+Arg value string
+Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
+NULL
+Error: 4096 - Object of class stdClass could not be converted to string, %s(70)
+
+Arg value
+Error: 2 - parse_url() expects parameter 2 to be long, object given, %s(71)
+NULL
+
+Arg value
+string(4) "http"
+
+Arg value
+string(4) "http"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/parse_url_variation_002_64bit.phpt b/ext/standard/tests/url/parse_url_variation_002_64bit.phpt
new file mode 100644
index 000000000..561a43353
--- /dev/null
+++ b/ext/standard/tests/url/parse_url_variation_002_64bit.phpt
@@ -0,0 +1,184 @@
+--TEST--
+Test parse_url() function : usage variations - unexpected type for arg 2.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
+--FILE--
+<?php
+/* Prototype : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing parse_url() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$url = 'http://secret:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // string data
+ "string",
+ 'string',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for url_component
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( parse_url($url, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing parse_url() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(61)
+Error: 8 - Undefined variable: unset_var, %s(64)
+
+Arg value 10.5
+Error: 2 - parse_url(): Invalid URL component identifier 10, %s(71)
+bool(false)
+
+Arg value -10.5
+array(8) {
+ ["scheme"]=>
+ string(4) "http"
+ ["host"]=>
+ string(11) "www.php.net"
+ ["port"]=>
+ int(80)
+ ["user"]=>
+ string(6) "secret"
+ ["pass"]=>
+ string(7) "hideout"
+ ["path"]=>
+ string(10) "/index.php"
+ ["query"]=>
+ string(31) "test=1&test2=char&test3=mixesCI"
+ ["fragment"]=>
+ string(16) "some_page_ref123"
+}
+
+Arg value 101234567000
+Error: 2 - parse_url(): Invalid URL component identifier 101234567000, %s(71)
+bool(false)
+
+Arg value 1.07654321E-9
+string(4) "http"
+
+Arg value 0.5
+string(4) "http"
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value Array
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value
+string(4) "http"
+
+Arg value
+string(4) "http"
+
+Arg value 1
+string(11) "www.php.net"
+
+Arg value
+string(4) "http"
+
+Arg value 1
+string(11) "www.php.net"
+
+Arg value
+string(4) "http"
+
+Arg value
+Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
+NULL
+
+Arg value
+Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
+NULL
+
+Arg value string
+Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
+NULL
+
+Arg value string
+Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
+NULL
+Error: 4096 - Object of class stdClass could not be converted to string, %s(70)
+
+Arg value
+Error: 2 - parse_url() expects parameter 2 to be long, object given, %s(71)
+NULL
+
+Arg value
+string(4) "http"
+
+Arg value
+string(4) "http"
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/rawurldecode_error_001.phpt b/ext/standard/tests/url/rawurldecode_error_001.phpt
new file mode 100644
index 000000000..1dcaf40fd
--- /dev/null
+++ b/ext/standard/tests/url/rawurldecode_error_001.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test rawurldecode() function : error conditions - wrong number of args
+--FILE--
+<?php
+/* Prototype : proto string rawurldecode(string str)
+ * Description: Decodes URL-encodes string
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+// NB: basic functionality tested in tests/strings/001.phpt
+
+echo "*** Testing rawurldecode() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing rawurldecode() function with Zero arguments --\n";
+var_dump( rawurldecode() );
+
+//Test rawurldecode with one more than the expected number of arguments
+echo "\n-- Testing rawurldecode() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$extra_arg = 10;
+var_dump( rawurldecode($str, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing rawurldecode() : error conditions ***
+
+-- Testing rawurldecode() function with Zero arguments --
+
+Warning: rawurldecode() expects exactly 1 parameter, 0 given in %s on line 14
+NULL
+
+-- Testing rawurldecode() function with more than expected no. of arguments --
+
+Warning: rawurldecode() expects exactly 1 parameter, 2 given in %s on line 20
+NULL
+Done
diff --git a/ext/standard/tests/url/rawurldecode_variation_001.phpt b/ext/standard/tests/url/rawurldecode_variation_001.phpt
new file mode 100644
index 000000000..4942e8b35
--- /dev/null
+++ b/ext/standard/tests/url/rawurldecode_variation_001.phpt
@@ -0,0 +1,168 @@
+--TEST--
+Test rawurldecode() function : usage variations - unexpected type for arg 1.
+--FILE--
+<?php
+/* Prototype : proto string rawurldecode(string str)
+ * Description: Decodes URL-encodes string
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+// NB: basic functionality tested in tests/strings/001.phpt
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing rawurldecode() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for str
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( rawurldecode($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing rawurldecode() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+string(1) "0"
+
+Arg value 1
+string(1) "1"
+
+Arg value 12345
+string(5) "12345"
+
+Arg value -2345
+string(5) "-2345"
+
+Arg value 10.5
+string(4) "10.5"
+
+Arg value -10.5
+string(5) "-10.5"
+
+Arg value 101234567000
+string(12) "101234567000"
+
+Arg value 1.07654321E-9
+string(13) "1.07654321E-9"
+
+Arg value 0.5
+string(3) "0.5"
+
+Arg value Array
+Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 2 - rawurldecode() expects parameter 1 to be string, object given, %s(74)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/rawurlencode_error_001.phpt b/ext/standard/tests/url/rawurlencode_error_001.phpt
new file mode 100644
index 000000000..7acce9e0c
--- /dev/null
+++ b/ext/standard/tests/url/rawurlencode_error_001.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test rawurlencode() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto string rawurlencode(string str)
+ * Description: URL-encodes string
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+// NB: basic functionality tested in tests/strings/001.phpt
+
+echo "*** Testing rawurlencode() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing rawurlencode() function with Zero arguments --\n";
+var_dump( rawurlencode() );
+
+//Test rawurlencode with one more than the expected number of arguments
+echo "\n-- Testing rawurlencode() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$extra_arg = 10;
+var_dump( rawurlencode($str, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing rawurlencode() : error conditions ***
+
+-- Testing rawurlencode() function with Zero arguments --
+
+Warning: rawurlencode() expects exactly 1 parameter, 0 given in %s on line 14
+NULL
+
+-- Testing rawurlencode() function with more than expected no. of arguments --
+
+Warning: rawurlencode() expects exactly 1 parameter, 2 given in %s on line 20
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/rawurlencode_variation_001.phpt b/ext/standard/tests/url/rawurlencode_variation_001.phpt
new file mode 100644
index 000000000..d90825ba7
--- /dev/null
+++ b/ext/standard/tests/url/rawurlencode_variation_001.phpt
@@ -0,0 +1,168 @@
+--TEST--
+Test rawurlencode() function : usage variations - unexpected type for arg 1.
+--FILE--
+<?php
+/* Prototype : proto string rawurlencode(string str)
+ * Description: URL-encodes string
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+// NB: basic functionality tested in tests/strings/001.phpt
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing rawurlencode() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for str
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( rawurlencode($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing rawurlencode() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+string(1) "0"
+
+Arg value 1
+string(1) "1"
+
+Arg value 12345
+string(5) "12345"
+
+Arg value -2345
+string(5) "-2345"
+
+Arg value 10.5
+string(4) "10.5"
+
+Arg value -10.5
+string(5) "-10.5"
+
+Arg value 101234567000
+string(12) "101234567000"
+
+Arg value 1.07654321E-9
+string(13) "1.07654321E-9"
+
+Arg value 0.5
+string(3) "0.5"
+
+Arg value Array
+Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 2 - rawurlencode() expects parameter 1 to be string, object given, %s(74)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/urldecode_error_001.phpt b/ext/standard/tests/url/urldecode_error_001.phpt
new file mode 100644
index 000000000..f0e5ae083
--- /dev/null
+++ b/ext/standard/tests/url/urldecode_error_001.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test urldecode() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto string urldecode(string str)
+ * Description: Decodes URL-encoded string
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+// NB: basic functionality tested in tests/strings/001.phpt
+
+echo "*** Testing urldecode() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing urldecode() function with Zero arguments --\n";
+var_dump( urldecode() );
+
+//Test urldecode with one more than the expected number of arguments
+echo "\n-- Testing urldecode() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$extra_arg = 10;
+var_dump( urldecode($str, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing urldecode() : error conditions ***
+
+-- Testing urldecode() function with Zero arguments --
+
+Warning: urldecode() expects exactly 1 parameter, 0 given in %s on line 14
+NULL
+
+-- Testing urldecode() function with more than expected no. of arguments --
+
+Warning: urldecode() expects exactly 1 parameter, 2 given in %s on line 20
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/urldecode_variation_001.phpt b/ext/standard/tests/url/urldecode_variation_001.phpt
new file mode 100644
index 000000000..7ebc7bdbe
--- /dev/null
+++ b/ext/standard/tests/url/urldecode_variation_001.phpt
@@ -0,0 +1,168 @@
+--TEST--
+Test urldecode() function : usage variations - <type here specifics of this variation>
+--FILE--
+<?php
+/* Prototype : proto string urldecode(string str)
+ * Description: Decodes URL-encoded string
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+// NB: basic functionality tested in tests/strings/001.phpt
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing urldecode() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for str
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( urldecode($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing urldecode() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+string(1) "0"
+
+Arg value 1
+string(1) "1"
+
+Arg value 12345
+string(5) "12345"
+
+Arg value -2345
+string(5) "-2345"
+
+Arg value 10.5
+string(4) "10.5"
+
+Arg value -10.5
+string(5) "-10.5"
+
+Arg value 101234567000
+string(12) "101234567000"
+
+Arg value 1.07654321E-9
+string(13) "1.07654321E-9"
+
+Arg value 0.5
+string(3) "0.5"
+
+Arg value Array
+Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 2 - urldecode() expects parameter 1 to be string, object given, %s(74)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/urlencode_error_001.phpt b/ext/standard/tests/url/urlencode_error_001.phpt
new file mode 100644
index 000000000..fc00b057d
--- /dev/null
+++ b/ext/standard/tests/url/urlencode_error_001.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test urlencode() function : error conditions
+--FILE--
+<?php
+/* Prototype : proto string urlencode(string str)
+ * Description: URL-encodes string
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+// NB: basic functionality tested in tests/strings/001.phpt
+
+echo "*** Testing urlencode() : error conditions ***\n";
+
+// Zero arguments
+echo "\n-- Testing urlencode() function with Zero arguments --\n";
+var_dump( urlencode() );
+
+//Test urlencode with one more than the expected number of arguments
+echo "\n-- Testing urlencode() function with more than expected no. of arguments --\n";
+$str = 'string_val';
+$extra_arg = 10;
+var_dump( urlencode($str, $extra_arg) );
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing urlencode() : error conditions ***
+
+-- Testing urlencode() function with Zero arguments --
+
+Warning: urlencode() expects exactly 1 parameter, 0 given in %s on line 14
+NULL
+
+-- Testing urlencode() function with more than expected no. of arguments --
+
+Warning: urlencode() expects exactly 1 parameter, 2 given in %s on line 20
+NULL
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/urlencode_variation_001.phpt b/ext/standard/tests/url/urlencode_variation_001.phpt
new file mode 100644
index 000000000..1f82b65f3
--- /dev/null
+++ b/ext/standard/tests/url/urlencode_variation_001.phpt
@@ -0,0 +1,168 @@
+--TEST--
+Test urlencode() function : usage variations - <type here specifics of this variation>
+--FILE--
+<?php
+/* Prototype : proto string urlencode(string str)
+ * Description: URL-encodes string
+ * Source code: ext/standard/url.c
+ * Alias to functions:
+ */
+
+// NB: basic functionality tested in tests/strings/001.phpt
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing urlencode() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+ // int data
+ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+ 10.5,
+ -10.5,
+ 10.1234567e10,
+ 10.7654321E-10,
+ .5,
+
+ // array data
+ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+ NULL,
+ null,
+
+ // boolean data
+ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty data
+ "",
+ '',
+
+ // object data
+ new stdclass(),
+
+ // undefined data
+ $undefined_var,
+
+ // unset data
+ $unset_var,
+);
+
+// loop through each element of the array for str
+
+foreach($values as $value) {
+ echo "\nArg value $value \n";
+ var_dump( urlencode($value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing urlencode() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(64)
+Error: 8 - Undefined variable: unset_var, %s(67)
+
+Arg value 0
+string(1) "0"
+
+Arg value 1
+string(1) "1"
+
+Arg value 12345
+string(5) "12345"
+
+Arg value -2345
+string(5) "-2345"
+
+Arg value 10.5
+string(4) "10.5"
+
+Arg value -10.5
+string(5) "-10.5"
+
+Arg value 101234567000
+string(12) "101234567000"
+
+Arg value 1.07654321E-9
+string(13) "1.07654321E-9"
+
+Arg value 0.5
+string(3) "0.5"
+
+Arg value Array
+Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value Array
+Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value 1
+string(1) "1"
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+
+Arg value
+Error: 2 - urlencode() expects parameter 1 to be string, object given, %s(74)
+NULL
+
+Arg value
+string(0) ""
+
+Arg value
+string(0) ""
+Done \ No newline at end of file
diff --git a/ext/standard/tests/url/urls.inc b/ext/standard/tests/url/urls.inc
new file mode 100644
index 000000000..27521c852
--- /dev/null
+++ b/ext/standard/tests/url/urls.inc
@@ -0,0 +1,109 @@
+<?php
+$urls = array(
+// Parsable URLs:
+'64.246.30.37',
+'http://64.246.30.37',
+'http://64.246.30.37/',
+'64.246.30.37/',
+'64.246.30.37:80/',
+'php.net',
+'php.net/',
+'http://php.net',
+'http://php.net/',
+'www.php.net',
+'www.php.net/',
+'http://www.php.net',
+'http://www.php.net/',
+'www.php.net:80',
+'http://www.php.net:80',
+'http://www.php.net:80/',
+'http://www.php.net/index.php',
+'www.php.net/?',
+'www.php.net:80/?',
+'http://www.php.net/?',
+'http://www.php.net:80/?',
+'http://www.php.net:80/index.php',
+'http://www.php.net:80/foo/bar/index.php',
+'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php',
+'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5',
+'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/',
+'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php',
+'http://www.php.net:80/this/../a/../deep/directory',
+'http://www.php.net:80/this/../a/../deep/directory/',
+'http://www.php.net:80/this/is/a/very/deep/directory/../file.php',
+'http://www.php.net:80/index.php',
+'http://www.php.net:80/index.php?',
+'http://www.php.net:80/#foo',
+'http://www.php.net:80/?#',
+'http://www.php.net:80/?test=1',
+'http://www.php.net/?test=1&',
+'http://www.php.net:80/?&',
+'http://www.php.net:80/index.php?test=1&',
+'http://www.php.net/index.php?&',
+'http://www.php.net:80/index.php?foo&',
+'http://www.php.net/index.php?&foo',
+'http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI',
+'www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
+'http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
+'http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
+'http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
+'http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
+'http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
+'http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
+'nntp://news.php.net',
+'ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz',
+'zlib:http://foo@bar',
+'zlib:filename.txt',
+'zlib:/path/to/my/file/file.txt',
+'foo://foo@bar',
+'mailto:me@mydomain.com',
+'/foo.php?a=b&c=d',
+'foo.php?a=b&c=d',
+'http://user:passwd@www.example.com:8080?bar=1&boom=0',
+'file:///path/to/file',
+'file://path/to/file',
+'file:/path/to/file',
+'http://1.2.3.4:/abc.asp?a=1&b=2',
+'http://foo.com#bar',
+'scheme:',
+'foo+bar://baz@bang/bla',
+'gg:9130731',
+'http://user:@pass@host/path?argument?value#etc',
+'http://10.10.10.10/:80',
+'http://x:?',
+'x:blah.com',
+'x:/blah.com',
+'x://::abc/?',
+'http://::?',
+'x://::6.5',
+'http://?:/',
+'http://@?:/',
+'file:///:',
+'file:///a:/',
+'file:///ab:/',
+'file:///a:/',
+'file:///@:/',
+'file:///:80/',
+'[]',
+'http://[x:80]/',
+'',
+'/',
+
+// Severely malformed URLs that do not parse:
+'http:///blah.com',
+'http://:80',
+'http://user@:80',
+'http://user:pass@:80',
+'http://:',
+'http://@/',
+'http://@:/',
+'http://:/',
+'http://?',
+'http://?:',
+'http://:?',
+'http://blah.com:123456',
+'http://blah.com:abcdef',
+);
+
+
+?> \ No newline at end of file
diff --git a/ext/standard/type.c b/ext/standard/type.c
index 536f0a673..9ee4fd18b 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: type.c,v 1.30.2.2.2.3 2007/02/24 02:17:27 helly Exp $ */
+/* $Id: type.c,v 1.30.2.2.2.4 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
#include "php_incomplete_class.h"
diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c
index ff5b9b2c9..2e72ba3d5 100644
--- a/ext/standard/uniqid.c
+++ b/ext/standard/uniqid.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: uniqid.c,v 1.41.2.2.2.3 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: uniqid.c,v 1.41.2.2.2.4 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
diff --git a/ext/standard/uniqid.h b/ext/standard/uniqid.h
index c2ed14fcf..bbba9a1b0 100644
--- a/ext/standard/uniqid.h
+++ b/ext/standard/uniqid.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: uniqid.h,v 1.13.2.1.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: uniqid.h,v 1.13.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef UNIQID_H
#define UNIQID_H
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 13a6aa592..ae95a785f 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: url.c,v 1.86.2.5.2.8 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: url.c,v 1.86.2.5.2.9 2007/12/31 07:20:13 sebastian Exp $ */
#include <stdlib.h>
#include <string.h>
diff --git a/ext/standard/url.h b/ext/standard/url.h
index 7e52d68d8..4bb00f7c7 100644
--- a/ext/standard/url.h
+++ b/ext/standard/url.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: url.h,v 1.20.2.2.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: url.h,v 1.20.2.2.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef URL_H
#define URL_H
diff --git a/ext/standard/url_scanner.c b/ext/standard/url_scanner.c
index 0b402c45d..da712b5ae 100644
--- a/ext/standard/url_scanner.c
+++ b/ext/standard/url_scanner.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Hartmut Holzgraefe <hholzgra@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: url_scanner.c,v 1.44.2.1.2.3 2007/02/22 00:44:08 iliaa Exp $ */
+/* $Id: url_scanner.c,v 1.44.2.1.2.4 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
diff --git a/ext/standard/url_scanner.h b/ext/standard/url_scanner.h
index 86cca80e6..fc7baa01a 100644
--- a/ext/standard/url_scanner.h
+++ b/ext/standard/url_scanner.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
-/* $Id: url_scanner.h,v 1.16.2.1.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: url_scanner.h,v 1.16.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef URI_SCANNER_H
#define URI_SCANNER_H
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index a32429531..9edf4c2f9 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: url_scanner_ex.c,v 1.95.2.4.2.5 2007/10/10 09:28:51 jani Exp $ */
+/* $Id: url_scanner_ex.c,v 1.95.2.4.2.6 2008/03/12 11:27:42 felipe Exp $ */
#include "php.h"
@@ -951,7 +951,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char *
size_t len;
if (BG(url_adapt_state_ex).url_app.len != 0) {
- *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC);
+ *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) TSRMLS_CC);
if (sizeof(uint) < sizeof(size_t)) {
if (len > UINT_MAX)
len = UINT_MAX;
diff --git a/ext/standard/url_scanner_ex.c.orig b/ext/standard/url_scanner_ex.c.orig
index f6e388fb2..4d337d74f 100644
--- a/ext/standard/url_scanner_ex.c.orig
+++ b/ext/standard/url_scanner_ex.c.orig
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: url_scanner_ex.c,v 1.95.2.4.2.5 2007/10/10 09:28:51 jani Exp $ */
+/* $Id: url_scanner_ex.c,v 1.95.2.4.2.6 2008/03/12 11:27:42 felipe Exp $ */
#include "php.h"
@@ -1007,7 +1007,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char *
size_t len;
if (BG(url_adapt_state_ex).url_app.len != 0) {
- *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC);
+ *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) TSRMLS_CC);
if (sizeof(uint) < sizeof(size_t)) {
if (len > UINT_MAX)
len = UINT_MAX;
diff --git a/ext/standard/url_scanner_ex.h b/ext/standard/url_scanner_ex.h
index 020c04078..9f17558e3 100644
--- a/ext/standard/url_scanner_ex.h
+++ b/ext/standard/url_scanner_ex.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: url_scanner_ex.h,v 1.26.2.1.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: url_scanner_ex.h,v 1.26.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef URL_SCANNER_EX_H
#define URL_SCANNER_EX_H
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index a1bfdc027..3dc635501 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: url_scanner_ex.re,v 1.76.2.2.2.2 2007/10/10 00:35:52 iliaa Exp $ */
+/* $Id: url_scanner_ex.re,v 1.76.2.2.2.3 2008/03/12 19:33:46 felipe Exp $ */
#include "php.h"
@@ -431,7 +431,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char *
size_t len;
if (BG(url_adapt_state_ex).url_app.len != 0) {
- *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC);
+ *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) TSRMLS_CC);
if (sizeof(uint) < sizeof(size_t)) {
if (len > UINT_MAX)
len = UINT_MAX;
diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index 3397f2f23..70e479450 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: user_filters.c,v 1.31.2.4.2.9 2007/08/04 07:53:00 pollita Exp $ */
+/* $Id: user_filters.c,v 1.31.2.4.2.10 2007/12/31 07:20:13 sebastian Exp $ */
#include "php.h"
#include "php_globals.h"
diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c
index 0290c1329..c0df1e0d9 100644
--- a/ext/standard/uuencode.c
+++ b/ext/standard/uuencode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: uuencode.c,v 1.5.2.1.2.5 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: uuencode.c,v 1.5.2.1.2.6 2007/12/31 07:20:13 sebastian Exp $ */
/*
* Portions of this code are based on Berkeley's uuencode/uudecode
diff --git a/ext/standard/var.c b/ext/standard/var.c
index d250957b9..efbc887f6 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var.c,v 1.203.2.7.2.19 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: var.c,v 1.203.2.7.2.22 2007/12/31 07:20:13 sebastian Exp $ */
@@ -355,13 +355,15 @@ static int php_array_element_export(zval **zv, int num_args, va_list args, zend_
if (hash_key->nKeyLength==0) { /* numeric key */
php_printf("%*c%ld => ", level + 1, ' ', hash_key->h);
} else { /* string key */
- char *key;
- int key_len;
+ char *key, *tmp_str;
+ int key_len, tmp_len;
key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength - 1, &key_len, 0, "'\\", 2 TSRMLS_CC);
+ tmp_str = php_str_to_str_ex(key, key_len, "\0", 1, "' . \"\\0\" . '", 12, &tmp_len, 0, NULL);
php_printf("%*c'", level + 1, ' ');
- PHPWRITE(key, key_len);
+ PHPWRITE(tmp_str, tmp_len);
php_printf("' => ");
efree(key);
+ efree(tmp_str);
}
php_var_export(zv, level + 2 TSRMLS_CC);
PUTS (",\n");
@@ -389,8 +391,8 @@ static int php_object_element_export(zval **zv, int num_args, va_list args, zend
PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC)
{
HashTable *myht;
- char* tmp_str;
- int tmp_len;
+ char *tmp_str, *tmp_str2;
+ int tmp_len, tmp_len2;
char *class_name;
zend_uint class_name_len;
@@ -408,11 +410,13 @@ PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC)
php_printf("%.*H", (int) EG(precision), Z_DVAL_PP(struc));
break;
case IS_STRING:
- tmp_str = php_addcslashes(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc), &tmp_len, 0, "'\\\0", 3 TSRMLS_CC);
+ tmp_str = php_addcslashes(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc), &tmp_len, 0, "'\\", 2 TSRMLS_CC);
+ tmp_str2 = php_str_to_str_ex(tmp_str, tmp_len, "\0", 1, "' . \"\\0\" . '", 12, &tmp_len2, 0, NULL);
PUTS ("'");
- PHPWRITE(tmp_str, tmp_len);
+ PHPWRITE(tmp_str2, tmp_len2);
PUTS ("'");
- efree (tmp_str);
+ efree(tmp_str2);
+ efree(tmp_str);
break;
case IS_ARRAY:
myht = Z_ARRVAL_PP(struc);
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index f044da455..89181b8ce 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var_unserializer.c,v 1.70.2.4.2.7 2007/08/06 18:33:29 jani Exp $ */
+/* $Id: var_unserializer.c,v 1.70.2.4.2.8 2008/03/19 03:00:40 felipe Exp $ */
#include "php.h"
#include "ext/standard/php_var.h"
@@ -288,10 +288,10 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long
zend_hash_index_update(ht, Z_LVAL_P(key), &data, sizeof(data), NULL);
break;
case IS_STRING:
- if (zend_hash_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
+ if (zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
var_push_dtor(var_hash, old_data);
}
- zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
+ zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
break;
}
diff --git a/ext/standard/var_unserializer.c.orig b/ext/standard/var_unserializer.c.orig
index e3e6c25af..3d4fcb77d 100644
--- a/ext/standard/var_unserializer.c.orig
+++ b/ext/standard/var_unserializer.c.orig
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var_unserializer.c,v 1.70.2.4.2.7 2007/08/06 18:33:29 jani Exp $ */
+/* $Id: var_unserializer.c,v 1.70.2.4.2.8 2008/03/19 03:00:40 felipe Exp $ */
#include "php.h"
#include "ext/standard/php_var.h"
@@ -290,10 +290,10 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long
zend_hash_index_update(ht, Z_LVAL_P(key), &data, sizeof(data), NULL);
break;
case IS_STRING:
- if (zend_hash_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
+ if (zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
var_push_dtor(var_hash, old_data);
}
- zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
+ zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
break;
}
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re
index 97fd3be89..ea8ce20d3 100644
--- a/ext/standard/var_unserializer.re
+++ b/ext/standard/var_unserializer.re
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var_unserializer.re,v 1.52.2.2.2.6 2007/08/06 18:23:16 jani Exp $ */
+/* $Id: var_unserializer.re,v 1.52.2.2.2.7 2008/03/19 03:00:40 felipe Exp $ */
#include "php.h"
#include "ext/standard/php_var.h"
@@ -294,10 +294,10 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long
zend_hash_index_update(ht, Z_LVAL_P(key), &data, sizeof(data), NULL);
break;
case IS_STRING:
- if (zend_hash_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
+ if (zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
var_push_dtor(var_hash, old_data);
}
- zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
+ zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
break;
}
diff --git a/ext/standard/versioning.c b/ext/standard/versioning.c
index 7764b0230..7775e0249 100644
--- a/ext/standard/versioning.c
+++ b/ext/standard/versioning.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: versioning.c,v 1.19.2.1.2.3 2007/08/23 18:38:42 derick Exp $ */
+/* $Id: versioning.c,v 1.19.2.1.2.4 2007/12/31 07:20:13 sebastian Exp $ */
#include <stdio.h>
#include <sys/types.h>
diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c
index 56aa0499d..83711dd24 100644
--- a/ext/sybase/php_sybase_db.c
+++ b/ext/sybase/php_sybase_db.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sybase_db.c,v 1.66.2.5.2.8 2007/08/31 07:42:00 jani Exp $ */
+/* $Id: php_sybase_db.c,v 1.66.2.5.2.9 2007/12/31 07:20:13 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
diff --git a/ext/sybase/php_sybase_db.h b/ext/sybase/php_sybase_db.h
index 37bf1ec0a..f7ba114ce 100644
--- a/ext/sybase/php_sybase_db.h
+++ b/ext/sybase/php_sybase_db.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sybase_db.h,v 1.12.2.1.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_sybase_db.h,v 1.12.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_SYBASE_DB_H
#define PHP_SYBASE_DB_H
diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c
index 4479336a9..820170db7 100644
--- a/ext/sybase_ct/php_sybase_ct.c
+++ b/ext/sybase_ct/php_sybase_ct.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sybase_ct.c,v 1.103.2.5.2.13 2007/04/10 15:56:31 helly Exp $ */
+/* $Id: php_sybase_ct.c,v 1.103.2.5.2.14 2007/12/31 07:20:13 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
diff --git a/ext/sybase_ct/php_sybase_ct.h b/ext/sybase_ct/php_sybase_ct.h
index 9bebb2077..8260ce5fc 100644
--- a/ext/sybase_ct/php_sybase_ct.h
+++ b/ext/sybase_ct/php_sybase_ct.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sybase_ct.h,v 1.19.2.2.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_sybase_ct.h,v 1.19.2.2.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_SYBASE_CT_H
#define PHP_SYBASE_CT_H
diff --git a/ext/sysvmsg/php_sysvmsg.h b/ext/sysvmsg/php_sysvmsg.h
index e20f08879..251a008d2 100644
--- a/ext/sysvmsg/php_sysvmsg.h
+++ b/ext/sysvmsg/php_sysvmsg.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sysvmsg.h,v 1.6.2.1.2.2 2007/01/08 22:34:07 nlopess Exp $ */
+/* $Id: php_sysvmsg.h,v 1.6.2.1.2.3 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_SYSVMSG_H
#define PHP_SYSVMSG_H
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c
index 356c11893..556d8d958 100644
--- a/ext/sysvmsg/sysvmsg.c
+++ b/ext/sysvmsg/sysvmsg.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sysvmsg.c,v 1.20.2.3.2.6 2007/01/17 08:25:32 tony2001 Exp $ */
+/* $Id: sysvmsg.c,v 1.20.2.3.2.7 2007/12/31 07:20:13 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -125,7 +125,7 @@ PHP_MINFO_FUNCTION(sysvmsg)
{
php_info_print_table_start();
php_info_print_table_row(2, "sysvmsg support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.20.2.3.2.6 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.20.2.3.2.7 $");
php_info_print_table_end();
}
/* }}} */
diff --git a/ext/sysvsem/php_sysvsem.h b/ext/sysvsem/php_sysvsem.h
index 2374d9cd6..c4dc752db 100644
--- a/ext/sysvsem/php_sysvsem.h
+++ b/ext/sysvsem/php_sysvsem.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sysvsem.h,v 1.16.2.1.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_sysvsem.h,v 1.16.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_SYSVSEM_H
#define PHP_SYSVSEM_H
diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c
index d9a96529e..aa0c9d7a6 100644
--- a/ext/sysvsem/sysvsem.c
+++ b/ext/sysvsem/sysvsem.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sysvsem.c,v 1.51.2.3.2.2 2007/05/11 15:46:38 tony2001 Exp $ */
+/* $Id: sysvsem.c,v 1.51.2.3.2.3 2007/12/31 07:20:13 sebastian Exp $ */
/* Latest update build anc tested on Linux 2.2.14
*
diff --git a/ext/sysvshm/php_sysvshm.h b/ext/sysvshm/php_sysvshm.h
index 9a3d39f1a..a15755da7 100644
--- a/ext/sysvshm/php_sysvshm.h
+++ b/ext/sysvshm/php_sysvshm.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sysvshm.h,v 1.17.2.1.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_sysvshm.h,v 1.17.2.1.2.2 2007/12/31 07:20:13 sebastian Exp $ */
#ifndef PHP_SYSVSHM_H
#define PHP_SYSVSHM_H
diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c
index d6c0128c3..b38fd4e52 100644
--- a/ext/sysvshm/sysvshm.c
+++ b/ext/sysvshm/sysvshm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sysvshm.c,v 1.70.2.2.2.5 2007/08/31 07:42:00 jani Exp $ */
+/* $Id: sysvshm.c,v 1.70.2.2.2.6 2007/12/31 07:20:14 sebastian Exp $ */
/* This has been built and tested on Linux 2.2.14
*
diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h
index bfa1ef1db..7d2bcb19e 100644
--- a/ext/tidy/php_tidy.h
+++ b/ext/tidy/php_tidy.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_tidy.h,v 1.26.2.1.2.5 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_tidy.h,v 1.26.2.1.2.6 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_TIDY_H
#define PHP_TIDY_H
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index 303457983..ede59f0c6 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tidy.c,v 1.66.2.8.2.24 2007/09/20 22:25:05 nlopess Exp $ */
+/* $Id: tidy.c,v 1.66.2.8.2.25 2007/12/31 07:20:14 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -998,7 +998,7 @@ static PHP_MINFO_FUNCTION(tidy)
php_info_print_table_start();
php_info_print_table_header(2, "Tidy support", "enabled");
php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate());
- php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.24 2007/09/20 22:25:05 nlopess Exp $)");
+ php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.25 2007/12/31 07:20:14 sebastian Exp $)");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
diff --git a/ext/tokenizer/php_tokenizer.h b/ext/tokenizer/php_tokenizer.h
index 46cc52706..9e19a7a87 100644
--- a/ext/tokenizer/php_tokenizer.h
+++ b/ext/tokenizer/php_tokenizer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_tokenizer.h,v 1.9.2.1.2.4 2007/07/31 23:24:11 johannes Exp $ */
+/* $Id: php_tokenizer.h,v 1.9.2.1.2.5 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_TOKENIZER_H
#define PHP_TOKENIZER_H
diff --git a/ext/tokenizer/tests/token_get_all_basic.phpt b/ext/tokenizer/tests/token_get_all_basic.phpt
new file mode 100644
index 000000000..0ae84a2a7
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_basic.phpt
@@ -0,0 +1,97 @@
+--TEST--
+Test token_get_all() function : basic functionality
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description : splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+echo "*** Testing token_get_all() : basic functionality ***\n";
+
+// with php open/close tags
+$source = '<?php echo "Hello World"; ?>';
+echo "-- source string with PHP open and close tags --\n";
+var_dump( token_get_all($source) );
+
+// without php open/close tags testing for T_INLINE_HTML
+$source = "echo 'Hello World';";
+echo "-- source string without PHP open and close tags --\n";
+var_dump( token_get_all($source) );
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : basic functionality ***
+-- source string with PHP open and close tags --
+array(7) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(13) ""Hello World""
+ [2]=>
+ int(1)
+ }
+ [4]=>
+ string(1) ";"
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- source string without PHP open and close tags --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(19) "echo 'Hello World';"
+ [2]=>
+ int(1)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_error.phpt b/ext/tokenizer/tests/token_get_all_error.phpt
new file mode 100644
index 000000000..52b1efc1d
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_error.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test token_get_all() function : error conditions
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+echo "*** Testing token_get_all() : error conditions ***\n";
+
+// with zero arguments
+echo "\n-- Testing token_get_all() function with zero arguments --\n";
+var_dump( token_get_all());
+
+// with one more than the expected number of arguments
+echo "-- Testing token_get_all() function with more than expected no. of arguments --\n";
+$source = '<?php ?>';
+$extra_arg = 10;
+var_dump( token_get_all($source, $extra_arg));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : error conditions ***
+
+-- Testing token_get_all() function with zero arguments --
+
+Warning: token_get_all() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+-- Testing token_get_all() function with more than expected no. of arguments --
+
+Warning: token_get_all() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation1.phpt b/ext/tokenizer/tests/token_get_all_variation1.phpt
new file mode 100644
index 000000000..f0e10d6d5
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation1.phpt
@@ -0,0 +1,285 @@
+--TEST--
+Test token_get_all() function : usage variations - unexpected values for 'source' argument
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing different scalar/non-scalar values in place of 'source' argument
+ * It returns either T_INLINE_HTML by converting values into string or gives warning
+*/
+
+echo "*** Testing token_get_all() : unexpected values for 'source' argument ***\n";
+
+// get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// class definition
+class MyClass
+{
+ public function __toString()
+ {
+ return "object";
+ }
+}
+
+// get resource
+$fp = fopen(__FILE__, 'r');
+
+// different scalar/nonscalar values for 'source'
+$source_values = array(
+
+ // int data
+/*1*/ 0,
+ 1,
+ 12345,
+ -2345,
+
+ // float data
+/*5*/ 10.5,
+ -10.5,
+ 10.1234567e8,
+ 10.7654321E-8,
+ .5,
+
+ // array data
+/*10*/ array(),
+ array(0),
+ array(1),
+ array(1, 2),
+ array('color' => 'red', 'item' => 'pen'),
+
+ // null data
+/*15*/ NULL,
+ null,
+
+ // boolean data
+/*17*/ true,
+ false,
+ TRUE,
+ FALSE,
+
+ // empty string
+/*21*/ "",
+ '',
+
+ // object data
+/*23*/ new MyClass(),
+
+ // resource data
+ $fp,
+
+ // undefined data
+ @$undefined_var,
+
+ // unset data
+/*26*/ @$unset_var,
+);
+
+for($count = 0; $count < count($source_values); $count++) {
+ echo "--Iteration ".($count + 1)." --\n";
+ var_dump( token_get_all($source_values[$count]));
+};
+
+fclose($fp);
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : unexpected values for 'source' argument ***
+--Iteration 1 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(1) "0"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 2 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 3 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(5) "12345"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 4 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(5) "-2345"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 5 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(4) "10.5"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 6 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(5) "-10.5"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 7 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(10) "1012345670"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 8 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(13) "1.07654321E-7"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 9 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(3) "0.5"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 10 --
+
+Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
+NULL
+--Iteration 11 --
+
+Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
+NULL
+--Iteration 12 --
+
+Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
+NULL
+--Iteration 13 --
+
+Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
+NULL
+--Iteration 14 --
+
+Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
+NULL
+--Iteration 15 --
+array(0) {
+}
+--Iteration 16 --
+array(0) {
+}
+--Iteration 17 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 18 --
+array(0) {
+}
+--Iteration 19 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 20 --
+array(0) {
+}
+--Iteration 21 --
+array(0) {
+}
+--Iteration 22 --
+array(0) {
+}
+--Iteration 23 --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(6) "object"
+ [2]=>
+ int(1)
+ }
+}
+--Iteration 24 --
+
+Warning: token_get_all() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+--Iteration 25 --
+array(0) {
+}
+--Iteration 26 --
+array(0) {
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation10.phpt b/ext/tokenizer/tests/token_get_all_variation10.phpt
new file mode 100644
index 000000000..63b61e731
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation10.phpt
@@ -0,0 +1,781 @@
+--TEST--
+Test token_get_all() function : usage variations - with constant tokens
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Using different types of constants in 'source' string to check them for token
+ * integer const - T_LNUMBER(305)
+ * float/double/real const - T_DNUMBER(306)
+ * string cosnt - T_CONSTANT_ESCAPED_STRING(315)
+ * bool const (no tokens specified) - T_UNKNOWN(307)
+ * null const (no tokens specified) - T_UNKNOWN(307)
+*/
+
+echo "*** Testing token_get_all() : 'source' string with different constants ***\n";
+
+$a = 1;
+$b = 0;
+
+$source = array (
+ // int const
+ '<?php $a = 1 + 034; $b = $a + 0x3F; ?>',
+
+ // float const
+ '<?php $a = 0.23E-2 + 0.43e2 + 0.5; ?>',
+
+ // string const
+ '<?php $a = "hello ".\'world\'; ?>',
+
+ // bool const
+ "<?php \$a = (\$b)? true : false; ?>",
+ "<?php \$b = (\$a)? FALSE : TRUE; ?>",
+
+ // null const
+ '<?php $b = null | NULL; ?>'
+);
+for($count = 0; $count < count($source); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( token_get_all($source[$count]));
+}
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different constants ***
+-- Iteration 1 --
+array(24) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) "+"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(3) "034"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [14]=>
+ string(1) "="
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [18]=>
+ string(1) "+"
+ [19]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(4) "0x3F"
+ [2]=>
+ int(1)
+ }
+ [21]=>
+ string(1) ";"
+ [22]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 2 --
+array(17) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(306)
+ [1]=>
+ string(7) "0.23E-2"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) "+"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(306)
+ [1]=>
+ string(6) "0.43e2"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [11]=>
+ string(1) "+"
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(306)
+ [1]=>
+ string(3) "0.5"
+ [2]=>
+ int(1)
+ }
+ [14]=>
+ string(1) ";"
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 3 --
+array(11) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(8) ""hello ""
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ string(1) "."
+ [7]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(7) "'world'"
+ [2]=>
+ int(1)
+ }
+ [8]=>
+ string(1) ";"
+ [9]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 4 --
+array(18) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ string(1) "("
+ [6]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) ")"
+ [8]=>
+ string(1) "?"
+ [9]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(4) "true"
+ [2]=>
+ int(1)
+ }
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ string(1) ":"
+ [13]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [14]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(5) "false"
+ [2]=>
+ int(1)
+ }
+ [15]=>
+ string(1) ";"
+ [16]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 5 --
+array(18) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ string(1) "("
+ [6]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) ")"
+ [8]=>
+ string(1) "?"
+ [9]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(5) "FALSE"
+ [2]=>
+ int(1)
+ }
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ string(1) ":"
+ [13]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [14]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(4) "TRUE"
+ [2]=>
+ int(1)
+ }
+ [15]=>
+ string(1) ";"
+ [16]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 6 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(4) "null"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) "|"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(4) "NULL"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation11.phpt b/ext/tokenizer/tests/token_get_all_variation11.phpt
new file mode 100644
index 000000000..c38b050cb
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation11.phpt
@@ -0,0 +1,1147 @@
+--TEST--
+Test token_get_all() function : usage variations - with control structure tokens
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Using different control structure keywords
+ * if..else, elseif - T_IF(301), T_ELSEIF(302), T_ELSE(303)
+ * while - T_WHILE(318)
+ * do...while - T_DO(317)
+ * for - T_ENDFOR(320)
+ * foreach - T_ENDFOREACH(322)
+ * switch...case - T_ENDSWITCH(327), T_CASE(329)
+ * break - T_BREAK(331)
+ * continue - T_CONTINUE(332)
+*/
+
+echo "*** Testing token_get_all() : for control structure tokens ***\n";
+
+// if..elseif....else
+echo "-- with if..elseif..else..tokens --\n";
+
+$source = '<?php
+if($a == true) {
+ echo "$a = true";
+}
+elseif($a == false) {
+ echo false;
+}
+else
+ echo 1;
+?>';
+
+var_dump( token_get_all($source));
+
+// while..., do..while, break, continue
+echo "-- with while..., do..while, switch & continue tokens --\n";
+
+$source = "<?php while(true) {
+echo 'True';
+break;
+}
+do {
+continue;
+}while(false); ?>";
+
+var_dump( token_get_all($source));
+
+// for..., foreach( as )
+echo "-- with for..foreach( as ) tokens --\n";
+
+$source = '<?php for($count=0; $count < 5; $count++) {
+echo $count;
+}
+foreach($values as $index) {
+continue;
+} ?>';
+
+var_dump( token_get_all($source));
+
+// switch..case, default
+echo "-- with switch...case tokens --\n";
+
+$source = '<?php switch($var)
+case 1: break;
+default: echo "default"; ?>';
+
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : for control structure tokens ***
+-- with if..elseif..else..tokens --
+array(49) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ string(1) "("
+ [4]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(2)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(283)
+ [1]=>
+ string(2) "=="
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(4) "true"
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ string(1) ")"
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [11]=>
+ string(1) "{"
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(6) "
+ "
+ [2]=>
+ int(2)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(3)
+ }
+ [14]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [15]=>
+ string(1) """
+ [16]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(3)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(314)
+ [1]=>
+ string(7) " = true"
+ [2]=>
+ int(3)
+ }
+ [18]=>
+ string(1) """
+ [19]=>
+ string(1) ";"
+ [20]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [21]=>
+ string(1) "}"
+ [22]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(302)
+ [1]=>
+ string(6) "elseif"
+ [2]=>
+ int(5)
+ }
+ [24]=>
+ string(1) "("
+ [25]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(5)
+ }
+ [26]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [27]=>
+ array(3) {
+ [0]=>
+ int(283)
+ [1]=>
+ string(2) "=="
+ [2]=>
+ int(5)
+ }
+ [28]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [29]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(5) "false"
+ [2]=>
+ int(5)
+ }
+ [30]=>
+ string(1) ")"
+ [31]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [32]=>
+ string(1) "{"
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(5)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(6)
+ }
+ [35]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [36]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(5) "false"
+ [2]=>
+ int(6)
+ }
+ [37]=>
+ string(1) ";"
+ [38]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+ [39]=>
+ string(1) "}"
+ [40]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(7)
+ }
+ [41]=>
+ array(3) {
+ [0]=>
+ int(303)
+ [1]=>
+ string(4) "else"
+ [2]=>
+ int(8)
+ }
+ [42]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(8)
+ }
+ [43]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(9)
+ }
+ [44]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [45]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(9)
+ }
+ [46]=>
+ string(1) ";"
+ [47]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(9)
+ }
+ [48]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(10)
+ }
+}
+-- with while..., do..while, switch & continue tokens --
+array(33) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(318)
+ [1]=>
+ string(5) "while"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ string(1) "("
+ [3]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(4) "true"
+ [2]=>
+ int(1)
+ }
+ [4]=>
+ string(1) ")"
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ string(1) "{"
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(6) "'True'"
+ [2]=>
+ int(2)
+ }
+ [11]=>
+ string(1) ";"
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(331)
+ [1]=>
+ string(5) "break"
+ [2]=>
+ int(3)
+ }
+ [14]=>
+ string(1) ";"
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [16]=>
+ string(1) "}"
+ [17]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [18]=>
+ array(3) {
+ [0]=>
+ int(317)
+ [1]=>
+ string(2) "do"
+ [2]=>
+ int(5)
+ }
+ [19]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [20]=>
+ string(1) "{"
+ [21]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(332)
+ [1]=>
+ string(8) "continue"
+ [2]=>
+ int(6)
+ }
+ [23]=>
+ string(1) ";"
+ [24]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+ [25]=>
+ string(1) "}"
+ [26]=>
+ array(3) {
+ [0]=>
+ int(318)
+ [1]=>
+ string(5) "while"
+ [2]=>
+ int(7)
+ }
+ [27]=>
+ string(1) "("
+ [28]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(5) "false"
+ [2]=>
+ int(7)
+ }
+ [29]=>
+ string(1) ")"
+ [30]=>
+ string(1) ";"
+ [31]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [32]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(7)
+ }
+}
+-- with for..foreach( as ) tokens --
+array(45) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(320)
+ [1]=>
+ string(3) "for"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ string(1) "("
+ [3]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(6) "$count"
+ [2]=>
+ int(1)
+ }
+ [4]=>
+ string(1) "="
+ [5]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "0"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ string(1) ";"
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(6) "$count"
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) "<"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "5"
+ [2]=>
+ int(1)
+ }
+ [13]=>
+ string(1) ";"
+ [14]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [15]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(6) "$count"
+ [2]=>
+ int(1)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(297)
+ [1]=>
+ string(2) "++"
+ [2]=>
+ int(1)
+ }
+ [17]=>
+ string(1) ")"
+ [18]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [19]=>
+ string(1) "{"
+ [20]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(2)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(6) "$count"
+ [2]=>
+ int(2)
+ }
+ [24]=>
+ string(1) ";"
+ [25]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [26]=>
+ string(1) "}"
+ [27]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [28]=>
+ array(3) {
+ [0]=>
+ int(322)
+ [1]=>
+ string(7) "foreach"
+ [2]=>
+ int(4)
+ }
+ [29]=>
+ string(1) "("
+ [30]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(7) "$values"
+ [2]=>
+ int(4)
+ }
+ [31]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [32]=>
+ array(3) {
+ [0]=>
+ int(326)
+ [1]=>
+ string(2) "as"
+ [2]=>
+ int(4)
+ }
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(6) "$index"
+ [2]=>
+ int(4)
+ }
+ [35]=>
+ string(1) ")"
+ [36]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [37]=>
+ string(1) "{"
+ [38]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [39]=>
+ array(3) {
+ [0]=>
+ int(332)
+ [1]=>
+ string(8) "continue"
+ [2]=>
+ int(5)
+ }
+ [40]=>
+ string(1) ";"
+ [41]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [42]=>
+ string(1) "}"
+ [43]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [44]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(6)
+ }
+}
+-- with switch...case tokens --
+array(23) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(327)
+ [1]=>
+ string(6) "switch"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ string(1) "("
+ [3]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(4) "$var"
+ [2]=>
+ int(1)
+ }
+ [4]=>
+ string(1) ")"
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(329)
+ [1]=>
+ string(4) "case"
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ string(1) ":"
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [11]=>
+ array(3) {
+ [0]=>
+ int(331)
+ [1]=>
+ string(5) "break"
+ [2]=>
+ int(2)
+ }
+ [12]=>
+ string(1) ";"
+ [13]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [14]=>
+ array(3) {
+ [0]=>
+ int(330)
+ [1]=>
+ string(7) "default"
+ [2]=>
+ int(3)
+ }
+ [15]=>
+ string(1) ":"
+ [16]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(3)
+ }
+ [18]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [19]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(9) ""default""
+ [2]=>
+ int(3)
+ }
+ [20]=>
+ string(1) ";"
+ [21]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(3)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation12.phpt b/ext/tokenizer/tests/token_get_all_variation12.phpt
new file mode 100644
index 000000000..8394cb626
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation12.phpt
@@ -0,0 +1,532 @@
+--TEST--
+Test token_get_all() function : usage variations - with predefined language constants
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Testing token_get_all() with following predefined language constants:
+ * __FILE__ - T_FILE(364)
+ * __CLASS__ - T_CLASS_C(360)
+ * __FUNCTION__ - T_FUNC_C(362)
+ * __LINE__ - T_LINE(363)
+ * __METHOD__ - T_METHOD_C(361)
+*/
+
+echo "*** Testing token_get_all() : with language constants ***\n";
+
+// parsing __FILE__ token
+echo "-- with FILE --\n";
+$source = "<?php
+\$fp = fopen(__FILE__, 'r');
+?>";
+var_dump( token_get_all($source));
+
+// parsing __CLASS__ and __FUNCTION__ tokens
+echo "-- with CLASS and FUNCTION --\n";
+$source = '<?php
+class MyClass
+{
+ echo __CLASS__;
+ function myFunction()
+ { echo __FUNCTION__; }
+}
+?>';
+var_dump( token_get_all($source));
+
+// parsing __LINE__ and __METHOD__ tokens
+echo "-- with LINE and METHOD --\n";
+$source = '<?php
+ $a = __LINE__;
+ $b = $b.__METHOD__;
+?>';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : with language constants ***
+-- with FILE --
+array(16) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(3) "$fp"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ string(1) "="
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(5) "fopen"
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ string(1) "("
+ [8]=>
+ array(3) {
+ [0]=>
+ int(364)
+ [1]=>
+ string(8) "__FILE__"
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ string(1) ","
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [11]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(3) "'r'"
+ [2]=>
+ int(2)
+ }
+ [12]=>
+ string(1) ")"
+ [13]=>
+ string(1) ";"
+ [14]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [15]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(3)
+ }
+}
+-- with CLASS and FUNCTION --
+array(30) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php
+"
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(352)
+ [1]=>
+ string(5) "class"
+ [2]=>
+ int(2)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(7) "MyClass"
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [5]=>
+ string(1) "{"
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(3)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(4)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) " "
+ [2]=>
+ int(4)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(360)
+ [1]=>
+ string(9) "__CLASS__"
+ [2]=>
+ int(4)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(4)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(333)
+ [1]=>
+ string(8) "function"
+ [2]=>
+ int(5)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [14]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "myFunction"
+ [2]=>
+ int(5)
+ }
+ [15]=>
+ string(1) "("
+ [16]=>
+ string(1) ")"
+ [17]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(5)
+ }
+ [18]=>
+ string(1) "{"
+ [19]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) " "
+ [2]=>
+ int(6)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(6)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) " "
+ [2]=>
+ int(6)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(362)
+ [1]=>
+ string(12) "__FUNCTION__"
+ [2]=>
+ int(6)
+ }
+ [23]=>
+ string(1) ";"
+ [24]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [25]=>
+ string(1) "}"
+ [26]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+ [27]=>
+ string(1) "}"
+ [28]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(7)
+ }
+ [29]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(8)
+ }
+}
+-- with LINE and METHOD --
+array(19) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php
+"
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) " "
+ [2]=>
+ int(2)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ string(1) "="
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(363)
+ [1]=>
+ string(8) "__LINE__"
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ string(1) ";"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(3)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [11]=>
+ string(1) "="
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(3)
+ }
+ [14]=>
+ string(1) "."
+ [15]=>
+ array(3) {
+ [0]=>
+ int(361)
+ [1]=>
+ string(10) "__METHOD__"
+ [2]=>
+ int(3)
+ }
+ [16]=>
+ string(1) ";"
+ [17]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [18]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(4)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation13.phpt b/ext/tokenizer/tests/token_get_all_variation13.phpt
new file mode 100644
index 000000000..e79545e7e
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation13.phpt
@@ -0,0 +1,1167 @@
+--TEST--
+Test token_get_all() function : usage variations - with class/object constructs
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Testing token_get_all() with different class/object keywords
+ * scope related :
+ * static - T_STATIC(346), global - T_GLOBAL(340),
+ * private - T_PRIVATE(343), public - T_PUBLIC(341),
+ * protected - T_PROTECTED(342)
+ * class/object related :
+ * var - T_VAR(347), abstract - T_ABSTRACT(345),
+ * interface - T_INTERFACE(353), class - T_CLASS(352),
+ * extends - T_EXTENDS(354), implements - T_IMPLEMENTS(355), new - T_NEW(299)
+*/
+
+echo "*** Testing token_get_all() : with class/object constructs ***\n";
+
+$source = '<?php
+interface MyInterface
+{
+ public const var $var = 10;
+}
+abstract class MyClass
+{
+ private var $a;
+ public var $b;
+ protected var $c;
+ static $d;
+ final $e = 10;
+
+ abstract public function myFunction($a);
+}
+class ChildClass extends MyClass implements MyInterface
+{
+ global $value;
+ function myFunction($a)
+ {
+ $a = new ChildClass();
+ if($a instanceof MyClass)
+ echo "object created";
+ }
+}
+ChildClass::myFunction(10);
+?>';
+$tokens = token_get_all($source);
+var_dump($tokens);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : with class/object constructs ***
+array(145) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php
+"
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(353)
+ [1]=>
+ string(9) "interface"
+ [2]=>
+ int(2)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(11) "MyInterface"
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [5]=>
+ string(1) "{"
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(3)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(341)
+ [1]=>
+ string(6) "public"
+ [2]=>
+ int(4)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(334)
+ [1]=>
+ string(5) "const"
+ [2]=>
+ int(4)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [11]=>
+ array(3) {
+ [0]=>
+ int(347)
+ [1]=>
+ string(3) "var"
+ [2]=>
+ int(4)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(4) "$var"
+ [2]=>
+ int(4)
+ }
+ [14]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [15]=>
+ string(1) "="
+ [16]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "10"
+ [2]=>
+ int(4)
+ }
+ [18]=>
+ string(1) ";"
+ [19]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [20]=>
+ string(1) "}"
+ [21]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(345)
+ [1]=>
+ string(8) "abstract"
+ [2]=>
+ int(6)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [24]=>
+ array(3) {
+ [0]=>
+ int(352)
+ [1]=>
+ string(5) "class"
+ [2]=>
+ int(6)
+ }
+ [25]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [26]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(7) "MyClass"
+ [2]=>
+ int(6)
+ }
+ [27]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+ [28]=>
+ string(1) "{"
+ [29]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(7)
+ }
+ [30]=>
+ array(3) {
+ [0]=>
+ int(343)
+ [1]=>
+ string(7) "private"
+ [2]=>
+ int(8)
+ }
+ [31]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [32]=>
+ array(3) {
+ [0]=>
+ int(347)
+ [1]=>
+ string(3) "var"
+ [2]=>
+ int(8)
+ }
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(8)
+ }
+ [35]=>
+ string(1) ";"
+ [36]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(8)
+ }
+ [37]=>
+ array(3) {
+ [0]=>
+ int(341)
+ [1]=>
+ string(6) "public"
+ [2]=>
+ int(9)
+ }
+ [38]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [39]=>
+ array(3) {
+ [0]=>
+ int(347)
+ [1]=>
+ string(3) "var"
+ [2]=>
+ int(9)
+ }
+ [40]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [41]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(9)
+ }
+ [42]=>
+ string(1) ";"
+ [43]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(9)
+ }
+ [44]=>
+ array(3) {
+ [0]=>
+ int(342)
+ [1]=>
+ string(9) "protected"
+ [2]=>
+ int(10)
+ }
+ [45]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [46]=>
+ array(3) {
+ [0]=>
+ int(347)
+ [1]=>
+ string(3) "var"
+ [2]=>
+ int(10)
+ }
+ [47]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [48]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(10)
+ }
+ [49]=>
+ string(1) ";"
+ [50]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(10)
+ }
+ [51]=>
+ array(3) {
+ [0]=>
+ int(346)
+ [1]=>
+ string(6) "static"
+ [2]=>
+ int(11)
+ }
+ [52]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(11)
+ }
+ [53]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$d"
+ [2]=>
+ int(11)
+ }
+ [54]=>
+ string(1) ";"
+ [55]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(11)
+ }
+ [56]=>
+ array(3) {
+ [0]=>
+ int(344)
+ [1]=>
+ string(5) "final"
+ [2]=>
+ int(12)
+ }
+ [57]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(12)
+ }
+ [58]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$e"
+ [2]=>
+ int(12)
+ }
+ [59]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(12)
+ }
+ [60]=>
+ string(1) "="
+ [61]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(12)
+ }
+ [62]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "10"
+ [2]=>
+ int(12)
+ }
+ [63]=>
+ string(1) ";"
+ [64]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(6) "
+
+ "
+ [2]=>
+ int(12)
+ }
+ [65]=>
+ array(3) {
+ [0]=>
+ int(345)
+ [1]=>
+ string(8) "abstract"
+ [2]=>
+ int(14)
+ }
+ [66]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(14)
+ }
+ [67]=>
+ array(3) {
+ [0]=>
+ int(341)
+ [1]=>
+ string(6) "public"
+ [2]=>
+ int(14)
+ }
+ [68]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(14)
+ }
+ [69]=>
+ array(3) {
+ [0]=>
+ int(333)
+ [1]=>
+ string(8) "function"
+ [2]=>
+ int(14)
+ }
+ [70]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(14)
+ }
+ [71]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "myFunction"
+ [2]=>
+ int(14)
+ }
+ [72]=>
+ string(1) "("
+ [73]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(14)
+ }
+ [74]=>
+ string(1) ")"
+ [75]=>
+ string(1) ";"
+ [76]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(14)
+ }
+ [77]=>
+ string(1) "}"
+ [78]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(15)
+ }
+ [79]=>
+ array(3) {
+ [0]=>
+ int(352)
+ [1]=>
+ string(5) "class"
+ [2]=>
+ int(16)
+ }
+ [80]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(16)
+ }
+ [81]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "ChildClass"
+ [2]=>
+ int(16)
+ }
+ [82]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(16)
+ }
+ [83]=>
+ array(3) {
+ [0]=>
+ int(354)
+ [1]=>
+ string(7) "extends"
+ [2]=>
+ int(16)
+ }
+ [84]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(16)
+ }
+ [85]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(7) "MyClass"
+ [2]=>
+ int(16)
+ }
+ [86]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(16)
+ }
+ [87]=>
+ array(3) {
+ [0]=>
+ int(355)
+ [1]=>
+ string(10) "implements"
+ [2]=>
+ int(16)
+ }
+ [88]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(16)
+ }
+ [89]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(11) "MyInterface"
+ [2]=>
+ int(16)
+ }
+ [90]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(16)
+ }
+ [91]=>
+ string(1) "{"
+ [92]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(17)
+ }
+ [93]=>
+ array(3) {
+ [0]=>
+ int(340)
+ [1]=>
+ string(6) "global"
+ [2]=>
+ int(18)
+ }
+ [94]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(18)
+ }
+ [95]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(6) "$value"
+ [2]=>
+ int(18)
+ }
+ [96]=>
+ string(1) ";"
+ [97]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(18)
+ }
+ [98]=>
+ array(3) {
+ [0]=>
+ int(333)
+ [1]=>
+ string(8) "function"
+ [2]=>
+ int(19)
+ }
+ [99]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(19)
+ }
+ [100]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "myFunction"
+ [2]=>
+ int(19)
+ }
+ [101]=>
+ string(1) "("
+ [102]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(19)
+ }
+ [103]=>
+ string(1) ")"
+ [104]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(19)
+ }
+ [105]=>
+ string(1) "{"
+ [106]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(20)
+ }
+ [107]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(21)
+ }
+ [108]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(21)
+ }
+ [109]=>
+ string(1) "="
+ [110]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(21)
+ }
+ [111]=>
+ array(3) {
+ [0]=>
+ int(299)
+ [1]=>
+ string(3) "new"
+ [2]=>
+ int(21)
+ }
+ [112]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(21)
+ }
+ [113]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "ChildClass"
+ [2]=>
+ int(21)
+ }
+ [114]=>
+ string(1) "("
+ [115]=>
+ string(1) ")"
+ [116]=>
+ string(1) ";"
+ [117]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(21)
+ }
+ [118]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(22)
+ }
+ [119]=>
+ string(1) "("
+ [120]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(22)
+ }
+ [121]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(22)
+ }
+ [122]=>
+ array(3) {
+ [0]=>
+ int(288)
+ [1]=>
+ string(10) "instanceof"
+ [2]=>
+ int(22)
+ }
+ [123]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(22)
+ }
+ [124]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(7) "MyClass"
+ [2]=>
+ int(22)
+ }
+ [125]=>
+ string(1) ")"
+ [126]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(7) "
+ "
+ [2]=>
+ int(22)
+ }
+ [127]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(23)
+ }
+ [128]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(23)
+ }
+ [129]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(16) ""object created""
+ [2]=>
+ int(23)
+ }
+ [130]=>
+ string(1) ";"
+ [131]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(23)
+ }
+ [132]=>
+ string(1) "}"
+ [133]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(24)
+ }
+ [134]=>
+ string(1) "}"
+ [135]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(25)
+ }
+ [136]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "ChildClass"
+ [2]=>
+ int(26)
+ }
+ [137]=>
+ array(3) {
+ [0]=>
+ int(375)
+ [1]=>
+ string(2) "::"
+ [2]=>
+ int(26)
+ }
+ [138]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "myFunction"
+ [2]=>
+ int(26)
+ }
+ [139]=>
+ string(1) "("
+ [140]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "10"
+ [2]=>
+ int(26)
+ }
+ [141]=>
+ string(1) ")"
+ [142]=>
+ string(1) ";"
+ [143]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(26)
+ }
+ [144]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(27)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation14.phpt b/ext/tokenizer/tests/token_get_all_variation14.phpt
new file mode 100644
index 000000000..d4e4ec643
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation14.phpt
@@ -0,0 +1,289 @@
+--TEST--
+Test token_get_all() function : usage variations - invalid token values
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Testing token_get_all() with 'source' string containing invalid/unknown token value
+ * unknown tokens - T_UNKNOWN(307)
+*/
+
+echo "*** Testing token_get_all() : with invalid/unknown tokens ***\n";
+
+// with valid php tags and invalid tokens
+echo "-- with valid PHP tags & invlid tokens --\n";
+$source = '<?php
+struct myStruct {
+ variable $a;
+ method() { display $a; }
+}
+?>';
+var_dump( token_get_all($source));
+
+// with invalid open tag for testing entire source to be unkown token
+echo "-- with invlalid PHP open tag & valid tokens --\n";
+$source = '<pli
+echo "hello world"; ?>';
+var_dump( token_get_all($source));
+
+// with invalid PHP tags and invalid tokens
+echo "-- with invalid PHP tags and tokens --\n";
+$source = '<PDP display $a; <';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : with invalid/unknown tokens ***
+-- with valid PHP tags & invlid tokens --
+array(29) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(6) "struct"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(8) "myStruct"
+ [2]=>
+ int(2)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ string(1) "{"
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(2)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(8) "variable"
+ [2]=>
+ int(3)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(3)
+ }
+ [11]=>
+ string(1) ";"
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(3)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(6) "method"
+ [2]=>
+ int(4)
+ }
+ [14]=>
+ string(1) "("
+ [15]=>
+ string(1) ")"
+ [16]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [17]=>
+ string(1) "{"
+ [18]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [19]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(7) "display"
+ [2]=>
+ int(4)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(4)
+ }
+ [22]=>
+ string(1) ";"
+ [23]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [24]=>
+ string(1) "}"
+ [25]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [26]=>
+ string(1) "}"
+ [27]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [28]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(6)
+ }
+}
+-- with invlalid PHP open tag & valid tokens --
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(28) "<pli
+echo "hello world"; ?>"
+ [2]=>
+ int(1)
+ }
+}
+-- with invalid PHP tags and tokens --
+array(2) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(18) "<PDP display $a; "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(1) "<"
+ [2]=>
+ int(1)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation15.phpt b/ext/tokenizer/tests/token_get_all_variation15.phpt
new file mode 100644
index 000000000..03ccd4d9d
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation15.phpt
@@ -0,0 +1,778 @@
+--TEST--
+Test token_get_all() function : usage variations - heredoc string for 'source'
+--INI--
+short_open_tag=On
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Testing token_get_all() with heredoc 'source' string with all different types of token and heredoc string within
+ * <<<EOT - T_START_HEREDOC(371)
+ * EOT - T_END_HEREDOC(372)
+*/
+
+echo "*** Testing token_get_all() : with heredoc source string ***\n";
+
+$source = <<<EOT
+<?=
+ \$a = 2;
+ \$b = 1;
+ \$c = <<<EOS
+ This is to test
+ heredoc string
+EOS;
+ echo \$a + \$b;
+ function myFunction(\$a)
+ {
+ var_dump(\$a);
+ }
+ if(\$b < 10) {
+ \$b++;
+ }
+ else
+ \$b--;
+ while(\$a > 0) {
+ echo "*";
+ \$a--;
+ }
+ myFunction(10);
+?>
+EOT;
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : with heredoc source string ***
+array(103) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(368)
+ [1]=>
+ string(3) "<?="
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(4) "
+ "
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ string(1) "="
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ string(1) ";"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(3)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [11]=>
+ string(1) "="
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(3)
+ }
+ [14]=>
+ string(1) ";"
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(3)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(4)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [18]=>
+ string(1) "="
+ [19]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(371)
+ [1]=>
+ string(7) "<<<EOS
+"
+ [2]=>
+ int(4)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(314)
+ [1]=>
+ string(36) " This is to test
+ heredoc string
+"
+ [2]=>
+ int(5)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(372)
+ [1]=>
+ string(3) "EOS"
+ [2]=>
+ int(7)
+ }
+ [23]=>
+ string(1) ";"
+ [24]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(7)
+ }
+ [25]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(8)
+ }
+ [26]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [27]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(8)
+ }
+ [28]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [29]=>
+ string(1) "+"
+ [30]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [31]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(8)
+ }
+ [32]=>
+ string(1) ";"
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(8)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(333)
+ [1]=>
+ string(8) "function"
+ [2]=>
+ int(9)
+ }
+ [35]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [36]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "myFunction"
+ [2]=>
+ int(9)
+ }
+ [37]=>
+ string(1) "("
+ [38]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(9)
+ }
+ [39]=>
+ string(1) ")"
+ [40]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(9)
+ }
+ [41]=>
+ string(1) "{"
+ [42]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(10)
+ }
+ [43]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(8) "var_dump"
+ [2]=>
+ int(11)
+ }
+ [44]=>
+ string(1) "("
+ [45]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(11)
+ }
+ [46]=>
+ string(1) ")"
+ [47]=>
+ string(1) ";"
+ [48]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(11)
+ }
+ [49]=>
+ string(1) "}"
+ [50]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(12)
+ }
+ [51]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(13)
+ }
+ [52]=>
+ string(1) "("
+ [53]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(13)
+ }
+ [54]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(13)
+ }
+ [55]=>
+ string(1) "<"
+ [56]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(13)
+ }
+ [57]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "10"
+ [2]=>
+ int(13)
+ }
+ [58]=>
+ string(1) ")"
+ [59]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(13)
+ }
+ [60]=>
+ string(1) "{"
+ [61]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(13)
+ }
+ [62]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(14)
+ }
+ [63]=>
+ array(3) {
+ [0]=>
+ int(297)
+ [1]=>
+ string(2) "++"
+ [2]=>
+ int(14)
+ }
+ [64]=>
+ string(1) ";"
+ [65]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(14)
+ }
+ [66]=>
+ string(1) "}"
+ [67]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(15)
+ }
+ [68]=>
+ array(3) {
+ [0]=>
+ int(303)
+ [1]=>
+ string(4) "else"
+ [2]=>
+ int(16)
+ }
+ [69]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(16)
+ }
+ [70]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(17)
+ }
+ [71]=>
+ array(3) {
+ [0]=>
+ int(296)
+ [1]=>
+ string(2) "--"
+ [2]=>
+ int(17)
+ }
+ [72]=>
+ string(1) ";"
+ [73]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(17)
+ }
+ [74]=>
+ array(3) {
+ [0]=>
+ int(318)
+ [1]=>
+ string(5) "while"
+ [2]=>
+ int(18)
+ }
+ [75]=>
+ string(1) "("
+ [76]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(18)
+ }
+ [77]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(18)
+ }
+ [78]=>
+ string(1) ">"
+ [79]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(18)
+ }
+ [80]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "0"
+ [2]=>
+ int(18)
+ }
+ [81]=>
+ string(1) ")"
+ [82]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(18)
+ }
+ [83]=>
+ string(1) "{"
+ [84]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(18)
+ }
+ [85]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(19)
+ }
+ [86]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(19)
+ }
+ [87]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(3) ""*""
+ [2]=>
+ int(19)
+ }
+ [88]=>
+ string(1) ";"
+ [89]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(19)
+ }
+ [90]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(20)
+ }
+ [91]=>
+ array(3) {
+ [0]=>
+ int(296)
+ [1]=>
+ string(2) "--"
+ [2]=>
+ int(20)
+ }
+ [92]=>
+ string(1) ";"
+ [93]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(20)
+ }
+ [94]=>
+ string(1) "}"
+ [95]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(21)
+ }
+ [96]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "myFunction"
+ [2]=>
+ int(22)
+ }
+ [97]=>
+ string(1) "("
+ [98]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "10"
+ [2]=>
+ int(22)
+ }
+ [99]=>
+ string(1) ")"
+ [100]=>
+ string(1) ";"
+ [101]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(22)
+ }
+ [102]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(23)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation16.phpt b/ext/tokenizer/tests/token_get_all_variation16.phpt
new file mode 100644
index 000000000..87646e955
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation16.phpt
@@ -0,0 +1,1001 @@
+--TEST--
+Test token_get_all() function : usage variations - with function constructs
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Testing token_get_all() with different function keywords
+ * function - T_FUNCTION(333), return - T_RETURN(335)
+ * different functions:
+ * include() - T_INCLUDE(262), print() - T_PRINT(266),
+ * isset() - T_ISSET(349), list() - T_LIST(358),
+ * require() - T_REQUIRE(259), empty() - T_EMPTY(350),
+ * declare() - T_DECLARE(324), array() - T_ARRAY(359),
+ * __halt_compiler() - T_HALT_COMPILER(351)
+*/
+
+echo "*** Testing token_get_all() : with different function constructs ***\n";
+
+$source = '<?php
+declare(VALUE=100);
+include("addfile.php");
+require("sumfile.php");
+
+function myFunction($a)
+{
+ if($a % 2)
+ return 1;
+ else
+ exit;
+}
+
+$a = VALUE;
+$b = 20;
+$c = array(1,2);
+$b >>= 2;
+
+if($b <= 0)
+ die;
+else
+ print($b);
+
+list($value1,$value2) = $c;
+if(empty($value1) && !isset($value1)) {
+ __halt_compiler();
+}
+?>';
+$tokens = token_get_all($source);
+var_dump($tokens);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : with different function constructs ***
+array(142) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php
+"
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(324)
+ [1]=>
+ string(7) "declare"
+ [2]=>
+ int(2)
+ }
+ [2]=>
+ string(1) "("
+ [3]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(5) "VALUE"
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ string(1) "="
+ [5]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(3) "100"
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ string(1) ")"
+ [7]=>
+ string(1) ";"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(262)
+ [1]=>
+ string(7) "include"
+ [2]=>
+ int(3)
+ }
+ [10]=>
+ string(1) "("
+ [11]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(13) ""addfile.php""
+ [2]=>
+ int(3)
+ }
+ [12]=>
+ string(1) ")"
+ [13]=>
+ string(1) ";"
+ [14]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [15]=>
+ array(3) {
+ [0]=>
+ int(259)
+ [1]=>
+ string(7) "require"
+ [2]=>
+ int(4)
+ }
+ [16]=>
+ string(1) "("
+ [17]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(13) ""sumfile.php""
+ [2]=>
+ int(4)
+ }
+ [18]=>
+ string(1) ")"
+ [19]=>
+ string(1) ";"
+ [20]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) "
+
+"
+ [2]=>
+ int(4)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(333)
+ [1]=>
+ string(8) "function"
+ [2]=>
+ int(6)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(10) "myFunction"
+ [2]=>
+ int(6)
+ }
+ [24]=>
+ string(1) "("
+ [25]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(6)
+ }
+ [26]=>
+ string(1) ")"
+ [27]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+ [28]=>
+ string(1) "{"
+ [29]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(7)
+ }
+ [30]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(8)
+ }
+ [31]=>
+ string(1) "("
+ [32]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(8)
+ }
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [34]=>
+ string(1) "%"
+ [35]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [36]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(8)
+ }
+ [37]=>
+ string(1) ")"
+ [38]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(8)
+ }
+ [39]=>
+ array(3) {
+ [0]=>
+ int(335)
+ [1]=>
+ string(6) "return"
+ [2]=>
+ int(9)
+ }
+ [40]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [41]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(9)
+ }
+ [42]=>
+ string(1) ";"
+ [43]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(9)
+ }
+ [44]=>
+ array(3) {
+ [0]=>
+ int(303)
+ [1]=>
+ string(4) "else"
+ [2]=>
+ int(10)
+ }
+ [45]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(10)
+ }
+ [46]=>
+ array(3) {
+ [0]=>
+ int(300)
+ [1]=>
+ string(4) "exit"
+ [2]=>
+ int(11)
+ }
+ [47]=>
+ string(1) ";"
+ [48]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(11)
+ }
+ [49]=>
+ string(1) "}"
+ [50]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) "
+
+"
+ [2]=>
+ int(12)
+ }
+ [51]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(14)
+ }
+ [52]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(14)
+ }
+ [53]=>
+ string(1) "="
+ [54]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(14)
+ }
+ [55]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(5) "VALUE"
+ [2]=>
+ int(14)
+ }
+ [56]=>
+ string(1) ";"
+ [57]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(14)
+ }
+ [58]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(15)
+ }
+ [59]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(15)
+ }
+ [60]=>
+ string(1) "="
+ [61]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(15)
+ }
+ [62]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "20"
+ [2]=>
+ int(15)
+ }
+ [63]=>
+ string(1) ";"
+ [64]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(15)
+ }
+ [65]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(16)
+ }
+ [66]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(16)
+ }
+ [67]=>
+ string(1) "="
+ [68]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(16)
+ }
+ [69]=>
+ array(3) {
+ [0]=>
+ int(359)
+ [1]=>
+ string(5) "array"
+ [2]=>
+ int(16)
+ }
+ [70]=>
+ string(1) "("
+ [71]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(16)
+ }
+ [72]=>
+ string(1) ","
+ [73]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(16)
+ }
+ [74]=>
+ string(1) ")"
+ [75]=>
+ string(1) ";"
+ [76]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(16)
+ }
+ [77]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(17)
+ }
+ [78]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(17)
+ }
+ [79]=>
+ array(3) {
+ [0]=>
+ int(267)
+ [1]=>
+ string(3) ">>="
+ [2]=>
+ int(17)
+ }
+ [80]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(17)
+ }
+ [81]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(17)
+ }
+ [82]=>
+ string(1) ";"
+ [83]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) "
+
+"
+ [2]=>
+ int(17)
+ }
+ [84]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(19)
+ }
+ [85]=>
+ string(1) "("
+ [86]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(19)
+ }
+ [87]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(19)
+ }
+ [88]=>
+ array(3) {
+ [0]=>
+ int(285)
+ [1]=>
+ string(2) "<="
+ [2]=>
+ int(19)
+ }
+ [89]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(19)
+ }
+ [90]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "0"
+ [2]=>
+ int(19)
+ }
+ [91]=>
+ string(1) ")"
+ [92]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(19)
+ }
+ [93]=>
+ array(3) {
+ [0]=>
+ int(300)
+ [1]=>
+ string(3) "die"
+ [2]=>
+ int(20)
+ }
+ [94]=>
+ string(1) ";"
+ [95]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(20)
+ }
+ [96]=>
+ array(3) {
+ [0]=>
+ int(303)
+ [1]=>
+ string(4) "else"
+ [2]=>
+ int(21)
+ }
+ [97]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(21)
+ }
+ [98]=>
+ array(3) {
+ [0]=>
+ int(266)
+ [1]=>
+ string(5) "print"
+ [2]=>
+ int(22)
+ }
+ [99]=>
+ string(1) "("
+ [100]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(22)
+ }
+ [101]=>
+ string(1) ")"
+ [102]=>
+ string(1) ";"
+ [103]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) "
+
+"
+ [2]=>
+ int(22)
+ }
+ [104]=>
+ array(3) {
+ [0]=>
+ int(358)
+ [1]=>
+ string(4) "list"
+ [2]=>
+ int(24)
+ }
+ [105]=>
+ string(1) "("
+ [106]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(7) "$value1"
+ [2]=>
+ int(24)
+ }
+ [107]=>
+ string(1) ","
+ [108]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(7) "$value2"
+ [2]=>
+ int(24)
+ }
+ [109]=>
+ string(1) ")"
+ [110]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(24)
+ }
+ [111]=>
+ string(1) "="
+ [112]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(24)
+ }
+ [113]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(24)
+ }
+ [114]=>
+ string(1) ";"
+ [115]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(24)
+ }
+ [116]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(25)
+ }
+ [117]=>
+ string(1) "("
+ [118]=>
+ array(3) {
+ [0]=>
+ int(350)
+ [1]=>
+ string(5) "empty"
+ [2]=>
+ int(25)
+ }
+ [119]=>
+ string(1) "("
+ [120]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(7) "$value1"
+ [2]=>
+ int(25)
+ }
+ [121]=>
+ string(1) ")"
+ [122]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(25)
+ }
+ [123]=>
+ array(3) {
+ [0]=>
+ int(279)
+ [1]=>
+ string(2) "&&"
+ [2]=>
+ int(25)
+ }
+ [124]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(25)
+ }
+ [125]=>
+ string(1) "!"
+ [126]=>
+ array(3) {
+ [0]=>
+ int(349)
+ [1]=>
+ string(5) "isset"
+ [2]=>
+ int(25)
+ }
+ [127]=>
+ string(1) "("
+ [128]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(7) "$value1"
+ [2]=>
+ int(25)
+ }
+ [129]=>
+ string(1) ")"
+ [130]=>
+ string(1) ")"
+ [131]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(25)
+ }
+ [132]=>
+ string(1) "{"
+ [133]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(25)
+ }
+ [134]=>
+ array(3) {
+ [0]=>
+ int(351)
+ [1]=>
+ string(15) "__halt_compiler"
+ [2]=>
+ int(26)
+ }
+ [135]=>
+ string(1) "("
+ [136]=>
+ string(1) ")"
+ [137]=>
+ string(1) ";"
+ [138]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(26)
+ }
+ [139]=>
+ string(1) "}"
+ [140]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(27)
+ }
+ [141]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(28)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation17.phpt b/ext/tokenizer/tests/token_get_all_variation17.phpt
new file mode 100644
index 000000000..e10fb5851
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation17.phpt
@@ -0,0 +1,611 @@
+--TEST--
+Test token_get_all() function : usage variations - with exception keywords
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Testing token_get_all() with different exception keywords
+ * try - T_TRY(336),
+ * catch - T_CATCH(337),
+ * throw - T_THROW(338)
+*/
+
+echo "*** Testing token_get_all() : with exception keywords ***\n";
+
+$source = '<?php
+function inverse($x)
+{
+ if($x == 0) {
+ throw new Exception("Divison by zero");
+ else
+ return 1/$x;
+}
+try {
+ echo inverse(0);
+ echo inverse(5);
+} catch(Exception $e) {
+ echo "caught exception:";
+}
+?>';
+$tokens = token_get_all($source);
+var_dump($tokens);
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : with exception keywords ***
+array(81) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php
+"
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(333)
+ [1]=>
+ string(8) "function"
+ [2]=>
+ int(2)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(7) "inverse"
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ string(1) "("
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$x"
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ string(1) ")"
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [8]=>
+ string(1) "{"
+ [9]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(3)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(4)
+ }
+ [11]=>
+ string(1) "("
+ [12]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$x"
+ [2]=>
+ int(4)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [14]=>
+ array(3) {
+ [0]=>
+ int(283)
+ [1]=>
+ string(2) "=="
+ [2]=>
+ int(4)
+ }
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "0"
+ [2]=>
+ int(4)
+ }
+ [17]=>
+ string(1) ")"
+ [18]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [19]=>
+ string(1) "{"
+ [20]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(4)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(338)
+ [1]=>
+ string(5) "throw"
+ [2]=>
+ int(5)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(299)
+ [1]=>
+ string(3) "new"
+ [2]=>
+ int(5)
+ }
+ [24]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [25]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(9) "Exception"
+ [2]=>
+ int(5)
+ }
+ [26]=>
+ string(1) "("
+ [27]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(17) ""Divison by zero""
+ [2]=>
+ int(5)
+ }
+ [28]=>
+ string(1) ")"
+ [29]=>
+ string(1) ";"
+ [30]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(5)
+ }
+ [31]=>
+ array(3) {
+ [0]=>
+ int(303)
+ [1]=>
+ string(4) "else"
+ [2]=>
+ int(6)
+ }
+ [32]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(6)
+ }
+ [33]=>
+ array(3) {
+ [0]=>
+ int(335)
+ [1]=>
+ string(6) "return"
+ [2]=>
+ int(7)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [35]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(7)
+ }
+ [36]=>
+ string(1) "/"
+ [37]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$x"
+ [2]=>
+ int(7)
+ }
+ [38]=>
+ string(1) ";"
+ [39]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(7)
+ }
+ [40]=>
+ string(1) "}"
+ [41]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(8)
+ }
+ [42]=>
+ array(3) {
+ [0]=>
+ int(336)
+ [1]=>
+ string(3) "try"
+ [2]=>
+ int(9)
+ }
+ [43]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [44]=>
+ string(1) "{"
+ [45]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(9)
+ }
+ [46]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(10)
+ }
+ [47]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [48]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(7) "inverse"
+ [2]=>
+ int(10)
+ }
+ [49]=>
+ string(1) "("
+ [50]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "0"
+ [2]=>
+ int(10)
+ }
+ [51]=>
+ string(1) ")"
+ [52]=>
+ string(1) ";"
+ [53]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(10)
+ }
+ [54]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(11)
+ }
+ [55]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(11)
+ }
+ [56]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(7) "inverse"
+ [2]=>
+ int(11)
+ }
+ [57]=>
+ string(1) "("
+ [58]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "5"
+ [2]=>
+ int(11)
+ }
+ [59]=>
+ string(1) ")"
+ [60]=>
+ string(1) ";"
+ [61]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(11)
+ }
+ [62]=>
+ string(1) "}"
+ [63]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(12)
+ }
+ [64]=>
+ array(3) {
+ [0]=>
+ int(337)
+ [1]=>
+ string(5) "catch"
+ [2]=>
+ int(12)
+ }
+ [65]=>
+ string(1) "("
+ [66]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(9) "Exception"
+ [2]=>
+ int(12)
+ }
+ [67]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(12)
+ }
+ [68]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$e"
+ [2]=>
+ int(12)
+ }
+ [69]=>
+ string(1) ")"
+ [70]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(12)
+ }
+ [71]=>
+ string(1) "{"
+ [72]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(5) "
+ "
+ [2]=>
+ int(12)
+ }
+ [73]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(13)
+ }
+ [74]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(13)
+ }
+ [75]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(19) ""caught exception:""
+ [2]=>
+ int(13)
+ }
+ [76]=>
+ string(1) ";"
+ [77]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(13)
+ }
+ [78]=>
+ string(1) "}"
+ [79]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(14)
+ }
+ [80]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(15)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation18.phpt b/ext/tokenizer/tests/token_get_all_variation18.phpt
new file mode 100644
index 000000000..309b7e626
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation18.phpt
@@ -0,0 +1,118 @@
+--TEST--
+Test token_get_all() function : usage variations - with HTML code
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Testing token_get_all() with source string containing HTML code with PHP
+ * HTML tags are considered to be T_INLINE_HTML(311)
+*/
+
+echo "*** Testing token_get_all() : 'source' string with HTML tags ***\n";
+
+$source = '
+<html>
+<body>
+ Testing HTML
+</body>
+</html>"
+
+<?php
+ echo "php code with HTML";
+?>';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with HTML tags ***
+array(9) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(311)
+ [1]=>
+ string(48) "
+<html>
+<body>
+ Testing HTML
+</body>
+</html>"
+
+"
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(8)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(8)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(9)
+ }
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(20) ""php code with HTML""
+ [2]=>
+ int(9)
+ }
+ [6]=>
+ string(1) ";"
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(9)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(10)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation19.phpt b/ext/tokenizer/tests/token_get_all_variation19.phpt
new file mode 100644
index 000000000..ae614054f
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation19.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Reconstructing a script using token_get_all()
+--FILE--
+<?php
+
+$phpstr = '
+<?php
+
+// A php script to test token_get_all()
+
+/* a different
+type of
+comment */
+
+// a class
+class TestClass {
+ public function foo() {
+ echo "Called foo()\n";
+ }
+}
+
+$a = new TestClass();
+$a->foo();
+
+for ($i = 0; $i < 10; $i++) {
+ echo "Loop iteration $i\n";
+}
+
+?>';
+
+$token_array = token_get_all($phpstr);
+
+$script = "";
+// reconstruct a script (without open/close tags) from the token array
+foreach ($token_array as $token) {
+ if (is_array($token)) {
+ if (strncmp($token[1], '<?php', 5) == 0) {
+ continue;
+ }
+ if (strncmp($token[1], '?>', 2) == 0) {
+ continue;
+ }
+ $script .= $token[1];
+ } else {
+ $script .= $token;
+ }
+}
+
+var_dump($script);
+
+eval($script);
+
+?>
+--EXPECT--
+string(259) "
+
+// A php script to test token_get_all()
+
+/* a different
+type of
+comment */
+
+// a class
+class TestClass {
+ public function foo() {
+ echo "Called foo()\n";
+ }
+}
+
+$a = new TestClass();
+$a->foo();
+
+for ($i = 0; $i < 10; $i++) {
+ echo "Loop iteration $i\n";
+}
+
+"
+Called foo()
+Loop iteration 0
+Loop iteration 1
+Loop iteration 2
+Loop iteration 3
+Loop iteration 4
+Loop iteration 5
+Loop iteration 6
+Loop iteration 7
+Loop iteration 8
+Loop iteration 9
diff --git a/ext/tokenizer/tests/token_get_all_variation2.phpt b/ext/tokenizer/tests/token_get_all_variation2.phpt
new file mode 100644
index 000000000..d4f62dcab
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation2.phpt
@@ -0,0 +1,429 @@
+--TEST--
+Test token_get_all() function : usage variations - with different arithmetic operators
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing 'source' argument with different arithmetic operators to test them for token
+ * Arithmetic operators: +, -, *, /, % are not listed as specific operator tokens,
+ * so they are expected to return string - T_STRING
+*/
+
+echo "*** Testing token_get_all() : 'source' string with different arithmetic operators ***\n";
+
+// arithmetic operators - '+', '-', '*', '/', '%'
+$source = array (
+ '<?php $a = 1 + 2; ?>',
+ '<?php $b = $b - 2; ?>',
+ '<?php $c = $a * $b; ?>',
+ '<?php $a = $b % 2; ?>'
+);
+for($count = 0; $count < count($source); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( token_get_all($source[$count]));
+}
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different arithmetic operators ***
+-- Iteration 1 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) "+"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 2 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) "-"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 3 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) "*"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 4 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ string(1) "%"
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation3.phpt b/ext/tokenizer/tests/token_get_all_variation3.phpt
new file mode 100644
index 000000000..267e8c5b4
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation3.phpt
@@ -0,0 +1,568 @@
+--TEST--
+Test token_get_all() function : usage variations - with logical operators
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing 'source' argument with different logical operators to test them for tokens
+ * and - T_AND_LOGICAL_AND(265),
+ * or - T_LOGICAL_OR(263),
+ * xor - T_LOGICAL_XOR(264),
+ * && - T_BOOLEAN_AND(279),
+ * || - T_BOOLEAN_OR(278)
+*/
+
+echo "*** Testing token_get_all() : 'source' string with different logical operators ***\n";
+
+// logical operators : 'and', 'or', 'xor', '&&', '||'
+$source = array (
+ '<?php $a = 1 and 024; ?>',
+ '<?php $b = $b or 0X1E; ?>',
+ '<?php $c = $a xor $b; ?>',
+ '<?php $a = $b && 2; ?>',
+ '<?php $b = $b || 1; ?>'
+);
+for($count = 0; $count < count($source); $count++) {
+ echo "-- Iteration ".($count + 1)." --\n";
+ var_dump( token_get_all($source[$count]));
+}
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different logical operators ***
+-- Iteration 1 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(265)
+ [1]=>
+ string(3) "and"
+ [2]=>
+ int(1)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(3) "024"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 2 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(263)
+ [1]=>
+ string(2) "or"
+ [2]=>
+ int(1)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(4) "0X1E"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 3 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(264)
+ [1]=>
+ string(3) "xor"
+ [2]=>
+ int(1)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 4 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(279)
+ [1]=>
+ string(2) "&&"
+ [2]=>
+ int(1)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+-- Iteration 5 --
+array(13) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(1)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(278)
+ [1]=>
+ string(2) "||"
+ [2]=>
+ int(1)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(1)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(1)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(1)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation4.phpt b/ext/tokenizer/tests/token_get_all_variation4.phpt
new file mode 100644
index 000000000..e63a917ea
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation4.phpt
@@ -0,0 +1,747 @@
+--TEST--
+Test token_get_all() function : usage variations - with comparison operators
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing 'source' argument with different comparison operators to test them for tokens
+ * == - T_IS_EQUAL(283), === - T_IS_IDENTICAL(281),
+ * >= - T_IS_GREATER_OR_EQUAL(284), <= - T_IS_LESS_OR_EQUAL(285)
+ * != - T_IS_NOT_EQUAL, <> - T_IS_NOT_EQUAL(282), !== - T_IS_NOT_IDENTICAL(280)
+*/
+
+echo "*** Testing token_get_all() : 'source' string with different comparison operators ***\n";
+
+// comparison operators : '==', '===', '>=', '<=', '!=', '!==', '<>'
+$source = '<?php
+if($a == 0)
+ echo "== 0";
+elseif($a === 2)
+ echo "=== 2";
+elseif($a >= 10 && $a <= 20)
+ echo ">= 10 & <=20";
+elseif($a != 1 || $a <> 1)
+ echo "!= 1";
+elseif($a !== 1)
+ echo "!==1";
+?>';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different comparison operators ***
+array(89) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ string(1) "("
+ [4]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(2)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(283)
+ [1]=>
+ string(2) "=="
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "0"
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ string(1) ")"
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(4) "
+ "
+ [2]=>
+ int(2)
+ }
+ [11]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(3)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(6) ""== 0""
+ [2]=>
+ int(3)
+ }
+ [14]=>
+ string(1) ";"
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(302)
+ [1]=>
+ string(6) "elseif"
+ [2]=>
+ int(4)
+ }
+ [17]=>
+ string(1) "("
+ [18]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(4)
+ }
+ [19]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(281)
+ [1]=>
+ string(3) "==="
+ [2]=>
+ int(4)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(4)
+ }
+ [23]=>
+ string(1) ")"
+ [24]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(4)
+ }
+ [25]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(5)
+ }
+ [26]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [27]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(7) ""=== 2""
+ [2]=>
+ int(5)
+ }
+ [28]=>
+ string(1) ";"
+ [29]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [30]=>
+ array(3) {
+ [0]=>
+ int(302)
+ [1]=>
+ string(6) "elseif"
+ [2]=>
+ int(6)
+ }
+ [31]=>
+ string(1) "("
+ [32]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(6)
+ }
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(284)
+ [1]=>
+ string(2) ">="
+ [2]=>
+ int(6)
+ }
+ [35]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [36]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "10"
+ [2]=>
+ int(6)
+ }
+ [37]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [38]=>
+ array(3) {
+ [0]=>
+ int(279)
+ [1]=>
+ string(2) "&&"
+ [2]=>
+ int(6)
+ }
+ [39]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [40]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(6)
+ }
+ [41]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [42]=>
+ array(3) {
+ [0]=>
+ int(285)
+ [1]=>
+ string(2) "<="
+ [2]=>
+ int(6)
+ }
+ [43]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [44]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "20"
+ [2]=>
+ int(6)
+ }
+ [45]=>
+ string(1) ")"
+ [46]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(6)
+ }
+ [47]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(7)
+ }
+ [48]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [49]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(14) "">= 10 & <=20""
+ [2]=>
+ int(7)
+ }
+ [50]=>
+ string(1) ";"
+ [51]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(7)
+ }
+ [52]=>
+ array(3) {
+ [0]=>
+ int(302)
+ [1]=>
+ string(6) "elseif"
+ [2]=>
+ int(8)
+ }
+ [53]=>
+ string(1) "("
+ [54]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(8)
+ }
+ [55]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [56]=>
+ array(3) {
+ [0]=>
+ int(282)
+ [1]=>
+ string(2) "!="
+ [2]=>
+ int(8)
+ }
+ [57]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [58]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(8)
+ }
+ [59]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [60]=>
+ array(3) {
+ [0]=>
+ int(278)
+ [1]=>
+ string(2) "||"
+ [2]=>
+ int(8)
+ }
+ [61]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [62]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(8)
+ }
+ [63]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [64]=>
+ array(3) {
+ [0]=>
+ int(282)
+ [1]=>
+ string(2) "<>"
+ [2]=>
+ int(8)
+ }
+ [65]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [66]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(8)
+ }
+ [67]=>
+ string(1) ")"
+ [68]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(8)
+ }
+ [69]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(9)
+ }
+ [70]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [71]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(6) ""!= 1""
+ [2]=>
+ int(9)
+ }
+ [72]=>
+ string(1) ";"
+ [73]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(9)
+ }
+ [74]=>
+ array(3) {
+ [0]=>
+ int(302)
+ [1]=>
+ string(6) "elseif"
+ [2]=>
+ int(10)
+ }
+ [75]=>
+ string(1) "("
+ [76]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(10)
+ }
+ [77]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [78]=>
+ array(3) {
+ [0]=>
+ int(280)
+ [1]=>
+ string(3) "!=="
+ [2]=>
+ int(10)
+ }
+ [79]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [80]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(10)
+ }
+ [81]=>
+ string(1) ")"
+ [82]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(3) "
+ "
+ [2]=>
+ int(10)
+ }
+ [83]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(11)
+ }
+ [84]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(11)
+ }
+ [85]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(6) ""!==1""
+ [2]=>
+ int(11)
+ }
+ [86]=>
+ string(1) ";"
+ [87]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(11)
+ }
+ [88]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(12)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation5.phpt b/ext/tokenizer/tests/token_get_all_variation5.phpt
new file mode 100644
index 000000000..5a7d16a36
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation5.phpt
@@ -0,0 +1,798 @@
+--TEST--
+Test token_get_all() function : usage variations - with assignment operators
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing 'source' argument with different assignment operators to test them for tokens
+ * += - T_PLUS_EQUAL(277), -= - T_MINUS-EQUAL(276),
+ * *= - T_MUL_EQUAL(275), /= - T_DIVIDE_EQUAL(274),
+ * %= - T_MOD_EQUAL(272), &= - T_AND_EQUAL(271),
+ * |= - T_OR_EQUAL(271), ^= - T_EXOR_EQUAL(269),
+ * >>= - T_SR_EQUAL(267), <<= - T_SL_EQUAL(268), .= - T_CONCAT_EQUAL(273)
+*/
+
+echo "*** Testing token_get_all() : 'source' string with different assignment operators ***\n";
+
+// assignment operators : '+=', '-=', '*=', '/=', '%=', '&=', '|=', '^=', '>>=', '<<=', '.='
+$source = '<?php
+$a = 1, $b = 2;
+$c += $b;
+$b -= $a;
+$a *= 2;
+$d /= 10.50;
+$a %= 10.50;
+$b &= $c;
+$c |= 1;
+$d ^= 5;
+$a >>= 1;
+$b <<= 2;
+$d .= "hello world";
+?>';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different assignment operators ***
+array(94) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ string(1) "="
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ string(1) ","
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(2)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [11]=>
+ string(1) "="
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(2)
+ }
+ [14]=>
+ string(1) ";"
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(3)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [18]=>
+ array(3) {
+ [0]=>
+ int(277)
+ [1]=>
+ string(2) "+="
+ [2]=>
+ int(3)
+ }
+ [19]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(3)
+ }
+ [21]=>
+ string(1) ";"
+ [22]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(4)
+ }
+ [24]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [25]=>
+ array(3) {
+ [0]=>
+ int(276)
+ [1]=>
+ string(2) "-="
+ [2]=>
+ int(4)
+ }
+ [26]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [27]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(4)
+ }
+ [28]=>
+ string(1) ";"
+ [29]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [30]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(5)
+ }
+ [31]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [32]=>
+ array(3) {
+ [0]=>
+ int(275)
+ [1]=>
+ string(2) "*="
+ [2]=>
+ int(5)
+ }
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(5)
+ }
+ [35]=>
+ string(1) ";"
+ [36]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [37]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$d"
+ [2]=>
+ int(6)
+ }
+ [38]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [39]=>
+ array(3) {
+ [0]=>
+ int(274)
+ [1]=>
+ string(2) "/="
+ [2]=>
+ int(6)
+ }
+ [40]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [41]=>
+ array(3) {
+ [0]=>
+ int(306)
+ [1]=>
+ string(5) "10.50"
+ [2]=>
+ int(6)
+ }
+ [42]=>
+ string(1) ";"
+ [43]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+ [44]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(7)
+ }
+ [45]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [46]=>
+ array(3) {
+ [0]=>
+ int(272)
+ [1]=>
+ string(2) "%="
+ [2]=>
+ int(7)
+ }
+ [47]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [48]=>
+ array(3) {
+ [0]=>
+ int(306)
+ [1]=>
+ string(5) "10.50"
+ [2]=>
+ int(7)
+ }
+ [49]=>
+ string(1) ";"
+ [50]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(7)
+ }
+ [51]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(8)
+ }
+ [52]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [53]=>
+ array(3) {
+ [0]=>
+ int(271)
+ [1]=>
+ string(2) "&="
+ [2]=>
+ int(8)
+ }
+ [54]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [55]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(8)
+ }
+ [56]=>
+ string(1) ";"
+ [57]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(8)
+ }
+ [58]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(9)
+ }
+ [59]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [60]=>
+ array(3) {
+ [0]=>
+ int(270)
+ [1]=>
+ string(2) "|="
+ [2]=>
+ int(9)
+ }
+ [61]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [62]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(9)
+ }
+ [63]=>
+ string(1) ";"
+ [64]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(9)
+ }
+ [65]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$d"
+ [2]=>
+ int(10)
+ }
+ [66]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [67]=>
+ array(3) {
+ [0]=>
+ int(269)
+ [1]=>
+ string(2) "^="
+ [2]=>
+ int(10)
+ }
+ [68]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [69]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "5"
+ [2]=>
+ int(10)
+ }
+ [70]=>
+ string(1) ";"
+ [71]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(10)
+ }
+ [72]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(11)
+ }
+ [73]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(11)
+ }
+ [74]=>
+ array(3) {
+ [0]=>
+ int(267)
+ [1]=>
+ string(3) ">>="
+ [2]=>
+ int(11)
+ }
+ [75]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(11)
+ }
+ [76]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(11)
+ }
+ [77]=>
+ string(1) ";"
+ [78]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(11)
+ }
+ [79]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(12)
+ }
+ [80]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(12)
+ }
+ [81]=>
+ array(3) {
+ [0]=>
+ int(268)
+ [1]=>
+ string(3) "<<="
+ [2]=>
+ int(12)
+ }
+ [82]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(12)
+ }
+ [83]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(12)
+ }
+ [84]=>
+ string(1) ";"
+ [85]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(12)
+ }
+ [86]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$d"
+ [2]=>
+ int(13)
+ }
+ [87]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(13)
+ }
+ [88]=>
+ array(3) {
+ [0]=>
+ int(273)
+ [1]=>
+ string(2) ".="
+ [2]=>
+ int(13)
+ }
+ [89]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(13)
+ }
+ [90]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(13) ""hello world""
+ [2]=>
+ int(13)
+ }
+ [91]=>
+ string(1) ";"
+ [92]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(13)
+ }
+ [93]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(14)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation6.phpt b/ext/tokenizer/tests/token_get_all_variation6.phpt
new file mode 100644
index 000000000..5d81104a2
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation6.phpt
@@ -0,0 +1,392 @@
+--TEST--
+Test token_get_all() function : usage variations - with bitwise operators
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing 'source' argument with different bitwise operators to test them for token
+ * << - T_SL(287)
+ * >> - T_SR(286)
+*/
+
+echo "*** Testing token_get_all() : 'source' string with different bitwise operators ***\n";
+
+// bitwise operators : '<<' , '>>'
+$source = '<?php
+$a = 2, $b = 4;
+$a = $a << 2;
+$b = $b >> 2;
+var_dump($a);
+var_dump($b);
+?>';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different bitwise operators ***
+array(50) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php
+"
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(2)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ string(1) "="
+ [4]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ string(1) ","
+ [7]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [8]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [10]=>
+ string(1) "="
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "4"
+ [2]=>
+ int(2)
+ }
+ [13]=>
+ string(1) ";"
+ [14]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [15]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(3)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [17]=>
+ string(1) "="
+ [18]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [19]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(3)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(287)
+ [1]=>
+ string(2) "<<"
+ [2]=>
+ int(3)
+ }
+ [22]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(3)
+ }
+ [24]=>
+ string(1) ";"
+ [25]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [26]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(4)
+ }
+ [27]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [28]=>
+ string(1) "="
+ [29]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [30]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(4)
+ }
+ [31]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [32]=>
+ array(3) {
+ [0]=>
+ int(286)
+ [1]=>
+ string(2) ">>"
+ [2]=>
+ int(4)
+ }
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ int(4)
+ }
+ [35]=>
+ string(1) ";"
+ [36]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [37]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(8) "var_dump"
+ [2]=>
+ int(5)
+ }
+ [38]=>
+ string(1) "("
+ [39]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(5)
+ }
+ [40]=>
+ string(1) ")"
+ [41]=>
+ string(1) ";"
+ [42]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [43]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(8) "var_dump"
+ [2]=>
+ int(6)
+ }
+ [44]=>
+ string(1) "("
+ [45]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(6)
+ }
+ [46]=>
+ string(1) ")"
+ [47]=>
+ string(1) ";"
+ [48]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+ [49]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(7)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation7.phpt b/ext/tokenizer/tests/token_get_all_variation7.phpt
new file mode 100644
index 000000000..5ba856384
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation7.phpt
@@ -0,0 +1,259 @@
+--TEST--
+Test token_get_all() function : usage variations - with increment/decrement operators
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing 'source' argument with different increment/decrement operators to test them for token
+ * ++ - T_INC(297)
+ * -- - T_DEC(296)
+*/
+
+echo "*** Testing token_get_all() : 'source' string with different increment/decrement operators ***\n";
+
+// increment/decrement operators : '++' , '--'
+$source = '<?php
+$a = 10, $b = 5;
+$a++;
+$b--;
+echo $a;
+?>';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different increment/decrement operators ***
+array(30) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ string(1) "="
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "10"
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ string(1) ","
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(2)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [11]=>
+ string(1) "="
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "5"
+ [2]=>
+ int(2)
+ }
+ [14]=>
+ string(1) ";"
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(3)
+ }
+ [17]=>
+ array(3) {
+ [0]=>
+ int(297)
+ [1]=>
+ string(2) "++"
+ [2]=>
+ int(3)
+ }
+ [18]=>
+ string(1) ";"
+ [19]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(4)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(296)
+ [1]=>
+ string(2) "--"
+ [2]=>
+ int(4)
+ }
+ [22]=>
+ string(1) ";"
+ [23]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [24]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(5)
+ }
+ [25]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [26]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(5)
+ }
+ [27]=>
+ string(1) ";"
+ [28]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [29]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(6)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation8.phpt b/ext/tokenizer/tests/token_get_all_variation8.phpt
new file mode 100644
index 000000000..5c761f6cb
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation8.phpt
@@ -0,0 +1,832 @@
+--TEST--
+Test token_get_all() function : usage variations - with type casting operators
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing 'source' argument with different type casting operators to test them for token
+ * (int)/(integer) - T_INT_CAST(295), (float)/(real)/(double) - T_DOUBLE_CAST(294),
+ * (string) - T_STRING_CAST(293), (bool)/(boolean) - T_BOOL_CAST(290),
+ * (unset) - T_UNSET_CAST(289)
+*/
+
+echo "*** Testing token_get_all() : 'source' string with different type casting operators ***\n";
+
+// type casting operators : (int), (integer), (float), (real), (double), (string), (array), (object), (bool), (boolean),(unset)
+$source = '<?php
+$a = 1, $b = 10.5
+$c = (int)$b + $a;
+$d = (float)$a + $b;
+$e = (string)$a.(string)$b;
+if((bool)$a) echo "true";
+if(!(boolean)$b) echo "false";
+$c = $c + (integer) 123.4e2;
+$d = $c - (real) 12;
+$b = (unset)$a;
+?>';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different type casting operators ***
+array(108) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [4]=>
+ string(1) "="
+ [5]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(1) "1"
+ [2]=>
+ int(2)
+ }
+ [7]=>
+ string(1) ","
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(2)
+ }
+ [10]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [11]=>
+ string(1) "="
+ [12]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(2)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(306)
+ [1]=>
+ string(4) "10.5"
+ [2]=>
+ int(2)
+ }
+ [14]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(2)
+ }
+ [15]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(3)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [17]=>
+ string(1) "="
+ [18]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [19]=>
+ array(3) {
+ [0]=>
+ int(295)
+ [1]=>
+ string(5) "(int)"
+ [2]=>
+ int(3)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(3)
+ }
+ [21]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [22]=>
+ string(1) "+"
+ [23]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(3)
+ }
+ [24]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(3)
+ }
+ [25]=>
+ string(1) ";"
+ [26]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(3)
+ }
+ [27]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$d"
+ [2]=>
+ int(4)
+ }
+ [28]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [29]=>
+ string(1) "="
+ [30]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [31]=>
+ array(3) {
+ [0]=>
+ int(294)
+ [1]=>
+ string(7) "(float)"
+ [2]=>
+ int(4)
+ }
+ [32]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(4)
+ }
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [34]=>
+ string(1) "+"
+ [35]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(4)
+ }
+ [36]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(4)
+ }
+ [37]=>
+ string(1) ";"
+ [38]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [39]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$e"
+ [2]=>
+ int(5)
+ }
+ [40]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [41]=>
+ string(1) "="
+ [42]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(5)
+ }
+ [43]=>
+ array(3) {
+ [0]=>
+ int(293)
+ [1]=>
+ string(8) "(string)"
+ [2]=>
+ int(5)
+ }
+ [44]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(5)
+ }
+ [45]=>
+ string(1) "."
+ [46]=>
+ array(3) {
+ [0]=>
+ int(293)
+ [1]=>
+ string(8) "(string)"
+ [2]=>
+ int(5)
+ }
+ [47]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(5)
+ }
+ [48]=>
+ string(1) ";"
+ [49]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [50]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(6)
+ }
+ [51]=>
+ string(1) "("
+ [52]=>
+ array(3) {
+ [0]=>
+ int(290)
+ [1]=>
+ string(6) "(bool)"
+ [2]=>
+ int(6)
+ }
+ [53]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(6)
+ }
+ [54]=>
+ string(1) ")"
+ [55]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [56]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(6)
+ }
+ [57]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(6)
+ }
+ [58]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(6) ""true""
+ [2]=>
+ int(6)
+ }
+ [59]=>
+ string(1) ";"
+ [60]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+ [61]=>
+ array(3) {
+ [0]=>
+ int(301)
+ [1]=>
+ string(2) "if"
+ [2]=>
+ int(7)
+ }
+ [62]=>
+ string(1) "("
+ [63]=>
+ string(1) "!"
+ [64]=>
+ array(3) {
+ [0]=>
+ int(290)
+ [1]=>
+ string(9) "(boolean)"
+ [2]=>
+ int(7)
+ }
+ [65]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(7)
+ }
+ [66]=>
+ string(1) ")"
+ [67]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [68]=>
+ array(3) {
+ [0]=>
+ int(316)
+ [1]=>
+ string(4) "echo"
+ [2]=>
+ int(7)
+ }
+ [69]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [70]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(7) ""false""
+ [2]=>
+ int(7)
+ }
+ [71]=>
+ string(1) ";"
+ [72]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(7)
+ }
+ [73]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(8)
+ }
+ [74]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [75]=>
+ string(1) "="
+ [76]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [77]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(8)
+ }
+ [78]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [79]=>
+ string(1) "+"
+ [80]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [81]=>
+ array(3) {
+ [0]=>
+ int(295)
+ [1]=>
+ string(9) "(integer)"
+ [2]=>
+ int(8)
+ }
+ [82]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [83]=>
+ array(3) {
+ [0]=>
+ int(306)
+ [1]=>
+ string(7) "123.4e2"
+ [2]=>
+ int(8)
+ }
+ [84]=>
+ string(1) ";"
+ [85]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(8)
+ }
+ [86]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$d"
+ [2]=>
+ int(9)
+ }
+ [87]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [88]=>
+ string(1) "="
+ [89]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [90]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(9)
+ }
+ [91]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [92]=>
+ string(1) "-"
+ [93]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [94]=>
+ array(3) {
+ [0]=>
+ int(294)
+ [1]=>
+ string(6) "(real)"
+ [2]=>
+ int(9)
+ }
+ [95]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [96]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "12"
+ [2]=>
+ int(9)
+ }
+ [97]=>
+ string(1) ";"
+ [98]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(9)
+ }
+ [99]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(10)
+ }
+ [100]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [101]=>
+ string(1) "="
+ [102]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(10)
+ }
+ [103]=>
+ array(3) {
+ [0]=>
+ int(289)
+ [1]=>
+ string(7) "(unset)"
+ [2]=>
+ int(10)
+ }
+ [104]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(10)
+ }
+ [105]=>
+ string(1) ";"
+ [106]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(10)
+ }
+ [107]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(11)
+ }
+}
+Done
diff --git a/ext/tokenizer/tests/token_get_all_variation9.phpt b/ext/tokenizer/tests/token_get_all_variation9.phpt
new file mode 100644
index 000000000..247b754f7
--- /dev/null
+++ b/ext/tokenizer/tests/token_get_all_variation9.phpt
@@ -0,0 +1,441 @@
+--TEST--
+Test token_get_all() function : usage variations - with different types of comments
+--FILE--
+<?php
+/* Prototype : array token_get_all(string $source)
+ * Description: splits the given source into an array of PHP languange tokens
+ * Source code: ext/tokenizer/tokenizer.c
+*/
+
+/*
+ * Passing 'source' argument with different style of comments
+ */
+// '//', '/* */', '#' - T_COMMENT(365)
+// '/** */' - T_DOC_COMMENT(366)
+
+
+echo "*** Testing token_get_all() : 'source' string with different comments ***\n";
+
+// types of comments: '//', '/* */', '#' & /** */
+
+$source = '<?php
+/** Performing addition operation on given values :
+ * a, b
+ */
+
+// int value
+$a = 10;
+$b = 20;
+$c = true; // bool value
+
+/*
+ * Performing operation on $a,$b
+ * display result
+ */
+$c = $a + $b;
+var_dump($c); # expected: int(30)
+
+# end of program
+?>';
+var_dump( token_get_all($source));
+
+echo "Done"
+?>
+--EXPECTF--
+*** Testing token_get_all() : 'source' string with different comments ***
+array(51) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(367)
+ [1]=>
+ string(6) "<?php "
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(1)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(366)
+ [1]=>
+ string(65) "/** Performing addition operation on given values :
+ * a, b
+ */"
+ [2]=>
+ int(2)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(2) "
+
+"
+ [2]=>
+ int(4)
+ }
+ [4]=>
+ array(3) {
+ [0]=>
+ int(365)
+ [1]=>
+ string(13) "// int value
+"
+ [2]=>
+ int(6)
+ }
+ [5]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(7)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [7]=>
+ string(1) "="
+ [8]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(7)
+ }
+ [9]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "10"
+ [2]=>
+ int(7)
+ }
+ [10]=>
+ string(1) ";"
+ [11]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(7)
+ }
+ [12]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(8)
+ }
+ [13]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [14]=>
+ string(1) "="
+ [15]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(8)
+ }
+ [16]=>
+ array(3) {
+ [0]=>
+ int(305)
+ [1]=>
+ string(2) "20"
+ [2]=>
+ int(8)
+ }
+ [17]=>
+ string(1) ";"
+ [18]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(8)
+ }
+ [19]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(9)
+ }
+ [20]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [21]=>
+ string(1) "="
+ [22]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [23]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(4) "true"
+ [2]=>
+ int(9)
+ }
+ [24]=>
+ string(1) ";"
+ [25]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(9)
+ }
+ [26]=>
+ array(3) {
+ [0]=>
+ int(365)
+ [1]=>
+ string(14) "// bool value
+"
+ [2]=>
+ int(9)
+ }
+ [27]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(10)
+ }
+ [28]=>
+ array(3) {
+ [0]=>
+ int(365)
+ [1]=>
+ string(59) "/*
+ * Performing operation on $a,$b
+ * display result
+ */"
+ [2]=>
+ int(11)
+ }
+ [29]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(14)
+ }
+ [30]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(15)
+ }
+ [31]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(15)
+ }
+ [32]=>
+ string(1) "="
+ [33]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(15)
+ }
+ [34]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$a"
+ [2]=>
+ int(15)
+ }
+ [35]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(15)
+ }
+ [36]=>
+ string(1) "+"
+ [37]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(15)
+ }
+ [38]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$b"
+ [2]=>
+ int(15)
+ }
+ [39]=>
+ string(1) ";"
+ [40]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(15)
+ }
+ [41]=>
+ array(3) {
+ [0]=>
+ int(307)
+ [1]=>
+ string(8) "var_dump"
+ [2]=>
+ int(16)
+ }
+ [42]=>
+ string(1) "("
+ [43]=>
+ array(3) {
+ [0]=>
+ int(309)
+ [1]=>
+ string(2) "$c"
+ [2]=>
+ int(16)
+ }
+ [44]=>
+ string(1) ")"
+ [45]=>
+ string(1) ";"
+ [46]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) " "
+ [2]=>
+ int(16)
+ }
+ [47]=>
+ array(3) {
+ [0]=>
+ int(365)
+ [1]=>
+ string(20) "# expected: int(30)
+"
+ [2]=>
+ int(16)
+ }
+ [48]=>
+ array(3) {
+ [0]=>
+ int(370)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(17)
+ }
+ [49]=>
+ array(3) {
+ [0]=>
+ int(365)
+ [1]=>
+ string(17) "# end of program
+"
+ [2]=>
+ int(18)
+ }
+ [50]=>
+ array(3) {
+ [0]=>
+ int(369)
+ [1]=>
+ string(2) "?>"
+ [2]=>
+ int(19)
+ }
+}
+Done
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index fdab581b4..7134027e1 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tokenizer.c,v 1.31.2.5.2.7 2007/07/31 23:24:11 johannes Exp $ */
+/* $Id: tokenizer.c,v 1.31.2.5.2.8 2007/12/31 07:20:14 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c
index 6cebfc732..2715f4f27 100644
--- a/ext/tokenizer/tokenizer_data.c
+++ b/ext/tokenizer/tokenizer_data.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tokenizer_data.c,v 1.1.2.2 2007/07/31 23:24:11 johannes Exp $ */
+/* $Id: tokenizer_data.c,v 1.1.2.3 2007/12/31 07:20:14 sebastian Exp $ */
/*
DO NOT EDIT THIS FILE!
diff --git a/ext/wddx/php_wddx.h b/ext/wddx/php_wddx.h
index edbd59c76..054a43e22 100644
--- a/ext/wddx/php_wddx.h
+++ b/ext/wddx/php_wddx.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_wddx.h,v 1.18.2.1.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_wddx.h,v 1.18.2.1.2.2 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_WDDX_H
#define PHP_WDDX_H
diff --git a/ext/wddx/php_wddx_api.h b/ext/wddx/php_wddx_api.h
index 25690919a..7ef2a0d18 100644
--- a/ext/wddx/php_wddx_api.h
+++ b/ext/wddx/php_wddx_api.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_wddx_api.h,v 1.23.2.3.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_wddx_api.h,v 1.23.2.3.2.2 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_WDDX_API_H
#define PHP_WDDX_API_H
diff --git a/ext/wddx/tests/001-64bit.phpt b/ext/wddx/tests/001-64bit.phpt
new file mode 100644
index 000000000..78b1dc999
--- /dev/null
+++ b/ext/wddx/tests/001-64bit.phpt
@@ -0,0 +1,62 @@
+--TEST--
+wddx deserialization test (64-bit)
+--SKIPIF--
+<?php if (!extension_loaded("wddx")) print "skip"; ?>
+<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK" ?>
+--INI--
+precision=14
+--FILE--
+<?php
+ $path = dirname(__FILE__);
+ var_dump(wddx_deserialize(file_get_contents("{$path}/wddx.xml")));
+?>
+--EXPECT--
+array(11) {
+ ["aNull"]=>
+ NULL
+ ["aString"]=>
+ string(8) "a string"
+ ["aNumber"]=>
+ float(-12.456)
+ ["aDateTime"]=>
+ int(897625932)
+ ["aDateTime2"]=>
+ int(329632332)
+ ["aDateTime3"]=>
+ int(2223088332)
+ ["aBoolean"]=>
+ bool(true)
+ ["anArray"]=>
+ array(2) {
+ [0]=>
+ int(10)
+ [1]=>
+ string(14) "second element"
+ }
+ ["aBinary"]=>
+ string(11) "binary data"
+ ["anObject"]=>
+ array(2) {
+ ["s"]=>
+ string(8) "a string"
+ ["n"]=>
+ float(-12.456)
+ }
+ ["aRecordset"]=>
+ array(2) {
+ ["NAME"]=>
+ array(2) {
+ [0]=>
+ string(8) "John Doe"
+ [1]=>
+ string(8) "Jane Doe"
+ }
+ ["AGE"]=>
+ array(2) {
+ [0]=>
+ int(34)
+ [1]=>
+ int(31)
+ }
+ }
+}
diff --git a/ext/wddx/tests/001.phpt b/ext/wddx/tests/001.phpt
index 3efc0f4b0..e1aafd0ab 100644
--- a/ext/wddx/tests/001.phpt
+++ b/ext/wddx/tests/001.phpt
@@ -1,7 +1,8 @@
--TEST--
-wddx deserialization test
+wddx deserialization test (32-bit)
--SKIPIF--
<?php if (!extension_loaded("wddx")) print "skip"; ?>
+<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK" ?>
--INI--
precision=14
--FILE--
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 1476b1f00..fcd6c6072 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: wddx.c,v 1.119.2.10.2.17 2007/06/11 15:08:43 iliaa Exp $ */
+/* $Id: wddx.c,v 1.119.2.10.2.18 2007/12/31 07:20:14 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/xml/compat.c b/ext/xml/compat.c
index 32f4cc806..7b4c90dbd 100644
--- a/ext/xml/compat.c
+++ b/ext/xml/compat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xml/expat_compat.h b/ext/xml/expat_compat.h
index 9200b1f0e..7eb3236b0 100644
--- a/ext/xml/expat_compat.h
+++ b/ext/xml/expat_compat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: expat_compat.h,v 1.19.2.1.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: expat_compat.h,v 1.19.2.1.2.2 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_EXPAT_COMPAT_H
#define PHP_EXPAT_COMPAT_H
diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h
index f5c1b1e69..f975c21d5 100644
--- a/ext/xml/php_xml.h
+++ b/ext/xml/php_xml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_xml.h,v 1.28.2.2.2.3 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_xml.h,v 1.28.2.2.2.4 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_XML_H
#define PHP_XML_H
diff --git a/ext/xml/tests/bug43957.phpt b/ext/xml/tests/bug43957.phpt
new file mode 100644
index 000000000..34ddcd951
--- /dev/null
+++ b/ext/xml/tests/bug43957.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #43957 - utf8_decode() bogus conversion on multibyte indicator near end of string
+--SKIPIF--
+<?php
+require_once("skipif.inc");
+if (!extension_loaded('xml')) die ("skip xml extension not available");
+?>
+--FILE--
+<?php
+ echo utf8_decode('abc'.chr(0xe0));
+?>
+--EXPECTF--
+abc?
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index 0c7ebf887..2fb994ddd 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml.c,v 1.157.2.4.2.5 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: xml.c,v 1.157.2.4.2.8 2008/01/30 08:50:02 rasmus Exp $ */
#define IS_EXT_MODULE
@@ -579,15 +579,27 @@ PHPAPI char *xml_utf8_decode(const XML_Char *s, int len, int *newlen, const XML_
while (pos > 0) {
c = (unsigned char)(*s);
if (c >= 0xf0) { /* four bytes encoded, 21 bits */
- c = ((s[0]&7)<<18) | ((s[1]&63)<<12) | ((s[2]&63)<<6) | (s[3]&63);
+ if(pos-4 >= 0) {
+ c = ((s[0]&7)<<18) | ((s[1]&63)<<12) | ((s[2]&63)<<6) | (s[3]&63);
+ } else {
+ c = '?';
+ }
s += 4;
pos -= 4;
} else if (c >= 0xe0) { /* three bytes encoded, 16 bits */
- c = ((s[0]&63)<<12) | ((s[1]&63)<<6) | (s[2]&63);
+ if(pos-3 >= 0) {
+ c = ((s[0]&63)<<12) | ((s[1]&63)<<6) | (s[2]&63);
+ } else {
+ c = '?';
+ }
s += 3;
pos -= 3;
} else if (c >= 0xc0) { /* two bytes encoded, 11 bits */
- c = ((s[0]&63)<<6) | (s[1]&63);
+ if(pos-2 >= 0) {
+ c = ((s[0]&63)<<6) | (s[1]&63);
+ } else {
+ c = '?';
+ }
s += 2;
pos -= 2;
} else {
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c
index c31057002..c4b1c4711 100644
--- a/ext/xmlreader/php_xmlreader.c
+++ b/ext/xmlreader/php_xmlreader.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_xmlreader.c,v 1.13.2.14.2.9 2007/09/20 09:30:45 rrichards Exp $ */
+/* $Id: php_xmlreader.c,v 1.13.2.14.2.10 2007/12/31 07:20:14 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/xmlreader/php_xmlreader.h b/ext/xmlreader/php_xmlreader.h
index 9c38ab72c..485458e0e 100644
--- a/ext/xmlreader/php_xmlreader.h
+++ b/ext/xmlreader/php_xmlreader.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_xmlreader.h,v 1.3.2.2.2.2 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: php_xmlreader.h,v 1.3.2.2.2.3 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_XMLREADER_H
#define PHP_XMLREADER_H
diff --git a/ext/xmlrpc/php_xmlrpc.h b/ext/xmlrpc/php_xmlrpc.h
index 257b55181..68aeb5b81 100644
--- a/ext/xmlrpc/php_xmlrpc.h
+++ b/ext/xmlrpc/php_xmlrpc.h
@@ -37,7 +37,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -51,7 +51,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_xmlrpc.h,v 1.11.2.1.2.2 2007/01/12 12:32:15 tony2001 Exp $ */
+/* $Id: php_xmlrpc.h,v 1.11.2.1.2.3 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef _PHP_XMLRPC_H
#define _PHP_XMLRPC_H
diff --git a/ext/xmlrpc/tests/bug42736.phpt b/ext/xmlrpc/tests/bug42736.phpt
new file mode 100644
index 000000000..b9a46cff5
--- /dev/null
+++ b/ext/xmlrpc/tests/bug42736.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Bug #42736 (xmlrpc_server_call_method() crashes)
+--SKIPIF--
+<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
+--FILE--
+<?php
+
+class SOAP_Array {
+ public function get($id){
+ return $this->add($id);
+ }
+}
+
+$xml = xmlrpc_server_create();
+
+$Myrequest = '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>GetProducts</methodName><params><param><value><dateTime.iso8601>20060922T14:26:19</dateTime.iso8601></value></param></params></methodCall>';
+
+class MyClass {
+ function GetProducts($dummy, $time){
+ return array('faultString' => $time);
+ }
+}
+$myclass = new MyClass();
+xmlrpc_server_register_method($xml, 'GetProducts', array($myclass, 'GetProducts'));
+$response = xmlrpc_server_call_method($xml, $Myrequest, null);
+
+var_dump($response);
+
+echo "Done\n";
+?>
+--EXPECTF--
+string(402) "<?xml version="1.0" encoding="iso-8859-1"?>
+<methodResponse>
+<params>
+ <param>
+ <value>
+ <struct>
+ <member>
+ <name>faultString</name>
+ <value>
+ <array>
+ <data>
+ <value>
+ <dateTime.iso8601>20060922T14:26:19</dateTime.iso8601>
+ </value>
+ </data>
+ </array>
+ </value>
+ </member>
+ </struct>
+ </value>
+ </param>
+</params>
+</methodResponse>
+"
+Done
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c
index ca4e417d3..87b899469 100644
--- a/ext/xmlrpc/xmlrpc-epi-php.c
+++ b/ext/xmlrpc/xmlrpc-epi-php.c
@@ -37,7 +37,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -51,7 +51,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.6 2007/09/18 19:49:53 iliaa Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.8 2007/12/31 07:20:14 sebastian Exp $ */
/**********************************************************************
* BUGS: *
@@ -874,10 +874,9 @@ static XMLRPC_VALUE php_xmlrpc_callback(XMLRPC_SERVER server, XMLRPC_REQUEST xRe
pData->php_executed = 1;
- zval_dtor(xmlrpc_params);
- FREE_ZVAL(xmlrpc_params);
+ zval_ptr_dtor(&xmlrpc_params);
- return NULL;
+ return NULL;
}
/* called by the C server when it first receives an introspection request. We pass this on to
diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c
index 81fdf6225..b0bd71c37 100644
--- a/ext/xmlwriter/php_xmlwriter.c
+++ b/ext/xmlwriter/php_xmlwriter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_xmlwriter.c,v 1.20.2.12.2.16 2007/10/24 22:50:19 iliaa Exp $ */
+/* $Id: php_xmlwriter.c,v 1.20.2.12.2.17 2007/12/31 07:20:14 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/xmlwriter/php_xmlwriter.h b/ext/xmlwriter/php_xmlwriter.h
index d37ce7e44..9f54e5855 100644
--- a/ext/xmlwriter/php_xmlwriter.h
+++ b/ext/xmlwriter/php_xmlwriter.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_xmlwriter.h,v 1.10.2.5.2.3 2007/01/01 09:36:10 sebastian Exp $ */
+/* $Id: php_xmlwriter.h,v 1.10.2.5.2.4 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_XMLWRITER_H
#define PHP_XMLWRITER_H
diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c
index 0c840060f..a7e5537f3 100644
--- a/ext/xsl/php_xsl.c
+++ b/ext/xsl/php_xsl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_xsl.c,v 1.32.2.6.2.2 2007/01/12 12:17:32 tony2001 Exp $ */
+/* $Id: php_xsl.c,v 1.32.2.6.2.3 2007/12/31 07:20:14 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h
index b94037904..a64ace360 100644
--- a/ext/xsl/php_xsl.h
+++ b/ext/xsl/php_xsl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_xsl.h,v 1.15.2.1.2.1 2007/01/01 09:36:10 sebastian Exp $ */
+/* $Id: php_xsl.h,v 1.15.2.1.2.2 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_XSL_H
#define PHP_XSL_H
diff --git a/ext/xsl/xsl_fe.h b/ext/xsl/xsl_fe.h
index 1b6a30964..d7384b0ae 100644
--- a/ext/xsl/xsl_fe.h
+++ b/ext/xsl/xsl_fe.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xsl_fe.h,v 1.8.2.1.2.2 2007/10/06 21:35:53 tony2001 Exp $ */
+/* $Id: xsl_fe.h,v 1.8.2.1.2.3 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef XSL_FE_H
#define XSL_FE_H
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index c6a1b986e..dc9a370b8 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xsltprocessor.c,v 1.39.2.2.2.10 2007/10/06 21:35:53 tony2001 Exp $ */
+/* $Id: xsltprocessor.c,v 1.39.2.2.2.13 2008/01/29 21:21:28 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,6 +27,57 @@
#include "php_xsl.h"
#include "ext/libxml/php_libxml.h"
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, doc, DOMNode, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_uri, 0, 0, 2)
+ ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+ ZEND_ARG_INFO(0, uri)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_xml, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_parameter, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespace)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_get_parameter, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespace)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_remove_parameter, 0, 0, 2)
+ ZEND_ARG_INFO(0, namespace)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_has_exslt_support, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_register_php_functions, 0, 0, 0)
+ ZEND_ARG_INFO(0, restrict)
+ZEND_END_ARG_INFO();
+/* }}} */
+
/*
* class xsl_xsltprocessor
*
@@ -35,15 +86,15 @@
*/
zend_function_entry php_xsl_xsltprocessor_class_functions[] = {
- PHP_FALIAS(importStylesheet, xsl_xsltprocessor_import_stylesheet, NULL)
- PHP_FALIAS(transformToDoc, xsl_xsltprocessor_transform_to_doc, NULL)
- PHP_FALIAS(transformToUri, xsl_xsltprocessor_transform_to_uri, NULL)
- PHP_FALIAS(transformToXml, xsl_xsltprocessor_transform_to_xml, NULL)
- PHP_FALIAS(setParameter, xsl_xsltprocessor_set_parameter, NULL)
- PHP_FALIAS(getParameter, xsl_xsltprocessor_get_parameter, NULL)
- PHP_FALIAS(removeParameter, xsl_xsltprocessor_remove_parameter, NULL)
- PHP_FALIAS(hasExsltSupport, xsl_xsltprocessor_has_exslt_support, NULL)
- PHP_FALIAS(registerPHPFunctions, xsl_xsltprocessor_register_php_functions, NULL)
+ PHP_FALIAS(importStylesheet, xsl_xsltprocessor_import_stylesheet, arginfo_xsl_xsltprocessor_import_stylesheet)
+ PHP_FALIAS(transformToDoc, xsl_xsltprocessor_transform_to_doc, arginfo_xsl_xsltprocessor_transform_to_doc)
+ PHP_FALIAS(transformToUri, xsl_xsltprocessor_transform_to_uri, arginfo_xsl_xsltprocessor_transform_to_uri)
+ PHP_FALIAS(transformToXml, xsl_xsltprocessor_transform_to_xml, arginfo_xsl_xsltprocessor_transform_to_xml)
+ PHP_FALIAS(setParameter, xsl_xsltprocessor_set_parameter, arginfo_xsl_xsltprocessor_set_parameter)
+ PHP_FALIAS(getParameter, xsl_xsltprocessor_get_parameter, arginfo_xsl_xsltprocessor_get_parameter)
+ PHP_FALIAS(removeParameter, xsl_xsltprocessor_remove_parameter, arginfo_xsl_xsltprocessor_remove_parameter)
+ PHP_FALIAS(hasExsltSupport, xsl_xsltprocessor_has_exslt_support, arginfo_xsl_xsltprocessor_has_exslt_support)
+ PHP_FALIAS(registerPHPFunctions, xsl_xsltprocessor_register_php_functions, arginfo_xsl_xsltprocessor_register_php_functions)
{NULL, NULL, NULL}
};
@@ -723,7 +774,7 @@ PHP_FUNCTION(xsl_xsltprocessor_remove_parameter)
}
/* }}} end xsl_xsltprocessor_remove_parameter */
-/* {{{ proto void xsl_xsltprocessor_register_php_functions();
+/* {{{ proto void xsl_xsltprocessor_register_php_functions([mixed $restrict]);
*/
PHP_FUNCTION(xsl_xsltprocessor_register_php_functions)
{
diff --git a/ext/zip/Makefile.frag b/ext/zip/Makefile.frag
new file mode 100644
index 000000000..b3781e3e7
--- /dev/null
+++ b/ext/zip/Makefile.frag
@@ -0,0 +1,28 @@
+phpincludedir=$(prefix)/include/php
+
+ZIP_HEADER_FILES= \
+ zip.h \
+ zipint.h \
+ zip_alias.h \
+ zipint_alias.h
+
+install-zip-headers:
+ @echo "Installing ZIP headers: $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib"
+ @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib
+ @for f in $(ZIP_HEADER_FILES); do \
+ if test -f "$(top_srcdir)/lib/$$f"; then \
+ $(INSTALL_DATA) $(top_srcdir)/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
+ elif test -f "$(top_builddir)/lib/$$f"; then \
+ $(INSTALL_DATA) $(top_builddir)/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
+ elif test -f "$(top_srcdir)/ext/zip/lib/$$f"; then \
+ $(INSTALL_DATA) $(top_srcdir)/ext/zip/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
+ elif test -f "$(top_builddir)/ext/zip/lib/$$f"; then \
+ $(INSTALL_DATA) $(top_builddir)/ext/zip/lib/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/zip/lib; \
+ else \
+ echo "hmmm"; \
+ fi \
+ done;
+
+# mini hack
+install: $(all_targets) $(install_targets) install-zip-headers
+
diff --git a/ext/zip/config.m4 b/ext/zip/config.m4
index c54eaac82..f31f260d9 100644
--- a/ext/zip/config.m4
+++ b/ext/zip/config.m4
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.8.2.3 2007/07/03 17:25:35 sniper Exp $
+dnl $Id: config.m4,v 1.8.2.4 2008/01/18 00:31:23 cellog Exp $
dnl
PHP_ARG_ENABLE(zip, for zip archive read/writesupport,
@@ -66,4 +66,12 @@ if test "$PHP_ZIP" != "no"; then
PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared)
PHP_ADD_BUILD_DIR($ext_builddir/lib, 1)
PHP_SUBST(ZIP_SHARED_LIBADD)
+ ifdef([PHP_INSTALL_HEADERS],
+ [
+ dnl Sadly, this is a complete NOP for pecl extensions
+ PHP_INSTALL_HEADERS(ext/zip/lib, [lib/zip.h lib/zipint.h lib/zip_alias.h lib/zipint_alias.h])
+ ])
+
+ dnl so we always include the known-good working hack.
+ PHP_ADD_MAKEFILE_FRAGMENT
fi
diff --git a/ext/zip/config.w32 b/ext/zip/config.w32
index a68e0505a..f0bc4c6db 100644
--- a/ext/zip/config.w32
+++ b/ext/zip/config.w32
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.1.2.1 2006/11/03 16:46:18 pajoye Exp $
+// $Id: config.w32,v 1.1.2.4 2008/01/14 03:19:41 cellog Exp $
// vim:ft=javascript
ARG_ENABLE("zip", "ZIP support", "no");
@@ -31,6 +31,7 @@ if (PHP_ZIP != "no") {
AC_DEFINE('HAVE_ZLIB', 1);
AC_DEFINE('HAVE_ZIP', 1);
+ ADD_FLAG("CFLAGS_ZIP", "/D PHP_ZIP_EXPORTS ");
} else {
WARNING("zip not enabled; libraries and headers not found");
}
diff --git a/ext/zip/lib/zip.h b/ext/zip/lib/zip.h
index de115d38a..04ffb1471 100644
--- a/ext/zip/lib/zip.h
+++ b/ext/zip/lib/zip.h
@@ -5,7 +5,7 @@
$NiH: zip.h,v 1.57 2006/04/24 14:04:19 dillo Exp $
zip.h -- exported declarations.
- Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <nih@giga.or.at>
@@ -37,16 +37,24 @@
*/
-
-#ifdef __cplusplus
-extern "C" {
+#include "main/php.h"
+/* #defines that rename all zip_ functions and structs */
+#include "zip_alias.h"
+#ifdef PHP_WIN32
+#include "zip_win32.h"
+# ifdef PHP_ZIP_EXPORTS
+# define PHPZIPAPI __declspec(dllexport)
+# else
+# define PHPZIPAPI
+# endif
+#else
+#define PHPZIPAPI
#endif
-
+BEGIN_EXTERN_C()
#include <sys/types.h>
#include <stdio.h>
#include <time.h>
-#include "zip_win32.h"
/* flags for zip_open */
@@ -162,49 +170,46 @@ struct zip_source;
-int zip_add(struct zip *, const char *, struct zip_source *);
-int zip_add_dir(struct zip *, const char *);
-int zip_close(struct zip *);
-int zip_delete(struct zip *, int);
-void zip_error_clear(struct zip *);
-void zip_error_get(struct zip *, int *, int *);
-int zip_error_get_sys_type(int);
-int zip_error_to_str(char *, size_t, int, int);
-int zip_fclose(struct zip_file *);
-void zip_file_error_clear(struct zip_file *);
-void zip_file_error_get(struct zip_file *, int *, int *);
-const char *zip_file_strerror(struct zip_file *);
-struct zip_file *zip_fopen(struct zip *, const char *, int);
-struct zip_file *zip_fopen_index(struct zip *, int, int);
-ssize_t zip_fread(struct zip_file *, void *, size_t);
-const char *zip_get_archive_comment(struct zip *, int *, int);
-const char *zip_get_file_comment(struct zip *, int, int *, int);
-const char *zip_get_name(struct zip *, int, int);
-int zip_get_num_files(struct zip *);
-int zip_name_locate(struct zip *, const char *, int);
-struct zip *zip_open(const char *, int, int *);
-int zip_rename(struct zip *, int, const char *);
-int zip_replace(struct zip *, int, struct zip_source *);
-int zip_set_archive_comment(struct zip *, const char *, int);
-int zip_set_file_comment(struct zip *, int, const char *, int);
-struct zip_source *zip_source_buffer(struct zip *, const void *, off_t, int);
-struct zip_source *zip_source_file(struct zip *, const char *, off_t, off_t);
-struct zip_source *zip_source_filep(struct zip *, FILE *, off_t, off_t);
-void zip_source_free(struct zip_source *);
-struct zip_source *zip_source_function(struct zip *,
+PHPZIPAPI int zip_add(struct zip *, const char *, struct zip_source *);
+PHPZIPAPI int zip_add_dir(struct zip *, const char *);
+PHPZIPAPI int zip_close(struct zip *);
+PHPZIPAPI int zip_delete(struct zip *, int);
+PHPZIPAPI void zip_error_clear(struct zip *);
+PHPZIPAPI void zip_error_get(struct zip *, int *, int *);
+PHPZIPAPI int zip_error_get_sys_type(int);
+PHPZIPAPI int zip_error_to_str(char *, size_t, int, int);
+PHPZIPAPI int zip_fclose(struct zip_file *);
+PHPZIPAPI void zip_file_error_clear(struct zip_file *);
+PHPZIPAPI void zip_file_error_get(struct zip_file *, int *, int *);
+PHPZIPAPI const char *zip_file_strerror(struct zip_file *);
+PHPZIPAPI struct zip_file *zip_fopen(struct zip *, const char *, int);
+PHPZIPAPI struct zip_file *zip_fopen_index(struct zip *, int, int);
+PHPZIPAPI ssize_t zip_fread(struct zip_file *, void *, size_t);
+PHPZIPAPI const char *zip_get_archive_comment(struct zip *, int *, int);
+PHPZIPAPI const char *zip_get_file_comment(struct zip *, int, int *, int);
+PHPZIPAPI const char *zip_get_name(struct zip *, int, int);
+PHPZIPAPI int zip_get_num_files(struct zip *);
+PHPZIPAPI int zip_name_locate(struct zip *, const char *, int);
+PHPZIPAPI struct zip *zip_open(const char *, int, int *);
+PHPZIPAPI int zip_rename(struct zip *, int, const char *);
+PHPZIPAPI int zip_replace(struct zip *, int, struct zip_source *);
+PHPZIPAPI int zip_set_archive_comment(struct zip *, const char *, int);
+PHPZIPAPI int zip_set_file_comment(struct zip *, int, const char *, int);
+PHPZIPAPI struct zip_source *zip_source_buffer(struct zip *, const void *, off_t, int);
+PHPZIPAPI struct zip_source *zip_source_file(struct zip *, const char *, off_t, off_t);
+PHPZIPAPI struct zip_source *zip_source_filep(struct zip *, FILE *, off_t, off_t);
+PHPZIPAPI void zip_source_free(struct zip_source *);
+PHPZIPAPI struct zip_source *zip_source_function(struct zip *,
zip_source_callback, void *);
-struct zip_source *zip_source_zip(struct zip *, struct zip *, int, int,
+PHPZIPAPI struct zip_source *zip_source_zip(struct zip *, struct zip *, int, int,
off_t, off_t);
-int zip_stat(struct zip *, const char *, int, struct zip_stat *);
-int zip_stat_index(struct zip *, int, int, struct zip_stat *);
-void zip_stat_init(struct zip_stat *);
-const char *zip_strerror(struct zip *);
-int zip_unchange(struct zip *, int);
-int zip_unchange_all(struct zip *);
-int zip_unchange_archive(struct zip *);
-
-#ifdef __cplusplus
-}
-#endif
-
+PHPZIPAPI int zip_stat(struct zip *, const char *, int, struct zip_stat *);
+PHPZIPAPI int zip_stat_index(struct zip *, int, int, struct zip_stat *);
+PHPZIPAPI void zip_stat_init(struct zip_stat *);
+PHPZIPAPI const char *zip_strerror(struct zip *);
+PHPZIPAPI int zip_unchange(struct zip *, int);
+PHPZIPAPI int zip_unchange_all(struct zip *);
+PHPZIPAPI int zip_unchange_archive(struct zip *);
+
+END_EXTERN_C();
#endif /* _HAD_ZIP_H */
diff --git a/ext/zip/lib/zip_add.c b/ext/zip/lib/zip_add.c
index 535d6e468..70d1162f7 100644
--- a/ext/zip/lib/zip_add.c
+++ b/ext/zip/lib/zip_add.c
@@ -40,7 +40,7 @@
-int
+PHPZIPAPI int
zip_add(struct zip *za, const char *name, struct zip_source *source)
{
if (name == NULL || source == NULL) {
diff --git a/ext/zip/lib/zip_add_dir.c b/ext/zip/lib/zip_add_dir.c
index 957aaf1d2..d4da559ec 100644
--- a/ext/zip/lib/zip_add_dir.c
+++ b/ext/zip/lib/zip_add_dir.c
@@ -2,7 +2,7 @@
$NiH: zip_add_dir.c,v 1.1 2006/10/03 12:23:13 dillo Exp $
zip_add_dir.c -- add directory
- Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <nih@giga.or.at>
@@ -43,7 +43,7 @@
-int
+PHPZIPAPI int
zip_add_dir(struct zip *za, const char *name)
{
int len, ret;
diff --git a/ext/zip/lib/zip_alias.h b/ext/zip/lib/zip_alias.h
new file mode 100644
index 000000000..27a7b45df
--- /dev/null
+++ b/ext/zip/lib/zip_alias.h
@@ -0,0 +1,45 @@
+
+#define zip_source_cmd php_ziplib__zip_source_cmd
+#define zip_source_callback php_ziplib__zip_source_callback
+#define zip_stat php_ziplib__zip_stat
+#define zip php_ziplib__zip
+#define zip_file php_ziplib__zip_file
+#define zip_source php_ziplib__zip_source
+#define zip_add php_ziplib__zip_add
+#define zip_add_dir php_ziplib__zip_add_dir
+#define zip_close php_ziplib__zip_close
+#define zip_delete php_ziplib__zip_delete
+#define zip_error_clear php_ziplib__zip_error_clear
+#define zip_error_get php_ziplib__zip_error_get
+#define zip_error_get_sys_type php_ziplib__zip_error_get_sys_type
+#define zip_error_to_str php_ziplib__zip_error_to_str
+#define zip_fclose php_ziplib__zip_fclose
+#define zip_file_error_clear php_ziplib__zip_fille_error_clear
+#define zip_file_error_get php_ziplib__zip_file_error_get
+#define zip_file_strerror php_ziplib__zip_file_strerror
+#define zip_fopen php_ziplib__zip_fopen
+#define zip_fopen_index php_ziplib__zip_fopen_index
+#define zip_fread php_ziplib__zip_fread
+#define zip_get_archive_comment php_ziplib__zip_get_archive_comment
+#define zip_get_file_comment php_ziplib__zip_get_file_comment
+#define zip_get_name php_ziplib__zip_get_name
+#define zip_get_num_files php_ziplib__zip_get_num_files
+#define zip_name_locate php_ziplib__zip_name_locate
+#define zip_open php_ziplib__zip_open
+#define zip_rename php_ziplib__zip_rename
+#define zip_replace php_ziplib__zip_replace
+#define zip_set_archive_comment php_ziplib__zip_set_archive_comment
+#define zip_set_file_comment php_ziplib__zip_set_file_comment
+#define zip_source_buffer php_ziplib__zip_source_buffer
+#define zip_source_file php_ziplib__zip_source_file
+#define zip_source_filep php_ziplib__zip_source_filep
+#define zip_source_free php_ziplib__zip_source_free
+#define zip_source_function php_ziplib__zip_source_function
+#define zip_source_zip php_ziplib__zip_source_zip
+#define zip_stat php_ziplib__zip_stat
+#define zip_stat_index php_ziplib__zip_stat_index
+#define zip_stat_init php_ziplib__zip_stat_init
+#define zip_strerror php_ziplib__zip_strerror
+#define zip_unchange php_ziplib__zip_unchange
+#define zip_unchange_all php_ziplib__zip_unchange_all
+#define zip_unchange_archive php_ziplib__zip_unchange_archive
diff --git a/ext/zip/lib/zip_close.c b/ext/zip/lib/zip_close.c
index e701321a8..11ba8e223 100644
--- a/ext/zip/lib/zip_close.c
+++ b/ext/zip/lib/zip_close.c
@@ -56,7 +56,7 @@ static int _zip_cdir_set_comment(struct zip_cdir *, struct zip *);
static int _zip_changed(struct zip *, int *);
static char *_zip_create_temp_output(struct zip *, FILE **);
-int
+PHPZIPAPI int
zip_close(struct zip *za)
{
int survivors;
diff --git a/ext/zip/lib/zip_delete.c b/ext/zip/lib/zip_delete.c
index 7244e612f..eb5055b68 100644
--- a/ext/zip/lib/zip_delete.c
+++ b/ext/zip/lib/zip_delete.c
@@ -40,7 +40,7 @@
-int
+PHPZIPAPI int
zip_delete(struct zip *za, int idx)
{
if (idx < 0 || idx >= za->nentry) {
diff --git a/ext/zip/lib/zip_dirent.c b/ext/zip/lib/zip_dirent.c
index 8423ad534..f796f8d66 100644
--- a/ext/zip/lib/zip_dirent.c
+++ b/ext/zip/lib/zip_dirent.c
@@ -56,7 +56,7 @@ static void _zip_write4(unsigned int, FILE *);
-void
+PHPZIPAPI void
_zip_cdir_free(struct zip_cdir *cd)
{
int i;
@@ -73,7 +73,7 @@ _zip_cdir_free(struct zip_cdir *cd)
-struct zip_cdir *
+PHPZIPAPI struct zip_cdir *
_zip_cdir_new(int nentry, struct zip_error *error)
{
struct zip_cdir *cd;
@@ -102,7 +102,7 @@ _zip_cdir_new(int nentry, struct zip_error *error)
-int
+PHPZIPAPI int
_zip_cdir_write(struct zip_cdir *cd, FILE *fp, struct zip_error *error)
{
int i;
@@ -136,7 +136,7 @@ _zip_cdir_write(struct zip_cdir *cd, FILE *fp, struct zip_error *error)
-void
+PHPZIPAPI void
_zip_dirent_finalize(struct zip_dirent *zde)
{
free(zde->filename);
@@ -149,7 +149,7 @@ _zip_dirent_finalize(struct zip_dirent *zde)
-void
+PHPZIPAPI void
_zip_dirent_init(struct zip_dirent *de)
{
de->version_madeby = 0;
@@ -188,7 +188,7 @@ _zip_dirent_init(struct zip_dirent *de)
returned.
*/
-int
+PHPZIPAPI int
_zip_dirent_read(struct zip_dirent *zde, FILE *fp,
unsigned char **bufp, unsigned int left, int localp,
struct zip_error *error)
@@ -333,7 +333,7 @@ _zip_dirent_read(struct zip_dirent *zde, FILE *fp,
returned.
*/
-int
+PHPZIPAPI int
_zip_dirent_write(struct zip_dirent *zde, FILE *fp, int localp,
struct zip_error *error)
{
@@ -409,7 +409,7 @@ _zip_d2u_time(int dtime, int ddate)
-unsigned short
+PHPZIPAPI unsigned short
_zip_read2(unsigned char **a)
{
unsigned short ret;
@@ -422,7 +422,7 @@ _zip_read2(unsigned char **a)
-unsigned int
+PHPZIPAPI unsigned int
_zip_read4(unsigned char **a)
{
unsigned int ret;
diff --git a/ext/zip/lib/zip_entry_free.c b/ext/zip/lib/zip_entry_free.c
index 48443cefd..1bab313ed 100644
--- a/ext/zip/lib/zip_entry_free.c
+++ b/ext/zip/lib/zip_entry_free.c
@@ -42,7 +42,7 @@
-void
+PHPZIPAPI void
_zip_entry_free(struct zip_entry *ze)
{
free(ze->ch_filename);
diff --git a/ext/zip/lib/zip_entry_new.c b/ext/zip/lib/zip_entry_new.c
index 390b72ad7..67e13fd84 100644
--- a/ext/zip/lib/zip_entry_new.c
+++ b/ext/zip/lib/zip_entry_new.c
@@ -42,7 +42,7 @@
-struct zip_entry *
+PHPZIPAPI struct zip_entry *
_zip_entry_new(struct zip *za)
{
struct zip_entry *ze;
diff --git a/ext/zip/lib/zip_error.c b/ext/zip/lib/zip_error.c
index aec1638de..4816b73ae 100644
--- a/ext/zip/lib/zip_error.c
+++ b/ext/zip/lib/zip_error.c
@@ -2,7 +2,7 @@
$NiH: zip_error.c,v 1.7 2005/06/09 19:57:09 dillo Exp $
zip_error.c -- struct zip_error helper functions
- Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <nih@giga.or.at>
@@ -42,7 +42,7 @@
-void
+PHPZIPAPI void
_zip_error_clear(struct zip_error *err)
{
err->zip_err = ZIP_ER_OK;
@@ -51,7 +51,7 @@ _zip_error_clear(struct zip_error *err)
-void
+PHPZIPAPI void
_zip_error_copy(struct zip_error *dst, struct zip_error *src)
{
dst->zip_err = src->zip_err;
@@ -60,7 +60,7 @@ _zip_error_copy(struct zip_error *dst, struct zip_error *src)
-void
+PHPZIPAPI void
_zip_error_fini(struct zip_error *err)
{
free(err->str);
@@ -69,7 +69,7 @@ _zip_error_fini(struct zip_error *err)
-void
+PHPZIPAPI void
_zip_error_get(struct zip_error *err, int *zep, int *sep)
{
if (zep)
@@ -84,7 +84,7 @@ _zip_error_get(struct zip_error *err, int *zep, int *sep)
-void
+PHPZIPAPI void
_zip_error_init(struct zip_error *err)
{
err->zip_err = ZIP_ER_OK;
@@ -94,7 +94,7 @@ _zip_error_init(struct zip_error *err)
-void
+PHPZIPAPI void
_zip_error_set(struct zip_error *err, int ze, int se)
{
if (err) {
diff --git a/ext/zip/lib/zip_error_clear.c b/ext/zip/lib/zip_error_clear.c
index e3c81eb31..8a76f4440 100644
--- a/ext/zip/lib/zip_error_clear.c
+++ b/ext/zip/lib/zip_error_clear.c
@@ -2,7 +2,7 @@
$NiH: zip_error_clear.c,v 1.1 2006/10/04 15:21:09 dillo Exp $
zip_error_clear.c -- clear zip error
- Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <nih@giga.or.at>
@@ -40,7 +40,7 @@
-void
+PHPZIPAPI void
zip_error_clear(struct zip *za)
{
_zip_error_clear(&za->error);
diff --git a/ext/zip/lib/zip_error_get.c b/ext/zip/lib/zip_error_get.c
index 712575a86..888b54569 100644
--- a/ext/zip/lib/zip_error_get.c
+++ b/ext/zip/lib/zip_error_get.c
@@ -40,7 +40,7 @@
-void
+PHPZIPAPI void
zip_error_get(struct zip *za, int *zep, int *sep)
{
_zip_error_get(&za->error, zep, sep);
diff --git a/ext/zip/lib/zip_error_get_sys_type.c b/ext/zip/lib/zip_error_get_sys_type.c
index 613ec9432..bfe642383 100644
--- a/ext/zip/lib/zip_error_get_sys_type.c
+++ b/ext/zip/lib/zip_error_get_sys_type.c
@@ -40,7 +40,7 @@
-int
+PHPZIPAPI int
zip_error_get_sys_type(int ze)
{
if (ze < 0 || ze >= _zip_nerr_str)
diff --git a/ext/zip/lib/zip_error_strerror.c b/ext/zip/lib/zip_error_strerror.c
index e6eee081d..06e98c76d 100644
--- a/ext/zip/lib/zip_error_strerror.c
+++ b/ext/zip/lib/zip_error_strerror.c
@@ -45,7 +45,7 @@
-const char *
+PHPZIPAPI const char *
_zip_error_strerror(struct zip_error *err)
{
const char *zs, *ss;
diff --git a/ext/zip/lib/zip_error_to_str.c b/ext/zip/lib/zip_error_to_str.c
index e56619225..665803472 100644
--- a/ext/zip/lib/zip_error_to_str.c
+++ b/ext/zip/lib/zip_error_to_str.c
@@ -45,7 +45,7 @@
-int
+PHPZIPAPI int
zip_error_to_str(char *buf, size_t len, int ze, int se)
{
const char *zs, *ss;
diff --git a/ext/zip/lib/zip_fclose.c b/ext/zip/lib/zip_fclose.c
index c0105a929..91f30b7bb 100644
--- a/ext/zip/lib/zip_fclose.c
+++ b/ext/zip/lib/zip_fclose.c
@@ -42,7 +42,7 @@
-int
+PHPZIPAPI int
zip_fclose(struct zip_file *zf)
{
int i, ret;
diff --git a/ext/zip/lib/zip_file_error_clear.c b/ext/zip/lib/zip_file_error_clear.c
index 86ed68f27..dca33b35f 100644
--- a/ext/zip/lib/zip_file_error_clear.c
+++ b/ext/zip/lib/zip_file_error_clear.c
@@ -2,7 +2,7 @@
$NiH: zip_file_error_clear.c,v 1.4 2006/10/04 18:37:54 wiz Exp $
zip_file_error_clear.c -- clear zip file error
- Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <nih@giga.or.at>
@@ -40,7 +40,7 @@
-void
+PHPZIPAPI void
zip_file_error_clear(struct zip_file *zf)
{
_zip_error_clear(&zf->error);
diff --git a/ext/zip/lib/zip_file_error_get.c b/ext/zip/lib/zip_file_error_get.c
index 2ab3a73a4..05516703c 100644
--- a/ext/zip/lib/zip_file_error_get.c
+++ b/ext/zip/lib/zip_file_error_get.c
@@ -40,7 +40,7 @@
-void
+PHPZIPAPI void
zip_file_error_get(struct zip_file *zf, int *zep, int *sep)
{
_zip_error_get(&zf->error, zep, sep);
diff --git a/ext/zip/lib/zip_file_get_offset.c b/ext/zip/lib/zip_file_get_offset.c
index 8bcc64934..493004023 100644
--- a/ext/zip/lib/zip_file_get_offset.c
+++ b/ext/zip/lib/zip_file_get_offset.c
@@ -56,7 +56,7 @@
On error, fills in za->error and returns 0.
*/
-unsigned int
+PHPZIPAPI unsigned int
_zip_file_get_offset(struct zip *za, int idx)
{
struct zip_dirent de;
diff --git a/ext/zip/lib/zip_file_strerror.c b/ext/zip/lib/zip_file_strerror.c
index aaff18999..2cc79c133 100644
--- a/ext/zip/lib/zip_file_strerror.c
+++ b/ext/zip/lib/zip_file_strerror.c
@@ -40,7 +40,7 @@
-const char *
+PHPZIPAPI const char *
zip_file_strerror(struct zip_file *zf)
{
return _zip_error_strerror(&zf->error);
diff --git a/ext/zip/lib/zip_fopen.c b/ext/zip/lib/zip_fopen.c
index 850a8d835..c05ad45bd 100644
--- a/ext/zip/lib/zip_fopen.c
+++ b/ext/zip/lib/zip_fopen.c
@@ -40,7 +40,7 @@
-struct zip_file *
+PHPZIPAPI struct zip_file *
zip_fopen(struct zip *za, const char *fname, int flags)
{
int idx;
diff --git a/ext/zip/lib/zip_fopen_index.c b/ext/zip/lib/zip_fopen_index.c
index 5da9230b2..105cefe73 100644
--- a/ext/zip/lib/zip_fopen_index.c
+++ b/ext/zip/lib/zip_fopen_index.c
@@ -46,7 +46,7 @@ static struct zip_file *_zip_file_new(struct zip *za);
-struct zip_file *
+PHPZIPAPI struct zip_file *
zip_fopen_index(struct zip *za, int fileno, int flags)
{
int len, ret;
@@ -141,7 +141,7 @@ zip_fopen_index(struct zip *za, int fileno, int flags)
-int
+PHPZIPAPI int
_zip_file_fillbuf(void *buf, size_t buflen, struct zip_file *zf)
{
int i, j;
diff --git a/ext/zip/lib/zip_fread.c b/ext/zip/lib/zip_fread.c
index aeb64c90f..064d2b97f 100644
--- a/ext/zip/lib/zip_fread.c
+++ b/ext/zip/lib/zip_fread.c
@@ -40,7 +40,7 @@
-ssize_t
+PHPZIPAPI ssize_t
zip_fread(struct zip_file *zf, void *outbuf, size_t toread)
{
int ret;
diff --git a/ext/zip/lib/zip_free.c b/ext/zip/lib/zip_free.c
index c78697d25..534c58eb0 100644
--- a/ext/zip/lib/zip_free.c
+++ b/ext/zip/lib/zip_free.c
@@ -45,7 +45,7 @@
frees the space allocated to a zipfile struct, and closes the
corresponding file. */
-void
+PHPZIPAPI void
_zip_free(struct zip *za)
{
int i;
diff --git a/ext/zip/lib/zip_get_archive_comment.c b/ext/zip/lib/zip_get_archive_comment.c
index 7844c5e19..c23597c09 100644
--- a/ext/zip/lib/zip_get_archive_comment.c
+++ b/ext/zip/lib/zip_get_archive_comment.c
@@ -40,7 +40,7 @@
-const char *
+PHPZIPAPI const char *
zip_get_archive_comment(struct zip *za, int *lenp, int flags)
{
if ((flags & ZIP_FL_UNCHANGED)
diff --git a/ext/zip/lib/zip_get_file_comment.c b/ext/zip/lib/zip_get_file_comment.c
index 79a5c236b..476ac7da0 100644
--- a/ext/zip/lib/zip_get_file_comment.c
+++ b/ext/zip/lib/zip_get_file_comment.c
@@ -40,7 +40,7 @@
-const char *
+PHPZIPAPI const char *
zip_get_file_comment(struct zip *za, int idx, int *lenp, int flags)
{
if (idx < 0 || idx >= za->nentry) {
diff --git a/ext/zip/lib/zip_get_name.c b/ext/zip/lib/zip_get_name.c
index c45dd0333..c2cae2518 100644
--- a/ext/zip/lib/zip_get_name.c
+++ b/ext/zip/lib/zip_get_name.c
@@ -40,7 +40,7 @@
-const char *
+PHPZIPAPI const char *
zip_get_name(struct zip *za, int idx, int flags)
{
return _zip_get_name(za, idx, flags, &za->error);
@@ -48,7 +48,7 @@ zip_get_name(struct zip *za, int idx, int flags)
-const char *
+PHPZIPAPI const char *
_zip_get_name(struct zip *za, int idx, int flags, struct zip_error *error)
{
if (idx < 0 || idx >= za->nentry) {
diff --git a/ext/zip/lib/zip_get_num_files.c b/ext/zip/lib/zip_get_num_files.c
index 0cc81edb0..05a54fcb6 100644
--- a/ext/zip/lib/zip_get_num_files.c
+++ b/ext/zip/lib/zip_get_num_files.c
@@ -40,7 +40,7 @@
-int
+PHPZIPAPI int
zip_get_num_files(struct zip *za)
{
if (za == NULL)
diff --git a/ext/zip/lib/zip_memdup.c b/ext/zip/lib/zip_memdup.c
index c4ecf4a69..ebb7426dd 100644
--- a/ext/zip/lib/zip_memdup.c
+++ b/ext/zip/lib/zip_memdup.c
@@ -41,7 +41,7 @@
-void *
+PHPZIPAPI void *
_zip_memdup(const void *mem, size_t len, struct zip_error *error)
{
void *ret;
diff --git a/ext/zip/lib/zip_name_locate.c b/ext/zip/lib/zip_name_locate.c
index a2fce2d03..108db4f60 100644
--- a/ext/zip/lib/zip_name_locate.c
+++ b/ext/zip/lib/zip_name_locate.c
@@ -42,7 +42,7 @@
-int
+PHPZIPAPI int
zip_name_locate(struct zip *za, const char *fname, int flags)
{
return _zip_name_locate(za, fname, flags, &za->error);
@@ -50,7 +50,7 @@ zip_name_locate(struct zip *za, const char *fname, int flags)
-int
+PHPZIPAPI int
_zip_name_locate(struct zip *za, const char *fname, int flags,
struct zip_error *error)
{
@@ -62,8 +62,11 @@ _zip_name_locate(struct zip *za, const char *fname, int flags,
_zip_error_set(error, ZIP_ER_INVAL, 0);
return -1;
}
-
- cmp = (flags & ZIP_FL_NOCASE) ? strcasecmp : strcmp;
+#ifdef PHP_WIN32
+ cmp = (flags & ZIP_FL_NOCASE) ? stricmp : strcmp;
+#else
+ cmp = (flags & ZIP_FL_NOCASE) ? strcasecmp : strcmp;
+#endif
n = (flags & ZIP_FL_UNCHANGED) ? za->cdir->nentry : za->nentry;
for (i=0; i<n; i++) {
diff --git a/ext/zip/lib/zip_new.c b/ext/zip/lib/zip_new.c
index 660183a15..378513b6c 100644
--- a/ext/zip/lib/zip_new.c
+++ b/ext/zip/lib/zip_new.c
@@ -45,7 +45,7 @@
creates a new zipfile struct, and sets the contents to zero; returns
the new struct. */
-struct zip *
+PHPZIPAPI struct zip *
_zip_new(struct zip_error *error)
{
struct zip *za;
diff --git a/ext/zip/lib/zip_open.c b/ext/zip/lib/zip_open.c
index 60526e8c9..711dcb1ca 100644
--- a/ext/zip/lib/zip_open.c
+++ b/ext/zip/lib/zip_open.c
@@ -2,7 +2,7 @@
$NiH: zip_open.c,v 1.38 2006/05/04 00:01:26 dillo Exp $
zip_open.c -- open zip archive
- Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <nih@giga.or.at>
@@ -58,7 +58,7 @@ static struct zip_cdir *_zip_readcdir(FILE *, unsigned char *, unsigned char *,
-struct zip *
+PHPZIPAPI struct zip *
zip_open(const char *fn, int flags, int *zep)
{
FILE *fp;
diff --git a/ext/zip/lib/zip_rename.c b/ext/zip/lib/zip_rename.c
index f35291893..8141dc46a 100644
--- a/ext/zip/lib/zip_rename.c
+++ b/ext/zip/lib/zip_rename.c
@@ -40,7 +40,7 @@
-int
+PHPZIPAPI int
zip_rename(struct zip *za, int idx, const char *name)
{
if (idx >= za->nentry || idx < 0) {
diff --git a/ext/zip/lib/zip_replace.c b/ext/zip/lib/zip_replace.c
index ae78e62b8..12db005f2 100644
--- a/ext/zip/lib/zip_replace.c
+++ b/ext/zip/lib/zip_replace.c
@@ -40,7 +40,7 @@
-int
+PHPZIPAPI int
zip_replace(struct zip *za, int idx, struct zip_source *source)
{
if (idx < 0 || idx >= za->nentry || source == NULL) {
@@ -57,7 +57,7 @@ zip_replace(struct zip *za, int idx, struct zip_source *source)
-int
+PHPZIPAPI int
_zip_replace(struct zip *za, int idx, const char *name,
struct zip_source *source)
{
diff --git a/ext/zip/lib/zip_set_archive_comment.c b/ext/zip/lib/zip_set_archive_comment.c
index b0929e56b..7649a80de 100644
--- a/ext/zip/lib/zip_set_archive_comment.c
+++ b/ext/zip/lib/zip_set_archive_comment.c
@@ -42,7 +42,7 @@
-int
+PHPZIPAPI int
zip_set_archive_comment(struct zip *za, const char *comment, int len)
{
char *tmpcom;
diff --git a/ext/zip/lib/zip_set_file_comment.c b/ext/zip/lib/zip_set_file_comment.c
index cbf71db5c..5454aa21d 100644
--- a/ext/zip/lib/zip_set_file_comment.c
+++ b/ext/zip/lib/zip_set_file_comment.c
@@ -42,7 +42,7 @@
-int
+PHPZIPAPI int
zip_set_file_comment(struct zip *za, int idx, const char *comment, int len)
{
char *tmpcom;
diff --git a/ext/zip/lib/zip_set_name.c b/ext/zip/lib/zip_set_name.c
index 46dca5646..8a401faac 100644
--- a/ext/zip/lib/zip_set_name.c
+++ b/ext/zip/lib/zip_set_name.c
@@ -42,7 +42,7 @@
-int
+PHPZIPAPI int
_zip_set_name(struct zip *za, int idx, const char *name)
{
char *s;
diff --git a/ext/zip/lib/zip_source_buffer.c b/ext/zip/lib/zip_source_buffer.c
index a01f18d3f..95875b74c 100644
--- a/ext/zip/lib/zip_source_buffer.c
+++ b/ext/zip/lib/zip_source_buffer.c
@@ -2,7 +2,7 @@
$NiH: zip_source_buffer.c,v 1.8 2006/04/23 14:50:49 wiz Exp $
zip_source_buffer.c -- create zip data source from buffer
- Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <nih@giga.or.at>
@@ -52,7 +52,7 @@ static ssize_t read_data(void *state, void *data, size_t len,
-struct zip_source *
+PHPZIPAPI struct zip_source *
zip_source_buffer(struct zip *za, const void *data, off_t len, int freep)
{
struct read_data *f;
diff --git a/ext/zip/lib/zip_source_file.c b/ext/zip/lib/zip_source_file.c
index d635da342..486e1900d 100644
--- a/ext/zip/lib/zip_source_file.c
+++ b/ext/zip/lib/zip_source_file.c
@@ -43,7 +43,7 @@
-struct zip_source *
+PHPZIPAPI struct zip_source *
zip_source_file(struct zip *za, const char *fname, off_t start, off_t len)
{
struct zip_source *zs;
diff --git a/ext/zip/lib/zip_source_filep.c b/ext/zip/lib/zip_source_filep.c
index efc702686..8a3304265 100644
--- a/ext/zip/lib/zip_source_filep.c
+++ b/ext/zip/lib/zip_source_filep.c
@@ -2,7 +2,7 @@
$NiH: zip_source_filep.c,v 1.6 2005/06/09 19:57:10 dillo Exp $
zip_source_filep.c -- create data source from FILE *
- Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <nih@giga.or.at>
@@ -57,7 +57,7 @@ static ssize_t read_file(void *state, void *data, size_t len,
-struct zip_source *
+PHPZIPAPI struct zip_source *
zip_source_filep(struct zip *za, FILE *file, off_t start, off_t len)
{
struct read_file *f;
diff --git a/ext/zip/lib/zip_source_free.c b/ext/zip/lib/zip_source_free.c
index 33e36eaf4..707309c91 100644
--- a/ext/zip/lib/zip_source_free.c
+++ b/ext/zip/lib/zip_source_free.c
@@ -42,7 +42,7 @@
-void
+PHPZIPAPI void
zip_source_free(struct zip_source *source)
{
if (source == NULL)
diff --git a/ext/zip/lib/zip_source_function.c b/ext/zip/lib/zip_source_function.c
index 4f01a43c5..4ab110924 100644
--- a/ext/zip/lib/zip_source_function.c
+++ b/ext/zip/lib/zip_source_function.c
@@ -42,7 +42,7 @@
-struct zip_source *
+PHPZIPAPI struct zip_source *
zip_source_function(struct zip *za, zip_source_callback zcb, void *ud)
{
struct zip_source *zs;
diff --git a/ext/zip/lib/zip_source_zip.c b/ext/zip/lib/zip_source_zip.c
index a31fd2787..75e656402 100644
--- a/ext/zip/lib/zip_source_zip.c
+++ b/ext/zip/lib/zip_source_zip.c
@@ -52,7 +52,7 @@ static ssize_t read_zip(void *st, void *data, size_t len,
-struct zip_source *
+PHPZIPAPI struct zip_source *
zip_source_zip(struct zip *za, struct zip *srcza, int srcidx, int flags,
off_t start, off_t len)
{
diff --git a/ext/zip/lib/zip_stat.c b/ext/zip/lib/zip_stat.c
index bea153d15..7c6cbf00d 100644
--- a/ext/zip/lib/zip_stat.c
+++ b/ext/zip/lib/zip_stat.c
@@ -40,7 +40,7 @@
-int
+PHPZIPAPI int
zip_stat(struct zip *za, const char *fname, int flags, struct zip_stat *st)
{
int idx;
diff --git a/ext/zip/lib/zip_stat_index.c b/ext/zip/lib/zip_stat_index.c
index bab79a74b..cf55565ef 100644
--- a/ext/zip/lib/zip_stat_index.c
+++ b/ext/zip/lib/zip_stat_index.c
@@ -40,7 +40,7 @@
-int
+PHPZIPAPI int
zip_stat_index(struct zip *za, int index, int flags, struct zip_stat *st)
{
const char *name;
diff --git a/ext/zip/lib/zip_stat_init.c b/ext/zip/lib/zip_stat_init.c
index 7ab0f4da7..e9c056dfc 100644
--- a/ext/zip/lib/zip_stat_init.c
+++ b/ext/zip/lib/zip_stat_init.c
@@ -39,7 +39,7 @@
-void
+PHPZIPAPI void
zip_stat_init(struct zip_stat *st)
{
st->name = NULL;
diff --git a/ext/zip/lib/zip_strerror.c b/ext/zip/lib/zip_strerror.c
index 83e298506..f3e5aa9fe 100644
--- a/ext/zip/lib/zip_strerror.c
+++ b/ext/zip/lib/zip_strerror.c
@@ -40,7 +40,7 @@
-const char *
+PHPZIPAPI const char *
zip_strerror(struct zip *za)
{
return _zip_error_strerror(&za->error);
diff --git a/ext/zip/lib/zip_unchange.c b/ext/zip/lib/zip_unchange.c
index 34e7f2d36..80070e7a3 100644
--- a/ext/zip/lib/zip_unchange.c
+++ b/ext/zip/lib/zip_unchange.c
@@ -41,7 +41,7 @@
-int
+PHPZIPAPI int
zip_unchange(struct zip *za, int idx)
{
return _zip_unchange(za, idx, 0);
@@ -49,7 +49,7 @@ zip_unchange(struct zip *za, int idx)
-int
+PHPZIPAPI int
_zip_unchange(struct zip *za, int idx, int allow_duplicates)
{
int i;
diff --git a/ext/zip/lib/zip_unchange_all.c b/ext/zip/lib/zip_unchange_all.c
index f1e27da04..2d4459c82 100644
--- a/ext/zip/lib/zip_unchange_all.c
+++ b/ext/zip/lib/zip_unchange_all.c
@@ -41,7 +41,7 @@
-int
+PHPZIPAPI int
zip_unchange_all(struct zip *za)
{
int ret, i;
diff --git a/ext/zip/lib/zip_unchange_archive.c b/ext/zip/lib/zip_unchange_archive.c
index 7418aaf6a..6c2bc6dcb 100644
--- a/ext/zip/lib/zip_unchange_archive.c
+++ b/ext/zip/lib/zip_unchange_archive.c
@@ -41,7 +41,7 @@
-int
+PHPZIPAPI int
zip_unchange_archive(struct zip *za)
{
free(za->ch_comment);
diff --git a/ext/zip/lib/zip_unchange_data.c b/ext/zip/lib/zip_unchange_data.c
index 252676926..dfa2ea545 100644
--- a/ext/zip/lib/zip_unchange_data.c
+++ b/ext/zip/lib/zip_unchange_data.c
@@ -39,7 +39,7 @@
#include "zipint.h"
-void
+PHPZIPAPI void
_zip_unchange_data(struct zip_entry *ze)
{
if (ze->source) {
diff --git a/ext/zip/lib/zip_win32.h b/ext/zip/lib/zip_win32.h
index a33347ba0..ea3860d60 100644
--- a/ext/zip/lib/zip_win32.h
+++ b/ext/zip/lib/zip_win32.h
@@ -1,6 +1,3 @@
-
-#ifdef _MSC_VER
-
#define _POSIX_
#include <windows.h>
#include <io.h>
@@ -12,9 +9,6 @@
#ifndef mode_t
# define mode_t int
#endif
-#ifndef strcasecmp
-# define strcasecmp stricmp
-#endif
#ifndef snprintf
# define snprintf _snprintf
#endif
@@ -26,4 +20,3 @@
# define fseeko fseek
#endif
*/
-#endif
diff --git a/ext/zip/lib/zipint.h b/ext/zip/lib/zipint.h
index ebf2743f9..33632aca4 100644
--- a/ext/zip/lib/zipint.h
+++ b/ext/zip/lib/zipint.h
@@ -39,6 +39,10 @@
#include <zlib.h>
#include "zip.h"
+/* #defines that rename all zip_ functions and structs */
+#include "zipint_alias.h"
+
+BEGIN_EXTERN_C()
#ifndef HAVE_FSEEKO
#define fseeko(s, o, w) (fseek((s), (long int)(o), (w)))
#endif
@@ -185,42 +189,43 @@ extern const int _zip_err_type[];
-void _zip_cdir_free(struct zip_cdir *);
-struct zip_cdir *_zip_cdir_new(int, struct zip_error *);
-int _zip_cdir_write(struct zip_cdir *, FILE *, struct zip_error *);
+PHPZIPAPI void _zip_cdir_free(struct zip_cdir *);
+PHPZIPAPI struct zip_cdir *_zip_cdir_new(int, struct zip_error *);
+PHPZIPAPI int _zip_cdir_write(struct zip_cdir *, FILE *, struct zip_error *);
-void _zip_dirent_finalize(struct zip_dirent *);
-void _zip_dirent_init(struct zip_dirent *);
-int _zip_dirent_read(struct zip_dirent *, FILE *,
+PHPZIPAPI void _zip_dirent_finalize(struct zip_dirent *);
+PHPZIPAPI void _zip_dirent_init(struct zip_dirent *);
+PHPZIPAPI int _zip_dirent_read(struct zip_dirent *, FILE *,
unsigned char **, unsigned int, int, struct zip_error *);
-int _zip_dirent_write(struct zip_dirent *, FILE *, int, struct zip_error *);
-
-void _zip_entry_free(struct zip_entry *);
-void _zip_entry_init(struct zip *, int);
-struct zip_entry *_zip_entry_new(struct zip *);
-
-void _zip_error_clear(struct zip_error *);
-void _zip_error_copy(struct zip_error *, struct zip_error *);
-void _zip_error_fini(struct zip_error *);
-void _zip_error_get(struct zip_error *, int *, int *);
-void _zip_error_init(struct zip_error *);
-void _zip_error_set(struct zip_error *, int, int);
-const char *_zip_error_strerror(struct zip_error *);
-
-int _zip_file_fillbuf(void *, size_t, struct zip_file *);
-unsigned int _zip_file_get_offset(struct zip *, int);
-
-void _zip_free(struct zip *);
-const char *_zip_get_name(struct zip *, int, int, struct zip_error *);
-int _zip_local_header_read(struct zip *, int);
-void *_zip_memdup(const void *, size_t, struct zip_error *);
-int _zip_name_locate(struct zip *, const char *, int, struct zip_error *);
-struct zip *_zip_new(struct zip_error *);
-unsigned short _zip_read2(unsigned char **);
-unsigned int _zip_read4(unsigned char **);
-int _zip_replace(struct zip *, int, const char *, struct zip_source *);
-int _zip_set_name(struct zip *, int, const char *);
-int _zip_unchange(struct zip *, int, int);
-void _zip_unchange_data(struct zip_entry *);
-
+PHPZIPAPI int _zip_dirent_write(struct zip_dirent *, FILE *, int, struct zip_error *);
+
+PHPZIPAPI void _zip_entry_free(struct zip_entry *);
+PHPZIPAPI void _zip_entry_init(struct zip *, int);
+PHPZIPAPI struct zip_entry *_zip_entry_new(struct zip *);
+
+PHPZIPAPI void _zip_error_clear(struct zip_error *);
+PHPZIPAPI void _zip_error_copy(struct zip_error *, struct zip_error *);
+PHPZIPAPI void _zip_error_fini(struct zip_error *);
+PHPZIPAPI void _zip_error_get(struct zip_error *, int *, int *);
+PHPZIPAPI void _zip_error_init(struct zip_error *);
+PHPZIPAPI void _zip_error_set(struct zip_error *, int, int);
+PHPZIPAPI const char *_zip_error_strerror(struct zip_error *);
+
+PHPZIPAPI int _zip_file_fillbuf(void *, size_t, struct zip_file *);
+PHPZIPAPI unsigned int _zip_file_get_offset(struct zip *, int);
+
+PHPZIPAPI void _zip_free(struct zip *);
+PHPZIPAPI const char *_zip_get_name(struct zip *, int, int, struct zip_error *);
+PHPZIPAPI int _zip_local_header_read(struct zip *, int);
+PHPZIPAPI void *_zip_memdup(const void *, size_t, struct zip_error *);
+PHPZIPAPI int _zip_name_locate(struct zip *, const char *, int, struct zip_error *);
+PHPZIPAPI struct zip *_zip_new(struct zip_error *);
+PHPZIPAPI unsigned short _zip_read2(unsigned char **);
+PHPZIPAPI unsigned int _zip_read4(unsigned char **);
+PHPZIPAPI int _zip_replace(struct zip *, int, const char *, struct zip_source *);
+PHPZIPAPI int _zip_set_name(struct zip *, int, const char *);
+PHPZIPAPI int _zip_unchange(struct zip *, int, int);
+PHPZIPAPI void _zip_unchange_data(struct zip_entry *);
+
+END_EXTERN_C();
#endif /* zipint.h */
diff --git a/ext/zip/lib/zipint_alias.h b/ext/zip/lib/zipint_alias.h
new file mode 100644
index 000000000..e8541b36e
--- /dev/null
+++ b/ext/zip/lib/zipint_alias.h
@@ -0,0 +1,49 @@
+
+/* state of change of a file in zip archive */
+#define zip_state php_ziplib__zip_state
+#define zip_error php_ziplib__zip_error
+#define zip_dirent php_ziplib__zip_dirent
+#define zip_cdir php_ziplib__zip_cdir
+#define zip_source php_ziplib__zip_source
+#define zip_entry php_ziplib__zip_entry
+
+#define _zip_err_str php_ziplib___zip_err_str
+#define _zip_nerr_str php_ziplib___zip_nerr_str
+#define _zip_err_type php_ziplib___zip_err_type
+
+#define _zip_cdir_free php_ziplib___zip_cdir_free
+#define _zip_cdir_new php_ziplib___zip_cdir_new
+#define _zip_cdir_write php_ziplib___zip_cdir_write
+
+#define _zip_dirent_finalize php_ziplib___zip_dirent_finalize
+#define _zip_dirent_init php_ziplib___zip_dirent_init
+#define _zip_dirent_read php_ziplib___zip_dirent_read
+#define _zip_dirent_write php_ziplib___zip_dirent_write
+
+#define _zip_entry_free php_ziplib___zip_entry_free
+#define _zip_entry_init php_ziplib___zip_entry_init
+#define _zip_entry_new php_ziplib___zip_entry_new
+
+#define _zip_error_clear php_ziplib___zip_error_clear
+#define _zip_error_copy php_ziplib___zip_error_copy
+#define _zip_error_fini php_ziplib___zip_error_fini
+#define _zip_error_get php_ziplib___zip_error_get
+#define _zip_error_init php_ziplib___zip_error_init
+#define _zip_error_set php_ziplib___zip_error_set
+#define _zip_error_strerror php_ziplib___zip_error_strerror
+
+#define _zip_file_fillbuf php_ziplib___zip_file_fillbuf
+#define _zip_file_get_offset php_ziplib___zip_file_get_offset
+
+#define _zip_free php_ziplib___zip_free
+#define _zip_get_name php_ziplib___zip_get_name
+#define _zip_local_header_read php_ziplib___zip_local_header_read
+#define _zip_memdup php_ziplib___zip_memdup
+#define _zip_name_locate php_ziplib___zip_name_locate
+#define _zip_new php_ziplib___zip_new
+#define _zip_read2 php_ziplib___zip_read2
+#define _zip_read4 php_ziplib___zip_read4
+#define _zip_replace php_ziplib___zip_replace
+#define _zip_set_name php_ziplib___zip_set_name
+#define _zip_unchange php_ziplib___zip_unchange
+#define _zip_unchange_data php_ziplib___zip_unchange_data
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 6f27fe950..b066a211c 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_zip.c,v 1.1.2.38 2007/08/06 22:02:32 bjori Exp $ */
+/* $Id: php_zip.c,v 1.1.2.43 2008/01/18 00:51:38 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -31,16 +31,17 @@
#include "lib/zip.h"
#include "lib/zipint.h"
-static PHP_FUNCTION(zip_open);
-static PHP_FUNCTION(zip_read);
-static PHP_FUNCTION(zip_close);
-static PHP_FUNCTION(zip_entry_read);
-static PHP_FUNCTION(zip_entry_filesize);
-static PHP_FUNCTION(zip_entry_name);
-static PHP_FUNCTION(zip_entry_compressedsize);
-static PHP_FUNCTION(zip_entry_compressionmethod);
-static PHP_FUNCTION(zip_entry_open);
-static PHP_FUNCTION(zip_entry_close);
+/* zip_open is a macro for renaming libzip zipopen, so we need to use PHP_NAMED_FUNCTION */
+static PHP_NAMED_FUNCTION(zif_zip_open);
+static PHP_NAMED_FUNCTION(zif_zip_read);
+static PHP_NAMED_FUNCTION(zif_zip_close);
+static PHP_NAMED_FUNCTION(zif_zip_entry_read);
+static PHP_NAMED_FUNCTION(zif_zip_entry_filesize);
+static PHP_NAMED_FUNCTION(zif_zip_entry_name);
+static PHP_NAMED_FUNCTION(zif_zip_entry_compressedsize);
+static PHP_NAMED_FUNCTION(zif_zip_entry_compressionmethod);
+static PHP_NAMED_FUNCTION(zif_zip_entry_open);
+static PHP_NAMED_FUNCTION(zif_zip_entry_close);
/* {{{ Resource le */
static int le_zip_dir;
@@ -273,9 +274,9 @@ static char * php_zipobj_get_zip_comment(struct zip *za, int *len TSRMLS_DC) /*
/* {{{ zend_function_entry */
static zend_function_entry zip_functions[] = {
- PHP_FE(zip_open, NULL)
- PHP_FE(zip_close, NULL)
- PHP_FE(zip_read, NULL)
+ ZEND_RAW_FENTRY("zip_open", zif_zip_open, NULL, 0)
+ ZEND_RAW_FENTRY("zip_close", zif_zip_close, NULL, 0)
+ ZEND_RAW_FENTRY("zip_read", zif_zip_read, NULL, 0)
PHP_FE(zip_entry_open, NULL)
PHP_FE(zip_entry_close, NULL)
PHP_FE(zip_entry_read, NULL)
@@ -634,6 +635,8 @@ static void php_zip_free_entry(zend_rsrc_list_entry *rsrc TSRMLS_DC)
/* }}}*/
+/* reset macro */
+#undef zip
/* {{{ function prototypes */
static PHP_MINIT_FUNCTION(zip);
static PHP_MSHUTDOWN_FUNCTION(zip);
@@ -651,7 +654,7 @@ zend_module_entry zip_module_entry = {
NULL,
NULL,
PHP_MINFO(zip),
- "1.4.0",
+ "2.0.0",
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -659,10 +662,12 @@ zend_module_entry zip_module_entry = {
#ifdef COMPILE_DL_ZIP
ZEND_GET_MODULE(zip)
#endif
+/* set macro */
+#define zip php_ziplib__zip
/* {{{ proto resource zip_open(string filename)
Create new zip using source uri for output */
-static PHP_FUNCTION(zip_open)
+static PHP_NAMED_FUNCTION(zif_zip_open)
{
char *filename;
int filename_len;
@@ -704,7 +709,7 @@ static PHP_FUNCTION(zip_open)
/* {{{ proto void zip_close(resource zip)
Close a Zip archive */
-static PHP_FUNCTION(zip_close)
+static PHP_NAMED_FUNCTION(zif_zip_close)
{
zval * zip;
zip_rsrc *z_rsrc = NULL;
@@ -721,7 +726,7 @@ static PHP_FUNCTION(zip_close)
/* {{{ proto resource zip_read(resource zip)
Returns the next file in the archive */
-static PHP_FUNCTION(zip_read)
+static PHP_NAMED_FUNCTION(zif_zip_read)
{
zval *zip_dp;
zip_read_rsrc *zr_rsrc;
@@ -765,7 +770,7 @@ static PHP_FUNCTION(zip_read)
/* {{{ proto bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])
Open a Zip File, pointed by the resource entry */
/* Dummy function to follow the old API */
-static PHP_FUNCTION(zip_entry_open)
+static PHP_NAMED_FUNCTION(zif_zip_entry_open)
{
zval * zip;
zval * zip_entry;
@@ -792,7 +797,7 @@ static PHP_FUNCTION(zip_entry_open)
/* {{{ proto void zip_entry_close(resource zip_ent)
Close a zip entry */
/* another dummy function to fit in the old api*/
-static PHP_FUNCTION(zip_entry_close)
+static PHP_NAMED_FUNCTION(zif_zip_entry_close)
{
zval * zip_entry;
zip_read_rsrc * zr_rsrc;
@@ -809,7 +814,7 @@ static PHP_FUNCTION(zip_entry_close)
/* {{{ proto mixed zip_entry_read(resource zip_entry [, int len])
Read from an open directory entry */
-static PHP_FUNCTION(zip_entry_read)
+static PHP_NAMED_FUNCTION(zif_zip_entry_read)
{
zval * zip_entry;
long len = 0;
@@ -909,7 +914,7 @@ static void php_zip_entry_get_info(INTERNAL_FUNCTION_PARAMETERS, int opt) /* {{{
/* {{{ proto string zip_entry_name(resource zip_entry)
Return the name given a ZZip entry */
-static PHP_FUNCTION(zip_entry_name)
+static PHP_NAMED_FUNCTION(zif_zip_entry_name)
{
php_zip_entry_get_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
@@ -917,7 +922,7 @@ static PHP_FUNCTION(zip_entry_name)
/* {{{ proto int zip_entry_compressedsize(resource zip_entry)
Return the compressed size of a ZZip entry */
-static PHP_FUNCTION(zip_entry_compressedsize)
+static PHP_NAMED_FUNCTION(zif_zip_entry_compressedsize)
{
php_zip_entry_get_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
@@ -925,7 +930,7 @@ static PHP_FUNCTION(zip_entry_compressedsize)
/* {{{ proto int zip_entry_filesize(resource zip_entry)
Return the actual filesize of a ZZip entry */
-static PHP_FUNCTION(zip_entry_filesize)
+static PHP_NAMED_FUNCTION(zif_zip_entry_filesize)
{
php_zip_entry_get_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2);
}
@@ -933,13 +938,13 @@ static PHP_FUNCTION(zip_entry_filesize)
/* {{{ proto string zip_entry_compressionmethod(resource zip_entry)
Return a string containing the compression method used on a particular entry */
-static PHP_FUNCTION(zip_entry_compressionmethod)
+static PHP_NAMED_FUNCTION(zif_zip_entry_compressionmethod)
{
php_zip_entry_get_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, 3);
}
/* }}} */
-/* {{{ proto mixed open(string source [, int flags])
+/* {{{ proto mixed ZipArchive::open(string source [, int flags])
Create new zip using source uri for output, return TRUE on success or the error code */
static ZIPARCHIVE_METHOD(open)
{
@@ -997,7 +1002,7 @@ static ZIPARCHIVE_METHOD(open)
}
/* }}} */
-/* {{{ proto bool close()
+/* {{{ proto bool ZipArchive::close()
close the zip archive */
static ZIPARCHIVE_METHOD(close)
{
@@ -1026,7 +1031,7 @@ static ZIPARCHIVE_METHOD(close)
}
/* }}} */
-/* {{{ proto bool createEmptyDir(string dirname) U
+/* {{{ proto bool ZipArchive::createEmptyDir(string dirname)
Returns the index of the entry named filename in the archive */
static ZIPARCHIVE_METHOD(addEmptyDir)
{
@@ -1085,7 +1090,7 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
}
/* }}} */
-/* {{{ proto bool addFile(string filepath[, string entryname[, int start [, int length]]])
+/* {{{ proto bool ZipArchive::addFile(string filepath[, string entryname[, int start [, int length]]])
Add a file in a Zip archive using its path and the name to use. */
static ZIPARCHIVE_METHOD(addFile)
{
@@ -1157,7 +1162,7 @@ static ZIPARCHIVE_METHOD(addFile)
}
/* }}} */
-/* {{{ proto bool addFromString(string name, string content)
+/* {{{ proto bool ZipArchive::addFromString(string name, string content)
Add a file using content and the entry name */
static ZIPARCHIVE_METHOD(addFromString)
{
@@ -1222,7 +1227,7 @@ static ZIPARCHIVE_METHOD(addFromString)
}
/* }}} */
-/* {{{ proto array statName(string filename[, int flags])
+/* {{{ proto array ZipArchive::statName(string filename[, int flags])
Returns the information about a the zip entry filename */
static ZIPARCHIVE_METHOD(statName)
{
@@ -1250,7 +1255,7 @@ static ZIPARCHIVE_METHOD(statName)
}
/* }}} */
-/* {{{ proto resource statIndex(int index[, int flags])
+/* {{{ proto resource ZipArchive::statIndex(int index[, int flags])
Returns the zip entry informations using its index */
static ZIPARCHIVE_METHOD(statIndex)
{
@@ -1278,7 +1283,7 @@ static ZIPARCHIVE_METHOD(statIndex)
}
/* }}} */
-/* {{{ proto int locateName(string filename[, int flags])
+/* {{{ proto int ZipArchive::locateName(string filename[, int flags])
Returns the index of the entry named filename in the archive */
static ZIPARCHIVE_METHOD(locateName)
{
@@ -1318,7 +1323,7 @@ static ZIPARCHIVE_METHOD(locateName)
}
/* }}} */
-/* {{{ proto string getNameIndex(int index [, int flags])
+/* {{{ proto string ZipArchive::getNameIndex(int index [, int flags])
Returns the name of the file at position index */
static ZIPARCHIVE_METHOD(getNameIndex)
{
@@ -1348,7 +1353,7 @@ static ZIPARCHIVE_METHOD(getNameIndex)
}
/* }}} */
-/* {{{ proto bool setArchiveComment(string name, string comment)
+/* {{{ proto bool ZipArchive::setArchiveComment(string name, string comment)
Set or remove (NULL/'') the comment of the archive */
static ZIPARCHIVE_METHOD(setArchiveComment)
{
@@ -1374,7 +1379,7 @@ static ZIPARCHIVE_METHOD(setArchiveComment)
}
/* }}} */
-/* {{{ proto string getArchiveComment()
+/* {{{ proto string ZipArchive::getArchiveComment()
Returns the comment of an entry using its index */
static ZIPARCHIVE_METHOD(getArchiveComment)
{
@@ -1399,7 +1404,7 @@ static ZIPARCHIVE_METHOD(getArchiveComment)
}
/* }}} */
-/* {{{ proto bool setCommentName(string name, string comment)
+/* {{{ proto bool ZipArchive::setCommentName(string name, string comment)
Set or remove (NULL/'') the comment of an entry using its Name */
static ZIPARCHIVE_METHOD(setCommentName)
{
@@ -1432,7 +1437,7 @@ static ZIPARCHIVE_METHOD(setCommentName)
}
/* }}} */
-/* {{{ proto bool setCommentIndex(int index, string comment)
+/* {{{ proto bool ZipArchive::setCommentIndex(int index, string comment)
Set or remove (NULL/'') the comment of an entry using its index */
static ZIPARCHIVE_METHOD(setCommentIndex)
{
@@ -1459,7 +1464,7 @@ static ZIPARCHIVE_METHOD(setCommentIndex)
}
/* }}} */
-/* {{{ proto string getCommentName(string name)
+/* {{{ proto string ZipArchive::getCommentName(string name)
Returns the comment of an entry using its name */
static ZIPARCHIVE_METHOD(getCommentName)
{
@@ -1496,7 +1501,7 @@ static ZIPARCHIVE_METHOD(getCommentName)
}
/* }}} */
-/* {{{ proto string getCommentIndex(int index)
+/* {{{ proto string ZipArchive::getCommentIndex(int index)
Returns the comment of an entry using its index */
static ZIPARCHIVE_METHOD(getCommentIndex)
{
@@ -1524,7 +1529,7 @@ static ZIPARCHIVE_METHOD(getCommentIndex)
}
/* }}} */
-/* {{{ proto bool deleteIndex(int index)
+/* {{{ proto bool ZipArchive::deleteIndex(int index)
Delete a file using its index */
static ZIPARCHIVE_METHOD(deleteIndex)
{
@@ -1554,7 +1559,7 @@ static ZIPARCHIVE_METHOD(deleteIndex)
}
/* }}} */
-/* {{{ proto bool deleteName(string name)
+/* {{{ proto bool ZipArchive::deleteName(string name)
Delete a file using its index */
static ZIPARCHIVE_METHOD(deleteName)
{
@@ -1585,7 +1590,7 @@ static ZIPARCHIVE_METHOD(deleteName)
}
/* }}} */
-/* {{{ proto bool renameIndex(int index, string new_name)
+/* {{{ proto bool ZipArchive::renameIndex(int index, string new_name)
Rename an entry selected by its index to new_name */
static ZIPARCHIVE_METHOD(renameIndex)
{
@@ -1621,7 +1626,7 @@ static ZIPARCHIVE_METHOD(renameIndex)
}
/* }}} */
-/* {{{ proto bool renameName(string name, string new_name)
+/* {{{ proto bool ZipArchive::renameName(string name, string new_name)
Rename an entry selected by its name to new_name */
static ZIPARCHIVE_METHOD(renameName)
{
@@ -1655,7 +1660,7 @@ static ZIPARCHIVE_METHOD(renameName)
}
/* }}} */
-/* {{{ proto bool unchangeIndex(int index)
+/* {{{ proto bool ZipArchive::unchangeIndex(int index)
Changes to the file at position index are reverted */
static ZIPARCHIVE_METHOD(unchangeIndex)
{
@@ -1685,7 +1690,7 @@ static ZIPARCHIVE_METHOD(unchangeIndex)
}
/* }}} */
-/* {{{ proto bool unchangeName(string name)
+/* {{{ proto bool ZipArchive::unchangeName(string name)
Changes to the file named 'name' are reverted */
static ZIPARCHIVE_METHOD(unchangeName)
{
@@ -1719,7 +1724,7 @@ static ZIPARCHIVE_METHOD(unchangeName)
}
/* }}} */
-/* {{{ proto bool unchangeAll()
+/* {{{ proto bool ZipArchive::unchangeAll()
All changes to files and global information in archive are reverted */
static ZIPARCHIVE_METHOD(unchangeAll)
{
@@ -1740,7 +1745,7 @@ static ZIPARCHIVE_METHOD(unchangeAll)
}
/* }}} */
-/* {{{ proto bool unchangeAll()
+/* {{{ proto bool ZipArchive::unchangeAll()
Revert all global changes to the archive archive. For now, this only reverts archive comment changes. */
static ZIPARCHIVE_METHOD(unchangeArchive)
{
@@ -1761,7 +1766,7 @@ static ZIPARCHIVE_METHOD(unchangeArchive)
}
/* }}} */
-/* {{{ array bool extractTo(string pathto[, mixed files])
+/* {{{ proto bool ZipArchive::extractTo(string pathto[, mixed files])
Extract one or more file from a zip archive */
/* TODO:
* - allow index or array of indeces
@@ -1918,7 +1923,7 @@ static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
}
/* }}} */
-/* {{{ proto string getFromName(string entryname[, int len [, int flags]])
+/* {{{ proto string ZipArchive::getFromName(string entryname[, int len [, int flags]])
get the contents of an entry using its name */
static ZIPARCHIVE_METHOD(getFromName)
{
@@ -1926,7 +1931,7 @@ static ZIPARCHIVE_METHOD(getFromName)
}
/* }}} */
-/* {{{ proto string getFromIndex(string entryname[, int len [, int flags]])
+/* {{{ proto string ZipArchive::getFromIndex(string entryname[, int len [, int flags]])
get the contents of an entry using its index */
static ZIPARCHIVE_METHOD(getFromIndex)
{
@@ -1934,7 +1939,7 @@ static ZIPARCHIVE_METHOD(getFromIndex)
}
/* }}} */
-/* {{{ proto resource getStream(string entryname)
+/* {{{ proto resource ZipArchive::getStream(string entryname)
get a stream for an entry using its name */
static ZIPARCHIVE_METHOD(getStream)
{
@@ -2004,7 +2009,9 @@ static zend_function_entry zip_class_functions[] = {
/* }}} */
/* {{{ PHP_MINIT_FUNCTION */
+#undef zip
static PHP_MINIT_FUNCTION(zip)
+#define zip php_ziplib__zip
{
zend_class_entry ce;
@@ -2085,7 +2092,9 @@ static PHP_MINIT_FUNCTION(zip)
/* {{{ PHP_MSHUTDOWN_FUNCTION
*/
+#undef zip
static PHP_MSHUTDOWN_FUNCTION(zip)
+#define zip php_ziplib__zip
{
zend_hash_destroy(&zip_prop_handlers);
php_unregister_url_stream_wrapper("zip" TSRMLS_CC);
@@ -2096,14 +2105,15 @@ static PHP_MSHUTDOWN_FUNCTION(zip)
/* {{{ PHP_MINFO_FUNCTION
*/
+#undef zip
static PHP_MINFO_FUNCTION(zip)
{
php_info_print_table_start();
php_info_print_table_row(2, "Zip", "enabled");
- php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.38 2007/08/06 22:02:32 bjori Exp $");
- php_info_print_table_row(2, "Zip version", "2.0.0");
- php_info_print_table_row(2, "Libzip version", "0.7.1");
+ php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.43 2008/01/18 00:51:38 pajoye Exp $");
+ php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING);
+ php_info_print_table_row(2, "Libzip version", "0.8.0-compatible");
php_info_print_table_end();
}
diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h
index 498bdc919..6712b5291 100644
--- a/ext/zip/php_zip.h
+++ b/ext/zip/php_zip.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_zip.h,v 1.10.2.3 2007/03/14 11:08:57 pajoye Exp $ */
+/* $Id: php_zip.h,v 1.10.2.5 2008/01/18 00:51:38 pajoye Exp $ */
#ifndef PHP_ZIP_H
#define PHP_ZIP_H
@@ -30,6 +30,8 @@ extern zend_module_entry zip_module_entry;
#include "lib/zip.h"
+#define PHP_ZIP_VERSION_STRING "1.8.11"
+
/* {{{ OPENBASEDIR_CHECKPATH(filename) */
#if (PHP_MAJOR_VERSION < 6)
#define OPENBASEDIR_CHECKPATH(filename) \
diff --git a/ext/zip/tests/oo_properties.phpt b/ext/zip/tests/oo_properties.phpt
index dc4498a87..f7d126696 100644
--- a/ext/zip/tests/oo_properties.phpt
+++ b/ext/zip/tests/oo_properties.phpt
@@ -2,7 +2,7 @@
ziparchive::properties isset()/empty() checks
--SKIPIF--
<?php
-/* $Id: oo_properties.phpt,v 1.1.2.4 2007/08/13 12:46:40 tony2001 Exp $ */
+/* $Id: oo_properties.phpt,v 1.1.2.5 2007/11/19 11:12:36 tony2001 Exp $ */
if(!extension_loaded('zip')) die('skip');
?>
--FILE--
@@ -41,7 +41,7 @@ zip->numFiles (4):
empty(): 0
isset(): 1
-Notice: Undefined property: ZipArchive::$bogus in %s on line %d
+Notice: Undefined property: ZipArchive::$bogus in %s on line %d
zip->bogus (0):
empty(): 1
isset(): 0
diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h
index 047b73f3f..89e6ee213 100644
--- a/ext/zlib/php_zlib.h
+++ b/ext/zlib/php_zlib.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_zlib.h,v 1.42.2.1.2.2 2007/01/01 09:36:10 sebastian Exp $ */
+/* $Id: php_zlib.h,v 1.42.2.1.2.3 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef PHP_ZLIB_H
#define PHP_ZLIB_H
diff --git a/ext/zlib/tests/bug.tar b/ext/zlib/tests/bug.tar
new file mode 100644
index 000000000..77fd77832
--- /dev/null
+++ b/ext/zlib/tests/bug.tar
Binary files differ
diff --git a/ext/zlib/tests/bug_40189.phpt b/ext/zlib/tests/bug_40189.phpt
new file mode 100644
index 000000000..07e5191a9
--- /dev/null
+++ b/ext/zlib/tests/bug_40189.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #40189 (endless loop in zlib.inflate stream filter)
+--SKIPIF--
+<?php if (!extension_loaded("zlib")) print "skip"; ?>
+--FILE--
+<?php
+// this string is an excerpt of a phar archive that caused an infinite loop
+$a = "\x3\x0\x85\x46\x2f\x7c\xc2\xaa\x69\x2b\x6d\xe5\xdb\xfe\xe4\x21\x8f\x0\x97\x21\x1d\x2\x0\x0\x0\x47\x42\x4d\x42";
+var_dump(base64_encode($a));
+$gp = fopen(dirname(__FILE__) . '/test.other', 'wb');
+$fp = fopen('data://text/plain;base64,AwCFRi98wqppK23l2/7kIY8AlyEdAgAAAEdCTUI=', 'r');
+stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ);
+var_dump(stream_copy_to_stream($fp, $gp, 5));
+fclose($fp);
+fclose($gp);
+var_dump(file_get_contents(dirname(__FILE__) . '/test.other'));
+?>
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/test.other');
+?>
+--EXPECT--
+string(40) "AwCFRi98wqppK23l2/7kIY8AlyEdAgAAAEdCTUI="
+int(0)
+string(0) ""
diff --git a/ext/zlib/tests/bug_40189_2.phpt b/ext/zlib/tests/bug_40189_2.phpt
new file mode 100644
index 000000000..13a19dbd9
--- /dev/null
+++ b/ext/zlib/tests/bug_40189_2.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #40189 (test for truncated deflate, also part of erroneous fix for #40189)
+--SKIPIF--
+<?php if (!extension_loaded("zlib")) print "skip"; ?>
+--FILE--
+<?php
+$a = fopen(dirname(__FILE__). '/bug.tar', 'rb');
+stream_filter_append($a, 'zlib.deflate', STREAM_FILTER_READ, array('window' => 15+16));
+$b = fread($a, 4716032);
+var_dump(strlen($b));
+// when broken, this outputs "int(686904)"
+?>
+--EXPECT--
+int(1676116) \ No newline at end of file
diff --git a/ext/zlib/tests/zlib_filter_inflate2.phpt b/ext/zlib/tests/zlib_filter_inflate2.phpt
new file mode 100644
index 000000000..028e743ee
--- /dev/null
+++ b/ext/zlib/tests/zlib_filter_inflate2.phpt
@@ -0,0 +1,41 @@
+--TEST--
+zlib.inflate of gzip-encoded stream
+--SKIPIF--
+<?php if (!extension_loaded("zlib")) print "skip"; ?>
+--FILE--
+<?php /* $Id: zlib_filter_inflate2.phpt,v 1.1.2.3 2008/04/08 08:45:04 jani Exp $ */
+
+$a = gzopen(dirname(__FILE__) . '/test.txt.gz', 'w');
+fwrite($a, "This is quite the thing ain't it\n");
+fclose($a);
+
+$fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
+stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ);
+echo fread($fp, 2000);
+fclose($fp);
+echo "1\n";
+$fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
+// zlib format
+$fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
+stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array('window' => 15+16));
+echo "2\n";
+echo fread($fp, 2000);
+fclose($fp);
+// auto-detect
+$fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
+stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array('window' => 15+32));
+echo "3\n";
+echo fread($fp, 2000);
+fclose($fp);
+
+?>
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/test.txt.gz');
+?>
+--EXPECT--
+1
+2
+This is quite the thing ain't it
+3
+This is quite the thing ain't it \ No newline at end of file
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 2df9aaae3..6b6c45453 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.183.2.6.2.5 2007/01/01 09:36:10 sebastian Exp $ */
+/* $Id: zlib.c,v 1.183.2.6.2.6 2007/12/31 07:20:14 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c
index fd3e19c7a..e168c407f 100644
--- a/ext/zlib/zlib_filter.c
+++ b/ext/zlib/zlib_filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zlib_filter.c,v 1.6.2.2.2.4 2007/01/25 12:22:21 tony2001 Exp $ */
+/* $Id: zlib_filter.c,v 1.6.2.2.2.11 2008/02/12 23:29:18 cellog Exp $ */
#include "php.h"
#include "php_zlib.h"
@@ -100,11 +100,6 @@ static php_stream_filter_status_t php_zlib_inflate_filter(
consumed += desired;
bin += desired;
- if (!desired) {
- flags |= PSFS_FLAG_FLUSH_CLOSE;
- break;
- }
-
if (data->strm.avail_out < data->outbuf_len) {
php_stream_bucket *out_bucket;
size_t bucketlen = data->outbuf_len - data->strm.avail_out;
@@ -113,7 +108,12 @@ static php_stream_filter_status_t php_zlib_inflate_filter(
data->strm.avail_out = data->outbuf_len;
data->strm.next_out = data->outbuf;
exit_status = PSFS_PASS_ON;
+ } else if (status == Z_STREAM_END && data->strm.avail_out >= data->outbuf_len) {
+ /* no more data to decompress, and nothing was spat out */
+ php_stream_bucket_delref(bucket TSRMLS_CC);
+ return PSFS_PASS_ON;
}
+
}
php_stream_bucket_delref(bucket TSRMLS_CC);
}
@@ -213,11 +213,6 @@ static php_stream_filter_status_t php_zlib_deflate_filter(
consumed += desired;
bin += desired;
- if (!desired) {
- flags |= PSFS_FLAG_FLUSH_CLOSE;
- break;
- }
-
if (data->strm.avail_out < data->outbuf_len) {
php_stream_bucket *out_bucket;
size_t bucketlen = data->outbuf_len - data->strm.avail_out;
@@ -320,15 +315,17 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
if ((Z_TYPE_P(filterparams) == IS_ARRAY || Z_TYPE_P(filterparams) == IS_OBJECT) &&
zend_hash_find(HASH_OF(filterparams), "window", sizeof("window"), (void **) &tmpzval) == SUCCESS) {
+ zval tmp;
+
/* log-2 base of history window (9 - 15) */
- SEPARATE_ZVAL(tmpzval);
- convert_to_long_ex(tmpzval);
- if (Z_LVAL_PP(tmpzval) < -MAX_WBITS || Z_LVAL_PP(tmpzval) > MAX_WBITS) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%ld)", Z_LVAL_PP(tmpzval));
+ tmp = **tmpzval;
+ zval_copy_ctor(&tmp);
+ convert_to_long(&tmp);
+ if (Z_LVAL(tmp) < -MAX_WBITS || Z_LVAL(tmp) > MAX_WBITS + 32) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%ld)", Z_LVAL(tmp));
} else {
- windowBits = Z_LVAL_PP(tmpzval);
+ windowBits = Z_LVAL(tmp);
}
- zval_ptr_dtor(tmpzval);
}
}
@@ -352,27 +349,33 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
case IS_ARRAY:
case IS_OBJECT:
if (zend_hash_find(HASH_OF(filterparams), "memory", sizeof("memory"), (void**) &tmpzval) == SUCCESS) {
+ zval tmp;
+
+ tmp = **tmpzval;
+ zval_copy_ctor(&tmp);
+ convert_to_long(&tmp);
+
/* Memory Level (1 - 9) */
- SEPARATE_ZVAL(tmpzval);
- convert_to_long_ex(tmpzval);
- if (Z_LVAL_PP(tmpzval) < 1 || Z_LVAL_PP(tmpzval) > MAX_MEM_LEVEL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for memory level. (%ld)", Z_LVAL_PP(tmpzval));
+ if (Z_LVAL(tmp) < 1 || Z_LVAL(tmp) > MAX_MEM_LEVEL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for memory level. (%ld)", Z_LVAL(tmp));
} else {
- memLevel = Z_LVAL_PP(tmpzval);
+ memLevel = Z_LVAL(tmp);
}
- zval_ptr_dtor(tmpzval);
}
if (zend_hash_find(HASH_OF(filterparams), "window", sizeof("window"), (void**) &tmpzval) == SUCCESS) {
+ zval tmp;
+
+ tmp = **tmpzval;
+ zval_copy_ctor(&tmp);
+ convert_to_long(&tmp);
+
/* log-2 base of history window (9 - 15) */
- SEPARATE_ZVAL(tmpzval);
- convert_to_long_ex(tmpzval);
- if (Z_LVAL_PP(tmpzval) < -MAX_WBITS || Z_LVAL_PP(tmpzval) > MAX_WBITS) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%ld)", Z_LVAL_PP(tmpzval));
+ if (Z_LVAL(tmp) < -MAX_WBITS || Z_LVAL(tmp) > MAX_WBITS + 16) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%ld)", Z_LVAL(tmp));
} else {
- windowBits = Z_LVAL_PP(tmpzval);
+ windowBits = Z_LVAL(tmp);
}
- zval_ptr_dtor(tmpzval);
}
if (zend_hash_find(HASH_OF(filterparams), "level", sizeof("level"), (void**) &tmpzval) == SUCCESS) {
@@ -383,17 +386,20 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
case IS_STRING:
case IS_DOUBLE:
case IS_LONG:
- tmpzval = &filterparams;
+ {
+ zval tmp;
+
+ tmp = *filterparams;
+ zval_copy_ctor(&tmp);
+ convert_to_long(&tmp);
factory_setlevel:
- /* Set compression level within reason (-1 == default, 0 == none, 1-9 == least to most compression */
- SEPARATE_ZVAL(tmpzval);
- convert_to_long_ex(tmpzval);
- if (Z_LVAL_PP(tmpzval) < -1 || Z_LVAL_PP(tmpzval) > 9) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid compression level specified. (%ld)", Z_LVAL_PP(tmpzval));
- } else {
- level = Z_LVAL_PP(tmpzval);
+ /* Set compression level within reason (-1 == default, 0 == none, 1-9 == least to most compression */
+ if (Z_LVAL(tmp) < -1 || Z_LVAL(tmp) > 9) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid compression level specified. (%ld)", Z_LVAL(tmp));
+ } else {
+ level = Z_LVAL(tmp);
+ }
}
- zval_ptr_dtor(tmpzval);
break;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filter parameter, ignored.");
diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c
index e1153ece3..926a179df 100644
--- a/ext/zlib/zlib_fopen_wrapper.c
+++ b/ext/zlib/zlib_fopen_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zlib_fopen_wrapper.c,v 1.46.2.1.2.4 2007/05/08 12:08:17 dmitry Exp $ */
+/* $Id: zlib_fopen_wrapper.c,v 1.46.2.1.2.5 2007/12/31 07:20:14 sebastian Exp $ */
#define _GNU_SOURCE
diff --git a/main/SAPI.c b/main/SAPI.c
index 877be8ea9..4ce21e64f 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.c,v 1.202.2.7.2.15 2007/05/25 09:20:01 rasmus Exp $ */
+/* $Id: SAPI.c,v 1.202.2.7.2.18 2008/01/28 16:12:55 scottmac Exp $ */
#include <ctype.h>
#include <sys/stat.h>
@@ -301,6 +301,7 @@ SAPI_API void sapi_activate_headers_only(TSRMLS_D)
/* SG(sapi_headers).http_response_code = 200; */
SG(sapi_headers).http_status_line = NULL;
+ SG(sapi_headers).mimetype = NULL;
SG(read_post_bytes) = 0;
SG(request_info).post_data = NULL;
SG(request_info).raw_post_data = NULL;
@@ -340,6 +341,7 @@ SAPI_API void sapi_activate(TSRMLS_D)
SG(sapi_headers).http_response_code = 200;
*/
SG(sapi_headers).http_status_line = NULL;
+ SG(sapi_headers).mimetype = NULL;
SG(headers_sent) = 0;
SG(read_post_bytes) = 0;
SG(request_info).post_data = NULL;
@@ -591,6 +593,10 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
&& !strncasecmp(header_line, "HTTP/", 5)) {
/* filter out the response code */
sapi_update_response_code(sapi_extract_response_code(header_line) TSRMLS_CC);
+ /* sapi_update_response_code doesn't free the status line if the code didn't change */
+ if (SG(sapi_headers).http_status_line) {
+ efree(SG(sapi_headers).http_status_line);
+ }
SG(sapi_headers).http_status_line = header_line;
return SUCCESS;
} else {
diff --git a/main/SAPI.h b/main/SAPI.h
index 59a319b4e..a00027268 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.h,v 1.114.2.1.2.3 2007/08/31 07:43:37 jani Exp $ */
+/* $Id: SAPI.h,v 1.114.2.1.2.4 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef SAPI_H
#define SAPI_H
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 353891fa9..69e78dfc7 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fopen_wrappers.c,v 1.175.2.3.2.16 2007/10/09 10:06:34 scottmac Exp $ */
+/* $Id: fopen_wrappers.c,v 1.175.2.3.2.19 2008/01/29 14:23:19 dmitry Exp $ */
/* {{{ includes
*/
@@ -148,6 +148,9 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
path_len = path_file - path_tmp + 1;
#if defined(PHP_WIN32) || defined(NETWARE)
if (path_len > 1 && path_tmp[path_len - 2] == ':') {
+ if (path_len != 3) {
+ return -1;
+ }
/* this is c:\ */
path_tmp[path_len] = '\0';
} else {
@@ -620,6 +623,7 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC)
* relatively referenced file is accessible */
copy_len = strlen(filepath) > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : strlen(filepath);
real_path = estrndup(filepath, copy_len);
+ close(fdtest);
return real_path;
} else {
cwd[0] = '\0';
diff --git a/main/fopen_wrappers.h b/main/fopen_wrappers.h
index e71d69ae4..0a0dee6aa 100644
--- a/main/fopen_wrappers.h
+++ b/main/fopen_wrappers.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fopen_wrappers.h,v 1.44.2.1.2.2 2007/01/01 09:36:10 sebastian Exp $ */
+/* $Id: fopen_wrappers.h,v 1.44.2.1.2.4 2007/12/31 07:20:14 sebastian Exp $ */
#ifndef FOPEN_WRAPPERS_H
#define FOPEN_WRAPPERS_H
@@ -35,7 +35,6 @@ PHPAPI int php_check_safe_mode_include_dir(const char *path TSRMLS_DC);
PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, char **opened_path TSRMLS_DC);
-PHPAPI int php_is_url(char *path);
PHPAPI char *php_strip_url_passwd(char *path);
END_EXTERN_C()
diff --git a/main/internal_functions_nw.c b/main/internal_functions_nw.c
index 53508deba..9a84b6cde 100644
--- a/main/internal_functions_nw.c
+++ b/main/internal_functions_nw.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: internal_functions_nw.c,v 1.9.2.1.2.2 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: internal_functions_nw.c,v 1.9.2.1.2.3 2007/12/31 07:20:14 sebastian Exp $ */
/* {{{ includes
*/
diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c
index 6d24993c3..8cf65cad9 100644
--- a/main/internal_functions_win32.c
+++ b/main/internal_functions_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: internal_functions_win32.c,v 1.87.2.1.2.3 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: internal_functions_win32.c,v 1.87.2.1.2.4 2007/12/31 07:20:14 sebastian Exp $ */
/* {{{ includes
*/
diff --git a/main/logos.h b/main/logos.h
index f045d9c82..559b2e110 100644
--- a/main/logos.h
+++ b/main/logos.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: logos.h,v 1.14.2.3.2.2 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: logos.h,v 1.14.2.3.2.3 2007/12/31 07:20:14 sebastian Exp $ */
#define CONTEXT_TYPE_IMAGE_GIF "Content-Type: image/gif"
diff --git a/main/main.c b/main/main.c
index 9d976bbd0..0c3c523a4 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.640.2.23.2.59 2007/10/18 13:11:30 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.62 2008/03/05 20:58:08 pajoye Exp $ */
/* {{{ includes
*/
@@ -58,6 +58,7 @@
#include "php_main.h"
#include "fopen_wrappers.h"
#include "ext/standard/php_standard.h"
+#include "ext/standard/php_string.h"
#include "php_variables.h"
#include "ext/standard/credits.h"
#ifdef PHP_WIN32
@@ -351,9 +352,8 @@ static PHP_INI_MH(OnChangeMailForceExtra)
# define PHP_SAFE_MODE_EXEC_DIR ""
#endif
-#if defined(PHP_PROG_SENDMAIL) && !defined(NETWARE)
-# define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL " -t -i "
-#elif defined(PHP_WIN32)
+/* Windows and Netware use the internal mail */
+#if defined(PHP_WIN32) || defined(NETWARE)
# define DEFAULT_SENDMAIL_PATH NULL
#else
# define DEFAULT_SENDMAIL_PATH "/usr/sbin/sendmail -t -i"
@@ -647,15 +647,16 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
/* no docref given but function is known (the default) */
if (!docref && is_function) {
+ int doclen;
if (space[0] == '\0') {
- spprintf(&docref_buf, 0, "function.%s", function);
+ doclen = spprintf(&docref_buf, 0, "function.%s", function);
} else {
- spprintf(&docref_buf, 0, "function.%s-%s", class_name, function);
+ doclen = spprintf(&docref_buf, 0, "%s.%s", class_name, function);
}
while((p = strchr(docref_buf, '_')) != NULL) {
*p = '-';
}
- docref = docref_buf;
+ docref = php_strtolower(docref_buf, doclen);
}
/* we have a docref for a function AND
diff --git a/main/network.c b/main/network.c
index 7826bb52c..1a95275ad 100644
--- a/main/network.c
+++ b/main/network.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: network.c,v 1.118.2.2.2.6 2007/07/18 09:04:58 jani Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.9 2008/03/11 10:27:23 tony2001 Exp $ */
/*#define DEBUG_MAIN_NETWORK 1*/
@@ -200,10 +200,20 @@ static int php_network_getaddresses(const char *host, int socktype, struct socka
# endif
if ((n = getaddrinfo(host, NULL, &hints, &res))) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+ if (error_string) {
+ spprintf(error_string, 0, "php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", *error_string);
+ } else {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+ }
return 0;
} else if (res == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: getaddrinfo failed (null result pointer)");
+ if (error_string) {
+ spprintf(error_string, 0, "php_network_getaddresses: getaddrinfo failed (null result pointer) errno=%d", errno);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", *error_string);
+ } else {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: getaddrinfo failed (null result pointer)");
+ }
return 0;
}
@@ -227,7 +237,12 @@ static int php_network_getaddresses(const char *host, int socktype, struct socka
/* XXX NOT THREAD SAFE (is safe under win32) */
host_info = gethostbyname(host);
if (host_info == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: gethostbyname failed");
+ if (error_string) {
+ spprintf(error_string, 0, "php_network_getaddresses: gethostbyname failed. errno=%d", errno);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", *error_string);
+ } else {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: gethostbyname failed");
+ }
return 0;
}
in = *((struct in_addr *) host_info->h_addr);
diff --git a/main/output.c b/main/output.c
index 942ace84b..15c6ebe32 100644
--- a/main/output.c
+++ b/main/output.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.167.2.3.2.4 2007/09/21 13:08:00 tony2001 Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.5 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "ext/standard/head.h"
diff --git a/main/php.h b/main/php.h
index d8cdf20e3..1645c38dc 100644
--- a/main/php.h
+++ b/main/php.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.221.2.4.2.8 2007/08/31 07:48:05 jani Exp $ */
+/* $Id: php.h,v 1.221.2.4.2.9 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_H
#define PHP_H
diff --git a/main/php3_compat.h b/main/php3_compat.h
index e0711b4a5..b24656d28 100644
--- a/main/php3_compat.h
+++ b/main/php3_compat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php3_compat.h,v 1.20.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php3_compat.h,v 1.20.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP3_COMPAT_H
#define PHP3_COMPAT_H
diff --git a/main/php_compat.h b/main/php_compat.h
index e6744290e..53d068b6d 100644
--- a/main/php_compat.h
+++ b/main/php_compat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_compat.h,v 1.25.2.3.2.4 2007/02/25 18:47:21 nlopess Exp $ */
+/* $Id: php_compat.h,v 1.25.2.3.2.5 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_COMPAT_H
#define PHP_COMPAT_H
diff --git a/main/php_config.h.in b/main/php_config.h.in
index 550b6bf06..5bf46a8f6 100644
--- a/main/php_config.h.in
+++ b/main/php_config.h.in
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: acconfig.h,v 1.40.2.1.2.1 2007/01/01 09:35:45 sebastian Exp $ */
+/* $Id: acconfig.h,v 1.40.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
#define ZEND_API
#define ZEND_DLEXPORT
diff --git a/main/php_content_types.c b/main/php_content_types.c
index f0bc5b6dc..eed43b37b 100644
--- a/main/php_content_types.c
+++ b/main/php_content_types.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_content_types.c,v 1.32.2.1.2.4 2007/05/07 23:27:59 iliaa Exp $ */
+/* $Id: php_content_types.c,v 1.32.2.1.2.5 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "SAPI.h"
diff --git a/main/php_content_types.h b/main/php_content_types.h
index caaed36e6..594348fb9 100644
--- a/main/php_content_types.h
+++ b/main/php_content_types.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_content_types.h,v 1.12.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_content_types.h,v 1.12.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_CONTENT_TYPES_H
#define PHP_CONTENT_TYPES_H
diff --git a/main/php_globals.h b/main/php_globals.h
index ecf14d472..84fc35b7b 100644
--- a/main/php_globals.h
+++ b/main/php_globals.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_globals.h,v 1.98.2.1.2.7 2007/07/24 14:21:36 jani Exp $ */
+/* $Id: php_globals.h,v 1.98.2.1.2.8 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_GLOBALS_H
#define PHP_GLOBALS_H
diff --git a/main/php_ini.c b/main/php_ini.c
index ed6984172..e70e03b65 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ini.c,v 1.136.2.4.2.15 2007/08/31 08:16:13 jani Exp $ */
+/* $Id: php_ini.c,v 1.136.2.4.2.16 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "ext/standard/info.h"
diff --git a/main/php_ini.h b/main/php_ini.h
index af51c84f8..04c4a6518 100644
--- a/main/php_ini.h
+++ b/main/php_ini.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ini.h,v 1.45.2.3.2.3 2007/08/31 07:48:05 jani Exp $ */
+/* $Id: php_ini.h,v 1.45.2.3.2.4 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_INI_H
#define PHP_INI_H
diff --git a/main/php_logos.c b/main/php_logos.c
index 3ac704af8..8e6c7b87d 100644
--- a/main/php_logos.c
+++ b/main/php_logos.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_logos.c,v 1.19.2.1.2.5 2007/01/06 20:44:51 nlopess Exp $ */
+/* $Id: php_logos.c,v 1.19.2.1.2.6 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "logos.h"
diff --git a/main/php_logos.h b/main/php_logos.h
index 02ef8f9a4..83df6886e 100644
--- a/main/php_logos.h
+++ b/main/php_logos.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_logos.h,v 1.9.2.1.2.3 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_logos.h,v 1.9.2.1.2.4 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef _PHP_LOGOS_H
diff --git a/main/php_main.h b/main/php_main.h
index 9e202a430..2443fd779 100644
--- a/main/php_main.h
+++ b/main/php_main.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_main.h,v 1.34.2.1.2.2 2007/01/08 03:39:09 iliaa Exp $ */
+/* $Id: php_main.h,v 1.34.2.1.2.3 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_MAIN_H
#define PHP_MAIN_H
diff --git a/main/php_memory_streams.h b/main/php_memory_streams.h
index 816eb5993..e40d3a176 100644
--- a/main/php_memory_streams.h
+++ b/main/php_memory_streams.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_memory_streams.h,v 1.13.2.1.2.3 2007/02/03 16:40:05 helly Exp $ */
+/* $Id: php_memory_streams.h,v 1.13.2.1.2.4 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_MEMORY_STREAM_H
#define PHP_MEMORY_STREAM_H
diff --git a/main/php_network.h b/main/php_network.h
index 6d0db6245..0d49d7dbb 100644
--- a/main/php_network.h
+++ b/main/php_network.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_network.h,v 1.56.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_network.h,v 1.56.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef _PHP_NETWORK_H
#define _PHP_NETWORK_H
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index e27b3715b..cde0c32f1 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_open_temporary_file.c,v 1.34.2.1.2.10 2007/08/10 10:13:15 tony2001 Exp $ */
+/* $Id: php_open_temporary_file.c,v 1.34.2.1.2.11 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
diff --git a/main/php_open_temporary_file.h b/main/php_open_temporary_file.h
index dd540d5e6..72625d0de 100644
--- a/main/php_open_temporary_file.h
+++ b/main/php_open_temporary_file.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_open_temporary_file.h,v 1.13.2.1.2.4 2007/07/21 01:43:33 jani Exp $ */
+/* $Id: php_open_temporary_file.h,v 1.13.2.1.2.5 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_OPEN_TEMPORARY_FILE_H
#define PHP_OPEN_TEMPORARY_FILE_H
diff --git a/main/php_output.h b/main/php_output.h
index e4dc23a1b..9468905f5 100644
--- a/main/php_output.h
+++ b/main/php_output.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_output.h,v 1.53.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_output.h,v 1.53.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_OUTPUT_H
#define PHP_OUTPUT_H
diff --git a/main/php_reentrancy.h b/main/php_reentrancy.h
index 45968d1c3..a5d824475 100644
--- a/main/php_reentrancy.h
+++ b/main/php_reentrancy.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_reentrancy.h,v 1.23.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_reentrancy.h,v 1.23.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_REENTRANCY_H
#define PHP_REENTRANCY_H
diff --git a/main/php_regex.h b/main/php_regex.h
index 6d68396fe..aa3278a09 100644
--- a/main/php_regex.h
+++ b/main/php_regex.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_regex.h,v 1.16.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_regex.h,v 1.16.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_REGEX_H
#define PHP_REGEX_H
diff --git a/main/php_scandir.c b/main/php_scandir.c
index c51749a06..233dfbee2 100644
--- a/main/php_scandir.c
+++ b/main/php_scandir.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_scandir.c,v 1.12.2.1.2.5 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_scandir.c,v 1.12.2.1.2.6 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "php_scandir.h"
diff --git a/main/php_scandir.h b/main/php_scandir.h
index 7d93278f5..c7f5f2dee 100644
--- a/main/php_scandir.h
+++ b/main/php_scandir.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_scandir.h,v 1.12.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_scandir.h,v 1.12.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_SCANDIR_H
#define PHP_SCANDIR_H
diff --git a/main/php_sprintf.c b/main/php_sprintf.c
index d8cdc7722..8b083b976 100644
--- a/main/php_sprintf.c
+++ b/main/php_sprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sprintf.c,v 1.23.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_sprintf.c,v 1.23.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#include <stdio.h>
#include <stdarg.h>
diff --git a/main/php_streams.h b/main/php_streams.h
index 9cbd6497d..009c786f7 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_streams.h,v 1.103.2.1.2.4 2007/07/21 01:43:33 jani Exp $ */
+/* $Id: php_streams.h,v 1.103.2.1.2.5 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_STREAMS_H
#define PHP_STREAMS_H
diff --git a/main/php_syslog.h b/main/php_syslog.h
index 447d32344..832c610be 100644
--- a/main/php_syslog.h
+++ b/main/php_syslog.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_syslog.h,v 1.12.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_syslog.h,v 1.12.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_SYSLOG_H
#define PHP_SYSLOG_H
diff --git a/main/php_ticks.c b/main/php_ticks.c
index cb637dded..3d8ed8655 100644
--- a/main/php_ticks.c
+++ b/main/php_ticks.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ticks.c,v 1.20.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_ticks.c,v 1.20.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "php_ticks.h"
diff --git a/main/php_ticks.h b/main/php_ticks.h
index 7716b7dc6..caad0495d 100644
--- a/main/php_ticks.h
+++ b/main/php_ticks.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ticks.h,v 1.14.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_ticks.h,v 1.14.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_TICKS_H
#define PHP_TICKS_H
diff --git a/main/php_variables.c b/main/php_variables.c
index 65791d5c8..1064951d9 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.c,v 1.104.2.10.2.11 2007/07/18 11:46:50 tony2001 Exp $ */
+/* $Id: php_variables.c,v 1.104.2.10.2.12 2007/12/31 07:20:15 sebastian Exp $ */
#include <stdio.h>
#include "php.h"
diff --git a/main/php_variables.h b/main/php_variables.h
index 4472c6766..e3525fa6a 100644
--- a/main/php_variables.h
+++ b/main/php_variables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.h,v 1.22.2.3.2.2 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_variables.h,v 1.22.2.3.2.3 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_VARIABLES_H
#define PHP_VARIABLES_H
diff --git a/main/php_version.h b/main/php_version.h
index c4cd55084..aa8b8c237 100644
--- a/main/php_version.h
+++ b/main/php_version.h
@@ -2,7 +2,7 @@
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 2
-#define PHP_RELEASE_VERSION 5
+#define PHP_RELEASE_VERSION 6
#define PHP_EXTRA_VERSION ""
-#define PHP_VERSION "5.2.5"
-#define PHP_VERSION_ID 50205
+#define PHP_VERSION "5.2.6"
+#define PHP_VERSION_ID 50206
diff --git a/main/reentrancy.c b/main/reentrancy.c
index b5ce11599..b4dee499f 100644
--- a/main/reentrancy.c
+++ b/main/reentrancy.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: reentrancy.c,v 1.43.2.1.2.2 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: reentrancy.c,v 1.43.2.1.2.3 2007/12/31 07:20:15 sebastian Exp $ */
#include <sys/types.h>
#include <string.h>
diff --git a/main/rfc1867.c b/main/rfc1867.c
index 7d7b9882a..0fa20246e 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.173.2.1.2.9 2007/07/17 23:46:40 iliaa Exp $ */
+/* $Id: rfc1867.c,v 1.173.2.1.2.11 2008/03/26 12:59:42 tony2001 Exp $ */
/*
* This product includes software developed by the Apache Group
@@ -1090,8 +1090,14 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
} else if (blen > 0) {
wlen = write(fd, buff, blen);
-
- if (wlen < blen) {
+
+ if (wlen == -1) {
+ /* write failed */
+#if DEBUG_FILE_UPLOAD
+ sapi_module.sapi_error(E_NOTICE, "write() failed - %s", strerror(errno));
+#endif
+ cancel_upload = UPLOAD_ERROR_F;
+ } else if (wlen < blen) {
#if DEBUG_FILE_UPLOAD
sapi_module.sapi_error(E_NOTICE, "Only %d bytes were written, expected to write %d", wlen, blen);
#endif
diff --git a/main/rfc1867.h b/main/rfc1867.h
index 47aa32b1b..55a0f8319 100644
--- a/main/rfc1867.h
+++ b/main/rfc1867.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.h,v 1.13.2.1.2.3 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: rfc1867.h,v 1.13.2.1.2.4 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef RFC1867_H
#define RFC1867_H
diff --git a/main/safe_mode.c b/main/safe_mode.c
index 798133e8d..74188a895 100644
--- a/main/safe_mode.c
+++ b/main/safe_mode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: safe_mode.c,v 1.62.2.1.2.13 2007/10/11 09:33:53 jani Exp $ */
+/* $Id: safe_mode.c,v 1.62.2.1.2.15 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
@@ -122,10 +122,17 @@ PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mod
/* Trim off filename */
if ((s = strrchr(path, DEFAULT_SLASH))) {
- if (s == path)
- path[1] = '\0';
- else
+ if (*(s + 1) == '\0' && s != path) { /* make sure that the / is not the last character */
*s = '\0';
+ s = strrchr(path, DEFAULT_SLASH);
+ }
+ if (s) {
+ if (s == path) {
+ path[1] = '\0';
+ } else {
+ *s = '\0';
+ }
+ }
}
} else { /* CHECKUID_ALLOW_ONLY_DIR */
s = strrchr(filename, DEFAULT_SLASH);
diff --git a/main/safe_mode.h b/main/safe_mode.h
index 002c3ebb8..497fc2ecf 100644
--- a/main/safe_mode.h
+++ b/main/safe_mode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: safe_mode.h,v 1.13.2.1.2.2 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: safe_mode.h,v 1.13.2.1.2.3 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef SAFE_MODE_H
#define SAFE_MODE_H
diff --git a/main/snprintf.c b/main/snprintf.c
index f310219b9..67ecd3a28 100644
--- a/main/snprintf.c
+++ b/main/snprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snprintf.c,v 1.37.2.4.2.15 2007/10/01 15:23:15 iliaa Exp $ */
+/* $Id: snprintf.c,v 1.37.2.4.2.16 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
diff --git a/main/snprintf.h b/main/snprintf.h
index b872e854a..30833d195 100644
--- a/main/snprintf.h
+++ b/main/snprintf.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snprintf.h,v 1.32.2.3.2.5 2007/04/06 19:25:52 andrei Exp $ */
+/* $Id: snprintf.h,v 1.32.2.3.2.6 2007/12/31 07:20:15 sebastian Exp $ */
/*
diff --git a/main/spprintf.c b/main/spprintf.c
index 9ceb8fa0d..bba3dab3a 100644
--- a/main/spprintf.c
+++ b/main/spprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spprintf.c,v 1.25.2.2.2.11 2007/10/01 15:23:15 iliaa Exp $ */
+/* $Id: spprintf.c,v 1.25.2.2.2.12 2007/12/31 07:20:15 sebastian Exp $ */
/* This is the spprintf implementation.
* It has emerged from apache snprintf. See original header:
diff --git a/main/spprintf.h b/main/spprintf.h
index 389a33a9a..af8dcbce9 100644
--- a/main/spprintf.h
+++ b/main/spprintf.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spprintf.h,v 1.11.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: spprintf.h,v 1.11.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
/*
diff --git a/main/streams/cast.c b/main/streams/cast.c
index 8e80fade0..e2c65d8a0 100644
--- a/main/streams/cast.c
+++ b/main/streams/cast.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cast.c,v 1.12.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: cast.c,v 1.12.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#define _GNU_SOURCE
#include "php.h"
diff --git a/main/streams/filter.c b/main/streams/filter.c
index 906d7a069..334fd81d8 100644
--- a/main/streams/filter.c
+++ b/main/streams/filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.17.2.3.2.10 2007/07/21 01:43:33 jani Exp $ */
+/* $Id: filter.c,v 1.17.2.3.2.11 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "php_globals.h"
diff --git a/main/streams/memory.c b/main/streams/memory.c
index 49469757d..bbd900734 100644
--- a/main/streams/memory.c
+++ b/main/streams/memory.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: memory.c,v 1.8.2.6.2.17 2007/02/22 23:26:03 helly Exp $ */
+/* $Id: memory.c,v 1.8.2.6.2.19 2008/03/15 10:28:53 felipe Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -234,6 +234,9 @@ static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb TS
#ifndef PHP_WIN32
ssb->sb.st_blksize = -1;
+#endif
+
+#if !defined(PHP_WIN32) && !defined(__BEOS__)
ssb->sb.st_blocks = -1;
#endif
diff --git a/main/streams/mmap.c b/main/streams/mmap.c
index 5fee2bbad..7f7a88ec4 100644
--- a/main/streams/mmap.c
+++ b/main/streams/mmap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mmap.c,v 1.8.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: mmap.c,v 1.8.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
/* Memory Mapping interface for streams */
#include "php.h"
diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h
index e52e2bc56..f1619a6ae 100644
--- a/main/streams/php_stream_context.h
+++ b/main/streams/php_stream_context.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_stream_context.h,v 1.11.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_stream_context.h,v 1.11.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
/* Stream context and status notification related definitions */
diff --git a/main/streams/php_stream_filter_api.h b/main/streams/php_stream_filter_api.h
index 97b232053..0870e64c2 100644
--- a/main/streams/php_stream_filter_api.h
+++ b/main/streams/php_stream_filter_api.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_stream_filter_api.h,v 1.13.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_stream_filter_api.h,v 1.13.2.1.2.3 2007/12/31 07:20:15 sebastian Exp $ */
/* The filter API works on the principle of "Bucket-Brigades". This is
* partially inspired by the Apache 2 method of doing things, although
@@ -62,7 +62,7 @@ struct _php_stream_bucket_brigade {
typedef enum {
PSFS_ERR_FATAL, /* error in data stream */
PSFS_FEED_ME, /* filter needs more data; stop processing chain until more is available */
- PSFS_PASS_ON, /* filter generated output buckets; pass them on to next in chain */
+ PSFS_PASS_ON /* filter generated output buckets; pass them on to next in chain */
} php_stream_filter_status_t;
/* Buckets API. */
diff --git a/main/streams/php_stream_mmap.h b/main/streams/php_stream_mmap.h
index 5cd5c4155..50f3bd815 100644
--- a/main/streams/php_stream_mmap.h
+++ b/main/streams/php_stream_mmap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_stream_mmap.h,v 1.5.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_stream_mmap.h,v 1.5.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
/* Memory Mapping interface for streams.
* The intention is to provide a uniform interface over the most common
diff --git a/main/streams/php_stream_plain_wrapper.h b/main/streams/php_stream_plain_wrapper.h
index 6ce262184..eb7da457f 100644
--- a/main/streams/php_stream_plain_wrapper.h
+++ b/main/streams/php_stream_plain_wrapper.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_stream_plain_wrapper.h,v 1.7.2.2.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_stream_plain_wrapper.h,v 1.7.2.2.2.2 2007/12/31 07:20:15 sebastian Exp $ */
/* definitions for the plain files wrapper */
diff --git a/main/streams/php_stream_transport.h b/main/streams/php_stream_transport.h
index e797c1092..12300ad72 100644
--- a/main/streams/php_stream_transport.h
+++ b/main/streams/php_stream_transport.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_stream_transport.h,v 1.10.2.1.2.4 2007/02/05 05:15:16 andi Exp $ */
+/* $Id: php_stream_transport.h,v 1.10.2.1.2.5 2007/12/31 07:20:15 sebastian Exp $ */
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
diff --git a/main/streams/php_stream_userspace.h b/main/streams/php_stream_userspace.h
index 095f06c1b..9277529f5 100644
--- a/main/streams/php_stream_userspace.h
+++ b/main/streams/php_stream_userspace.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_stream_userspace.h,v 1.5.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_stream_userspace.h,v 1.5.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
/* for user-space streams */
diff --git a/main/streams/php_streams_int.h b/main/streams/php_streams_int.h
index f7e0c7b15..b24555bb8 100644
--- a/main/streams/php_streams_int.h
+++ b/main/streams/php_streams_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_streams_int.h,v 1.7.2.2.2.2 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_streams_int.h,v 1.7.2.2.2.3 2007/12/31 07:20:15 sebastian Exp $ */
#if ZEND_DEBUG
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 1ef34ea27..af665b716 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: plain_wrapper.c,v 1.52.2.6.2.25 2007/11/01 17:32:26 jani Exp $ */
+/* $Id: plain_wrapper.c,v 1.52.2.6.2.27 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -63,6 +63,9 @@ PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags)
case 'x':
flags = O_CREAT|O_EXCL;
break;
+ case 'c':
+ flags = O_CREAT;
+ break;
default:
/* unknown mode */
return FAILURE;
diff --git a/main/streams/streams.c b/main/streams/streams.c
index a42d1fd79..2352bfbcc 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.82.2.6.2.18 2007/08/08 07:01:49 jani Exp $ */
+/* $Id: streams.c,v 1.82.2.6.2.22 2008/03/24 16:28:56 tony2001 Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -855,10 +855,17 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re
if (delim_len == 0 || !delim) {
toread = maxlen;
} else {
+ size_t seek_len;
+
+ seek_len = stream->writepos - stream->readpos;
+ if (seek_len > maxlen) {
+ seek_len = maxlen;
+ }
+
if (delim_len == 1) {
- e = memchr(stream->readbuf + stream->readpos, *delim, stream->writepos - stream->readpos);
+ e = memchr(stream->readbuf + stream->readpos, *delim, seek_len);
} else {
- e = php_memnstr(stream->readbuf + stream->readpos, delim, delim_len, (stream->readbuf + stream->writepos));
+ e = php_memnstr(stream->readbuf + stream->readpos, delim, delim_len, (stream->readbuf + stream->readpos + seek_len));
}
if (!e) {
@@ -1210,26 +1217,6 @@ PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen
maxlen = 0;
}
- if (php_stream_mmap_possible(src)) {
- char *p;
- size_t mapped;
-
- p = php_stream_mmap_range(src, php_stream_tell(src), maxlen, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped);
-
- if (p && mapped) {
- *buf = pemalloc_rel_orig(mapped + 1, persistent);
-
- if (*buf) {
- memcpy(*buf, p, mapped);
- (*buf)[mapped] = '\0';
- }
-
- php_stream_mmap_unmap(src);
-
- return mapped;
- }
- }
-
if (maxlen > 0) {
ptr = *buf = pemalloc_rel_orig(maxlen + 1, persistent);
while ((len < maxlen) & !php_stream_eof(src)) {
diff --git a/main/streams/transports.c b/main/streams/transports.c
index 36cf85a9c..9c6aa00d9 100644
--- a/main/streams/transports.c
+++ b/main/streams/transports.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: transports.c,v 1.16.2.1.2.4 2007/02/24 15:48:40 iliaa Exp $ */
+/* $Id: transports.c,v 1.16.2.1.2.5 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "php_streams_int.h"
diff --git a/main/streams/userspace.c b/main/streams/userspace.c
index a2edee414..ae18d05b0 100644
--- a/main/streams/userspace.c
+++ b/main/streams/userspace.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: userspace.c,v 1.31.2.3.2.7 2007/08/16 23:54:24 stas Exp $ */
+/* $Id: userspace.c,v 1.31.2.3.2.8 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
#include "php_globals.h"
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index 43442499b..0f6842aa8 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xp_socket.c,v 1.33.2.2.2.6 2007/07/24 14:24:44 dmitry Exp $ */
+/* $Id: xp_socket.c,v 1.33.2.2.2.9 2008/03/10 20:09:22 andrey Exp $ */
#include "php.h"
#include "ext/standard/file.h"
@@ -35,6 +35,10 @@
# define MSG_DONTWAIT 0
#endif
+#ifndef MSG_PEEK
+# define MSG_PEEK 0
+#endif
+
php_stream_ops php_stream_generic_socket_ops;
PHPAPI php_stream_ops php_stream_socket_ops;
php_stream_ops php_stream_udp_socket_ops;
@@ -597,7 +601,7 @@ static inline int php_tcp_sockop_connect(php_stream *stream, php_netstream_data_
{
char *host = NULL, *bindto = NULL;
int portno, bindport = 0;
- int err;
+ int err = 0;
int ret;
zval **tmpzval = NULL;
diff --git a/main/strlcat.c b/main/strlcat.c
index c11298af1..9a72e3637 100644
--- a/main/strlcat.c
+++ b/main/strlcat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: strlcat.c,v 1.13.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: strlcat.c,v 1.13.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
diff --git a/main/strlcpy.c b/main/strlcpy.c
index f6b80a0b3..8ca4c20a6 100644
--- a/main/strlcpy.c
+++ b/main/strlcpy.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: strlcpy.c,v 1.13.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: strlcpy.c,v 1.13.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#include "php.h"
diff --git a/main/win95nt.h b/main/win95nt.h
index efcb02ac4..c9706adc4 100644
--- a/main/win95nt.h
+++ b/main/win95nt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: win95nt.h,v 1.20.2.2.2.2 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: win95nt.h,v 1.20.2.2.2.3 2007/12/31 07:20:15 sebastian Exp $ */
/* Defines and types for Windows 95/NT */
#define HAVE_DECLARED_TIMEZONE
diff --git a/netware/start.c b/netware/start.c
index 61829e17f..020375148 100644
--- a/netware/start.c
+++ b/netware/start.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/pear/install-pear-nozlib.phar b/pear/install-pear-nozlib.phar
index e48b55cbd..067fc4ad5 100644
--- a/pear/install-pear-nozlib.phar
+++ b/pear/install-pear-nozlib.phar
@@ -23,7 +23,7 @@ if (!class_exists('PHP_Archive')) {/**
* @author Davey Shafik <davey@synapticmedia.net>
* @author Greg Beaver <cellog@php.net>
* @link http://www.synapticmedia.net Synaptic Media
- * @version Id: Archive.php,v 1.50 2007/08/18 04:59:00 cellog Exp $
+ * @version Id: Archive.php,v 1.51 2007/08/18 15:30:07 cellog Exp $
* @package PHP_Archive
* @category PHP
*/
@@ -187,7 +187,7 @@ class PHP_Archive
// security, idea borrowed from PHK
if (!file_exists($archive . '.introspect')) {
header("HTTP/1.0 404 Not Found");
- exit;
+ return false;
}
if (self::_fileExists($archive, $_GET['viewsource'])) {
$source = highlight_file('phar://install-pear-nozlib.phar/' .
@@ -204,10 +204,10 @@ class PHP_Archive
'">Return to ', htmlspecialchars($_GET['introspect']), '</a><br />';
}
echo $source;
- exit;
+ return false;
} else {
header("HTTP/1.0 404 Not Found");
- exit;
+ return false;
}
}
@@ -217,7 +217,7 @@ class PHP_Archive
// security, idea borrowed from PHK
if (!file_exists($archive . '.introspect')) {
header("HTTP/1.0 404 Not Found");
- exit;
+ return false;
}
if (!$dir) {
$dir = '/';
@@ -253,14 +253,14 @@ class PHP_Archive
htmlspecialchars($entry->getFilename()), '</a></li>';
}
}
- exit;
+ return false;
} catch (Exception $e) {
echo '<html><head><title>Directory not found: ',
htmlspecialchars($dir), '</title></head>',
'<body><h1>Directory not found: ', htmlspecialchars($dir), '</h1>',
'<p>Try <a href="', htmlspecialchars($_SERVER['PHP_SELF']), '?introspect=/">',
'This link</a></p></body></html>';
- exit;
+ return false;
}
}
@@ -272,21 +272,21 @@ class PHP_Archive
$subpath = str_replace('/' . basename($archive), '', $uri['path']);
if (!$subpath || $subpath == '/') {
if (isset($_GET['viewsource'])) {
- self::viewSource($archive, $_GET['viewsource']);
+ return self::viewSource($archive, $_GET['viewsource']);
}
if (isset($_GET['introspect'])) {
- self::introspect($archive, $_GET['introspect']);
+ return self::introspect($archive, $_GET['introspect']);
}
$subpath = '/' . $initfile;
}
if (!self::_fileExists($archive, substr($subpath, 1))) {
header("HTTP/1.0 404 Not Found");
- exit;
+ return false;
}
foreach (self::$deny as $pattern) {
if (preg_match($pattern, $subpath)) {
header("HTTP/1.0 404 Not Found");
- exit;
+ return false;
}
}
$inf = pathinfo(basename($subpath));
@@ -295,31 +295,30 @@ class PHP_Archive
header('Content-Length: ' .
self::_filesize($archive, substr($subpath, 1)));
readfile('phar://install-pear-nozlib.phar' . $subpath);
- exit;
+ return false;
}
if (isset(self::$defaultphp[$inf['extension']])) {
include 'phar://install-pear-nozlib.phar' . $subpath;
- exit;
+ return false;
}
if (isset(self::$defaultmimes[$inf['extension']])) {
header('Content-Type: ' . self::$defaultmimes[$inf['extension']]);
header('Content-Length: ' .
self::_filesize($archive, substr($subpath, 1)));
readfile('phar://install-pear-nozlib.phar' . $subpath);
- exit;
+ return false;
}
if (isset(self::$defaultphps[$inf['extension']])) {
header('Content-Type: text/html');
$c = highlight_file('phar://install-pear-nozlib.phar' . $subpath, true);
header('Content-Length: ' . strlen($c));
echo $c;
- exit;
+ return false;
}
header('Content-Type: text/plain');
header('Content-Length: ' .
self::_filesize($archive, substr($subpath, 1)));
readfile('phar://install-pear-nozlib.phar' . $subpath);
- exit;
}
}
@@ -383,7 +382,7 @@ class PHP_Archive
* Any attempt to call from outside the .phar or to re-alias the .phar will fail
* as a security measure.
* @param string $alias
- * @param int $dataoffset the value of 42316
+ * @param int $dataoffset the value of 42422
*/
public static final function mapPhar($alias = NULL, $dataoffset = NULL)
{
@@ -1049,7 +1048,7 @@ class PHP_Archive
* API version of this class
* @return string
*/
- public final function APIVersion()
+ public static final function APIVersion()
{
return '1.0.0';
}
@@ -1114,7 +1113,7 @@ class PHP_Archive
}
}}
if (!class_exists('Phar')) {
- PHP_Archive::mapPhar(null, 42316 );
+ PHP_Archive::mapPhar(null, 42422 );
} else {
try {
Phar::mapPhar();
@@ -1230,22 +1229,18 @@ if (extension_loaded('phar')) {if (isset($_SERVER) && isset($_SERVER['REQUEST_UR
header('Content-Length: ' . filesize('phar://' . $archive . '/' . $subpath));
readfile('phar://' . $archive . '/' . $subpath);
exit;
-}} else {if (!empty($_SERVER['REQUEST_URI'])) PHP_Archive::webFrontController('PEAR.php');}
+}} else {if (!empty($_SERVER['REQUEST_URI'])) {PHP_Archive::webFrontController('PEAR.php');exit;}}
require_once 'phar://install-pear-nozlib.phar/index.php';
-__HALT_COMPILER();¯
-
-
-8±m
-m
-Žm
-
-
-
-
-
+__HALT_COMPILER();¯
+Žm
+
+
+
+
+
/* vim: set ts=4 sw=4: */
// +----------------------------------------------------------------------+
// | PHP Version 4 |
@@ -6267,7 +6262,7 @@ class Console_Getopt {
?>
-/* $Id: install-pear.php,v 1.29 2007/05/31 03:51:08 cellog Exp $ */
+/* $Id: install-pear.php,v 1.30 2007/11/27 00:41:52 cellog Exp $ */
error_reporting(E_ALL);
$pear_dir = dirname(__FILE__);
@@ -6299,7 +6294,7 @@ $force = false;
$install_files = array('Console_Getopt' => 'phar://install-pear-nozlib.phar/Console_Getopt-1.2.3.tar',
'Archive_Tar' => 'phar://install-pear-nozlib.phar/Archive_Tar-1.3.2.tar',
'Structures_Graph' => 'phar://install-pear-nozlib.phar/Structures_Graph-1.0.2.tar',
-'PEAR' => 'phar://install-pear-nozlib.phar/PEAR-1.6.1.tar',
+'PEAR' => 'phar://install-pear-nozlib.phar/PEAR-1.7.1.tar',
);
array_shift($argv);
$debug = false;
@@ -6329,6 +6324,11 @@ for ($i = 0; $i < sizeof($argv); $i++) {
$config = PEAR_Config::singleton();
+if (PEAR::isError($config)) {
+ $locs = PEAR_Config::getDefaultConfigFiles();
+ die("ERROR: One of $locs[user] or $locs[system] is corrupt, please remove them and try again");
+}
+
// make sure we use only default values
$config_layers = $config->getLayers();
foreach ($config_layers as $layer) {
@@ -6495,9 +6495,9 @@ foreach ($install_files as $package => $instfile) {
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2005 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Guess.php,v 1.25 2006/12/14 00:24:37 cellog Exp $
+ * @version CVS: $Id: Guess.php,v 1.26 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since PEAR 0.1
*/
@@ -6572,9 +6572,9 @@ foreach ($install_files as $package => $instfile) {
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2005 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -6823,8 +6823,8 @@ class OS_Guess
* End:
*/
?>
-package2.xml
-<package packagerversion="1.6.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+package.xml
+<package packagerversion="1.7.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>PEAR</name>
<channel>pear.php.net</channel>
<summary>PEAR Base System</summary>
@@ -6878,6 +6878,12 @@ package2.xml
<active>no</active>
</lead>
<developer>
+ <name>Helgi Thormar</name>
+ <user>dufuz</user>
+ <email>dufuz@php.net</email>
+ <active>yes</active>
+ </developer>
+ <developer>
<name>Tias Guns</name>
<user>tias</user>
<email>tias@php.net</email>
@@ -6887,7 +6893,7 @@ package2.xml
<name>Tim Jackson</name>
<user>timj</user>
<email>timj@php.net</email>
- <active>yes</active>
+ <active>no</active>
</helper>
<helper>
<name>Bertrand Gugger</name>
@@ -6901,292 +6907,300 @@ package2.xml
<email>mj@php.net</email>
<active>no</active>
</helper>
- <date>2007-06-23</date>
- <time>18:11:06</time>
+ <date>2008-02-14</date>
+ <time>23:30:13</time>
<version>
- <release>1.6.1</release>
- <api>1.6.0</api>
+ <release>1.7.1</release>
+ <api>1.7.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>Minor bugfix release
-* fix Bug #11251: &quot;pear config-create&quot; does not set download_dir
- [cellog]
-* fix Bug #11261: run-tests --cgi broken in several ways [cellog]
-* fix Bug #11233: error message does not specify which of
- temp_dir/download_dir needs to be change [cellog]
-* fix Bug #11302: code coverage option for run-tests not working [stoyan]
-* fix Bug #11317: Registry::hasWriteAccess loops endless [cellog]
-* fix Bug #11318: &quot;pear package&quot; ignores changelog items [cellog]
-* fix Bug #11321: run-tests should assume php-cgi in path if --cgi option
- is not set [cellog]
-* fix Bug #11336: REST 1.0 - 1.1 inconcistency [tias]</notes>
+ <notes>fixed since 1.7.0
+ * fix bug #13030: Port not set for REST HTTP requests [timj]
+ * fix bug #13029: Duplicate Host headers set when requesting REST data [timj]
+ * fix bug #13047: PEAR fails to install *any* package [timj]
+
+Known bugs to be fixed in version 1.7.2:
+ - Bug #12945 PEAR_Registry::setConfig() does not set install path
+ - Bug #12959 PEAR should give warning when doing &quot;special&quot; handling with cfg role
+ - Bug #12960 role=cfg should automatically replace file if it has not been modified
+ - Bug #13031 PEAR fails to authenticate when doing upgrade-all on non-default channel
+ - Bug #13033 Signature to PEAR_REST_XX::listAll() changes between REST1.0 and 1.1</notes>
<contents>
<dir name="/">
- <file md5sum="51df31474f472961d5ec5d10b5c945c8" name="OS/Guess.php" role="php">
+ <file md5sum="fad1524a8ace078183017e6460501d3f" name="OS/Guess.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="1313799bf93685d1af00c705092c2d4c" name="PEAR/ChannelFile/Parser.php" role="php">
+ <file md5sum="a7a365eea26ab2693ff64ab8e8d84209" name="PEAR/ChannelFile/Parser.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="381496e0186e16d613ddb01564fca4a0" name="PEAR/Command/Auth.xml" role="php" />
- <file md5sum="a9357245c09407e3d7e4fb996e79a283" name="PEAR/Command/Auth.php" role="php">
+ <file md5sum="8ad57c5c30e159f1819e42bdad92b76d" name="PEAR/Command/Auth.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="73602fd7f051eaf8d37452d0e3063bdb" name="PEAR/Command/Build.xml" role="php" />
- <file md5sum="48ae7e7077d9add5049d80038d378815" name="PEAR/Command/Build.php" role="php">
+ <file md5sum="9440451c1223e5f0beb4aa97cfe7972b" name="PEAR/Command/Build.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="5dfb7898501c43ab655c5f9b7176ea20" name="PEAR/Command/Channels.xml" role="php" />
- <file md5sum="43caa7b061b2c270e8b57305895e1738" name="PEAR/Command/Channels.php" role="php">
+ <file md5sum="657737df869a988f4ac0570af9ba8a16" name="PEAR/Command/Channels.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="ecd0a17eb19aa8557781c4fde8308d67" name="PEAR/Command/Common.php" role="php">
+ <file md5sum="2a5f9b7a2ce0f63f0cfd1ce280eb7e74" name="PEAR/Command/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="91f189cb9423b5e87ee0abc5ea1a2be3" name="PEAR/Command/Config.xml" role="php" />
- <file md5sum="77608d6212c012ee7f996cde76c74e99" name="PEAR/Command/Config.php" role="php">
+ <file md5sum="620e52d328cff1b1a4fcf6cc4b900604" name="PEAR/Command/Config.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="e0f361c6ebda100653e550a762a66a06" name="PEAR/Command/Install.xml" role="php" />
- <file md5sum="07978bced51867486af04968f328ab0a" name="PEAR/Command/Install.php" role="php">
+ <file md5sum="6a875280e052f974b1e602f46ca41e29" name="PEAR/Command/Install.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="5cb62a04c0a268f4edd64a49a3895c92" name="PEAR/Command/Mirror.xml" role="php" />
- <file md5sum="d4536f27be39ed789d18977ab1946207" name="PEAR/Command/Mirror.php" role="php">
+ <file md5sum="93913e680ee376751263399c09c2afc6" name="PEAR/Command/Mirror.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="bbf88f26cd10b1caa76d5eec474f093f" name="PEAR/Command/Package.xml" role="php" />
- <file md5sum="2b40531cff6284369d9f2cc9fe826a87" name="PEAR/Command/Package.php" role="php">
+ <file md5sum="8c9a41328216db47ecf92ac6b0c63346" name="PEAR/Command/Package.php" role="php">
<tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" />
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="29c0947f423695818f90759e65376e5c" name="PEAR/Command/Pickle.xml" role="php" />
- <file md5sum="d16c2e85bfec071e91d50b6dce221a00" name="PEAR/Command/Pickle.php" role="php">
+ <file md5sum="25b3bd8485e8b71347b0426fb560bad1" name="PEAR/Command/Pickle.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="49b046cfc14747f0365e02e9c3f0e6dc" name="PEAR/Command/Registry.xml" role="php" />
- <file md5sum="984b537777e3b1aa61e6ab6d30b8d8dd" name="PEAR/Command/Registry.php" role="php">
+ <file md5sum="e21b012325dcb5d5c9f30b0b885c989a" name="PEAR/Command/Registry.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="05729e322af29b0ddcdd85559e44cd41" name="PEAR/Command/Remote.xml" role="php" />
- <file md5sum="4ee454d4f839cfd9c8d488ef29e5ca68" name="PEAR/Command/Remote.php" role="php">
+ <file md5sum="d081c690652b0c193994fc7369d8815a" name="PEAR/Command/Remote.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="118af6fbf9c37e90957f0bb9d5cf9d82" name="PEAR/Command/Test.xml" role="php" />
- <file md5sum="dcad5514acca8402bf1cd184f708b750" name="PEAR/Command/Test.php" role="php">
+ <file md5sum="6bb986a5d83a63753753af0deabf72b2" name="PEAR/Command/Test.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="3ca38213e528f18fa5575b4fa30f7b26" name="PEAR/Downloader/Package.php" role="php">
+ <file md5sum="8cc9b7ce523ad54265883ca838d70437" name="PEAR/Downloader/Package.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="1731d7b13f9b3898dbe190e73c8acc74" name="PEAR/Frontend/CLI.php" role="php">
+ <file md5sum="b37a0fe03b08cb40993046b16b1dd1e2" name="PEAR/Frontend/CLI.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="a9df40a339f2496e0c2684f7bba7d00d" name="PEAR/Installer/Role/Common.php" role="php">
+ <file md5sum="36850ec16ffcdfd014a21e742e8efd67" name="PEAR/Installer/Role/Common.php" role="php">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+ <file md5sum="d8c62e6275e3aaa7784290912406092c" name="PEAR/Installer/Role/Cfg.xml" role="php" />
+ <file md5sum="fe3409813082cbc75bd4c4734914814d" name="PEAR/Installer/Role/Cfg.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="89a4a2a286e842d45a98974f40a0565c" name="PEAR/Installer/Role/Data.xml" role="php" />
- <file md5sum="351f9e05d02853324f18582093651309" name="PEAR/Installer/Role/Data.php" role="php">
+ <file md5sum="79983acc4691ba254ca22d0707c9d73e" name="PEAR/Installer/Role/Data.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="b1ce0fe105251c3b75209d6518ee69ac" name="PEAR/Installer/Role/Doc.xml" role="php" />
- <file md5sum="7469fe9e2145e647e442c197fb37a3df" name="PEAR/Installer/Role/Doc.php" role="php">
+ <file md5sum="4cda7f2935bfd2c9202269594f1b35f5" name="PEAR/Installer/Role/Doc.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="af71c0ad42d16a323afe24a4f884ef15" name="PEAR/Installer/Role/Ext.xml" role="php" />
- <file md5sum="40b59efa8aae974cd39cdff8ca5a587a" name="PEAR/Installer/Role/Ext.php" role="php">
+ <file md5sum="705bb1516d78f7059658f4054d943147" name="PEAR/Installer/Role/Ext.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="ef88f0321d3e481c2130c95122cf76d8" name="PEAR/Installer/Role/Php.xml" role="php" />
- <file md5sum="7c146bc9418d260a78241cb1b27a782f" name="PEAR/Installer/Role/Php.php" role="php">
+ <file md5sum="383417bccb0ce4b225ec31f65c5cf984" name="PEAR/Installer/Role/Php.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="746461dc3b48af6d24094cb0211608f2" name="PEAR/Installer/Role/Script.xml" role="php" />
- <file md5sum="d140232966829408111f531afc3e976d" name="PEAR/Installer/Role/Script.php" role="php">
+ <file md5sum="360bb22407134f106571dc71dbe55d69" name="PEAR/Installer/Role/Script.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="bae39d4a6b7f018b3a49692b45baa76b" name="PEAR/Installer/Role/Src.xml" role="php" />
- <file md5sum="bb3f535b84213176f9c59896d901aaba" name="PEAR/Installer/Role/Src.php" role="php">
+ <file md5sum="e147d63f168ea156fc2be38caaa63804" name="PEAR/Installer/Role/Src.xml" role="php" />
+ <file md5sum="99a36f2406af7d785b636612acb1fe73" name="PEAR/Installer/Role/Src.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="a24b596ec987aa5688fc19e8ed4e97ea" name="PEAR/Installer/Role/Test.xml" role="php" />
- <file md5sum="36ccdcf4aebd0d3b83fe1f9cedff0cd8" name="PEAR/Installer/Role/Test.php" role="php">
+ <file md5sum="9ca02df7f7619659cd04a9dbcbbefd1e" name="PEAR/Installer/Role/Test.php" role="php">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+ <file md5sum="7641e71c5785bb33a4261ebe25ed0fd7" name="PEAR/Installer/Role/Www.xml" role="php" />
+ <file md5sum="31103803fd7d1114da74041523b56e44" name="PEAR/Installer/Role/Www.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="968acf9521da428d2a06d979fc082c64" name="PEAR/Installer/Role.php" role="php">
+ <file md5sum="df9e37917e5eb2273bd170080187504b" name="PEAR/Installer/Role.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="fc9d8aed9acde76857698e583a0d7e9a" name="PEAR/PackageFile/Generator/v1.php" role="php">
+ <file md5sum="e0d238adfc0cd119bf1c7391dc4d8e84" name="PEAR/PackageFile/Generator/v1.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="0670f573cebc907787ccdbc84db3aa28" name="PEAR/PackageFile/Generator/v2.php" role="php">
+ <file md5sum="41fbeff9fa99070a131b55a246048747" name="PEAR/PackageFile/Generator/v2.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="521f93f898fc50330bbb2eba04660436" name="PEAR/PackageFile/Parser/v1.php" role="php">
+ <file md5sum="e439d694e4e2c3b4146ee308a2758f5a" name="PEAR/PackageFile/Parser/v1.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="81a5832696e627daffee912bacac999d" name="PEAR/PackageFile/Parser/v2.php" role="php">
+ <file md5sum="9fdba40240a1a72820780b5d6184391b" name="PEAR/PackageFile/Parser/v2.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="78a39ea9d34886e3e31bc329a221c65f" name="PEAR/PackageFile/v2/rw.php" role="php">
+ <file md5sum="02a9ca28868ba5c86a212bad7bf8746b" name="PEAR/PackageFile/v2/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="5bd2979b0364d2360678b406a9d8fa7c" name="PEAR/PackageFile/v2/Validator.php" role="php">
+ <file md5sum="50ae0ae46204778eddb042c15b419758" name="PEAR/PackageFile/v2/Validator.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="1ad577b88d2e2c46dabcb9e02bd382c4" name="PEAR/PackageFile/v1.php" role="php">
+ <file md5sum="f39f65088461a6de8e84f397357c46fe" name="PEAR/PackageFile/v1.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="bd50c8ce568945861b58a40d5955d1f0" name="PEAR/PackageFile/v2.php" role="php">
+ <file md5sum="12ecf6cd1bb212c378e44b9182d4aa35" name="PEAR/PackageFile/v2.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="8cacaa8608a05564a8a420a64c7c8a94" name="PEAR/REST/10.php" role="php">
+ <file md5sum="f3c6f44136cdad1620c3b175f6879afc" name="PEAR/REST/10.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="cad8a1384d597657afeb1ddf3b3d80b0" name="PEAR/REST/11.php" role="php">
+ <file md5sum="11196c5909e6e547aa5062afe95f67a5" name="PEAR/REST/11.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="fd6125bd0902f2791099cba17b60662d" name="PEAR/REST/13.php" role="php">
+ <file md5sum="2335de1bf3d174b4fd6794986f109d7e" name="PEAR/REST/13.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="7dda82207c1aa4a7b0173e3a610e9085" name="PEAR/Task/Postinstallscript/rw.php" role="php">
+ <file md5sum="7c46da738c226c9020eb5e6708d1f864" name="PEAR/Task/Postinstallscript/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="32978e87e5c62665140a470447e42d59" name="PEAR/Task/Replace/rw.php" role="php">
+ <file md5sum="d04e4bb8e9dcd3d48a19cfa9389b136b" name="PEAR/Task/Replace/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="d7e6a31e9c54304a2a01cb5931940184" name="PEAR/Task/Unixeol/rw.php" role="php">
+ <file md5sum="7a6a8f12c7c8a6974a36fd9699d87640" name="PEAR/Task/Unixeol/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="0457e0c8e7c7ea7268d67dfef9e2b6d4" name="PEAR/Task/Windowseol/rw.php" role="php">
+ <file md5sum="c836ac0c916325058fb5abeb3cb2e08b" name="PEAR/Task/Windowseol/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="35ab033fc7caf6e0f23225fa845573f1" name="PEAR/Task/Common.php" role="php">
+ <file md5sum="e16ad0cec65479de931d4bd759c86312" name="PEAR/Task/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="f29e8ced5c198edbf4312eae4bc6e6ff" name="PEAR/Task/Postinstallscript.php" role="php">
+ <file md5sum="92575321365952eb97cc6b13ce2d7ede" name="PEAR/Task/Postinstallscript.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="c9a2e460e1de7595c6f0dd4c94832f29" name="PEAR/Task/Replace.php" role="php">
+ <file md5sum="53e2f95d90b7d7fcb8c0d6f011554c56" name="PEAR/Task/Replace.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="aa03836ade2c3758224193f14749481b" name="PEAR/Task/Unixeol.php" role="php">
+ <file md5sum="d4c37e6109558386997b178850ee8402" name="PEAR/Task/Unixeol.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="6d4645e3226aadf1d2adb1cb23dc3827" name="PEAR/Task/Windowseol.php" role="php">
+ <file md5sum="836f0860f9ae37719d32267e0af6c934" name="PEAR/Task/Windowseol.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="291eaadc44241200998b22b9e6958383" name="PEAR/Validator/PECL.php" role="php">
+ <file md5sum="4243bebc0d0d2b9ebec1c3c6cc95426f" name="PEAR/Validator/PECL.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="699d4386dc15402fba995f44ecdc2d0b" name="PEAR/Autoloader.php" role="php">
+ <file md5sum="a9cf197907e5ea0b4ebdd2a48768561c" name="PEAR/Autoloader.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="8d78528a844923def2ea76ee9ef3e630" name="PEAR/Builder.php" role="php">
+ <file md5sum="b3a8f58c9d900545fcf44adb4babcaef" name="PEAR/Builder.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="f72fe1d5a7274156524bb92497f402df" name="PEAR/ChannelFile.php" role="php">
+ <file md5sum="afbc956590697d22b2485bac3ad51729" name="PEAR/ChannelFile.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="aead8675ecff9971eb636bd89304b4ca" name="PEAR/Command.php" role="php">
+ <file md5sum="829abfe217c16a03099efe1c235846b1" name="PEAR/Command.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="d4c5555477da21d8c2770013d04bd0ec" name="PEAR/Common.php" role="php">
+ <file md5sum="0d46ebcdd475ee625e242e5f2cb6200c" name="PEAR/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="c60bd891afaa147346979d56e8c0d59d" name="PEAR/Config.php" role="php">
+ <file md5sum="ba24822f722e4175da4f1d4d23f85826" name="PEAR/Config.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="575cd4922b18ce418d63bd4628f6716e" name="PEAR/Dependency.php" role="php" />
- <file md5sum="b8b5966f8978e136f251e7a8ceb4a3a4" name="PEAR/DependencyDB.php" role="php">
+ <file md5sum="bcfff6330848fa83118e1ff11b3d7ba0" name="PEAR/Dependency.php" role="php" />
+ <file md5sum="0488e80ccb2b392cd966d6ab4ba8b94b" name="PEAR/DependencyDB.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="01a152962df6319af43b3777a328a934" name="PEAR/Dependency2.php" role="php">
+ <file md5sum="30e0655dd5282eea478124f626337ac9" name="PEAR/Dependency2.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="e86d5e379ffda5a8d3db6bc2dede5551" name="PEAR/Downloader.php" role="php">
+ <file md5sum="f8aa205c6ef232bf383f478b30bdcbc5" name="PEAR/Downloader.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="cf9555223b1d201905b382ca3cb6a68d" name="PEAR/ErrorStack.php" role="php">
+ <file md5sum="6b34090416a2576a2f41134af21ce52c" name="PEAR/ErrorStack.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="37748257ac6c1b1a4d3b99bb07a48f56" name="PEAR/Exception.php" role="php">
+ <file md5sum="342926ab74bb1688af12fe33679beeac" name="PEAR/Exception.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="9c04ca195a4bad77418e639d5244c64f" name="PEAR/Frontend.php" role="php">
+ <file md5sum="e0e4cbcec4a972fbad779d0f9d323120" name="PEAR/FixPHP5PEARWarnings.php" role="php" />
+ <file md5sum="cb4e237b180f6aca18f88e7b7db9a596" name="PEAR/Frontend.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="fa149bb12c95ed5b282d2037ae1abfc6" name="PEAR/Installer.php" role="php">
+ <file md5sum="845eabb13099c31f87e83114bd5cc1c9" name="PEAR/Installer.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="fc392bb3ee7b9b1dcab0b77a4e496022" name="PEAR/PackageFile.php" role="php">
+ <file md5sum="455211423e10667a8b2e6d69cfc2c439" name="PEAR/PackageFile.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="d07129d56ff728133372613bea2b2e51" name="PEAR/Packager.php" role="php">
+ <file md5sum="05a6df11a07daf29a32d8c9ead6b0b5b" name="PEAR/Packager.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="4326c1a6c90463b1ab9070a6d1633996" name="PEAR/Registry.php" role="php">
+ <file md5sum="e0574b876bd5b5bfff346a4fec43f2ff" name="PEAR/Registry.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="bc44cabdf5484beafb5009b65aa19a18" name="PEAR/Remote.php" role="php">
+ <file md5sum="adab2d35578f95734a9f11db90804f9c" name="PEAR/Remote.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="d47b4844bce9ac9bc81fcccc05918480" name="PEAR/REST.php" role="php">
+ <file md5sum="3a8d179f6a7bb22d42d07ca38eb3d510" name="PEAR/REST.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="be1e38330d0ebfb206304579d24a06a5" name="PEAR/RunTest.php" role="php">
+ <file md5sum="6f8b979b380e3acc504fd4b4fa9165de" name="PEAR/RunTest.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="9f8c31e925190c413212e12650bb58b1" name="PEAR/Validate.php" role="php">
+ <file md5sum="7283eac0fed47c32ff03fde6c4950e71" name="PEAR/Validate.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="32c2fa6245fc7fe08af7547301799f91" name="PEAR/XMLParser.php" role="php">
+ <file md5sum="9d347c888482605e43bbe10879ede86c" name="PEAR/XMLParser.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file baseinstalldir="/" md5sum="ff4fe92375538e42b26c1a9c70e97878" name="scripts/pear.bat" role="script">
+ <file baseinstalldir="/" md5sum="bd65b087b7707463525e9f0092337793" name="scripts/pear.bat" role="script">
<tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
<tasks:windowseol />
</file>
- <file baseinstalldir="/" md5sum="a4516f734454426b1f541337c118d24b" name="scripts/peardev.bat" role="script">
+ <file baseinstalldir="/" md5sum="f92ee8acc4f00a7ca9ffedc1fe959b69" name="scripts/peardev.bat" role="script">
<tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
<tasks:windowseol />
</file>
- <file baseinstalldir="/" md5sum="891243073720ba7edc9306d0f9baf9e0" name="scripts/pecl.bat" role="script">
+ <file baseinstalldir="/" md5sum="34c1cb834dd1c03c9e40998b201d52e0" name="scripts/pecl.bat" role="script">
<tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
<tasks:windowseol />
</file>
- <file baseinstalldir="/" md5sum="1acb933d58272bc9f717b4f66543c231" name="scripts/pear.sh" role="script">
+ <file baseinstalldir="/" md5sum="5b495a3de3c6092bfbd93806937a0e4e" name="scripts/pear.sh" role="script">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
<tasks:replace from="@pear_version@" to="version" type="package-info" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
<tasks:unixeol />
</file>
- <file baseinstalldir="/" md5sum="abeea412b1e46e64f7dc7497bcc09e2b" name="scripts/peardev.sh" role="script">
+ <file baseinstalldir="/" md5sum="c69b7eb6cf9198ef8f03a19dcb57ca42" name="scripts/peardev.sh" role="script">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
<tasks:replace from="@pear_version@" to="version" type="package-info" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
<tasks:unixeol />
</file>
- <file baseinstalldir="/" md5sum="418b89e70f9f4ab4eebce5e140d0ea96" name="scripts/pecl.sh" role="script">
+ <file baseinstalldir="/" md5sum="d00c55f2aa48052c25db271e044e7551" name="scripts/pecl.sh" role="script">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
<tasks:replace from="@pear_version@" to="version" type="package-info" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
<tasks:unixeol />
</file>
- <file baseinstalldir="/" md5sum="54071cbe5b9671b6e8a3f197677a289b" name="scripts/pearcmd.php" role="php">
+ <file baseinstalldir="/" md5sum="07705150e7e98d6c85bcfa29f9ebfca0" name="scripts/pearcmd.php" role="php">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
<tasks:replace from="@pear_version@" to="version" type="package-info" />
@@ -7200,11 +7214,11 @@ package2.xml
</file>
<file md5sum="671e6690634062ee521d2027a9971f22" name="INSTALL" role="doc" />
<file md5sum="ca444da9174e05f8a0dc71d8ee47900f" name="package.dtd" role="data" />
- <file md5sum="b6178a7146c714979cfac52338c49370" name="PEAR.php" role="php">
+ <file md5sum="d8b4207568c3c40570a01ef96be38182" name="PEAR.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="ae70dd96347165e048bd37521d6437f2" name="README" role="doc" />
- <file md5sum="85e5d31f8fe222e081031770eec47672" name="System.php" role="php">
+ <file md5sum="a8a7405b1f0e4624c3e939bba7c084c9" name="System.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="acd010e3bc43c0f72df584acde7b9158" name="template.spec" role="data" />
@@ -7317,45 +7331,128 @@ package2.xml
<changelog>
<release>
<version>
- <release>1.6.0</release>
+ <release>1.6.2</release>
<api>1.6.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <date>2007-06-07</date>
+ <date>2007-09-09</date>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>Minor new feature/bugfix release
-* fix Bug #10846: Wont upgrade Text_Wiki from RC1 to RC2 [tias]
-* fix Bug #10857: Structures_Graph_Node::getMetadata: Requested
- key does not exist [cellog]
-* fix Bug #10865: using --packagingroot regression [tias/cellog]
-* fix Bug #10780: wrong output from PEAR_Exception [cellog]
-* fix Bug #10873: pear channel-discover broken - pear temp directories
- not writeable [cellog]
-* fix Bug #10938: Invalid package.xml creates wrong package [cellog]
-* fix Bug #10944: Cannot install Package+Subpackage [cipri]
-* fix Bug #11014: custom tasks with &quot;-&quot; in name cannot be
- packaged [cellog]
-* fix Bug #11181: pear requests channel.xml from main server instead from
- mirror [cellog]
-* implement Request #10182: add resolution of PHP dependency prior to download
+ <notes>Minor bugfix release
+* fix Bug #11420: warning on pecl (un)install with --register-only option [cellog]
+* fix Bug #11481: PEAR_PackageFile_Parser_v1 skips single-char directories [pmjones]
+* fix Bug #11517: Error : download directory &quot;/var/cache/php-pear&quot;
+ is not writeable. [remicollet]
+* fix Bug #11616: Incorrect equality operator used when comparing md5 check sums [robham]
+* fix Bug #11642: PEAR fails to authenticate when downloading deps from non-default
+ channels [timj]
+* fix Bug #11657: Installer generate bad &quot;dirtree&quot; using INSTALL_ROOT [remicollet]
+* fix Bug #11678: Registry.php getChannel() deadlocks [cellog]
+* fix Bug #11703: pear convert and package.xml with optional dependencies fails [cellog]
+* fix Bug #11754: Error at upgrade-all command run [cellog]
+* fix Bug #11861: uninstall of package did not delete directory created during install
+ of package [cellog]
+* fix Bug #11862: Notice: Array to string conversion in PEAR/PackageFile.php on line 433
[cellog]
-* implement Request #10373: if pref_state=stable and installed package=beta,
- allow up to latest beta version [tias]
-* implement Request #10495: list-all with channel information etc [tias]
-* implement Request #10496: list with channel information [tias]
-* implement Request #10515: list-upgrades with channel information [tias]
-* implement Request #10659: search allchannels [tias]
-* implement Request #10812: list-categories and list-category [tias]
-* implement Request #11169: search with channel information [tias]
-* implement xdebug code coverage generation with pear run-tests --coverage
- [dufuz]</notes>
+* fix Bug #11883: run-tests -u -p SomePackage should run the topmost
+ &quot;AllTests.php&quot; file [cellog]
+* fix Bug #11936: run-tests fails to preserve SYSTEMROOT environment variable [cellog]</notes>
+ </release>
+ <release>
+ <version>
+ <release>1.7.0RC1</release>
+ <api>1.6.0</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>stable</api>
+ </stability>
+ <date>2007-12-10</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>* fix Bug #12116: Accept-Encoding not supported: breaks installer [jldupont]
+* fix Bug #12162: config-create doesn&apos;t work after installing custom roles [cellog]
+* fix Bug #12553: System::find() does not find exact filename matches [cellog/jorrit]
+* fix Bug #12554: enableExtension() zeros php.ini in some instances [jlightsey]
+* implement Request #11964: introduce www role, www_dir config variable [cellog]
+* implement Request #12108: Add &quot;config&quot; (cfg) role [cellog]
+* implement Request #12147: Avoid compile-time strict warnings [cellog]</notes>
+ </release>
+ <release>
+ <version>
+ <release>1.7.0RC2</release>
+ <api>1.6.0</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>stable</api>
+ </stability>
+ <date>2007-01-03</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>**WARNING** MAJOR BC BREAK IN WWW ROLE**
+The www role was installing into packagename/ and now installs into the root directory
+of www_dir. This is necessary to allow easy migration from applications already using
+Role_Web
+
+ fixed since 1.7.0RC1:
+* fix Bug #12662: System::_parseArgs() should be declared statically [cellog]
+* fix Bug #12661: System::mktemp needs to be declaired statically [cellog]
+* implement PEAR_Error::__toString() as alias to getMessage() [cellog]
+ fixed since 1.6.2:
+* fix Bug #12116: Accept-Encoding not supported: breaks installer [jldupont]
+* fix Bug #12162: config-create doesn&apos;t work after installing custom roles [cellog]
+* fix Bug #12553: System::find() does not find exact filename matches [cellog/jorrit]
+* fix Bug #12554: enableExtension() zeros php.ini in some instances [jlightsey]
+* implement Request #11964: introduce www role, www_dir config variable [cellog]
+* implement Request #12108: Add &quot;config&quot; (cfg) role [cellog]
+* implement Request #12147: Avoid compile-time strict warnings [cellog]</notes>
+ </release>
+ <release>
+ <version>
+ <release>1.7.0</release>
+ <api>1.7.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2008-01-31</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>Minor feature addition release
+
+Known bugs to be fixed in version 1.7.1:
+ - Bug #12945 PEAR_Registry::setConfig() does not set install path
+ - Bug #12959 PEAR should give warning when doing &quot;special&quot; handling with cfg role
+ - Bug #12960 role=cfg should automatically replace file if it has not been modified
+ - Bug #13031 PEAR fails to authenticate when doing upgrade-all on non-default channel
+ - Bug #13033 Signature to PEAR_REST_XX::listAll() changes between REST1.0 and 1.1
+
+fixed since 1.7.0RC2
+ * fix bug #13030: Port not set for REST HTTP requests [timj]
+ * fix bug #13029: Duplicate Host headers set when requesting REST data [timj]
+ * fix Bug #12987: improper calls to class_exists [weirdan]
+ * fix Bug #12954: Host header missing when using proxy [flint]
+ * fix Bug #12918: file tasks ignored for role=src [cellog]
+ * fix Bug #12816: &lt;configureoption&gt; default isn&apos;t being parsed [jon]
+ * fix Bug #12793: run-tests fails when using --ARGS-- in phpt test files [izi]
+fixed since 1.7.0RC1:
+ * fix Bug #12818: package.xml 1.0 parsing can drop lines [cellog]
+ * fix Bug #12662: System::_parseArgs() should be declared statically [cellog]
+ * fix Bug #12661: System::mktemp needs to be declaired statically [cellog]
+ * implement PEAR_Error::__toString() as alias to getMessage() [cellog]
+fixed since 1.6.2:
+ * fix Bug #12116: Accept-Encoding not supported: breaks installer [jldupont]
+ * fix Bug #12162: config-create doesn&apos;t work after installing custom roles [cellog]
+ * fix Bug #12553: System::find() does not find exact filename matches [cellog/jorrit]
+ * fix Bug #12554: enableExtension() zeros php.ini in some instances [jlightsey]
+ * implement Request #11964: introduce www role, www_dir config variable [cellog]
+ * implement Request #12108: Add &quot;config&quot; (cfg) role [cellog]
+ * implement Request #12147: Avoid compile-time strict warnings [cellog]</notes>
</release>
</changelog>
</package>
-
+
/**
* The OS_Guess class
*
@@ -7371,9 +7468,9 @@ package2.xml
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2005 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Guess.php,v 1.25 2006/12/14 00:24:37 cellog Exp $
+ * @version CVS: $Id: Guess.php,v 1.26 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since PEAR 0.1
*/
@@ -7448,9 +7545,9 @@ package2.xml
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2005 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -7699,7 +7796,7 @@ class OS_Guess
* End:
*/
?>
-
+
/**
* PEAR_ChannelFile_Parser for parsing channel.xml
*
@@ -7714,9 +7811,9 @@ class OS_Guess
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Parser.php,v 1.4 2006/01/06 04:47:36 cellog Exp $
+ * @version CVS: $Id: Parser.php,v 1.5 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -7731,9 +7828,9 @@ require_once 'PEAR/ChannelFile.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -7771,7 +7868,7 @@ class PEAR_ChannelFile_Parser extends PEAR_XMLParser
return $ret;
}
}
-?>
+?>
<login>
<summary>Connects and authenticates to remote server</summary>
<shortcut>li</shortcut>
@@ -7796,7 +7893,7 @@ Logs out from the remote server. This command does not actually
connect to the remote server, it only deletes the stored username and
password from your user configuration.</doc>
</logout>
-</commands>
+</commands>
/**
* PEAR_Command_Auth (login, logout commands)
*
@@ -7812,9 +7909,9 @@ password from your user configuration.</doc>
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Auth.php,v 1.30 2007/05/20 00:16:44 cellog Exp $
+ * @version CVS: $Id: Auth.php,v 1.31 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -7832,9 +7929,9 @@ require_once 'PEAR/Config.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -7998,7 +8095,7 @@ password from your user configuration.',
// }}}
}
-?>
+?>
<build>
<summary>Build an Extension From C Source</summary>
<function>doBuild</function>
@@ -8007,7 +8104,7 @@ password from your user configuration.',
<doc>[package.xml]
Builds one or more extensions contained in a package.</doc>
</build>
-</commands>
+</commands>
/**
* PEAR_Command_Auth (build command)
*
@@ -8024,9 +8121,9 @@ Builds one or more extensions contained in a package.</doc>
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Build.php,v 1.13 2006/01/06 04:47:36 cellog Exp $
+ * @version CVS: $Id: Build.php,v 1.14 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -8044,9 +8141,9 @@ require_once 'PEAR/Command/Common.php';
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -8111,7 +8208,7 @@ Builds one or more extensions contained in a package.'
// }}}
}
-
+
<list-channels>
<summary>List Available Channels</summary>
<function>doList</function>
@@ -8209,7 +8306,7 @@ password via the system's process list.
</doc>
</channel-discover>
</commands>
-
+
// /* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
* PEAR_Command_Channels (list-channels, update-channels, channel-delete, channel-add,
@@ -8227,9 +8324,9 @@ password via the system's process list.
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Channels.php,v 1.56 2007/06/10 04:34:19 cellog Exp $
+ * @version CVS: $Id: Channels.php,v 1.57 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -8245,9 +8342,9 @@ require_once 'PEAR/Command/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -8946,7 +9043,7 @@ password via the system\'s process list.
}
}
?>
-
+
/**
* PEAR_Command_Common base class
*
@@ -8962,9 +9059,9 @@ password via the system\'s process list.
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Common.php,v 1.35 2006/06/08 22:25:18 pajoye Exp $
+ * @version CVS: $Id: Common.php,v 1.36 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -8981,9 +9078,9 @@ require_once 'PEAR.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -9237,7 +9334,7 @@ class PEAR_Command_Common extends PEAR
}
?>
-
+
<config-show>
<summary>Show All Settings</summary>
<function>doConfigShow</function>
@@ -9328,7 +9425,7 @@ PEAR installation (using the --remoteconfig option of install, upgrade,
and uninstall).
</doc>
</config-create>
-</commands>
+</commands>
/**
* PEAR_Command_Config (config-show, config-get, config-set, config-help, config-create commands)
*
@@ -9344,9 +9441,9 @@ and uninstall).
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Config.php,v 1.53 2007/06/11 05:11:53 cellog Exp $
+ * @version CVS: $Id: Config.php,v 1.56 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -9363,9 +9460,9 @@ require_once 'PEAR/Command/Common.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -9680,6 +9777,8 @@ and uninstall).
$config->noRegistry();
$config->set('php_dir', $windows ? "$root\\pear\\php" : "$root/pear/php", 'user');
$config->set('data_dir', $windows ? "$root\\pear\\data" : "$root/pear/data");
+ $config->set('www_dir', $windows ? "$root\\pear\\www" : "$root/pear/www");
+ $config->set('cfg_dir', $windows ? "$root\\pear\\cfg" : "$root/pear/cfg");
$config->set('ext_dir', $windows ? "$root\\pear\\ext" : "$root/pear/ext");
$config->set('doc_dir', $windows ? "$root\\pear\\docs" : "$root/pear/docs");
$config->set('test_dir', $windows ? "$root\\pear\\tests" : "$root/pear/tests");
@@ -9748,7 +9847,7 @@ and uninstall).
}
?>
-
+
<install>
<summary>Install Package</summary>
<function>doInstall</function>
@@ -10006,7 +10105,7 @@ package if needed.
Run post-installation scripts in package &lt;package&gt;, if any exist.
</doc>
</run-scripts>
-</commands>
+</commands>
/**
* PEAR_Command_Install (install, upgrade, upgrade-all, uninstall, bundle, run-scripts commands)
*
@@ -10022,9 +10121,9 @@ Run post-installation scripts in package &lt;package&gt;, if any exist.
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Install.php,v 1.132 2007/06/11 05:32:14 cellog Exp $
+ * @version CVS: $Id: Install.php,v 1.140 2008/01/29 03:21:01 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -10042,9 +10141,9 @@ require_once 'PEAR/Command/Common.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -10355,10 +10454,6 @@ Run post-installation scripts in package <package>, if any exist.
if (PEAR::isError($ini)) {
return $ini;
}
- $fp = @fopen($phpini, 'wb');
- if (!$fp) {
- return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing');
- }
$line = 0;
if ($type == 'extsrc' || $type == 'extbin') {
$search = 'extensions';
@@ -10392,6 +10487,10 @@ Run post-installation scripts in package <package>, if any exist.
$newini[] = $enable . '="' . $binary . '"' . (OS_UNIX ? "\n" : "\r\n");
}
$newini = array_merge($newini, array_slice($ini['all'], $line));
+ $fp = @fopen($phpini, 'wb');
+ if (!$fp) {
+ return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing');
+ }
foreach ($newini as $line) {
fwrite($fp, $line);
}
@@ -10524,7 +10623,7 @@ Run post-installation scripts in package <package>, if any exist.
function doInstall($command, $options, $params)
{
- if (!class_exists('PEAR/PackageFile.php')) {
+ if (!class_exists('PEAR_PackageFile')) {
require_once 'PEAR/PackageFile.php';
}
if (empty($this->installer)) {
@@ -10571,7 +10670,7 @@ Run post-installation scripts in package <package>, if any exist.
continue;
}
if ($reg->packageExists($pf->getPackage(), $pf->getChannel()) &&
- version_compare($pf->getVersion(),
+ version_compare($pf->getVersion(),
$reg->packageInfo($pf->getPackage(), 'version', $pf->getChannel()),
'<=')) {
if ($this->config->get('verbose')) {
@@ -10616,10 +10715,14 @@ Run post-installation scripts in package <package>, if any exist.
}
}
}
- $abstractpackages =
+ $abstractpackages =
+ array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages);
+ } elseif (count($abstractpackages)) {
+ $abstractpackages =
array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages);
}
+
$packages = array_merge($abstractpackages, $otherpackages);
if (!count($packages)) {
$this->ui->outputData('Nothing to ' . $command);
@@ -10628,6 +10731,7 @@ Run post-installation scripts in package <package>, if any exist.
$this->downloader = &$this->getDownloader($this->ui, $options, $this->config);
$errors = array();
+ $binaries = array();
$downloaded = array();
$downloaded = &$this->downloader->download($packages);
if (PEAR::isError($downloaded)) {
@@ -10663,6 +10767,7 @@ Run post-installation scripts in package <package>, if any exist.
return true;
}
$extrainfo = array();
+ $binaries = array();
foreach ($downloaded as $param) {
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$info = $this->installer->install($param, $options);
@@ -10692,6 +10797,7 @@ Run post-installation scripts in package <package>, if any exist.
} else {
$instpkg = &$instreg->getPackage($pkg->getPackage(), $pkg->getChannel());
}
+
foreach ($instpkg->getFilelist() as $name => $atts) {
$pinfo = pathinfo($atts['installed_as']);
if (!isset($pinfo['extension']) ||
@@ -10708,29 +10814,31 @@ Run post-installation scripts in package <package>, if any exist.
break;
}
}
- foreach ($binaries as $pinfo) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($ret)) {
- $extrainfo[] = $ret->getMessage();
- if ($param->getPackageType() == 'extsrc' ||
- $param->getPackageType() == 'extbin') {
- $exttype = 'extension';
+ if (count($binaries)) {
+ foreach ($binaries as $pinfo) {
+ PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
+ $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType());
+ PEAR::staticPopErrorHandling();
+ if (PEAR::isError($ret)) {
+ $extrainfo[] = $ret->getMessage();
+ if ($param->getPackageType() == 'extsrc' ||
+ $param->getPackageType() == 'extbin') {
+ $exttype = 'extension';
+ } else {
+ ob_start();
+ phpinfo(INFO_GENERAL);
+ $info = ob_get_contents();
+ ob_end_clean();
+ $debug = function_exists('leak') ? '_debug' : '';
+ $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : '';
+ $exttype = 'zend_extension' . $debug . $ts;
+ }
+ $extrainfo[] = 'You should add "' . $exttype . '=' .
+ $pinfo[1]['basename'] . '" to php.ini';
} else {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : '';
- $exttype = 'zend_extension' . $debug . $ts;
+ $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() .
+ ' enabled in php.ini';
}
- $extrainfo[] = 'You should add "' . $exttype . '=' .
- $pinfo[1]['basename'] . '" to php.ini';
- } else {
- $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() .
- ' enabled in php.ini';
}
}
}
@@ -10860,6 +10968,7 @@ Run post-installation scripts in package <package>, if any exist.
}
$reg = &$this->config->getRegistry();
$newparams = array();
+ $binaries = array();
$badparams = array();
foreach ($params as $pkg) {
$channel = $this->config->get('default_channel');
@@ -10918,6 +11027,7 @@ Run post-installation scripts in package <package>, if any exist.
// for circular dependencies like subpackages
$this->installer->setUninstallPackages($newparams);
$params = array_merge($params, $badparams);
+ $binaries = array();
foreach ($params as $pkg) {
$this->installer->pushErrorHandling(PEAR_ERROR_RETURN);
if ($err = $this->installer->uninstall($pkg, $options)) {
@@ -10933,6 +11043,7 @@ Run post-installation scripts in package <package>, if any exist.
if ($instbin = $pkg->getInstalledBinary()) {
continue; // this will be uninstalled later
}
+
foreach ($pkg->getFilelist() as $name => $atts) {
$pinfo = pathinfo($atts['installed_as']);
if (!isset($pinfo['extension']) ||
@@ -10949,29 +11060,31 @@ Run post-installation scripts in package <package>, if any exist.
break;
}
}
- foreach ($binaries as $pinfo) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($ret)) {
- $extrainfo[] = $ret->getMessage();
- if ($pkg->getPackageType() == 'extsrc' ||
- $pkg->getPackageType() == 'extbin') {
- $exttype = 'extension';
+ if (count($binaries)) {
+ foreach ($binaries as $pinfo) {
+ PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
+ $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType());
+ PEAR::staticPopErrorHandling();
+ if (PEAR::isError($ret)) {
+ $extrainfo[] = $ret->getMessage();
+ if ($pkg->getPackageType() == 'extsrc' ||
+ $pkg->getPackageType() == 'extbin') {
+ $exttype = 'extension';
+ } else {
+ ob_start();
+ phpinfo(INFO_GENERAL);
+ $info = ob_get_contents();
+ ob_end_clean();
+ $debug = function_exists('leak') ? '_debug' : '';
+ $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : '';
+ $exttype = 'zend_extension' . $debug . $ts;
+ }
+ $this->ui->outputData('Unable to remove "' . $exttype . '=' .
+ $pinfo[1]['basename'] . '" from php.ini', $command);
} else {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : '';
- $exttype = 'zend_extension' . $debug . $ts;
+ $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() .
+ ' disabled in php.ini', $command);
}
- $this->ui->outputData('Unable to remove "' . $exttype . '=' .
- $pinfo[1]['basename'] . '" from php.ini', $command);
- } else {
- $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() .
- ' disabled in php.ini', $command);
}
}
}
@@ -11050,6 +11163,9 @@ Run post-installation scripts in package <package>, if any exist.
if (PEAR::isError($result)) {
return $result;
}
+ if (!isset($result[0])) {
+ return $this->raiseError('unable to unpack ' . $params[0]);
+ }
$pkgfile = &$result[0]->getPackageFile();
$pkgname = $pkgfile->getName();
$pkgversion = $pkgfile->getVersion();
@@ -11136,7 +11252,7 @@ Run post-installation scripts in package <package>, if any exist.
if ($dorest) {
$rest = &$this->config->getREST('1.0', array());
$installed = array_flip($reg->listPackages($channel));
- $latest = $rest->listLatestUpgrades($base,
+ $latest = $rest->listLatestUpgrades($base,
$this->config->get('preferred_state', null, $channel), $installed,
$channel, $reg);
} else {
@@ -11177,7 +11293,7 @@ Run post-installation scripts in package <package>, if any exist.
}
?>
-
+
<download-all>
<summary>Downloads each available package from the default channel</summary>
<function>doDownloadAll</function>
@@ -11194,7 +11310,7 @@ Requests a list of available packages from the default channel ({config default_
and downloads them to current working directory. Note: only
packages within preferred_state ({config preferred_state}) will be downloaded</doc>
</download-all>
-</commands>
+</commands>
/**
* PEAR_Command_Mirror (download-all command)
*
@@ -11209,9 +11325,9 @@ packages within preferred_state ({config preferred_state}) will be downloaded</d
* @category pear
* @package PEAR
* @author Alexander Merz <alexmerz@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Mirror.php,v 1.18 2006/03/02 18:14:13 cellog Exp $
+ * @version CVS: $Id: Mirror.php,v 1.19 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.2.0
*/
@@ -11227,9 +11343,9 @@ require_once 'PEAR/Command/Common.php';
* @category pear
* @package PEAR
* @author Alexander Merz <alexmerz@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.2.0
*/
@@ -11347,7 +11463,7 @@ packages within preferred_state ({config preferred_state}) will be downloaded'
// }}}
}
-
+
<package>
<summary>Build Package</summary>
<function>doPackage</function>
@@ -11541,7 +11657,7 @@ used for automated conversion or learning the format.
</doc>
</convert>
</commands>
-
+
/**
* PEAR_Command_Package (package, package-validate, cvsdiff, cvstag, package-dependencies,
* sign, makerpm, convert commands)
@@ -11559,9 +11675,9 @@ used for automated conversion or learning the format.
* @author Stig Bakken <ssb@php.net>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Package.php,v 1.124 2007/04/19 03:04:16 cellog Exp $
+ * @version CVS: $Id: Package.php,v 1.126 2008/01/29 03:21:01 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -11579,7 +11695,7 @@ require_once 'PEAR/Command/Common.php';
* @author Stig Bakken <ssb@php.net>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
* @link http://pear.php.net/package/PEAR
@@ -11844,7 +11960,7 @@ used for automated conversion or learning the format.
if (!class_exists('PEAR_Common')) {
require_once 'PEAR/Common.php';
}
- if (!class_exists('PEAR/PackageFile.php')) {
+ if (!class_exists('PEAR_PackageFile')) {
require_once 'PEAR/PackageFile.php';
}
$a = &new PEAR_PackageFile($config, $debug, $tmpdir);
@@ -12385,7 +12501,7 @@ used for automated conversion or learning the format.
}
?>
-
+
<pickle>
<summary>Build PECL Package</summary>
<function>doPackage</function>
@@ -12424,7 +12540,7 @@ will cause pickle to fail, and output an error message. If your package2.xml
uses any of these features, you are best off using PEAR_PackageFileManager to
generate both package.xml.</doc>
</pickle>
-</commands>
+</commands>
/**
* PEAR_Command_Pickle (pickle command)
*
@@ -12439,9 +12555,9 @@ generate both package.xml.</doc>
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 2005-2006 The PHP Group
+ * @copyright 2005-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Pickle.php,v 1.6 2006/05/12 02:38:58 cellog Exp $
+ * @version CVS: $Id: Pickle.php,v 1.8 2008/01/29 03:21:01 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.1
*/
@@ -12457,9 +12573,9 @@ require_once 'PEAR/Command/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 2005-2006 The PHP Group
+ * @copyright 2005-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.1
*/
@@ -12541,7 +12657,7 @@ generate both package.xml.
if (!class_exists('PEAR_Common')) {
require_once 'PEAR/Common.php';
}
- if (!class_exists('PEAR/PackageFile.php')) {
+ if (!class_exists('PEAR_PackageFile')) {
require_once 'PEAR/PackageFile.php';
}
$a = &new PEAR_PackageFile($config, $debug, $tmpdir);
@@ -12800,7 +12916,7 @@ generate both package.xml.
}
?>
-
+
<list>
<summary>List Installed Packages In The Default Channel</summary>
<function>doList</function>
@@ -12857,7 +12973,7 @@ Displays information about a package. The package argument may be a
local package file, an URL to a package file, or the name of an
installed package.</doc>
</info>
-</commands>
+</commands>
/**
* PEAR_Command_Registry (list, list-files, shell-test, info commands)
*
@@ -12873,9 +12989,9 @@ installed package.</doc>
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Registry.php,v 1.79 2007/05/29 16:38:16 cellog Exp $
+ * @version CVS: $Id: Registry.php,v 1.81 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -12892,9 +13008,9 @@ require_once 'PEAR/Command/Common.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -13039,6 +13155,10 @@ installed package.'
$data['headline'] = array('Channel', 'Package', 'Version', 'State');
}
+ if (count($installed) && !isset($data['data'])) {
+ $data['data'] = array();
+ }
+
foreach ($installed as $package) {
$pobj = $reg->getPackage(isset($package['package']) ?
$package['package'] : $package['name'], $channel);
@@ -13923,7 +14043,7 @@ installed package.'
}
?>
-
+
<remote-info>
<summary>Information About Remote Packages</summary>
<function>doRemoteInfo</function>
@@ -14030,7 +14150,7 @@ Clear the XML-RPC/REST cache. See also the cache_ttl configuration
parameter.
</doc>
</clear-cache>
-</commands>
+</commands>
/**
* PEAR_Command_Remote (remote-info, list-upgrades, remote-list, search, list-all, download,
* clear-cache commands)
@@ -14047,9 +14167,9 @@ parameter.
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Remote.php,v 1.105 2007/06/22 13:49:30 cellog Exp $
+ * @version CVS: $Id: Remote.php,v 1.106 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -14067,9 +14187,9 @@ require_once 'PEAR/REST.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -14842,7 +14962,7 @@ parameter.
}
?>
-
+
<run-tests>
<summary>Run Regression Tests</summary>
<function>doRunTests</function>
@@ -14895,7 +15015,7 @@ If none is found, all .phpt tests will be tried instead.</doc>
<doc>[testfile|dir ...]
Run regression tests with PHP&apos;s regression testing script (run-tests.php).</doc>
</run-tests>
-</commands>
+</commands>
/**
* PEAR_Command_Test (run-tests)
*
@@ -14912,9 +15032,9 @@ Run regression tests with PHP&apos;s regression testing script (run-tests.php).<
* @author Stig Bakken <ssb@php.net>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Test.php,v 1.23 2007/06/13 17:46:36 cellog Exp $
+ * @version CVS: $Id: Test.php,v 1.27 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -14932,9 +15052,9 @@ require_once 'PEAR/Command/Common.php';
* @author Stig Bakken <ssb@php.net>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -15040,7 +15160,7 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
if (PEAR::isError($pname)) {
return $this->raiseError($pname);
}
-
+
$package = &$reg->getPackage($pname['package'], $pname['channel']);
if (!$package) {
return PEAR::raiseError('Unknown package "' .
@@ -15054,8 +15174,8 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
}
if (isset($options['phpunit']) && preg_match('/AllTests\.php\\z/i', $name)) {
- $params = array($atts['installed_as']);
- break;
+ $params[] = $atts['installed_as'];
+ continue;
} elseif (!preg_match('/\.phpt\\z/', $name)) {
continue;
}
@@ -15071,34 +15191,49 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
'-maxdepth', $depth,
'-name', 'AllTests.php'));
if (count($dir)) {
- $tests = $dir;
- break;
+ foreach ($dir as $p) {
+ $p = realpath($p);
+ if (!count($tests) ||
+ (count($tests) && strlen($p) < strlen($tests[0]))) {
+ // this is in a higher-level directory, use this one instead.
+ $tests = array($p);
+ }
+ }
}
+ continue;
}
$dir = System::find(array($p, '-type', 'f',
'-maxdepth', $depth,
'-name', '*.phpt'));
$tests = array_merge($tests, $dir);
} else {
- if (isset($options['phpunit']) && preg_match('/AllTests\.php\\z/i', $p)) {
- $tests = array($p);
- break;
+ if (isset($options['phpunit'])) {
+ if (preg_match('/AllTests\.php\\z/i', $p)) {
+ $p = realpath($p);
+ if (!count($tests) ||
+ (count($tests) && strlen($p) < strlen($tests[0]))) {
+ // this is in a higher-level directory, use this one instead.
+ $tests = array($p);
+ }
+ }
+ continue;
}
- if (!file_exists($p)) {
- if (!preg_match('/\.phpt\\z/', $p)) {
- $p .= '.phpt';
- }
- $dir = System::find(array(dirname($p), '-type', 'f',
- '-maxdepth', $depth,
- '-name', $p));
- $tests = array_merge($tests, $dir);
- } else {
+ if (file_exists($p) && preg_match('/\.phpt$/', $p)) {
$tests[] = $p;
+ continue;
+ }
+
+ if (!preg_match('/\.phpt\\z/', $p)) {
+ $p .= '.phpt';
}
+ $dir = System::find(array(dirname($p), '-type', 'f',
+ '-maxdepth', $depth,
+ '-name', $p));
+ $tests = array_merge($tests, $dir);
}
}
-
+
$ini_settings = '';
if (isset($options['ini'])) {
$ini_settings .= $options['ini'];
@@ -15118,7 +15253,7 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
if (isset($options['realtimelog']) && file_exists('run-tests.log')) {
unlink('run-tests.log');
}
-
+
if (isset($options['tapoutput'])) {
$tap = '1..' . $tests_count . "\n";
}
@@ -15153,12 +15288,12 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
$this->ui->log($result->getMessage());
continue;
}
-
+
if (isset($options['tapoutput'])) {
$tap .= $result[0] . ' ' . $i . $result[1] . "\n";
continue;
}
-
+
if (isset($options['realtimelog'])) {
$fp = @fopen('run-tests.log', 'a');
if ($fp) {
@@ -15224,7 +15359,7 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
return true;
}
// }}}
-}
+}
/**
* PEAR_Downloader_Package
*
@@ -15239,9 +15374,9 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Package.php,v 1.110 2007/05/31 03:51:08 cellog Exp $
+ * @version CVS: $Id: Package.php,v 1.112 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -15278,9 +15413,9 @@ define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004);
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -16693,7 +16828,7 @@ class PEAR_Downloader_Package
}
$this->_downloader->log(3, 'Downloading "' . $param . '"');
$file = $this->_downloader->downloadHttp($param, $this->_downloader->ui,
- $dir, $callback);
+ $dir, $callback, null, false, $this->getChannel());
$this->_downloader->popErrorHandling();
if (PEAR::isError($file)) {
if (!empty($saveparam)) {
@@ -17075,7 +17210,7 @@ class PEAR_Downloader_Package
}
}
?>
-
+
/**
* PEAR_Frontend_CLI
*
@@ -17091,9 +17226,9 @@ class PEAR_Downloader_Package
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: CLI.php,v 1.67 2007/03/14 13:42:24 timj Exp $
+ * @version CVS: $Id: CLI.php,v 1.68 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -17108,9 +17243,9 @@ require_once 'PEAR/Frontend.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -17869,7 +18004,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
}
?>
-
+
/**
* Base class for all installation roles.
*
@@ -17901,7 +18036,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -18048,7 +18183,110 @@ class PEAR_Installer_Role_Common
return $roleInfo['phpextension'];
}
}
-?>
+?>
+ <releasetypes>php</releasetypes>
+ <releasetypes>extsrc</releasetypes>
+ <releasetypes>extbin</releasetypes>
+ <releasetypes>zendextsrc</releasetypes>
+ <releasetypes>zendextbin</releasetypes>
+ <installable>1</installable>
+ <locationconfig>cfg_dir</locationconfig>
+ <honorsbaseinstall />
+ <unusualbaseinstall>1</unusualbaseinstall>
+ <phpfile />
+ <executable />
+ <phpextension />
+ <config_vars />
+</role>
+/**
+ * PEAR_Installer_Role_Cfg
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt. If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 2007-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version CVS: $Id: Cfg.php,v 1.4 2008/01/03 20:26:36 cellog Exp $
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.7.0
+ */
+
+/**
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 2007-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version Release: 1.7.1
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.7.0
+ */
+class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
+{
+ var $installer;
+ /**
+ * Do any unusual setup here
+ * @param PEAR_Installer
+ * @param PEAR_PackageFile_v2
+ * @param array file attributes
+ * @param string file name
+ */
+ function setup(&$installer, $pkg, $atts, $file)
+ {
+ $this->installer = &$installer;
+ }
+
+ function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null)
+ {
+ $test = parent::processInstallation($pkg, $atts, $file, $tmp_path, $layer);
+ if (@file_exists($test[2])) {
+ // configuration has already been installed, check for mods
+ if (md5_file($test[2]) !== md5_file($test[3])) {
+ // configuration has been modified, so save our version as
+ // configfile-version
+ $old = $test[2];
+ $test[2] .= '.new-' . $pkg->getVersion();
+ // backup original and re-install it
+ PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
+ $tmpcfg = $this->config->get('temp_dir');
+ $newloc = System::mkdir(array('-p', $tmpcfg));
+ if (!$newloc) {
+ // try temp_dir
+ $newloc = System::mktemp(array('-d'));
+ if (!$newloc || PEAR::isError($newloc)) {
+ PEAR::popErrorHandling();
+ return PEAR::raiseError('Could not save existing configuration file '.
+ $old . ', unable to install. Please set temp_dir ' .
+ 'configuration variable to a writeable location and try again');
+ }
+ } else {
+ $newloc = $tmpcfg;
+ }
+ if (!@copy($old, $newloc . DIRECTORY_SEPARATOR . 'savefile')) {
+ PEAR::popErrorHandling();
+ return PEAR::raiseError('Could not save existing configuration file '.
+ $old . ', unable to install. Please set temp_dir ' .
+ 'configuration variable to a writeable location and try again');
+ }
+ PEAR::popErrorHandling();
+ $this->installer->addFileOperation('rename',
+ array($newloc . DIRECTORY_SEPARATOR . 'savefile', $old, false
+ ));
+ $this->installer->addFileOperation('delete', array($newloc . DIRECTORY_SEPARATOR . 'savefile'));
+ }
+ }
+ return $test;
+ }
+}
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -18062,7 +18300,7 @@ class PEAR_Installer_Role_Common
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Data
*
@@ -18077,9 +18315,9 @@ class PEAR_Installer_Role_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Data.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Data.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18088,14 +18326,14 @@ class PEAR_Installer_Role_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -18109,7 +18347,7 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Doc
*
@@ -18124,9 +18362,9 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Doc.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Doc.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18135,14 +18373,14 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>extbin</releasetypes>
<releasetypes>zendextbin</releasetypes>
<installable>1</installable>
@@ -18153,7 +18391,7 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
<executable />
<phpextension>1</phpextension>
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Ext
*
@@ -18168,9 +18406,9 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Ext.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Ext.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18179,14 +18417,14 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -18200,7 +18438,7 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Php
*
@@ -18215,9 +18453,9 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Php.php,v 1.7 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Php.php,v 1.8 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18226,14 +18464,14 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -18247,7 +18485,7 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
<executable>1</executable>
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Script
*
@@ -18262,9 +18500,9 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Script.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Script.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18273,25 +18511,25 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>extsrc</releasetypes>
<releasetypes>zendextsrc</releasetypes>
- <installable />
- <locationconfig />
+ <installable>1</installable>
+ <locationconfig>temp_dir</locationconfig>
<honorsbaseinstall />
<unusualbaseinstall />
<phpfile />
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Src
*
@@ -18306,9 +18544,9 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Src.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Src.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18317,9 +18555,9 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -18330,7 +18568,7 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
$installer->source_files++;
}
}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -18344,7 +18582,7 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Test
*
@@ -18359,9 +18597,9 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Test.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Test.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18370,14 +18608,61 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
-?>
+?>
+ <releasetypes>php</releasetypes>
+ <releasetypes>extsrc</releasetypes>
+ <releasetypes>extbin</releasetypes>
+ <releasetypes>zendextsrc</releasetypes>
+ <releasetypes>zendextbin</releasetypes>
+ <installable>1</installable>
+ <locationconfig>www_dir</locationconfig>
+ <honorsbaseinstall>1</honorsbaseinstall>
+ <unusualbaseinstall />
+ <phpfile />
+ <executable />
+ <phpextension />
+ <config_vars />
+</role>
+/**
+ * PEAR_Installer_Role_Www
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt. If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 2007-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version CVS: $Id: Www.php,v 1.2 2008/01/03 20:26:36 cellog Exp $
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.7.0
+ */
+
+/**
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 2007-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version Release: 1.7.1
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.7.0
+ */
+class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {}
+?>
/**
* PEAR_Installer_Role
*
@@ -18392,9 +18677,9 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Role.php,v 1.16 2006/10/31 02:54:41 cellog Exp $
+ * @version CVS: $Id: Role.php,v 1.20 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18408,9 +18693,9 @@ require_once 'PEAR/XMLParser.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -18433,7 +18718,7 @@ class PEAR_Installer_Role
if (!$info['config_vars']) {
continue;
}
- $config->_addConfigVars($info['config_vars']);
+ $config->_addConfigVars($class, $info['config_vars']);
}
}
@@ -18598,11 +18883,11 @@ class PEAR_Installer_Role
$dir = dirname(__FILE__) . '/Role';
}
if (!file_exists($dir) || !is_dir($dir)) {
- return PEAR::raiseError("registerRoles: opendir($dir) failed");
+ return PEAR::raiseError("registerRoles: opendir($dir) failed: does not exist/is not directory");
}
$dp = @opendir($dir);
if (empty($dp)) {
- return PEAR::raiseError("registerRoles: opendir($dir) failed");
+ return PEAR::raiseError("registerRoles: opendir($dir) failed: $php_errmsg");
}
while ($entry = readdir($dp)) {
if ($entry{0} == '.' || substr($entry, -4) != '.xml') {
@@ -18630,7 +18915,7 @@ class PEAR_Installer_Role
}
}
?>
-
+
/**
* package.xml generation class, package.xml version 1.0
*
@@ -18645,9 +18930,9 @@ class PEAR_Installer_Role
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v1.php,v 1.72 2006/05/10 02:56:19 cellog Exp $
+ * @version CVS: $Id: v1.php,v 1.74 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -18665,9 +18950,9 @@ require_once 'PEAR/PackageFile/v2.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -18684,7 +18969,7 @@ class PEAR_PackageFile_Generator_v1
function getPackagerVersion()
{
- return '1.6.1';
+ return '1.7.1';
}
/**
@@ -18838,7 +19123,7 @@ class PEAR_PackageFile_Generator_v1
);
$ret = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
$ret .= "<!DOCTYPE package SYSTEM \"http://pear.php.net/dtd/package-1.0\">\n";
- $ret .= "<package version=\"1.0\" packagerversion=\"1.6.1\">\n" .
+ $ret .= "<package version=\"1.0\" packagerversion=\"1.7.1\">\n" .
" <name>$pkginfo[package]</name>";
if (isset($pkginfo['extends'])) {
$ret .= "\n<extends>$pkginfo[extends]</extends>";
@@ -19332,7 +19617,7 @@ class PEAR_PackageFile_Generator_v1
$peardep = array('pearinstaller' =>
array('min' => '1.4.0b1')); // this is a lot safer
$required = $optional = array();
- $release['dependencies'] = array();
+ $release['dependencies'] = array('required' => array());
if ($this->_packagefile->hasDeps()) {
foreach ($this->_packagefile->getDeps() as $dep) {
if (!isset($dep['optional']) || $dep['optional'] == 'no') {
@@ -19901,7 +20186,7 @@ class PEAR_PackageFile_Generator_v1
return $ret;
}
}
-?>
+?>
/**
* package.xml generation class, package.xml version 2.0
*
@@ -19917,9 +20202,9 @@ class PEAR_PackageFile_Generator_v1
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Stephan Schmidt (original XML_Serializer code)
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v2.php,v 1.37 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: v2.php,v 1.38 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19936,9 +20221,9 @@ require_once 'System.php';
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Stephan Schmidt (original XML_Serializer code)
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -20017,7 +20302,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
*/
function getPackagerVersion()
{
- return '1.6.1';
+ return '1.7.1';
}
/**
@@ -20257,7 +20542,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
}
$this->options['beautifyFilelist'] = true;
}
- $arr['attribs']['packagerversion'] = '1.6.1';
+ $arr['attribs']['packagerversion'] = '1.7.1';
if ($this->serialize($arr, $options)) {
return $this->_serializedData . "\n";
}
@@ -20776,7 +21061,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
// | Authors: Stephan Schmidt <schst@php-tools.net> |
// +----------------------------------------------------------------------+
//
-// $Id: v2.php,v 1.37 2007/06/10 04:16:51 cellog Exp $
+// $Id: v2.php,v 1.38 2008/01/03 20:26:37 cellog Exp $
/**
* error code for invalid chars in XML name
@@ -21429,7 +21714,7 @@ class PEAR_PackageFile_Generator_v2_XML_Util {
return PEAR::raiseError($msg, $code);
}
}
-?>
+?>
/**
* package.xml parsing class, package.xml version 1.0
*
@@ -21444,9 +21729,9 @@ class PEAR_PackageFile_Generator_v2_XML_Util {
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v1.php,v 1.22 2006/03/27 05:25:48 cellog Exp $
+ * @version CVS: $Id: v1.php,v 1.27 2008/01/03 20:55:16 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21459,7 +21744,7 @@ require_once 'PEAR/PackageFile/v1.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @PEAR-VER@
* @link http://pear.php.net/package/PEAR
@@ -21497,14 +21782,15 @@ class PEAR_PackageFile_Parser_v1
* @param string contents of package.xml file, version 1.0
* @return bool success of parsing
*/
- function parse($data, $file, $archive = false)
+ function &parse($data, $file, $archive = false)
{
if (!extension_loaded('xml')) {
return PEAR::raiseError('Cannot create xml parser for parsing package.xml, no xml extension');
}
$xp = xml_parser_create();
if (!$xp) {
- return PEAR::raiseError('Cannot create xml parser for parsing package.xml');
+ $a = &PEAR::raiseError('Cannot create xml parser for parsing package.xml');
+ return $a;
}
xml_set_object($xp, $this);
xml_set_element_handler($xp, '_element_start_1_0', '_element_end_1_0');
@@ -21527,8 +21813,9 @@ class PEAR_PackageFile_Parser_v1
$code = xml_get_error_code($xp);
$line = xml_get_current_line_number($xp);
xml_parser_free($xp);
- return PEAR::raiseError(sprintf("XML error: %s at line %d",
+ $a = &PEAR::raiseError(sprintf("XML error: %s at line %d",
$str = xml_error_string($code), $line), 2);
+ return $a;
}
xml_parser_free($xp);
@@ -21563,6 +21850,8 @@ class PEAR_PackageFile_Parser_v1
foreach (explode("\n", $str) as $line) {
if (substr($line, 0, $indent_len) == $indent) {
$data .= substr($line, $indent_len) . "\n";
+ } elseif (trim(substr($line, 0, $indent_len))) {
+ $data .= ltrim($line);
}
}
return $data;
@@ -21598,7 +21887,7 @@ class PEAR_PackageFile_Parser_v1
if (array_key_exists('name', $attribs) && $attribs['name'] != '/') {
$attribs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
$attribs['name']);
- if (strrpos($attribs['name'], '/') == strlen($attribs['name']) - 1) {
+ if (strrpos($attribs['name'], '/') === strlen($attribs['name']) - 1) {
$attribs['name'] = substr($attribs['name'], 0,
strlen($attribs['name']) - 1);
}
@@ -21889,7 +22178,7 @@ class PEAR_PackageFile_Parser_v1
// }}}
}
-?>
+?>
/**
* package.xml parsing class, package.xml version 2.0
*
@@ -21904,9 +22193,9 @@ class PEAR_PackageFile_Parser_v1
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v2.php,v 1.20 2007/06/16 19:13:24 cellog Exp $
+ * @version CVS: $Id: v2.php,v 1.21 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21920,7 +22209,7 @@ require_once 'PEAR/PackageFile/v2.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @PEAR-VER@
* @link http://pear.php.net/package/PEAR
@@ -22005,7 +22294,7 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
return $ret;
}
}
-?>
+?>
/**
* PEAR_PackageFile_v2, package.xml version 2.0, read/write version
*
@@ -22020,9 +22309,9 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.20 2007/04/04 03:28:16 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.22 2008/01/18 22:47:49 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a8
*/
@@ -22034,9 +22323,9 @@ require_once 'PEAR/PackageFile/v2.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a8
*/
@@ -23374,7 +23663,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
}
$opt = array('attribs' => array('name' => $name, 'prompt' => $prompt));
if ($default !== null) {
- $opt['default'] = $default;
+ $opt['attribs']['default'] = $default;
}
$this->_isValid = 0;
$r = $this->_mergeTag($r, $opt,
@@ -23607,30 +23896,38 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
unset($this->_packageInfo['changelog']);
}
}
-?>
-//
-// +----------------------------------------------------------------------+
-// | PHP Version 5 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available through the world-wide-web at the following url: |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Author: Greg Beaver <cellog@php.net> |
-// | |
-// +----------------------------------------------------------------------+
-//
-// $Id: Validator.php,v 1.102 2007/06/10 04:16:51 cellog Exp $
+?>
+/**
+ * PEAR_PackageFile_v2, package.xml version 2.0, read/write version
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt. If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version CVS: $Id: Validator.php,v 1.103 2008/01/03 20:26:37 cellog Exp $
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a8
+ */
/**
* Private validation class used by PEAR_PackageFile_v2 - do not use directly, its
* sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller
- * @author Greg Beaver <cellog@php.net>
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version Release: 1.7.1
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a8
* @access private
*/
class PEAR_PackageFile_v2_Validator
@@ -23718,7 +24015,7 @@ class PEAR_PackageFile_v2_Validator
isset($test['dependencies']['required']) &&
isset($test['dependencies']['required']['pearinstaller']) &&
isset($test['dependencies']['required']['pearinstaller']['min']) &&
- version_compare('1.6.1',
+ version_compare('1.7.1',
$test['dependencies']['required']['pearinstaller']['min'], '<')) {
$this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
return false;
@@ -24955,7 +25252,7 @@ class PEAR_PackageFile_v2_Validator
$this->_stack->push(__FUNCTION__, 'error',
array('version' => $version),
'This package.xml requires PEAR version %version% to parse properly, we are ' .
- 'version 1.6.1');
+ 'version 1.7.1');
}
function _invalidTagOrder($oktags, $actual, $root)
@@ -25707,7 +26004,7 @@ class PEAR_PackageFile_v2_Validator
return $providesret;
}
}
-?>
+?>
/**
* PEAR_PackageFile_v1, package.xml version 1.0
*
@@ -25722,9 +26019,9 @@ class PEAR_PackageFile_v2_Validator
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v1.php,v 1.73 2007/05/10 00:00:38 cellog Exp $
+ * @version CVS: $Id: v1.php,v 1.74 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -25988,9 +26285,9 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME', 52);
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -27325,7 +27622,7 @@ class PEAR_PackageFile_v1
// }}}
}
?>
-
+
/**
* PEAR_PackageFile_v2, package.xml version 2.0
*
@@ -27340,9 +27637,9 @@ class PEAR_PackageFile_v1
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v2.php,v 1.140 2007/06/03 04:22:13 cellog Exp $
+ * @version CVS: $Id: v2.php,v 1.141 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -27354,9 +27651,9 @@ require_once 'PEAR/ErrorStack.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -29367,7 +29664,7 @@ class PEAR_PackageFile_v2
}
}
?>
-
+
/**
* PEAR_REST_10
*
@@ -29382,9 +29679,9 @@ class PEAR_PackageFile_v2
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: 10.php,v 1.48 2007/06/01 23:41:34 cellog Exp $
+ * @version CVS: $Id: 10.php,v 1.52 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -29400,9 +29697,9 @@ require_once 'PEAR/REST.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a12
*/
@@ -29442,13 +29739,8 @@ class PEAR_REST_10
if (!$states) {
return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
}
- $state = $version = null;
- if (isset($packageinfo['state'])) {
- $state = $packageinfo['state'];
- }
- if (isset($packageinfo['version'])) {
- $version = $packageinfo['version'];
- }
+ $state = isset($packageinfo['state']) ? $packageinfo['state'] : null;
+ $version = isset($packageinfo['version']) ? $packageinfo['version'] : null;
$info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . '/allreleases.xml');
if (PEAR::isError($info)) {
return PEAR::raiseError('No releases available for package "' .
@@ -29457,8 +29749,7 @@ class PEAR_REST_10
if (!isset($info['r'])) {
return false;
}
- $found = false;
- $release = false;
+ $release = $found = false;
if (!is_array($info['r']) || !isset($info['r'][0])) {
$info['r'] = array($info['r']);
}
@@ -29503,13 +29794,8 @@ class PEAR_REST_10
if (!$states) {
return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
}
- $state = $version = null;
- if (isset($packageinfo['state'])) {
- $state = $packageinfo['state'];
- }
- if (isset($packageinfo['version'])) {
- $version = $packageinfo['version'];
- }
+ $state = isset($dependency['state']) ? $dependency['state'] : null;
+ $version = isset($dependency['version']) ? $dependency['version'] : null;
$info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . '/allreleases.xml');
if (PEAR::isError($info)) {
return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package']
@@ -29521,8 +29807,6 @@ class PEAR_REST_10
$exclude = array();
$min = $max = $recommended = false;
if ($xsdversion == '1.0') {
- $pinfo['package'] = $dependency['name'];
- $pinfo['channel'] = 'pear.php.net'; // this is always true - don't change this
switch ($dependency['rel']) {
case 'ge' :
$min = $dependency['version'];
@@ -29546,7 +29830,6 @@ class PEAR_REST_10
break;
}
} else {
- $pinfo['package'] = $dependency['name'];
$min = isset($dependency['min']) ? $dependency['min'] : false;
$max = isset($dependency['max']) ? $dependency['max'] : false;
$recommended = isset($dependency['recommended']) ?
@@ -29557,8 +29840,7 @@ class PEAR_REST_10
}
}
}
- $found = false;
- $release = false;
+ $release = $found = false;
if (!is_array($info['r']) || !isset($info['r'][0])) {
$info['r'] = array($info['r']);
}
@@ -30178,7 +30460,7 @@ class PEAR_REST_10
return array_slice($states, $i + 1);
}
}
-?>
+?>
/**
* PEAR_REST_11 - implement faster list-all/remote-list command
*
@@ -30193,9 +30475,9 @@ class PEAR_REST_10
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: 11.php,v 1.12 2007/06/19 04:31:49 cellog Exp $
+ * @version CVS: $Id: 11.php,v 1.13 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.3
*/
@@ -30211,9 +30493,9 @@ require_once 'PEAR/REST.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.3
*/
@@ -30494,7 +30776,7 @@ class PEAR_REST_11
return array_slice($states, $i + 1);
}
}
-?>
+?>
/**
* PEAR_REST_13
*
@@ -30509,9 +30791,9 @@ class PEAR_REST_11
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: 13.php,v 1.2 2007/05/31 03:51:08 cellog Exp $
+ * @version CVS: $Id: 13.php,v 1.5 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -30528,9 +30810,9 @@ require_once 'PEAR/REST/10.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a12
*/
@@ -30562,13 +30844,8 @@ class PEAR_REST_13 extends PEAR_REST_10
if (!$states) {
return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
}
- $state = $version = null;
- if (isset($packageinfo['state'])) {
- $state = $packageinfo['state'];
- }
- if (isset($packageinfo['version'])) {
- $version = $packageinfo['version'];
- }
+ $state = isset($packageinfo['state']) ? $packageinfo['state'] : null;
+ $version = isset($packageinfo['version']) ? $packageinfo['version'] : null;
$info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
'/allreleases2.xml');
if (PEAR::isError($info)) {
@@ -30578,8 +30855,7 @@ class PEAR_REST_13 extends PEAR_REST_10
if (!isset($info['r'])) {
return false;
}
- $found = false;
- $release = false;
+ $release = $found = false;
if (!is_array($info['r']) || !isset($info['r'][0])) {
$info['r'] = array($info['r']);
}
@@ -30650,13 +30926,8 @@ class PEAR_REST_13 extends PEAR_REST_10
if (!$states) {
return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
}
- $state = $version = null;
- if (isset($packageinfo['state'])) {
- $state = $packageinfo['state'];
- }
- if (isset($packageinfo['version'])) {
- $version = $packageinfo['version'];
- }
+ $state = isset($dependency['state']) ? $dependency['state'] : null;
+ $version = isset($dependency['version']) ? $dependency['version'] : null;
$info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
'/allreleases2.xml');
if (PEAR::isError($info)) {
@@ -30784,7 +31055,7 @@ class PEAR_REST_13 extends PEAR_REST_10
return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp);
}
}
-?>
+?>
/**
* <tasks:postinstallscript> - read/write version
*
@@ -30799,9 +31070,9 @@ class PEAR_REST_13 extends PEAR_REST_10
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.11 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.12 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -30814,9 +31085,9 @@ require_once 'PEAR/Task/Postinstallscript.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -30959,7 +31230,7 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
);
}
}
-?>
+?>
/**
* <tasks:replace> - read/write version
*
@@ -30974,9 +31245,9 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.3 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.4 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -30989,9 +31260,9 @@ require_once 'PEAR/Task/Replace.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -31025,7 +31296,7 @@ class PEAR_Task_Replace_rw extends PEAR_Task_Replace
return $this->_params;
}
}
-?>
+?>
/**
* <tasks:unixeol> - read/write version
*
@@ -31040,9 +31311,9 @@ class PEAR_Task_Replace_rw extends PEAR_Task_Replace
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.4 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.5 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -31055,9 +31326,9 @@ require_once 'PEAR/Task/Unixeol.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -31086,7 +31357,7 @@ class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
return '';
}
}
-?>
+?>
/**
* <tasks:windowseol> - read/write version
*
@@ -31101,9 +31372,9 @@ class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.4 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.5 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -31116,9 +31387,9 @@ require_once 'PEAR/Task/Windowseol.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -31147,7 +31418,7 @@ class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
return '';
}
}
-?>
+?>
/**
* PEAR_Task_Common, base class for installer tasks
*
@@ -31162,9 +31433,9 @@ class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Common.php,v 1.16 2006/11/12 05:02:41 cellog Exp $
+ * @version CVS: $Id: Common.php,v 1.17 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -31200,9 +31471,9 @@ define('PEAR_TASK_PACKAGEANDINSTALL', 3);
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
* @abstract
@@ -31354,7 +31625,7 @@ class PEAR_Task_Common
return PEAR::raiseError($msg, $code);
}
}
-?>
+?>
/**
* <tasks:postinstallscript>
*
@@ -31369,9 +31640,9 @@ class PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Postinstallscript.php,v 1.18 2006/02/08 01:21:47 cellog Exp $
+ * @version CVS: $Id: Postinstallscript.php,v 1.19 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -31387,9 +31658,9 @@ require_once 'PEAR/Task/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -31682,7 +31953,7 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
{
}
}
-?>
+?>
/**
* <tasks:replace>
*
@@ -31697,9 +31968,9 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Replace.php,v 1.15 2006/03/02 18:14:13 cellog Exp $
+ * @version CVS: $Id: Replace.php,v 1.16 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -31712,9 +31983,9 @@ require_once 'PEAR/Task/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -31863,7 +32134,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
return $contents;
}
}
-?>
+?>
/**
* <tasks:unixeol>
*
@@ -31878,9 +32149,9 @@ class PEAR_Task_Replace extends PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Unixeol.php,v 1.8 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Unixeol.php,v 1.9 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -31893,9 +32164,9 @@ require_once 'PEAR/Task/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -31945,7 +32216,7 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents);
}
}
-?>
+?>
/**
* <tasks:windowseol>
*
@@ -31960,9 +32231,9 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Windowseol.php,v 1.7 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Windowseol.php,v 1.8 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -31975,9 +32246,9 @@ require_once 'PEAR/Task/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -32027,7 +32298,7 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents);
}
}
-?>
+?>
/**
* Channel Validator for the pecl.php.net channel
*
@@ -32038,7 +32309,7 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: PECL.php,v 1.8 2006/05/12 02:38:58 cellog Exp $
+ * @version CVS: $Id: PECL.php,v 1.9 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a5
*/
@@ -32051,9 +32322,9 @@ require_once 'PEAR/Validate.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a5
*/
@@ -32089,7 +32360,7 @@ class PEAR_Validator_PECL extends PEAR_Validate
return $ret;
}
}
-?>
+?>
/**
* Class auto-loader
*
@@ -32104,9 +32375,9 @@ class PEAR_Validator_PECL extends PEAR_Validate
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Autoloader.php,v 1.13 2006/01/06 04:47:36 cellog Exp $
+ * @version CVS: $Id: Autoloader.php,v 1.14 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
* @since File available since Release 0.1
* @deprecated File deprecated in Release 1.4.0a1
@@ -32139,9 +32410,9 @@ require_once "PEAR.php";
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
* @since File available since Release 0.1
* @deprecated File deprecated in Release 1.4.0a1
@@ -32312,7 +32583,7 @@ class PEAR_Autoloader extends PEAR
overload("PEAR_Autoloader");
?>
-
+
/**
* PEAR_Builder for building PHP extensions (PECL packages)
*
@@ -32328,9 +32599,9 @@ overload("PEAR_Autoloader");
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Builder.php,v 1.31 2007/01/10 05:32:51 cellog Exp $
+ * @version CVS: $Id: Builder.php,v 1.33 2008/01/17 05:48:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*
@@ -32350,9 +32621,9 @@ require_once 'PEAR/PackageFile.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since PHP 4.0.2
* @see http://pear.php.net/manual/en/core.ppm.pear-builder.php
@@ -32584,14 +32855,21 @@ class PEAR_Builder extends PEAR_Common
if (is_object($descfile)) {
$pkg = $descfile;
$descfile = $pkg->getPackageFile();
+ if (is_a($pkg, 'PEAR_PackageFile_v1')) {
+ $dir = dirname($descfile);
+ } else {
+ $dir = $pkg->_config->get('temp_dir') . '/' . $pkg->getName();
+ // automatically delete at session end
+ $this->addTempFile($dir);
+ }
} else {
$pf = &new PEAR_PackageFile($this->config);
$pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($pkg)) {
return $pkg;
}
+ $dir = dirname($descfile);
}
- $dir = dirname($descfile);
$old_cwd = getcwd();
if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) {
return $this->raiseError("could not chdir to $dir");
@@ -32665,7 +32943,7 @@ class PEAR_Builder extends PEAR_Common
if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) {
return $this->raiseError("could not chdir to $build_dir");
}
- putenv('PHP_PEAR_VERSION=1.6.1');
+ putenv('PHP_PEAR_VERSION=1.7.1');
foreach ($to_run as $cmd) {
$err = $this->_runCommand($cmd, $callback);
if (PEAR::isError($err)) {
@@ -32791,7 +33069,7 @@ class PEAR_Builder extends PEAR_Common
}
?>
-
+
/**
* PEAR_ChannelFile, the channel handling class
*
@@ -32806,9 +33084,9 @@ class PEAR_Builder extends PEAR_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: ChannelFile.php,v 1.79 2007/05/19 23:46:06 cellog Exp $
+ * @version CVS: $Id: ChannelFile.php,v 1.80 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -32943,9 +33221,9 @@ $GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server');
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -34406,7 +34684,7 @@ class PEAR_ChannelFile {
}
}
?>
-
+
/**
* PEAR_Command, command pattern class
*
@@ -34422,9 +34700,9 @@ class PEAR_ChannelFile {
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Command.php,v 1.38 2006/10/31 02:54:40 cellog Exp $
+ * @version CVS: $Id: Command.php,v 1.39 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -34506,9 +34784,9 @@ $GLOBALS['_PEAR_Command_objects'] = array();
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -34822,7 +35100,7 @@ class PEAR_Command
}
?>
-
+
/**
* PEAR_Common, the base class for the PEAR Installer
*
@@ -34839,9 +35117,9 @@ class PEAR_Command
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Common.php,v 1.159 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: Common.php,v 1.160 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1.0
* @deprecated File deprecated since Release 1.4.0a1
@@ -34950,9 +35228,9 @@ $GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'p
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
* @deprecated This class will disappear, and its components will be spread
@@ -35947,7 +36225,7 @@ class PEAR_Common extends PEAR
}
require_once 'PEAR/Config.php';
require_once 'PEAR/PackageFile.php';
-?>
+?>
/**
* PEAR_Config, customized configuration handling for the PEAR Installer
*
@@ -35963,9 +36241,9 @@ require_once 'PEAR/PackageFile.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Config.php,v 1.137 2006/11/19 21:33:00 cellog Exp $
+ * @version CVS: $Id: Config.php,v 1.144 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -36080,6 +36358,22 @@ if (getenv('PHP_PEAR_DATA_DIR')) {
$PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data');
}
+// Default for cfg_dir
+if (getenv('PHP_PEAR_CFG_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_CFG_DIR', getenv('PHP_PEAR_CFG_DIR'));
+} else {
+ define('PEAR_CONFIG_DEFAULT_CFG_DIR',
+ $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'cfg');
+}
+
+// Default for www_dir
+if (getenv('PHP_PEAR_WWW_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_WWW_DIR', getenv('PHP_PEAR_WWW_DIR'));
+} else {
+ define('PEAR_CONFIG_DEFAULT_WWW_DIR',
+ $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www');
+}
+
// Default for test_dir
if (getenv('PHP_PEAR_TEST_DIR')) {
define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR'));
@@ -36182,9 +36476,9 @@ if (getenv('PHP_PEAR_SIG_KEYDIR')) {
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -36230,8 +36524,8 @@ class PEAR_Config extends PEAR
* @access private
*/
var $_channelConfigInfo = array(
- 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir',
- 'test_dir', 'php_bin', 'username', 'password', 'verbose',
+ 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir', 'cfg_dir',
+ 'test_dir', 'www_dir', 'php_bin', 'username', 'password', 'verbose',
'preferred_state', 'umask', 'preferred_mirror',
);
@@ -36366,6 +36660,20 @@ class PEAR_Config extends PEAR
'prompt' => 'PEAR data directory',
'group' => 'File Locations (Advanced)',
),
+ 'cfg_dir' => array(
+ 'type' => 'directory',
+ 'default' => PEAR_CONFIG_DEFAULT_CFG_DIR,
+ 'doc' => 'directory where modifiable configuration files are installed',
+ 'prompt' => 'PEAR configuration file directory',
+ 'group' => 'File Locations (Advanced)',
+ ),
+ 'www_dir' => array(
+ 'type' => 'directory',
+ 'default' => PEAR_CONFIG_DEFAULT_WWW_DIR,
+ 'doc' => 'directory where www frontend files (html/js) are installed',
+ 'prompt' => 'PEAR www files directory',
+ 'group' => 'File Locations (Advanced)',
+ ),
'test_dir' => array(
'type' => 'directory',
'default' => PEAR_CONFIG_DEFAULT_TEST_DIR,
@@ -36389,7 +36697,7 @@ class PEAR_Config extends PEAR
),
'download_dir' => array(
'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_CACHE_DIR,
+ 'default' => PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR,
'doc' => 'directory which is used for all downloaded files',
'prompt' => 'PEAR Installer download directory',
'group' => 'File Locations (Advanced)',
@@ -36568,6 +36876,25 @@ class PEAR_Config extends PEAR
}
// }}}
+ /**
+ * Return the default locations of user and system configuration files
+ * @static
+ */
+ function getDefaultConfigFiles()
+ {
+ $sl = DIRECTORY_SEPARATOR;
+ if (OS_WINDOWS) {
+ return array(
+ 'user' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini',
+ 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pearsys.ini'
+ );
+ } else {
+ return array(
+ 'user' => getenv('HOME') . $sl . '.pearrc',
+ 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.conf'
+ );
+ }
+ }
// {{{ singleton([file], [defaults_file])
/**
@@ -36996,12 +37323,18 @@ class PEAR_Config extends PEAR
// }}}
/**
+ * @param string Configuration class name, used for detecting duplicate calls
* @param array information on a role as parsed from its xml file
* @return true|PEAR_Error
* @access private
*/
- function _addConfigVars($vars)
+ function _addConfigVars($class, $vars)
{
+ static $called = array();
+ if (isset($called[$class])) {
+ return;
+ }
+ $called[$class] = 1;
if (count($vars) > 3) {
return $this->raiseError('Roles can only define 3 new config variables or less');
}
@@ -37387,7 +37720,7 @@ class PEAR_Config extends PEAR
}
}
}
- if (empty($this->configuration_info[$key])) {
+ if (!isset($this->configuration_info[$key])) {
return false;
}
extract($this->configuration_info[$key]);
@@ -38055,27 +38388,30 @@ class PEAR_Config extends PEAR
}
?>
-
-//
-// +----------------------------------------------------------------------+
-// | PHP Version 5 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available through the world-wide-web at the following url: |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Tomas V.V.Cox <cox@idecnet.com> |
-// | Stig Bakken <ssb@php.net> |
-// +----------------------------------------------------------------------+
-//
-// THIS FILE IS DEPRECATED IN FAVOR OF DEPENDENCY2.PHP, AND IS NOT USED IN THE INSTALLER
-// $Id: Dependency.php,v 1.42 2006/03/26 23:25:56 cellog Exp $
+
+/**
+ * PEAR_Dependency
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt. If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * THIS FILE IS DEPRECATED IN FAVOR OF DEPENDENCY2.PHP, AND IS NOT USED IN THE INSTALLER
+ *
+ * @category pear
+ * @package PEAR
+ * @author Tomas V.V.Cox <cox@idecnet.com>
+ * @author Stig Bakken <ssb@php.net>
+ * @copyright 1997-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version CVS: $Id: Dependency.php,v 1.43 2008/01/03 20:26:34 cellog Exp $
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a1
+ */
require_once "PEAR.php";
require_once "OS/Guess.php";
@@ -38550,7 +38886,7 @@ class PEAR_Dependency
// }}}
}
?>
-
+
/**
* PEAR_DependencyDB, advanced installed packages dependency database
*
@@ -38566,9 +38902,9 @@ class PEAR_Dependency
* @package PEAR
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: DependencyDB.php,v 1.35 2007/01/06 04:03:32 cellog Exp $
+ * @version CVS: $Id: DependencyDB.php,v 1.37 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -38586,9 +38922,9 @@ $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array();
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Tomas V.V.Cox <cox@idec.net.com>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -38973,9 +39309,15 @@ class PEAR_DependencyDB
return $depdb;
}
$packages = $this->_registry->listAllPackages();
+ if (PEAR::isError($packages)) {
+ return $packages;
+ }
foreach ($packages as $channel => $ps) {
foreach ($ps as $package) {
$package = $this->_registry->getPackage($package, $channel);
+ if (PEAR::isError($package)) {
+ return $package;
+ }
$this->_setPackageDeps($depdb, $package);
}
}
@@ -39256,7 +39598,7 @@ class PEAR_DependencyDB
}
}
}
-?>
+?>
/**
* PEAR_Dependency2, advanced dependency validation
*
@@ -39271,9 +39613,9 @@ class PEAR_DependencyDB
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Dependency2.php,v 1.55 2007/03/21 06:10:46 cellog Exp $
+ * @version CVS: $Id: Dependency2.php,v 1.56 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -39293,9 +39635,9 @@ require_once 'PEAR/Validate.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -39783,7 +40125,7 @@ class PEAR_Dependency2
*/
function getPEARVersion()
{
- return '1.6.1';
+ return '1.7.1';
}
function validatePearinstallerDependency($dep)
@@ -40554,7 +40896,7 @@ class PEAR_Dependency2
$this->_currentPackage, true)));
}
}
-?>
+?>
/**
* PEAR_Downloader, the PEAR Installer's download utility class
*
@@ -40572,9 +40914,9 @@ class PEAR_Dependency2
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Martin Jansen <mj@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Downloader.php,v 1.132 2007/06/11 05:30:38 cellog Exp $
+ * @version CVS: $Id: Downloader.php,v 1.137 2008/01/29 03:21:01 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.0
*/
@@ -40599,9 +40941,9 @@ define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2);
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Martin Jansen <mj@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.0
*/
@@ -40765,7 +41107,7 @@ class PEAR_Downloader extends PEAR_Common
return false;
}
list($a, $lastmodified) = $a;
- if (!class_exists('PEAR/ChannelFile.php')) {
+ if (!class_exists('PEAR_ChannelFile')) {
require_once 'PEAR/ChannelFile.php';
}
$b = new PEAR_ChannelFile;
@@ -40809,7 +41151,7 @@ class PEAR_Downloader extends PEAR_Common
*/
function &getDependency2Object(&$c, $i, $p, $s)
{
- if (!class_exists('PEAR/Dependency2.php')) {
+ if (!class_exists('PEAR_Dependency2')) {
require_once 'PEAR/Dependency2.php';
}
$z = &new PEAR_Dependency2($c, $i, $p, $s);
@@ -41235,7 +41577,12 @@ class PEAR_Downloader extends PEAR_Common
return $this->_downloadDir;
}
$downloaddir = $this->config->get('download_dir');
- if (empty($downloaddir)) {
+ if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) {
+ if (is_dir($downloaddir) && !is_writable($downloaddir)) {
+ $this->log(0, 'WARNING: configuration download directory "' . $downloaddir .
+ '" is not writeable. Change download_dir config variable to ' .
+ 'a writeable dir to avoid this warning');
+ }
if (!class_exists('System')) {
require_once 'System.php';
}
@@ -41339,8 +41686,10 @@ class PEAR_Downloader extends PEAR_Common
if (PEAR::isError($chan)) {
return $chan;
}
+ PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$version = $this->_registry->packageInfo($parr['package'], 'version',
$parr['channel']);
+ PEAR::staticPopErrorHandling();
$base2 = false;
if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
(($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror'))) ||
@@ -41352,6 +41701,7 @@ class PEAR_Downloader extends PEAR_Common
$rest = &$this->config->getREST('1.0', $this->_options);
}
if (!isset($parr['version']) && !isset($parr['state']) && $version
+ && !PEAR::isError($version)
&& !isset($this->_options['downloadonly'])) {
$url = $rest->getDownloadURL($base, $parr, $state, $version);
} else {
@@ -41372,15 +41722,12 @@ class PEAR_Downloader extends PEAR_Common
return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' .
'this should never happen');
}
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $testversion = $this->_registry->packageInfo($url['package'], 'version',
- $parr['channel']);
- PEAR::staticPopErrorHandling();
if (!isset($this->_options['force']) &&
!isset($this->_options['downloadonly']) &&
- !PEAR::isError($testversion) &&
+ $version &&
+ !PEAR::isError($version) &&
!isset($parr['group'])) {
- if (version_compare($testversion, $url['version'], '>=')) {
+ if (version_compare($version, $url['version'], '>=')) {
return PEAR::raiseError($this->_registry->parsedPackageNameToString(
$parr, true) . ' is already installed and is newer than detected ' .
'release version ' . $url['version'], -976);
@@ -42084,6 +42431,7 @@ class PEAR_Downloader extends PEAR_Common
* @param false|string|array $lastmodified header values to check against for caching
* use false to return the header values from this download
* @param false|array $accept Accept headers to send
+ * @param false|string $channel Channel to use for retrieving authentication
* @return string|array Returns the full path of the downloaded file or a PEAR
* error on failure. If the error is caused by
* socket-related errors, the error object will
@@ -42094,7 +42442,7 @@ class PEAR_Downloader extends PEAR_Common
* @access public
*/
function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null,
- $accept = false)
+ $accept = false, $channel = false)
{
static $redirect = 0;
// allways reset , so we are clean case of error
@@ -42186,11 +42534,11 @@ class PEAR_Downloader extends PEAR_Common
} else {
$ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
}
- $request .= $ifmodifiedsince . "User-Agent: PEAR/1.6.1/PHP/" .
+ $request .= $ifmodifiedsince . "User-Agent: PEAR/1.7.1/PHP/" .
PHP_VERSION . "\r\n";
if (isset($this)) { // only pass in authentication for non-static calls
- $username = $config->get('username');
- $password = $config->get('password');
+ $username = $config->get('username', null, $channel);
+ $password = $config->get('password', null, $channel);
if ($username && $password) {
$tmp = base64_encode("$username:$password");
$request .= "Authorization: Basic $tmp\r\n";
@@ -42300,7 +42648,7 @@ class PEAR_Downloader extends PEAR_Common
// }}}
?>
-
+
/**
* Error Stack Implementation
*
@@ -42323,9 +42671,9 @@ class PEAR_Downloader extends PEAR_Common
* @category Debugging
* @package PEAR_ErrorStack
* @author Greg Beaver <cellog@php.net>
- * @copyright 2004-2006 Greg Beaver
+ * @copyright 2004-2008 Greg Beaver
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: ErrorStack.php,v 1.27 2007/06/10 04:34:19 cellog Exp $
+ * @version CVS: $Id: ErrorStack.php,v 1.28 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
@@ -42434,12 +42782,12 @@ define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2);
* $local_stack = new PEAR_ErrorStack('MyPackage');
* </code>
* @author Greg Beaver <cellog@php.net>
- * @version 1.6.1
+ * @version 1.7.1
* @package PEAR_ErrorStack
* @category Debugging
- * @copyright 2004-2006 Greg Beaver
+ * @copyright 2004-2008 Greg Beaver
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: ErrorStack.php,v 1.27 2007/06/10 04:34:19 cellog Exp $
+ * @version CVS: $Id: ErrorStack.php,v 1.28 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
class PEAR_ErrorStack {
@@ -43285,7 +43633,7 @@ class PEAR_ErrorStack {
$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
/**
* PEAR_Exception
@@ -43304,9 +43652,9 @@ $stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
* @author Hans Lellelid <hans@velum.net>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Exception.php,v 1.28 2007/05/07 01:58:54 cellog Exp $
+ * @version CVS: $Id: Exception.php,v 1.29 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.3
*/
@@ -43380,9 +43728,9 @@ $stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
* @author Hans Lellelid <hans@velum.net>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.3
*
@@ -43681,7 +44029,13 @@ class PEAR_Exception extends Exception
}
}
-?>
+?>
+if ($skipmsg) {
+ $a = &new $ec($code, $mode, $options, $userinfo);
+} else {
+ $a = &new $ec($message, $code, $mode, $options, $userinfo);
+}
+?>
/**
* PEAR_Frontend, the singleton-based frontend for user input/output
*
@@ -43696,9 +44050,9 @@ class PEAR_Exception extends Exception
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Frontend.php,v 1.12 2007/05/31 03:51:08 cellog Exp $
+ * @version CVS: $Id: Frontend.php,v 1.13 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -43721,9 +44075,9 @@ $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null;
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -43903,7 +44257,7 @@ class PEAR_Frontend extends PEAR
{
}
}
-?>
+?>
/**
* PEAR_Installer
*
@@ -43921,9 +44275,9 @@ class PEAR_Frontend extends PEAR
* @author Tomas V.V. Cox <cox@idecnet.com>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Installer.php,v 1.245 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: Installer.php,v 1.251 2008/01/17 05:48:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -43945,9 +44299,9 @@ define('PEAR_INSTALLER_NOBINARY', -240);
* @author Tomas V.V. Cox <cox@idecnet.com>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -44144,6 +44498,10 @@ class PEAR_Installer extends PEAR_Downloader
$channel = $this->pkginfo->getChannel();
// {{{ assemble the destination paths
switch ($atts['role']) {
+ case 'src':
+ case 'extsrc':
+ $this->source_files++;
+ return;
case 'doc':
case 'data':
case 'test':
@@ -44158,10 +44516,6 @@ class PEAR_Installer extends PEAR_Downloader
case 'script':
$dest_dir = $this->config->get('bin_dir', null, $channel);
break;
- case 'src':
- case 'extsrc':
- $this->source_files++;
- return;
default:
return $this->raiseError("Invalid role `$atts[role]' for file $file");
}
@@ -44301,7 +44655,7 @@ class PEAR_Installer extends PEAR_Downloader
}
// {{{ check the md5
if (isset($md5sum)) {
- if (strtolower($md5sum) == strtolower($atts['md5sum'])) {
+ if (strtolower($md5sum) === strtolower($atts['md5sum'])) {
$this->log(2, "md5sum ok: $final_dest_file");
} else {
if (empty($options['force'])) {
@@ -44333,20 +44687,35 @@ class PEAR_Installer extends PEAR_Downloader
} else {
$mode = 0666 & ~(int)octdec($this->config->get('umask'));
}
- $this->addFileOperation("chmod", array($mode, $dest_file));
- if (!@chmod($dest_file, $mode)) {
- if (!isset($options['soft'])) {
- $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
+ if ($atts['role'] != 'src') {
+ $this->addFileOperation("chmod", array($mode, $dest_file));
+ if (!@chmod($dest_file, $mode)) {
+ if (!isset($options['soft'])) {
+ $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
+ }
}
}
}
// }}}
- $this->addFileOperation("rename", array($dest_file, $final_dest_file,
- $atts['role'] == 'ext'));
+ if ($atts['role'] == 'src') {
+ rename($dest_file, $final_dest_file);
+ $this->log(2, "renamed source file $dest_file to $final_dest_file");
+ } else {
+ $this->addFileOperation("rename", array($dest_file, $final_dest_file,
+ $atts['role'] == 'ext'));
+ }
}
// Store the full path where the file was installed for easy unistall
- $this->addFileOperation("installed_as", array($file, $installed_as,
- $save_destdir, dirname(substr($installedas_dest_file, strlen($save_destdir)))));
+ if ($atts['role'] != 'script') {
+ $loc = $this->config->get($atts['role'] . '_dir');
+ } else {
+ $loc = $this->config->get('bin_dir');
+ }
+ if ($atts['role'] != 'src') {
+ $this->addFileOperation("installed_as", array($file, $installed_as,
+ $loc,
+ dirname(substr($installedas_dest_file, strlen($loc)))));
+ }
//$this->log(2, "installed: $dest_file");
return PEAR_INSTALLER_OK;
@@ -44470,7 +44839,7 @@ class PEAR_Installer extends PEAR_Downloader
}
// {{{ check the md5
if (isset($md5sum)) {
- if (strtolower($md5sum) == strtolower($attribs['md5sum'])) {
+ if (strtolower($md5sum) === strtolower($attribs['md5sum'])) {
$this->log(2, "md5sum ok: $final_dest_file");
} else {
if (empty($options['force'])) {
@@ -44502,19 +44871,30 @@ class PEAR_Installer extends PEAR_Downloader
} else {
$mode = 0666 & ~(int)octdec($this->config->get('umask'));
}
- $this->addFileOperation("chmod", array($mode, $dest_file));
- if (!@chmod($dest_file, $mode)) {
- if (!isset($options['soft'])) {
- $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
+ if ($attribs['role'] != 'src') {
+ $this->addFileOperation("chmod", array($mode, $dest_file));
+ if (!@chmod($dest_file, $mode)) {
+ if (!isset($options['soft'])) {
+ $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
+ }
}
}
}
// }}}
- $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension()));
+ if ($attribs['role'] == 'src') {
+ rename($dest_file, $final_dest_file);
+ $this->log(2, "renamed source file $dest_file to $final_dest_file");
+ } else {
+ $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension()));
+ }
}
// Store the full path where the file was installed for easy uninstall
- $this->addFileOperation("installed_as", array($file, $installed_as,
- $save_destdir, dirname(substr($dest_file, strlen($save_destdir)))));
+ if ($attribs['role'] != 'src') {
+ $loc = $this->config->get($role->getLocationConfig(), null, $channel);
+ $this->addFileOperation("installed_as", array($file, $installed_as,
+ $loc,
+ dirname(substr($installed_as, strlen($loc)))));
+ }
//$this->log(2, "installed: $dest_file");
return PEAR_INSTALLER_OK;
@@ -44742,8 +45122,8 @@ class PEAR_Installer extends PEAR_Downloader
$this->_dirtree[dirname($data[1])] = true;
$this->pkginfo->setDirtree(dirname($data[1]));
- while(!empty($data[3]) && $data[3] != '/' && $data[3] != '\\'
- && $data[3] != '.') {
+ while(!empty($data[3]) && dirname($data[3]) != $data[3] &&
+ $data[3] != '/' && $data[3] != '\\') {
$this->pkginfo->setDirtree($pp =
$this->_prependPath($data[3], $data[2]));
$this->_dirtree[$pp] = true;
@@ -45195,7 +45575,8 @@ class PEAR_Installer extends PEAR_Downloader
}
}
}
- if ($res == PEAR_INSTALLER_OK) {
+ $real = isset($atts['attribs']) ? $atts['attribs'] : $atts;
+ if ($res == PEAR_INSTALLER_OK && $real['role'] != 'src') {
// Register files that were installed
$pkg->installedFile($file, $atts);
}
@@ -45580,7 +45961,7 @@ if (!function_exists("md5_file")) {
}
// }}}
-?>
+?>
/**
* PEAR_PackageFile, package.xml parsing utility class
*
@@ -45595,9 +45976,9 @@ if (!function_exists("md5_file")) {
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: PackageFile.php,v 1.40 2006/09/25 05:12:21 cellog Exp $
+ * @version CVS: $Id: PackageFile.php,v 1.41 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -45621,9 +46002,9 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2);
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -46054,7 +46435,7 @@ class PEAR_PackageFile
}
?>
-
+
/**
* PEAR_Packager for generating releases
*
@@ -46071,9 +46452,9 @@ class PEAR_PackageFile
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Packager.php,v 1.70 2006/09/25 05:12:21 cellog Exp $
+ * @version CVS: $Id: Packager.php,v 1.71 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -46091,9 +46472,9 @@ require_once 'System.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -46253,7 +46634,7 @@ if (!function_exists('md5_file')) {
// }}}
?>
-
+
/**
* PEAR_Registry
*
@@ -46270,9 +46651,9 @@ if (!function_exists('md5_file')) {
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Registry.php,v 1.166 2007/06/16 18:41:59 cellog Exp $
+ * @version CVS: $Id: Registry.php,v 1.170 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -46296,9 +46677,9 @@ define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6);
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -47050,6 +47431,7 @@ class PEAR_Registry extends PEAR
}
if (!is_resource($this->lock_fp)) {
+ $this->lock_fp = null;
return $this->raiseError("could not create lock file" .
(isset($php_errormsg) ? ": " . $php_errormsg : ""));
}
@@ -47060,6 +47442,9 @@ class PEAR_Registry extends PEAR
case LOCK_UN: $str = 'unlock'; break;
default: $str = 'unknown'; break;
}
+ //is resource at this point, close it on error.
+ fclose($this->lock_fp);
+ $this->lock_fp = null;
return $this->raiseError("could not acquire $str lock ($this->lockfile)",
PEAR_REGISTRY_ERROR_LOCK);
}
@@ -47371,8 +47756,8 @@ class PEAR_Registry extends PEAR
}
if (!in_array('__uri', $channellist)) {
$channellist[] = '__uri';
- }
-
+ }
+
natsort($channellist);
return $channellist;
}
@@ -48022,10 +48407,10 @@ class PEAR_Registry extends PEAR
return $e;
}
$ret = &$this->_getChannel($channel, $noaliases);
+ $this->_unlock();
if (!$ret) {
return PEAR::raiseError('Unknown channel: ' . $channel);
}
- $this->_unlock();
return $ret;
}
@@ -48477,7 +48862,7 @@ class PEAR_Registry extends PEAR
}
?>
-
+
/**
* PEAR_Remote
*
@@ -48493,9 +48878,9 @@ class PEAR_Registry extends PEAR
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Remote.php,v 1.79 2006/03/27 04:33:11 cellog Exp $
+ * @version CVS: $Id: Remote.php,v 1.80 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -48517,9 +48902,9 @@ require_once 'PEAR/Config.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -48975,7 +49360,7 @@ class PEAR_Remote extends PEAR
}
?>
-
+
/**
* PEAR_REST
*
@@ -48990,9 +49375,9 @@ class PEAR_Remote extends PEAR
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: REST.php,v 1.22 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: REST.php,v 1.29 2008/01/31 23:42:04 timj Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -49009,9 +49394,9 @@ require_once 'PEAR/XMLParser.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -49263,7 +49648,7 @@ class PEAR_REST
$path = $info['path'];
}
$proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
- if ($this->config->get('http_proxy')&&
+ if ($this->config->get('http_proxy')&&
$proxy = parse_url($this->config->get('http_proxy'))) {
$proxy_host = isset($proxy['host']) ? $proxy['host'] : null;
if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') {
@@ -49282,8 +49667,10 @@ class PEAR_REST
}
If (isset($proxy['host'])) {
$request = "GET $url HTTP/1.1\r\n";
+ $request .= 'Host: ' . $proxy['host'] . ":$port\r\n";
} else {
$request = "GET $path HTTP/1.1\r\n";
+ $request .= "Host: $host:$port\r\n";
}
$ifmodifiedsince = '';
@@ -49297,8 +49684,8 @@ class PEAR_REST
} else {
$ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
}
- $request .= "Host: $host:$port\r\n" . $ifmodifiedsince .
- "User-Agent: PEAR/1.6.1/PHP/" . PHP_VERSION . "\r\n";
+ $request .= $ifmodifiedsince .
+ "User-Agent: PEAR/1.7.1/PHP/" . PHP_VERSION . "\r\n";
$username = $this->config->get('username');
$password = $this->config->get('password');
if ($username && $password) {
@@ -49312,6 +49699,7 @@ class PEAR_REST
if ($accept) {
$request .= 'Accept: ' . implode(', ', $accept) . "\r\n";
}
+ $request .= "Accept-Encoding:\r\n";
$request .= "Connection: close\r\n";
$request .= "\r\n";
if ($proxy_host != '') {
@@ -49370,7 +49758,7 @@ class PEAR_REST
}
}
?>
-
+
/**
* PEAR_RunTest
*
@@ -49386,9 +49774,9 @@ class PEAR_REST
* @package PEAR
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: RunTest.php,v 1.45 2007/06/19 03:10:49 cellog Exp $
+ * @version CVS: $Id: RunTest.php,v 1.65 2008/01/18 22:55:09 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.3
*/
@@ -49414,9 +49802,9 @@ putenv("PHP_PEAR_RUNTESTS=1");
* @package PEAR
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.3
*/
@@ -49426,8 +49814,15 @@ class PEAR_RunTest
var $_logger;
var $_options;
var $_php;
- var $test_count;
+ var $tests_count;
var $xdebug_loaded;
+ /**
+ * Saved value of php executable, used to reset $_php when we
+ * have a test that uses cgi
+ *
+ * @var unknown_type
+ */
+ var $_savephp;
var $ini_overwrites = array(
'output_handler=',
'open_basedir=',
@@ -49464,7 +49859,7 @@ class PEAR_RunTest
}
$this->_logger = $logger;
$this->_options = $options;
-
+
$conf = &PEAR_Config::singleton();
$this->_php = $conf->get('php_bin');
}
@@ -49493,22 +49888,22 @@ class PEAR_RunTest
2 => array('pipe', 'w')
), $pipes, null, $env, array('suppress_errors' => true));
}
-
+
if (!$proc) {
return false;
}
-
+
if (is_string($stdin)) {
fwrite($pipes[0], $stdin);
}
fclose($pipes[0]);
-
+
while (true) {
/* hide errors from interrupted syscalls */
$r = $pipes;
$e = $w = null;
$n = @stream_select($r, $w, $e, 60);
-
+
if ($n === 0) {
/* timed out */
$data .= "\n ** ERROR: process timed out **\n";
@@ -49536,10 +49931,38 @@ class PEAR_RunTest
return array($code, $data);
}
+ /**
+ * Turns a PHP INI string into an array
+ *
+ * Turns -d "include_path=/foo/bar" into this:
+ * array(
+ * 'include_path' => array(
+ * 'operator' => '-d',
+ * 'value' => '/foo/bar',
+ * )
+ * )
+ * Works both with quotes and without
+ *
+ * @param string an PHP INI string, -d "include_path=/foo/bar"
+ * @return array
+ */
+ function iniString2array($ini_string)
+ {
+ if (!$ini_string) {
+ return array();
+ }
+ $split = preg_split('/[\s]|=/', $ini_string, -1, PREG_SPLIT_NO_EMPTY);
+ $key = $split[1][0] == '"' ? substr($split[1], 1) : $split[1];
+ $value = $split[2][strlen($split[2]) - 1] == '"' ? substr($split[2], 0, -1) : $split[2];
+ // FIXME review if this is really the struct to go with
+ $array = array($key => array('operator' => $split[0], 'value' => $value));
+ return $array;
+ }
+
function settings2array($settings, $ini_settings)
{
foreach ($settings as $setting) {
- if (strpos($setting, '=')!== false) {
+ if (strpos($setting, '=') !== false) {
$setting = explode('=', $setting, 2);
$name = trim(strtolower($setting[0]));
$value = trim($setting[1]);
@@ -49548,24 +49971,36 @@ class PEAR_RunTest
}
return $ini_settings;
}
-
+
function settings2params($ini_settings)
{
$settings = '';
foreach ($ini_settings as $name => $value) {
+ if (is_array($value)) {
+ $operator = $value['operator'];
+ $value = $value['value'];
+ } else {
+ $operator = '-d';
+ }
$value = addslashes($value);
- $settings .= " -d \"$name=$value\"";
+ $settings .= " $operator \"$name=$value\"";
}
return $settings;
}
function runPHPUnit($file, $ini_settings = '')
{
+ if (!file_exists($file) && file_exists(getcwd() . DIRECTORY_SEPARATOR . $file)) {
+ $file = realpath(getcwd() . DIRECTORY_SEPARATOR . $file);
+ break;
+ } elseif (file_exists($file)) {
+ $file = realpath($file);
+ }
$cmd = "$this->_php$ini_settings -f $file";
if (isset($this->_logger)) {
$this->_logger->log(2, 'Running command "' . $cmd . '"');
}
-
+
$savedir = getcwd(); // in case the test moves us around
chdir(dirname($file));
echo `$cmd`;
@@ -49573,15 +50008,28 @@ class PEAR_RunTest
return 'PASSED'; // we have no way of knowing this information so assume passing
}
- //
- // Run an individual test case.
- //
-
- function run($file, $ini_settings = '', $test_number)
+ /**
+ * Runs an individual test case.
+ *
+ * @param string The filename of the test
+ * @param array|string INI settings to be applied to the test run
+ * @param integer Number what the current running test is of the
+ * whole test suite being runned.
+ *
+ * @return string|object Returns PASSED, WARNED, FAILED depending on how the
+ * test came out.
+ * PEAR Error when the tester it self fails
+ */
+ function run($file, $ini_settings = array(), $test_number = 1)
{
+ if (isset($this->_savephp)) {
+ $this->_php = $this->_savephp;
+ unset($this->_savephp);
+ }
if (empty($this->_options['cgi'])) {
// try to see if php-cgi is in the path
- if (false !== $this->system_with_timeout('php-cgi -v')) {
+ $res = $this->system_with_timeout('php-cgi -v');
+ if (false !== $res && !(is_array($res) && $res === array(127, ''))) {
$this->_options['cgi'] = 'php-cgi';
}
}
@@ -49603,12 +50051,16 @@ class PEAR_RunTest
}
$cwd = getcwd();
-
+
$pass_options = '';
if (!empty($this->_options['ini'])) {
$pass_options = $this->_options['ini'];
}
+ if (is_string($ini_settings)) {
+ $ini_settings = $this->iniString2array($ini_settings);
+ }
+
$ini_settings = $this->settings2array($this->ini_overwrites, $ini_settings);
if ($section_text['INI']) {
if (strpos($section_text['INI'], '{PWD}') !== false) {
@@ -49635,22 +50087,23 @@ class PEAR_RunTest
}
return 'SKIPPED';
}
+ $this->_savephp = $this->_php;
$this->_php = $this->_options['cgi'];
}
$temp_dir = realpath(dirname($file));
- $main_file_name = basename($file, 'phpt');
- $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'diff';
- $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'log';
- $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'exp';
- $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'out';
- $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'mem';
- $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'php';
- $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'skip.php';
- $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php';
- $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.');
-
- // unlink old test results
+ $main_file_name = basename($file, 'phpt');
+ $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'diff';
+ $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'log';
+ $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'exp';
+ $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'out';
+ $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'mem';
+ $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'php';
+ $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'skip.php';
+ $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php';
+ $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.');
+
+ // unlink old test results
$this->_cleanupOldFiles($file);
// Check if test should be skipped.
@@ -49670,13 +50123,21 @@ class PEAR_RunTest
}
$text = '<?php' . "\n" . 'xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);' . "\n";
- $new = substr($section_text['FILE'], $len_f, strlen($section_text['FILE']));
- $text.= substr($new, 0, strrpos($new, '?>'));
+ $new = substr($section_text['FILE'], $len_f, strlen($section_text['FILE']));
+ $text .= substr($new, 0, strrpos($new, '?>'));
$xdebug_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'xdebug';
- $text.= "\n" .
- "\n" . '$xdebug = var_export(xdebug_get_code_coverage(), true);' .
- "\n" . 'file_put_contents(\'' . $xdebug_file . '\', $xdebug);' .
- "\n" . 'xdebug_stop_code_coverage();' . "\n" . '?>';
+ $text .= "\n" .
+ "\n" . '$xdebug = var_export(xdebug_get_code_coverage(), true);';
+ if (!function_exists('file_put_contents')) {
+ $text .= "\n" . '$fh = fopen(\'' . $xdebug_file . '\', "wb");' .
+ "\n" . 'if ($fh !== false) {' .
+ "\n" . ' fwrite($fh, $xdebug);' .
+ "\n" . ' fclose($fh);' .
+ "\n" . '}';
+ } else {
+ $text .= "\n" . 'file_put_contents(\'' . $xdebug_file . '\', $xdebug);';
+ }
+ $text .= "\n" . 'xdebug_stop_code_coverage();' . "\n" . '?>';
$this->save_text($temp_file, $text);
} else {
@@ -49684,7 +50145,7 @@ class PEAR_RunTest
}
$args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : '';
- $cmd = "$this->_php$ini_settings \"$temp_file\" $args 2>&1";
+ $cmd = "$this->_php$ini_settings -f \"$temp_file\" $args 2>&1";
if (isset($this->_logger)) {
$this->_logger->log(2, 'Running command "' . $cmd . '"');
}
@@ -49700,7 +50161,7 @@ class PEAR_RunTest
if (array_key_exists('POST_RAW', $section_text) && !empty($section_text['POST_RAW'])) {
$post = trim($section_text['POST_RAW']);
$raw_lines = explode("\n", $post);
-
+
$request = '';
$started = false;
foreach ($raw_lines as $i => $line) {
@@ -49715,7 +50176,7 @@ class PEAR_RunTest
$started = true;
$request .= $line;
}
-
+
$env['CONTENT_LENGTH'] = strlen($request);
$env['REQUEST_METHOD'] = 'POST';
@@ -49725,11 +50186,11 @@ class PEAR_RunTest
$post = trim($section_text['POST']);
$this->save_text($tmp_post, $post);
$content_length = strlen($post);
-
+
$env['REQUEST_METHOD'] = 'POST';
$env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
$env['CONTENT_LENGTH'] = $content_length;
-
+
$cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post";
} else {
$env['REQUEST_METHOD'] = 'GET';
@@ -49974,33 +50435,33 @@ $text
}}}
";
}
-
+
function _cleanupOldFiles($file)
{
$temp_dir = realpath(dirname($file));
$mainFileName = basename($file, 'phpt');
- $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'diff';
- $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'log';
- $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'exp';
- $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'out';
- $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'mem';
- $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'php';
- $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'skip.php';
- $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'clean.php';
- $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.');
-
- // unlink old test results
- @unlink($diff_filename);
- @unlink($log_filename);
- @unlink($exp_filename);
- @unlink($output_filename);
- @unlink($memcheck_filename);
- @unlink($temp_file);
- @unlink($temp_skipif);
- @unlink($tmp_post);
- @unlink($temp_clean);
+ $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'diff';
+ $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'log';
+ $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'exp';
+ $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'out';
+ $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'mem';
+ $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'php';
+ $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'skip.php';
+ $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'clean.php';
+ $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.');
+
+ // unlink old test results
+ @unlink($diff_filename);
+ @unlink($log_filename);
+ @unlink($exp_filename);
+ @unlink($output_filename);
+ @unlink($memcheck_filename);
+ @unlink($temp_file);
+ @unlink($temp_skipif);
+ @unlink($tmp_post);
+ @unlink($temp_clean);
}
-
+
function _runSkipIf($section_text, $temp_skipif, $tested, $ini_settings)
{
$info = '';
@@ -50036,20 +50497,20 @@ $text
$info = " (warn: $m[1])";
}
}
-
+
return array('warn' => $warn, 'info' => $info);
}
-
+
function _stripHeadersCGI($output)
{
$this->headers = array();
if (!empty($this->_options['cgi']) &&
- $this->_php == $this->_options['cgi'] &&
+ $this->_php == $this->_options['cgi'] &&
preg_match("/^(.*?)(?:\n\n(.*)|\\z)/s", $output, $match)) {
$output = isset($match[2]) ? trim($match[2]) : '';
$this->_headers = $this->_processHeaders($match[1]);
}
-
+
return $output;
}
@@ -50107,10 +50568,10 @@ $text
$section_text[$section] .= $line;
}
fclose($fp);
-
+
return $section_text;
}
-
+
function _writeLog($logname, $data)
{
if (!$log = fopen($logname, 'w')) {
@@ -50151,10 +50612,10 @@ $text
$env['REDIRECT_STATUS'] = '1';
$env['PATH_TRANSLATED'] = $temp_file;
$env['SCRIPT_FILENAME'] = $temp_file;
-
+
return $env;
}
-
+
function _processUpload($section_text, $file)
{
if (array_key_exists('UPLOAD', $section_text) && !empty($section_text['UPLOAD'])) {
@@ -50202,10 +50663,10 @@ $text
}
$section_text['POST_RAW'] = $request;
}
-
+
return $section_text;
}
-
+
function _testCleanup($section_text, $temp_clean)
{
if ($section_text['CLEAN']) {
@@ -50217,8 +50678,7 @@ $text
}
}
}
-}
-
+}
/**
* PEAR_Validate
*
@@ -50233,9 +50693,9 @@ $text
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Validate.php,v 1.51 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: Validate.php,v 1.52 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -50256,9 +50716,9 @@ require_once 'PEAR/Validator/PECL.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -50852,9 +51312,9 @@ class PEAR_Validate
}
}
?>
-
+
/**
- * PEAR_FTP
+ * PEAR_XMLParser
*
* PHP versions 4 and 5
*
@@ -50868,9 +51328,9 @@ class PEAR_Validate
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Stephan Schmidt (original XML_Unserializer code)
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: XMLParser.php,v 1.12 2006/03/27 04:39:03 cellog Exp $
+ * @version CVS: $Id: XMLParser.php,v 1.13 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -50881,9 +51341,9 @@ class PEAR_Validate
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Stephan Schmidt (original XML_Unserializer code)
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -51112,7 +51572,7 @@ class PEAR_XMLParser
$this->_dataStack[$this->_depth] .= $cdata;
}
}
-?>
+?>
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -51224,9 +51684,9 @@ ECHO The current value is:
ECHO %PHP_PEAR_PHP_BIN%
GOTO END
:RUN
-"%PHP_PEAR_PHP_BIN%" -C -d output_buffering=1 -d safe_mode=0 -d open_basedir="" -d auto_prepend_file="" -d auto_append_file="" -d register_argc_argv="On" -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
+"%PHP_PEAR_PHP_BIN%" -C -d output_buffering=1 -d safe_mode=0 -d open_basedir="" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d register_argc_argv="On" -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -51244,7 +51704,7 @@ REM ----------------------------------------------------------------------
REM Authors: Alexander Merz (alexmerz@php.net)
REM ----------------------------------------------------------------------
REM
-REM $Id: peardev.bat,v 1.5 2006/03/27 21:17:29 cellog Exp $
+REM $Id: peardev.bat,v 1.6 2007/09/03 03:00:17 cellog Exp $
REM change this lines to match the paths of your system
REM -------------------
@@ -51338,9 +51798,9 @@ ECHO The current value is:
ECHO %PHP_PEAR_PHP_BIN%
GOTO END
:RUN
-"%PHP_PEAR_PHP_BIN%" -C -d memory_limit="-1" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" -d open_basedir="" -d output_buffering=1 -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
+"%PHP_PEAR_PHP_BIN%" -C -d memory_limit="-1" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d open_basedir="" -d output_buffering=1 -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -51452,9 +51912,9 @@ ECHO The current value is:
ECHO %PHP_PEAR_PHP_BIN%
GOTO END
:RUN
-"%PHP_PEAR_PHP_BIN%" -C -n -d output_buffering=1 -d safe_mode=0 -d include_path="%PHP_PEAR_INSTALL_DIR%" -d register_argc_argv="On" -f "%PHP_PEAR_INSTALL_DIR%\peclcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
+"%PHP_PEAR_PHP_BIN%" -C -n -d output_buffering=1 -d safe_mode=0 -d include_path="%PHP_PEAR_INSTALL_DIR%" -d register_argc_argv="On" -d variables_order=EGPCS -f "%PHP_PEAR_INSTALL_DIR%\peclcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -51481,8 +51941,8 @@ else
fi
fi
-exec $PHP -C -q $INCARG -d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" $INCDIR/pearcmd.php "$@"
-
+exec $PHP -C -q $INCARG -d output_buffering=1 -d variables_order=EGPCS -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" $INCDIR/pearcmd.php "$@"
+
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -51509,8 +51969,8 @@ else
fi
fi
-exec $PHP -d memory_limit="-1" -C -q $INCARG -d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" $INCDIR/pearcmd.php "$@"
-
+exec $PHP -d memory_limit="-1" -C -q $INCARG -d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d variables_order=EGPCS -d auto_append_file="" $INCDIR/pearcmd.php "$@"
+
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -51537,8 +51997,8 @@ else
fi
fi
-exec $PHP -C -n -q $INCARG -d output_buffering=1 -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"
-
+exec $PHP -C -n -q $INCARG -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"
+
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
@@ -51558,7 +52018,7 @@ exec $PHP -C -n -q $INCARG -d output_buffering=1 -d safe_mode=0 -d register_argc
// | |
// +----------------------------------------------------------------------+
//
-// $Id: pearcmd.php,v 1.37 2007/01/08 05:14:01 cellog Exp $
+// $Id: pearcmd.php,v 1.38 2007/11/17 21:02:21 dufuz Exp $
ob_end_clean();
if (!defined('PEAR_RUNTYPE')) {
@@ -51673,7 +52133,7 @@ if (PEAR::isError($config)) {
$config->getMessage();
$ui->outputData("ERROR: $_file is not a valid config file or is corrupted.");
// We stop, we have no idea where we are :)
- exit(1);
+ exit(1);
}
// this is used in the error handler to retrieve a relative path
@@ -51934,7 +52394,7 @@ function cmdHelp($command)
return "$progname $command [options] $help[0]\n$help[1]";
}
}
- return "Command '$command' is not valid, try 'pear help'";
+ return "Command '$command' is not valid, try '$progname help'";
}
// }}}
@@ -51984,7 +52444,7 @@ function error_handler($errno, $errmsg, $file, $line, $vars) {
// vim600:syn=php
?>
-
+
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
@@ -52029,7 +52489,7 @@ require_once 'pearcmd.php';
// vim600:syn=php
?>
-
+
=========================
Installing the PEAR Installer.
@@ -52081,7 +52541,7 @@ related issues.
Happy PHPing, we hope PEAR will be a great tool for your development work!
-$Id: INSTALL,v 1.1 2006/09/22 03:31:36 cellog Exp $
+$Id: INSTALL,v 1.1 2006/09/22 03:31:36 cellog Exp $
$Id: package.dtd,v 1.38 2005/11/12 02:23:07 cellog Exp $
This is the PEAR package description, version 1.0.
@@ -52184,7 +52644,7 @@ $Id: INSTALL,v 1.1 2006/09/22 03:31:36 cellog Exp $
to CDATA #REQUIRED>
-
+
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -52204,9 +52664,9 @@ $Id: INSTALL,v 1.1 2006/09/22 03:31:36 cellog Exp $
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: PEAR.php,v 1.101 2006/04/25 02:41:03 cellog Exp $
+ * @version CVS: $Id: PEAR.php,v 1.104 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -52279,7 +52739,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array();
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @see PEAR_Error
* @since Class available since PHP 4.0.2
@@ -52751,13 +53211,17 @@ class PEAR
} else {
$ec = 'PEAR_Error';
}
- if ($skipmsg) {
- $a = &new $ec($code, $mode, $options, $userinfo);
+ if (intval(PHP_VERSION) < 5) {
+ // little non-eval hack to fix bug #12147
+ include 'PEAR/FixPHP5PEARWarnings.php';
return $a;
+ }
+ if ($skipmsg) {
+ $a = new $ec($code, $mode, $options, $userinfo);
} else {
- $a = &new $ec($message, $code, $mode, $options, $userinfo);
- return $a;
+ $a = new $ec($message, $code, $mode, $options, $userinfo);
}
+ return $a;
}
// }}}
@@ -53000,7 +53464,7 @@ function _PEAR_call_destructors()
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/manual/en/core.pear.pear-error.php
* @see PEAR::raiseError(), PEAR::throwError()
* @since Class available since PHP 4.0.2
@@ -53234,6 +53698,12 @@ class PEAR_Error
// }}}
// {{{ toString()
+ function __toString()
+ {
+ return $this->getMessage();
+ }
+ // }}}
+ // {{{ toString()
/**
* Make a string representation of this object.
@@ -53292,7 +53762,7 @@ class PEAR_Error
* End:
*/
?>
-
+
=========================
What is the PEAR Installer? What is PEAR?
@@ -53323,7 +53793,7 @@ prior to use.
Happy PHPing, we hope PEAR will be a great tool for your development work!
-$Id: README,v 1.11 2006/09/22 03:31:36 cellog Exp $
+$Id: README,v 1.11 2006/09/22 03:31:36 cellog Exp $
/**
* File/Directory manipulation
*
@@ -53338,9 +53808,9 @@ $Id: README,v 1.11 2006/09/22 03:31:36 cellog Exp $
* @category pear
* @package System
* @author Tomas V.V.Cox <cox@idecnet.com>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: System.php,v 1.56 2007/04/12 02:01:55 cellog Exp $
+ * @version CVS: $Id: System.php,v 1.62 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -53382,9 +53852,10 @@ $GLOBALS['_System_temp_files'] = array();
* @author Tomas V.V. Cox <cox@idecnet.com>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
-* @version Release: 1.6.1
+* @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
+* @static
*/
class System
{
@@ -53395,6 +53866,7 @@ class System
* @param string $short_options the allowed option short-tags
* @param string $long_options the allowed option long-tags
* @return array the given options and there values
+ * @static
* @access private
*/
function _parseArgs($argv, $short_options, $long_options = null)
@@ -53411,6 +53883,7 @@ class System
*
* @param mixed $error a PEAR error or a string with the error message
* @return bool false
+ * @static
* @access private
*/
function raiseError($error)
@@ -53442,15 +53915,19 @@ class System
* @param string $sPath Name of the directory
* @param integer $maxinst max. deep of the lookup
* @param integer $aktinst starting deep of the lookup
+ * @param bool $silent if true, do not emit errors.
* @return array the structure of the dir
+ * @static
* @access private
*/
- function _dirToStruct($sPath, $maxinst, $aktinst = 0)
+ function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
{
$struct = array('dirs' => array(), 'files' => array());
if (($dir = @opendir($sPath)) === false) {
- System::raiseError("Could not open dir $sPath");
+ if (!$silent) {
+ System::raiseError("Could not open dir $sPath");
+ }
return $struct; // XXX could not open error
}
$struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ?
@@ -53463,10 +53940,10 @@ class System
closedir($dir);
sort($list);
if ($aktinst < $maxinst || $maxinst == 0) {
- foreach($list as $val) {
+ foreach ($list as $val) {
$path = $sPath . DIRECTORY_SEPARATOR . $val;
if (is_dir($path) && !is_link($path)) {
- $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1);
+ $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1, $silent);
$struct = array_merge_recursive($tmp, $struct);
} else {
$struct['files'][] = $path;
@@ -53481,6 +53958,7 @@ class System
*
* @param array $files Array listing files and dirs
* @return array
+ * @static
* @see System::_dirToStruct()
*/
function _multipleToStruct($files)
@@ -53504,15 +53982,16 @@ class System
*
* @param string $args the arguments for rm
* @return mixed PEAR_Error or true for success
+ * @static
* @access public
*/
function rm($args)
{
- $opts = System::_parseArgs($args, 'rf'); // "f" do nothing but like it :-)
+ $opts = System::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-)
if (PEAR::isError($opts)) {
return System::raiseError($opts);
}
- foreach($opts[0] as $opt) {
+ foreach ($opts[0] as $opt) {
if ($opt[0] == 'r') {
$do_recursive = true;
}
@@ -53520,12 +53999,12 @@ class System
$ret = true;
if (isset($do_recursive)) {
$struct = System::_multipleToStruct($opts[1]);
- foreach($struct['files'] as $file) {
+ foreach ($struct['files'] as $file) {
if (!@unlink($file)) {
$ret = false;
}
}
- foreach($struct['dirs'] as $dir) {
+ foreach ($struct['dirs'] as $dir) {
if (!@rmdir($dir)) {
$ret = false;
}
@@ -53547,6 +54026,7 @@ class System
* The -p option will create parent directories
* @param string $args the name of the director(y|ies) to create
* @return bool True for success
+ * @static
* @access public
*/
function mkDir($args)
@@ -53556,10 +54036,10 @@ class System
return System::raiseError($opts);
}
$mode = 0777; // default mode
- foreach($opts[0] as $opt) {
+ foreach ($opts[0] as $opt) {
if ($opt[0] == 'p') {
$create_parents = true;
- } elseif($opt[0] == 'm') {
+ } elseif ($opt[0] == 'm') {
// if the mode is clearly an octal number (starts with 0)
// convert it to decimal
if (strlen($opt[1]) && $opt[1]{0} == '0') {
@@ -53573,7 +54053,7 @@ class System
}
$ret = true;
if (isset($create_parents)) {
- foreach($opts[1] as $dir) {
+ foreach ($opts[1] as $dir) {
$dirstack = array();
while ((!file_exists($dir) || !is_dir($dir)) &&
$dir != DIRECTORY_SEPARATOR) {
@@ -53612,6 +54092,7 @@ class System
*
* @param string $args the arguments
* @return boolean true on success
+ * @static
* @access public
*/
function &cat($args)
@@ -53621,7 +54102,9 @@ class System
if (!is_array($args)) {
$args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
}
- for($i=0; $i < count($args); $i++) {
+
+ $count_args = count($args);
+ for ($i = 0; $i < $count_args; $i++) {
if ($args[$i] == '>') {
$mode = 'wb';
$outputfile = $args[$i+1];
@@ -53683,6 +54166,7 @@ class System
* @param string $args The arguments
* @return mixed the full path of the created (file|dir) or false
* @see System::tmpdir()
+ * @static
* @access public
*/
function mktemp($args = null)
@@ -53692,10 +54176,10 @@ class System
if (PEAR::isError($opts)) {
return System::raiseError($opts);
}
- foreach($opts[0] as $opt) {
- if($opt[0] == 'd') {
+ foreach ($opts[0] as $opt) {
+ if ($opt[0] == 'd') {
$tmp_is_dir = true;
- } elseif($opt[0] == 't') {
+ } elseif ($opt[0] == 't') {
$tmpdir = $opt[1];
}
}
@@ -53725,6 +54209,7 @@ class System
* Remove temporary files created my mkTemp. This function is executed
* at script shutdown time
*
+ * @static
* @access private
*/
function _removeTmpFiles()
@@ -53743,6 +54228,7 @@ class System
* Note: php.ini-recommended removes the "E" from the variables_order setting,
* making unavaible the $_ENV array, that s why we do tests with _ENV
*
+ * @static
* @return string The temporary directory on the system
*/
function tmpdir()
@@ -53765,7 +54251,7 @@ class System
if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) {
return $var;
}
- return '/tmp';
+ return realpath('/tmp');
}
/**
@@ -53775,6 +54261,7 @@ class System
* @param mixed $fallback Value to return if $program is not found
*
* @return mixed A string with the full path or false if not found
+ * @static
* @author Stig Bakken <ssb@php.net>
*/
function which($program, $fallback = false)
@@ -53784,12 +54271,6 @@ class System
return $fallback;
}
- // available since 4.3.0RC2
- if (defined('PATH_SEPARATOR')) {
- $path_delim = PATH_SEPARATOR;
- } else {
- $path_delim = OS_WINDOWS ? ';' : ':';
- }
// full path given
if (basename($program) != $program) {
$path_elements[] = dirname($program);
@@ -53802,12 +54283,12 @@ class System
$path = getenv('Path'); // some OSes are just stupid enough to do this
}
}
- $path_elements = explode($path_delim, $path);
+ $path_elements = explode(PATH_SEPARATOR, $path);
}
if (OS_WINDOWS) {
$exe_suffixes = getenv('PATHEXT')
- ? explode($path_delim, getenv('PATHEXT'))
+ ? explode(PATH_SEPARATOR, getenv('PATHEXT'))
: array('.exe','.bat','.cmd','.com');
// allow passing a command.exe param
if (strpos($program, '.') !== false) {
@@ -53852,6 +54333,7 @@ class System
*
* @param mixed Either array or string with the command line
* @return array Array of found files
+ * @static
*
*/
function find($args)
@@ -53859,11 +54341,15 @@ class System
if (!is_array($args)) {
$args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
}
- $dir = array_shift($args);
+ $dir = realpath(array_shift($args));
+ if (!$dir) {
+ return array();
+ }
$patterns = array();
$depth = 0;
$do_files = $do_dirs = true;
- for ($i = 0; $i < count($args); $i++) {
+ $args_count = count($args);
+ for ($i = 0; $i < $args_count; $i++) {
switch ($args[$i]) {
case '-type':
if (in_array($args[$i+1], array('d', 'f'))) {
@@ -53876,18 +54362,11 @@ class System
$i++;
break;
case '-name':
- if (OS_WINDOWS) {
- if ($args[$i+1]{0} == '\\') {
- // prepend drive
- $args[$i+1] = addslashes(substr(getcwd(), 0, 2) . $args[$i + 1]);
- }
- // escape path separators to avoid PCRE problems
- $args[$i+1] = str_replace('\\', '\\\\', $args[$i+1]);
- }
- $patterns[] = "(" . preg_replace(array('/\./', '/\*/'),
- array('\.', '.*', ),
- $args[$i+1])
- . ")";
+ $name = preg_quote($args[$i+1], '#');
+ // our magic characters ? and * have just been escaped,
+ // so now we change the escaped versions to PCRE operators
+ $name = strtr($name, array('\?' => '.', '\*' => '.*'));
+ $patterns[] = '('.$name.')';
$i++;
break;
case '-maxdepth':
@@ -53895,7 +54374,7 @@ class System
break;
}
}
- $path = System::_dirToStruct($dir, $depth);
+ $path = System::_dirToStruct($dir, $depth, 0, true);
if ($do_files && $do_dirs) {
$files = array_merge($path['files'], $path['dirs']);
} elseif ($do_dirs) {
@@ -53904,10 +54383,14 @@ class System
$files = $path['files'];
}
if (count($patterns)) {
- $patterns = implode('|', $patterns);
+ $dsq = preg_quote(DIRECTORY_SEPARATOR, '#');
+ $pattern = '#(^|'.$dsq.')'.implode('|', $patterns).'($|'.$dsq.')#';
$ret = array();
- for ($i = 0; $i < count($files); $i++) {
- if (preg_match("#^$patterns\$#", $files[$i])) {
+ $files_count = count($files);
+ for ($i = 0; $i < $files_count; $i++) {
+ // only search in the part of the file below the current directory
+ $filepart = basename($files[$i]);
+ if (preg_match($pattern, $filepart)) {
$ret[] = $files[$i];
}
}
@@ -53915,9 +54398,7 @@ class System
}
return $files;
}
-}
-?>
-
+}
Name: @rpm_package@
Version: @version@
Release: 1
@@ -53989,436 +54470,7 @@ cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
%defattr(-,root,root)
%doc @doc_files@
/
-
-<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0">
-<package version="1.0" packagerversion="1.6.1">
- <name>PEAR</name>
- <summary>PEAR Base System</summary>
- <description>The PEAR package contains:
- * the PEAR installer, for creating, distributing
- and installing packages
- * the PEAR_Exception PHP5 error handling mechanism
- * the PEAR_ErrorStack advanced error handling mechanism
- * the PEAR_Error error handling mechanism
- * the OS_Guess class for retrieving info about the OS
- where PHP is running on
- * the System class for quick handling of common operations
- with files and directories
- * the PEAR base class
-
- Features in a nutshell:
- * full support for channels
- * pre-download dependency validation
- * new package.xml 2.0 format allows tremendous flexibility while maintaining BC
- * support for optional dependency groups and limited support for sub-packaging
- * robust dependency support
- * full dependency validation on uninstall
- * remote install for hosts with only ftp access - no more problems with
- restricted host installation
- * full support for mirroring
- * support for bundling several packages into a single tarball
- * support for static dependencies on a url-based package
- * support for custom file roles and installation tasks
- </description>
- <maintainers>
- <maintainer>
- <user>cellog</user>
- <name>Greg Beaver</name>
- <email>cellog@php.net</email>
- <role>lead</role>
- </maintainer>
- <maintainer>
- <user>pajoye</user>
- <name>Pierre-Alain Joye</name>
- <email>pierre@php.net</email>
- <role>lead</role>
- </maintainer>
- <maintainer>
- <user>ssb</user>
- <name>Stig Bakken</name>
- <email>stig@php.net</email>
- <role>lead</role>
- </maintainer>
- <maintainer>
- <user>cox</user>
- <name>Tomas V.V.Cox</name>
- <email>cox@idecnet.com</email>
- <role>lead</role>
- </maintainer>
- <maintainer>
- <user>cox</user>
- <name>Tias Guns</name>
- <email>tias@php.net</email>
- <role>developer</role>
- </maintainer>
- <maintainer>
- <user>timj</user>
- <name>Tim Jackson</name>
- <email>timj@php.net</email>
- <role>helper</role>
- </maintainer>
- <maintainer>
- <user>toggg</user>
- <name>Bertrand Gugger</name>
- <email>toggg@php.net</email>
- <role>helper</role>
- </maintainer>
- <maintainer>
- <user>mj</user>
- <name>Martin Jansen</name>
- <email>mj@php.net</email>
- <role>helper</role>
- </maintainer>
- </maintainers>
- <release>
- <version>1.6.1</version>
- <date>2007-06-23</date>
- <license>PHP License</license>
- <state>stable</state>
- <notes>Minor bugfix release
-* fix Bug #11251: &quot;pear config-create&quot; does not set download_dir
- [cellog]
-* fix Bug #11261: run-tests --cgi broken in several ways [cellog]
-* fix Bug #11233: error message does not specify which of
- temp_dir/download_dir needs to be change [cellog]
-* fix Bug #11302: code coverage option for run-tests not working [stoyan]
-* fix Bug #11317: Registry::hasWriteAccess loops endless [cellog]
-* fix Bug #11318: &quot;pear package&quot; ignores changelog items [cellog]
-* fix Bug #11321: run-tests should assume php-cgi in path if --cgi option
- is not set [cellog]
-* fix Bug #11336: REST 1.0 - 1.1 inconcistency [tias]
- </notes>
- <deps>
- <dep type="php" rel="ge" version="4.3.0"/>
- <dep type="pkg" rel="ge" version="1.3.3">PEAR</dep>
- <dep type="pkg" rel="ge" version="1.3.1">Archive_Tar</dep>
- <dep type="pkg" rel="ge" version="1.2">Console_Getopt</dep>
- <dep type="pkg" rel="ge" version="1.0.2">Structures_Graph</dep>
- <dep type="pkg" rel="ge" version="1.4.0" optional="yes">XML_RPC</dep>
- <dep type="pkg" rel="ge" version="0.5.0" optional="yes">PEAR_Frontend_Web</dep>
- <dep type="pkg" rel="ge" version="0.4.0" optional="yes">PEAR_Frontend_Gtk</dep>
- <dep type="ext" rel="has">xml</dep>
- <dep type="ext" rel="has">pcre</dep>
- </deps>
- <provides type="class" name="OS_Guess" />
- <provides type="class" name="System" />
- <provides type="function" name="md5_file" />
- <filelist>
- <file role="php" name="OS/Guess.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/ChannelFile/Parser.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Auth.xml"/>
- <file role="php" name="PEAR/Command/Auth.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Build.xml"/>
- <file role="php" name="PEAR/Command/Build.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Channels.xml"/>
- <file role="php" name="PEAR/Command/Channels.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Common.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Config.xml"/>
- <file role="php" name="PEAR/Command/Config.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Install.xml"/>
- <file role="php" name="PEAR/Command/Install.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Package.xml"/>
- <file role="php" name="PEAR/Command/Package.php">
- <replace from="@DATA-DIR@" to="data_dir" type="pear-config"/>
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Pickle.xml"/>
- <file role="php" name="PEAR/Command/Pickle.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Registry.xml"/>
- <file role="php" name="PEAR/Command/Registry.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Remote.xml"/>
- <file role="php" name="PEAR/Command/Remote.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Mirror.xml"/>
- <file role="php" name="PEAR/Command/Mirror.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command/Test.xml"/>
- <file role="php" name="PEAR/Command/Test.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Downloader/Package.php">
- <replace from="@PEAR-VER@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Frontend/CLI.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role/Common.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role/Data.xml"/>
- <file role="php" name="PEAR/Installer/Role/Data.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role/Doc.xml"/>
- <file role="php" name="PEAR/Installer/Role/Doc.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role/Ext.xml"/>
- <file role="php" name="PEAR/Installer/Role/Ext.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role/Php.xml"/>
- <file role="php" name="PEAR/Installer/Role/Php.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role/Script.xml"/>
- <file role="php" name="PEAR/Installer/Role/Script.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role/Src.xml"/>
- <file role="php" name="PEAR/Installer/Role/Src.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role/Test.xml"/>
- <file role="php" name="PEAR/Installer/Role/Test.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer/Role.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile/Generator/v1.php">
- <replace from="@PEAR-VER@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile/Generator/v2.php">
- <replace from="@PEAR-VER@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile/Parser/v1.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile/Parser/v2.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile/v2/rw.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile/v2/Validator.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile/v1.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile/v2.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/REST/10.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/REST/11.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/REST/13.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Postinstallscript/rw.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Replace/rw.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Unixeol/rw.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Windowseol/rw.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Common.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Postinstallscript.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Replace.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Unixeol.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Task/Windowseol.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Validator/PECL.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Autoloader.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Builder.php">
- <replace from="@PEAR-VER@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/ChannelFile.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Command.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Common.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Config.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Dependency.php"/>
- <file role="php" name="PEAR/DependencyDB.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Dependency2.php">
- <replace from="@PEAR-VER@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Downloader.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/ErrorStack.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Exception.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Frontend.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Installer.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Packager.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/PackageFile.php">
- <replace from="@PEAR-VER@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Registry.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Remote.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/REST.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/RunTest.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/Validate.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="php" name="PEAR/XMLParser.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="script" baseinstalldir="/" platform="!windows" install-as="pear" name="scripts/pear.sh">
- <replace from="@php_bin@" to="php_bin" type="pear-config"/>
- <replace from="@php_dir@" to="php_dir" type="pear-config"/>
- <replace from="@pear_version@" to="version" type="package-info"/>
- <replace from="@include_path@" to="php_dir" type="pear-config"/>
- </file>
- <file role="script" baseinstalldir="/" platform="!windows" install-as="peardev" name="scripts/peardev.sh">
- <replace from="@php_bin@" to="php_bin" type="pear-config"/>
- <replace from="@php_dir@" to="php_dir" type="pear-config"/>
- <replace from="@pear_version@" to="version" type="package-info"/>
- <replace from="@include_path@" to="php_dir" type="pear-config"/>
- </file>
- <file role="script" baseinstalldir="/" platform="!windows" install-as="pecl" name="scripts/pecl.sh">
- <replace from="@php_bin@" to="php_bin" type="pear-config"/>
- <replace from="@php_dir@" to="php_dir" type="pear-config"/>
- <replace from="@pear_version@" to="version" type="package-info"/>
- <replace from="@include_path@" to="php_dir" type="pear-config"/>
- </file>
- <file role="script" baseinstalldir="/" platform="windows" install-as="peardev.bat" name="scripts/peardev.bat">
- <replace from="@bin_dir@" to="bin_dir" type="pear-config"/>
- <replace from="@php_bin@" to="php_bin" type="pear-config"/>
- <replace from="@include_path@" to="php_dir" type="pear-config"/>
- </file>
- <file role="script" baseinstalldir="/" platform="windows" install-as="pear.bat" name="scripts/pear.bat">
- <replace from="@bin_dir@" to="bin_dir" type="pear-config"/>
- <replace from="@php_bin@" to="php_bin" type="pear-config"/>
- <replace from="@include_path@" to="php_dir" type="pear-config"/>
- </file>
- <file role="script" baseinstalldir="/" platform="windows" install-as="pecl.bat" name="scripts/pecl.bat">
- <replace from="@bin_dir@" to="bin_dir" type="pear-config"/>
- <replace from="@php_bin@" to="php_bin" type="pear-config"/>
- <replace from="@include_path@" to="php_dir" type="pear-config"/>
- </file>
- <file role="php" baseinstalldir="/" install-as="pearcmd.php" name="scripts/pearcmd.php">
- <replace from="@php_bin@" to="php_bin" type="pear-config"/>
- <replace from="@php_dir@" to="php_dir" type="pear-config"/>
- <replace from="@pear_version@" to="version" type="package-info"/>
- <replace from="@include_path@" to="php_dir" type="pear-config"/>
- </file>
- <file role="php" baseinstalldir="/" install-as="peclcmd.php" name="scripts/peclcmd.php">
- <replace from="@php_bin@" to="php_bin" type="pear-config"/>
- <replace from="@php_dir@" to="php_dir" type="pear-config"/>
- <replace from="@pear_version@" to="version" type="package-info"/>
- <replace from="@include_path@" to="php_dir" type="pear-config"/>
- </file>
- <file role="doc" baseinstalldir="/" name="INSTALL"/>
- <file role="data" baseinstalldir="/" name="package.dtd"/>
- <file role="data" baseinstalldir="/" name="template.spec"/>
- <file role="php" baseinstalldir="/" name="PEAR.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file role="doc" baseinstalldir="/" name="README"/>
- <file role="php" baseinstalldir="/" name="System.php">
- <replace from="@package_version@" to="version" type="package-info"/>
- </file>
- </filelist>
- </release>
- <changelog>
- <release>
- <version>1.6.0</version>
- <date>2007-06-07</date>
- <license>PHP License</license>
- <state>stable</state>
- <notes>Minor new feature/bugfix release
-* fix Bug #10846: Wont upgrade Text_Wiki from RC1 to RC2 [tias]
-* fix Bug #10857: Structures_Graph_Node::getMetadata: Requested
- key does not exist [cellog]
-* fix Bug #10865: using --packagingroot regression [tias/cellog]
-* fix Bug #10780: wrong output from PEAR_Exception [cellog]
-* fix Bug #10873: pear channel-discover broken - pear temp directories
- not writeable [cellog]
-* fix Bug #10938: Invalid package.xml creates wrong package [cellog]
-* fix Bug #10944: Cannot install Package+Subpackage [cipri]
-* fix Bug #11014: custom tasks with &quot;-&quot; in name cannot be
- packaged [cellog]
-* fix Bug #11181: pear requests channel.xml from main server instead from
- mirror [cellog]
-* implement Request #10182: add resolution of PHP dependency prior to download
- [cellog]
-* implement Request #10373: if pref_state=stable and installed package=beta,
- allow up to latest beta version [tias]
-* implement Request #10495: list-all with channel information etc [tias]
-* implement Request #10496: list with channel information [tias]
-* implement Request #10515: list-upgrades with channel information [tias]
-* implement Request #10659: search allchannels [tias]
-* implement Request #10812: list-categories and list-category [tias]
-* implement Request #11169: search with channel information [tias]
-* implement xdebug code coverage generation with pear run-tests --coverage
- [dufuz]
- </notes>
- </release>
- </changelog>
-</package>
-
+
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -54438,9 +54490,9 @@ cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: PEAR.php,v 1.101 2006/04/25 02:41:03 cellog Exp $
+ * @version CVS: $Id: PEAR.php,v 1.104 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -54513,7 +54565,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array();
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @see PEAR_Error
* @since Class available since PHP 4.0.2
@@ -54985,13 +55037,17 @@ class PEAR
} else {
$ec = 'PEAR_Error';
}
- if ($skipmsg) {
- $a = &new $ec($code, $mode, $options, $userinfo);
+ if (intval(PHP_VERSION) < 5) {
+ // little non-eval hack to fix bug #12147
+ include 'phar://install-pear-nozlib.phar/' . 'PEAR/FixPHP5PEARWarnings.php';
return $a;
+ }
+ if ($skipmsg) {
+ $a = new $ec($code, $mode, $options, $userinfo);
} else {
- $a = &new $ec($message, $code, $mode, $options, $userinfo);
- return $a;
+ $a = new $ec($message, $code, $mode, $options, $userinfo);
}
+ return $a;
}
// }}}
@@ -55234,7 +55290,7 @@ function _PEAR_call_destructors()
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/manual/en/core.pear.pear-error.php
* @see PEAR::raiseError(), PEAR::throwError()
* @since Class available since PHP 4.0.2
@@ -55468,6 +55524,12 @@ class PEAR_Error
// }}}
// {{{ toString()
+ function __toString()
+ {
+ return $this->getMessage();
+ }
+ // }}}
+ // {{{ toString()
/**
* Make a string representation of this object.
@@ -55541,9 +55603,9 @@ class PEAR_Error
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: ChannelFile.php,v 1.79 2007/05/19 23:46:06 cellog Exp $
+ * @version CVS: $Id: ChannelFile.php,v 1.80 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -55678,9 +55740,9 @@ $GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server');
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -57156,9 +57218,9 @@ class PEAR_ChannelFile {
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Parser.php,v 1.4 2006/01/06 04:47:36 cellog Exp $
+ * @version CVS: $Id: Parser.php,v 1.5 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -57173,9 +57235,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -57229,9 +57291,9 @@ class PEAR_ChannelFile_Parser extends PEAR_XMLParser
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Command.php,v 1.38 2006/10/31 02:54:40 cellog Exp $
+ * @version CVS: $Id: Command.php,v 1.39 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -57313,9 +57375,9 @@ $GLOBALS['_PEAR_Command_objects'] = array();
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -57645,9 +57707,9 @@ class PEAR_Command
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Common.php,v 1.35 2006/06/08 22:25:18 pajoye Exp $
+ * @version CVS: $Id: Common.php,v 1.36 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -57664,9 +57726,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -57936,9 +57998,9 @@ class PEAR_Command_Common extends PEAR
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Install.php,v 1.132 2007/06/11 05:32:14 cellog Exp $
+ * @version CVS: $Id: Install.php,v 1.140 2008/01/29 03:21:01 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -57956,9 +58018,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Command/Common.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -58269,10 +58331,6 @@ Run post-installation scripts in package <package>, if any exist.
if (PEAR::isError($ini)) {
return $ini;
}
- $fp = @fopen($phpini, 'wb');
- if (!$fp) {
- return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing');
- }
$line = 0;
if ($type == 'extsrc' || $type == 'extbin') {
$search = 'extensions';
@@ -58306,6 +58364,10 @@ Run post-installation scripts in package <package>, if any exist.
$newini[] = $enable . '="' . $binary . '"' . (OS_UNIX ? "\n" : "\r\n");
}
$newini = array_merge($newini, array_slice($ini['all'], $line));
+ $fp = @fopen($phpini, 'wb');
+ if (!$fp) {
+ return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing');
+ }
foreach ($newini as $line) {
fwrite($fp, $line);
}
@@ -58438,7 +58500,7 @@ Run post-installation scripts in package <package>, if any exist.
function doInstall($command, $options, $params)
{
- if (!class_exists('PEAR/PackageFile.php')) {
+ if (!class_exists('PEAR_PackageFile')) {
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';
}
if (empty($this->installer)) {
@@ -58485,7 +58547,7 @@ Run post-installation scripts in package <package>, if any exist.
continue;
}
if ($reg->packageExists($pf->getPackage(), $pf->getChannel()) &&
- version_compare($pf->getVersion(),
+ version_compare($pf->getVersion(),
$reg->packageInfo($pf->getPackage(), 'version', $pf->getChannel()),
'<=')) {
if ($this->config->get('verbose')) {
@@ -58530,10 +58592,14 @@ Run post-installation scripts in package <package>, if any exist.
}
}
}
- $abstractpackages =
+ $abstractpackages =
+ array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages);
+ } elseif (count($abstractpackages)) {
+ $abstractpackages =
array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages);
}
+
$packages = array_merge($abstractpackages, $otherpackages);
if (!count($packages)) {
$this->ui->outputData('Nothing to ' . $command);
@@ -58542,6 +58608,7 @@ Run post-installation scripts in package <package>, if any exist.
$this->downloader = &$this->getDownloader($this->ui, $options, $this->config);
$errors = array();
+ $binaries = array();
$downloaded = array();
$downloaded = &$this->downloader->download($packages);
if (PEAR::isError($downloaded)) {
@@ -58577,6 +58644,7 @@ Run post-installation scripts in package <package>, if any exist.
return true;
}
$extrainfo = array();
+ $binaries = array();
foreach ($downloaded as $param) {
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$info = $this->installer->install($param, $options);
@@ -58606,6 +58674,7 @@ Run post-installation scripts in package <package>, if any exist.
} else {
$instpkg = &$instreg->getPackage($pkg->getPackage(), $pkg->getChannel());
}
+
foreach ($instpkg->getFilelist() as $name => $atts) {
$pinfo = pathinfo($atts['installed_as']);
if (!isset($pinfo['extension']) ||
@@ -58622,29 +58691,31 @@ Run post-installation scripts in package <package>, if any exist.
break;
}
}
- foreach ($binaries as $pinfo) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($ret)) {
- $extrainfo[] = $ret->getMessage();
- if ($param->getPackageType() == 'extsrc' ||
- $param->getPackageType() == 'extbin') {
- $exttype = 'extension';
+ if (count($binaries)) {
+ foreach ($binaries as $pinfo) {
+ PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
+ $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType());
+ PEAR::staticPopErrorHandling();
+ if (PEAR::isError($ret)) {
+ $extrainfo[] = $ret->getMessage();
+ if ($param->getPackageType() == 'extsrc' ||
+ $param->getPackageType() == 'extbin') {
+ $exttype = 'extension';
+ } else {
+ ob_start();
+ phpinfo(INFO_GENERAL);
+ $info = ob_get_contents();
+ ob_end_clean();
+ $debug = function_exists('leak') ? '_debug' : '';
+ $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : '';
+ $exttype = 'zend_extension' . $debug . $ts;
+ }
+ $extrainfo[] = 'You should add "' . $exttype . '=' .
+ $pinfo[1]['basename'] . '" to php.ini';
} else {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : '';
- $exttype = 'zend_extension' . $debug . $ts;
+ $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() .
+ ' enabled in php.ini';
}
- $extrainfo[] = 'You should add "' . $exttype . '=' .
- $pinfo[1]['basename'] . '" to php.ini';
- } else {
- $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() .
- ' enabled in php.ini';
}
}
}
@@ -58774,6 +58845,7 @@ Run post-installation scripts in package <package>, if any exist.
}
$reg = &$this->config->getRegistry();
$newparams = array();
+ $binaries = array();
$badparams = array();
foreach ($params as $pkg) {
$channel = $this->config->get('default_channel');
@@ -58832,6 +58904,7 @@ Run post-installation scripts in package <package>, if any exist.
// for circular dependencies like subpackages
$this->installer->setUninstallPackages($newparams);
$params = array_merge($params, $badparams);
+ $binaries = array();
foreach ($params as $pkg) {
$this->installer->pushErrorHandling(PEAR_ERROR_RETURN);
if ($err = $this->installer->uninstall($pkg, $options)) {
@@ -58847,6 +58920,7 @@ Run post-installation scripts in package <package>, if any exist.
if ($instbin = $pkg->getInstalledBinary()) {
continue; // this will be uninstalled later
}
+
foreach ($pkg->getFilelist() as $name => $atts) {
$pinfo = pathinfo($atts['installed_as']);
if (!isset($pinfo['extension']) ||
@@ -58863,29 +58937,31 @@ Run post-installation scripts in package <package>, if any exist.
break;
}
}
- foreach ($binaries as $pinfo) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($ret)) {
- $extrainfo[] = $ret->getMessage();
- if ($pkg->getPackageType() == 'extsrc' ||
- $pkg->getPackageType() == 'extbin') {
- $exttype = 'extension';
+ if (count($binaries)) {
+ foreach ($binaries as $pinfo) {
+ PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
+ $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType());
+ PEAR::staticPopErrorHandling();
+ if (PEAR::isError($ret)) {
+ $extrainfo[] = $ret->getMessage();
+ if ($pkg->getPackageType() == 'extsrc' ||
+ $pkg->getPackageType() == 'extbin') {
+ $exttype = 'extension';
+ } else {
+ ob_start();
+ phpinfo(INFO_GENERAL);
+ $info = ob_get_contents();
+ ob_end_clean();
+ $debug = function_exists('leak') ? '_debug' : '';
+ $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : '';
+ $exttype = 'zend_extension' . $debug . $ts;
+ }
+ $this->ui->outputData('Unable to remove "' . $exttype . '=' .
+ $pinfo[1]['basename'] . '" from php.ini', $command);
} else {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : '';
- $exttype = 'zend_extension' . $debug . $ts;
+ $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() .
+ ' disabled in php.ini', $command);
}
- $this->ui->outputData('Unable to remove "' . $exttype . '=' .
- $pinfo[1]['basename'] . '" from php.ini', $command);
- } else {
- $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() .
- ' disabled in php.ini', $command);
}
}
}
@@ -58964,6 +59040,9 @@ Run post-installation scripts in package <package>, if any exist.
if (PEAR::isError($result)) {
return $result;
}
+ if (!isset($result[0])) {
+ return $this->raiseError('unable to unpack ' . $params[0]);
+ }
$pkgfile = &$result[0]->getPackageFile();
$pkgname = $pkgfile->getName();
$pkgversion = $pkgfile->getVersion();
@@ -59050,7 +59129,7 @@ Run post-installation scripts in package <package>, if any exist.
if ($dorest) {
$rest = &$this->config->getREST('1.0', array());
$installed = array_flip($reg->listPackages($channel));
- $latest = $rest->listLatestUpgrades($base,
+ $latest = $rest->listLatestUpgrades($base,
$this->config->get('preferred_state', null, $channel), $installed,
$channel, $reg);
} else {
@@ -59366,9 +59445,9 @@ Run post-installation scripts in package &lt;package&gt;, if any exist.
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Common.php,v 1.159 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: Common.php,v 1.160 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1.0
* @deprecated File deprecated since Release 1.4.0a1
@@ -59477,9 +59556,9 @@ $GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'p
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
* @deprecated This class will disappear, and its components will be spread
@@ -60490,9 +60569,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Config.php,v 1.137 2006/11/19 21:33:00 cellog Exp $
+ * @version CVS: $Id: Config.php,v 1.144 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -60607,6 +60686,22 @@ if (getenv('PHP_PEAR_DATA_DIR')) {
$PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data');
}
+// Default for cfg_dir
+if (getenv('PHP_PEAR_CFG_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_CFG_DIR', getenv('PHP_PEAR_CFG_DIR'));
+} else {
+ define('PEAR_CONFIG_DEFAULT_CFG_DIR',
+ $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'cfg');
+}
+
+// Default for www_dir
+if (getenv('PHP_PEAR_WWW_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_WWW_DIR', getenv('PHP_PEAR_WWW_DIR'));
+} else {
+ define('PEAR_CONFIG_DEFAULT_WWW_DIR',
+ $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www');
+}
+
// Default for test_dir
if (getenv('PHP_PEAR_TEST_DIR')) {
define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR'));
@@ -60709,9 +60804,9 @@ if (getenv('PHP_PEAR_SIG_KEYDIR')) {
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -60757,8 +60852,8 @@ class PEAR_Config extends PEAR
* @access private
*/
var $_channelConfigInfo = array(
- 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir',
- 'test_dir', 'php_bin', 'username', 'password', 'verbose',
+ 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir', 'cfg_dir',
+ 'test_dir', 'www_dir', 'php_bin', 'username', 'password', 'verbose',
'preferred_state', 'umask', 'preferred_mirror',
);
@@ -60893,6 +60988,20 @@ class PEAR_Config extends PEAR
'prompt' => 'PEAR data directory',
'group' => 'File Locations (Advanced)',
),
+ 'cfg_dir' => array(
+ 'type' => 'directory',
+ 'default' => PEAR_CONFIG_DEFAULT_CFG_DIR,
+ 'doc' => 'directory where modifiable configuration files are installed',
+ 'prompt' => 'PEAR configuration file directory',
+ 'group' => 'File Locations (Advanced)',
+ ),
+ 'www_dir' => array(
+ 'type' => 'directory',
+ 'default' => PEAR_CONFIG_DEFAULT_WWW_DIR,
+ 'doc' => 'directory where www frontend files (html/js) are installed',
+ 'prompt' => 'PEAR www files directory',
+ 'group' => 'File Locations (Advanced)',
+ ),
'test_dir' => array(
'type' => 'directory',
'default' => PEAR_CONFIG_DEFAULT_TEST_DIR,
@@ -60916,7 +61025,7 @@ class PEAR_Config extends PEAR
),
'download_dir' => array(
'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_CACHE_DIR,
+ 'default' => PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR,
'doc' => 'directory which is used for all downloaded files',
'prompt' => 'PEAR Installer download directory',
'group' => 'File Locations (Advanced)',
@@ -61095,6 +61204,25 @@ class PEAR_Config extends PEAR
}
// }}}
+ /**
+ * Return the default locations of user and system configuration files
+ * @static
+ */
+ function getDefaultConfigFiles()
+ {
+ $sl = DIRECTORY_SEPARATOR;
+ if (OS_WINDOWS) {
+ return array(
+ 'user' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini',
+ 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pearsys.ini'
+ );
+ } else {
+ return array(
+ 'user' => getenv('HOME') . $sl . '.pearrc',
+ 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.conf'
+ );
+ }
+ }
// {{{ singleton([file], [defaults_file])
/**
@@ -61523,12 +61651,18 @@ class PEAR_Config extends PEAR
// }}}
/**
+ * @param string Configuration class name, used for detecting duplicate calls
* @param array information on a role as parsed from its xml file
* @return true|PEAR_Error
* @access private
*/
- function _addConfigVars($vars)
+ function _addConfigVars($class, $vars)
{
+ static $called = array();
+ if (isset($called[$class])) {
+ return;
+ }
+ $called[$class] = 1;
if (count($vars) > 3) {
return $this->raiseError('Roles can only define 3 new config variables or less');
}
@@ -61914,7 +62048,7 @@ class PEAR_Config extends PEAR
}
}
}
- if (empty($this->configuration_info[$key])) {
+ if (!isset($this->configuration_info[$key])) {
return false;
}
extract($this->configuration_info[$key]);
@@ -62597,9 +62731,9 @@ class PEAR_Config extends PEAR
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Dependency2.php,v 1.55 2007/03/21 06:10:46 cellog Exp $
+ * @version CVS: $Id: Dependency2.php,v 1.56 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -62619,9 +62753,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -63109,7 +63243,7 @@ class PEAR_Dependency2
*/
function getPEARVersion()
{
- return '1.6.1';
+ return '1.7.1';
}
function validatePearinstallerDependency($dep)
@@ -63896,9 +64030,9 @@ class PEAR_Dependency2
* @package PEAR
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: DependencyDB.php,v 1.35 2007/01/06 04:03:32 cellog Exp $
+ * @version CVS: $Id: DependencyDB.php,v 1.37 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -63916,9 +64050,9 @@ $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array();
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Tomas V.V.Cox <cox@idec.net.com>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -64303,9 +64437,15 @@ class PEAR_DependencyDB
return $depdb;
}
$packages = $this->_registry->listAllPackages();
+ if (PEAR::isError($packages)) {
+ return $packages;
+ }
foreach ($packages as $channel => $ps) {
foreach ($ps as $package) {
$package = $this->_registry->getPackage($package, $channel);
+ if (PEAR::isError($package)) {
+ return $package;
+ }
$this->_setPackageDeps($depdb, $package);
}
}
@@ -64604,9 +64744,9 @@ class PEAR_DependencyDB
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Martin Jansen <mj@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Downloader.php,v 1.132 2007/06/11 05:30:38 cellog Exp $
+ * @version CVS: $Id: Downloader.php,v 1.137 2008/01/29 03:21:01 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.0
*/
@@ -64631,9 +64771,9 @@ define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2);
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Martin Jansen <mj@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.0
*/
@@ -64797,7 +64937,7 @@ class PEAR_Downloader extends PEAR_Common
return false;
}
list($a, $lastmodified) = $a;
- if (!class_exists('PEAR/ChannelFile.php')) {
+ if (!class_exists('PEAR_ChannelFile')) {
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
}
$b = new PEAR_ChannelFile;
@@ -64841,7 +64981,7 @@ class PEAR_Downloader extends PEAR_Common
*/
function &getDependency2Object(&$c, $i, $p, $s)
{
- if (!class_exists('PEAR/Dependency2.php')) {
+ if (!class_exists('PEAR_Dependency2')) {
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Dependency2.php';
}
$z = &new PEAR_Dependency2($c, $i, $p, $s);
@@ -65267,7 +65407,12 @@ class PEAR_Downloader extends PEAR_Common
return $this->_downloadDir;
}
$downloaddir = $this->config->get('download_dir');
- if (empty($downloaddir)) {
+ if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) {
+ if (is_dir($downloaddir) && !is_writable($downloaddir)) {
+ $this->log(0, 'WARNING: configuration download directory "' . $downloaddir .
+ '" is not writeable. Change download_dir config variable to ' .
+ 'a writeable dir to avoid this warning');
+ }
if (!class_exists('System')) {
require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
}
@@ -65371,8 +65516,10 @@ class PEAR_Downloader extends PEAR_Common
if (PEAR::isError($chan)) {
return $chan;
}
+ PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$version = $this->_registry->packageInfo($parr['package'], 'version',
$parr['channel']);
+ PEAR::staticPopErrorHandling();
$base2 = false;
if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
(($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror'))) ||
@@ -65384,6 +65531,7 @@ class PEAR_Downloader extends PEAR_Common
$rest = &$this->config->getREST('1.0', $this->_options);
}
if (!isset($parr['version']) && !isset($parr['state']) && $version
+ && !PEAR::isError($version)
&& !isset($this->_options['downloadonly'])) {
$url = $rest->getDownloadURL($base, $parr, $state, $version);
} else {
@@ -65404,15 +65552,12 @@ class PEAR_Downloader extends PEAR_Common
return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' .
'this should never happen');
}
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $testversion = $this->_registry->packageInfo($url['package'], 'version',
- $parr['channel']);
- PEAR::staticPopErrorHandling();
if (!isset($this->_options['force']) &&
!isset($this->_options['downloadonly']) &&
- !PEAR::isError($testversion) &&
+ $version &&
+ !PEAR::isError($version) &&
!isset($parr['group'])) {
- if (version_compare($testversion, $url['version'], '>=')) {
+ if (version_compare($version, $url['version'], '>=')) {
return PEAR::raiseError($this->_registry->parsedPackageNameToString(
$parr, true) . ' is already installed and is newer than detected ' .
'release version ' . $url['version'], -976);
@@ -66116,6 +66261,7 @@ class PEAR_Downloader extends PEAR_Common
* @param false|string|array $lastmodified header values to check against for caching
* use false to return the header values from this download
* @param false|array $accept Accept headers to send
+ * @param false|string $channel Channel to use for retrieving authentication
* @return string|array Returns the full path of the downloaded file or a PEAR
* error on failure. If the error is caused by
* socket-related errors, the error object will
@@ -66126,7 +66272,7 @@ class PEAR_Downloader extends PEAR_Common
* @access public
*/
function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null,
- $accept = false)
+ $accept = false, $channel = false)
{
static $redirect = 0;
// allways reset , so we are clean case of error
@@ -66218,11 +66364,11 @@ class PEAR_Downloader extends PEAR_Common
} else {
$ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
}
- $request .= $ifmodifiedsince . "User-Agent: PEAR/1.6.1/PHP/" .
+ $request .= $ifmodifiedsince . "User-Agent: PEAR/1.7.1/PHP/" .
PHP_VERSION . "\r\n";
if (isset($this)) { // only pass in authentication for non-static calls
- $username = $config->get('username');
- $password = $config->get('password');
+ $username = $config->get('username', null, $channel);
+ $password = $config->get('password', null, $channel);
if ($username && $password) {
$tmp = base64_encode("$username:$password");
$request .= "Authorization: Basic $tmp\r\n";
@@ -66347,9 +66493,9 @@ class PEAR_Downloader extends PEAR_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Package.php,v 1.110 2007/05/31 03:51:08 cellog Exp $
+ * @version CVS: $Id: Package.php,v 1.112 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -66386,9 +66532,9 @@ define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004);
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -67801,7 +67947,7 @@ class PEAR_Downloader_Package
}
$this->_downloader->log(3, 'Downloading "' . $param . '"');
$file = $this->_downloader->downloadHttp($param, $this->_downloader->ui,
- $dir, $callback);
+ $dir, $callback, null, false, $this->getChannel());
$this->_downloader->popErrorHandling();
if (PEAR::isError($file)) {
if (!empty($saveparam)) {
@@ -68206,9 +68352,9 @@ class PEAR_Downloader_Package
* @category Debugging
* @package PEAR_ErrorStack
* @author Greg Beaver <cellog@php.net>
- * @copyright 2004-2006 Greg Beaver
+ * @copyright 2004-2008 Greg Beaver
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: ErrorStack.php,v 1.27 2007/06/10 04:34:19 cellog Exp $
+ * @version CVS: $Id: ErrorStack.php,v 1.28 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
@@ -68317,12 +68463,12 @@ define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2);
* $local_stack = new PEAR_ErrorStack('MyPackage');
* </code>
* @author Greg Beaver <cellog@php.net>
- * @version 1.6.1
+ * @version 1.7.1
* @package PEAR_ErrorStack
* @category Debugging
- * @copyright 2004-2006 Greg Beaver
+ * @copyright 2004-2008 Greg Beaver
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: ErrorStack.php,v 1.27 2007/06/10 04:34:19 cellog Exp $
+ * @version CVS: $Id: ErrorStack.php,v 1.28 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
class PEAR_ErrorStack {
@@ -69183,9 +69329,9 @@ $stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Frontend.php,v 1.12 2007/05/31 03:51:08 cellog Exp $
+ * @version CVS: $Id: Frontend.php,v 1.13 2008/01/03 20:26:35 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -69208,9 +69354,9 @@ $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null;
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -69406,9 +69552,9 @@ class PEAR_Frontend extends PEAR
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: CLI.php,v 1.67 2007/03/14 13:42:24 timj Exp $
+ * @version CVS: $Id: CLI.php,v 1.68 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -69423,9 +69569,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Frontend.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -70202,9 +70348,9 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
* @author Tomas V.V. Cox <cox@idecnet.com>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Installer.php,v 1.245 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: Installer.php,v 1.251 2008/01/17 05:48:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -70226,9 +70372,9 @@ define('PEAR_INSTALLER_NOBINARY', -240);
* @author Tomas V.V. Cox <cox@idecnet.com>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -70425,6 +70571,10 @@ class PEAR_Installer extends PEAR_Downloader
$channel = $this->pkginfo->getChannel();
// {{{ assemble the destination paths
switch ($atts['role']) {
+ case 'src':
+ case 'extsrc':
+ $this->source_files++;
+ return;
case 'doc':
case 'data':
case 'test':
@@ -70439,10 +70589,6 @@ class PEAR_Installer extends PEAR_Downloader
case 'script':
$dest_dir = $this->config->get('bin_dir', null, $channel);
break;
- case 'src':
- case 'extsrc':
- $this->source_files++;
- return;
default:
return $this->raiseError("Invalid role `$atts[role]' for file $file");
}
@@ -70582,7 +70728,7 @@ class PEAR_Installer extends PEAR_Downloader
}
// {{{ check the md5
if (isset($md5sum)) {
- if (strtolower($md5sum) == strtolower($atts['md5sum'])) {
+ if (strtolower($md5sum) === strtolower($atts['md5sum'])) {
$this->log(2, "md5sum ok: $final_dest_file");
} else {
if (empty($options['force'])) {
@@ -70614,20 +70760,35 @@ class PEAR_Installer extends PEAR_Downloader
} else {
$mode = 0666 & ~(int)octdec($this->config->get('umask'));
}
- $this->addFileOperation("chmod", array($mode, $dest_file));
- if (!@chmod($dest_file, $mode)) {
- if (!isset($options['soft'])) {
- $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
+ if ($atts['role'] != 'src') {
+ $this->addFileOperation("chmod", array($mode, $dest_file));
+ if (!@chmod($dest_file, $mode)) {
+ if (!isset($options['soft'])) {
+ $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
+ }
}
}
}
// }}}
- $this->addFileOperation("rename", array($dest_file, $final_dest_file,
- $atts['role'] == 'ext'));
+ if ($atts['role'] == 'src') {
+ rename($dest_file, $final_dest_file);
+ $this->log(2, "renamed source file $dest_file to $final_dest_file");
+ } else {
+ $this->addFileOperation("rename", array($dest_file, $final_dest_file,
+ $atts['role'] == 'ext'));
+ }
}
// Store the full path where the file was installed for easy unistall
- $this->addFileOperation("installed_as", array($file, $installed_as,
- $save_destdir, dirname(substr($installedas_dest_file, strlen($save_destdir)))));
+ if ($atts['role'] != 'script') {
+ $loc = $this->config->get($atts['role'] . '_dir');
+ } else {
+ $loc = $this->config->get('bin_dir');
+ }
+ if ($atts['role'] != 'src') {
+ $this->addFileOperation("installed_as", array($file, $installed_as,
+ $loc,
+ dirname(substr($installedas_dest_file, strlen($loc)))));
+ }
//$this->log(2, "installed: $dest_file");
return PEAR_INSTALLER_OK;
@@ -70751,7 +70912,7 @@ class PEAR_Installer extends PEAR_Downloader
}
// {{{ check the md5
if (isset($md5sum)) {
- if (strtolower($md5sum) == strtolower($attribs['md5sum'])) {
+ if (strtolower($md5sum) === strtolower($attribs['md5sum'])) {
$this->log(2, "md5sum ok: $final_dest_file");
} else {
if (empty($options['force'])) {
@@ -70783,19 +70944,30 @@ class PEAR_Installer extends PEAR_Downloader
} else {
$mode = 0666 & ~(int)octdec($this->config->get('umask'));
}
- $this->addFileOperation("chmod", array($mode, $dest_file));
- if (!@chmod($dest_file, $mode)) {
- if (!isset($options['soft'])) {
- $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
+ if ($attribs['role'] != 'src') {
+ $this->addFileOperation("chmod", array($mode, $dest_file));
+ if (!@chmod($dest_file, $mode)) {
+ if (!isset($options['soft'])) {
+ $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
+ }
}
}
}
// }}}
- $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension()));
+ if ($attribs['role'] == 'src') {
+ rename($dest_file, $final_dest_file);
+ $this->log(2, "renamed source file $dest_file to $final_dest_file");
+ } else {
+ $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension()));
+ }
}
// Store the full path where the file was installed for easy uninstall
- $this->addFileOperation("installed_as", array($file, $installed_as,
- $save_destdir, dirname(substr($dest_file, strlen($save_destdir)))));
+ if ($attribs['role'] != 'src') {
+ $loc = $this->config->get($role->getLocationConfig(), null, $channel);
+ $this->addFileOperation("installed_as", array($file, $installed_as,
+ $loc,
+ dirname(substr($installed_as, strlen($loc)))));
+ }
//$this->log(2, "installed: $dest_file");
return PEAR_INSTALLER_OK;
@@ -71023,8 +71195,8 @@ class PEAR_Installer extends PEAR_Downloader
$this->_dirtree[dirname($data[1])] = true;
$this->pkginfo->setDirtree(dirname($data[1]));
- while(!empty($data[3]) && $data[3] != '/' && $data[3] != '\\'
- && $data[3] != '.') {
+ while(!empty($data[3]) && dirname($data[3]) != $data[3] &&
+ $data[3] != '/' && $data[3] != '\\') {
$this->pkginfo->setDirtree($pp =
$this->_prependPath($data[3], $data[2]));
$this->_dirtree[$pp] = true;
@@ -71476,7 +71648,8 @@ class PEAR_Installer extends PEAR_Downloader
}
}
}
- if ($res == PEAR_INSTALLER_OK) {
+ $real = isset($atts['attribs']) ? $atts['attribs'] : $atts;
+ if ($res == PEAR_INSTALLER_OK && $real['role'] != 'src') {
// Register files that were installed
$pkg->installedFile($file, $atts);
}
@@ -71876,9 +72049,9 @@ if (!function_exists("md5_file")) {
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Role.php,v 1.16 2006/10/31 02:54:41 cellog Exp $
+ * @version CVS: $Id: Role.php,v 1.20 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -71892,9 +72065,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -71917,7 +72090,7 @@ class PEAR_Installer_Role
if (!$info['config_vars']) {
continue;
}
- $config->_addConfigVars($info['config_vars']);
+ $config->_addConfigVars($class, $info['config_vars']);
}
}
@@ -72082,11 +72255,11 @@ class PEAR_Installer_Role
$dir = dirname(__FILE__) . '/Role';
}
if (!file_exists($dir) || !is_dir($dir)) {
- return PEAR::raiseError("registerRoles: opendir($dir) failed");
+ return PEAR::raiseError("registerRoles: opendir($dir) failed: does not exist/is not directory");
}
$dp = @opendir($dir);
if (empty($dp)) {
- return PEAR::raiseError("registerRoles: opendir($dir) failed");
+ return PEAR::raiseError("registerRoles: opendir($dir) failed: $php_errmsg");
}
while ($entry = readdir($dp)) {
if ($entry{0} == '.' || substr($entry, -4) != '.xml') {
@@ -72146,7 +72319,7 @@ class PEAR_Installer_Role
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72308,9 +72481,9 @@ class PEAR_Installer_Role_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Data.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Data.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -72319,9 +72492,9 @@ class PEAR_Installer_Role_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72355,9 +72528,9 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Doc.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Doc.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -72366,9 +72539,9 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72402,9 +72575,9 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Php.php,v 1.7 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Php.php,v 1.8 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -72413,9 +72586,9 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72449,9 +72622,9 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Script.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Script.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -72460,9 +72633,9 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72496,9 +72669,9 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Test.php,v 1.6 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Test.php,v 1.7 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -72507,9 +72680,9 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72543,9 +72716,9 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: PackageFile.php,v 1.40 2006/09/25 05:12:21 cellog Exp $
+ * @version CVS: $Id: PackageFile.php,v 1.41 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -72569,9 +72742,9 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2);
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -73017,9 +73190,9 @@ class PEAR_PackageFile
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v1.php,v 1.72 2006/05/10 02:56:19 cellog Exp $
+ * @version CVS: $Id: v1.php,v 1.74 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -73037,9 +73210,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -73056,7 +73229,7 @@ class PEAR_PackageFile_Generator_v1
function getPackagerVersion()
{
- return '1.6.1';
+ return '1.7.1';
}
/**
@@ -73210,7 +73383,7 @@ class PEAR_PackageFile_Generator_v1
);
$ret = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
$ret .= "<!DOCTYPE package SYSTEM \"http://pear.php.net/dtd/package-1.0\">\n";
- $ret .= "<package version=\"1.0\" packagerversion=\"1.6.1\">\n" .
+ $ret .= "<package version=\"1.0\" packagerversion=\"1.7.1\">\n" .
" <name>$pkginfo[package]</name>";
if (isset($pkginfo['extends'])) {
$ret .= "\n<extends>$pkginfo[extends]</extends>";
@@ -73704,7 +73877,7 @@ class PEAR_PackageFile_Generator_v1
$peardep = array('pearinstaller' =>
array('min' => '1.4.0b1')); // this is a lot safer
$required = $optional = array();
- $release['dependencies'] = array();
+ $release['dependencies'] = array('required' => array());
if ($this->_packagefile->hasDeps()) {
foreach ($this->_packagefile->getDeps() as $dep) {
if (!isset($dep['optional']) || $dep['optional'] == 'no') {
@@ -74289,9 +74462,9 @@ class PEAR_PackageFile_Generator_v1
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Stephan Schmidt (original XML_Serializer code)
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v2.php,v 1.37 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: v2.php,v 1.38 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -74308,9 +74481,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Stephan Schmidt (original XML_Serializer code)
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -74389,7 +74562,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
*/
function getPackagerVersion()
{
- return '1.6.1';
+ return '1.7.1';
}
/**
@@ -74629,7 +74802,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
}
$this->options['beautifyFilelist'] = true;
}
- $arr['attribs']['packagerversion'] = '1.6.1';
+ $arr['attribs']['packagerversion'] = '1.7.1';
if ($this->serialize($arr, $options)) {
return $this->_serializedData . "\n";
}
@@ -75148,7 +75321,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
// | Authors: Stephan Schmidt <schst@php-tools.net> |
// +----------------------------------------------------------------------+
//
-// $Id: v2.php,v 1.37 2007/06/10 04:16:51 cellog Exp $
+// $Id: v2.php,v 1.38 2008/01/03 20:26:37 cellog Exp $
/**
* error code for invalid chars in XML name
@@ -75816,9 +75989,9 @@ class PEAR_PackageFile_Generator_v2_XML_Util {
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v1.php,v 1.22 2006/03/27 05:25:48 cellog Exp $
+ * @version CVS: $Id: v1.php,v 1.27 2008/01/03 20:55:16 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -75831,9 +76004,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v1.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -75869,14 +76042,15 @@ class PEAR_PackageFile_Parser_v1
* @param string contents of package.xml file, version 1.0
* @return bool success of parsing
*/
- function parse($data, $file, $archive = false)
+ function &parse($data, $file, $archive = false)
{
if (!extension_loaded('xml')) {
return PEAR::raiseError('Cannot create xml parser for parsing package.xml, no xml extension');
}
$xp = xml_parser_create();
if (!$xp) {
- return PEAR::raiseError('Cannot create xml parser for parsing package.xml');
+ $a = &PEAR::raiseError('Cannot create xml parser for parsing package.xml');
+ return $a;
}
xml_set_object($xp, $this);
xml_set_element_handler($xp, '_element_start_1_0', '_element_end_1_0');
@@ -75899,8 +76073,9 @@ class PEAR_PackageFile_Parser_v1
$code = xml_get_error_code($xp);
$line = xml_get_current_line_number($xp);
xml_parser_free($xp);
- return PEAR::raiseError(sprintf("XML error: %s at line %d",
+ $a = &PEAR::raiseError(sprintf("XML error: %s at line %d",
$str = xml_error_string($code), $line), 2);
+ return $a;
}
xml_parser_free($xp);
@@ -75935,6 +76110,8 @@ class PEAR_PackageFile_Parser_v1
foreach (explode("\n", $str) as $line) {
if (substr($line, 0, $indent_len) == $indent) {
$data .= substr($line, $indent_len) . "\n";
+ } elseif (trim(substr($line, 0, $indent_len))) {
+ $data .= ltrim($line);
}
}
return $data;
@@ -75970,7 +76147,7 @@ class PEAR_PackageFile_Parser_v1
if (array_key_exists('name', $attribs) && $attribs['name'] != '/') {
$attribs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
$attribs['name']);
- if (strrpos($attribs['name'], '/') == strlen($attribs['name']) - 1) {
+ if (strrpos($attribs['name'], '/') === strlen($attribs['name']) - 1) {
$attribs['name'] = substr($attribs['name'], 0,
strlen($attribs['name']) - 1);
}
@@ -76276,9 +76453,9 @@ class PEAR_PackageFile_Parser_v1
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v2.php,v 1.20 2007/06/16 19:13:24 cellog Exp $
+ * @version CVS: $Id: v2.php,v 1.21 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -76292,9 +76469,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -76392,9 +76569,9 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v1.php,v 1.73 2007/05/10 00:00:38 cellog Exp $
+ * @version CVS: $Id: v1.php,v 1.74 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -76658,9 +76835,9 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME', 52);
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -78010,9 +78187,9 @@ class PEAR_PackageFile_v1
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: v2.php,v 1.140 2007/06/03 04:22:13 cellog Exp $
+ * @version CVS: $Id: v2.php,v 1.141 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -78024,9 +78201,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ErrorStack.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -80038,29 +80215,37 @@ class PEAR_PackageFile_v2
}
?>
<?php
-//
-// +----------------------------------------------------------------------+
-// | PHP Version 5 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available through the world-wide-web at the following url: |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Author: Greg Beaver <cellog@php.net> |
-// | |
-// +----------------------------------------------------------------------+
-//
-// $Id: Validator.php,v 1.102 2007/06/10 04:16:51 cellog Exp $
+/**
+ * PEAR_PackageFile_v2, package.xml version 2.0, read/write version
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt. If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version CVS: $Id: Validator.php,v 1.103 2008/01/03 20:26:37 cellog Exp $
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.4.0a8
+ */
/**
* Private validation class used by PEAR_PackageFile_v2 - do not use directly, its
* sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller
- * @author Greg Beaver <cellog@php.net>
+ * @category pear
+ * @package PEAR
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2008 The PHP Group
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version Release: 1.7.1
+ * @link http://pear.php.net/package/PEAR
+ * @since Class available since Release 1.4.0a8
* @access private
*/
class PEAR_PackageFile_v2_Validator
@@ -80148,7 +80333,7 @@ class PEAR_PackageFile_v2_Validator
isset($test['dependencies']['required']) &&
isset($test['dependencies']['required']['pearinstaller']) &&
isset($test['dependencies']['required']['pearinstaller']['min']) &&
- version_compare('1.6.1',
+ version_compare('1.7.1',
$test['dependencies']['required']['pearinstaller']['min'], '<')) {
$this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
return false;
@@ -81385,7 +81570,7 @@ class PEAR_PackageFile_v2_Validator
$this->_stack->push(__FUNCTION__, 'error',
array('version' => $version),
'This package.xml requires PEAR version %version% to parse properly, we are ' .
- 'version 1.6.1');
+ 'version 1.7.1');
}
function _invalidTagOrder($oktags, $actual, $root)
@@ -82154,9 +82339,9 @@ class PEAR_PackageFile_v2_Validator
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Registry.php,v 1.166 2007/06/16 18:41:59 cellog Exp $
+ * @version CVS: $Id: Registry.php,v 1.170 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -82180,9 +82365,9 @@ define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6);
* @author Stig Bakken <ssb@php.net>
* @author Tomas V. V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -82934,6 +83119,7 @@ class PEAR_Registry extends PEAR
}
if (!is_resource($this->lock_fp)) {
+ $this->lock_fp = null;
return $this->raiseError("could not create lock file" .
(isset($php_errormsg) ? ": " . $php_errormsg : ""));
}
@@ -82944,6 +83130,9 @@ class PEAR_Registry extends PEAR
case LOCK_UN: $str = 'unlock'; break;
default: $str = 'unknown'; break;
}
+ //is resource at this point, close it on error.
+ fclose($this->lock_fp);
+ $this->lock_fp = null;
return $this->raiseError("could not acquire $str lock ($this->lockfile)",
PEAR_REGISTRY_ERROR_LOCK);
}
@@ -83255,8 +83444,8 @@ class PEAR_Registry extends PEAR
}
if (!in_array('__uri', $channellist)) {
$channellist[] = '__uri';
- }
-
+ }
+
natsort($channellist);
return $channellist;
}
@@ -83906,10 +84095,10 @@ class PEAR_Registry extends PEAR
return $e;
}
$ret = &$this->_getChannel($channel, $noaliases);
+ $this->_unlock();
if (!$ret) {
return PEAR::raiseError('Unknown channel: ' . $channel);
}
- $this->_unlock();
return $ret;
}
@@ -84377,9 +84566,9 @@ class PEAR_Registry extends PEAR
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Remote.php,v 1.79 2006/03/27 04:33:11 cellog Exp $
+ * @version CVS: $Id: Remote.php,v 1.80 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -84401,9 +84590,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Config.php';
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -84874,9 +85063,9 @@ class PEAR_Remote extends PEAR
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: REST.php,v 1.22 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: REST.php,v 1.29 2008/01/31 23:42:04 timj Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -84893,9 +85082,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -85147,7 +85336,7 @@ class PEAR_REST
$path = $info['path'];
}
$proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
- if ($this->config->get('http_proxy')&&
+ if ($this->config->get('http_proxy')&&
$proxy = parse_url($this->config->get('http_proxy'))) {
$proxy_host = isset($proxy['host']) ? $proxy['host'] : null;
if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') {
@@ -85166,8 +85355,10 @@ class PEAR_REST
}
If (isset($proxy['host'])) {
$request = "GET $url HTTP/1.1\r\n";
+ $request .= 'Host: ' . $proxy['host'] . ":$port\r\n";
} else {
$request = "GET $path HTTP/1.1\r\n";
+ $request .= "Host: $host:$port\r\n";
}
$ifmodifiedsince = '';
@@ -85181,8 +85372,8 @@ class PEAR_REST
} else {
$ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
}
- $request .= "Host: $host:$port\r\n" . $ifmodifiedsince .
- "User-Agent: PEAR/1.6.1/PHP/" . PHP_VERSION . "\r\n";
+ $request .= $ifmodifiedsince .
+ "User-Agent: PEAR/1.7.1/PHP/" . PHP_VERSION . "\r\n";
$username = $this->config->get('username');
$password = $this->config->get('password');
if ($username && $password) {
@@ -85196,6 +85387,7 @@ class PEAR_REST
if ($accept) {
$request .= 'Accept: ' . implode(', ', $accept) . "\r\n";
}
+ $request .= "Accept-Encoding:\r\n";
$request .= "Connection: close\r\n";
$request .= "\r\n";
if ($proxy_host != '') {
@@ -85269,9 +85461,9 @@ class PEAR_REST
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: 10.php,v 1.50 2007/08/17 19:49:34 dufuz Exp $
+ * @version CVS: $Id: 10.php,v 1.52 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -85287,9 +85479,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/REST.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a12
*/
@@ -85397,8 +85589,6 @@ class PEAR_REST_10
$exclude = array();
$min = $max = $recommended = false;
if ($xsdversion == '1.0') {
- $pinfo['package'] = $dependency['name'];
- $pinfo['channel'] = 'pear.php.net'; // this is always true - don't change this
switch ($dependency['rel']) {
case 'ge' :
$min = $dependency['version'];
@@ -85422,7 +85612,6 @@ class PEAR_REST_10
break;
}
} else {
- $pinfo['package'] = $dependency['name'];
$min = isset($dependency['min']) ? $dependency['min'] : false;
$max = isset($dependency['max']) ? $dependency['max'] : false;
$recommended = isset($dependency['recommended']) ?
@@ -86063,6 +86252,8 @@ class PEAR_Start extends PEAR
{
var $bin_dir;
var $data_dir;
+ var $cfg_dir;
+ var $www_dir;
var $install_pfc;
var $corePackages =
array(
@@ -86096,6 +86287,8 @@ class PEAR_Start extends PEAR
'php_dir',
'doc_dir',
'data_dir',
+ 'cfg_dir',
+ 'www_dir',
'test_dir',
'temp_dir',
'download_dir',
@@ -86112,6 +86305,8 @@ class PEAR_Start extends PEAR
'php_dir' => 'PHP code directory ($php_dir)',
'doc_dir' => 'Documentation directory',
'data_dir' => 'Data directory',
+ 'cfg_dir' => 'User-modifiable configuration files directory',
+ 'www_dir' => 'Public Web Files directory',
'test_dir' => 'Tests directory',
'pear_conf' => 'Name of configuration file',
);
@@ -86141,14 +86336,12 @@ class PEAR_Start extends PEAR
$this->temp_dir = '$prefix\tmp';
$this->download_dir = '$prefix\tmp';
$this->php_dir = '$prefix\pear';
- $this->doc_dir = '$php_dir\docs';
- $this->data_dir = '$php_dir\data';
- $this->test_dir = '$php_dir\tests';
- if (OS_WINDOWS) {
- $this->pear_conf = PEAR_CONFIG_SYSCONFDIR . '\\pear.ini';
- } else {
- $this->pear_conf = PEAR_CONFIG_SYSCONFDIR . '/pear.conf';
- }
+ $this->doc_dir = '$prefix\docs';
+ $this->data_dir = '$prefix\data';
+ $this->test_dir = '$prefix\tests';
+ $this->www_dir = '$prefix\www';
+ $this->cfg_dir = '$prefix\cfg';
+ $this->pear_conf = PEAR_CONFIG_SYSCONFDIR . '\\pear.ini';
/*
* Detects php.exe
*/
@@ -86185,16 +86378,20 @@ class PEAR_Start extends PEAR
}
} else {
$this->prefix = dirname(PHP_BINDIR);
+ $this->pear_conf = PEAR_CONFIG_SYSCONFDIR . '/pear.conf';
if (get_current_user() != 'root') {
$this->prefix = $this->safeGetenv('HOME') . '/pear';
+ $this->pear_conf = $this->safeGetenv('HOME') . '.pearrc';
}
$this->bin_dir = '$prefix/bin';
$this->php_dir = '$prefix/share/pear';
$this->temp_dir = '/tmp/pear/install';
$this->download_dir = '/tmp/pear/install';
- $this->doc_dir = '$php_dir/docs';
- $this->data_dir = '$php_dir/data';
- $this->test_dir = '$php_dir/tests';
+ $this->doc_dir = '$prefix/docs';
+ $this->www_dir = '$prefix/www';
+ $this->cfg_dir = '$prefix/cfg';
+ $this->data_dir = '$prefix/data';
+ $this->test_dir = '$prefix/tests';
// check if the user has installed PHP with PHP or GNU layout
if (@is_dir("$this->prefix/lib/php/.registry")) {
$this->php_dir = '$prefix/lib/php';
@@ -87075,9 +87272,9 @@ Double-click this file to add it to the current user registry.
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Common.php,v 1.16 2006/11/12 05:02:41 cellog Exp $
+ * @version CVS: $Id: Common.php,v 1.17 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -87113,9 +87310,9 @@ define('PEAR_TASK_PACKAGEANDINSTALL', 3);
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
* @abstract
@@ -87282,9 +87479,9 @@ class PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Postinstallscript.php,v 1.18 2006/02/08 01:21:47 cellog Exp $
+ * @version CVS: $Id: Postinstallscript.php,v 1.19 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -87300,9 +87497,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -87610,9 +87807,9 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.11 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.12 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -87625,9 +87822,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Postinstallscript.p
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -87785,9 +87982,9 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Replace.php,v 1.15 2006/03/02 18:14:13 cellog Exp $
+ * @version CVS: $Id: Replace.php,v 1.16 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -87800,9 +87997,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -87966,9 +88163,9 @@ class PEAR_Task_Replace extends PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.3 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.4 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -87981,9 +88178,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Replace.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -88032,9 +88229,9 @@ class PEAR_Task_Replace_rw extends PEAR_Task_Replace
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Unixeol.php,v 1.8 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Unixeol.php,v 1.9 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -88047,9 +88244,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -88114,9 +88311,9 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.4 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.5 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -88129,9 +88326,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Unixeol.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -88175,9 +88372,9 @@ class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Windowseol.php,v 1.7 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Windowseol.php,v 1.8 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -88190,9 +88387,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -88257,9 +88454,9 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: rw.php,v 1.4 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: rw.php,v 1.5 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -88272,9 +88469,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Windowseol.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -88318,9 +88515,9 @@ class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Validate.php,v 1.51 2007/06/10 04:16:51 cellog Exp $
+ * @version CVS: $Id: Validate.php,v 1.52 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -88341,9 +88538,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validator/PECL.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -88948,7 +89145,7 @@ class PEAR_Validate
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: PECL.php,v 1.8 2006/05/12 02:38:58 cellog Exp $
+ * @version CVS: $Id: PECL.php,v 1.9 2008/01/03 20:26:37 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a5
*/
@@ -88961,9 +89158,9 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a5
*/
@@ -89001,7 +89198,7 @@ class PEAR_Validator_PECL extends PEAR_Validate
}
?><?php
/**
- * PEAR_FTP
+ * PEAR_XMLParser
*
* PHP versions 4 and 5
*
@@ -89015,9 +89212,9 @@ class PEAR_Validator_PECL extends PEAR_Validate
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Stephan Schmidt (original XML_Unserializer code)
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: XMLParser.php,v 1.12 2006/03/27 04:39:03 cellog Exp $
+ * @version CVS: $Id: XMLParser.php,v 1.13 2008/01/03 20:26:36 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -89028,9 +89225,9 @@ class PEAR_Validator_PECL extends PEAR_Validate
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @author Stephan Schmidt (original XML_Unserializer code)
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.6.1
+ * @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -94464,9 +94661,9 @@ as well as for characteristic extraction from the graph topology.
* @category pear
* @package System
* @author Tomas V.V.Cox <cox@idecnet.com>
- * @copyright 1997-2006 The PHP Group
+ * @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: System.php,v 1.57 2007/08/17 19:55:55 dufuz Exp $
+ * @version CVS: $Id: System.php,v 1.62 2008/01/03 20:26:34 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -94508,9 +94705,10 @@ $GLOBALS['_System_temp_files'] = array();
* @author Tomas V.V. Cox <cox@idecnet.com>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
-* @version Release: 1.6.1
+* @version Release: 1.7.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
+* @static
*/
class System
{
@@ -94521,6 +94719,7 @@ class System
* @param string $short_options the allowed option short-tags
* @param string $long_options the allowed option long-tags
* @return array the given options and there values
+ * @static
* @access private
*/
function _parseArgs($argv, $short_options, $long_options = null)
@@ -94537,6 +94736,7 @@ class System
*
* @param mixed $error a PEAR error or a string with the error message
* @return bool false
+ * @static
* @access private
*/
function raiseError($error)
@@ -94568,15 +94768,19 @@ class System
* @param string $sPath Name of the directory
* @param integer $maxinst max. deep of the lookup
* @param integer $aktinst starting deep of the lookup
+ * @param bool $silent if true, do not emit errors.
* @return array the structure of the dir
+ * @static
* @access private
*/
- function _dirToStruct($sPath, $maxinst, $aktinst = 0)
+ function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
{
$struct = array('dirs' => array(), 'files' => array());
if (($dir = @opendir($sPath)) === false) {
- System::raiseError("Could not open dir $sPath");
+ if (!$silent) {
+ System::raiseError("Could not open dir $sPath");
+ }
return $struct; // XXX could not open error
}
$struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ?
@@ -94592,7 +94796,7 @@ class System
foreach ($list as $val) {
$path = $sPath . DIRECTORY_SEPARATOR . $val;
if (is_dir($path) && !is_link($path)) {
- $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1);
+ $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1, $silent);
$struct = array_merge_recursive($tmp, $struct);
} else {
$struct['files'][] = $path;
@@ -94607,6 +94811,7 @@ class System
*
* @param array $files Array listing files and dirs
* @return array
+ * @static
* @see System::_dirToStruct()
*/
function _multipleToStruct($files)
@@ -94630,6 +94835,7 @@ class System
*
* @param string $args the arguments for rm
* @return mixed PEAR_Error or true for success
+ * @static
* @access public
*/
function rm($args)
@@ -94673,6 +94879,7 @@ class System
* The -p option will create parent directories
* @param string $args the name of the director(y|ies) to create
* @return bool True for success
+ * @static
* @access public
*/
function mkDir($args)
@@ -94738,6 +94945,7 @@ class System
*
* @param string $args the arguments
* @return boolean true on success
+ * @static
* @access public
*/
function &cat($args)
@@ -94749,7 +94957,7 @@ class System
}
$count_args = count($args);
- for ($i = 0; $i < $args_count; $i++) {
+ for ($i = 0; $i < $count_args; $i++) {
if ($args[$i] == '>') {
$mode = 'wb';
$outputfile = $args[$i+1];
@@ -94811,6 +95019,7 @@ class System
* @param string $args The arguments
* @return mixed the full path of the created (file|dir) or false
* @see System::tmpdir()
+ * @static
* @access public
*/
function mktemp($args = null)
@@ -94853,6 +95062,7 @@ class System
* Remove temporary files created my mkTemp. This function is executed
* at script shutdown time
*
+ * @static
* @access private
*/
function _removeTmpFiles()
@@ -94871,6 +95081,7 @@ class System
* Note: php.ini-recommended removes the "E" from the variables_order setting,
* making unavaible the $_ENV array, that s why we do tests with _ENV
*
+ * @static
* @return string The temporary directory on the system
*/
function tmpdir()
@@ -94893,7 +95104,7 @@ class System
if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) {
return $var;
}
- return '/tmp';
+ return realpath('/tmp');
}
/**
@@ -94903,6 +95114,7 @@ class System
* @param mixed $fallback Value to return if $program is not found
*
* @return mixed A string with the full path or false if not found
+ * @static
* @author Stig Bakken <ssb@php.net>
*/
function which($program, $fallback = false)
@@ -94974,6 +95186,7 @@ class System
*
* @param mixed Either array or string with the command line
* @return array Array of found files
+ * @static
*
*/
function find($args)
@@ -94981,7 +95194,10 @@ class System
if (!is_array($args)) {
$args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
}
- $dir = array_shift($args);
+ $dir = realpath(array_shift($args));
+ if (!$dir) {
+ return array();
+ }
$patterns = array();
$depth = 0;
$do_files = $do_dirs = true;
@@ -94999,18 +95215,11 @@ class System
$i++;
break;
case '-name':
- if (OS_WINDOWS) {
- if ($args[$i+1]{0} == '\\') {
- // prepend drive
- $args[$i+1] = addslashes(substr(getcwd(), 0, 2) . $args[$i + 1]);
- }
- // escape path separators to avoid PCRE problems
- $args[$i+1] = str_replace('\\', '\\\\', $args[$i+1]);
- }
- $patterns[] = "(" . preg_replace(array('/\./', '/\*/'),
- array('\.', '.*', ),
- $args[$i+1])
- . ")";
+ $name = preg_quote($args[$i+1], '#');
+ // our magic characters ? and * have just been escaped,
+ // so now we change the escaped versions to PCRE operators
+ $name = strtr($name, array('\?' => '.', '\*' => '.*'));
+ $patterns[] = '('.$name.')';
$i++;
break;
case '-maxdepth':
@@ -95018,7 +95227,7 @@ class System
break;
}
}
- $path = System::_dirToStruct($dir, $depth);
+ $path = System::_dirToStruct($dir, $depth, 0, true);
if ($do_files && $do_dirs) {
$files = array_merge($path['files'], $path['dirs']);
} elseif ($do_dirs) {
@@ -95027,11 +95236,14 @@ class System
$files = $path['files'];
}
if (count($patterns)) {
- $patterns = implode('|', $patterns);
+ $dsq = preg_quote(DIRECTORY_SEPARATOR, '#');
+ $pattern = '#(^|'.$dsq.')'.implode('|', $patterns).'($|'.$dsq.')#';
$ret = array();
$files_count = count($files);
for ($i = 0; $i < $files_count; $i++) {
- if (preg_match("#^$patterns\$#", $files[$i])) {
+ // only search in the part of the file below the current directory
+ $filepart = basename($files[$i]);
+ if (preg_match($pattern, $filepart)) {
$ret[] = $files[$i];
}
}
@@ -95039,4 +95251,4 @@ class System
}
return $files;
}
-}ðc¨NéÕyß zë Å÷rºÌ©
+}ÝQ%/ßá`¹F›aœá€8-¢
diff --git a/php.ini-dist b/php.ini-dist
index 006ea5949..4b3fb805c 100644
--- a/php.ini-dist
+++ b/php.ini-dist
@@ -369,7 +369,7 @@ track_errors = Off
;docref_ext = .html
; String to output before an error message.
-;error_prepend_string = "<font color=ff0000>"
+;error_prepend_string = "<font color=#ff0000>"
; String to output after an error message.
;error_append_string = "</font>"
diff --git a/php.ini-recommended b/php.ini-recommended
index 41d29569c..402a4b7b9 100644
--- a/php.ini-recommended
+++ b/php.ini-recommended
@@ -419,7 +419,7 @@ track_errors = Off
;docref_ext = .html
; String to output before an error message.
-;error_prepend_string = "<font color=ff0000>"
+;error_prepend_string = "<font color=#ff0000>"
; String to output after an error message.
;error_append_string = "</font>"
diff --git a/regex/regerror.c b/regex/regerror.c
index 6c8e064c4..c4b119494 100644
--- a/regex/regerror.c
+++ b/regex/regerror.c
@@ -4,8 +4,8 @@
#include <ctype.h>
#include <limits.h>
#include <stdlib.h>
-#include <regex.h>
+#include "regex.h"
#include "utils.h"
#include "regerror.ih"
diff --git a/regex/regexec.c b/regex/regexec.c
index bbfe094c9..c1fdfe0e0 100644
--- a/regex/regexec.c
+++ b/regex/regexec.c
@@ -11,8 +11,8 @@
#include <string.h>
#include <limits.h>
#include <ctype.h>
-#include <regex.h>
+#include "regex.h"
#include "utils.h"
#include "regex2.h"
diff --git a/regex/regfree.c b/regex/regfree.c
index 9fd618a13..a1de3d412 100644
--- a/regex/regfree.c
+++ b/regex/regfree.c
@@ -1,8 +1,8 @@
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
-#include <regex.h>
+#include "regex.h"
#include "utils.h"
#include "regex2.h"
diff --git a/run-tests.php b/run-tests.php
index 8ec5cd88d..6db589856 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1,9 +1,10 @@
+#!/usr/bin/php
<?php
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,7 +24,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: run-tests.php,v 1.226.2.37.2.35 2007/09/14 15:28:03 nlopess Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.45 2008/03/13 13:51:40 felipe Exp $ */
/* Sanity check to ensure that pcre extension needed by this script is available.
* In the event it is not, print a nice error message indicating that this script will
@@ -75,6 +76,8 @@ putenv('SSH_CONNECTION=deleted');
$cwd = getcwd();
set_time_limit(0);
+$valgrind_version = 0;
+
// delete as much output buffers as possible
while(@ob_end_clean());
if (ob_get_level()) echo "Not all buffers were deleted.\n";
@@ -103,11 +106,22 @@ $environment = isset($_ENV) ? $_ENV : array();
// Require the explicit specification.
// Otherwise we could end up testing the wrong file!
+$php = NULL;
+$php_cgi = NULL;
+
if (getenv('TEST_PHP_EXECUTABLE')) {
$php = getenv('TEST_PHP_EXECUTABLE');
if ($php=='auto') {
$php = $cwd.'/sapi/cli/php';
putenv("TEST_PHP_EXECUTABLE=$php");
+ if (!getenv('TEST_PHP_CGI_EXECUTABLE')) {
+ $php_cgi = $cwd.'/sapi/cgi/php-cgi';
+ if (file_exists($php_cgi)) {
+ putenv("TEST_PHP_CGI_EXECUTABLE=$php_cgi");
+ } else {
+ $php_cgi = NULL;
+ }
+ }
}
$environment['TEST_PHP_EXECUTABLE'] = $php;
}
@@ -173,11 +187,12 @@ $ini_overwrites = array(
'auto_prepend_file=',
'auto_append_file=',
'magic_quotes_runtime=0',
+ 'ignore_repeated_errors=0',
);
function write_information($show_html)
{
- global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test;
+ global $cwd, $php, $php_cgi, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test;
// Get info from php
$info_file = realpath(dirname(__FILE__)) . '/run-test-info.php';
@@ -194,6 +209,13 @@ More .INIs : " . (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
settings2array($ini_overwrites,$info_params);
settings2params($info_params);
$php_info = `$php $pass_options $info_params "$info_file"`;
+ if ($php_cgi && $php != $php_cgi) {
+ $php_info_cgi = `$php_cgi $pass_options $info_params -q "$info_file"`;
+ $php_info_sep = "\n---------------------------------------------------------------------";
+ $php_cgi_info = "$php_info_sep\nPHP : $php_cgi $php_info_cgi$php_info_sep";
+ } else {
+ $php_cgi_info = '';
+ }
@unlink($info_file);
define('TESTED_PHP_VERSION', `$php -r "echo PHP_VERSION;"`);
@@ -217,8 +239,8 @@ More .INIs : " . (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
// Write test context information.
echo "
=====================================================================
+PHP : $php $php_info $php_cgi_info
CWD : $cwd
-PHP : $php $php_info
Extra dirs : ";
foreach ($user_tests as $test_dir) {
echo "{$test_dir}\n ";
@@ -399,7 +421,7 @@ if (isset($argc) && $argc > 1) {
$html_output = is_resource($html_file);
break;
case '--version':
- echo '$Revision: 1.226.2.37.2.35 $'."\n";
+ echo '$Revision: 1.226.2.37.2.45 $'."\n";
exit(1);
case 'u':
@@ -948,6 +970,7 @@ function run_test($php, $file, $env)
global $pass_options, $DETAILED, $IN_REDIRECT, $test_cnt, $test_idx;
global $leak_check, $temp_source, $temp_target, $cfg, $environment;
global $no_clean;
+ global $valgrind_version;
$temp_filenames = null;
$org_file = $file;
@@ -999,7 +1022,7 @@ TEST $file
if (preg_match('/^--([_A-Z]+)--/', $line, $r)) {
$section = $r[1];
$section_text[$section] = '';
- $secfile = $section == 'FILE' || $section == 'FILEEOF';
+ $secfile = $section == 'FILE' || $section == 'FILEEOF' || $section == 'FILE_EXTERNAL';
$secdone = false;
continue;
}
@@ -1025,7 +1048,7 @@ TEST $file
$borked = false;
}
} else {
- if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) != 1) {
+ if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) {
$bork_info = "missing section --FILE--";
$borked = true;
}
@@ -1033,6 +1056,17 @@ TEST $file
$section_text['FILE'] = preg_replace("/[\r\n]+$/", '', $section_text['FILEEOF']);
unset($section_text['FILEEOF']);
}
+ if (@count($section_text['FILE_EXTERNAL']) == 1) {
+ // don't allow tests to retrieve files from anywhere but this subdirectory
+ $section_text['FILE_EXTERNAL'] = dirname($file) . '/' . trim(str_replace('..', '', $section_text['FILE_EXTERNAL']));
+ if (@file_exists($section_text['FILE_EXTERNAL'])) {
+ $section_text['FILE'] = file_get_contents($section_text['FILE_EXTERNAL']);
+ unset($section_text['FILE_EXTERNAL']);
+ } else {
+ $bork_info = "could not load --FILE_EXTERNAL-- " . dirname($file) . '/' . trim($section_text['FILE_EXTERNAL']);
+ $borked = true;
+ }
+ }
if ((@count($section_text['EXPECT']) + @count($section_text['EXPECTF']) + @count($section_text['EXPECTREGEX'])) != 1) {
$bork_info = "missing section --EXPECT--, --EXPECTF-- or --EXPECTREGEX--";
$borked = true;
@@ -1058,7 +1092,7 @@ TEST $file
$tested = trim($section_text['TEST']);
/* For GET/POST tests, check if cgi sapi is available and if it is, use it. */
- if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) {
+ if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) {
if (isset($php_cgi)) {
$old_php = $php;
$php = $php_cgi .' -C ';
@@ -1328,12 +1362,15 @@ TEST $file
$raw_lines = explode("\n", $post);
$request = '';
+ $started = false;
foreach ($raw_lines as $line) {
if (empty($env['CONTENT_TYPE']) && preg_match('/^Content-Type:(.*)/i', $line, $res)) {
$env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1]));
continue;
}
- $request .= $line . "\n";
+ if ($started) $request .= "\n";
+ $started = true;
+ $request .= $line;
}
$env['CONTENT_LENGTH'] = strlen($request);
@@ -1376,7 +1413,26 @@ TEST $file
if ($leak_check) {
$env['USE_ZEND_ALLOC'] = '0';
- $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file-exactly=$memcheck_filename $cmd";
+ if (!$valgrind_version) {
+ $valgrind_cmd = "valgrind --version";
+ $out = system_with_timeout($valgrind_cmd);
+ $replace_count = 0;
+
+ if (!$out) {
+ error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed.");
+ } else {
+ $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)(?:-\w+)?\s*/", '$1$2$3', $out, 1, $replace_count);
+ if ($replace_count != 1 || !is_numeric($valgrind_version)) {
+ error("Valgrind returned invalid version info (\"$out\"), cannot proceed.");
+ }
+ }
+ }
+ if ($valgrind_version < 330) {
+ $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file-exactly=$memcheck_filename $cmd";
+ } else {
+ /* valgrind 3.3.0+ doesn't have --log-file-exactly option */
+ $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file=$memcheck_filename $cmd";
+ }
} else {
$env['USE_ZEND_ALLOC'] = '1';
}
@@ -1493,7 +1549,7 @@ COMMAND $cmd
$wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re);
$wanted_re = str_replace('%d', '\d+', $wanted_re);
$wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re);
- $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E-?\d+)?', $wanted_re);
+ $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', $wanted_re);
$wanted_re = str_replace('%c', '.', $wanted_re);
// %f allows two points "-.0.0" but that is the best *simple* expression
}
@@ -1541,7 +1597,7 @@ COMMAND $cmd
$wanted = $wanted_headers . "\n--HEADERS--\n" . $wanted;
$output = $output_headers . "\n--HEADERS--\n" . $output;
if (isset($wanted_re)) {
- $wanted_re = $wanted_headers . "\n--HEADERS--\n" . $wanted_re;
+ $wanted_re = preg_quote($wanted_headers . "\n--HEADERS--\n", '/') . $wanted_re;
}
}
diff --git a/sapi/aolserver/aolserver.c b/sapi/aolserver/aolserver.c
index 65bb52c87..de8b45db2 100644
--- a/sapi/aolserver/aolserver.c
+++ b/sapi/aolserver/aolserver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,7 +22,7 @@
* - CGI/1.1 conformance
*/
-/* $Id: aolserver.c,v 1.81.2.2.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: aolserver.c,v 1.81.2.2.2.2 2007/12/31 07:20:15 sebastian Exp $ */
/* conflict between PHP and AOLserver headers */
#define Debug php_Debug
@@ -205,7 +205,7 @@ static void php_info_aolserver(ZEND_MODULE_INFO_FUNC_ARGS)
int i;
php_info_print_table_start();
- php_info_print_table_row(2, "SAPI module version", "$Id: aolserver.c,v 1.81.2.2.2.1 2007/01/01 09:36:12 sebastian Exp $");
+ php_info_print_table_row(2, "SAPI module version", "$Id: aolserver.c,v 1.81.2.2.2.2 2007/12/31 07:20:15 sebastian Exp $");
php_info_print_table_row(2, "Build date", Ns_InfoBuildDate());
php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile());
php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog());
diff --git a/sapi/apache/libpre.c b/sapi/apache/libpre.c
index e8e52c869..28915b707 100644
--- a/sapi/apache/libpre.c
+++ b/sapi/apache/libpre.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: libpre.c,v 1.6.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: libpre.c,v 1.6.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifdef NETWARE
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c
index f5edef0b9..4167f5dd8 100644
--- a/sapi/apache/mod_php5.c
+++ b/sapi/apache/mod_php5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.c,v 1.19.2.7.2.13 2007/08/06 12:54:57 tony2001 Exp $ */
+/* $Id: mod_php5.c,v 1.19.2.7.2.14 2007/12/31 07:20:15 sebastian Exp $ */
#include "php_apache_http.h"
#include "http_conf_globals.h"
diff --git a/sapi/apache/mod_php5.h b/sapi/apache/mod_php5.h
index b9bc6cc99..900283a2f 100644
--- a/sapi/apache/mod_php5.h
+++ b/sapi/apache/mod_php5.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.h,v 1.4.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: mod_php5.h,v 1.4.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef MOD_PHP5_H
#define MOD_PHP5_H
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c
index e67c018da..ddf187f42 100644
--- a/sapi/apache/php_apache.c
+++ b/sapi/apache/php_apache.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| David Sklar <sklar@student.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.c,v 1.89.2.4.2.6 2007/09/07 08:49:24 jani Exp $ */
+/* $Id: php_apache.c,v 1.89.2.4.2.7 2007/12/31 07:20:15 sebastian Exp $ */
#include "php_apache_http.h"
diff --git a/sapi/apache/php_apache_http.h b/sapi/apache/php_apache_http.h
index 08f41cdc3..ee0e2e3d8 100644
--- a/sapi/apache/php_apache_http.h
+++ b/sapi/apache/php_apache_http.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache_http.h,v 1.13.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_apache_http.h,v 1.13.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#define NO_REGEX_EXTRA_H
diff --git a/sapi/apache/sapi_apache.c b/sapi/apache/sapi_apache.c
index c8aad6c7f..1ef7b2723 100644
--- a/sapi/apache/sapi_apache.c
+++ b/sapi/apache/sapi_apache.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
| Stig Bakken <ssb@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache.c,v 1.47.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: sapi_apache.c,v 1.47.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#include "php_apache_http.h"
diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c
index 968ad8bf8..d484684be 100644
--- a/sapi/apache2filter/apache_config.c
+++ b/sapi/apache2filter/apache_config.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apache_config.c,v 1.34.2.1.2.3 2007/08/03 09:33:30 jani Exp $ */
+/* $Id: apache_config.c,v 1.34.2.1.2.4 2007/12/31 07:20:15 sebastian Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
diff --git a/sapi/apache2filter/php_apache.h b/sapi/apache2filter/php_apache.h
index 62bf682c3..e5b17c374 100644
--- a/sapi/apache2filter/php_apache.h
+++ b/sapi/apache2filter/php_apache.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.h,v 1.25.2.1.2.2 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_apache.h,v 1.25.2.1.2.3 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_APACHE_H
#define PHP_APACHE_H
diff --git a/sapi/apache2filter/php_functions.c b/sapi/apache2filter/php_functions.c
index 7e4a6d8a8..80ebd20d0 100644
--- a/sapi/apache2filter/php_functions.c
+++ b/sapi/apache2filter/php_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_functions.c,v 1.44.2.2.2.2 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_functions.c,v 1.44.2.2.2.3 2007/12/31 07:20:15 sebastian Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 9af6fa823..08d3bb69f 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.136.2.2.2.8 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: sapi_apache2.c,v 1.136.2.2.2.9 2007/12/31 07:20:15 sebastian Exp $ */
#include <fcntl.h>
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index a214d3693..c3e040b7f 100644
--- a/sapi/apache2handler/apache_config.c
+++ b/sapi/apache2handler/apache_config.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apache_config.c,v 1.7.2.1.2.4 2007/08/03 09:33:17 jani Exp $ */
+/* $Id: apache_config.c,v 1.7.2.1.2.5 2007/12/31 07:20:15 sebastian Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
diff --git a/sapi/apache2handler/mod_php5.c b/sapi/apache2handler/mod_php5.c
index 6c1ea1655..e9b66da21 100644
--- a/sapi/apache2handler/mod_php5.c
+++ b/sapi/apache2handler/mod_php5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.c,v 1.5.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: mod_php5.c,v 1.5.2.1.2.2 2007/12/31 07:20:15 sebastian Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
index 51a8a9bbd..8ad66500c 100644
--- a/sapi/apache2handler/php_apache.h
+++ b/sapi/apache2handler/php_apache.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.h,v 1.8.2.1.2.2 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_apache.h,v 1.8.2.1.2.3 2007/12/31 07:20:15 sebastian Exp $ */
#ifndef PHP_APACHE_H
#define PHP_APACHE_H
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index ab60415cb..034051e40 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_functions.c,v 1.18.2.6.2.5 2007/02/24 02:17:28 helly Exp $ */
+/* $Id: php_functions.c,v 1.18.2.6.2.6 2007/12/31 07:20:16 sebastian Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 3ea83a7f1..5fa6cdf75 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.57.2.10.2.15 2007/06/28 17:23:07 tony2001 Exp $ */
+/* $Id: sapi_apache2.c,v 1.57.2.10.2.17 2008/01/16 15:50:37 iliaa Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -134,8 +134,6 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
ctx->r->proto_num = 1000 + (sline[7]-'0');
if ((sline[7]-'0') == 0) {
apr_table_set(ctx->r->subprocess_env, "force-response-1.0", "true");
- } else {
- apr_table_set(ctx->r->subprocess_env, "force-response-1.1", "true");
}
}
diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c
index 0c0e33535..7f7d982e3 100644
--- a/sapi/apache_hooks/mod_php5.c
+++ b/sapi/apache_hooks/mod_php5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.c,v 1.11.2.1.2.5 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: mod_php5.c,v 1.11.2.1.2.6 2007/12/31 07:20:16 sebastian Exp $ */
#include "php_apache_http.h"
diff --git a/sapi/apache_hooks/mod_php5.h b/sapi/apache_hooks/mod_php5.h
index 975fc1634..bd6fb9a52 100644
--- a/sapi/apache_hooks/mod_php5.h
+++ b/sapi/apache_hooks/mod_php5.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.h,v 1.2.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: mod_php5.h,v 1.2.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#ifndef MOD_PHP5_H
#define MOD_PHP5_H
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c
index 83d86f658..fd0a84f3e 100644
--- a/sapi/apache_hooks/php_apache.c
+++ b/sapi/apache_hooks/php_apache.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
| David Sklar <sklar@student.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.c,v 1.19.2.3.2.5 2007/02/24 02:17:28 helly Exp $ */
+/* $Id: php_apache.c,v 1.19.2.3.2.6 2007/12/31 07:20:16 sebastian Exp $ */
#include "php_apache_http.h"
diff --git a/sapi/apache_hooks/sapi_apache.c b/sapi/apache_hooks/sapi_apache.c
index ac1e4cc78..4efa2fcb7 100644
--- a/sapi/apache_hooks/sapi_apache.c
+++ b/sapi/apache_hooks/sapi_apache.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
| Stig Bakken <ssb@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache.c,v 1.9.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: sapi_apache.c,v 1.9.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#include "php_apache_http.h"
diff --git a/sapi/caudium/caudium.c b/sapi/caudium/caudium.c
index ea0467ee2..9a10d88d6 100644
--- a/sapi/caudium/caudium.c
+++ b/sapi/caudium/caudium.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: caudium.c,v 1.36.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: caudium.c,v 1.36.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#include "php.h"
#ifdef HAVE_CAUDIUM
@@ -444,7 +444,7 @@ static void php_info_caudium(ZEND_MODULE_INFO_FUNC_ARGS)
{
/* char buf[512]; */
php_info_print_table_start();
- php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.36.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $");
+ php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.36.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $");
/* php_info_print_table_row(2, "Build date", Ns_InfoBuildDate());
php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile());
php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog());
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 840d53f3b..f47ae96c8 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cgi_main.c,v 1.267.2.15.2.52 2007/11/01 15:23:14 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.56 2008/04/09 09:16:40 dmitry Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -1017,7 +1017,7 @@ static void init_request_info(TSRMLS_D)
) {
/* PATH_TRANSLATED = PATH_TRANSLATED - SCRIPT_NAME + PATH_INFO */
int ptlen = strlen(pt) - strlen(env_script_name);
- int path_translated_len = ptlen + env_path_info ? strlen(env_path_info) : 0;
+ int path_translated_len = ptlen + (env_path_info ? strlen(env_path_info) : 0);
char *path_translated = NULL;
path_translated = (char *) emalloc(path_translated_len + 1);
@@ -1661,12 +1661,12 @@ consult the installation file that came with this distribution, or visit \n\
}
script_file = estrdup(php_optarg);
no_headers = 1;
- /* arguments after the file are considered script args */
- SG(request_info).argc = argc - (php_optind - 1);
- SG(request_info).argv = &argv[php_optind - 1];
break;
case 'i': /* php info & quit */
+ if (script_file) {
+ efree(script_file);
+ }
if (php_request_startup(TSRMLS_C) == FAILURE) {
SG(server_context) = NULL;
php_module_shutdown(TSRMLS_C);
@@ -1687,6 +1687,9 @@ consult the installation file that came with this distribution, or visit \n\
break;
case 'm': /* list compiled in modules */
+ if (script_file) {
+ efree(script_file);
+ }
php_output_startup();
php_output_activate(TSRMLS_C);
SG(headers_sent) = 1;
@@ -1710,6 +1713,9 @@ consult the installation file that came with this distribution, or visit \n\
break;
case 'v': /* show php version & quit */
+ if (script_file) {
+ efree(script_file);
+ }
no_headers = 1;
if (php_request_startup(TSRMLS_C) == FAILURE) {
SG(server_context) = NULL;
@@ -1721,9 +1727,9 @@ consult the installation file that came with this distribution, or visit \n\
SG(request_info).no_headers = 1;
}
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2007 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2008 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2007 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2008 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
php_request_shutdown((void *) 0);
exit_status = 0;
@@ -1746,6 +1752,18 @@ consult the installation file that came with this distribution, or visit \n\
/* override path_translated if -f on command line */
STR_FREE(SG(request_info).path_translated);
SG(request_info).path_translated = script_file;
+ /* before registering argv to module exchange the *new* argv[0] */
+ /* we can achieve this without allocating more memory */
+ SG(request_info).argc = argc - (php_optind - 1);
+ SG(request_info).argv = &argv[php_optind - 1];
+ SG(request_info).argv[0] = script_file;
+ } else if (argc > php_optind) {
+ /* file is on command line, but not in -f opt */
+ STR_FREE(SG(request_info).path_translated);
+ SG(request_info).path_translated = estrdup(argv[php_optind]);
+ /* arguments after the file are considered script args */
+ SG(request_info).argc = argc - php_optind;
+ SG(request_info).argv = &argv[php_optind];
}
if (no_headers) {
@@ -1753,14 +1771,6 @@ consult the installation file that came with this distribution, or visit \n\
SG(request_info).no_headers = 1;
}
- if (!SG(request_info).path_translated && argc > php_optind) {
- /* arguments after the file are considered script args */
- SG(request_info).argc = argc - php_optind;
- SG(request_info).argv = &argv[php_optind];
- /* file is on command line, but not in -f opt */
- SG(request_info).path_translated = estrdup(argv[php_optind++]);
- }
-
/* all remaining arguments are part of the query string
this section of code concatenates all remaining arguments
into a single string, seperating args with a &
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
index 72610ae49..6503c3d00 100644
--- a/sapi/cgi/fastcgi.c
+++ b/sapi/cgi/fastcgi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fastcgi.c,v 1.4.2.13.2.28 2007/09/07 08:26:47 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.4.2.13.2.30 2008/04/03 10:24:44 dmitry Exp $ */
#include "php.h"
#include "fastcgi.h"
@@ -593,6 +593,9 @@ static inline int fcgi_make_header(fcgi_header *hdr, fcgi_request_type type, int
hdr->reserved = 0;
hdr->type = type;
hdr->version = FCGI_VERSION_1;
+ if (pad) {
+ memset(((unsigned char*)hdr) + sizeof(fcgi_header) + len, 0, pad);
+ }
return pad;
}
@@ -777,7 +780,7 @@ int fcgi_read(fcgi_request *req, char *str, int len)
{
int ret, n, rest;
fcgi_header hdr;
- unsigned char buf[8];
+ unsigned char buf[255];
n = 0;
rest = len;
diff --git a/sapi/cgi/fastcgi.h b/sapi/cgi/fastcgi.h
index 8fcc0951d..2b8606472 100644
--- a/sapi/cgi/fastcgi.h
+++ b/sapi/cgi/fastcgi.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fastcgi.h,v 1.2.2.4.2.5 2007/05/21 09:08:13 dmitry Exp $ */
+/* $Id: fastcgi.h,v 1.2.2.4.2.6 2007/12/31 07:20:16 sebastian Exp $ */
/* FastCGI protocol */
diff --git a/sapi/cgi/getopt.c b/sapi/cgi/getopt.c
index e2988fbf0..d5bb50618 100644
--- a/sapi/cgi/getopt.c
+++ b/sapi/cgi/getopt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: getopt.c,v 1.9.2.1.2.4 2007/04/23 11:05:16 tony2001 Exp $ */
+/* $Id: getopt.c,v 1.9.2.1.2.5 2007/12/31 07:20:16 sebastian Exp $ */
#include <stdio.h>
#include <string.h>
diff --git a/sapi/cgi/php_getopt.h b/sapi/cgi/php_getopt.h
index e040313da..aa513dded 100644
--- a/sapi/cgi/php_getopt.h
+++ b/sapi/cgi/php_getopt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_getopt.h,v 1.7.2.1.2.2 2007/04/15 22:50:58 sniper Exp $ */
+/* $Id: php_getopt.h,v 1.7.2.1.2.3 2007/12/31 07:20:16 sebastian Exp $ */
#include "php.h"
diff --git a/sapi/cli/getopt.c b/sapi/cli/getopt.c
index 450de55af..5b0bc5448 100644
--- a/sapi/cli/getopt.c
+++ b/sapi/cli/getopt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: getopt.c,v 1.8.2.1.2.6 2007/06/04 09:47:54 tony2001 Exp $ */
+/* $Id: getopt.c,v 1.8.2.1.2.7 2007/12/31 07:20:16 sebastian Exp $ */
#include <stdio.h>
#include <string.h>
diff --git a/sapi/cli/php.1.in b/sapi/cli/php.1.in
index cb31c832c..9e78fef11 100644
--- a/sapi/cli/php.1.in
+++ b/sapi/cli/php.1.in
@@ -1,4 +1,4 @@
-.TH PHP 1 "2007" "The PHP Group" "Scripting Language"
+.TH PHP 1 "2008" "The PHP Group" "Scripting Language"
.SH NAME
.TP 15
php \- PHP Command Line Interface 'CLI'
@@ -400,7 +400,7 @@ contributors all around the world.
.SH VERSION INFORMATION
This manpage describes \fBphp\fP, version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2007 The PHP Group
+Copyright \(co 1997\-2008 The PHP Group
.LP
This source file is subject to version 3.01 of the PHP license,
that is bundled with this package in the file LICENSE, and is
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index c441835f1..fa3d582bc 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_cli.c,v 1.129.2.13.2.22 2007/08/08 23:51:24 stas Exp $ */
+/* $Id: php_cli.c,v 1.129.2.13.2.24 2008/01/29 20:01:14 dmitry Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -588,7 +588,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
int main(int argc, char *argv[])
#endif
{
- int exit_status = SUCCESS;
+ volatile int exit_status = SUCCESS;
int c;
zend_file_handle file_handle;
/* temporary locals */
@@ -599,8 +599,8 @@ int main(int argc, char *argv[])
char *arg_free=NULL, **arg_excp=&arg_free;
char *script_file=NULL;
int interactive=0;
- int module_started = 0;
- int request_started = 0;
+ volatile int module_started = 0;
+ volatile int request_started = 0;
int lineno = 0;
char *exec_direct=NULL, *exec_run=NULL, *exec_begin=NULL, *exec_end=NULL;
const char *param_error=NULL;
@@ -779,7 +779,7 @@ int main(int argc, char *argv[])
}
request_started = 1;
- php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2007 The PHP Group\n%s",
+ php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2008 The PHP Group\n%s",
PHP_VERSION, sapi_module.name, __DATE__, __TIME__,
#if ZEND_DEBUG && defined(HAVE_GCOV)
"(DEBUG GCOV)",
@@ -1229,8 +1229,9 @@ int main(int argc, char *argv[])
if (exec_end && zend_eval_string_ex(exec_end, NULL, "Command line end code", 1 TSRMLS_CC) == FAILURE) {
exit_status=254;
}
-
+
break;
+ }
#ifdef HAVE_REFLECTION
case PHP_MODE_REFLECTION_FUNCTION:
case PHP_MODE_REFLECTION_CLASS:
@@ -1311,7 +1312,6 @@ int main(int argc, char *argv[])
zend_printf("Additional .ini files parsed: %s\n", php_ini_scanned_files ? php_ini_scanned_files : "(none)");
break;
}
- }
}
} zend_end_try();
diff --git a/sapi/cli/php_cli_readline.c b/sapi/cli/php_cli_readline.c
index c0f5d1a1a..614ee26f3 100644
--- a/sapi/cli/php_cli_readline.c
+++ b/sapi/cli/php_cli_readline.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_cli_readline.c,v 1.3.2.5.2.3 2007/06/04 09:47:54 tony2001 Exp $ */
+/* $Id: php_cli_readline.c,v 1.3.2.5.2.4 2007/12/31 07:20:16 sebastian Exp $ */
#include "php.h"
diff --git a/sapi/cli/php_cli_readline.h b/sapi/cli/php_cli_readline.h
index f27525faa..b5e489aed 100644
--- a/sapi/cli/php_cli_readline.h
+++ b/sapi/cli/php_cli_readline.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_cli_readline.h,v 1.2.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_cli_readline.h,v 1.2.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#include "php.h"
diff --git a/sapi/cli/php_getopt.h b/sapi/cli/php_getopt.h
index 24ac5c3f3..0c8e06829 100644
--- a/sapi/cli/php_getopt.h
+++ b/sapi/cli/php_getopt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_getopt.h,v 1.7.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_getopt.h,v 1.7.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#include "php.h"
diff --git a/sapi/cli/tests/bug44564.phpt b/sapi/cli/tests/bug44564.phpt
new file mode 100644
index 000000000..7dca62a7e
--- /dev/null
+++ b/sapi/cli/tests/bug44564.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #44564 (escapeshellarg removes UTF-8 multi-byte characters)
+--SKIPIF--
+<?php
+if (false == setlocale(LC_CTYPE, "UTF8", "en_US.UTF-8")) {
+ die("skip setlocale() failed\n");
+}
+?>
+--FILE--
+<?php
+setlocale(LC_CTYPE, "UTF8", "en_US.UTF-8");
+var_dump(escapeshellcmd('f{o}<€>'));
+var_dump(escapeshellarg('f~|;*Þ?'));
+var_dump(escapeshellcmd('?€®đæ?'));
+var_dump(escapeshellarg('aŊł€'));
+
+?>
+--EXPECT--
+string(13) "f\{o\}\<€\>"
+string(10) "'f~|;*Þ?'"
+string(13) "\?€®đæ\?"
+string(10) "'aŊł€'"
diff --git a/sapi/continuity/capi.c b/sapi/continuity/capi.c
index c14b76a5b..88e18c824 100644
--- a/sapi/continuity/capi.c
+++ b/sapi/continuity/capi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -110,7 +110,7 @@ PHP_MSHUTDOWN_FUNCTION(continuity)
PHP_MINFO_FUNCTION(continuity)
{
php_info_print_table_start();
- php_info_print_table_row(2, "Continuity Module Revision", "$Revision: 1.11.2.2.2.1 $");
+ php_info_print_table_row(2, "Continuity Module Revision", "$Revision: 1.11.2.2.2.2 $");
php_info_print_table_row(2, "Server Version", conFget_build());
#ifdef CONTINUITY_CDPEXT
php_info_print_table_row(2,"CDP Extensions", "enabled");
diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c
index cb50b219d..93cd41ccd 100644
--- a/sapi/embed/php_embed.c
+++ b/sapi/embed/php_embed.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Edin Kadribasic <edink@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_embed.c,v 1.11.2.1.2.5 2007/08/08 21:57:30 stas Exp $ */
+/* $Id: php_embed.c,v 1.11.2.1.2.7 2008/03/26 13:21:57 helly Exp $ */
#include "php_embed.h"
@@ -24,13 +24,13 @@
#include <fcntl.h>
#endif
-#define HARDCODED_INI \
- "html_errors=0\n" \
- "register_argc_argv=1\n" \
- "implicit_flush=1\n" \
- "output_buffering=0\n" \
- "max_execution_time=0\n" \
- "max_input_time=-1\n"
+const char HARDCODED_INI[] =
+ "html_errors=0\n"
+ "register_argc_argv=1\n"
+ "implicit_flush=1\n"
+ "output_buffering=0\n"
+ "max_execution_time=0\n"
+ "max_input_time=-1\n\0";
static char* php_embed_read_cookies(TSRMLS_D)
{
@@ -145,7 +145,6 @@ int php_embed_init(int argc, char **argv PTSRMLS_DC)
#ifdef ZTS
void ***tsrm_ls = NULL;
#endif
- int ini_entries_len = 0;
#ifdef HAVE_SIGNAL_H
#if defined(SIGPIPE) && defined(SIG_IGN)
@@ -158,26 +157,24 @@ int php_embed_init(int argc, char **argv PTSRMLS_DC)
#endif
#endif
-#ifdef PHP_WIN32
- _fmode = _O_BINARY; /*sets default for file streams to binary */
- setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
- setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */
- setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */
-#endif
-
#ifdef ZTS
tsrm_startup(1, 1, 0, NULL);
tsrm_ls = ts_resource(0);
*ptsrm_ls = tsrm_ls;
#endif
- ini_entries_len = strlen(HARDCODED_INI);
- php_embed_module.ini_entries = malloc(ini_entries_len+2);
- memcpy(php_embed_module.ini_entries, HARDCODED_INI, ini_entries_len+1);
- php_embed_module.ini_entries[ini_entries_len+1] = 0;
-
sapi_startup(&php_embed_module);
+#ifdef PHP_WIN32
+ _fmode = _O_BINARY; /*sets default for file streams to binary */
+ setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
+ setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */
+ setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */
+#endif
+
+ php_embed_module.ini_entries = malloc(sizeof(HARDCODED_INI));
+ memcpy(php_embed_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI));
+
if (argv) {
php_embed_module.executable_location = argv[0];
}
diff --git a/sapi/embed/php_embed.h b/sapi/embed/php_embed.h
index f18d61fab..c40bc7d7d 100644
--- a/sapi/embed/php_embed.h
+++ b/sapi/embed/php_embed.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,7 +15,7 @@
| Author: Edin Kadribasic <edink@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_embed.h,v 1.6.2.2.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: php_embed.h,v 1.6.2.2.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#ifndef _PHP_EMBED_H_
#define _PHP_EMBED_H_
diff --git a/sapi/isapi/php5isapi.c b/sapi/isapi/php5isapi.c
index 2e357d3cb..451d5e85e 100644
--- a/sapi/isapi/php5isapi.c
+++ b/sapi/isapi/php5isapi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
| Ben Mansell <ben@zeus.com> (Zeus Support) |
+----------------------------------------------------------------------+
*/
-/* $Id: php5isapi.c,v 1.8.2.2.2.3 2007/02/23 22:08:31 stas Exp $ */
+/* $Id: php5isapi.c,v 1.8.2.2.2.4 2007/12/31 07:20:16 sebastian Exp $ */
#include "php.h"
#include <httpext.h>
diff --git a/sapi/milter/php_milter.c b/sapi/milter/php_milter.c
index 620e39008..d551ead12 100644
--- a/sapi/milter/php_milter.c
+++ b/sapi/milter/php_milter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1065,7 +1065,7 @@ int main(int argc, char *argv[])
}
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2007 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2008 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
php_end_ob_buffers(1 TSRMLS_CC);
exit(1);
break;
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c
index c6536c5da..2a9ff1c1a 100644
--- a/sapi/nsapi/nsapi.c
+++ b/sapi/nsapi/nsapi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: nsapi.c,v 1.69.2.3.2.6 2007/04/27 00:29:26 thetaphi Exp $ */
+/* $Id: nsapi.c,v 1.69.2.3.2.8 2008/03/09 16:06:33 felipe Exp $ */
/*
* PHP includes
@@ -308,7 +308,7 @@ PHP_MSHUTDOWN_FUNCTION(nsapi)
PHP_MINFO_FUNCTION(nsapi)
{
php_info_print_table_start();
- php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.69.2.3.2.6 $");
+ php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.69.2.3.2.8 $");
php_info_print_table_row(2, "Server Software", system_version());
php_info_print_table_row(2, "Sub-requests with nsapi_virtual()",
(nsapi_servact_service)?((zend_ini_long("zlib.output_compression", sizeof("zlib.output_compression"), 0))?"not supported with zlib.output_compression":"enabled"):"not supported on this platform" );
@@ -860,7 +860,7 @@ int NSAPI_PUBLIC php5_init(pblock *pb, Session *sn, Request *rq)
daemon_atrestart(&php5_close, NULL);
- log_error(LOG_INFORM, pblock_findval("fn", pb), sn, rq, "Initialized PHP Module (%d threads exspected)", threads);
+ log_error(LOG_INFORM, pblock_findval("fn", pb), sn, rq, "Initialized PHP Module (%d threads expected)", threads);
return REQ_PROCEED;
}
diff --git a/sapi/phttpd/php_phttpd.h b/sapi/phttpd/php_phttpd.h
index 235309f65..04eb9bc20 100644
--- a/sapi/phttpd/php_phttpd.h
+++ b/sapi/phttpd/php_phttpd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phttpd/phttpd.c b/sapi/phttpd/phttpd.c
index 8e8241da5..ed4b3fd57 100644
--- a/sapi/phttpd/phttpd.c
+++ b/sapi/phttpd/phttpd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/pi3web/pi3web_sapi.c b/sapi/pi3web/pi3web_sapi.c
index 9459d8289..10fea09e2 100644
--- a/sapi/pi3web/pi3web_sapi.c
+++ b/sapi/pi3web/pi3web_sapi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pi3web_sapi.c,v 1.60.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: pi3web_sapi.c,v 1.60.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -57,7 +57,7 @@ static void php_info_pi3web(ZEND_MODULE_INFO_FUNC_ARGS)
PUTS("<table border=0 cellpadding=3 cellspacing=1 width=600 align=center>\n");
PUTS("<tr><th colspan=2 bgcolor=\"" PHP_HEADER_COLOR "\">Pi3Web Server Information</th></tr>\n");
php_info_print_table_header(2, "Information Field", "Value");
- php_info_print_table_row(2, "Pi3Web SAPI module version", "$Id: pi3web_sapi.c,v 1.60.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $");
+ php_info_print_table_row(2, "Pi3Web SAPI module version", "$Id: pi3web_sapi.c,v 1.60.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $");
php_info_print_table_row(2, "Server Name Stamp", HTTPCore_getServerStamp());
snprintf(variable_buf, 511, "%d", HTTPCore_debugEnabled());
php_info_print_table_row(2, "Debug Enabled", variable_buf);
diff --git a/sapi/roxen/roxen.c b/sapi/roxen/roxen.c
index 34b547999..47585a0c4 100644
--- a/sapi/roxen/roxen.c
+++ b/sapi/roxen/roxen.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: roxen.c,v 1.61.2.2.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: roxen.c,v 1.61.2.2.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#include "php.h"
#ifdef HAVE_ROXEN
@@ -438,7 +438,7 @@ static void php_info_roxen(ZEND_MODULE_INFO_FUNC_ARGS)
{
/* char buf[512]; */
php_info_print_table_start();
- php_info_print_table_row(2, "SAPI module version", "$Id: roxen.c,v 1.61.2.2.2.1 2007/01/01 09:36:13 sebastian Exp $");
+ php_info_print_table_row(2, "SAPI module version", "$Id: roxen.c,v 1.61.2.2.2.2 2007/12/31 07:20:16 sebastian Exp $");
/* php_info_print_table_row(2, "Build date", Ns_InfoBuildDate());
php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile());
php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog());
diff --git a/sapi/thttpd/php_thttpd.h b/sapi/thttpd/php_thttpd.h
index 56567d639..ea7cc3686 100644
--- a/sapi/thttpd/php_thttpd.h
+++ b/sapi/thttpd/php_thttpd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c
index 121f35239..1619c5161 100644
--- a/sapi/thttpd/thttpd.c
+++ b/sapi/thttpd/thttpd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: thttpd.c,v 1.95.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: thttpd.c,v 1.95.2.1.2.2 2007/12/31 07:20:16 sebastian Exp $ */
#include "php.h"
#include "SAPI.h"
diff --git a/sapi/tux/php_tux.c b/sapi/tux/php_tux.c
index 3a3a452ee..65a7cde05 100644
--- a/sapi/tux/php_tux.c
+++ b/sapi/tux/php_tux.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/webjames/php_webjames.h b/sapi/webjames/php_webjames.h
index 99a55efb4..e54caea70 100644
--- a/sapi/webjames/php_webjames.h
+++ b/sapi/webjames/php_webjames.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/webjames/webjames.c b/sapi/webjames/webjames.c
index e7eea9e0b..f166eddfb 100644
--- a/sapi/webjames/webjames.c
+++ b/sapi/webjames/webjames.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/server-tests.php b/server-tests.php
index 793b30bed..c7de7149a 100755
--- a/server-tests.php
+++ b/server-tests.php
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/tests/basic/026.phpt b/tests/basic/026.phpt
index 3d0d9df1e..ec93ae5d4 100644
--- a/tests/basic/026.phpt
+++ b/tests/basic/026.phpt
@@ -15,5 +15,4 @@ var_dump($_POST, $HTTP_RAW_POST_DATA);
--EXPECT--
array(0) {
}
-string(10) "a=1&b=ZYX
-" \ No newline at end of file
+string(9) "a=1&b=ZYX"
diff --git a/tests/classes/__call_003.phpt b/tests/classes/__call_003.phpt
new file mode 100644
index 000000000..c7aa95cb0
--- /dev/null
+++ b/tests/classes/__call_003.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Force pass-by-reference to __call
+--FILE--
+<?php
+ class C
+ {
+ function __call($name, $values)
+ {
+ $values[0][0] = 'changed';
+ }
+ }
+
+ $a = array('original');
+
+ $b = array('original');
+ $hack =& $b[0];
+
+ $c = new C;
+ $c->f($a);
+ $c->f($b);
+
+ var_dump($a, $b);
+?>
+--EXPECTF--
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+array(1) {
+ [0]=>
+ &string(7) "changed"
+}
+
diff --git a/tests/classes/__call_004.phpt b/tests/classes/__call_004.phpt
new file mode 100644
index 000000000..2072112a0
--- /dev/null
+++ b/tests/classes/__call_004.phpt
@@ -0,0 +1,41 @@
+--TEST--
+When __call() is invoked via ::, ensure current scope's __call() is favoured over the specified class's __call().
+--FILE--
+<?php
+class A {
+ function __call($strMethod, $arrArgs) {
+ echo "In " . __METHOD__ . "($strMethod, array(" . implode(',',$arrArgs) . "))\n";
+ var_dump($this);
+ }
+}
+
+class B extends A {
+ function __call($strMethod, $arrArgs) {
+ echo "In " . __METHOD__ . "($strMethod, array(" . implode(',',$arrArgs) . "))\n";
+ var_dump($this);
+ }
+
+ function test() {
+ A::test1(1,'a');
+ B::test2(1,'a');
+ self::test3(1,'a');
+ parent::test4(1,'a');
+ }
+}
+
+$b = new B();
+$b->test();
+?>
+--EXPECTF--
+In B::__call(test1, array(1,a))
+object(B)#1 (0) {
+}
+In B::__call(test2, array(1,a))
+object(B)#1 (0) {
+}
+In B::__call(test3, array(1,a))
+object(B)#1 (0) {
+}
+In B::__call(test4, array(1,a))
+object(B)#1 (0) {
+} \ No newline at end of file
diff --git a/tests/classes/__call_005.phpt b/tests/classes/__call_005.phpt
new file mode 100644
index 000000000..c82a853f7
--- /dev/null
+++ b/tests/classes/__call_005.phpt
@@ -0,0 +1,36 @@
+--TEST--
+When __call() is invoked via ::, ensure private implementation of __call() in superclass is accessed without error.
+--FILE--
+<?php
+class A {
+ private function __call($strMethod, $arrArgs) {
+ echo "In " . __METHOD__ . "($strMethod, array(" . implode(',',$arrArgs) . "))\n";
+ var_dump($this);
+ }
+}
+
+class B extends A {
+ function test() {
+ A::test1(1,'a');
+ B::test2(1,'a');
+ self::test3(1,'a');
+ parent::test4(1,'a');
+ }
+}
+
+$b = new B();
+$b->test();
+?>
+--EXPECTF--
+In A::__call(test1, array(1,a))
+object(B)#1 (0) {
+}
+In A::__call(test2, array(1,a))
+object(B)#1 (0) {
+}
+In A::__call(test3, array(1,a))
+object(B)#1 (0) {
+}
+In A::__call(test4, array(1,a))
+object(B)#1 (0) {
+} \ No newline at end of file
diff --git a/tests/classes/array_access_009.phpt b/tests/classes/array_access_009.phpt
index 32573f5a4..b1382a639 100755
--- a/tests/classes/array_access_009.phpt
+++ b/tests/classes/array_access_009.phpt
@@ -129,9 +129,9 @@ string(6) "FooBar"
string(9) "FooBarBaz"
===ArrayOverloading===
ArrayProxy::__construct(0)
-object(ArrayProxy)#1 (2) {
+object(ArrayProxy)#%d (2) {
["object:private"]=>
- object(Peoples)#2 (1) {
+ object(Peoples)#%d (1) {
["person"]=>
array(1) {
[0]=>
@@ -166,9 +166,9 @@ string(12) "FooBarBarBaz"
ArrayProxy::__construct(0)
ArrayProxy::offsetUnset(0, name)
ArrayProxy::__construct(0)
-object(ArrayProxy)#1 (2) {
+object(ArrayProxy)#%d (2) {
["object:private"]=>
- object(Peoples)#2 (1) {
+ object(Peoples)#%d (1) {
["person"]=>
array(1) {
[0]=>
diff --git a/tests/classes/array_access_010.phpt b/tests/classes/array_access_010.phpt
index 05a169b2f..9cb883d98 100755
--- a/tests/classes/array_access_010.phpt
+++ b/tests/classes/array_access_010.phpt
@@ -103,9 +103,9 @@ string(6) "FooBar"
string(9) "FooBarBaz"
===ArrayOverloading===
ArrayReferenceProxy::__construct(Array)
-object(ArrayReferenceProxy)#1 (2) {
+object(ArrayReferenceProxy)#%d (2) {
["object:private"]=>
- object(Peoples)#2 (1) {
+ object(Peoples)#%d (1) {
["person"]=>
array(1) {
[0]=>
@@ -143,9 +143,9 @@ string(12) "FooBarBarBaz"
ArrayReferenceProxy::__construct(Array)
ArrayReferenceProxy::offsetUnset(Array, name)
ArrayReferenceProxy::__construct(Array)
-object(ArrayReferenceProxy)#1 (2) {
+object(ArrayReferenceProxy)#%d (2) {
["object:private"]=>
- object(Peoples)#2 (1) {
+ object(Peoples)#%d (1) {
["person"]=>
array(1) {
[0]=>
diff --git a/tests/classes/array_access_011.phpt b/tests/classes/array_access_011.phpt
index 20d39568b..a6bb3d1ca 100755
--- a/tests/classes/array_access_011.phpt
+++ b/tests/classes/array_access_011.phpt
@@ -112,9 +112,9 @@ string(6) "FooBar"
string(9) "FooBarBaz"
===ArrayOverloading===
ArrayAccessReferenceProxy::__construct(0)
-object(ArrayAccessReferenceProxy)#1 (3) {
+object(ArrayAccessReferenceProxy)#%d (3) {
["object:private"]=>
- object(Peoples)#2 (1) {
+ object(Peoples)#%d (1) {
["person"]=>
&array(1) {
[0]=>
@@ -157,9 +157,9 @@ string(12) "FooBarBarBaz"
ArrayAccessReferenceProxy::__construct(0)
ArrayAccessReferenceProxy::offsetUnset(0, name)
ArrayAccessReferenceProxy::__construct(0)
-object(ArrayAccessReferenceProxy)#1 (3) {
+object(ArrayAccessReferenceProxy)#%d (3) {
["object:private"]=>
- object(Peoples)#2 (1) {
+ object(Peoples)#%d (1) {
["person"]=>
&array(1) {
[0]=>
diff --git a/tests/classes/assign_op_property_001.phpt b/tests/classes/assign_op_property_001.phpt
index 54e519e8f..21e131cfa 100644
--- a/tests/classes/assign_op_property_001.phpt
+++ b/tests/classes/assign_op_property_001.phpt
@@ -7,13 +7,13 @@ class Test {
private $real_a = 2;
function __set($property, $value) {
- if ($property = "a") {
+ if ($property == "a") {
$this->real_a = $value;
}
}
function __get($property) {
- if ($property = "a") {
+ if ($property == "a") {
return $this->real_a;
}
}
diff --git a/tests/classes/autoload_007.phpt b/tests/classes/autoload_007.phpt
new file mode 100644
index 000000000..5652c120c
--- /dev/null
+++ b/tests/classes/autoload_007.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Ensure instanceof does not trigger autoload.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ $a = new stdClass;
+ var_dump($a instanceof UndefC);
+?>
+--EXPECTF--
+bool(false)
diff --git a/tests/classes/autoload_008.phpt b/tests/classes/autoload_008.phpt
new file mode 100644
index 000000000..75a9cd052
--- /dev/null
+++ b/tests/classes/autoload_008.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Ensure catch blocks for unknown exception types do not trigger autoload.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ function f()
+ {
+ throw new Exception();
+ }
+ try {
+ f();
+ }
+ catch (UndefC $u) {
+ echo "In UndefClass catch block.\n";
+ }
+ catch (Exception $e) {
+ echo "In Exception catch block. Autoload should not have been triggered.\n";
+ }
+?>
+--EXPECTF--
+In Exception catch block. Autoload should not have been triggered.
diff --git a/tests/classes/autoload_009.phpt b/tests/classes/autoload_009.phpt
new file mode 100644
index 000000000..46f6055fe
--- /dev/null
+++ b/tests/classes/autoload_009.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Ensure type hints for unknown types do not trigger autoload.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ function f(UndefClass $x)
+ {
+ }
+ f(new stdClass);
+?>
+--EXPECTF--
+
+Catchable fatal error: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s
+
+
diff --git a/tests/classes/autoload_010.phpt b/tests/classes/autoload_010.phpt
new file mode 100644
index 000000000..104f6888c
--- /dev/null
+++ b/tests/classes/autoload_010.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Ensure implements does trigger autoload.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ class C implements UndefI
+ {
+ }
+?>
+--EXPECTF--
+In autoload: string(6) "UndefI"
+
+Fatal error: Interface 'UndefI' not found in %s on line %d
diff --git a/tests/classes/autoload_011.phpt b/tests/classes/autoload_011.phpt
new file mode 100644
index 000000000..86858d5f1
--- /dev/null
+++ b/tests/classes/autoload_011.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Ensure extends does trigger autoload.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ class C extends UndefBase
+ {
+ }
+?>
+--EXPECTF--
+In autoload: string(9) "UndefBase"
+
+Fatal error: Class 'UndefBase' not found in %s on line %d
diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt
new file mode 100644
index 000000000..1f516cb4b
--- /dev/null
+++ b/tests/classes/autoload_012.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Ensure callback methods in unknown classes trigger autoload.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+ call_user_func("UndefC::test");
+?>
+--EXPECTF--
+In autoload: string(6) "UndefC"
+
+Warning: call_user_func(UndefC::test): First argument is expected to be a valid callback in %s on line %d
+
diff --git a/tests/classes/autoload_013.phpt b/tests/classes/autoload_013.phpt
new file mode 100644
index 000000000..4309cea17
--- /dev/null
+++ b/tests/classes/autoload_013.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Ensure the ReflectionClass constructor triggers autoload.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ try {
+ new ReflectionClass("UndefC");
+ }
+ catch (ReflectionException $e) {
+ echo $e->getMessage();
+ }
+?>
+--EXPECTF--
+In autoload: string(6) "UndefC"
+Class UndefC does not exist
diff --git a/tests/classes/autoload_014.phpt b/tests/classes/autoload_014.phpt
new file mode 100644
index 000000000..a3f04b7b5
--- /dev/null
+++ b/tests/classes/autoload_014.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Ensure the ReflectionMethod constructor triggers autoload.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ try {
+ new ReflectionMethod("UndefC::test");
+ }
+ catch (ReflectionException $e) {
+ echo $e->getMessage();
+ }
+?>
+--EXPECTF--
+In autoload: string(6) "UndefC"
+Class UndefC does not exist
diff --git a/tests/classes/autoload_015.phpt b/tests/classes/autoload_015.phpt
new file mode 100644
index 000000000..2b14a0de0
--- /dev/null
+++ b/tests/classes/autoload_015.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Ensure the ReflectionProperty constructor triggers autoload.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ try {
+ new ReflectionProperty('UndefC', 'p');
+ }
+ catch (ReflectionException $e) {
+ echo $e->getMessage();
+ }
+?>
+--EXPECTF--
+In autoload: string(6) "UndefC"
+Class UndefC does not exist
diff --git a/tests/classes/autoload_016.phpt b/tests/classes/autoload_016.phpt
new file mode 100644
index 000000000..60263ba95
--- /dev/null
+++ b/tests/classes/autoload_016.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Ensure ReflectionClass::getProperty() triggers autoload
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ $rc = new ReflectionClass("stdClass");
+
+ try {
+ $rc->getProperty("UndefC::p");
+ } catch (ReflectionException $e) {
+ echo $e->getMessage();
+ }
+?>
+--EXPECTF--
+In autoload: string(6) "undefc"
+Class undefc does not exist
diff --git a/tests/classes/autoload_017.phpt b/tests/classes/autoload_017.phpt
new file mode 100644
index 000000000..26de9fd3a
--- /dev/null
+++ b/tests/classes/autoload_017.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Ensure ReflectionClass::implementsInterface triggers autoload.
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "In autoload: ";
+ var_dump($name);
+ }
+
+ $rc = new ReflectionClass("stdClass");
+
+ try {
+ $rc->implementsInterface("UndefI");
+ } catch (ReflectionException $e) {
+ echo $e->getMessage();
+ }
+?>
+--EXPECTF--
+In autoload: string(6) "UndefI"
+Interface UndefI does not exist \ No newline at end of file
diff --git a/tests/classes/autoload_018.phpt b/tests/classes/autoload_018.phpt
new file mode 100644
index 000000000..59e20e2a6
--- /dev/null
+++ b/tests/classes/autoload_018.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Ensure __autoload() allows for recursive calls if the class name differs.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "IN: " . __METHOD__ . "($name)\n";
+
+ static $i = 0;
+ if ($i++ > 10) {
+ echo "-> Recursion detected - as expected.\n";
+ return;
+ }
+
+ class_exists('UndefinedClass' . $i);
+
+ echo "OUT: " . __METHOD__ . "($name)\n";
+ }
+
+ var_dump(class_exists('UndefinedClass0'));
+?>
+--EXPECTF--
+IN: __autoload(UndefinedClass0)
+IN: __autoload(UndefinedClass1)
+IN: __autoload(UndefinedClass2)
+IN: __autoload(UndefinedClass3)
+IN: __autoload(UndefinedClass4)
+IN: __autoload(UndefinedClass5)
+IN: __autoload(UndefinedClass6)
+IN: __autoload(UndefinedClass7)
+IN: __autoload(UndefinedClass8)
+IN: __autoload(UndefinedClass9)
+IN: __autoload(UndefinedClass10)
+IN: __autoload(UndefinedClass11)
+-> Recursion detected - as expected.
+OUT: __autoload(UndefinedClass10)
+OUT: __autoload(UndefinedClass9)
+OUT: __autoload(UndefinedClass8)
+OUT: __autoload(UndefinedClass7)
+OUT: __autoload(UndefinedClass6)
+OUT: __autoload(UndefinedClass5)
+OUT: __autoload(UndefinedClass4)
+OUT: __autoload(UndefinedClass3)
+OUT: __autoload(UndefinedClass2)
+OUT: __autoload(UndefinedClass1)
+OUT: __autoload(UndefinedClass0)
+bool(false)
+
diff --git a/tests/classes/autoload_019.phpt b/tests/classes/autoload_019.phpt
new file mode 100644
index 000000000..783632013
--- /dev/null
+++ b/tests/classes/autoload_019.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Ensure __autoload() recursion is guarded for multiple lookups of same class using difference case.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo __FUNCTION__ . " $name\n";
+ class_exists("undefinedCLASS");
+ }
+
+ class_exists("unDefinedClass");
+?>
+--EXPECTF--
+__autoload unDefinedClass
diff --git a/tests/classes/autoload_020.phpt b/tests/classes/autoload_020.phpt
new file mode 100644
index 000000000..a88e56123
--- /dev/null
+++ b/tests/classes/autoload_020.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Ensure __autoload() is triggered during unserialization.
+--FILE--
+<?php
+ function __autoload($name)
+ {
+ echo "in autoload: $name\n";
+ }
+
+ var_dump(unserialize('O:1:"C":0:{}'));
+?>
+--EXPECTF--
+in autoload: C
+object(__PHP_Incomplete_Class)#%d (1) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(1) "C"
+}
diff --git a/tests/classes/bug27468.phpt b/tests/classes/bug27468.phpt
index f7ec8b688..58a7b6cb1 100644
--- a/tests/classes/bug27468.phpt
+++ b/tests/classes/bug27468.phpt
@@ -11,7 +11,7 @@ new foo();
echo 'OK';
?>
--EXPECTF--
-Notice: Undefined property: foo::$x in %sbug27468.php on line 4
+Notice: Undefined property: foo::$x in %sbug27468.php on line 4
Warning: Invalid argument supplied for foreach() in %sbug27468.php on line 4
OK
diff --git a/tests/classes/constants_basic_001.phpt b/tests/classes/constants_basic_001.phpt
new file mode 100644
index 000000000..74b0fcdf4
--- /dev/null
+++ b/tests/classes/constants_basic_001.phpt
@@ -0,0 +1,89 @@
+--TEST--
+Class constant declarations
+--FILE--
+<?php
+ define('DEFINED', 1234);
+ $def = 456;
+ define('DEFINED_TO_VAR', $def);
+ define('DEFINED_TO_UNDEF_VAR', $undef);
+
+ class C
+ {
+ const c0 = UNDEFINED;
+
+ const c1 = 1, c2 = 1.5;
+ const c3 = + 1, c4 = + 1.5;
+ const c5 = -1, c6 = -1.5;
+
+ const c7 = __LINE__;
+ const c8 = __FILE__;
+ const c9 = __CLASS__;
+ const c10 = __METHOD__;
+ const c11 = __FUNCTION__;
+
+ const c12 = DEFINED;
+ const c13 = DEFINED_TO_VAR;
+ const c14 = DEFINED_TO_UNDEF_VAR;
+
+ const c15 = "hello1";
+ const c16 = 'hello2';
+ const c17 = C::c16;
+ const c18 = self::c17;
+ }
+
+ echo "\nAttempt to access various kinds of class constants:\n";
+ var_dump(C::c0);
+ var_dump(C::c1);
+ var_dump(C::c2);
+ var_dump(C::c3);
+ var_dump(C::c4);
+ var_dump(C::c5);
+ var_dump(C::c6);
+ var_dump(C::c7);
+ var_dump(C::c8);
+ var_dump(C::c9);
+ var_dump(C::c10);
+ var_dump(C::c11);
+ var_dump(C::c12);
+ var_dump(C::c13);
+ var_dump(C::c14);
+ var_dump(C::c15);
+ var_dump(C::c16);
+ var_dump(C::c17);
+ var_dump(C::c18);
+
+ echo "\nExpecting fatal error:\n";
+ var_dump(C::c19);
+
+ echo "\nYou should not see this.";
+?>
+--EXPECTF--
+
+Notice: Undefined variable: undef in %s on line 5
+
+Attempt to access various kinds of class constants:
+
+Notice: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' in %s on line %d
+string(9) "UNDEFINED"
+int(1)
+float(1.5)
+int(1)
+float(1.5)
+int(-1)
+float(-1.5)
+int(15)
+string(%d) "%s"
+string(1) "C"
+string(1) "C"
+string(0) ""
+int(1234)
+int(456)
+NULL
+string(6) "hello1"
+string(6) "hello2"
+string(6) "hello2"
+string(6) "hello2"
+
+Expecting fatal error:
+
+Fatal error: Undefined class constant 'c19' in %s on line 53
diff --git a/tests/classes/constants_basic_002.phpt b/tests/classes/constants_basic_002.phpt
new file mode 100644
index 000000000..0e53ca97c
--- /dev/null
+++ b/tests/classes/constants_basic_002.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Basic class support - defining and reading a class constant.
+--FILE--
+<?php
+ class aclass
+ {
+ const myConst = "hello";
+ }
+
+ echo "\nRead class constant.\n";
+ var_dump(aclass::myConst);
+
+ echo "\nFail to read class constant from instance.\n";
+ $myInstance = new aclass();
+ var_dump($myInstance->myConst);
+
+ echo "\nClass constant not visible in object var_dump.\n";
+ var_dump($myInstance)
+?>
+--EXPECTF--
+
+Read class constant.
+string(5) "hello"
+
+Fail to read class constant from instance.
+
+Notice: Undefined property: aclass::$myConst in %s on line 12
+NULL
+
+Class constant not visible in object var_dump.
+object(aclass)#%d (0) {
+}
diff --git a/tests/classes/constants_basic_003.inc b/tests/classes/constants_basic_003.inc
new file mode 100644
index 000000000..be193e64f
--- /dev/null
+++ b/tests/classes/constants_basic_003.inc
@@ -0,0 +1,5 @@
+<?php
+class A {
+ const MY_CONST = "hello from A";
+}
+?> \ No newline at end of file
diff --git a/tests/classes/constants_basic_003.phpt b/tests/classes/constants_basic_003.phpt
new file mode 100644
index 000000000..052af8573
--- /dev/null
+++ b/tests/classes/constants_basic_003.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Ensure class properties and constants can be defined in terms of constants that are not known at compile time.
+--FILE--
+<?php
+ include 'constants_basic_003.inc';
+ class B
+ {
+ public static $a = A::MY_CONST;
+ public static $c = C::MY_CONST;
+ const ca = A::MY_CONST;
+ const cc = C::MY_CONST;
+ }
+
+ class C
+ {
+ const MY_CONST = "hello from C";
+ }
+
+ var_dump(B::$a);
+ var_dump(B::$c);
+ var_dump(B::ca);
+ var_dump(B::cc);
+?>
+--EXPECTF--
+string(12) "hello from A"
+string(12) "hello from C"
+string(12) "hello from A"
+string(12) "hello from C"
diff --git a/tests/classes/constants_basic_004.phpt b/tests/classes/constants_basic_004.phpt
new file mode 100644
index 000000000..cade66844
--- /dev/null
+++ b/tests/classes/constants_basic_004.phpt
@@ -0,0 +1,99 @@
+--TEST--
+Test properties with array default values using class constants as keys and values.
+--FILE--
+<?php
+ class X
+ {
+ // Static and instance array using class constants
+ public static $sa_x = array(B::KEY => B::VALUE);
+ public $a_x = array(B::KEY => B::VALUE);
+ }
+
+ class B
+ {
+ const KEY = "key";
+ const VALUE = "value";
+
+ // Static and instance array using class constants with self
+ public static $sa_b = array(self::KEY => self::VALUE);
+ public $a_b = array(self::KEY => self::VALUE);
+ }
+
+ class C extends B
+ {
+ // Static and instance array using class constants with parent
+ public static $sa_c_parent = array(parent::KEY => parent::VALUE);
+ public $a_c_parent = array(parent::KEY => parent::VALUE);
+
+ // Static and instance array using class constants with self (constants should be inherited)
+ public static $sa_c_self = array(self::KEY => self::VALUE);
+ public $a_c_self = array(self::KEY => self::VALUE);
+
+ // Should also include inherited properties from B.
+ }
+
+ echo "\nStatic properties:\n";
+ var_dump(X::$sa_x, B::$sa_b, C::$sa_b, C::$sa_c_parent, C::$sa_c_self);
+
+ echo "\nInstance properties:\n";
+ $x = new x;
+ $b = new B;
+ $c = new C;
+ var_dump($x, $b, $c);
+?>
+--EXPECTF--
+
+Static properties:
+array(1) {
+ ["key"]=>
+ string(5) "value"
+}
+array(1) {
+ ["key"]=>
+ string(5) "value"
+}
+array(1) {
+ ["key"]=>
+ string(5) "value"
+}
+array(1) {
+ ["key"]=>
+ string(5) "value"
+}
+array(1) {
+ ["key"]=>
+ string(5) "value"
+}
+
+Instance properties:
+object(X)#%d (1) {
+ ["a_x"]=>
+ array(1) {
+ ["key"]=>
+ string(5) "value"
+ }
+}
+object(B)#%d (1) {
+ ["a_b"]=>
+ array(1) {
+ ["key"]=>
+ string(5) "value"
+ }
+}
+object(C)#%d (3) {
+ ["a_c_parent"]=>
+ array(1) {
+ ["key"]=>
+ string(5) "value"
+ }
+ ["a_c_self"]=>
+ array(1) {
+ ["key"]=>
+ string(5) "value"
+ }
+ ["a_b"]=>
+ array(1) {
+ ["key"]=>
+ string(5) "value"
+ }
+}
diff --git a/tests/classes/constants_basic_005.phpt b/tests/classes/constants_basic_005.phpt
new file mode 100644
index 000000000..c840f5385
--- /dev/null
+++ b/tests/classes/constants_basic_005.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Test constants with default values based on other constants.
+--FILE--
+<?php
+ class C
+ {
+ const CONST_2 = self::CONST_1;
+ const CONST_1 = self::BASE_CONST;
+ const BASE_CONST = 'hello';
+ }
+ var_dump(C::CONST_1, C::CONST_2);
+?>
+--EXPECTF--
+string(5) "hello"
+string(5) "hello"
+
diff --git a/tests/classes/constants_basic_006.phpt b/tests/classes/constants_basic_006.phpt
new file mode 100644
index 000000000..73cf0ef3a
--- /dev/null
+++ b/tests/classes/constants_basic_006.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Ensure class constants are not evaluated when a class is looked up to resolve inheritance during runtime.
+--FILE--
+<?php
+ class C
+ {
+ const X = E::A;
+ public static $a = array(K => D::V, E::A => K);
+ }
+
+ eval('class D extends C { const V = \'test\'; }');
+
+ class E extends D
+ {
+ const A = "hello";
+ }
+
+ define('K', "nasty");
+
+ var_dump(C::X, C::$a, D::X, D::$a, E::X, E::$a);
+?>
+--EXPECTF--
+string(5) "hello"
+array(2) {
+ ["nasty"]=>
+ string(4) "test"
+ ["hello"]=>
+ string(5) "nasty"
+}
+string(5) "hello"
+array(2) {
+ ["nasty"]=>
+ string(4) "test"
+ ["hello"]=>
+ string(5) "nasty"
+}
+string(5) "hello"
+array(2) {
+ ["nasty"]=>
+ string(4) "test"
+ ["hello"]=>
+ string(5) "nasty"
+}
diff --git a/tests/classes/constants_error_001.phpt b/tests/classes/constants_error_001.phpt
new file mode 100644
index 000000000..9bb5533d7
--- /dev/null
+++ b/tests/classes/constants_error_001.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Error case: duplicate class constant definition
+--FILE--
+<?php
+ class myclass
+ {
+ const myConst = "hello";
+ const myConst = "hello again";
+ }
+?>
+--EXPECTF--
+
+Fatal error: Cannot redefine class constant myclass::myConst in %s on line 5
diff --git a/tests/classes/constants_error_002.phpt b/tests/classes/constants_error_002.phpt
new file mode 100644
index 000000000..be27971b8
--- /dev/null
+++ b/tests/classes/constants_error_002.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Error case: class constant as an array
+--FILE--
+<?php
+ class myclass
+ {
+ const myConst = array();
+ }
+?>
+--EXPECTF--
+
+Fatal error: Arrays are not allowed in class constants in %s on line 4
diff --git a/tests/classes/constants_error_003.phpt b/tests/classes/constants_error_003.phpt
new file mode 100644
index 000000000..c67768c80
--- /dev/null
+++ b/tests/classes/constants_error_003.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Basic class support - attempting to pass a class constant by reference.
+--FILE--
+<?php
+ class aclass
+ {
+ const myConst = "hello";
+ }
+
+ function f(&$a)
+ {
+ $a = "changed";
+ }
+
+ f(aclass::myConst);
+ var_dump(aclass::myConst);
+?>
+--EXPECTF--
+
+Fatal error: Only variables can be passed by reference in %s on line 12
diff --git a/tests/classes/constants_error_004.phpt b/tests/classes/constants_error_004.phpt
new file mode 100644
index 000000000..03e67258a
--- /dev/null
+++ b/tests/classes/constants_error_004.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Class constant whose initial value refereces a non-existent class
+--FILE--
+<?php
+ class C
+ {
+ const c1 = D::hello;
+ }
+
+ $a = new C();
+?>
+--EXPECTF--
+Fatal error: Class 'D' not found in %s on line %d
diff --git a/tests/classes/constants_error_005.phpt b/tests/classes/constants_error_005.phpt
new file mode 100644
index 000000000..1283783de
--- /dev/null
+++ b/tests/classes/constants_error_005.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Error case: class constant as an encapsed containing a variable
+--FILE--
+<?php
+ class myclass
+ {
+ const myConst = "$myVar";
+ }
+?>
+--EXPECTF--
+
+Parse error: %s in %s on line %d
diff --git a/tests/classes/constants_error_006.phpt b/tests/classes/constants_error_006.phpt
new file mode 100644
index 000000000..f3f14b867
--- /dev/null
+++ b/tests/classes/constants_error_006.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Basic class support - attempting to modify a class constant by assignment
+--FILE--
+<?php
+ class aclass
+ {
+ const myConst = "hello";
+ }
+
+ echo "\nTrying to modify a class constant directly - should be parse error.\n";
+ aclass::myConst = "no!!";
+ var_dump(aclass::myConst);
+?>
+--EXPECTF--
+
+Parse error: %s in %s on line %d
diff --git a/tests/classes/constants_error_007.phpt b/tests/classes/constants_error_007.phpt
new file mode 100644
index 000000000..4be8d885f
--- /dev/null
+++ b/tests/classes/constants_error_007.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Basic class support - attempting to create a reference to a class constant
+--FILE--
+<?php
+ class aclass
+ {
+ const myConst = "hello";
+ }
+
+ echo "\nAttempting to create a reference to a class constant - should be parse error.\n";
+ $a = &aclass::myConst;
+?>
+--EXPECTF--
+
+Parse error: %s in %s on line %d
diff --git a/tests/classes/final_ctor3.phpt b/tests/classes/final_ctor3.phpt
new file mode 100644
index 000000000..d37e864e2
--- /dev/null
+++ b/tests/classes/final_ctor3.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Ensure implicit final inherited old-style constructor cannot be overridden.
+--FILE--
+<?php
+ class A {
+ final function A() { }
+ }
+ class B extends A {
+ }
+ class C extends B {
+ function B() { }
+ }
+?>
+--EXPECTF--
+Fatal error: Cannot override final method A::B() in %s on line 9
diff --git a/tests/classes/incdec_property_001.phpt b/tests/classes/incdec_property_001.phpt
index 39bf06f65..97a24d30b 100644
--- a/tests/classes/incdec_property_001.phpt
+++ b/tests/classes/incdec_property_001.phpt
@@ -7,13 +7,13 @@ class Test {
private $real_a = 2;
function __set($property, $value) {
- if ($property = "a") {
+ if ($property == "a") {
$this->real_a = $value;
}
}
function __get($property) {
- if ($property = "a") {
+ if ($property == "a") {
return $this->real_a;
}
}
diff --git a/tests/classes/incdec_property_002.phpt b/tests/classes/incdec_property_002.phpt
index fe08625ea..c1d7dded3 100644
--- a/tests/classes/incdec_property_002.phpt
+++ b/tests/classes/incdec_property_002.phpt
@@ -7,13 +7,13 @@ class Test {
private $real_a = 2;
function __set($property, $value) {
- if ($property = "a") {
+ if ($property == "a") {
$this->real_a = $value;
}
}
function __get($property) {
- if ($property = "a") {
+ if ($property == "a") {
return $this->real_a;
}
}
diff --git a/tests/classes/incdec_property_003.phpt b/tests/classes/incdec_property_003.phpt
index d26277ab8..1a923849f 100644
--- a/tests/classes/incdec_property_003.phpt
+++ b/tests/classes/incdec_property_003.phpt
@@ -7,13 +7,13 @@ class Test {
private $real_a = 2;
function __set($property, $value) {
- if ($property = "a") {
+ if ($property == "a") {
$this->real_a = $value;
}
}
function __get($property) {
- if ($property = "a") {
+ if ($property == "a") {
return $this->real_a;
}
}
diff --git a/tests/classes/incdec_property_004.phpt b/tests/classes/incdec_property_004.phpt
index 5ccad190b..05e3b445a 100644
--- a/tests/classes/incdec_property_004.phpt
+++ b/tests/classes/incdec_property_004.phpt
@@ -7,13 +7,13 @@ class Test {
private $real_a = 2;
function __set($property, $value) {
- if ($property = "a") {
+ if ($property == "a") {
$this->real_a = $value;
}
}
function __get($property) {
- if ($property = "a") {
+ if ($property == "a") {
return $this->real_a;
}
}
diff --git a/tests/classes/inheritance_005.phpt b/tests/classes/inheritance_005.phpt
new file mode 100644
index 000000000..b6f47b2a6
--- /dev/null
+++ b/tests/classes/inheritance_005.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Check for inherited old-style constructor.
+--FILE--
+<?php
+ class A
+ {
+ function A()
+ {
+ echo "In " . __METHOD__ . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ }
+
+ class C extends B
+ {
+ }
+
+
+ echo "About to construct new B: ";
+ $b = new B;
+ echo "About to invoke implicit B::B(): ";
+ $b->B();
+
+ echo "\nAbout to construct new C: ";
+ $c = new C;
+ echo "About to invoke implicit C::B(): ";
+ $c->B();
+ echo "About to invoke implicit C::C(): ";
+ $c->C();
+?>
+--EXPECTF--
+About to construct new B: In A::A
+About to invoke implicit B::B(): In A::A
+
+About to construct new C: In A::A
+About to invoke implicit C::B(): In A::A
+About to invoke implicit C::C(): In A::A
+
+
diff --git a/tests/classes/interface_constant_inheritance_001.phpt b/tests/classes/interface_constant_inheritance_001.phpt
new file mode 100644
index 000000000..ae3e71e7a
--- /dev/null
+++ b/tests/classes/interface_constant_inheritance_001.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Ensure an interface may not shadow an inherited constant.
+--FILE--
+<?php
+interface I1 {
+ const FOO = 10;
+}
+
+interface I2 extends I1 {
+ const FOO = 10;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+
+Fatal error: Cannot inherit previously-inherited constant FOO from interface I1 in %s on line 6 \ No newline at end of file
diff --git a/tests/classes/interface_constant_inheritance_002.phpt b/tests/classes/interface_constant_inheritance_002.phpt
new file mode 100644
index 000000000..d5001baa3
--- /dev/null
+++ b/tests/classes/interface_constant_inheritance_002.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Ensure a class may not shadow a constant inherited from an interface.
+--FILE--
+<?php
+interface I {
+ const FOO = 10;
+}
+
+class C implements I {
+ const FOO = 10;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+
+Fatal error: Cannot inherit previously-inherited constant FOO from interface I in %s on line 6 \ No newline at end of file
diff --git a/tests/classes/interface_constant_inheritance_003.phpt b/tests/classes/interface_constant_inheritance_003.phpt
new file mode 100644
index 000000000..a3ba815ed
--- /dev/null
+++ b/tests/classes/interface_constant_inheritance_003.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Ensure a class may not inherit two constants with the same name from two separate interfaces.
+--FILE--
+<?php
+interface I1 {
+ const FOO = 10;
+}
+
+interface I2 {
+ const FOO = 10;
+}
+
+class C implements I1,I2 {
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+
+Fatal error: Cannot inherit previously-inherited constant FOO from interface I2 in %s on line 10
diff --git a/tests/classes/interface_constant_inheritance_004.phpt b/tests/classes/interface_constant_inheritance_004.phpt
new file mode 100644
index 000000000..05b897236
--- /dev/null
+++ b/tests/classes/interface_constant_inheritance_004.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Ensure a class may implement two interfaces which include the same constant due to inheritance.
+--FILE--
+<?php
+interface IA {
+ const FOO = 10;
+}
+
+interface IB extends IA {
+}
+
+class C implements IA, IB {
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+Done
diff --git a/tests/classes/interface_optional_arg_002.phpt b/tests/classes/interface_optional_arg_002.phpt
new file mode 100644
index 000000000..92980f65b
--- /dev/null
+++ b/tests/classes/interface_optional_arg_002.phpt
@@ -0,0 +1,24 @@
+--TEST--
+default argument value in interface implementation
+--SKIPIF--
+<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
+--FILE--
+<?php
+
+interface test {
+ public function bar();
+}
+
+class foo implements test {
+
+ public function bar($arg = 2) {
+ var_dump($arg);
+ }
+}
+
+$foo = new foo;
+$foo->bar();
+
+?>
+--EXPECT--
+int(2) \ No newline at end of file
diff --git a/tests/classes/method_call_variation_001.phpt b/tests/classes/method_call_variation_001.phpt
new file mode 100644
index 000000000..dd43cfd1c
--- /dev/null
+++ b/tests/classes/method_call_variation_001.phpt
@@ -0,0 +1,37 @@
+--TEST--
+In $a->$b[Y](), $b[Y] represents a method name on $a. But in $a->X[Y](), $a->X[Y] represents a global function name.
+--FILE--
+<?php
+ class C
+ {
+ function foo($a, $b)
+ {
+ echo "Called C::foo($a, $b)\n";
+ }
+ }
+
+ $c = new C;
+
+ $functions[0] = 'foo';
+ $functions[1][2][3][4] = 'foo';
+
+ $c->$functions[0](1, 2);
+ $c->$functions[1][2][3][4](3, 4);
+
+
+ function foo($a, $b)
+ {
+ echo "Called global foo($a, $b)\n";
+ }
+
+ $c->functions[0] = 'foo';
+ $c->functions[1][2][3][4] = 'foo';
+
+ $c->functions[0](5, 6);
+ $c->functions[1][2][3][4](7, 8);
+?>
+--EXPECTF--
+Called C::foo(1, 2)
+Called C::foo(3, 4)
+Called global foo(5, 6)
+Called global foo(7, 8)
diff --git a/tests/classes/method_override_optional_arg_001.phpt b/tests/classes/method_override_optional_arg_001.phpt
new file mode 100644
index 000000000..53272fff7
--- /dev/null
+++ b/tests/classes/method_override_optional_arg_001.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Method override allows optional default argument
+--SKIPIF--
+<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
+--FILE--
+<?php
+
+class A {
+ function foo($arg1 = 1) {
+ }
+}
+
+class B extends A {
+ function foo($arg1 = 2, $arg2 = 3) {
+ var_dump($arg1);
+ var_dump($arg2);
+ }
+}
+
+class C extends A {
+ function foo() {
+ }
+}
+
+$b = new B();
+
+$b->foo(1);
+
+?>
+--EXPECTF--
+Strict Standards: Declaration of C::foo() should be compatible with that of A::foo() in %s on line %d
+int(1)
+int(3)
diff --git a/tests/classes/method_override_optional_arg_002.phpt b/tests/classes/method_override_optional_arg_002.phpt
new file mode 100644
index 000000000..c212b8260
--- /dev/null
+++ b/tests/classes/method_override_optional_arg_002.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Omitting optional arg in method inherited from abstract class
+--FILE--
+<?php
+
+abstract class A {
+ function foo($arg = 1) {}
+}
+
+class B extends A {
+ function foo() {
+ echo "foo\n";
+ }
+}
+
+$b = new B();
+$b->foo();
+
+?>
+--EXPECTF--
+Strict Standards: Declaration of B::foo() should be compatible with that of A::foo() in %s on line %d
+foo
diff --git a/tests/classes/new_001.phpt b/tests/classes/new_001.phpt
new file mode 100644
index 000000000..8ef8a71e0
--- /dev/null
+++ b/tests/classes/new_001.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Confirm difference between assigning new directly and by reference.
+--FILE--
+<?php
+ echo "Compile-time strict error message should precede this.\n";
+
+ class Inc
+ {
+ private static $counter = 0;
+ function __construct()
+ {
+ $this->id = ++Inc::$counter;
+ }
+ }
+
+ $f = new Inc();
+ $k =& $f;
+ echo "\$f initially points to the first object:\n";
+ var_dump($f);
+
+ echo "Assigning new object directly to \$k affects \$f:\n";
+ $k = new Inc();
+ var_dump($f);
+
+ echo "Assigning new object by ref to \$k removes it from \$f's reference set, so \$f is unchanged:\n";
+ $k =& new Inc();
+ var_dump($f);
+?>
+--EXPECTF--
+Strict Standards: Assigning the return value of new by reference is deprecated in %s on line 23
+Compile-time strict error message should precede this.
+$f initially points to the first object:
+object(Inc)#%d (1) {
+ ["id"]=>
+ int(1)
+}
+Assigning new object directly to $k affects $f:
+object(Inc)#%d (1) {
+ ["id"]=>
+ int(2)
+}
+Assigning new object by ref to $k removes it from $f's reference set, so $f is unchanged:
+object(Inc)#%d (1) {
+ ["id"]=>
+ int(2)
+}
diff --git a/tests/classes/property_override_privateStatic_private.phpt b/tests/classes/property_override_privateStatic_private.phpt
new file mode 100644
index 000000000..ddd2e5d1a
--- /dev/null
+++ b/tests/classes/property_override_privateStatic_private.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited private static property as private.
+--FILE--
+<?php
+ class A
+ {
+ private static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p (static)
+A::p (static)
+B::p
diff --git a/tests/classes/property_override_privateStatic_privateStatic.phpt b/tests/classes/property_override_privateStatic_privateStatic.phpt
new file mode 100644
index 000000000..d7d645fd0
--- /dev/null
+++ b/tests/classes/property_override_privateStatic_privateStatic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Redeclare inherited private static property as private static.
+--FILE--
+<?php
+ class A
+ {
+ private static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+A::p (static)
+A::p (static)
+B::p (static)
diff --git a/tests/classes/property_override_privateStatic_protected.phpt b/tests/classes/property_override_privateStatic_protected.phpt
new file mode 100644
index 000000000..d4732166c
--- /dev/null
+++ b/tests/classes/property_override_privateStatic_protected.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited private static property as protected.
+--FILE--
+<?php
+ class A
+ {
+ private static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p (static)
+A::p (static)
+B::p
diff --git a/tests/classes/property_override_privateStatic_protectedStatic.phpt b/tests/classes/property_override_privateStatic_protectedStatic.phpt
new file mode 100644
index 000000000..169ff9a37
--- /dev/null
+++ b/tests/classes/property_override_privateStatic_protectedStatic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Redeclare inherited private static property as protected static.
+--FILE--
+<?php
+ class A
+ {
+ private static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+A::p (static)
+A::p (static)
+B::p (static)
diff --git a/tests/classes/property_override_privateStatic_public.phpt b/tests/classes/property_override_privateStatic_public.phpt
new file mode 100644
index 000000000..033eb7523
--- /dev/null
+++ b/tests/classes/property_override_privateStatic_public.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited private static property as public.
+--FILE--
+<?php
+ class A
+ {
+ private static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p (static)
+A::p (static)
+B::p
diff --git a/tests/classes/property_override_privateStatic_publicStatic.phpt b/tests/classes/property_override_privateStatic_publicStatic.phpt
new file mode 100644
index 000000000..5f2b6bf4a
--- /dev/null
+++ b/tests/classes/property_override_privateStatic_publicStatic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Redeclare inherited private static property as public static.
+--FILE--
+<?php
+ class A
+ {
+ private static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+A::p (static)
+A::p (static)
+B::p (static)
diff --git a/tests/classes/property_override_private_private.phpt b/tests/classes/property_override_private_private.phpt
new file mode 100644
index 000000000..2b263eeb6
--- /dev/null
+++ b/tests/classes/property_override_private_private.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited private property as private.
+--FILE--
+<?php
+ class A
+ {
+ private $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p
+A::p
+B::p
diff --git a/tests/classes/property_override_private_privateStatic.phpt b/tests/classes/property_override_private_privateStatic.phpt
new file mode 100644
index 000000000..606ed21d0
--- /dev/null
+++ b/tests/classes/property_override_private_privateStatic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited private property as private static.
+--FILE--
+<?php
+ class A
+ {
+ private $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+A::p
+A::p
+B::p (static)
diff --git a/tests/classes/property_override_private_protected.phpt b/tests/classes/property_override_private_protected.phpt
new file mode 100644
index 000000000..b84ed6787
--- /dev/null
+++ b/tests/classes/property_override_private_protected.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited private property as protected.
+--FILE--
+<?php
+ class A
+ {
+ private $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p
+A::p
+B::p
diff --git a/tests/classes/property_override_private_protectedStatic.phpt b/tests/classes/property_override_private_protectedStatic.phpt
new file mode 100644
index 000000000..1bb303dab
--- /dev/null
+++ b/tests/classes/property_override_private_protectedStatic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited private property as protected static.
+--FILE--
+<?php
+ class A
+ {
+ private $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+A::p
+A::p
+B::p (static)
diff --git a/tests/classes/property_override_private_public.phpt b/tests/classes/property_override_private_public.phpt
new file mode 100644
index 000000000..badbe91d5
--- /dev/null
+++ b/tests/classes/property_override_private_public.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited private property as public.
+--FILE--
+<?php
+ class A
+ {
+ private $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p
+A::p
+B::p
diff --git a/tests/classes/property_override_private_publicStatic.phpt b/tests/classes/property_override_private_publicStatic.phpt
new file mode 100644
index 000000000..9fc58ece4
--- /dev/null
+++ b/tests/classes/property_override_private_publicStatic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited private property as public static.
+--FILE--
+<?php
+ class A
+ {
+ private $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+A::p
+A::p
+B::p (static)
diff --git a/tests/classes/property_override_protectedStatic_private.phpt b/tests/classes/property_override_protectedStatic_private.phpt
new file mode 100644
index 000000000..18e9c78a1
--- /dev/null
+++ b/tests/classes/property_override_protectedStatic_private.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited protected static property as private.
+--FILE--
+<?php
+ class A
+ {
+ protected static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
+
diff --git a/tests/classes/property_override_protectedStatic_privateStatic.phpt b/tests/classes/property_override_protectedStatic_privateStatic.phpt
new file mode 100644
index 000000000..688621077
--- /dev/null
+++ b/tests/classes/property_override_protectedStatic_privateStatic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Redeclare inherited protected static property as private static.
+--FILE--
+<?php
+ class A
+ {
+ protected static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Access level to B::$p must be protected (as in class A) or weaker in %s on line 18
+
diff --git a/tests/classes/property_override_protectedStatic_protected.phpt b/tests/classes/property_override_protectedStatic_protected.phpt
new file mode 100644
index 000000000..0e5fdd301
--- /dev/null
+++ b/tests/classes/property_override_protectedStatic_protected.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited protected static property as protected.
+--FILE--
+<?php
+ class A
+ {
+ protected static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
+
diff --git a/tests/classes/property_override_protectedStatic_protectedStatic.phpt b/tests/classes/property_override_protectedStatic_protectedStatic.phpt
new file mode 100644
index 000000000..16f110094
--- /dev/null
+++ b/tests/classes/property_override_protectedStatic_protectedStatic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Redeclare inherited protected static property as protected static.
+--FILE--
+<?php
+ class A
+ {
+ protected static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+A::p (static)
+A::p (static)
+B::p (static)
diff --git a/tests/classes/property_override_protectedStatic_public.phpt b/tests/classes/property_override_protectedStatic_public.phpt
new file mode 100644
index 000000000..630332559
--- /dev/null
+++ b/tests/classes/property_override_protectedStatic_public.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited protected static property as public.
+--FILE--
+<?php
+ class A
+ {
+ protected static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
+
diff --git a/tests/classes/property_override_protectedStatic_publicStatic.phpt b/tests/classes/property_override_protectedStatic_publicStatic.phpt
new file mode 100644
index 000000000..7e1955dd9
--- /dev/null
+++ b/tests/classes/property_override_protectedStatic_publicStatic.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Redeclare inherited protected static property as public static.
+--FILE--
+<?php
+ class A
+ {
+ protected static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot change initial value of property static protected A::$p in class B in %s on line 18
diff --git a/tests/classes/property_override_protected_private.phpt b/tests/classes/property_override_protected_private.phpt
new file mode 100644
index 000000000..93f0d23eb
--- /dev/null
+++ b/tests/classes/property_override_protected_private.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited protected property as private.
+Included for completeness (duplicates test Zend/tests/errmsg_023.phpt).
+--FILE--
+<?php
+ class A
+ {
+ protected $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Access level to B::$p must be protected (as in class A) or weaker in %s on line 18
diff --git a/tests/classes/property_override_protected_privateStatic.phpt b/tests/classes/property_override_protected_privateStatic.phpt
new file mode 100644
index 000000000..fb7102cb3
--- /dev/null
+++ b/tests/classes/property_override_protected_privateStatic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited protected property as private static.
+--FILE--
+<?php
+ class A
+ {
+ protected $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare non static A::$p as static B::$p in %s on line 18
diff --git a/tests/classes/property_override_protected_protected.phpt b/tests/classes/property_override_protected_protected.phpt
new file mode 100644
index 000000000..c4b0d438c
--- /dev/null
+++ b/tests/classes/property_override_protected_protected.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited protected property as protected.
+--FILE--
+<?php
+ class A
+ {
+ protected $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p
+B::p
+B::p
diff --git a/tests/classes/property_override_protected_protectedStatic.phpt b/tests/classes/property_override_protected_protectedStatic.phpt
new file mode 100644
index 000000000..1ce413026
--- /dev/null
+++ b/tests/classes/property_override_protected_protectedStatic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited protected property as protected static.
+--FILE--
+<?php
+ class A
+ {
+ protected $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare non static A::$p as static B::$p in %s on line 18
diff --git a/tests/classes/property_override_protected_public.phpt b/tests/classes/property_override_protected_public.phpt
new file mode 100644
index 000000000..4702f9a0c
--- /dev/null
+++ b/tests/classes/property_override_protected_public.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited protected property as public.
+--FILE--
+<?php
+ class A
+ {
+ protected $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p
+B::p
+B::p
diff --git a/tests/classes/property_override_protected_publicStatic.phpt b/tests/classes/property_override_protected_publicStatic.phpt
new file mode 100644
index 000000000..8efdf5f6f
--- /dev/null
+++ b/tests/classes/property_override_protected_publicStatic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited protected property as public static.
+--FILE--
+<?php
+ class A
+ {
+ protected $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare non static A::$p as static B::$p in %s on line 18
diff --git a/tests/classes/property_override_publicStatic_private.phpt b/tests/classes/property_override_publicStatic_private.phpt
new file mode 100644
index 000000000..7abe92c9f
--- /dev/null
+++ b/tests/classes/property_override_publicStatic_private.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited public static property as private.
+--FILE--
+<?php
+ class A
+ {
+ public static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
+
diff --git a/tests/classes/property_override_publicStatic_privateStatic.phpt b/tests/classes/property_override_publicStatic_privateStatic.phpt
new file mode 100644
index 000000000..d41db6da3
--- /dev/null
+++ b/tests/classes/property_override_publicStatic_privateStatic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Redeclare inherited public static property as private static.
+--FILE--
+<?php
+ class A
+ {
+ public static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
+
diff --git a/tests/classes/property_override_publicStatic_protected.phpt b/tests/classes/property_override_publicStatic_protected.phpt
new file mode 100644
index 000000000..884159f97
--- /dev/null
+++ b/tests/classes/property_override_publicStatic_protected.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited public static property as protected.
+--FILE--
+<?php
+ class A
+ {
+ public static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
+
diff --git a/tests/classes/property_override_publicStatic_protectedStatic.phpt b/tests/classes/property_override_publicStatic_protectedStatic.phpt
new file mode 100644
index 000000000..b022ef804
--- /dev/null
+++ b/tests/classes/property_override_publicStatic_protectedStatic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Redeclare inherited public static property as protected static.
+--FILE--
+<?php
+ class A
+ {
+ public static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
+
diff --git a/tests/classes/property_override_publicStatic_public.phpt b/tests/classes/property_override_publicStatic_public.phpt
new file mode 100644
index 000000000..d099da047
--- /dev/null
+++ b/tests/classes/property_override_publicStatic_public.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited public static property as public.
+--FILE--
+<?php
+ class A
+ {
+ public static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
+
diff --git a/tests/classes/property_override_publicStatic_publicStatic.phpt b/tests/classes/property_override_publicStatic_publicStatic.phpt
new file mode 100644
index 000000000..9a8686704
--- /dev/null
+++ b/tests/classes/property_override_publicStatic_publicStatic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Redeclare inherited public static property as public static.
+--FILE--
+<?php
+ class A
+ {
+ public static $p = "A::p (static)";
+ static function showA()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ A::showA();
+
+ B::showA();
+ B::showB();
+?>
+--EXPECTF--
+A::p (static)
+A::p (static)
+B::p (static)
diff --git a/tests/classes/property_override_public_private.phpt b/tests/classes/property_override_public_private.phpt
new file mode 100644
index 000000000..c0f37ad95
--- /dev/null
+++ b/tests/classes/property_override_public_private.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited public property as private.
+--FILE--
+<?php
+ class A
+ {
+ public $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
+
diff --git a/tests/classes/property_override_public_privateStatic.phpt b/tests/classes/property_override_public_privateStatic.phpt
new file mode 100644
index 000000000..36223fd34
--- /dev/null
+++ b/tests/classes/property_override_public_privateStatic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited public property as private static.
+--FILE--
+<?php
+ class A
+ {
+ public $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ private static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare non static A::$p as static B::$p in %s on line 18
diff --git a/tests/classes/property_override_public_protected.phpt b/tests/classes/property_override_public_protected.phpt
new file mode 100644
index 000000000..68fdf8286
--- /dev/null
+++ b/tests/classes/property_override_public_protected.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited public property as protected.
+--FILE--
+<?php
+ class A
+ {
+ public $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+
+Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
+
diff --git a/tests/classes/property_override_public_protectedStatic.phpt b/tests/classes/property_override_public_protectedStatic.phpt
new file mode 100644
index 000000000..77e7ebf1f
--- /dev/null
+++ b/tests/classes/property_override_public_protectedStatic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited public property as protected static.
+--FILE--
+<?php
+ class A
+ {
+ public $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ protected static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare non static A::$p as static B::$p in %s on line 18
diff --git a/tests/classes/property_override_public_public.phpt b/tests/classes/property_override_public_public.phpt
new file mode 100644
index 000000000..893fe5d04
--- /dev/null
+++ b/tests/classes/property_override_public_public.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Redeclare inherited public property as public.
+--FILE--
+<?php
+ class A
+ {
+ public $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public $p = "B::p";
+ function showB()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ $b->showB();
+?>
+--EXPECTF--
+A::p
+B::p
+B::p
diff --git a/tests/classes/property_override_public_publicStatic.phpt b/tests/classes/property_override_public_publicStatic.phpt
new file mode 100644
index 000000000..725e947a0
--- /dev/null
+++ b/tests/classes/property_override_public_publicStatic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Redeclare inherited public property as public static.
+--FILE--
+<?php
+ class A
+ {
+ public $p = "A::p";
+ function showA()
+ {
+ echo $this->p . "\n";
+ }
+ }
+
+ class B extends A
+ {
+ public static $p = "B::p (static)";
+ static function showB()
+ {
+ echo self::$p . "\n";
+ }
+ }
+
+
+ $a = new A;
+ $a->showA();
+
+ $b = new B;
+ $b->showA();
+ B::showB();
+?>
+--EXPECTF--
+
+Fatal error: Cannot redeclare non static A::$p as static B::$p in %s on line 18
diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt
new file mode 100644
index 000000000..de0283e8e
--- /dev/null
+++ b/tests/classes/tostring_004.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Object to string conversion: error cases and behaviour variations.
+--FILE--
+<?php
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ echo "Error: $err_no - $err_msg\n";
+}
+set_error_handler('test_error_handler');
+error_reporting(8191);
+
+
+echo "Object with no __toString():\n";
+$obj = new stdClass;
+echo "Try 1:\n";
+printf($obj);
+printf("\n");
+
+echo "\nTry 2:\n";
+printf($obj . "\n");
+
+
+echo "\n\nObject with bad __toString():\n";
+class badToString {
+ function __toString() {
+ return 0;
+ }
+}
+$obj = new badToString;
+echo "Try 1:\n";
+printf($obj);
+printf("\n");
+
+echo "\nTry 2:\n";
+printf($obj . "\n");
+
+?>
+--EXPECTF--
+Object with no __toString():
+Try 1:
+Error: 4096 - Object of class stdClass could not be converted to string
+Error: 8 - Object of class stdClass to string conversion
+Object
+
+Try 2:
+Error: 4096 - Object of class stdClass could not be converted to string
+
+
+
+Object with bad __toString():
+Try 1:
+Error: 4096 - Method badToString::__toString() must return a string value
+
+
+Try 2:
+Error: 4096 - Method badToString::__toString() must return a string value
+
diff --git a/tests/classes/type_hinting_004.phpt b/tests/classes/type_hinting_004.phpt
new file mode 100644
index 000000000..9068909a8
--- /dev/null
+++ b/tests/classes/type_hinting_004.phpt
@@ -0,0 +1,109 @@
+--TEST--
+Ensure type hints are enforced for functions invoked as callbacks.
+--FILE--
+<?php
+ set_error_handler('myErrorHandler', E_RECOVERABLE_ERROR);
+ function myErrorHandler($errno, $errstr, $errfile, $errline) {
+ echo "$errno: $errstr - $errfile($errline)\n";
+ return true;
+ }
+
+ echo "---> Type hints with callback function:\n";
+ class A { }
+ function f1(A $a) {
+ echo "in f1;\n";
+ }
+ function f2(A $a = null) {
+ echo "in f2;\n";
+ }
+ call_user_func('f1', 1);
+ call_user_func('f1', new A);
+ call_user_func('f2', 1);
+ call_user_func('f2');
+ call_user_func('f2', new A);
+ call_user_func('f2', null);
+
+
+ echo "\n\n---> Type hints with callback static method:\n";
+ class C {
+ static function f1(A $a) {
+ if (isset($this)) {
+ echo "in C::f1 (instance);\n";
+ } else {
+ echo "in C::f1 (static);\n";
+ }
+ }
+ static function f2(A $a = null) {
+ if (isset($this)) {
+ echo "in C::f2 (instance);\n";
+ } else {
+ echo "in C::f2 (static);\n";
+ }
+ }
+ }
+ call_user_func(array('C', 'f1'), 1);
+ call_user_func(array('C', 'f1'), new A);
+ call_user_func(array('C', 'f2'), 1);
+ call_user_func(array('C', 'f2'));
+ call_user_func(array('C', 'f2'), new A);
+ call_user_func(array('C', 'f2'), null);
+
+
+ echo "\n\n---> Type hints with callback instance method:\n";
+ class D {
+ function f1(A $a) {
+ if (isset($this)) {
+ echo "in C::f1 (instance);\n";
+ } else {
+ echo "in C::f1 (static);\n";
+ }
+ }
+ function f2(A $a = null) {
+ if (isset($this)) {
+ echo "in C::f2 (instance);\n";
+ } else {
+ echo "in C::f2 (static);\n";
+ }
+ }
+ }
+ $d = new D;
+ call_user_func(array($d, 'f1'), 1);
+ call_user_func(array($d, 'f1'), new A);
+ call_user_func(array($d, 'f2'), 1);
+ call_user_func(array($d, 'f2'));
+ call_user_func(array($d, 'f2'), new A);
+ call_user_func(array($d, 'f2'), null);
+
+?>
+--EXPECTF--
+---> Type hints with callback function:
+4096: Argument 1 passed to f1() must be an instance of A, integer given%s(10)
+in f1;
+in f1;
+4096: Argument 1 passed to f2() must be an instance of A, integer given%s(13)
+in f2;
+in f2;
+in f2;
+in f2;
+
+
+---> Type hints with callback static method:
+4096: Argument 1 passed to C::f1() must be an instance of A, integer given%s(26)
+in C::f1 (static);
+in C::f1 (static);
+4096: Argument 1 passed to C::f2() must be an instance of A, integer given%s(33)
+in C::f2 (static);
+in C::f2 (static);
+in C::f2 (static);
+in C::f2 (static);
+
+
+---> Type hints with callback instance method:
+4096: Argument 1 passed to D::f1() must be an instance of A, integer given%s(51)
+in C::f1 (instance);
+in C::f1 (instance);
+4096: Argument 1 passed to D::f2() must be an instance of A, integer given%s(58)
+in C::f2 (instance);
+in C::f2 (instance);
+in C::f2 (instance);
+in C::f2 (instance);
diff --git a/tests/lang/bug22592.phpt b/tests/lang/bug22592.phpt
index 351ea08b9..270584185 100644
--- a/tests/lang/bug22592.phpt
+++ b/tests/lang/bug22592.phpt
@@ -46,8 +46,8 @@ string(8) "4-4s4s*0"
string(9) "4-4s4s505"
string(9) "454s4s505"
string(1) "-"
-string(6) "string"
-int(4)
-int(5)
+string(1) "s"
+string(1) "4"
+string(1) "5"
string(1) "5"
[Illegal string offset: -1]
diff --git a/tests/lang/bug27439.phpt b/tests/lang/bug27439.phpt
index b12fd1ec6..5b7d875d3 100755
--- a/tests/lang/bug27439.phpt
+++ b/tests/lang/bug27439.phpt
@@ -65,7 +65,7 @@ echo "===DONE===";
?>
--EXPECTF--
123
-Notice: Undefined property: test::$foobar in %s on line %d
+Notice: Undefined property: test::$foobar in %s on line %d
Warning: Invalid argument supplied for foreach() in %s on line %d
diff --git a/tests/lang/empty_variation.phpt b/tests/lang/empty_variation.phpt
new file mode 100644
index 000000000..8e940dae5
--- /dev/null
+++ b/tests/lang/empty_variation.phpt
@@ -0,0 +1,14 @@
+--TEST--
+empty() on array elements
+--FILE--
+<?php
+$a=array('0','empty'=>'0');
+var_dump(empty($a['empty']));
+var_dump(empty($a[0]));
+$b='0';
+var_dump(empty($b));
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
diff --git a/tests/lang/inc_throw.inc b/tests/lang/inc_throw.inc
new file mode 100644
index 000000000..1f032f7e7
--- /dev/null
+++ b/tests/lang/inc_throw.inc
@@ -0,0 +1,5 @@
+<?php
+
+throw new Exception();
+
+?>
diff --git a/tests/lang/include_files/echo.inc b/tests/lang/include_files/echo.inc
new file mode 100644
index 000000000..60714f6e4
--- /dev/null
+++ b/tests/lang/include_files/echo.inc
@@ -0,0 +1,3 @@
+<?php
+echo "Included!\n";
+?> \ No newline at end of file
diff --git a/tests/lang/include_files/eval.inc b/tests/lang/include_files/eval.inc
new file mode 100644
index 000000000..16da86295
--- /dev/null
+++ b/tests/lang/include_files/eval.inc
@@ -0,0 +1,3 @@
+<?php
+eval("require_once 'echo.inc';");
+?> \ No newline at end of file
diff --git a/tests/lang/include_files/function.inc b/tests/lang/include_files/function.inc
new file mode 100644
index 000000000..528f46c56
--- /dev/null
+++ b/tests/lang/include_files/function.inc
@@ -0,0 +1,3 @@
+<?php
+function test() { require_once 'echo.inc'; }
+?>
diff --git a/tests/lang/include_variation1.phpt b/tests/lang/include_variation1.phpt
new file mode 100644
index 000000000..cf99ba9d3
--- /dev/null
+++ b/tests/lang/include_variation1.phpt
@@ -0,0 +1,8 @@
+--TEST--
+include() a file from the current script directory
+--FILE--
+<?php
+include("inc.inc");
+?>
+--EXPECT--
+Included!
diff --git a/tests/lang/include_variation2.phpt b/tests/lang/include_variation2.phpt
new file mode 100644
index 000000000..051ed7157
--- /dev/null
+++ b/tests/lang/include_variation2.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Including a file in the current script directory from an included function
+--FILE--
+<?php
+require_once 'include_files/function.inc';
+test();
+?>
+--EXPECT--
+Included!
diff --git a/tests/lang/include_variation3.phpt b/tests/lang/include_variation3.phpt
new file mode 100644
index 000000000..1fa80c5ab
--- /dev/null
+++ b/tests/lang/include_variation3.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Including a file in the current script directory from eval'd code
+--FILE--
+<?php
+require_once 'include_files/eval.inc';
+?>
+--EXPECT--
+Included! \ No newline at end of file
diff --git a/tests/lang/throw_variation_001.phpt b/tests/lang/throw_variation_001.phpt
new file mode 100644
index 000000000..d942a8793
--- /dev/null
+++ b/tests/lang/throw_variation_001.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Catching an exception thrown from an included file
+--FILE--
+<?php
+
+try {
+ include "inc_throw.inc";
+} catch (Exception $e) {
+ echo "caught exception\n";
+}
+
+?>
+--EXPECT--
+caught exception
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 2a6a20f30..5f7cb0674 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.60.2.1.2.8 2007/07/26 22:45:59 jani Exp $
+// $Id: confutils.js,v 1.60.2.1.2.10 2008/01/17 21:17:29 cellog Exp $
var STDOUT = WScript.StdOut;
var STDERR = WScript.StdErr;
@@ -429,7 +429,7 @@ can be built that way. \
STDOUT.WriteLine("Saving configure options to config.nice.bat");
var nicefile = FSO.CreateTextFile("config.nice.bat", true);
- nicefile.WriteLine(nice);
+ nicefile.WriteLine(nice + " %*");
nicefile.Close();
AC_DEFINE('CONFIGURE_COMMAND', nice);
@@ -1009,6 +1009,14 @@ function ADD_EXTENSION_DEP(extname, dependson, optional)
ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)");
ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib");
ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib");
+ } else {
+ if (dep_present == "no") {
+ if (ext_shared) {
+ WARNING(extname + " has a missing dependency: " + dependson);
+ } else {
+ ERROR("Cannot build " + extname + "; " + dependson + " not enabled");
+ }
+ }
}
}
diff --git a/win32/build/deplister.c b/win32/build/deplister.c
index bbc3527a8..c28ee692d 100644
--- a/win32/build/deplister.c
+++ b/win32/build/deplister.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: deplister.c,v 1.3.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: deplister.c,v 1.3.2.1.2.2 2007/12/31 07:20:17 sebastian Exp $ */
/* This little application will list the DLL dependencies for a PE
* module to it's stdout for use by distro/installer building tools */
diff --git a/win32/crypt_win32.h b/win32/crypt_win32.h
index a0c4bc9c4..26ea53a79 100644
--- a/win32/crypt_win32.h
+++ b/win32/crypt_win32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/globals.c b/win32/globals.c
index ed4fd29d9..da41b8de8 100755
--- a/win32/globals.c
+++ b/win32/globals.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: globals.c,v 1.5.2.1.2.3 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: globals.c,v 1.5.2.1.2.4 2007/12/31 07:20:17 sebastian Exp $ */
#include "php.h"
#include "php_win32_globals.h"
diff --git a/win32/grp.h b/win32/grp.h
index c937e48a6..2f5921093 100644
--- a/win32/grp.h
+++ b/win32/grp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: grp.h,v 1.7.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: grp.h,v 1.7.2.1.2.2 2007/12/31 07:20:17 sebastian Exp $ */
struct group {
char *gr_name;
diff --git a/win32/md5crypt.c b/win32/md5crypt.c
index d07dd16a0..10f08cb29 100644
--- a/win32/md5crypt.c
+++ b/win32/md5crypt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: md5crypt.c,v 1.6.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: md5crypt.c,v 1.6.2.1.2.2 2007/12/31 07:20:17 sebastian Exp $ */
/*
* ----------------------------------------------------------------------------
diff --git a/win32/md5crypt.h b/win32/md5crypt.h
index 30233b031..3e1e78f7b 100644
--- a/win32/md5crypt.h
+++ b/win32/md5crypt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: md5crypt.h,v 1.5.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: md5crypt.h,v 1.5.2.1.2.2 2007/12/31 07:20:17 sebastian Exp $ */
#ifndef _MD5CRYPT_H_
#define _MD5CRYPT_H_
diff --git a/win32/php_win32_globals.h b/win32/php_win32_globals.h
index ea2f1bcdd..2bb851687 100755
--- a/win32/php_win32_globals.h
+++ b/win32/php_win32_globals.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_win32_globals.h,v 1.4.2.1.2.3 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: php_win32_globals.h,v 1.4.2.1.2.4 2007/12/31 07:20:17 sebastian Exp $ */
#ifndef PHP_WIN32_GLOBALS_H
#define PHP_WIN32_GLOBALS_H
diff --git a/win32/select.c b/win32/select.c
index de43dd77f..2dd380dcd 100644
--- a/win32/select.c
+++ b/win32/select.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
#ifdef PHP_WIN32
-/* $Id: select.c,v 1.10.2.2.2.2 2007/04/16 08:09:56 dmitry Exp $ */
+/* $Id: select.c,v 1.10.2.2.2.3 2007/12/31 07:20:17 sebastian Exp $ */
/* Win32 select() will only work with sockets, so we roll our own implementation here.
* - If you supply only sockets, this simply passes through to winsock select().
diff --git a/win32/select.h b/win32/select.h
index 44c483e36..56920161d 100644
--- a/win32/select.h
+++ b/win32/select.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: select.h,v 1.4.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: select.h,v 1.4.2.1.2.2 2007/12/31 07:20:17 sebastian Exp $ */
PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tv);
diff --git a/win32/syslog.h b/win32/syslog.h
index 20c5e137c..27c5464c1 100644
--- a/win32/syslog.h
+++ b/win32/syslog.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: syslog.h,v 1.10.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: syslog.h,v 1.10.2.1.2.2 2007/12/31 07:20:17 sebastian Exp $ */
#ifndef SYSLOG_H
#define SYSLOG_H
diff --git a/win32/winutil.c b/win32/winutil.c
index 49621f978..dd9cbd397 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: winutil.c,v 1.16.2.1.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: winutil.c,v 1.16.2.1.2.2 2007/12/31 07:20:17 sebastian Exp $ */
#include "php.h"
diff --git a/win32/winutil.h b/win32/winutil.h
index 4915a15ec..d20218278 100644
--- a/win32/winutil.h
+++ b/win32/winutil.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |