summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes261
-rw-r--r--NEWS222
-rw-r--r--README.GIT-RULES124
-rw-r--r--README.RELEASE_PROCESS4
-rw-r--r--README.SVN-RULES151
-rw-r--r--README.Zeus112
-rwxr-xr-xUPGRADING9
-rw-r--r--Zend/tests/bug54547.phpt21
-rwxr-xr-xZend/tests/bug61761.phpt18
-rw-r--r--Zend/tests/bug61782.phpt29
-rw-r--r--Zend/tests/bug62005.phpt15
-rw-r--r--Zend/tests/gc_029.phpt2
-rw-r--r--Zend/tests/gc_029_zts.phpt37
-rw-r--r--Zend/zend.c9
-rw-r--r--Zend/zend_compile.c4
-rw-r--r--Zend/zend_compile.h4
-rw-r--r--Zend/zend_execute.c3
-rwxr-xr-xZend/zend_interfaces.c2
-rw-r--r--Zend/zend_language_scanner.c689
-rw-r--r--Zend/zend_language_scanner.l7
-rw-r--r--Zend/zend_language_scanner_defs.h2
-rw-r--r--Zend/zend_object_handlers.c28
-rw-r--r--Zend/zend_object_handlers.h3
-rw-r--r--Zend/zend_objects.c26
-rw-r--r--Zend/zend_operators.c19
-rw-r--r--Zend/zend_operators.h24
-rw-r--r--Zend/zend_vm_def.h6
-rw-r--r--Zend/zend_vm_execute.h10
-rw-r--r--acinclude.m46
-rw-r--r--aclocal.m46
-rwxr-xr-xconfigure98
-rw-r--r--configure.in6
-rw-r--r--ext/calendar/tests/unixtojd.phpt25
-rw-r--r--ext/com_dotnet/tests/bug49192.phpt14
-rw-r--r--ext/curl/interface.c2
-rw-r--r--ext/curl/tests/bug61948.phpt20
-rw-r--r--ext/date/lib/timezonedb.h1251
-rw-r--r--ext/date/tests/bug52062.phpt8
-rw-r--r--ext/date/tests/date_default_timezone_get-1-win32.phpt24
-rw-r--r--ext/date/tests/date_default_timezone_get-1.phpt4
-rw-r--r--ext/date/tests/date_default_timezone_get-2.phpt4
-rwxr-xr-xext/dom/tests/DOMAttr_value_basic_001.phpt4
-rw-r--r--ext/dom/tests/DOMAttr_value_basic_002.phpt4
-rwxr-xr-xext/dom/tests/DOMCharacterData_data_error_002.phpt4
-rwxr-xr-xext/dom/tests/DOMCharacterData_length_error_001.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt2
-rw-r--r--ext/dom/tests/dom007.phpt26
-rw-r--r--ext/dom/tests/note.dtd6
-rw-r--r--ext/dom/tests/note.xml8
-rw-r--r--ext/fileinfo/libmagic.patch249
-rw-r--r--ext/fileinfo/libmagic/file.h1
-rw-r--r--ext/fileinfo/libmagic/funcs.c2
-rw-r--r--ext/filter/tests/bug52209.phpt8
-rw-r--r--ext/gd/tests/bug48555.phpt20
-rw-r--r--ext/interbase/ibase_service.c4
-rwxr-xr-xext/intl/formatter/formatter_parse.c5
-rwxr-xr-xext/intl/msgformat/msgformat.c4
-rw-r--r--ext/intl/tests/bug59597_32.phpt21
-rw-r--r--ext/intl/tests/bug59597_64.phpt21
-rw-r--r--ext/json/json.c13
-rw-r--r--ext/json/tests/bug61978.phpt47
-rw-r--r--ext/ldap/tests/ldap_sasl_bind_basic.phpt7
-rw-r--r--ext/ldap/tests/ldap_set_rebind_proc_error.phpt10
-rw-r--r--ext/libxml/libxml.c3
-rw-r--r--ext/libxml/tests/bug61367-read.phpt1
-rw-r--r--ext/mbstring/tests/bug52861.phpt4
-rw-r--r--ext/mbstring/tests/mb_send_mail01.phpt4
-rw-r--r--ext/mbstring/tests/mb_send_mail02.phpt4
-rw-r--r--ext/mbstring/tests/mb_send_mail03.phpt4
-rw-r--r--ext/mbstring/tests/mb_send_mail04.phpt4
-rw-r--r--ext/mbstring/tests/mb_send_mail05.phpt4
-rw-r--r--ext/mbstring/tests/mb_send_mail06.phpt4
-rw-r--r--ext/mbstring/tests/mb_send_mail07.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_options_openbasedir.phpt1
-rw-r--r--ext/mysqlnd/mysqlnd.c2
-rw-r--r--ext/mysqlnd/mysqlnd_plugin.c27
-rw-r--r--ext/mysqlnd/mysqlnd_ps.c4
-rw-r--r--ext/mysqlnd/php_mysqlnd.c24
-rw-r--r--ext/oci8/tests/ini_1.phpt82
-rw-r--r--ext/pdo/Makefile.frag4
-rw-r--r--ext/pdo/pdo_sql_parser.c211
-rw-r--r--ext/pdo/pdo_sql_parser.re9
-rw-r--r--ext/pdo_mysql/tests/bug_61411.phpt53
-rw-r--r--ext/pdo_mysql/tests/bug_61755.phpt41
-rw-r--r--ext/pgsql/config.m41
-rw-r--r--ext/pgsql/pgsql.c149
-rw-r--r--ext/pgsql/php_pgsql.h2
-rw-r--r--ext/pgsql/tests/08escape.phpt37
-rw-r--r--ext/phar/tar.c10
-rw-r--r--ext/phar/tests/files/openssl.cnf43
-rw-r--r--ext/phar/tests/phar_buildfromdirectory2-win.phpt30
-rw-r--r--ext/phar/tests/phar_buildfromdirectory2.phpt5
-rw-r--r--ext/phar/tests/phar_setsignaturealgo2.phpt4
-rw-r--r--ext/phar/tests/tar/phar_commitwrite.phpt5
-rw-r--r--ext/phar/tests/tar/phar_setsignaturealgo2.phpt4
-rw-r--r--ext/phar/tests/zip/phar_commitwrite.phpt5
-rw-r--r--ext/phar/tests/zip/phar_setsignaturealgo2.phpt6
-rw-r--r--ext/posix/tests/posix_setgid_error.phpt1
-rw-r--r--ext/reflection/php_reflection.c100
-rw-r--r--ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt52
-rw-r--r--ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt30
-rw-r--r--ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt25
-rw-r--r--ext/reflection/tests/bug47254.phpt1
-rw-r--r--ext/session/tests/bug42596.phpt5
-rw-r--r--ext/session/tests/bug61728.phpt39
-rw-r--r--ext/session/tests/rfc1867_invalid_settings-win.phpt19
-rw-r--r--ext/session/tests/rfc1867_invalid_settings.phpt6
-rw-r--r--ext/session/tests/rfc1867_invalid_settings_2-win.phpt19
-rw-r--r--ext/session/tests/rfc1867_invalid_settings_2.phpt6
-rw-r--r--ext/session/tests/session_set_save_handler_class_002.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_iface_001.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_iface_002.phpt2
-rw-r--r--ext/soap/php_http.c2
-rw-r--r--ext/soap/tests/bugs/bug31422-win.phpt47
-rw-r--r--ext/soap/tests/bugs/bug31422.phpt7
-rw-r--r--ext/soap/tests/server019.phpt4
-rw-r--r--ext/soap/tests/server020.phpt4
-rw-r--r--ext/sockets/tests/socket_create_listen-win32.phpt21
-rw-r--r--ext/sockets/tests/socket_create_listen.phpt3
-rw-r--r--ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt38
-rw-r--r--ext/sockets/tests/socket_create_pair-wrongparams.phpt3
-rw-r--r--ext/sockets/tests/socket_listen-wrongparams.phpt3
-rw-r--r--ext/sockets/tests/socket_select-wrongparams-1-win32.phpt25
-rw-r--r--ext/sockets/tests/socket_select-wrongparams-1.phpt9
-rw-r--r--ext/sockets/tests/socket_sentto_recvfrom_unix.phpt3
-rw-r--r--ext/sockets/tests/unixloop.phpt3
-rw-r--r--ext/sqlite3/tests/sqlite3_15_open_error-win.phpt37
-rw-r--r--ext/sqlite3/tests/sqlite3_15_open_error.phpt3
-rw-r--r--ext/standard/array.c12
-rw-r--r--ext/standard/filestat.c7
-rw-r--r--ext/standard/iptc.c8
-rw-r--r--ext/standard/math.c4
-rw-r--r--ext/standard/pack.c6
-rw-r--r--ext/standard/php_fopen_wrapper.c14
-rw-r--r--ext/standard/string.c5
-rw-r--r--ext/standard/tests/array/bug61730.phpt37
-rw-r--r--ext/standard/tests/file/bug61961.phpt14
-rw-r--r--ext/standard/tests/file/popen_pclose_error-win32.phpt5
-rw-r--r--ext/standard/tests/file/realpath_cache.phpt2
-rw-r--r--ext/standard/tests/file/realpath_cache_win32.phpt2
-rw-r--r--ext/standard/tests/file/rename_variation13-win32.phptbin4692 -> 4692 bytes
-rw-r--r--ext/standard/tests/file/windows_acls/bug44859.phpt1
-rw-r--r--ext/standard/tests/file/windows_acls/bug44859_2.phpt1
-rw-r--r--ext/standard/tests/file/windows_acls/bug44859_3.phpt1
-rw-r--r--ext/standard/tests/file/windows_acls/bug44859_4.phpt1
-rw-r--r--ext/standard/tests/file/windows_acls/common.inc59
-rw-r--r--ext/standard/tests/file/windows_links/bug48746.phpt9
-rw-r--r--ext/standard/tests/file/windows_links/bug48746_1.phpt11
-rw-r--r--ext/standard/tests/file/windows_links/bug48746_2.phpt11
-rw-r--r--ext/standard/tests/file/windows_links/bug48746_3.phpt10
-rw-r--r--ext/standard/tests/file/windows_links/common.inc23
-rw-r--r--ext/standard/tests/general_functions/bug44295-win.phpt29
-rw-r--r--ext/standard/tests/general_functions/bug44295.phpt5
-rw-r--r--ext/standard/tests/general_functions/bug49847.phpt2
-rw-r--r--ext/standard/tests/misc/time_sleep_until_basic.phpt14
-rw-r--r--ext/standard/tests/streams/bug60106.phpt20
-rw-r--r--ext/standard/tests/streams/bug61115-1.phpt2
-rw-r--r--ext/standard/tests/streams/bug61371-win.phpt45
-rw-r--r--ext/standard/tests/streams/bug61371.phpt5
-rw-r--r--ext/standard/tests/streams/stream_get_line_NUL_delimiter.phpt27
-rw-r--r--ext/standard/tests/strings/bug38770.phpt6
-rw-r--r--ext/standard/tests/strings/bug61660.phpt11
-rw-r--r--ext/standard/tests/strings/bug61764.phpt15
-rw-r--r--ext/standard/tests/strings/htmlentities15.phpt2
-rw-r--r--ext/tidy/tests/bug54682.phpt2
-rw-r--r--ext/zlib/tests/bug61443.phpt15
-rw-r--r--ext/zlib/tests/bug61820.phpt23
-rw-r--r--ext/zlib/tests/gzencode_variation1-win32.phpt15
-rw-r--r--ext/zlib/zlib.c11
-rw-r--r--main/SAPI.c42
-rw-r--r--main/SAPI.h1
-rw-r--r--main/main.c14
-rw-r--r--main/output.c1
-rw-r--r--main/php_config.h.in3
-rw-r--r--main/php_output.h3
-rw-r--r--main/php_version.h8
-rwxr-xr-xmain/streams/streams.c11
-rwxr-xr-xmakedist8
-rw-r--r--php.ini-development2
-rw-r--r--php.ini-production2
-rwxr-xr-xrun-tests.php40
-rw-r--r--sapi/cgi/cgi_main.c15
-rw-r--r--sapi/cgi/tests/bug61605.phpt34
-rw-r--r--sapi/cli/php_cli.c11
-rw-r--r--sapi/cli/php_cli_server.c137
-rw-r--r--sapi/cli/tests/bug61546.phpt22
-rw-r--r--sapi/cli/tests/bug61977.phpt157
-rw-r--r--sapi/cli/tests/php_cli_server.inc20
-rw-r--r--sapi/cli/tests/php_cli_server_012.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_014.phpt4
-rw-r--r--sapi/cli/tests/php_cli_server_016.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_017.phpt2
-rw-r--r--tests/basic/021.phpt1
-rw-r--r--tests/basic/bug20539.phpt3
-rwxr-xr-xtests/classes/ctor_in_interface_02.phpt1
-rw-r--r--tests/output/ob_013.phpt4
-rw-r--r--win32/build/confutils.js4
-rw-r--r--win32/build/libs_version.txt2
-rw-r--r--win32/build/mkdist.php2
199 files changed, 4200 insertions, 1945 deletions
diff --git a/.gitattributes b/.gitattributes
index d53e569db..1f4a7195b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -22,152 +22,153 @@ sapi/continuity/capi.c ident
Zend/RFCs/002.txt ident
Zend/RFCs/003.txt ident
NEWS merge=NEWS
-/ext/bz2/tests/005.phpt -crlf
-/ext/dom/tests/dom005.phpt -crlf
-/ext/dom/tests/DOMImplementation_createDocumentType_basic.phpt -crlf
-/ext/ereg/tests/009.phpt -crlf
-/ext/iconv/tests/eucjp2sjis.phpt -crlf
-/ext/iconv/tests/eucjp2utf8.phpt -crlf
-/ext/iconv/tests/iconv_stream_filter_delimiter.phpt -crlf
-/ext/iconv/tests/iconv_stream_filter.phpt -crlf
-/ext/mbstring/tests/mb_split-compat-01.phpt -crlf
-/ext/phar/tests/005.phpt -crlf
-/ext/phar/tests/phar_commitwrite.phpt -crlf
-/ext/phar/tests/phar_create_in_cwd.phpt -crlf
-/ext/phar/tests/phar_mount.phpt -crlf
-/ext/reflection/tests/009.phpt -crlf
-/ext/reflection/tests/025.phpt -crlf
-/ext/standard/tests/general_functions/highlight_heredoc.phpt -crlf
-/ext/standard/tests/general_functions/parse_ini_file.phpt -crlf
-/ext/standard/tests/general_functions/parse_ini_string_002.phpt -crlf
-/ext/standard/tests/strings/006.phpt -crlf
-/ext/standard/tests/strings/addslashes_variation2.phpt -crlf
-/ext/standard/tests/strings/addslashes_variation3.phpt -crlf
-/ext/standard/tests/strings/bug21453.phpt -crlf
-/ext/standard/tests/strings/chop_variation3.phpt -crlf
-/ext/standard/tests/strings/chunk_split_variation11.phpt -crlf
-/ext/standard/tests/strings/chunk_split_variation12.phpt -crlf
-/ext/standard/tests/strings/chunk_split_variation4.phpt -crlf
-/ext/standard/tests/strings/crc32_variation2.phpt -crlf
-/ext/standard/tests/strings/crc32_variation3.phpt -crlf
-/ext/standard/tests/strings/crc32_variation4.phpt -crlf
+/ext/bz2/tests/with_strings.phpt -crlf
+/ext/dom/tests/bug40836.phpt -crlf
+/ext/dom/tests/domelement.phpt -crlf
+/ext/ereg/tests/eregi_basic_002.phpt -crlf
+/ext/iconv/tests/iconv004.phpt -crlf
+/ext/iconv/tests/iconv_basic.phpt -crlf
+/ext/iconv/tests/iconv_strpos.phpt -crlf
+/ext/iconv/tests/iconv_strpos_variation2.phpt -crlf
+/ext/mbstring/tests/mb_strtoupper_error2.phpt -crlf
+/ext/phar/tests/delete_in_phar_confirm.phpt -crlf
+/ext/phar/tests/frontcontroller12.phpt -crlf
+/ext/phar/tests/security.phpt -crlf
+/ext/phar/tests/test_signaturealgos.phpt -crlf
+/ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt -crlf
+/ext/reflection/tests/ReflectionProperty_getModifiers_basic.phpt -crlf
+/ext/spl/tests/dllist_007.phpt -crlf
+/ext/spl/tests/iterator_012.phpt -crlf
+/ext/spl/tests/SplArray_fromArray.phpt -crlf
+/ext/standard/tests/dir/scandir_variation3.phpt -crlf
+/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt -crlf
+/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt -crlf
+/ext/standard/tests/strings/bug26817.phpt -crlf
+/ext/standard/tests/strings/bug26973.phpt -crlf
+/ext/standard/tests/strings/bug27457.phpt -crlf
+/ext/standard/tests/strings/bug28386.phpt -crlf
+/ext/standard/tests/strings/bug37262.phpt -crlf
+/ext/standard/tests/strings/bug40637.phpt -crlf
+/ext/standard/tests/strings/bug40915.phpt -crlf
+/ext/standard/tests/strings/bug61374.phpt -crlf
+/ext/standard/tests/strings/chop_error.phpt -crlf
+/ext/standard/tests/strings/chop_variation2.phpt -crlf
+/ext/standard/tests/strings/chunk_split_variation10.phpt -crlf
+/ext/standard/tests/strings/chunk_split_variation8.phpt -crlf
+/ext/standard/tests/strings/count_chars_variation2.phpt -crlf
+/ext/standard/tests/strings/dirname_error.phpt -crlf
+/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt -crlf
/ext/standard/tests/strings/highlight_file.phpt -crlf
-/ext/standard/tests/strings/htmlentities_html4.phpt -crlf
-/ext/standard/tests/strings/lcfirst.phpt -crlf
-/ext/standard/tests/strings/ltrim.phpt -crlf
-/ext/standard/tests/strings/nl2br_variation2.phpt -crlf
-/ext/standard/tests/strings/php_strip_whitespace.phpt -crlf
+/ext/standard/tests/strings/htmlentities03.phpt -crlf
+/ext/standard/tests/strings/htmlentities04.phpt -crlf
+/ext/standard/tests/strings/htmlentities08.phpt -crlf
+/ext/standard/tests/strings/htmlentities15.phpt -crlf
+/ext/standard/tests/strings/http_build_query.phpt -crlf
+/ext/standard/tests/strings/metaphone.phpt -crlf
+/ext/standard/tests/strings/ord_error.phpt -crlf
+/ext/standard/tests/strings/printf_basic2.phpt -crlf
+/ext/standard/tests/strings/printf_variation2.phpt -crlf
+/ext/standard/tests/strings/quoted_printable_decode_basic.phpt -crlf
/ext/standard/tests/strings/rtrim.phpt -crlf
-/ext/standard/tests/strings/sprintf_f_2.phpt -crlf
-/ext/standard/tests/strings/sprintf_variation15.phpt -crlf
-/ext/standard/tests/strings/strcspn_variation6.phpt -crlf
-/ext/standard/tests/strings/strcspn_variation7.phpt -crlf
-/ext/standard/tests/strings/strcspn_variation8.phpt -crlf
-/ext/standard/tests/strings/stripos_variation1.phpt -crlf
-/ext/standard/tests/strings/stripos_variation3.phpt -crlf
-/ext/standard/tests/strings/stripos_variation4.phpt -crlf
-/ext/standard/tests/strings/stripos_variation5.phpt -crlf
-/ext/standard/tests/strings/stripos_variation6.phpt -crlf
+/ext/standard/tests/strings/setlocale_variation1.phpt -crlf
+/ext/standard/tests/strings/sha1_basic.phpt -crlf
+/ext/standard/tests/strings/similar_text_basic.phpt -crlf
+/ext/standard/tests/strings/soundex.phpt -crlf
+/ext/standard/tests/strings/sprintf_basic1.phpt -crlf
+/ext/standard/tests/strings/sprintf_basic4.phpt -crlf
+/ext/standard/tests/strings/sprintf_basic7.phpt -crlf
+/ext/standard/tests/strings/sprintf_variation12.phpt -crlf
+/ext/standard/tests/strings/sprintf_variation28.phpt -crlf
+/ext/standard/tests/strings/sprintf_variation29.phpt -crlf
+/ext/standard/tests/strings/sprintf_variation30.phpt -crlf
+/ext/standard/tests/strings/sprintf_variation31.phpt -crlf
+/ext/standard/tests/strings/sprintf_variation38.phpt -crlf
+/ext/standard/tests/strings/sprintf_variation42.phpt -crlf
+/ext/standard/tests/strings/sprintf_variation6.phpt -crlf
+/ext/standard/tests/strings/sscanf_basic2.phpt -crlf
+/ext/standard/tests/strings/sscanf_basic3.phpt -crlf
+/ext/standard/tests/strings/str_getcsv_001.phpt -crlf
+/ext/standard/tests/strings/stripcslashes_basic.phpt -crlf
+/ext/standard/tests/strings/stripos_variation11.phpt -crlf
+/ext/standard/tests/strings/stripos_variation13.phpt -crlf
+/ext/standard/tests/strings/stripslashes_variation1.phpt -crlf
/ext/standard/tests/strings/stripslashes_variation2.phpt -crlf
-/ext/standard/tests/strings/stripslashes_variation3.phpt -crlf
-/ext/standard/tests/strings/stripslashes_variation4.phpt -crlf
-/ext/standard/tests/strings/stripslashes_variation5.phpt -crlf
-/ext/standard/tests/strings/str_ireplace.phpt -crlf
-/ext/standard/tests/strings/strnatcmp_basic.phpt -crlf
-/ext/standard/tests/strings/strncasecmp_variation9.phpt -crlf
-/ext/standard/tests/strings/strpos.phpt -crlf
-/ext/standard/tests/strings/strrchr_variation1.phpt -crlf
-/ext/standard/tests/strings/strrchr_variation2.phpt -crlf
-/ext/standard/tests/strings/strrchr_variation3.phpt -crlf
-/ext/standard/tests/strings/strrchr_variation4.phpt -crlf
-/ext/standard/tests/strings/strrchr_variation6.phpt -crlf
-/ext/standard/tests/strings/strrchr_variation7.phpt -crlf
-/ext/standard/tests/strings/str_replace.phpt -crlf
-/ext/standard/tests/strings/strrev_variation3.phpt -crlf
-/ext/standard/tests/strings/strrev_variation4.phpt -crlf
-/ext/standard/tests/strings/strripos_variation1.phpt -crlf
-/ext/standard/tests/strings/strripos_variation2.phpt -crlf
-/ext/standard/tests/strings/strripos_variation3.phpt -crlf
-/ext/standard/tests/strings/strripos_variation4.phpt -crlf
-/ext/standard/tests/strings/strripos_variation5.phpt -crlf
-/ext/standard/tests/strings/strrpos_variation1.phpt -crlf
-/ext/standard/tests/strings/strrpos_variation2.phpt -crlf
-/ext/standard/tests/strings/strrpos_variation3.phpt -crlf
+/ext/standard/tests/strings/stristr_error.phpt -crlf
+/ext/standard/tests/strings/strnatcasecmp_basic.phpt -crlf
+/ext/standard/tests/strings/strncasecmp_variation6.phpt -crlf
+/ext/standard/tests/strings/strncasecmp_variation7.phpt -crlf
+/ext/standard/tests/strings/strncasecmp_variation8.phpt -crlf
+/ext/standard/tests/strings/strrchr_error.phpt -crlf
+/ext/standard/tests/strings/strrchr.phpt -crlf
+/ext/standard/tests/strings/strrchr_variation11.phpt -crlf
+/ext/standard/tests/strings/strrpos_error.phpt -crlf
/ext/standard/tests/strings/strrpos_variation4.phpt -crlf
-/ext/standard/tests/strings/strrpos_variation5.phpt -crlf
-/ext/standard/tests/strings/strrpos_variation6.phpt -crlf
-/ext/standard/tests/strings/strspn_variation5.phpt -crlf
-/ext/standard/tests/strings/strspn_variation6.phpt -crlf
-/ext/standard/tests/strings/strspn_variation7.phpt -crlf
-/ext/standard/tests/strings/strspn_variation8.phpt -crlf
-/ext/standard/tests/strings/strstr.phpt -crlf
-/ext/standard/tests/strings/strtok_variation1.phpt -crlf
-/ext/standard/tests/strings/strtok_variation3.phpt -crlf
-/ext/standard/tests/strings/strtr_variation1.phpt -crlf
-/ext/standard/tests/strings/strtr_variation2.phpt -crlf
-/ext/standard/tests/strings/str_word_count.phpt -crlf
-/ext/standard/tests/strings/trim1.phpt -crlf
-/ext/standard/tests/strings/ucfirst.phpt -crlf
-/ext/standard/tests/strings/vfprintf_variation10.phpt -crlf
+/ext/standard/tests/strings/strrpos_variation8.phpt -crlf
+/ext/standard/tests/strings/strstr2.phpt -crlf
+/ext/standard/tests/strings/strtok_error.phpt -crlf
+/ext/standard/tests/strings/strtok_variation2.phpt -crlf
+/ext/standard/tests/strings/strtolower-win32.phpt -crlf
+/ext/standard/tests/strings/substr_compare.phpt -crlf
+/ext/standard/tests/strings/ucwords_variation1.phpt -crlf
+/ext/standard/tests/strings/unpack.phpt -crlf
+/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt -crlf
+/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt -crlf
+/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt -crlf
/ext/standard/tests/strings/vfprintf_variation12.phpt -crlf
-/ext/standard/tests/strings/vfprintf_variation16.phpt -crlf
-/ext/standard/tests/strings/vfprintf_variation18.phpt -crlf
-/ext/standard/tests/strings/vfprintf_variation4.phpt -crlf
-/ext/standard/tests/strings/vfprintf_variation6.phpt -crlf
+/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt -crlf
/ext/standard/tests/strings/vfprintf_variation7.phpt -crlf
-/ext/standard/tests/strings/vfprintf_variation8.phpt -crlf
+/ext/standard/tests/strings/vprintf_basic2.phpt -crlf
+/ext/standard/tests/strings/vprintf_basic7_64bit.phpt -crlf
/ext/standard/tests/strings/vprintf_variation10.phpt -crlf
-/ext/standard/tests/strings/vprintf_variation12.phpt -crlf
-/ext/standard/tests/strings/vprintf_variation14.phpt -crlf
-/ext/standard/tests/strings/vprintf_variation18.phpt -crlf
+/ext/standard/tests/strings/vprintf_variation14_64bit.phpt -crlf
+/ext/standard/tests/strings/vprintf_variation17.phpt -crlf
/ext/standard/tests/strings/vprintf_variation4.phpt -crlf
-/ext/standard/tests/strings/vprintf_variation6.phpt -crlf
-/ext/standard/tests/strings/vprintf_variation7.phpt -crlf
-/ext/standard/tests/strings/vprintf_variation8.phpt -crlf
-/ext/standard/tests/strings/vsprintf_variation10.phpt -crlf
-/ext/standard/tests/strings/vsprintf_variation12.phpt -crlf
-/ext/standard/tests/strings/vsprintf_variation14.phpt -crlf
-/ext/standard/tests/strings/vsprintf_variation16.phpt -crlf
-/ext/standard/tests/strings/vsprintf_variation4.phpt -crlf
-/ext/standard/tests/strings/vsprintf_variation6.phpt -crlf
+/ext/standard/tests/strings/vsprintf_basic4.phpt -crlf
+/ext/standard/tests/strings/vsprintf_basic8.phpt -crlf
+/ext/standard/tests/strings/vsprintf_variation12_64bit.phpt -crlf
+/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt -crlf
+/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt -crlf
+/ext/standard/tests/strings/vsprintf_variation17.phpt -crlf
+/ext/standard/tests/strings/vsprintf_variation4_64bit.phpt -crlf
/ext/standard/tests/strings/vsprintf_variation7.phpt -crlf
-/ext/standard/tests/strings/vsprintf_variation8.phpt -crlf
/ext/standard/tests/strings/wordwrap.phpt -crlf
-/ext/tidy/tests/010.phpt -crlf
-/ext/tidy/tests/012.phpt -crlf
-/ext/tidy/tests/025.phpt -crlf
-/ext/tidy/tests/030.phpt -crlf
+/ext/standard/tests/strings/wordwrap_variation5.phpt -crlf
+/ext/standard/tests/url/rawurldecode_variation_001.phpt -crlf
+/ext/tidy/tests/009.phpt -crlf
+/ext/tidy/tests/013.phpt -crlf
+/ext/tidy/tests/021.phpt -crlf
+/ext/tidy/tests/tidy_error.phpt -crlf
+/ext/tokenizer/tests/002.phpt -crlf
/ext/tokenizer/tests/bug26463.phpt -crlf
+/ext/tokenizer/tests/token_get_all_error.phpt -crlf
+/ext/tokenizer/tests/token_get_all_variation11.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation12.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation13.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation14.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation15.phpt -crlf
-/ext/tokenizer/tests/token_get_all_variation16.phpt -crlf
-/ext/tokenizer/tests/token_get_all_variation17.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation18.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation19.phpt -crlf
-/ext/tokenizer/tests/token_get_all_variation4.phpt -crlf
+/ext/tokenizer/tests/token_get_all_variation1.phpt -crlf
+/ext/tokenizer/tests/token_get_all_variation2.phpt -crlf
+/ext/tokenizer/tests/token_get_all_variation3.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation5.phpt -crlf
-/ext/tokenizer/tests/token_get_all_variation6.phpt -crlf
-/ext/tokenizer/tests/token_get_all_variation7.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation8.phpt -crlf
-/ext/tokenizer/tests/token_get_all_variation9.phpt -crlf
-/ext/xml/tests/bug26614_libxml.phpt -crlf
-/ext/xmlwriter/tests/004.phpt -crlf
-/ext/xmlwriter/tests/OO_004.phpt -crlf
-/ext/zlib/tests/005.phpt -crlf
-/ext/zlib/tests/gzfile_basic2.phpt -crlf
-/ext/zlib/tests/gzfile_basic.phpt -crlf
-/ext/zlib/tests/gzfilegzreadfile.phpt -crlf
-/ext/zlib/tests/readgzfile_basic2.phpt -crlf
-/ext/zlib/tests/readgzfile_basic.phpt -crlf
-/sapi/cli/tests/014.phpt -crlf
-/tests/run-test/test010.phpt -crlf
-/Zend/tests/bug35655.phpt -crlf
-/Zend/tests/bug48930.phpt -crlf
-/Zend/tests/bug61095.phpt -crlf
-/Zend/tests/heredoc_017.phpt -crlf
-/Zend/tests/heredoc_018.phpt -crlf
-/Zend/tests/nowdoc_013.phpt -crlf
-/Zend/tests/nowdoc_014.phpt -crlf
-/Zend/tests/nowdoc_015.phpt -crlf
+/ext/xml/tests/bug32001b.phpt -crlf
+/ext/xmlwriter/tests/OO_003.phpt -crlf
+/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt -crlf
+/ext/zlib/tests/008.phpt -crlf
+/ext/zlib/tests/gzopen_variation4.phpt -crlf
+/ext/zlib/tests/gzrewind_error.phpt -crlf
+/ext/zlib/tests/readgzfile_variation7.phpt -crlf
+/ext/zlib/tests/readgzfile_variation8.phpt -crlf
+/ext/zlib/tests/zlib_scheme_stat_basic.phpt -crlf
+/sapi/cli/tests/006.phpt -crlf
+/tests/run-test/test009.phpt -crlf
+/Zend/tests/012.phpt -crlf
+/Zend/tests/bug28072.phpt -crlf
+/Zend/tests/bug38624.phpt -crlf
+/Zend/tests/bug40784.phpt -crlf
+/Zend/tests/bug43053.phpt -crlf
+/Zend/tests/bug51176.phpt -crlf
+/Zend/tests/each_003.phpt -crlf
+/Zend/tests/errmsg_006.phpt -crlf
diff --git a/NEWS b/NEWS
index 8a3e48490..02f4e290c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,68 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+17 May 2012, PHP 5.4.4 RC1
+
+- CLI Server:
+ . Implemented FR #61977 (Need CLI web-server support for files with .htm &
+ svg extensions). (Sixd, Laruence)
+ . Improved performance while sending error page, this also fixed
+ bug #61785 (Memory leak when access a non-exists file without router).
+ (Laruence)
+ . Fixed bug #61546 (functions related to current script failed when chdir()
+ in cli sapi). (Laruence, reeze.xia@gmail.com)
+
+- CURL:
+ . Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
+ (Laruence)
+
+- Core:
+ . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
+ . Fixed bug #62005 (unexpected behavior when incrementally assigning to a
+ member of a null object). (Laruence)
+ . Fixed bug #61978 (Object recursion not detected for classes that implement
+ JsonSerializable). (Felipe)
+ . Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
+ . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config).
+ (Laruence)
+ . Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
+ . Fixed bug #61782 (__clone/__destruct do not match other methods when checking
+ access controls). (Stas)
+ . Fixed bug #61761 ('Overriding' a private static method with a different
+ signature causes crash). (Laruence)
+ . Fixed bug #61730 (Segfault from array_walk modifying an array passed by
+ reference). (Laruence)
+ . Fixed bug #61728 (PHP crash when calling ob_start in request_shutdown
+ phase). (Laruence)
+ . Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov)
+ . Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables
+ (without apache2)). (Laruence)
+ . Fixed bug #61605 (header_remove() does not remove all headers). (Laruence)
+ . Fixed bug #54547 (wrong equality of string numbers). (Gustavo)
+ . Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
+ set to null). (Anatoliy)
+ . Changed php://fd to be available only for CLI.
+
+- Phar:
+ . Fix bug #61065 (Secunia SA44335). (Rasmus)
+
+- Reflection:
+ . Implemented FR #61602 (Allow access to the name of constant
+ used as function/method parameter's default value). (reeze.xia@gmail.com)
+
+- FPM
+ . Fixed bug #61812 (Uninitialised value used in libmagic).
+ (Laruence, Gustavo)
+
+- Libxml:
+ . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
+ (Laruence)
+
+- Zlib:
+ . Fixed bug #61820 (using ob_gzhandler will complain about headers already
+ sent when no compression). (Mike)
+ . Fixed bug #61443 (can't change zlib.output_compression on the fly). (Mike)
+ . Fixed bug #60761 (zlib.output_compression fails on refresh). (Mike)
+
08 May 2012, PHP 5.4.3
- CGI
@@ -78,6 +141,7 @@ PHP NEWS
. Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
- mysqlnd
+ . Fixed bug #61704 (Crash apache, phpinfo() threading issue). (Johannes)
. Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled).
(Johannes)
@@ -116,6 +180,8 @@ PHP NEWS
bytes). (Nikita Popov)
- Reflection:
+ . Implemented FR #61602 (Allow access to the name of constant
+ used as function/method parameter's default value). (reeze.xia@gmail.com)
. Fixed bug #60968 (Late static binding doesn't work with
ReflectionMethod::invokeArgs()). (Laruence)
@@ -575,6 +641,161 @@ PHP NEWS
. Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression).
(Mike)
+26 Apr 2012, PHP 5.3.11
+
+- Core:
+ . Fixed bug #61605 (header_remove() does not remove all headers).
+ (Laruence)
+ . Fixed bug #61541 (Segfault when using ob_* in output_callback).
+ (reeze.xia@gmail.com)
+ . Fixed bug #61273 (call_user_func_array with more than 16333 arguments
+ leaks / crashes). (Laruence)
+ . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
+ . Improved max_input_vars directive to check nested variables (Dmitry).
+ . Fixed bug #61095 (Incorect lexing of 0x00*+<NUM>). (Etienne)
+ . Fixed bug #61087 (Memory leak in parse_ini_file when specifying
+ invalid scanner mode). (Nikic, Laruence)
+ . Fixed bug #61072 (Memory leak when restoring an exception handler).
+ (Nikic, Laruence)
+ . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX).
+ (Laruence)
+ . Fixed bug #61043 (Regression in magic_quotes_gpc fix for CVE-2012-0831).
+ (Ondřej Surý)
+ . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
+ vars). (Laruence)
+ . Fixed bug #60895 (Possible invalid handler usage in windows random
+ functions). (Pierre)
+ . Fixed bug #60825 (Segfault when running symfony 2 tests).
+ (Dmitry, Laruence)
+ . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
+ . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
+ . Fixed bug #60227 (header() cannot detect the multi-line header with CR).
+ (rui, Gustavo)
+ . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia)
+ . Fixed bug #54374 (Insufficient validating of upload name leading to
+ corrupted $_FILES indices). (CVE-2012-1172). (Stas, lekensteyn at
+ gmail dot com, Pierre)
+ . Fixed bug #52719 (array_walk_recursive crashes if third param of the
+ function is by reference). (Nikita Popov)
+ . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)
+
+- DOM
+ . Added debug info handler to DOM objects. (Gustavo, Joey Smith)
+
+- FPM
+ . Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
+ (michaelhood at gmail dot com, Ilia)
+
+- Ibase
+ . Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
+ (Ilia)
+
+- Installation
+ . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
+
+- Fileinfo
+ . Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo)
+
+- Firebird Database extension (ibase):
+ . Fixed bug #60802 (ibase_trans() gives segfault when passing params).
+
+- Libxml:
+ . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
+ (Laruence)
+ . Fixed bug #61367 (open_basedir bypass using libxml RSHUTDOWN).
+ (Tim Starling)
+
+- mysqli
+ . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
+
+- PDO_mysql
+ . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't
+ always work). (Johannes)
+ . Fixed bug #61194 (PDO should export compression flag with myslqnd).
+ (Johannes)
+
+- PDO_odbc
+ . Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia)
+
+- PDO_pgsql
+ . Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed
+ rows on postgresql >= 9). (ben dot pineau at gmail dot com)
+
+- PDO_Sqlite extension:
+ . Add createCollation support. (Damien)
+
+- Phar:
+ . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
+ bytes). (Nikic)
+
+- PHP-FPM SAPI:
+ . Fixed bug #60811 (php-fpm compilation problem). (rasmus)
+
+- Readline:
+ . Fixed bug #61088 (Memory leak in readline_callback_handler_install).
+ (Nikic, Laruence)
+ . Add open_basedir checks to readline_write_history and readline_read_history.
+ (Rasmus, reported by Mateusz Goik)
+
+- Reflection:
+ . Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads
+ when get_properties returns a hash table with (inaccessible) dynamic
+ numeric properties). (Gustavo)
+ . Fixed bug #60968 (Late static binding doesn't work with
+ ReflectionMethod::invokeArgs()). (Laruence)
+
+- SOAP
+ . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
+ . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
+ User-Agent header). (carloschilazo at gmail dot com)
+ . Fixed bug #60842, #51775 (Chunked response parsing error when
+ chunksize length line is > 10 bytes). (Ilia)
+ . Fixed bug #49853 (Soap Client stream context header option ignored).
+ (Dmitry)
+
+- SPL
+ . Fixed memory leak when calling SplFileInfo's constructor twice. (Felipe)
+ . Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
+ FilesystemIterator's iterators are requested more than once without
+ having had its dtor callback called in between). (Gustavo)
+ . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence)
+ . Fixed bug #61326 (ArrayObject comparison). (Gustavo)
+
+- SQLite3 extension:
+ . Add createCollation() method. (Brad Dewar)
+
+- Session:
+ . Fixed bug #60860 (session.save_handler=user without defined function core
+ dumps). (Felipe)
+ . Fixed bug #60634 (Segmentation fault when trying to die() in
+ SessionHandler::write()). (Ilia)
+
+- Streams:
+ . Fixed bug #61371 (stream_context_create() causes memory leaks on use
+ streams_socket_create). (Gustavo)
+ . Fixed bug #61253 (Wrappers opened with errors concurrency problem on ZTS).
+ (Gustavo)
+ . Fixed bug #61115 (stream related segfault on fatal error in
+ php_stream_context_link). (Gustavo)
+ . Fixed bug #60817 (stream_get_line() reads from stream even when there is
+ already sufficient data buffered). stream_get_line() now behaves more like
+ fgets(), as is documented. (Gustavo)
+ . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not
+ detected together with the last read). (Gustavo)
+ . Fixed bug #60106 (stream_socket_server silently truncates long unix
+ socket paths). (Ilia)
+
+- Tidy:
+ . Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra)
+
+- XMLRPC:
+ . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary
+ variable). (Nikita Popov)
+ . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic)
+
+- Zlib:
+ . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikic)
+
02 Feb 2012, PHP 5.3.10
- Core:
@@ -787,6 +1008,7 @@ PHP NEWS
- Postgres:
. Fixed bug #60244 (pg_fetch_* functions do not validate that row param
is >0). (Ilia)
+ . Added PGSQL_LIBPQ_VERSION/PGSQL_LIBPQ_VERSION_STR constants. (Yasuo)
- Reflection:
. Fixed bug #60367 (Reflection and Late Static Binding). (Laruence)
diff --git a/README.GIT-RULES b/README.GIT-RULES
new file mode 100644
index 000000000..289a4e743
--- /dev/null
+++ b/README.GIT-RULES
@@ -0,0 +1,124 @@
+====================
+ Git Commit Rules
+====================
+
+This is the first file you should be reading when contributing code via Git.
+We'll assume you're basically familiar with Git, but feel free to post
+your questions on the mailing list. Please have a look at
+http://git-scm.com/ for more detailed information on Git.
+
+PHP is developed through the efforts of a large number of people.
+Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following
+some basic rules with regards to Git usage will::
+
+ a. Make everybody happier, especially those responsible for maintaining
+ Git itself.
+
+ b. Keep the changes consistently well documented and easily trackable.
+
+ c. Prevent some of those 'Oops' moments.
+
+ d. Increase the general level of good will on planet Earth.
+
+Having said that, here are the organizational rules::
+
+ 1. Respect other people working on the project.
+
+ 2. Discuss any significant changes on the list before committing and get
+ confirmation from the release manager for the given branch.
+
+ 3. Look at EXTENSIONS file to see who is the primary maintainer of
+ the code you want to contribute to.
+
+ 4. If you "strongly disagree" about something another person did, don't
+ start fighting publicly - take it up in private email.
+
+ 5. If you don't know how to do something, ask first!
+
+ 6. Test your changes before committing them. We mean it. Really.
+ To do so use "make test".
+
+ 7. For development use the --enable-maintainer-zts switch to ensure your
+ code handles TSRM correctly and doesn't break for those who need that.
+
+Currently we have the following branches in use::
+
+ master The active development branch.
+
+ PHP-5.4 Is used to release the PHP 5.4.x series. It still allows for
+ larger enhancements.
+
+ PHP-5.3 Is used to release the PHP 5.3.x series. This is current
+ stable version and is open for bugfixes only.
+
+ PHP-5.2 Is used to release the PHP 5.2.x series. It is closed for
+ changes now.
+
+ PHP-5.1 This branch is closed.
+
+ PHP-4.4 This branch is closed.
+
+The next few rules are more of a technical nature::
+
+ 1. All changes should first go to the lowest branch (i.e. 5.3) and then
+ get merged up to all other branches. If a change is not needed for
+ later branches (i.e. fixes for features which where dropped from later
+ branches) an empty merge should be done.
+
+ 2. All news updates intended for public viewing, such as new features,
+ bug fixes, improvements, etc., should go into the NEWS file of the
+ *first* to be released version with the given change. In other words
+ any NEWS file change only needs to done in one branch.
+
+ 3. Do not commit multiple file and dump all messages in one commit. If you
+ modified several unrelated files, commit each group separately and
+ provide a nice commit message for each one. See example below.
+
+ 4. Do write your commit message in such a way that it makes sense even
+ without the corresponding diff. One should be able to look at it, and
+ immediately know what was modified. Definitely include the function name
+ in the message as shown below.
+
+ 5. In your commit messages, keep each line shorter than 80 characters. And
+ try to align your lines vertically, if they wrap. It looks bad otherwise.
+
+ 6. If you modified a function that is callable from PHP, prepend PHP to
+ the function name as shown below.
+
+
+The format of the commit messages is pretty simple.
+
+<max 79 characters short description>\n
+\n
+<long description, 79 chars per line>
+\n
+
+An Example from the git project (commit 2b34e486bc):
+
+pack-objects: Fix compilation with NO_PTHREDS
+
+It looks like commit 99fb6e04 (pack-objects: convert to use
+parse_options(), 2012-02-01) moved the #ifdef NO_PTHREDS around but
+hasn't noticed that the 'arg' variable no longer is available.
+
+If you fix some bugs, you should note the bug ID numbers in your
+commit message. Bug ID should be prefixed by "#" for easier access to
+bug report when developers are browsing CVS via LXR or Bonsai.
+
+Example::
+
+ Fixed bug #14016 (pgsql notice handler double free crash bug.)
+
+When you change the NEWS file for a bug fix, then please keep the bugs
+sorted in decreasing order under the fixed version.
+
+You can use OpenGrok (http://lxr.php.net/) and gitweb (http://git.php.net/)
+to look at PHP Git repository in various ways.
+
+
+For further information on the process and further details please refer to
+https://wiki.php.net/vcs/gitworkflow and https://wiki.php.net/vcs/gitfaq
+
+Happy hacking,
+
+PHP Team
diff --git a/README.RELEASE_PROCESS b/README.RELEASE_PROCESS
index 6a6da62d0..a8e36c2b6 100644
--- a/README.RELEASE_PROCESS
+++ b/README.RELEASE_PROCESS
@@ -58,12 +58,12 @@ Do not use abbreviations for alpha and beta.
5. Commit these changes to the branch with ``git commit -a``.
6. Tag the repository with the version, e.g.:
-``git tag -u YOURKEYID PHP-5.4.2-RC2``
+``git tag -u YOURKEYID php-5.4.2RC2``
7. Push the changes to the main repo:
``git push --tags origin HEAD``
-8. run: ``./makedist 5.4.2-RC2``, this will export the tree, create configure
+8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure
and build two tarballs (one gz and one bz2).
9. Copy those two tarballs to www.php.net, in your homedir there should be a
diff --git a/README.SVN-RULES b/README.SVN-RULES
deleted file mode 100644
index 1f5dd47fb..000000000
--- a/README.SVN-RULES
+++ /dev/null
@@ -1,151 +0,0 @@
-====================
- SVN Commit Rules
-====================
-
-This is the first file you should be reading after you get your SVN account.
-We'll assume you're basically familiar with SVN, but feel free to post
-your questions on the mailing list. Please have a look at
-http://svnbook.red-bean.com/ for more detailed information on SVN.
-
-PHP is developed through the efforts of a large number of people.
-Collaboration is a Good Thing(tm), and SVN lets us do this. Thus, following
-some basic rules with regards to SVN usage will::
-
- a. Make everybody happier, especially those responsible for maintaining
- the SVN itself.
-
- b. Keep the changes consistently well documented and easily trackable.
-
- c. Prevent some of those 'Oops' moments.
-
- d. Increase the general level of good will on planet Earth.
-
-Having said that, here are the organizational rules::
-
- 1. Respect other people working on the project.
-
- 2. Discuss any significant changes on the list before committing and get
- confirmation from the release manager for the given branch.
-
- 3. Look at EXTENSIONS file to see who is the primary maintainer of
- the code you want to contribute to.
-
- 4. If you "strongly disagree" about something another person did, don't
- start fighting publicly - take it up in private email.
-
- 5. If you don't know how to do something, ask first!
-
- 6. Test your changes before committing them. We mean it. Really.
- To do so use "make test".
-
- 7. For development use the --enable-maintainer-zts switch to ensure your
- code handles TSRM correctly and doesn't break for those who need that.
-
-Currently we have the following branches in use::
-
- trunk The active development branch.
-
- branches/PHP_5_4 Is used to release the PHP 5.4.x series. In release
- process, only bugfixes and very small changes approved
- by RMs are allowed.
-
- branches/PHP_5_3 Is used to release the PHP 5.3.x series. This is current
- stable version and is open for bugfixes and small
- improvements (check with RMs if in doubt).
-
- branches/PHP_5_2 Is used to release the PHP 5.2.x series. It is closed for
- changes now.
-
- branches/PHP_5_1 This branch is closed.
-
- branches/PHP_4_4 This branch is closed.
-
-The next few rules are more of a technical nature::
-
- 1. All changes should first go to trunk and then get merged from trunk
- (aka MFH'ed) to all other relevant branches.
-
- 2. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
- messages every day. Woe be to those who attempt to mess with it.
-
- 3. All news updates intended for public viewing, such as new features,
- bug fixes, improvements, etc., should go into the NEWS file of the
- *first* to be released version with the given change. In other words
- any NEWS file change only needs to done in one branch.
-
- NB! Lines, starting with @ will go automagically into NEWS file, but
- this is NOT recommended, though. Please, add news entries directly to
- NEWS file and don't forget to keep them adjusted and sorted.
-
- 4. Do not commit multiple file and dump all messages in one commit. If you
- modified several unrelated files, commit each group separately and
- provide a nice commit message for each one. See example below.
-
- 5. Do write your commit message in such a way that it makes sense even
- without the corresponding diff. One should be able to look at it, and
- immediately know what was modified. Definitely include the function name
- in the message as shown below.
-
- 6. In your commit messages, keep each line shorter than 80 characters. And
- try to align your lines vertically, if they wrap. It looks bad otherwise.
-
- 7. If you modified a function that is callable from PHP, prepend PHP to
- the function name as shown below.
-
-
-The format of the commit messages is pretty simple.
-
-Use a - to start a new item in your commit message.
-
-If a line begins with #, it is taken to be a comment and will not appear
-in the ChangeLog. Everything else goes into the ChangeLog.
-
-It is important to note that if your comment or news logline spans multiple
-lines, you have to put # at the beginning of **every** such line.
-
-Example. Say you modified two files, datetime.c and string.c. In datetime.c you
-added a new format option for the date() function, and in string.c you fixed a
-memory leak in php_trim(). Don't commit both of these at once. Commit them
-separately and try to make sure your commit messages look something like the
-following.
-
-For datetime.c::
-
- - Added new 'K' format modifier to date() for printing out number of days
- until New Year's Eve.
-
-For string.c::
-
- - Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
- #- Man, that thing was leaking all over the place!
-
-The # lines will be omitted from the ChangeLog automagically.
-
-Use the [DOC] tag in your log message whenever you feel that your changes
-imply a documentation modification. The php-doc team will automatically
-get notified about your commit through the php-doc mailing list.
-
-If you fix some bugs, you should note the bug ID numbers in your
-commit message. Bug ID should be prefixed by "#" for easier access to
-bug report when developers are browsing CVS via LXR or Bonsai.
-
-Example::
-
- Fixed bug #14016 (pgsql notice handler double free crash bug.)
-
-If you don't see your messages in ChangeLog right away, don't worry!
-These files are updated once a day, so your stuff will not show up until
-somewhat later.
-
-When you change the NEWS file for a bug fix, then please keep the bugs
-sorted in decreasing order under the fixed version.
-
-You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
-to look at PHP SVN repository in various ways.
-
-To receive daily updates to ChangeLog and NEWS, send an empty message to
-php-cvs-daily-subscribe@lists.php.net.
-
-Happy hacking,
-
-PHP Team
diff --git a/README.Zeus b/README.Zeus
deleted file mode 100644
index 7fecaf0d8..000000000
--- a/README.Zeus
+++ /dev/null
@@ -1,112 +0,0 @@
-Using PHP 5 with the Zeus Web Server
------------------------------------
-
-Zeus fully supports running PHP in combination with our
-webserver. There are three different interfaces that can be used to
-enable PHP:
-
-* CGI
-* ISAPI
-* FastCGI
-
-Of the three, we recommend using FastCGI, which has been tested and
-benchmarked as providing the best performance and reliability.
-
-Full details of how to install PHP are available from our
-website, at:
-
-http://support.zeus.com/products/php.html
-
-If you have any problems, please check the support site for more
-up-to-date information and advice.
-
-
-Quick guide to installing CGI/FastCGI with Zeus
------------------------------------------------
-
-Step 1 - Compile PHP as FastCGI.
-
-Compile as follows:
- ./configure --enable-fastcgi
- make
-
-Note that PHP has many options to the configure script -
-e.g. --with-mysql. You will probably want to select your usual options
-before compiling; the above is just a bare minimum, for illustration.
-
-After compilation finishes, you will be left with an executable
-program called 'php'. Copy this into your document root, under a
-dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
-
-
-Step 2 - configure Zeus
-
-Four stages:
- - enable FastCGI
- - configure FastCGI
- - setup alias for FastCGI
- - setup alias for PHP
-
-1) Using the admin server, go to the 'module configuration' page for
-your virtual server, and ensure that 'fastcgi' is enabled (select the
-tickbox to the left).
-
-2) While we can run FastCGI's locally, there are known problems with
-some OS's (specifically, the communication between web server and
-FastCGI happens over a unix domain socket, and some OS's have trouble
-sustaining high connection rates over these sockets). So instead, we
-are going to set up the PHP FastCGI to run 'remotely' over localhost
-(this uses TCP sockets, which do not suffer this problem). Go to the
-'fastcgi configuration' page, and under 'add remote fastcgi':
- Add Remote FastCGI
- Docroot path /fcgi-bin/php
- Remote machine localhost:8002
-The first entry is where you saved PHP, above.
-The second entry is localhost:<any unused port>
-We will start the FastCGI listening on this port shortly.
-Click 'update' to commit these changes.
-
-3) Go to the path mapping module and add an alias for FastCGI:
- Add Alias
- Docroot path /fcgi-bin
- Filesystem directory /path/to/docroot/fcgi-bin
- Alias type fastcgi
-Click 'update' to commit these changes
-
-4) Also on the path mapping module, add a handler for PHP:
- Add handler
- File extension php
- Handler /fcgi-bin/php
-Click 'update' to commit these changes
-
-Finally restart your virtual server for these changes to take effect.
-
-
-Step 3 - start PHP as a FastCGI runner
-
-When you start PHP, it will pre-fork a given number of child processes
-to handle incoming PHP requests. Each process will handle a given
-number of requests before exiting (and being replaced by a newly
-forked process). You can control these two parameters by setting the
-following environment variables BEFORE starting the FastCGI runner:
-
-PHP_FCGI_CHILDREN - the number of child processes to pre-fork. This
-variable MUST be set, if not then the PHP will not run as a FastCGI.
-We recommend a value of 8 for a fairly busy site. If you have many,
-long-running PHP scripts, then you may need to increase this further.
-
-PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
-handles before exiting. If not set, defaults to 500.
-
-To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
-8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
-$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
-above.
-
-To stop the runner (e.g. to experiment with the above environment
-variables) you will need to manually stop and running PHP
-processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
-of children and not the runner, Zeus unfortunately cannot keep track
-of what processes are running, sorry. A typical command line may look
-like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
-'{print $4}' | xargs kill'
diff --git a/UPGRADING b/UPGRADING
index d92e0573b..7177a6df6 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -169,6 +169,10 @@ PHP 5.4 UPGRADE NOTES
non-numeric and produce warning, but are converted to 12 and 5
respectively for backwards compatibility reasons.
+- Long numeric strings that do not fit in integer or double (such as
+ "92233720368547758070") are compared using string comparison if
+ they could otherwise result in precision loss - since 5.4.4.
+
- Closures now support scopes and $this and can be rebound to
objects using Closure::bind() and Closure::bindTo().
@@ -178,6 +182,9 @@ PHP 5.4 UPGRADE NOTES
- Parse error messages are changed to contain more information about
the error.
+- __clone and __destruct since 5.4.4 follow the same scoping rules as
+ the rest of the methods (see bug #61782 for details).
+
================================
4. Changes to existing functions
================================
@@ -332,6 +339,8 @@ PHP 5.4 UPGRADE NOTES
- ob_start() no longer starts multiple output buffers when passed
array("callback1", "callback2", "callback3", ...).
+- Since 5.4.4, "php://fd" stream syntax is available only in CLI build.
+
==============================
5. Changes to existing classes
==============================
diff --git a/Zend/tests/bug54547.phpt b/Zend/tests/bug54547.phpt
new file mode 100644
index 000000000..452cbb8a5
--- /dev/null
+++ b/Zend/tests/bug54547.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs
+--SKIPIF--
+<?php
+if (PHP_INT_MAX !== 9223372036854775807)
+ die("skip for 64-bit long systems only");
+--FILE--
+<?php
+var_dump("9223372036854775807" == "9223372036854775808");
+var_dump("-9223372036854775808" == "-9223372036854775809");
+var_dump("0x7fffffffffffffff" == "9223372036854775808");
+
+/* not exactly what the bug is about, but closely related problem: */
+var_dump("999223372036854775807"=="999223372036854775808");
+var_dump("899223372036854775807">"00999223372036854775807");
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
diff --git a/Zend/tests/bug61761.phpt b/Zend/tests/bug61761.phpt
new file mode 100755
index 000000000..631f566ea
--- /dev/null
+++ b/Zend/tests/bug61761.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #61761 ('Overriding' a private static method with a different signature causes crash)
+--FILE--
+<?php
+
+class A
+{
+ private static function test($a) { }
+}
+
+class B extends A
+{
+ private static function test($a, $b) { }
+}
+
+?>
+--EXPECTF--
+Strict Standards: Declaration of B::test() should be compatible with A::test($a) in %sbug61761.php on line %d
diff --git a/Zend/tests/bug61782.phpt b/Zend/tests/bug61782.phpt
new file mode 100644
index 000000000..95bf4e6cf
--- /dev/null
+++ b/Zend/tests/bug61782.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #61782 (__clone/__destruct do not match other methods when checking access controls)
+--FILE--
+<?php
+ abstract class BaseClass {
+ abstract protected function __clone();
+ }
+
+ class MommasBoy extends BaseClass {
+ protected function __clone() {
+ echo __METHOD__, "\n";
+ }
+ }
+
+ class LatchkeyKid extends BaseClass {
+ public function __construct() {
+ echo 'In ', __CLASS__, ":\n";
+ $kid = new MommasBoy();
+ $kid = clone $kid;
+ }
+ public function __clone() {}
+ }
+
+ $obj = new LatchkeyKid();
+echo "DONE\n";
+--EXPECT--
+In LatchkeyKid:
+MommasBoy::__clone
+DONE
diff --git a/Zend/tests/bug62005.phpt b/Zend/tests/bug62005.phpt
new file mode 100644
index 000000000..c99b28726
--- /dev/null
+++ b/Zend/tests/bug62005.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
+--FILE--
+<?php
+function add_points($player, $points) {
+ $player->energy += $points;
+ print_r($player);
+}
+add_points(NULL, 2);
+--EXPECTF--
+Warning: Creating default object from empty value in %sbug62005.php on line %d
+stdClass Object
+(
+ [energy] => 2
+)
diff --git a/Zend/tests/gc_029.phpt b/Zend/tests/gc_029.phpt
index 438053414..edd231760 100644
--- a/Zend/tests/gc_029.phpt
+++ b/Zend/tests/gc_029.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 029: GC and destructors
+--SKIPIF--
+<?php if (PHP_ZTS) { print "skip only for no-zts build"; }
--INI--
zend.enable_gc=1
--FILE--
diff --git a/Zend/tests/gc_029_zts.phpt b/Zend/tests/gc_029_zts.phpt
new file mode 100644
index 000000000..fc77e1f3b
--- /dev/null
+++ b/Zend/tests/gc_029_zts.phpt
@@ -0,0 +1,37 @@
+--TEST--
+GC 029: GC and destructors
+--SKIPIF--
+<?php if (!PHP_ZTS) { print "skip only for zts build"; }
+--INI--
+zend.enable_gc=1
+--FILE--
+<?php
+class Foo {
+ public $bar;
+ public $x = array(1,2,3);
+ function __destruct() {
+ if ($this->bar !== null) {
+ $this->x = null;
+ unset($this->bar);
+ }
+ }
+}
+class Bar {
+ public $foo;
+ function __destruct() {
+ if ($this->foo !== null) {
+ unset($this->foo);
+ }
+ }
+
+}
+$foo = new Foo();
+$bar = new Bar();
+$foo->bar = $bar;
+$bar->foo = $foo;
+unset($foo);
+unset($bar);
+var_dump(gc_collect_cycles());
+?>
+--EXPECT--
+int(3)
diff --git a/Zend/zend.c b/Zend/zend.c
index dd299f1d8..37a1a27c7 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -781,6 +781,8 @@ void zend_register_standard_ini_entries(TSRMLS_D) /* {{{ */
void zend_post_startup(TSRMLS_D) /* {{{ */
{
#ifdef ZTS
+ zend_encoding **script_encoding_list;
+
zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id);
zend_executor_globals *executor_globals = ts_resource(executor_globals_id);
@@ -795,7 +797,12 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
free(compiler_globals->function_table);
free(compiler_globals->class_table);
- compiler_globals_ctor(compiler_globals, tsrm_ls);
+ if ((script_encoding_list = (zend_encoding **)compiler_globals->script_encoding_list)) {
+ compiler_globals_ctor(compiler_globals, tsrm_ls);
+ compiler_globals->script_encoding_list = (const zend_encoding **)script_encoding_list;
+ } else {
+ compiler_globals_ctor(compiler_globals, tsrm_ls);
+ }
free(EG(zend_constants));
executor_globals_ctor(executor_globals, tsrm_ls);
global_persistent_list = &EG(persistent_list);
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c3c35eb5f..602b60041 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3260,11 +3260,11 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
- zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype TSRMLS_CC));
+ zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC));
}
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
- char *method_prototype = zend_get_function_declaration(child->common.prototype TSRMLS_CC);
+ char *method_prototype = zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC);
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, method_prototype);
efree(method_prototype);
}
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 8a81a9536..f16412278 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -518,10 +518,6 @@ void zend_prepare_trait_precedence(znode *result, znode *method_reference, znode
void zend_prepare_reference(znode *result, znode *class_name, znode *method_name TSRMLS_DC);
void zend_prepare_trait_alias(znode *result, znode *method_reference, znode *modifiers, znode *alias TSRMLS_DC);
-void init_trait_alias_list(znode* result, const znode* trait_alias TSRMLS_DC);
-void add_trait_alias(znode* result, const znode* trait_alias TSRMLS_DC);
-void init_trait_alias(znode* result, const znode* method_name, const znode* alias, const znode* modifiers TSRMLS_DC);
-
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC);
void zend_do_early_binding(TSRMLS_D);
ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC);
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index d72fc7369..205531fd2 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -554,11 +554,10 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
|| (Z_TYPE_PP(object_ptr) == IS_BOOL && Z_LVAL_PP(object_ptr) == 0)
|| (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0)
) {
- zend_error(E_WARNING, "Creating default object from empty value");
-
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
zval_dtor(*object_ptr);
object_init(*object_ptr);
+ zend_error(E_WARNING, "Creating default object from empty value");
}
}
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index 0455e7ba6..aee0d612d 100755
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -127,7 +127,7 @@ ZEND_API zval *zend_user_it_new_iterator(zend_class_entry *ce, zval *object TSRM
}
/* }}} */
-/* {{{ zend_user_it_dtor */
+/* {{{ zend_user_it_invalidate_current */
ZEND_API void zend_user_it_invalidate_current(zend_object_iterator *_iter TSRMLS_DC)
{
zend_user_iterator *iter = (zend_user_iterator*)_iter;
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 3f6189efe..e3d3de283 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Mar 1 21:27:30 2012 */
+/* Generated by re2c 0.13.5 on Mon Apr 30 15:55:05 2012 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -35,6 +35,9 @@
#include <errno.h>
#include "zend.h"
+#ifdef PHP_WIN32
+# include <Winuser.h>
+#endif
#include "zend_alloc.h"
#include <zend_language_parser.h>
#include "zend_compile.h"
@@ -907,7 +910,11 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
zendlval->value.str.len--;
break;
case 'e':
+#ifdef PHP_WIN32
+ *t++ = VK_ESCAPE;
+#else
*t++ = '\e';
+#endif
zendlval->value.str.len--;
break;
case '"':
@@ -991,7 +998,7 @@ restart:
yymore_restart:
-#line 995 "Zend/zend_language_scanner.c"
+#line 1002 "Zend/zend_language_scanner.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -1090,7 +1097,7 @@ yyc_INITIAL:
yy3:
YYDEBUG(3, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1783 "Zend/zend_language_scanner.l"
+#line 1790 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -1150,7 +1157,7 @@ inline_html:
HANDLE_NEWLINES(yytext, yyleng);
return T_INLINE_HTML;
}
-#line 1154 "Zend/zend_language_scanner.c"
+#line 1161 "Zend/zend_language_scanner.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1168,7 +1175,7 @@ yy5:
yy6:
YYDEBUG(6, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1771 "Zend/zend_language_scanner.l"
+#line 1778 "Zend/zend_language_scanner.l"
{
if (CG(short_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1180,14 +1187,14 @@ yy6:
goto inline_char_handler;
}
}
-#line 1184 "Zend/zend_language_scanner.c"
+#line 1191 "Zend/zend_language_scanner.c"
yy7:
YYDEBUG(7, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy43;
YYDEBUG(8, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1748 "Zend/zend_language_scanner.l"
+#line 1755 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1199,7 +1206,7 @@ yy7:
goto inline_char_handler;
}
}
-#line 1203 "Zend/zend_language_scanner.c"
+#line 1210 "Zend/zend_language_scanner.c"
yy9:
YYDEBUG(9, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1385,7 +1392,7 @@ yy35:
++YYCURSOR;
YYDEBUG(38, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1708 "Zend/zend_language_scanner.l"
+#line 1715 "Zend/zend_language_scanner.l"
{
YYCTYPE *bracket = (YYCTYPE*)zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
@@ -1402,7 +1409,7 @@ yy35:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1406 "Zend/zend_language_scanner.c"
+#line 1413 "Zend/zend_language_scanner.c"
yy39:
YYDEBUG(39, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1429,7 +1436,7 @@ yy43:
++YYCURSOR;
YYDEBUG(44, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1726 "Zend/zend_language_scanner.l"
+#line 1733 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1441,13 +1448,13 @@ yy43:
goto inline_char_handler;
}
}
-#line 1445 "Zend/zend_language_scanner.c"
+#line 1452 "Zend/zend_language_scanner.c"
yy45:
YYDEBUG(45, *YYCURSOR);
++YYCURSOR;
YYDEBUG(46, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1739 "Zend/zend_language_scanner.l"
+#line 1746 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -1455,7 +1462,7 @@ yy45:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG_WITH_ECHO;
}
-#line 1459 "Zend/zend_language_scanner.c"
+#line 1466 "Zend/zend_language_scanner.c"
yy47:
YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1482,7 +1489,7 @@ yy50:
yy51:
YYDEBUG(51, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1761 "Zend/zend_language_scanner.l"
+#line 1768 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -1491,7 +1498,7 @@ yy51:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1495 "Zend/zend_language_scanner.c"
+#line 1502 "Zend/zend_language_scanner.c"
yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
@@ -1562,7 +1569,7 @@ yyc_ST_BACKQUOTE:
yy56:
YYDEBUG(56, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2234 "Zend/zend_language_scanner.l"
+#line 2241 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -1603,7 +1610,7 @@ yy56:
zend_scan_escape_string(zendlval, yytext, yyleng, '`' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1607 "Zend/zend_language_scanner.c"
+#line 1614 "Zend/zend_language_scanner.c"
yy57:
YYDEBUG(57, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1614,12 +1621,12 @@ yy58:
++YYCURSOR;
YYDEBUG(59, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2178 "Zend/zend_language_scanner.l"
+#line 2185 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
return '`';
}
-#line 1623 "Zend/zend_language_scanner.c"
+#line 1630 "Zend/zend_language_scanner.c"
yy60:
YYDEBUG(60, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1629,14 +1636,14 @@ yy61:
++YYCURSOR;
YYDEBUG(62, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2165 "Zend/zend_language_scanner.l"
+#line 2172 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1640 "Zend/zend_language_scanner.c"
+#line 1647 "Zend/zend_language_scanner.c"
yy63:
YYDEBUG(63, *YYCURSOR);
yyaccept = 0;
@@ -1652,24 +1659,24 @@ yy63:
yy65:
YYDEBUG(65, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 1872 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1662 "Zend/zend_language_scanner.c"
+#line 1669 "Zend/zend_language_scanner.c"
yy66:
YYDEBUG(66, *YYCURSOR);
++YYCURSOR;
YYDEBUG(67, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1442 "Zend/zend_language_scanner.l"
+#line 1449 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1673 "Zend/zend_language_scanner.c"
+#line 1680 "Zend/zend_language_scanner.c"
yy68:
YYDEBUG(68, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1683,7 +1690,7 @@ yy70:
++YYCURSOR;
YYDEBUG(71, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1857 "Zend/zend_language_scanner.l"
+#line 1864 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -1691,7 +1698,7 @@ yy70:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1695 "Zend/zend_language_scanner.c"
+#line 1702 "Zend/zend_language_scanner.c"
yy72:
YYDEBUG(72, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1709,7 +1716,7 @@ yy73:
++YYCURSOR;
YYDEBUG(74, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1847 "Zend/zend_language_scanner.l"
+#line 1854 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -1717,7 +1724,7 @@ yy73:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1721 "Zend/zend_language_scanner.c"
+#line 1728 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_DOUBLE_QUOTES:
@@ -1785,7 +1792,7 @@ yy77:
yy78:
YYDEBUG(78, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2184 "Zend/zend_language_scanner.l"
+#line 2191 "Zend/zend_language_scanner.l"
{
if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) {
YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1;
@@ -1834,7 +1841,7 @@ double_quotes_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng, '"' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1838 "Zend/zend_language_scanner.c"
+#line 1845 "Zend/zend_language_scanner.c"
yy79:
YYDEBUG(79, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1845,12 +1852,12 @@ yy80:
++YYCURSOR;
YYDEBUG(81, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2173 "Zend/zend_language_scanner.l"
+#line 2180 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
return '"';
}
-#line 1854 "Zend/zend_language_scanner.c"
+#line 1861 "Zend/zend_language_scanner.c"
yy82:
YYDEBUG(82, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1860,14 +1867,14 @@ yy83:
++YYCURSOR;
YYDEBUG(84, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2165 "Zend/zend_language_scanner.l"
+#line 2172 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1871 "Zend/zend_language_scanner.c"
+#line 1878 "Zend/zend_language_scanner.c"
yy85:
YYDEBUG(85, *YYCURSOR);
yyaccept = 0;
@@ -1883,24 +1890,24 @@ yy85:
yy87:
YYDEBUG(87, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 1872 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1893 "Zend/zend_language_scanner.c"
+#line 1900 "Zend/zend_language_scanner.c"
yy88:
YYDEBUG(88, *YYCURSOR);
++YYCURSOR;
YYDEBUG(89, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1442 "Zend/zend_language_scanner.l"
+#line 1449 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1904 "Zend/zend_language_scanner.c"
+#line 1911 "Zend/zend_language_scanner.c"
yy90:
YYDEBUG(90, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1914,7 +1921,7 @@ yy92:
++YYCURSOR;
YYDEBUG(93, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1857 "Zend/zend_language_scanner.l"
+#line 1864 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -1922,7 +1929,7 @@ yy92:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1926 "Zend/zend_language_scanner.c"
+#line 1933 "Zend/zend_language_scanner.c"
yy94:
YYDEBUG(94, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1940,7 +1947,7 @@ yy95:
++YYCURSOR;
YYDEBUG(96, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1847 "Zend/zend_language_scanner.l"
+#line 1854 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -1948,7 +1955,7 @@ yy95:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1952 "Zend/zend_language_scanner.c"
+#line 1959 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_END_HEREDOC:
@@ -1959,7 +1966,7 @@ yyc_ST_END_HEREDOC:
++YYCURSOR;
YYDEBUG(100, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2152 "Zend/zend_language_scanner.l"
+#line 2159 "Zend/zend_language_scanner.l"
{
YYCURSOR += CG(heredoc_len) - 1;
yyleng = CG(heredoc_len);
@@ -1971,7 +1978,7 @@ yyc_ST_END_HEREDOC:
BEGIN(ST_IN_SCRIPTING);
return T_END_HEREDOC;
}
-#line 1975 "Zend/zend_language_scanner.c"
+#line 1982 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_HEREDOC:
{
@@ -2033,7 +2040,7 @@ yy103:
yy104:
YYDEBUG(104, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2276 "Zend/zend_language_scanner.l"
+#line 2283 "Zend/zend_language_scanner.l"
{
int newline = 0;
@@ -2104,7 +2111,7 @@ heredoc_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0 TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 2108 "Zend/zend_language_scanner.c"
+#line 2115 "Zend/zend_language_scanner.c"
yy105:
YYDEBUG(105, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2119,14 +2126,14 @@ yy107:
++YYCURSOR;
YYDEBUG(108, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2165 "Zend/zend_language_scanner.l"
+#line 2172 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 2130 "Zend/zend_language_scanner.c"
+#line 2137 "Zend/zend_language_scanner.c"
yy109:
YYDEBUG(109, *YYCURSOR);
yyaccept = 0;
@@ -2142,24 +2149,24 @@ yy109:
yy111:
YYDEBUG(111, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 1872 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2152 "Zend/zend_language_scanner.c"
+#line 2159 "Zend/zend_language_scanner.c"
yy112:
YYDEBUG(112, *YYCURSOR);
++YYCURSOR;
YYDEBUG(113, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1442 "Zend/zend_language_scanner.l"
+#line 1449 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 2163 "Zend/zend_language_scanner.c"
+#line 2170 "Zend/zend_language_scanner.c"
yy114:
YYDEBUG(114, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2173,7 +2180,7 @@ yy116:
++YYCURSOR;
YYDEBUG(117, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1857 "Zend/zend_language_scanner.l"
+#line 1864 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -2181,7 +2188,7 @@ yy116:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2185 "Zend/zend_language_scanner.c"
+#line 2192 "Zend/zend_language_scanner.c"
yy118:
YYDEBUG(118, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2199,7 +2206,7 @@ yy119:
++YYCURSOR;
YYDEBUG(120, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1847 "Zend/zend_language_scanner.l"
+#line 1854 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -2207,7 +2214,7 @@ yy119:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2211 "Zend/zend_language_scanner.c"
+#line 2218 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_IN_SCRIPTING:
@@ -2388,13 +2395,13 @@ yy123:
yy124:
YYDEBUG(124, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1888 "Zend/zend_language_scanner.l"
+#line 1895 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 2398 "Zend/zend_language_scanner.c"
+#line 2405 "Zend/zend_language_scanner.c"
yy125:
YYDEBUG(125, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2620,11 +2627,11 @@ yy137:
yy138:
YYDEBUG(138, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1431 "Zend/zend_language_scanner.l"
+#line 1438 "Zend/zend_language_scanner.l"
{
return yytext[0];
}
-#line 2628 "Zend/zend_language_scanner.c"
+#line 2635 "Zend/zend_language_scanner.c"
yy139:
YYDEBUG(139, *YYCURSOR);
++YYCURSOR;
@@ -2633,7 +2640,7 @@ yy139:
yy140:
YYDEBUG(140, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1162 "Zend/zend_language_scanner.l"
+#line 1169 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -2641,7 +2648,7 @@ yy140:
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 2645 "Zend/zend_language_scanner.c"
+#line 2652 "Zend/zend_language_scanner.c"
yy141:
YYDEBUG(141, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2652,11 +2659,11 @@ yy142:
++YYCURSOR;
YYDEBUG(143, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1191 "Zend/zend_language_scanner.l"
+#line 1198 "Zend/zend_language_scanner.l"
{
return T_NS_SEPARATOR;
}
-#line 2660 "Zend/zend_language_scanner.c"
+#line 2667 "Zend/zend_language_scanner.c"
yy144:
YYDEBUG(144, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2884,18 +2891,18 @@ yy167:
++YYCURSOR;
YYDEBUG(168, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1436 "Zend/zend_language_scanner.l"
+#line 1443 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return '{';
}
-#line 2893 "Zend/zend_language_scanner.c"
+#line 2900 "Zend/zend_language_scanner.c"
yy169:
YYDEBUG(169, *YYCURSOR);
++YYCURSOR;
YYDEBUG(170, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1448 "Zend/zend_language_scanner.l"
+#line 1455 "Zend/zend_language_scanner.l"
{
RESET_DOC_COMMENT();
if (!zend_stack_is_empty(&SCNG(state_stack))) {
@@ -2903,7 +2910,7 @@ yy169:
}
return '}';
}
-#line 2907 "Zend/zend_language_scanner.c"
+#line 2914 "Zend/zend_language_scanner.c"
yy171:
YYDEBUG(171, *YYCURSOR);
yyaccept = 2;
@@ -2931,7 +2938,7 @@ yy171:
yy172:
YYDEBUG(172, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1498 "Zend/zend_language_scanner.l"
+#line 1505 "Zend/zend_language_scanner.l"
{
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
zendlval->value.lval = strtol(yytext, NULL, 0);
@@ -2952,7 +2959,7 @@ yy172:
zendlval->type = IS_LONG;
return T_LNUMBER;
}
-#line 2956 "Zend/zend_language_scanner.c"
+#line 2963 "Zend/zend_language_scanner.c"
yy173:
YYDEBUG(173, *YYCURSOR);
yyaccept = 2;
@@ -2980,7 +2987,7 @@ yy175:
yy176:
YYDEBUG(176, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1895 "Zend/zend_language_scanner.l"
+#line 1902 "Zend/zend_language_scanner.l"
{
while (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR++) {
@@ -3014,14 +3021,14 @@ yy176:
return T_COMMENT;
}
-#line 3018 "Zend/zend_language_scanner.c"
+#line 3025 "Zend/zend_language_scanner.c"
yy177:
YYDEBUG(177, *YYCURSOR);
++YYCURSOR;
yy178:
YYDEBUG(178, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1986 "Zend/zend_language_scanner.l"
+#line 1993 "Zend/zend_language_scanner.l"
{
register char *s, *t;
char *end;
@@ -3089,14 +3096,14 @@ yy178:
}
return T_CONSTANT_ENCAPSED_STRING;
}
-#line 3093 "Zend/zend_language_scanner.c"
+#line 3100 "Zend/zend_language_scanner.c"
yy179:
YYDEBUG(179, *YYCURSOR);
++YYCURSOR;
yy180:
YYDEBUG(180, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2055 "Zend/zend_language_scanner.l"
+#line 2062 "Zend/zend_language_scanner.l"
{
int bprefix = (yytext[0] != '"') ? 1 : 0;
@@ -3137,24 +3144,24 @@ yy180:
BEGIN(ST_DOUBLE_QUOTES);
return '"';
}
-#line 3141 "Zend/zend_language_scanner.c"
+#line 3148 "Zend/zend_language_scanner.c"
yy181:
YYDEBUG(181, *YYCURSOR);
++YYCURSOR;
YYDEBUG(182, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2146 "Zend/zend_language_scanner.l"
+#line 2153 "Zend/zend_language_scanner.l"
{
BEGIN(ST_BACKQUOTE);
return '`';
}
-#line 3152 "Zend/zend_language_scanner.c"
+#line 3159 "Zend/zend_language_scanner.c"
yy183:
YYDEBUG(183, *YYCURSOR);
++YYCURSOR;
YYDEBUG(184, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2404 "Zend/zend_language_scanner.l"
+#line 2411 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -3163,7 +3170,7 @@ yy183:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 3167 "Zend/zend_language_scanner.c"
+#line 3174 "Zend/zend_language_scanner.c"
yy185:
YYDEBUG(185, *YYCURSOR);
++YYCURSOR;
@@ -3190,13 +3197,13 @@ yy187:
yy189:
YYDEBUG(189, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1563 "Zend/zend_language_scanner.l"
+#line 1570 "Zend/zend_language_scanner.l"
{
zendlval->value.dval = zend_strtod(yytext, NULL);
zendlval->type = IS_DOUBLE;
return T_DNUMBER;
}
-#line 3200 "Zend/zend_language_scanner.c"
+#line 3207 "Zend/zend_language_scanner.c"
yy190:
YYDEBUG(190, *YYCURSOR);
yyaccept = 2;
@@ -3288,7 +3295,7 @@ yy199:
}
YYDEBUG(201, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1473 "Zend/zend_language_scanner.l"
+#line 1480 "Zend/zend_language_scanner.l"
{
char *bin = yytext + 2; /* Skip "0b" */
int len = yyleng - 2;
@@ -3313,7 +3320,7 @@ yy199:
return T_DNUMBER;
}
}
-#line 3317 "Zend/zend_language_scanner.c"
+#line 3324 "Zend/zend_language_scanner.c"
yy202:
YYDEBUG(202, *YYCURSOR);
++YYCURSOR;
@@ -3325,7 +3332,7 @@ yy202:
}
YYDEBUG(204, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1519 "Zend/zend_language_scanner.l"
+#line 1526 "Zend/zend_language_scanner.l"
{
char *hex = yytext + 2; /* Skip "0x" */
int len = yyleng - 2;
@@ -3350,7 +3357,7 @@ yy202:
return T_DNUMBER;
}
}
-#line 3354 "Zend/zend_language_scanner.c"
+#line 3361 "Zend/zend_language_scanner.c"
yy205:
YYDEBUG(205, *YYCURSOR);
++YYCURSOR;
@@ -3359,7 +3366,7 @@ yy205:
yy206:
YYDEBUG(206, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1963 "Zend/zend_language_scanner.l"
+#line 1970 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -3367,7 +3374,7 @@ yy206:
BEGIN(INITIAL);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
}
-#line 3371 "Zend/zend_language_scanner.c"
+#line 3378 "Zend/zend_language_scanner.c"
yy207:
YYDEBUG(207, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3401,13 +3408,13 @@ yy209:
yy211:
YYDEBUG(211, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 1872 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 3411 "Zend/zend_language_scanner.c"
+#line 3418 "Zend/zend_language_scanner.c"
yy212:
YYDEBUG(212, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3421,11 +3428,11 @@ yy213:
}
YYDEBUG(214, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1419 "Zend/zend_language_scanner.l"
+#line 1426 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_XOR;
}
-#line 3429 "Zend/zend_language_scanner.c"
+#line 3436 "Zend/zend_language_scanner.c"
yy215:
YYDEBUG(215, *YYCURSOR);
++YYCURSOR;
@@ -3434,61 +3441,61 @@ yy215:
}
YYDEBUG(216, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1411 "Zend/zend_language_scanner.l"
+#line 1418 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_OR;
}
-#line 3442 "Zend/zend_language_scanner.c"
+#line 3449 "Zend/zend_language_scanner.c"
yy217:
YYDEBUG(217, *YYCURSOR);
++YYCURSOR;
YYDEBUG(218, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1399 "Zend/zend_language_scanner.l"
+#line 1406 "Zend/zend_language_scanner.l"
{
return T_XOR_EQUAL;
}
-#line 3452 "Zend/zend_language_scanner.c"
+#line 3459 "Zend/zend_language_scanner.c"
yy219:
YYDEBUG(219, *YYCURSOR);
++YYCURSOR;
YYDEBUG(220, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1403 "Zend/zend_language_scanner.l"
+#line 1410 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_OR;
}
-#line 3462 "Zend/zend_language_scanner.c"
+#line 3469 "Zend/zend_language_scanner.c"
yy221:
YYDEBUG(221, *YYCURSOR);
++YYCURSOR;
YYDEBUG(222, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1395 "Zend/zend_language_scanner.l"
+#line 1402 "Zend/zend_language_scanner.l"
{
return T_OR_EQUAL;
}
-#line 3472 "Zend/zend_language_scanner.c"
+#line 3479 "Zend/zend_language_scanner.c"
yy223:
YYDEBUG(223, *YYCURSOR);
++YYCURSOR;
YYDEBUG(224, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1407 "Zend/zend_language_scanner.l"
+#line 1414 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_AND;
}
-#line 3482 "Zend/zend_language_scanner.c"
+#line 3489 "Zend/zend_language_scanner.c"
yy225:
YYDEBUG(225, *YYCURSOR);
++YYCURSOR;
YYDEBUG(226, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1391 "Zend/zend_language_scanner.l"
+#line 1398 "Zend/zend_language_scanner.l"
{
return T_AND_EQUAL;
}
-#line 3492 "Zend/zend_language_scanner.c"
+#line 3499 "Zend/zend_language_scanner.c"
yy227:
YYDEBUG(227, *YYCURSOR);
++YYCURSOR;
@@ -3497,7 +3504,7 @@ yy227:
yy228:
YYDEBUG(228, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1972 "Zend/zend_language_scanner.l"
+#line 1979 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
BEGIN(INITIAL);
@@ -3510,17 +3517,17 @@ yy228:
return yytext[0];
}
}
-#line 3514 "Zend/zend_language_scanner.c"
+#line 3521 "Zend/zend_language_scanner.c"
yy229:
YYDEBUG(229, *YYCURSOR);
++YYCURSOR;
YYDEBUG(230, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1379 "Zend/zend_language_scanner.l"
+#line 1386 "Zend/zend_language_scanner.l"
{
return T_MOD_EQUAL;
}
-#line 3524 "Zend/zend_language_scanner.c"
+#line 3531 "Zend/zend_language_scanner.c"
yy231:
YYDEBUG(231, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3551,11 +3558,11 @@ yy235:
++YYCURSOR;
YYDEBUG(236, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1375 "Zend/zend_language_scanner.l"
+#line 1382 "Zend/zend_language_scanner.l"
{
return T_CONCAT_EQUAL;
}
-#line 3559 "Zend/zend_language_scanner.c"
+#line 3566 "Zend/zend_language_scanner.c"
yy237:
YYDEBUG(237, *YYCURSOR);
yyaccept = 4;
@@ -3564,7 +3571,7 @@ yy237:
yy238:
YYDEBUG(238, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1929 "Zend/zend_language_scanner.l"
+#line 1936 "Zend/zend_language_scanner.l"
{
int doc_com;
@@ -3598,7 +3605,7 @@ yy238:
return T_COMMENT;
}
-#line 3602 "Zend/zend_language_scanner.c"
+#line 3609 "Zend/zend_language_scanner.c"
yy239:
YYDEBUG(239, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3608,11 +3615,11 @@ yy240:
++YYCURSOR;
YYDEBUG(241, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1371 "Zend/zend_language_scanner.l"
+#line 1378 "Zend/zend_language_scanner.l"
{
return T_DIV_EQUAL;
}
-#line 3616 "Zend/zend_language_scanner.c"
+#line 3623 "Zend/zend_language_scanner.c"
yy242:
YYDEBUG(242, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3635,42 +3642,42 @@ yy245:
++YYCURSOR;
YYDEBUG(246, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1367 "Zend/zend_language_scanner.l"
+#line 1374 "Zend/zend_language_scanner.l"
{
return T_MUL_EQUAL;
}
-#line 3643 "Zend/zend_language_scanner.c"
+#line 3650 "Zend/zend_language_scanner.c"
yy247:
YYDEBUG(247, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy251;
YYDEBUG(248, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1427 "Zend/zend_language_scanner.l"
+#line 1434 "Zend/zend_language_scanner.l"
{
return T_SR;
}
-#line 3654 "Zend/zend_language_scanner.c"
+#line 3661 "Zend/zend_language_scanner.c"
yy249:
YYDEBUG(249, *YYCURSOR);
++YYCURSOR;
YYDEBUG(250, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1355 "Zend/zend_language_scanner.l"
+#line 1362 "Zend/zend_language_scanner.l"
{
return T_IS_GREATER_OR_EQUAL;
}
-#line 3664 "Zend/zend_language_scanner.c"
+#line 3671 "Zend/zend_language_scanner.c"
yy251:
YYDEBUG(251, *YYCURSOR);
++YYCURSOR;
YYDEBUG(252, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1387 "Zend/zend_language_scanner.l"
+#line 1394 "Zend/zend_language_scanner.l"
{
return T_SR_EQUAL;
}
-#line 3674 "Zend/zend_language_scanner.c"
+#line 3681 "Zend/zend_language_scanner.c"
yy253:
YYDEBUG(253, *YYCURSOR);
yyaccept = 5;
@@ -3681,11 +3688,11 @@ yy253:
yy254:
YYDEBUG(254, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1423 "Zend/zend_language_scanner.l"
+#line 1430 "Zend/zend_language_scanner.l"
{
return T_SL;
}
-#line 3689 "Zend/zend_language_scanner.c"
+#line 3696 "Zend/zend_language_scanner.c"
yy255:
YYDEBUG(255, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3697,22 +3704,22 @@ yy256:
++YYCURSOR;
YYDEBUG(257, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1351 "Zend/zend_language_scanner.l"
+#line 1358 "Zend/zend_language_scanner.l"
{
return T_IS_SMALLER_OR_EQUAL;
}
-#line 3705 "Zend/zend_language_scanner.c"
+#line 3712 "Zend/zend_language_scanner.c"
yy258:
YYDEBUG(258, *YYCURSOR);
++YYCURSOR;
yy259:
YYDEBUG(259, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1347 "Zend/zend_language_scanner.l"
+#line 1354 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_EQUAL;
}
-#line 3716 "Zend/zend_language_scanner.c"
+#line 3723 "Zend/zend_language_scanner.c"
yy260:
YYDEBUG(260, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3763,11 +3770,11 @@ yy267:
++YYCURSOR;
YYDEBUG(268, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1383 "Zend/zend_language_scanner.l"
+#line 1390 "Zend/zend_language_scanner.l"
{
return T_SL_EQUAL;
}
-#line 3771 "Zend/zend_language_scanner.c"
+#line 3778 "Zend/zend_language_scanner.c"
yy269:
YYDEBUG(269, *YYCURSOR);
++YYCURSOR;
@@ -3872,7 +3879,7 @@ yy278:
yy279:
YYDEBUG(279, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2097 "Zend/zend_language_scanner.l"
+#line 2104 "Zend/zend_language_scanner.l"
{
char *s;
int bprefix = (yytext[0] != '<') ? 1 : 0;
@@ -3920,7 +3927,7 @@ yy279:
return T_START_HEREDOC;
}
-#line 3924 "Zend/zend_language_scanner.c"
+#line 3931 "Zend/zend_language_scanner.c"
yy280:
YYDEBUG(280, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3960,31 +3967,31 @@ yy283:
++YYCURSOR;
YYDEBUG(285, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1339 "Zend/zend_language_scanner.l"
+#line 1346 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_IDENTICAL;
}
-#line 3968 "Zend/zend_language_scanner.c"
+#line 3975 "Zend/zend_language_scanner.c"
yy286:
YYDEBUG(286, *YYCURSOR);
++YYCURSOR;
YYDEBUG(287, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1359 "Zend/zend_language_scanner.l"
+#line 1366 "Zend/zend_language_scanner.l"
{
return T_PLUS_EQUAL;
}
-#line 3978 "Zend/zend_language_scanner.c"
+#line 3985 "Zend/zend_language_scanner.c"
yy288:
YYDEBUG(288, *YYCURSOR);
++YYCURSOR;
YYDEBUG(289, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1327 "Zend/zend_language_scanner.l"
+#line 1334 "Zend/zend_language_scanner.l"
{
return T_INC;
}
-#line 3988 "Zend/zend_language_scanner.c"
+#line 3995 "Zend/zend_language_scanner.c"
yy290:
YYDEBUG(290, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4003,42 +4010,42 @@ yy292:
}
YYDEBUG(293, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1315 "Zend/zend_language_scanner.l"
+#line 1322 "Zend/zend_language_scanner.l"
{
return T_LIST;
}
-#line 4011 "Zend/zend_language_scanner.c"
+#line 4018 "Zend/zend_language_scanner.c"
yy294:
YYDEBUG(294, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy298;
YYDEBUG(295, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1343 "Zend/zend_language_scanner.l"
+#line 1350 "Zend/zend_language_scanner.l"
{
return T_IS_EQUAL;
}
-#line 4022 "Zend/zend_language_scanner.c"
+#line 4029 "Zend/zend_language_scanner.c"
yy296:
YYDEBUG(296, *YYCURSOR);
++YYCURSOR;
YYDEBUG(297, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1311 "Zend/zend_language_scanner.l"
+#line 1318 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_ARROW;
}
-#line 4032 "Zend/zend_language_scanner.c"
+#line 4039 "Zend/zend_language_scanner.c"
yy298:
YYDEBUG(298, *YYCURSOR);
++YYCURSOR;
YYDEBUG(299, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1335 "Zend/zend_language_scanner.l"
+#line 1342 "Zend/zend_language_scanner.l"
{
return T_IS_IDENTICAL;
}
-#line 4042 "Zend/zend_language_scanner.c"
+#line 4049 "Zend/zend_language_scanner.c"
yy300:
YYDEBUG(300, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4168,7 +4175,7 @@ yy316:
}
YYDEBUG(319, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1698 "Zend/zend_language_scanner.l"
+#line 1705 "Zend/zend_language_scanner.l"
{
if (CG(current_namespace)) {
*zendlval = *CG(current_namespace);
@@ -4178,7 +4185,7 @@ yy316:
}
return T_NS_C;
}
-#line 4182 "Zend/zend_language_scanner.c"
+#line 4189 "Zend/zend_language_scanner.c"
yy320:
YYDEBUG(320, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4198,7 +4205,7 @@ yy321:
}
YYDEBUG(324, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1671 "Zend/zend_language_scanner.l"
+#line 1678 "Zend/zend_language_scanner.l"
{
char *filename = zend_get_compiled_filename(TSRMLS_C);
const size_t filename_len = strlen(filename);
@@ -4225,7 +4232,7 @@ yy321:
zendlval->type = IS_STRING;
return T_DIR;
}
-#line 4229 "Zend/zend_language_scanner.c"
+#line 4236 "Zend/zend_language_scanner.c"
yy325:
YYDEBUG(325, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4250,13 +4257,13 @@ yy327:
}
YYDEBUG(330, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1653 "Zend/zend_language_scanner.l"
+#line 1660 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = CG(zend_lineno);
zendlval->type = IS_LONG;
return T_LINE;
}
-#line 4260 "Zend/zend_language_scanner.c"
+#line 4267 "Zend/zend_language_scanner.c"
yy331:
YYDEBUG(331, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4291,7 +4298,7 @@ yy335:
}
YYDEBUG(338, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1632 "Zend/zend_language_scanner.l"
+#line 1639 "Zend/zend_language_scanner.l"
{
const char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
const char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
@@ -4312,7 +4319,7 @@ yy335:
zendlval->type = IS_STRING;
return T_METHOD_C;
}
-#line 4316 "Zend/zend_language_scanner.c"
+#line 4323 "Zend/zend_language_scanner.c"
yy339:
YYDEBUG(339, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4363,7 +4370,7 @@ yy346:
}
YYDEBUG(349, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1616 "Zend/zend_language_scanner.l"
+#line 1623 "Zend/zend_language_scanner.l"
{
const char *func_name = NULL;
@@ -4379,7 +4386,7 @@ yy346:
zendlval->type = IS_STRING;
return T_FUNC_C;
}
-#line 4383 "Zend/zend_language_scanner.c"
+#line 4390 "Zend/zend_language_scanner.c"
yy350:
YYDEBUG(350, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4399,7 +4406,7 @@ yy351:
}
YYDEBUG(354, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1659 "Zend/zend_language_scanner.l"
+#line 1666 "Zend/zend_language_scanner.l"
{
char *filename = zend_get_compiled_filename(TSRMLS_C);
@@ -4411,7 +4418,7 @@ yy351:
zendlval->type = IS_STRING;
return T_FILE;
}
-#line 4415 "Zend/zend_language_scanner.c"
+#line 4422 "Zend/zend_language_scanner.c"
yy355:
YYDEBUG(355, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4441,7 +4448,7 @@ yy358:
}
YYDEBUG(361, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1596 "Zend/zend_language_scanner.l"
+#line 1603 "Zend/zend_language_scanner.l"
{
const char *trait_name = NULL;
@@ -4461,7 +4468,7 @@ yy358:
return T_TRAIT_C;
}
-#line 4465 "Zend/zend_language_scanner.c"
+#line 4472 "Zend/zend_language_scanner.c"
yy362:
YYDEBUG(362, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4491,7 +4498,7 @@ yy365:
}
YYDEBUG(368, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1569 "Zend/zend_language_scanner.l"
+#line 1576 "Zend/zend_language_scanner.l"
{
const char *class_name = NULL;
@@ -4518,7 +4525,7 @@ yy365:
}
return T_CLASS_C;
}
-#line 4522 "Zend/zend_language_scanner.c"
+#line 4529 "Zend/zend_language_scanner.c"
yy369:
YYDEBUG(369, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4580,11 +4587,11 @@ yy380:
}
YYDEBUG(381, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1279 "Zend/zend_language_scanner.l"
+#line 1286 "Zend/zend_language_scanner.l"
{
return T_HALT_COMPILER;
}
-#line 4588 "Zend/zend_language_scanner.c"
+#line 4595 "Zend/zend_language_scanner.c"
yy382:
YYDEBUG(382, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4604,11 +4611,11 @@ yy384:
}
YYDEBUG(385, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1259 "Zend/zend_language_scanner.l"
+#line 1266 "Zend/zend_language_scanner.l"
{
return T_USE;
}
-#line 4612 "Zend/zend_language_scanner.c"
+#line 4619 "Zend/zend_language_scanner.c"
yy386:
YYDEBUG(386, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4627,11 +4634,11 @@ yy388:
}
YYDEBUG(389, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1307 "Zend/zend_language_scanner.l"
+#line 1314 "Zend/zend_language_scanner.l"
{
return T_UNSET;
}
-#line 4635 "Zend/zend_language_scanner.c"
+#line 4642 "Zend/zend_language_scanner.c"
yy390:
YYDEBUG(390, *YYCURSOR);
++YYCURSOR;
@@ -4803,11 +4810,11 @@ yy405:
++YYCURSOR;
YYDEBUG(407, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1207 "Zend/zend_language_scanner.l"
+#line 1214 "Zend/zend_language_scanner.l"
{
return T_INT_CAST;
}
-#line 4811 "Zend/zend_language_scanner.c"
+#line 4818 "Zend/zend_language_scanner.c"
yy408:
YYDEBUG(408, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4851,11 +4858,11 @@ yy413:
++YYCURSOR;
YYDEBUG(416, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1211 "Zend/zend_language_scanner.l"
+#line 1218 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_CAST;
}
-#line 4859 "Zend/zend_language_scanner.c"
+#line 4866 "Zend/zend_language_scanner.c"
yy417:
YYDEBUG(417, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4925,11 +4932,11 @@ yy427:
++YYCURSOR;
YYDEBUG(430, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1215 "Zend/zend_language_scanner.l"
+#line 1222 "Zend/zend_language_scanner.l"
{
return T_STRING_CAST;
}
-#line 4933 "Zend/zend_language_scanner.c"
+#line 4940 "Zend/zend_language_scanner.c"
yy431:
YYDEBUG(431, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4962,11 +4969,11 @@ yy434:
++YYCURSOR;
YYDEBUG(437, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1219 "Zend/zend_language_scanner.l"
+#line 1226 "Zend/zend_language_scanner.l"
{
return T_ARRAY_CAST;
}
-#line 4970 "Zend/zend_language_scanner.c"
+#line 4977 "Zend/zend_language_scanner.c"
yy438:
YYDEBUG(438, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5004,11 +5011,11 @@ yy442:
++YYCURSOR;
YYDEBUG(445, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1223 "Zend/zend_language_scanner.l"
+#line 1230 "Zend/zend_language_scanner.l"
{
return T_OBJECT_CAST;
}
-#line 5012 "Zend/zend_language_scanner.c"
+#line 5019 "Zend/zend_language_scanner.c"
yy446:
YYDEBUG(446, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5049,11 +5056,11 @@ yy451:
++YYCURSOR;
YYDEBUG(453, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1227 "Zend/zend_language_scanner.l"
+#line 1234 "Zend/zend_language_scanner.l"
{
return T_BOOL_CAST;
}
-#line 5057 "Zend/zend_language_scanner.c"
+#line 5064 "Zend/zend_language_scanner.c"
yy454:
YYDEBUG(454, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5113,11 +5120,11 @@ yy462:
++YYCURSOR;
YYDEBUG(465, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1231 "Zend/zend_language_scanner.l"
+#line 1238 "Zend/zend_language_scanner.l"
{
return T_UNSET_CAST;
}
-#line 5121 "Zend/zend_language_scanner.c"
+#line 5128 "Zend/zend_language_scanner.c"
yy466:
YYDEBUG(466, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5131,11 +5138,11 @@ yy467:
}
YYDEBUG(468, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1203 "Zend/zend_language_scanner.l"
+#line 1210 "Zend/zend_language_scanner.l"
{
return T_VAR;
}
-#line 5139 "Zend/zend_language_scanner.c"
+#line 5146 "Zend/zend_language_scanner.c"
yy469:
YYDEBUG(469, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5155,11 +5162,11 @@ yy471:
}
YYDEBUG(472, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1195 "Zend/zend_language_scanner.l"
+#line 1202 "Zend/zend_language_scanner.l"
{
return T_NEW;
}
-#line 5163 "Zend/zend_language_scanner.c"
+#line 5170 "Zend/zend_language_scanner.c"
yy473:
YYDEBUG(473, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5198,21 +5205,21 @@ yy479:
}
YYDEBUG(480, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1255 "Zend/zend_language_scanner.l"
+#line 1262 "Zend/zend_language_scanner.l"
{
return T_NAMESPACE;
}
-#line 5206 "Zend/zend_language_scanner.c"
+#line 5213 "Zend/zend_language_scanner.c"
yy481:
YYDEBUG(481, *YYCURSOR);
++YYCURSOR;
YYDEBUG(482, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1187 "Zend/zend_language_scanner.l"
+#line 1194 "Zend/zend_language_scanner.l"
{
return T_PAAMAYIM_NEKUDOTAYIM;
}
-#line 5216 "Zend/zend_language_scanner.c"
+#line 5223 "Zend/zend_language_scanner.c"
yy483:
YYDEBUG(483, *YYCURSOR);
++YYCURSOR;
@@ -5234,32 +5241,32 @@ yy485:
++YYCURSOR;
YYDEBUG(486, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1363 "Zend/zend_language_scanner.l"
+#line 1370 "Zend/zend_language_scanner.l"
{
return T_MINUS_EQUAL;
}
-#line 5242 "Zend/zend_language_scanner.c"
+#line 5249 "Zend/zend_language_scanner.c"
yy487:
YYDEBUG(487, *YYCURSOR);
++YYCURSOR;
YYDEBUG(488, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1331 "Zend/zend_language_scanner.l"
+#line 1338 "Zend/zend_language_scanner.l"
{
return T_DEC;
}
-#line 5252 "Zend/zend_language_scanner.c"
+#line 5259 "Zend/zend_language_scanner.c"
yy489:
YYDEBUG(489, *YYCURSOR);
++YYCURSOR;
YYDEBUG(490, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1157 "Zend/zend_language_scanner.l"
+#line 1164 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
return T_OBJECT_OPERATOR;
}
-#line 5263 "Zend/zend_language_scanner.c"
+#line 5270 "Zend/zend_language_scanner.c"
yy491:
YYDEBUG(491, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5304,11 +5311,11 @@ yy496:
}
YYDEBUG(497, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1303 "Zend/zend_language_scanner.l"
+#line 1310 "Zend/zend_language_scanner.l"
{
return T_PUBLIC;
}
-#line 5312 "Zend/zend_language_scanner.c"
+#line 5319 "Zend/zend_language_scanner.c"
yy498:
YYDEBUG(498, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5363,11 +5370,11 @@ yy505:
}
YYDEBUG(506, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1299 "Zend/zend_language_scanner.l"
+#line 1306 "Zend/zend_language_scanner.l"
{
return T_PROTECTED;
}
-#line 5371 "Zend/zend_language_scanner.c"
+#line 5378 "Zend/zend_language_scanner.c"
yy507:
YYDEBUG(507, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5397,11 +5404,11 @@ yy511:
}
YYDEBUG(512, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1295 "Zend/zend_language_scanner.l"
+#line 1302 "Zend/zend_language_scanner.l"
{
return T_PRIVATE;
}
-#line 5405 "Zend/zend_language_scanner.c"
+#line 5412 "Zend/zend_language_scanner.c"
yy513:
YYDEBUG(513, *YYCURSOR);
++YYCURSOR;
@@ -5410,11 +5417,11 @@ yy513:
}
YYDEBUG(514, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1133 "Zend/zend_language_scanner.l"
+#line 1140 "Zend/zend_language_scanner.l"
{
return T_PRINT;
}
-#line 5418 "Zend/zend_language_scanner.c"
+#line 5425 "Zend/zend_language_scanner.c"
yy515:
YYDEBUG(515, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5439,11 +5446,11 @@ yy518:
}
YYDEBUG(519, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1125 "Zend/zend_language_scanner.l"
+#line 1132 "Zend/zend_language_scanner.l"
{
return T_GOTO;
}
-#line 5447 "Zend/zend_language_scanner.c"
+#line 5454 "Zend/zend_language_scanner.c"
yy520:
YYDEBUG(520, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5467,11 +5474,11 @@ yy523:
}
YYDEBUG(524, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1267 "Zend/zend_language_scanner.l"
+#line 1274 "Zend/zend_language_scanner.l"
{
return T_GLOBAL;
}
-#line 5475 "Zend/zend_language_scanner.c"
+#line 5482 "Zend/zend_language_scanner.c"
yy525:
YYDEBUG(525, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5508,11 +5515,11 @@ yy531:
}
YYDEBUG(532, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1117 "Zend/zend_language_scanner.l"
+#line 1124 "Zend/zend_language_scanner.l"
{
return T_BREAK;
}
-#line 5516 "Zend/zend_language_scanner.c"
+#line 5523 "Zend/zend_language_scanner.c"
yy533:
YYDEBUG(533, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5552,11 +5559,11 @@ yy539:
}
YYDEBUG(540, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1101 "Zend/zend_language_scanner.l"
+#line 1108 "Zend/zend_language_scanner.l"
{
return T_SWITCH;
}
-#line 5560 "Zend/zend_language_scanner.c"
+#line 5567 "Zend/zend_language_scanner.c"
yy541:
YYDEBUG(541, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5580,11 +5587,11 @@ yy544:
}
YYDEBUG(545, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1283 "Zend/zend_language_scanner.l"
+#line 1290 "Zend/zend_language_scanner.l"
{
return T_STATIC;
}
-#line 5588 "Zend/zend_language_scanner.c"
+#line 5595 "Zend/zend_language_scanner.c"
yy546:
YYDEBUG(546, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5611,11 +5618,11 @@ yy549:
}
YYDEBUG(550, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1097 "Zend/zend_language_scanner.l"
+#line 1104 "Zend/zend_language_scanner.l"
{
return T_AS;
}
-#line 5619 "Zend/zend_language_scanner.c"
+#line 5626 "Zend/zend_language_scanner.c"
yy551:
YYDEBUG(551, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5634,11 +5641,11 @@ yy553:
}
YYDEBUG(554, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1319 "Zend/zend_language_scanner.l"
+#line 1326 "Zend/zend_language_scanner.l"
{
return T_ARRAY;
}
-#line 5642 "Zend/zend_language_scanner.c"
+#line 5649 "Zend/zend_language_scanner.c"
yy555:
YYDEBUG(555, *YYCURSOR);
++YYCURSOR;
@@ -5647,11 +5654,11 @@ yy555:
}
YYDEBUG(556, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1415 "Zend/zend_language_scanner.l"
+#line 1422 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_AND;
}
-#line 5655 "Zend/zend_language_scanner.c"
+#line 5662 "Zend/zend_language_scanner.c"
yy557:
YYDEBUG(557, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5685,11 +5692,11 @@ yy562:
}
YYDEBUG(563, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1287 "Zend/zend_language_scanner.l"
+#line 1294 "Zend/zend_language_scanner.l"
{
return T_ABSTRACT;
}
-#line 5693 "Zend/zend_language_scanner.c"
+#line 5700 "Zend/zend_language_scanner.c"
yy564:
YYDEBUG(564, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5713,11 +5720,11 @@ yy567:
}
YYDEBUG(568, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1057 "Zend/zend_language_scanner.l"
+#line 1064 "Zend/zend_language_scanner.l"
{
return T_WHILE;
}
-#line 5721 "Zend/zend_language_scanner.c"
+#line 5728 "Zend/zend_language_scanner.c"
yy569:
YYDEBUG(569, *YYCURSOR);
++YYCURSOR;
@@ -5726,11 +5733,11 @@ yy569:
}
YYDEBUG(570, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1041 "Zend/zend_language_scanner.l"
+#line 1048 "Zend/zend_language_scanner.l"
{
return T_IF;
}
-#line 5734 "Zend/zend_language_scanner.c"
+#line 5741 "Zend/zend_language_scanner.c"
yy571:
YYDEBUG(571, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5782,11 +5789,11 @@ yy576:
}
YYDEBUG(577, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1271 "Zend/zend_language_scanner.l"
+#line 1278 "Zend/zend_language_scanner.l"
{
return T_ISSET;
}
-#line 5790 "Zend/zend_language_scanner.c"
+#line 5797 "Zend/zend_language_scanner.c"
yy578:
YYDEBUG(578, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5840,11 +5847,11 @@ yy584:
yy585:
YYDEBUG(585, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1239 "Zend/zend_language_scanner.l"
+#line 1246 "Zend/zend_language_scanner.l"
{
return T_INCLUDE;
}
-#line 5848 "Zend/zend_language_scanner.c"
+#line 5855 "Zend/zend_language_scanner.c"
yy586:
YYDEBUG(586, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5873,11 +5880,11 @@ yy590:
}
YYDEBUG(591, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1243 "Zend/zend_language_scanner.l"
+#line 1250 "Zend/zend_language_scanner.l"
{
return T_INCLUDE_ONCE;
}
-#line 5881 "Zend/zend_language_scanner.c"
+#line 5888 "Zend/zend_language_scanner.c"
yy592:
YYDEBUG(592, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5911,11 +5918,11 @@ yy597:
}
YYDEBUG(598, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1141 "Zend/zend_language_scanner.l"
+#line 1148 "Zend/zend_language_scanner.l"
{
return T_INTERFACE;
}
-#line 5919 "Zend/zend_language_scanner.c"
+#line 5926 "Zend/zend_language_scanner.c"
yy599:
YYDEBUG(599, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5965,11 +5972,11 @@ yy605:
}
YYDEBUG(606, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1263 "Zend/zend_language_scanner.l"
+#line 1270 "Zend/zend_language_scanner.l"
{
return T_INSTEADOF;
}
-#line 5973 "Zend/zend_language_scanner.c"
+#line 5980 "Zend/zend_language_scanner.c"
yy607:
YYDEBUG(607, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5998,11 +6005,11 @@ yy611:
}
YYDEBUG(612, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1093 "Zend/zend_language_scanner.l"
+#line 1100 "Zend/zend_language_scanner.l"
{
return T_INSTANCEOF;
}
-#line 6006 "Zend/zend_language_scanner.c"
+#line 6013 "Zend/zend_language_scanner.c"
yy613:
YYDEBUG(613, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6046,11 +6053,11 @@ yy620:
}
YYDEBUG(621, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1153 "Zend/zend_language_scanner.l"
+#line 1160 "Zend/zend_language_scanner.l"
{
return T_IMPLEMENTS;
}
-#line 6054 "Zend/zend_language_scanner.c"
+#line 6061 "Zend/zend_language_scanner.c"
yy622:
YYDEBUG(622, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6078,11 +6085,11 @@ yy623:
}
YYDEBUG(625, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1029 "Zend/zend_language_scanner.l"
+#line 1036 "Zend/zend_language_scanner.l"
{
return T_TRY;
}
-#line 6086 "Zend/zend_language_scanner.c"
+#line 6093 "Zend/zend_language_scanner.c"
yy626:
YYDEBUG(626, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6101,11 +6108,11 @@ yy628:
}
YYDEBUG(629, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1145 "Zend/zend_language_scanner.l"
+#line 1152 "Zend/zend_language_scanner.l"
{
return T_TRAIT;
}
-#line 6109 "Zend/zend_language_scanner.c"
+#line 6116 "Zend/zend_language_scanner.c"
yy630:
YYDEBUG(630, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6124,11 +6131,11 @@ yy632:
}
YYDEBUG(633, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1037 "Zend/zend_language_scanner.l"
+#line 1044 "Zend/zend_language_scanner.l"
{
return T_THROW;
}
-#line 6132 "Zend/zend_language_scanner.c"
+#line 6139 "Zend/zend_language_scanner.c"
yy634:
YYDEBUG(634, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6189,11 +6196,11 @@ yy640:
yy641:
YYDEBUG(641, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1247 "Zend/zend_language_scanner.l"
+#line 1254 "Zend/zend_language_scanner.l"
{
return T_REQUIRE;
}
-#line 6197 "Zend/zend_language_scanner.c"
+#line 6204 "Zend/zend_language_scanner.c"
yy642:
YYDEBUG(642, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6222,11 +6229,11 @@ yy646:
}
YYDEBUG(647, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1251 "Zend/zend_language_scanner.l"
+#line 1258 "Zend/zend_language_scanner.l"
{
return T_REQUIRE_ONCE;
}
-#line 6230 "Zend/zend_language_scanner.c"
+#line 6237 "Zend/zend_language_scanner.c"
yy648:
YYDEBUG(648, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6245,11 +6252,11 @@ yy650:
}
YYDEBUG(651, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1025 "Zend/zend_language_scanner.l"
+#line 1032 "Zend/zend_language_scanner.l"
{
return T_RETURN;
}
-#line 6253 "Zend/zend_language_scanner.c"
+#line 6260 "Zend/zend_language_scanner.c"
yy652:
YYDEBUG(652, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6339,11 +6346,11 @@ yy661:
}
YYDEBUG(662, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1121 "Zend/zend_language_scanner.l"
+#line 1128 "Zend/zend_language_scanner.l"
{
return T_CONTINUE;
}
-#line 6347 "Zend/zend_language_scanner.c"
+#line 6354 "Zend/zend_language_scanner.c"
yy663:
YYDEBUG(663, *YYCURSOR);
++YYCURSOR;
@@ -6352,11 +6359,11 @@ yy663:
}
YYDEBUG(664, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1021 "Zend/zend_language_scanner.l"
+#line 1028 "Zend/zend_language_scanner.l"
{
return T_CONST;
}
-#line 6360 "Zend/zend_language_scanner.c"
+#line 6367 "Zend/zend_language_scanner.c"
yy665:
YYDEBUG(665, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6381,11 +6388,11 @@ yy668:
}
YYDEBUG(669, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1199 "Zend/zend_language_scanner.l"
+#line 1206 "Zend/zend_language_scanner.l"
{
return T_CLONE;
}
-#line 6389 "Zend/zend_language_scanner.c"
+#line 6396 "Zend/zend_language_scanner.c"
yy670:
YYDEBUG(670, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6399,11 +6406,11 @@ yy671:
}
YYDEBUG(672, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1137 "Zend/zend_language_scanner.l"
+#line 1144 "Zend/zend_language_scanner.l"
{
return T_CLASS;
}
-#line 6407 "Zend/zend_language_scanner.c"
+#line 6414 "Zend/zend_language_scanner.c"
yy673:
YYDEBUG(673, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6449,11 +6456,11 @@ yy680:
}
YYDEBUG(681, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1323 "Zend/zend_language_scanner.l"
+#line 1330 "Zend/zend_language_scanner.l"
{
return T_CALLABLE;
}
-#line 6457 "Zend/zend_language_scanner.c"
+#line 6464 "Zend/zend_language_scanner.c"
yy682:
YYDEBUG(682, *YYCURSOR);
++YYCURSOR;
@@ -6462,11 +6469,11 @@ yy682:
}
YYDEBUG(683, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1109 "Zend/zend_language_scanner.l"
+#line 1116 "Zend/zend_language_scanner.l"
{
return T_CASE;
}
-#line 6470 "Zend/zend_language_scanner.c"
+#line 6477 "Zend/zend_language_scanner.c"
yy684:
YYDEBUG(684, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6480,11 +6487,11 @@ yy685:
}
YYDEBUG(686, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1033 "Zend/zend_language_scanner.l"
+#line 1040 "Zend/zend_language_scanner.l"
{
return T_CATCH;
}
-#line 6488 "Zend/zend_language_scanner.c"
+#line 6495 "Zend/zend_language_scanner.c"
yy687:
YYDEBUG(687, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6535,11 +6542,11 @@ yy695:
}
YYDEBUG(696, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1017 "Zend/zend_language_scanner.l"
+#line 1024 "Zend/zend_language_scanner.l"
{
return T_FUNCTION;
}
-#line 6543 "Zend/zend_language_scanner.c"
+#line 6550 "Zend/zend_language_scanner.c"
yy697:
YYDEBUG(697, *YYCURSOR);
++YYCURSOR;
@@ -6563,11 +6570,11 @@ yy697:
yy698:
YYDEBUG(698, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1069 "Zend/zend_language_scanner.l"
+#line 1076 "Zend/zend_language_scanner.l"
{
return T_FOR;
}
-#line 6571 "Zend/zend_language_scanner.c"
+#line 6578 "Zend/zend_language_scanner.c"
yy699:
YYDEBUG(699, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6591,11 +6598,11 @@ yy702:
}
YYDEBUG(703, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1077 "Zend/zend_language_scanner.l"
+#line 1084 "Zend/zend_language_scanner.l"
{
return T_FOREACH;
}
-#line 6599 "Zend/zend_language_scanner.c"
+#line 6606 "Zend/zend_language_scanner.c"
yy704:
YYDEBUG(704, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6614,11 +6621,11 @@ yy706:
}
YYDEBUG(707, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1291 "Zend/zend_language_scanner.l"
+#line 1298 "Zend/zend_language_scanner.l"
{
return T_FINAL;
}
-#line 6622 "Zend/zend_language_scanner.c"
+#line 6629 "Zend/zend_language_scanner.c"
yy708:
YYDEBUG(708, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6649,11 +6656,11 @@ yy710:
}
YYDEBUG(711, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1065 "Zend/zend_language_scanner.l"
+#line 1072 "Zend/zend_language_scanner.l"
{
return T_DO;
}
-#line 6657 "Zend/zend_language_scanner.c"
+#line 6664 "Zend/zend_language_scanner.c"
yy712:
YYDEBUG(712, *YYCURSOR);
++YYCURSOR;
@@ -6662,11 +6669,11 @@ yy712:
}
YYDEBUG(713, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1013 "Zend/zend_language_scanner.l"
+#line 1020 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
-#line 6670 "Zend/zend_language_scanner.c"
+#line 6677 "Zend/zend_language_scanner.c"
yy714:
YYDEBUG(714, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6701,11 +6708,11 @@ yy719:
}
YYDEBUG(720, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1113 "Zend/zend_language_scanner.l"
+#line 1120 "Zend/zend_language_scanner.l"
{
return T_DEFAULT;
}
-#line 6709 "Zend/zend_language_scanner.c"
+#line 6716 "Zend/zend_language_scanner.c"
yy721:
YYDEBUG(721, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6729,11 +6736,11 @@ yy724:
}
YYDEBUG(725, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1085 "Zend/zend_language_scanner.l"
+#line 1092 "Zend/zend_language_scanner.l"
{
return T_DECLARE;
}
-#line 6737 "Zend/zend_language_scanner.c"
+#line 6744 "Zend/zend_language_scanner.c"
yy726:
YYDEBUG(726, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6813,11 +6820,11 @@ yy737:
}
YYDEBUG(738, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1149 "Zend/zend_language_scanner.l"
+#line 1156 "Zend/zend_language_scanner.l"
{
return T_EXTENDS;
}
-#line 6821 "Zend/zend_language_scanner.c"
+#line 6828 "Zend/zend_language_scanner.c"
yy739:
YYDEBUG(739, *YYCURSOR);
++YYCURSOR;
@@ -6826,11 +6833,11 @@ yy739:
}
YYDEBUG(740, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1009 "Zend/zend_language_scanner.l"
+#line 1016 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
-#line 6834 "Zend/zend_language_scanner.c"
+#line 6841 "Zend/zend_language_scanner.c"
yy741:
YYDEBUG(741, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6844,11 +6851,11 @@ yy742:
}
YYDEBUG(743, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1235 "Zend/zend_language_scanner.l"
+#line 1242 "Zend/zend_language_scanner.l"
{
return T_EVAL;
}
-#line 6852 "Zend/zend_language_scanner.c"
+#line 6859 "Zend/zend_language_scanner.c"
yy744:
YYDEBUG(744, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6918,11 +6925,11 @@ yy753:
}
YYDEBUG(754, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1061 "Zend/zend_language_scanner.l"
+#line 1068 "Zend/zend_language_scanner.l"
{
return T_ENDWHILE;
}
-#line 6926 "Zend/zend_language_scanner.c"
+#line 6933 "Zend/zend_language_scanner.c"
yy755:
YYDEBUG(755, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6951,11 +6958,11 @@ yy759:
}
YYDEBUG(760, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1105 "Zend/zend_language_scanner.l"
+#line 1112 "Zend/zend_language_scanner.l"
{
return T_ENDSWITCH;
}
-#line 6959 "Zend/zend_language_scanner.c"
+#line 6966 "Zend/zend_language_scanner.c"
yy761:
YYDEBUG(761, *YYCURSOR);
++YYCURSOR;
@@ -6964,11 +6971,11 @@ yy761:
}
YYDEBUG(762, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1049 "Zend/zend_language_scanner.l"
+#line 1056 "Zend/zend_language_scanner.l"
{
return T_ENDIF;
}
-#line 6972 "Zend/zend_language_scanner.c"
+#line 6979 "Zend/zend_language_scanner.c"
yy763:
YYDEBUG(763, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6997,11 +7004,11 @@ yy764:
yy765:
YYDEBUG(765, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1073 "Zend/zend_language_scanner.l"
+#line 1080 "Zend/zend_language_scanner.l"
{
return T_ENDFOR;
}
-#line 7005 "Zend/zend_language_scanner.c"
+#line 7012 "Zend/zend_language_scanner.c"
yy766:
YYDEBUG(766, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7025,11 +7032,11 @@ yy769:
}
YYDEBUG(770, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1081 "Zend/zend_language_scanner.l"
+#line 1088 "Zend/zend_language_scanner.l"
{
return T_ENDFOREACH;
}
-#line 7033 "Zend/zend_language_scanner.c"
+#line 7040 "Zend/zend_language_scanner.c"
yy771:
YYDEBUG(771, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7063,11 +7070,11 @@ yy776:
}
YYDEBUG(777, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1089 "Zend/zend_language_scanner.l"
+#line 1096 "Zend/zend_language_scanner.l"
{
return T_ENDDECLARE;
}
-#line 7071 "Zend/zend_language_scanner.c"
+#line 7078 "Zend/zend_language_scanner.c"
yy778:
YYDEBUG(778, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7086,11 +7093,11 @@ yy780:
}
YYDEBUG(781, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1275 "Zend/zend_language_scanner.l"
+#line 1282 "Zend/zend_language_scanner.l"
{
return T_EMPTY;
}
-#line 7094 "Zend/zend_language_scanner.c"
+#line 7101 "Zend/zend_language_scanner.c"
yy782:
YYDEBUG(782, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7119,11 +7126,11 @@ yy783:
yy784:
YYDEBUG(784, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1053 "Zend/zend_language_scanner.l"
+#line 1060 "Zend/zend_language_scanner.l"
{
return T_ELSE;
}
-#line 7127 "Zend/zend_language_scanner.c"
+#line 7134 "Zend/zend_language_scanner.c"
yy785:
YYDEBUG(785, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7137,11 +7144,11 @@ yy786:
}
YYDEBUG(787, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1045 "Zend/zend_language_scanner.l"
+#line 1052 "Zend/zend_language_scanner.l"
{
return T_ELSEIF;
}
-#line 7145 "Zend/zend_language_scanner.c"
+#line 7152 "Zend/zend_language_scanner.c"
yy788:
YYDEBUG(788, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7155,11 +7162,11 @@ yy789:
}
YYDEBUG(790, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1129 "Zend/zend_language_scanner.l"
+#line 1136 "Zend/zend_language_scanner.l"
{
return T_ECHO;
}
-#line 7163 "Zend/zend_language_scanner.c"
+#line 7170 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_LOOKING_FOR_PROPERTY:
@@ -7232,7 +7239,7 @@ yy793:
yy794:
YYDEBUG(794, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1162 "Zend/zend_language_scanner.l"
+#line 1169 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -7240,7 +7247,7 @@ yy794:
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 7244 "Zend/zend_language_scanner.c"
+#line 7251 "Zend/zend_language_scanner.c"
yy795:
YYDEBUG(795, *YYCURSOR);
++YYCURSOR;
@@ -7248,13 +7255,13 @@ yy795:
yy796:
YYDEBUG(796, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1181 "Zend/zend_language_scanner.l"
+#line 1188 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
goto restart;
}
-#line 7258 "Zend/zend_language_scanner.c"
+#line 7265 "Zend/zend_language_scanner.c"
yy797:
YYDEBUG(797, *YYCURSOR);
++YYCURSOR;
@@ -7263,14 +7270,14 @@ yy797:
yy798:
YYDEBUG(798, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1174 "Zend/zend_language_scanner.l"
+#line 1181 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 7274 "Zend/zend_language_scanner.c"
+#line 7281 "Zend/zend_language_scanner.c"
yy799:
YYDEBUG(799, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7291,11 +7298,11 @@ yy802:
++YYCURSOR;
YYDEBUG(803, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1170 "Zend/zend_language_scanner.l"
+#line 1177 "Zend/zend_language_scanner.l"
{
return T_OBJECT_OPERATOR;
}
-#line 7299 "Zend/zend_language_scanner.c"
+#line 7306 "Zend/zend_language_scanner.c"
yy804:
YYDEBUG(804, *YYCURSOR);
++YYCURSOR;
@@ -7365,7 +7372,7 @@ yy808:
yy809:
YYDEBUG(809, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1457 "Zend/zend_language_scanner.l"
+#line 1464 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
@@ -7373,20 +7380,20 @@ yy809:
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return T_STRING_VARNAME;
}
-#line 7377 "Zend/zend_language_scanner.c"
+#line 7384 "Zend/zend_language_scanner.c"
yy810:
YYDEBUG(810, *YYCURSOR);
++YYCURSOR;
YYDEBUG(811, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1466 "Zend/zend_language_scanner.l"
+#line 1473 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
goto restart;
}
-#line 7390 "Zend/zend_language_scanner.c"
+#line 7397 "Zend/zend_language_scanner.c"
yy812:
YYDEBUG(812, *YYCURSOR);
++YYCURSOR;
@@ -7408,7 +7415,7 @@ yyc_ST_NOWDOC:
++YYCURSOR;
YYDEBUG(817, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2348 "Zend/zend_language_scanner.l"
+#line 2355 "Zend/zend_language_scanner.l"
{
int newline = 0;
@@ -7463,7 +7470,7 @@ nowdoc_scan_done:
HANDLE_NEWLINES(yytext, yyleng - newline);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7467 "Zend/zend_language_scanner.c"
+#line 7474 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_VAR_OFFSET:
{
@@ -7570,7 +7577,7 @@ yy820:
yy821:
YYDEBUG(821, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1544 "Zend/zend_language_scanner.l"
+#line 1551 "Zend/zend_language_scanner.l"
{ /* Offset could be treated as a long */
if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) {
zendlval->value.lval = strtol(yytext, NULL, 10);
@@ -7582,7 +7589,7 @@ yy821:
}
return T_NUM_STRING;
}
-#line 7586 "Zend/zend_language_scanner.c"
+#line 7593 "Zend/zend_language_scanner.c"
yy822:
YYDEBUG(822, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7602,23 +7609,23 @@ yy823:
yy824:
YYDEBUG(824, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1876 "Zend/zend_language_scanner.l"
+#line 1883 "Zend/zend_language_scanner.l"
{
/* Only '[' can be valid, but returning other tokens will allow a more explicit parse error */
return yytext[0];
}
-#line 7611 "Zend/zend_language_scanner.c"
+#line 7618 "Zend/zend_language_scanner.c"
yy825:
YYDEBUG(825, *YYCURSOR);
++YYCURSOR;
YYDEBUG(826, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1871 "Zend/zend_language_scanner.l"
+#line 1878 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
return ']';
}
-#line 7622 "Zend/zend_language_scanner.c"
+#line 7629 "Zend/zend_language_scanner.c"
yy827:
YYDEBUG(827, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7628,14 +7635,14 @@ yy828:
++YYCURSOR;
YYDEBUG(829, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1881 "Zend/zend_language_scanner.l"
+#line 1888 "Zend/zend_language_scanner.l"
{
/* Invalid rule to return a more explicit parse error with proper line number */
yyless(0);
yy_pop_state(TSRMLS_C);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7639 "Zend/zend_language_scanner.c"
+#line 7646 "Zend/zend_language_scanner.c"
yy830:
YYDEBUG(830, *YYCURSOR);
++YYCURSOR;
@@ -7644,19 +7651,19 @@ yy830:
yy831:
YYDEBUG(831, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1888 "Zend/zend_language_scanner.l"
+#line 1895 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 7654 "Zend/zend_language_scanner.c"
+#line 7661 "Zend/zend_language_scanner.c"
yy832:
YYDEBUG(832, *YYCURSOR);
++YYCURSOR;
YYDEBUG(833, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2404 "Zend/zend_language_scanner.l"
+#line 2411 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -7665,7 +7672,7 @@ yy832:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 7669 "Zend/zend_language_scanner.c"
+#line 7676 "Zend/zend_language_scanner.c"
yy834:
YYDEBUG(834, *YYCURSOR);
++YYCURSOR;
@@ -7701,13 +7708,13 @@ yy836:
yy838:
YYDEBUG(838, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 1872 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 7711 "Zend/zend_language_scanner.c"
+#line 7718 "Zend/zend_language_scanner.c"
yy839:
YYDEBUG(839, *YYCURSOR);
++YYCURSOR;
@@ -7747,14 +7754,14 @@ yy844:
yy846:
YYDEBUG(846, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1556 "Zend/zend_language_scanner.l"
+#line 1563 "Zend/zend_language_scanner.l"
{ /* Offset must be treated as a string */
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
return T_NUM_STRING;
}
-#line 7758 "Zend/zend_language_scanner.c"
+#line 7765 "Zend/zend_language_scanner.c"
yy847:
YYDEBUG(847, *YYCURSOR);
++YYCURSOR;
@@ -7777,6 +7784,6 @@ yy849:
goto yy846;
}
}
-#line 2413 "Zend/zend_language_scanner.l"
+#line 2420 "Zend/zend_language_scanner.l"
}
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index d530b5343..703ca968e 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -33,6 +33,9 @@
#include <errno.h>
#include "zend.h"
+#ifdef PHP_WIN32
+# include <Winuser.h>
+#endif
#include "zend_alloc.h"
#include <zend_language_parser.h>
#include "zend_compile.h"
@@ -905,7 +908,11 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
zendlval->value.str.len--;
break;
case 'e':
+#ifdef PHP_WIN32
+ *t++ = VK_ESCAPE;
+#else
*t++ = '\e';
+#endif
zendlval->value.str.len--;
break;
case '"':
diff --git a/Zend/zend_language_scanner_defs.h b/Zend/zend_language_scanner_defs.h
index 015a903de..dbf867404 100644
--- a/Zend/zend_language_scanner_defs.h
+++ b/Zend/zend_language_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Mar 1 21:27:30 2012 */
+/* Generated by re2c 0.13.5 on Mon Apr 30 15:55:05 2012 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index ba6221ef7..60095f706 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -66,11 +66,11 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
if (/*prop_info->ce == ce &&*/
- (prop_info->flags & ZEND_ACC_STATIC) == 0 &&
+ (prop_info->flags & ZEND_ACC_STATIC) == 0 &&
prop_info->offset >= 0 &&
zobj->properties_table[prop_info->offset]) {
zend_hash_quick_add(zobj->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&zobj->properties_table[prop_info->offset], sizeof(zval*), (void**)&zobj->properties_table[prop_info->offset]);
- }
+ }
}
while (ce->parent && ce->parent->default_properties_count) {
ce = ce->parent;
@@ -78,12 +78,12 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
if (prop_info->ce == ce &&
- (prop_info->flags & ZEND_ACC_STATIC) == 0 &&
- (prop_info->flags & ZEND_ACC_PRIVATE) != 0 &&
+ (prop_info->flags & ZEND_ACC_STATIC) == 0 &&
+ (prop_info->flags & ZEND_ACC_PRIVATE) != 0 &&
prop_info->offset >= 0 &&
zobj->properties_table[prop_info->offset]) {
zend_hash_quick_add(zobj->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&zobj->properties_table[prop_info->offset], sizeof(zval*), (void**)&zobj->properties_table[prop_info->offset]);
- }
+ }
}
}
}
@@ -783,7 +783,7 @@ static void zend_std_unset_property(zval *object, zval *member, const zend_liter
property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__unset != NULL), key TSRMLS_CC);
if (EXPECTED(property_info != NULL) &&
- EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
!zobj->properties &&
property_info->offset >= 0 &&
EXPECTED(zobj->properties_table[property_info->offset] != NULL)) {
@@ -815,8 +815,8 @@ static void zend_std_unset_property(zval *object, zval *member, const zend_liter
}
}
}
- } else if (EXPECTED(property_info != NULL) &&
- EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ } else if (EXPECTED(property_info != NULL) &&
+ EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
property_info->offset >= 0) {
zobj->properties_table[property_info->offset] = NULL;
}
@@ -960,12 +960,6 @@ ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope)
}
/* }}} */
-static inline zend_class_entry * zend_get_function_root_class(zend_function *fbc) /* {{{ */
-{
- return fbc->common.prototype ? fbc->common.prototype->common.scope : fbc->common.scope;
-}
-/* }}} */
-
static inline union _zend_function *zend_get_user_call_function(zend_class_entry *ce, const char *method_name, int method_len) /* {{{ */
{
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
@@ -1143,7 +1137,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, const c
zend_str_tolower_copy(lc_function_name, function_name_strval, function_name_strlen);
hash_value = zend_hash_func(lc_function_name, function_name_strlen+1);
}
-
+
if (function_name_strlen == ce->name_length && ce->constructor) {
lc_class_name = zend_str_tolower_dup(ce->name, ce->name_length);
/* Only change the method to the constructor if the constructor isn't called __construct
@@ -1178,7 +1172,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, const c
if (UNEXPECTED(!(fbc->common.fn_flags & ZEND_ACC_STATIC))) {
zend_error_noreturn(E_ERROR, "Cannot call non static method %s::%s() without object", ZEND_FN_SCOPE_NAME(fbc), fbc->common.function_name);
}
-#endif
+#endif
if (fbc->op_array.fn_flags & ZEND_ACC_PUBLIC) {
/* No further checks necessary, most common case */
} else if (fbc->op_array.fn_flags & ZEND_ACC_PRIVATE) {
@@ -1220,7 +1214,7 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *p
{
zend_property_info *property_info;
ulong hash_value;
-
+
if (UNEXPECTED(!key) ||
(property_info = CACHED_POLYMORPHIC_PTR(key->cache_slot, ce)) == NULL) {
if (EXPECTED(key != NULL)) {
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 32c0a674b..d0d7a7b84 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -146,6 +146,9 @@ struct _zend_object_handlers {
extern ZEND_API zend_object_handlers std_object_handlers;
+#define zend_get_function_root_class(fbc) \
+ ((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
+
BEGIN_EXTERN_C()
ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, const char *function_name_strval, int function_name_strlen, const struct _zend_literal *key TSRMLS_DC);
ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *property_name, int property_name_len, zend_bool silent, const struct _zend_literal *key TSRMLS_DC);
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index 7fadcf740..f7470fa57 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -28,7 +28,7 @@
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
{
- object->ce = ce;
+ object->ce = ce;
object->properties = NULL;
object->properties_table = NULL;
object->guards = NULL;
@@ -38,7 +38,7 @@ ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
{
if (object->guards) {
zend_hash_destroy(object->guards);
- FREE_HASHTABLE(object->guards);
+ FREE_HASHTABLE(object->guards);
}
if (object->properties) {
zend_hash_destroy(object->properties);
@@ -74,23 +74,23 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl
if (object->ce != EG(scope)) {
zend_class_entry *ce = object->ce;
- zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
- "Call to private %s::__destruct() from context '%s'%s",
- ce->name,
- EG(scope) ? EG(scope)->name : "",
+ zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
+ "Call to private %s::__destruct() from context '%s'%s",
+ ce->name,
+ EG(scope) ? EG(scope)->name : "",
EG(in_execution) ? "" : " during shutdown ignored");
return;
}
} else {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(destructor->common.scope, EG(scope))) {
+ if (!zend_check_protected(zend_get_function_root_class(destructor), EG(scope))) {
zend_class_entry *ce = object->ce;
- zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
- "Call to protected %s::__destruct() from context '%s'%s",
- ce->name,
- EG(scope) ? EG(scope)->name : "",
+ zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
+ "Call to protected %s::__destruct() from context '%s'%s",
+ ce->name,
+ EG(scope) ? EG(scope)->name : "",
EG(in_execution) ? "" : " during shutdown ignored");
return;
}
@@ -139,7 +139,7 @@ ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC)
}
ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC)
-{
+{
zend_object_value retval;
*object = emalloc(sizeof(zend_object));
@@ -222,7 +222,7 @@ ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC)
zend_object *new_object;
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
- /* assume that create isn't overwritten, so when clone depends on the
+ /* assume that create isn't overwritten, so when clone depends on the
* overwritten one then it must itself be overwritten */
old_object = zend_objects_get_address(zobject TSRMLS_CC);
new_obj_val = zend_objects_new(&new_object, old_object->ce TSRMLS_CC);
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index a849cccf1..8d4baa6ac 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -2035,15 +2035,30 @@ ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3) /* {{{ *
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
{
int ret1, ret2;
+ int oflow1, oflow2;
long lval1, lval2;
double dval1, dval2;
- if ((ret1=is_numeric_string(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0)) &&
- (ret2=is_numeric_string(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0))) {
+ if ((ret1=is_numeric_string_ex(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0, &oflow1)) &&
+ (ret2=is_numeric_string_ex(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0, &oflow2))) {
+ if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0.) {
+ /* both values are integers overflown to the same side, and the
+ * double comparison may have resulted in crucial accuracy lost */
+ goto string_cmp;
+ }
if ((ret1==IS_DOUBLE) || (ret2==IS_DOUBLE)) {
if (ret1!=IS_DOUBLE) {
+ if (oflow2) {
+ /* 2nd operand is integer > LONG_MAX (oflow2==1) or < LONG_MIN (-1) */
+ ZVAL_LONG(result, -1 * oflow2);
+ return;
+ }
dval1 = (double) lval1;
} else if (ret2!=IS_DOUBLE) {
+ if (oflow1) {
+ ZVAL_LONG(result, oflow1);
+ return;
+ }
dval2 = (double) lval2;
} else if (dval1 == dval2 && !zend_finite(dval1)) {
/* Both values overflowed and have the same sign,
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index ebf959b25..d28140e9e 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -100,9 +100,12 @@ static zend_always_inline long zend_dval_to_lval(double d)
* if the number was out of long range or contained a decimal point/exponent.
* The number's value is returned into the respective pointer, *lval or *dval,
* if that pointer is not NULL.
+ *
+ * This variant also gives information if a string that represents an integer
+ * could not be represented as such due to overflow. It writes 1 to oflow_info
+ * if the integer is larger than LONG_MAX and -1 if it's smaller than LONG_MIN.
*/
-
-static inline zend_uchar is_numeric_string(const char *str, int length, long *lval, double *dval, int allow_errors)
+static inline zend_uchar is_numeric_string_ex(const char *str, int length, long *lval, double *dval, int allow_errors, int *oflow_info)
{
const char *ptr;
int base = 10, digits = 0, dp_or_e = 0;
@@ -113,6 +116,10 @@ static inline zend_uchar is_numeric_string(const char *str, int length, long *lv
return 0;
}
+ if (oflow_info != NULL) {
+ *oflow_info = 0;
+ }
+
/* Skip any whitespace
* This is much faster than the isspace() function */
while (*str == ' ' || *str == '\t' || *str == '\n' || *str == '\r' || *str == '\v' || *str == '\f') {
@@ -165,6 +172,9 @@ check_digits:
if (base == 10) {
if (digits >= MAX_LENGTH_OF_LONG) {
+ if (oflow_info != NULL) {
+ *oflow_info = *str == '-' ? -1 : 1;
+ }
dp_or_e = -1;
goto process_double;
}
@@ -172,6 +182,9 @@ check_digits:
if (dval) {
local_dval = zend_hex_strtod(str, &ptr);
}
+ if (oflow_info != NULL) {
+ *oflow_info = 1;
+ }
type = IS_DOUBLE;
}
} else if (*ptr == '.' && ZEND_IS_DIGIT(ptr[1])) {
@@ -207,6 +220,9 @@ process_double:
if (dval) {
*dval = zend_strtod(str, NULL);
}
+ if (oflow_info != NULL) {
+ *oflow_info = *str == '-' ? -1 : 1;
+ }
return IS_DOUBLE;
}
@@ -226,6 +242,10 @@ process_double:
}
}
+static inline zend_uchar is_numeric_string(const char *str, int length, long *lval, double *dval, int allow_errors) {
+ return is_numeric_string_ex(str, length, lval, dval, allow_errors, NULL);
+}
+
static inline char *
zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
{
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 8cceb19d8..5a3ae4954 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2442,7 +2442,7 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), Z_STRVAL_PP(method));
}
-
+
if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
EX(object) = NULL;
} else {
@@ -2974,7 +2974,7 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
catch_ce = CACHED_PTR(opline->op1.literal->cache_slot);
} else {
catch_ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC);
-
+
CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
}
ce = Z_OBJCE_P(EG(exception));
@@ -3426,7 +3426,7 @@ ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMP|VAR|UNUSED|CV, ANY)
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 68ba74b44..1fb6e76ce 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -2436,7 +2436,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -6850,7 +6850,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -11278,7 +11278,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -21475,7 +21475,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARG
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -27222,7 +27222,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
diff --git a/acinclude.m4 b/acinclude.m4
index e1842bb5a..adb9599ce 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2449,7 +2449,12 @@ AC_DEFUN([PHP_SETUP_ICONV], [
dnl
dnl Check libc first if no path is provided in --with-iconv
dnl
+
if test "$PHP_ICONV" = "yes"; then
+ dnl Reset LIBS temporarily as it may have already been included
+ dnl -liconv in.
+ LIBS_save="$LIBS"
+ LIBS=
AC_CHECK_FUNC(iconv, [
found_iconv=yes
],[
@@ -2459,6 +2464,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=yes
])
])
+ LIBS="$LIBS_save"
fi
dnl
diff --git a/aclocal.m4 b/aclocal.m4
index 1a735f348..001a14ba8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -2449,7 +2449,12 @@ AC_DEFUN([PHP_SETUP_ICONV], [
dnl
dnl Check libc first if no path is provided in --with-iconv
dnl
+
if test "$PHP_ICONV" = "yes"; then
+ dnl Reset LIBS temporarily as it may have already been included
+ dnl -liconv in.
+ LIBS_save="$LIBS"
+ LIBS=
AC_CHECK_FUNC(iconv, [
found_iconv=yes
],[
@@ -2459,6 +2464,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=yes
])
])
+ LIBS="$LIBS_save"
fi
dnl
diff --git a/configure b/configure
index bbb116f29..09dd2c441 100755
--- a/configure
+++ b/configure
@@ -706,7 +706,7 @@ PACKAGE_STRING=
PACKAGE_BUGREPORT=
PACKAGE_URL=
-ac_unique_file="README.SVN-RULES"
+ac_unique_file="README.GIT-RULES"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -3636,8 +3636,8 @@ ac_config_headers="$ac_config_headers main/php_config.h"
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
-PHP_RELEASE_VERSION=3
-PHP_EXTRA_VERSION=""
+PHP_RELEASE_VERSION=4
+PHP_EXTRA_VERSION="-RC1"
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`
@@ -48128,7 +48128,10 @@ if test "$PHP_ICONV" != "no"; then
echo > ext/iconv/php_php_iconv_h_path.h
echo > ext/iconv/php_iconv_supports_errno.h
- if test "$PHP_ICONV" = "yes"; then
+
+ if test "$PHP_ICONV" = "yes"; then
+ LIBS_save="$LIBS"
+ LIBS=
ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
if test "x$ac_cv_func_iconv" = x""yes; then :
@@ -48152,6 +48155,7 @@ fi
fi
+ LIBS="$LIBS_save"
fi
if test "$found_iconv" = "no"; then
@@ -77782,6 +77786,48 @@ $as_echo "#define HAVE_PG_LO_IMPORT_WITH_OID 1" >>confdefs.h
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeLiteral in -lpq" >&5
+$as_echo_n "checking for PQescapeLiteral in -lpq... " >&6; }
+if test "${ac_cv_lib_pq_PQescapeLiteral+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpq $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char PQescapeLiteral ();
+int
+main ()
+{
+return PQescapeLiteral ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pq_PQescapeLiteral=yes
+else
+ ac_cv_lib_pq_PQescapeLiteral=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeLiteral" >&5
+$as_echo "$ac_cv_lib_pq_PQescapeLiteral" >&6; }
+if test "x$ac_cv_lib_pq_PQescapeLiteral" = x""yes; then :
+
+$as_echo "#define HAVE_PQESCAPELITERAL 1" >>confdefs.h
+
+fi
+
LIBS=$old_LIBS
LDFLAGS=$old_LDFLAGS
@@ -98232,7 +98278,10 @@ $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
echo > ext/iconv/php_php_iconv_h_path.h
echo > ext/iconv/php_iconv_supports_errno.h
- if test "$PHP_ICONV" = "yes"; then
+
+ if test "$PHP_ICONV" = "yes"; then
+ LIBS_save="$LIBS"
+ LIBS=
ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
if test "x$ac_cv_func_iconv" = x""yes; then :
@@ -98256,6 +98305,7 @@ fi
fi
+ LIBS="$LIBS_save"
fi
if test "$found_iconv" = "no"; then
@@ -103713,7 +103763,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 103716 "configure"
+#line 103766 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -105625,7 +105675,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 105628 "configure"' > conftest.$ac_ext
+ echo '#line 105678 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -107017,7 +107067,7 @@ else
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
cat > conftest.$ac_ext <<EOF
-#line 107020 "configure"
+#line 107070 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -107175,11 +107225,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:107178: $lt_compile\"" >&5)
+ (eval echo "\"configure:107228: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:107182: \$? = $ac_status" >&5
+ echo "configure:107232: \$? = $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.
@@ -107473,11 +107523,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:107476: $lt_compile\"" >&5)
+ (eval echo "\"configure:107526: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:107480: \$? = $ac_status" >&5
+ echo "configure:107530: \$? = $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.
@@ -107577,11 +107627,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:107580: $lt_compile\"" >&5)
+ (eval echo "\"configure:107630: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "configure:107584: \$? = $ac_status" >&5
+ echo "configure:107634: \$? = $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
@@ -108041,7 +108091,7 @@ _LT_EOF
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 108044 "configure"
+#line 108094 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -108083,7 +108133,7 @@ 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 108086 "configure"
+#line 108136 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -109608,7 +109658,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 109611 "configure"
+#line 109661 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -109708,7 +109758,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 109711 "configure"
+#line 109761 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -110773,7 +110823,7 @@ case $host_os in
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 110776 "configure"
+#line 110826 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -110816,7 +110866,7 @@ 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 110819 "configure"
+#line 110869 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -112068,11 +112118,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:112071: $lt_compile\"" >&5)
+ (eval echo "\"configure:112121: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:112075: \$? = $ac_status" >&5
+ echo "configure:112125: \$? = $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.
@@ -112172,11 +112222,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:112175: $lt_compile\"" >&5)
+ (eval echo "\"configure:112225: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "configure:112179: \$? = $ac_status" >&5
+ echo "configure:112229: \$? = $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
diff --git a/configure.in b/configure.in
index 1776a5ad4..053a56fbd 100644
--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,7 @@ dnl Basic autoconf + automake initialization, generation of config.nice.
dnl -------------------------------------------------------------------------
AC_PREREQ(2.59)
-AC_INIT(README.SVN-RULES)
+AC_INIT(README.GIT-RULES)
ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
PHP_CONFIG_NICE(config.nice)
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
-PHP_RELEASE_VERSION=3
-PHP_EXTRA_VERSION=""
+PHP_RELEASE_VERSION=4
+PHP_EXTRA_VERSION="-RC1"
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/calendar/tests/unixtojd.phpt b/ext/calendar/tests/unixtojd.phpt
index 11edde5f2..4eeb1ca93 100644
--- a/ext/calendar/tests/unixtojd.phpt
+++ b/ext/calendar/tests/unixtojd.phpt
@@ -2,9 +2,34 @@
unixtojd()
--SKIPIF--
<?php include 'skipif.inc'; ?>
+--ENV--
+TZ=UTC
--FILE--
<?php
+// this line has no impact on test output on Windows
putenv('TZ=UTC');
+// getenv('TZ') returns 'UTC' here
+// putenv (basic_functions.c) does call tzset() when the env var being put is 'TZ'
+// -adding a call direct to GetEnvironmentVariableA just before tzset() is called to check the value of 'TZ' returns 'UTC'
+// putting a call to date_default_timezone_set() here doesn't help
+//
+// on Windows, the only thing that gets this test to pass is to put TZ=UTC in --ENV-- section
+// -since putenv() is written to call tzset() when env var is TZ, I assume that putenv("TZ=UTC") is intended to work
+// and should work on all platforms(including Windows).
+// easter_date.phpt passes
+// -doesn't use --ENV-- section
+// -uses --INI-- section with date.timezone=UTC
+// -uses putenv('TZ=UTC')
+// date.timezone=UTC
+// -if ommitted from easter_date.phpt, outputs DATE_TZ_ERRMSG warning
+// -easter_date() calls mktime() and localtime()
+// -whereas unixtojd(1000000000) calls localtime(1000000000)
+// -if ommitted from unixtojd.phpt, does NOT output DATE_TZ_ERRMSG
+//
+// unixtojd() calls php_localtime_r() which for Pacific timezone systems, returns a time -8 hours
+// -this incorrect localtime is passed to the julian date conversion (GregorianToSDN) function which works (probably correctly)
+// but returns -1 day from expected because its input is -1 from expected
+
echo unixtojd(40000). "\n";
echo unixtojd(1000000000). "\n";
echo unixtojd(1152459009). "\n";
diff --git a/ext/com_dotnet/tests/bug49192.phpt b/ext/com_dotnet/tests/bug49192.phpt
index 7bae1d749..ccbf237b6 100644
--- a/ext/com_dotnet/tests/bug49192.phpt
+++ b/ext/com_dotnet/tests/bug49192.phpt
@@ -3,9 +3,23 @@ Bug #49192 (PHP crashes when GC invoked on COM object)
--SKIPIF--
<?php
if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?>
+--XFAIL--
+1
--FILE--
<?php
+// this test fails to load ADO
+//
+// a change in windows longhorn x64(affecting vista, 7, 8, 2008, 2008r2) broke ADO.
+//
+// there is a fix available, but user has to install it.
+// given that ADO was deprecated a long time ago in favor of newer APIs,
+// I don't think its worth the trouble of making the user install the fix to
+// get an accurate test run. its better to just not run the test or expect it to fail.
+//
+// see: http://support.microsoft.com/kb/2517589
+// see: http://www.infoq.com/news/2011/10/ADO-Win7
+
$dbConnection = new Com('ADODB.Connection');
var_dump(gc_collect_cycles());
?>
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index b359952a8..b03f346b5 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -2177,7 +2177,7 @@ string_copy:
convert_to_string_ex(zvalue);
- if (php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
+ if (!Z_STRLEN_PP(zvalue) || php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
RETVAL_FALSE;
return 1;
}
diff --git a/ext/curl/tests/bug61948.phpt b/ext/curl/tests/bug61948.phpt
new file mode 100644
index 000000000..a03fc3b60
--- /dev/null
+++ b/ext/curl/tests/bug61948.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
+--SKIPIF--
+<?php if (!extension_loaded("curl")) print "skip"; ?>
+--INI--
+open_basedir="/tmp"
+--FILE--
+<?php
+ $ch = curl_init();
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/foo"));
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
+ curl_close($ch);
+?>
+--EXPECTF--
+bool(false)
+bool(true)
+
+Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948.php on line %d
+bool(false)
diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h
index 7e8165dca..221181191 100644
--- a/ext/date/lib/timezonedb.h
+++ b/ext/date/lib/timezonedb.h
@@ -14,570 +14,570 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[576] = {
{ "Africa/Bujumbura" , 0x000571 },
{ "Africa/Cairo" , 0x0005B5 },
{ "Africa/Casablanca" , 0x000878 },
- { "Africa/Ceuta" , 0x000968 },
- { "Africa/Conakry" , 0x000C6F },
- { "Africa/Dakar" , 0x000CDA },
- { "Africa/Dar_es_Salaam" , 0x000D40 },
- { "Africa/Djibouti" , 0x000DAD },
- { "Africa/Douala" , 0x000E02 },
- { "Africa/El_Aaiun" , 0x000E57 },
- { "Africa/Freetown" , 0x000EBD },
- { "Africa/Gaborone" , 0x000FCC },
- { "Africa/Harare" , 0x001027 },
- { "Africa/Johannesburg" , 0x00107C },
- { "Africa/Juba" , 0x0010EA },
- { "Africa/Kampala" , 0x0011FD },
- { "Africa/Khartoum" , 0x00127C },
- { "Africa/Kigali" , 0x00138F },
- { "Africa/Kinshasa" , 0x0013E4 },
- { "Africa/Lagos" , 0x00143F },
- { "Africa/Libreville" , 0x001494 },
- { "Africa/Lome" , 0x0014E9 },
- { "Africa/Luanda" , 0x00152D },
- { "Africa/Lubumbashi" , 0x001582 },
- { "Africa/Lusaka" , 0x0015DD },
- { "Africa/Malabo" , 0x001632 },
- { "Africa/Maputo" , 0x001698 },
- { "Africa/Maseru" , 0x0016ED },
- { "Africa/Mbabane" , 0x001755 },
- { "Africa/Mogadishu" , 0x0017AB },
- { "Africa/Monrovia" , 0x001806 },
- { "Africa/Nairobi" , 0x00186C },
- { "Africa/Ndjamena" , 0x0018EB },
- { "Africa/Niamey" , 0x001957 },
- { "Africa/Nouakchott" , 0x0019CA },
- { "Africa/Ouagadougou" , 0x001A35 },
- { "Africa/Porto-Novo" , 0x001A8A },
- { "Africa/Sao_Tome" , 0x001AF0 },
- { "Africa/Timbuktu" , 0x001B45 },
- { "Africa/Tripoli" , 0x001BB0 },
- { "Africa/Tunis" , 0x001CAA },
- { "Africa/Windhoek" , 0x001DBC },
- { "America/Adak" , 0x002003 },
- { "America/Anchorage" , 0x002379 },
- { "America/Anguilla" , 0x0026ED },
- { "America/Antigua" , 0x002742 },
- { "America/Araguaina" , 0x0027A8 },
- { "America/Argentina/Buenos_Aires" , 0x002903 },
- { "America/Argentina/Catamarca" , 0x002AB1 },
- { "America/Argentina/ComodRivadavia" , 0x002C72 },
- { "America/Argentina/Cordoba" , 0x002E18 },
- { "America/Argentina/Jujuy" , 0x002FED },
- { "America/Argentina/La_Rioja" , 0x0031A1 },
- { "America/Argentina/Mendoza" , 0x003359 },
- { "America/Argentina/Rio_Gallegos" , 0x003519 },
- { "America/Argentina/Salta" , 0x0036CE },
- { "America/Argentina/San_Juan" , 0x00387A },
- { "America/Argentina/San_Luis" , 0x003A32 },
- { "America/Argentina/Tucuman" , 0x003BF8 },
- { "America/Argentina/Ushuaia" , 0x003DB4 },
- { "America/Aruba" , 0x003F6F },
- { "America/Asuncion" , 0x003FD5 },
- { "America/Atikokan" , 0x0042BA },
- { "America/Atka" , 0x004390 },
- { "America/Bahia" , 0x0046F6 },
- { "America/Bahia_Banderas" , 0x004988 },
- { "America/Barbados" , 0x004C01 },
- { "America/Belem" , 0x004C9B },
- { "America/Belize" , 0x004D96 },
- { "America/Blanc-Sablon" , 0x004F12 },
- { "America/Boa_Vista" , 0x004FC6 },
- { "America/Bogota" , 0x0050CF },
- { "America/Boise" , 0x00513B },
- { "America/Buenos_Aires" , 0x0054D2 },
- { "America/Cambridge_Bay" , 0x00566B },
- { "America/Campo_Grande" , 0x005993 },
- { "America/Cancun" , 0x005C82 },
- { "America/Caracas" , 0x005EC4 },
- { "America/Catamarca" , 0x005F2B },
- { "America/Cayenne" , 0x0060D1 },
- { "America/Cayman" , 0x006133 },
- { "America/Chicago" , 0x006188 },
- { "America/Chihuahua" , 0x00669F },
- { "America/Coral_Harbour" , 0x00690A },
- { "America/Cordoba" , 0x00699C },
- { "America/Costa_Rica" , 0x006B42 },
- { "America/Creston" , 0x006BCC },
- { "America/Cuiaba" , 0x006C58 },
- { "America/Curacao" , 0x006F36 },
- { "America/Danmarkshavn" , 0x006F9C },
- { "America/Dawson" , 0x0070E0 },
- { "America/Dawson_Creek" , 0x0073FD },
- { "America/Denver" , 0x0075D7 },
- { "America/Detroit" , 0x00795D },
- { "America/Dominica" , 0x007CBC },
- { "America/Edmonton" , 0x007D11 },
- { "America/Eirunepe" , 0x0080C9 },
- { "America/El_Salvador" , 0x0081DC },
- { "America/Ensenada" , 0x008251 },
- { "America/Fort_Wayne" , 0x0086F8 },
- { "America/Fortaleza" , 0x0085BA },
- { "America/Glace_Bay" , 0x008962 },
- { "America/Godthab" , 0x008CD9 },
- { "America/Goose_Bay" , 0x008F9D },
- { "America/Grand_Turk" , 0x00945A },
- { "America/Grenada" , 0x009709 },
- { "America/Guadeloupe" , 0x00975E },
- { "America/Guatemala" , 0x0097B3 },
- { "America/Guayaquil" , 0x00983C },
- { "America/Guyana" , 0x009899 },
- { "America/Halifax" , 0x00991A },
- { "America/Havana" , 0x009E30 },
- { "America/Hermosillo" , 0x00A1A3 },
- { "America/Indiana/Indianapolis" , 0x00A281 },
- { "America/Indiana/Knox" , 0x00A512 },
- { "America/Indiana/Marengo" , 0x00A8A9 },
- { "America/Indiana/Petersburg" , 0x00AB4F },
- { "America/Indiana/Tell_City" , 0x00B09C },
- { "America/Indiana/Vevay" , 0x00B335 },
- { "America/Indiana/Vincennes" , 0x00B570 },
- { "America/Indiana/Winamac" , 0x00B824 },
- { "America/Indianapolis" , 0x00AE32 },
- { "America/Inuvik" , 0x00BADD },
- { "America/Iqaluit" , 0x00BDD4 },
- { "America/Jamaica" , 0x00C0F6 },
- { "America/Jujuy" , 0x00C1BB },
- { "America/Juneau" , 0x00C365 },
- { "America/Kentucky/Louisville" , 0x00C6E3 },
- { "America/Kentucky/Monticello" , 0x00CB01 },
- { "America/Knox_IN" , 0x00CE86 },
- { "America/Kralendijk" , 0x00D1F7 },
- { "America/La_Paz" , 0x00D25D },
- { "America/Lima" , 0x00D2C4 },
- { "America/Los_Angeles" , 0x00D36C },
- { "America/Louisville" , 0x00D77D },
- { "America/Lower_Princes" , 0x00DB72 },
- { "America/Maceio" , 0x00DBD8 },
- { "America/Managua" , 0x00DD12 },
- { "America/Manaus" , 0x00DDC5 },
- { "America/Marigot" , 0x00DEC7 },
- { "America/Martinique" , 0x00DF1C },
- { "America/Matamoros" , 0x00DF88 },
- { "America/Mazatlan" , 0x00E1E1 },
- { "America/Mendoza" , 0x00E44E },
- { "America/Menominee" , 0x00E602 },
- { "America/Merida" , 0x00E983 },
- { "America/Metlakatla" , 0x00EBBE },
- { "America/Mexico_City" , 0x00ECF8 },
- { "America/Miquelon" , 0x00EF73 },
- { "America/Moncton" , 0x00F1E5 },
- { "America/Monterrey" , 0x00F67C },
- { "America/Montevideo" , 0x00F8DF },
- { "America/Montreal" , 0x00FBF1 },
- { "America/Montserrat" , 0x010107 },
- { "America/Nassau" , 0x01015C },
- { "America/New_York" , 0x0104A1 },
- { "America/Nipigon" , 0x0109AC },
- { "America/Nome" , 0x010CFD },
- { "America/Noronha" , 0x01107B },
- { "America/North_Dakota/Beulah" , 0x0111AB },
- { "America/North_Dakota/Center" , 0x01153F },
- { "America/North_Dakota/New_Salem" , 0x0118D3 },
- { "America/Ojinaga" , 0x011C7C },
- { "America/Panama" , 0x011EDD },
- { "America/Pangnirtung" , 0x011F32 },
- { "America/Paramaribo" , 0x012268 },
- { "America/Phoenix" , 0x0122FA },
- { "America/Port-au-Prince" , 0x0123A8 },
- { "America/Port_of_Spain" , 0x0125C3 },
- { "America/Porto_Acre" , 0x0124C4 },
- { "America/Porto_Velho" , 0x012618 },
- { "America/Puerto_Rico" , 0x01270E },
- { "America/Rainy_River" , 0x012779 },
- { "America/Rankin_Inlet" , 0x012AB1 },
- { "America/Recife" , 0x012D97 },
- { "America/Regina" , 0x012EC1 },
- { "America/Resolute" , 0x01307F },
- { "America/Rio_Branco" , 0x013370 },
- { "America/Rosario" , 0x013473 },
- { "America/Santa_Isabel" , 0x013619 },
- { "America/Santarem" , 0x0139BC },
- { "America/Santiago" , 0x013AC1 },
- { "America/Santo_Domingo" , 0x013E6A },
- { "America/Sao_Paulo" , 0x013F30 },
- { "America/Scoresbysund" , 0x01423F },
- { "America/Shiprock" , 0x01452D },
- { "America/Sitka" , 0x0148BC },
- { "America/St_Barthelemy" , 0x014C44 },
- { "America/St_Johns" , 0x014C99 },
- { "America/St_Kitts" , 0x0151EC },
- { "America/St_Lucia" , 0x015241 },
- { "America/St_Thomas" , 0x015296 },
- { "America/St_Vincent" , 0x0152EB },
- { "America/Swift_Current" , 0x015340 },
- { "America/Tegucigalpa" , 0x015461 },
- { "America/Thule" , 0x0154E0 },
- { "America/Thunder_Bay" , 0x015727 },
- { "America/Tijuana" , 0x015A70 },
- { "America/Toronto" , 0x015E09 },
- { "America/Tortola" , 0x016320 },
- { "America/Vancouver" , 0x016375 },
- { "America/Virgin" , 0x0167B2 },
- { "America/Whitehorse" , 0x016807 },
- { "America/Winnipeg" , 0x016B24 },
- { "America/Yakutat" , 0x016F64 },
- { "America/Yellowknife" , 0x0172CF },
- { "Antarctica/Casey" , 0x0175DF },
- { "Antarctica/Davis" , 0x01767C },
- { "Antarctica/DumontDUrville" , 0x01771D },
- { "Antarctica/Macquarie" , 0x0177AF },
- { "Antarctica/Mawson" , 0x017A29 },
- { "Antarctica/McMurdo" , 0x017AA5 },
- { "Antarctica/Palmer" , 0x017DA7 },
- { "Antarctica/Rothera" , 0x0180C3 },
- { "Antarctica/South_Pole" , 0x018139 },
- { "Antarctica/Syowa" , 0x018441 },
- { "Antarctica/Vostok" , 0x0184AF },
- { "Arctic/Longyearbyen" , 0x018520 },
- { "Asia/Aden" , 0x018852 },
- { "Asia/Almaty" , 0x0188A7 },
- { "Asia/Amman" , 0x018A26 },
- { "Asia/Anadyr" , 0x018CE6 },
- { "Asia/Aqtau" , 0x018ECB },
- { "Asia/Aqtobe" , 0x0190CA },
- { "Asia/Ashgabat" , 0x019282 },
- { "Asia/Ashkhabad" , 0x01939F },
- { "Asia/Baghdad" , 0x0194BC },
- { "Asia/Bahrain" , 0x019631 },
- { "Asia/Baku" , 0x019697 },
- { "Asia/Bangkok" , 0x01997F },
- { "Asia/Beirut" , 0x0199D4 },
- { "Asia/Bishkek" , 0x019CE1 },
- { "Asia/Brunei" , 0x019E8D },
- { "Asia/Calcutta" , 0x019EEF },
- { "Asia/Choibalsan" , 0x019F68 },
- { "Asia/Chongqing" , 0x01A0E1 },
- { "Asia/Chungking" , 0x01A1D0 },
- { "Asia/Colombo" , 0x01A27F },
- { "Asia/Dacca" , 0x01A31B },
- { "Asia/Damascus" , 0x01A3C1 },
- { "Asia/Dhaka" , 0x01A711 },
- { "Asia/Dili" , 0x01A7B7 },
- { "Asia/Dubai" , 0x01A840 },
- { "Asia/Dushanbe" , 0x01A895 },
- { "Asia/Gaza" , 0x01A998 },
- { "Asia/Harbin" , 0x01ABE7 },
- { "Asia/Hebron" , 0x01ACCE },
- { "Asia/Ho_Chi_Minh" , 0x01AF26 },
- { "Asia/Hong_Kong" , 0x01AF9E },
- { "Asia/Hovd" , 0x01B160 },
- { "Asia/Irkutsk" , 0x01B2D8 },
- { "Asia/Istanbul" , 0x01B4BE },
- { "Asia/Jakarta" , 0x01B8AB },
- { "Asia/Jayapura" , 0x01B955 },
- { "Asia/Jerusalem" , 0x01B9F1 },
- { "Asia/Kabul" , 0x01BD20 },
- { "Asia/Kamchatka" , 0x01BD71 },
- { "Asia/Karachi" , 0x01BF4D },
- { "Asia/Kashgar" , 0x01C002 },
- { "Asia/Kathmandu" , 0x01C0D3 },
- { "Asia/Katmandu" , 0x01C139 },
- { "Asia/Kolkata" , 0x01C19F },
- { "Asia/Krasnoyarsk" , 0x01C218 },
- { "Asia/Kuala_Lumpur" , 0x01C400 },
- { "Asia/Kuching" , 0x01C4BD },
- { "Asia/Kuwait" , 0x01C5AB },
- { "Asia/Macao" , 0x01C600 },
- { "Asia/Macau" , 0x01C73B },
- { "Asia/Magadan" , 0x01C876 },
- { "Asia/Makassar" , 0x01CA58 },
- { "Asia/Manila" , 0x01CB1C },
- { "Asia/Muscat" , 0x01CBA1 },
- { "Asia/Nicosia" , 0x01CBF6 },
- { "Asia/Novokuznetsk" , 0x01CEDE },
- { "Asia/Novosibirsk" , 0x01D0E0 },
- { "Asia/Omsk" , 0x01D2CB },
- { "Asia/Oral" , 0x01D4B2 },
- { "Asia/Phnom_Penh" , 0x01D682 },
- { "Asia/Pontianak" , 0x01D6FA },
- { "Asia/Pyongyang" , 0x01D7BB },
- { "Asia/Qatar" , 0x01D828 },
- { "Asia/Qyzylorda" , 0x01D88E },
- { "Asia/Rangoon" , 0x01DA64 },
- { "Asia/Riyadh" , 0x01DADC },
- { "Asia/Saigon" , 0x01DB31 },
- { "Asia/Sakhalin" , 0x01DBA9 },
- { "Asia/Samarkand" , 0x01DDA0 },
- { "Asia/Seoul" , 0x01DED6 },
- { "Asia/Shanghai" , 0x01DF7A },
- { "Asia/Singapore" , 0x01E05A },
- { "Asia/Taipei" , 0x01E111 },
- { "Asia/Tashkent" , 0x01E229 },
- { "Asia/Tbilisi" , 0x01E35A },
- { "Asia/Tehran" , 0x01E514 },
- { "Asia/Tel_Aviv" , 0x01E782 },
- { "Asia/Thimbu" , 0x01EAB1 },
- { "Asia/Thimphu" , 0x01EB17 },
- { "Asia/Tokyo" , 0x01EB7D },
- { "Asia/Ujung_Pandang" , 0x01EC06 },
- { "Asia/Ulaanbaatar" , 0x01EC82 },
- { "Asia/Ulan_Bator" , 0x01EDDD },
- { "Asia/Urumqi" , 0x01EF2A },
- { "Asia/Vientiane" , 0x01EFF1 },
- { "Asia/Vladivostok" , 0x01F069 },
- { "Asia/Yakutsk" , 0x01F255 },
- { "Asia/Yekaterinburg" , 0x01F43A },
- { "Asia/Yerevan" , 0x01F645 },
- { "Atlantic/Azores" , 0x01F845 },
- { "Atlantic/Bermuda" , 0x01FD48 },
- { "Atlantic/Canary" , 0x020029 },
- { "Atlantic/Cape_Verde" , 0x0202FF },
- { "Atlantic/Faeroe" , 0x020378 },
- { "Atlantic/Faroe" , 0x02061C },
- { "Atlantic/Jan_Mayen" , 0x0208C0 },
- { "Atlantic/Madeira" , 0x020BF2 },
- { "Atlantic/Reykjavik" , 0x0210FB },
- { "Atlantic/South_Georgia" , 0x0212B4 },
- { "Atlantic/St_Helena" , 0x0214C6 },
- { "Atlantic/Stanley" , 0x0212F8 },
- { "Australia/ACT" , 0x02151B },
- { "Australia/Adelaide" , 0x021838 },
- { "Australia/Brisbane" , 0x021B64 },
- { "Australia/Broken_Hill" , 0x021C2B },
- { "Australia/Canberra" , 0x021F69 },
- { "Australia/Currie" , 0x022286 },
- { "Australia/Darwin" , 0x0225B9 },
- { "Australia/Eucla" , 0x02263F },
- { "Australia/Hobart" , 0x022714 },
- { "Australia/LHI" , 0x022A72 },
- { "Australia/Lindeman" , 0x022D0D },
- { "Australia/Lord_Howe" , 0x022DEE },
- { "Australia/Melbourne" , 0x023099 },
- { "Australia/North" , 0x0233BE },
- { "Australia/NSW" , 0x023432 },
- { "Australia/Perth" , 0x02374F },
- { "Australia/Queensland" , 0x023827 },
- { "Australia/South" , 0x0238D3 },
- { "Australia/Sydney" , 0x023BF0 },
- { "Australia/Tasmania" , 0x023F2D },
- { "Australia/Victoria" , 0x024272 },
- { "Australia/West" , 0x02458F },
- { "Australia/Yancowinna" , 0x024645 },
- { "Brazil/Acre" , 0x024967 },
- { "Brazil/DeNoronha" , 0x024A66 },
- { "Brazil/East" , 0x024B86 },
- { "Brazil/West" , 0x024E63 },
- { "Canada/Atlantic" , 0x024F5B },
- { "Canada/Central" , 0x025443 },
- { "Canada/East-Saskatchewan" , 0x025D4D },
- { "Canada/Eastern" , 0x02585D },
- { "Canada/Mountain" , 0x025ED6 },
- { "Canada/Newfoundland" , 0x02624C },
- { "Canada/Pacific" , 0x026777 },
- { "Canada/Saskatchewan" , 0x026B90 },
- { "Canada/Yukon" , 0x026D19 },
- { "CET" , 0x02701C },
- { "Chile/Continental" , 0x027325 },
- { "Chile/EasterIsland" , 0x0276C0 },
- { "CST6CDT" , 0x027A02 },
- { "Cuba" , 0x027D53 },
- { "EET" , 0x0280C6 },
- { "Egypt" , 0x028379 },
- { "Eire" , 0x02863C },
- { "EST" , 0x028B4D },
- { "EST5EDT" , 0x028B91 },
- { "Etc/GMT" , 0x028EE2 },
- { "Etc/GMT+0" , 0x028FAE },
- { "Etc/GMT+1" , 0x029038 },
- { "Etc/GMT+10" , 0x0290C5 },
- { "Etc/GMT+11" , 0x029153 },
- { "Etc/GMT+12" , 0x0291E1 },
- { "Etc/GMT+2" , 0x0292FC },
- { "Etc/GMT+3" , 0x029388 },
- { "Etc/GMT+4" , 0x029414 },
- { "Etc/GMT+5" , 0x0294A0 },
- { "Etc/GMT+6" , 0x02952C },
- { "Etc/GMT+7" , 0x0295B8 },
- { "Etc/GMT+8" , 0x029644 },
- { "Etc/GMT+9" , 0x0296D0 },
- { "Etc/GMT-0" , 0x028F6A },
- { "Etc/GMT-1" , 0x028FF2 },
- { "Etc/GMT-10" , 0x02907E },
- { "Etc/GMT-11" , 0x02910C },
- { "Etc/GMT-12" , 0x02919A },
- { "Etc/GMT-13" , 0x029228 },
- { "Etc/GMT-14" , 0x02926F },
- { "Etc/GMT-2" , 0x0292B6 },
- { "Etc/GMT-3" , 0x029342 },
- { "Etc/GMT-4" , 0x0293CE },
- { "Etc/GMT-5" , 0x02945A },
- { "Etc/GMT-6" , 0x0294E6 },
- { "Etc/GMT-7" , 0x029572 },
- { "Etc/GMT-8" , 0x0295FE },
- { "Etc/GMT-9" , 0x02968A },
- { "Etc/GMT0" , 0x028F26 },
- { "Etc/Greenwich" , 0x029716 },
- { "Etc/UCT" , 0x02975A },
- { "Etc/Universal" , 0x02979E },
- { "Etc/UTC" , 0x0297E2 },
- { "Etc/Zulu" , 0x029826 },
- { "Europe/Amsterdam" , 0x02986A },
- { "Europe/Andorra" , 0x029CA8 },
- { "Europe/Athens" , 0x029F24 },
- { "Europe/Belfast" , 0x02A267 },
- { "Europe/Belgrade" , 0x02A79E },
- { "Europe/Berlin" , 0x02AA67 },
- { "Europe/Bratislava" , 0x02ADBD },
- { "Europe/Brussels" , 0x02B0EF },
- { "Europe/Bucharest" , 0x02B526 },
- { "Europe/Budapest" , 0x02B850 },
- { "Europe/Chisinau" , 0x02BBC3 },
- { "Europe/Copenhagen" , 0x02BF51 },
- { "Europe/Dublin" , 0x02C25B },
- { "Europe/Gibraltar" , 0x02C76C },
- { "Europe/Guernsey" , 0x02CBC3 },
- { "Europe/Helsinki" , 0x02D0FA },
- { "Europe/Isle_of_Man" , 0x02D3B0 },
- { "Europe/Istanbul" , 0x02D8E7 },
- { "Europe/Jersey" , 0x02DCD4 },
- { "Europe/Kaliningrad" , 0x02E20B },
- { "Europe/Kiev" , 0x02E471 },
- { "Europe/Lisbon" , 0x02E788 },
- { "Europe/Ljubljana" , 0x02EC8C },
- { "Europe/London" , 0x02EF55 },
- { "Europe/Luxembourg" , 0x02F48C },
- { "Europe/Madrid" , 0x02F8E2 },
- { "Europe/Malta" , 0x02FCA8 },
- { "Europe/Mariehamn" , 0x030061 },
- { "Europe/Minsk" , 0x030317 },
- { "Europe/Monaco" , 0x030525 },
- { "Europe/Moscow" , 0x030960 },
- { "Europe/Nicosia" , 0x030BB1 },
- { "Europe/Oslo" , 0x030E99 },
- { "Europe/Paris" , 0x0311CB },
- { "Europe/Podgorica" , 0x031611 },
- { "Europe/Prague" , 0x0318DA },
- { "Europe/Riga" , 0x031C0C },
- { "Europe/Rome" , 0x031F51 },
- { "Europe/Samara" , 0x032314 },
- { "Europe/San_Marino" , 0x032547 },
- { "Europe/Sarajevo" , 0x03290A },
- { "Europe/Simferopol" , 0x032BD3 },
- { "Europe/Skopje" , 0x032EFE },
- { "Europe/Sofia" , 0x0331C7 },
- { "Europe/Stockholm" , 0x0334CF },
- { "Europe/Tallinn" , 0x03377E },
- { "Europe/Tirane" , 0x033AB8 },
- { "Europe/Tiraspol" , 0x033DBE },
- { "Europe/Uzhgorod" , 0x03414C },
- { "Europe/Vaduz" , 0x034463 },
- { "Europe/Vatican" , 0x0346F6 },
- { "Europe/Vienna" , 0x034AB9 },
- { "Europe/Vilnius" , 0x034DE6 },
- { "Europe/Volgograd" , 0x035125 },
- { "Europe/Warsaw" , 0x035325 },
- { "Europe/Zagreb" , 0x035706 },
- { "Europe/Zaporozhye" , 0x0359CF },
- { "Europe/Zurich" , 0x035D10 },
- { "Factory" , 0x035FBF },
- { "GB" , 0x036030 },
- { "GB-Eire" , 0x036567 },
- { "GMT" , 0x036A9E },
- { "GMT+0" , 0x036B6A },
- { "GMT-0" , 0x036B26 },
- { "GMT0" , 0x036AE2 },
- { "Greenwich" , 0x036BAE },
- { "Hongkong" , 0x036BF2 },
- { "HST" , 0x036DB4 },
- { "Iceland" , 0x036DF8 },
- { "Indian/Antananarivo" , 0x036FB1 },
- { "Indian/Chagos" , 0x037025 },
- { "Indian/Christmas" , 0x037087 },
- { "Indian/Cocos" , 0x0370CB },
- { "Indian/Comoro" , 0x03710F },
- { "Indian/Kerguelen" , 0x037164 },
- { "Indian/Mahe" , 0x0371B9 },
- { "Indian/Maldives" , 0x03720E },
- { "Indian/Mauritius" , 0x037263 },
- { "Indian/Mayotte" , 0x0372D9 },
- { "Indian/Reunion" , 0x03732E },
- { "Iran" , 0x037383 },
- { "Israel" , 0x0375F1 },
- { "Jamaica" , 0x037920 },
- { "Japan" , 0x0379E5 },
- { "Kwajalein" , 0x037A6E },
- { "Libya" , 0x037AD1 },
- { "MET" , 0x037BCB },
- { "Mexico/BajaNorte" , 0x037ED4 },
- { "Mexico/BajaSur" , 0x03823D },
- { "Mexico/General" , 0x038482 },
- { "MST" , 0x0386E0 },
- { "MST7MDT" , 0x038724 },
- { "Navajo" , 0x038A75 },
- { "NZ" , 0x038DEE },
- { "NZ-CHAT" , 0x03916C },
- { "Pacific/Apia" , 0x039454 },
- { "Pacific/Auckland" , 0x0394F1 },
- { "Pacific/Chatham" , 0x03987D },
- { "Pacific/Chuuk" , 0x039B74 },
- { "Pacific/Easter" , 0x039BCD },
- { "Pacific/Efate" , 0x039F2B },
- { "Pacific/Enderbury" , 0x039FF1 },
- { "Pacific/Fakaofo" , 0x03A05F },
- { "Pacific/Fiji" , 0x03A0B0 },
- { "Pacific/Funafuti" , 0x03A144 },
- { "Pacific/Galapagos" , 0x03A188 },
- { "Pacific/Gambier" , 0x03A200 },
- { "Pacific/Guadalcanal" , 0x03A265 },
- { "Pacific/Guam" , 0x03A2BA },
- { "Pacific/Honolulu" , 0x03A310 },
- { "Pacific/Johnston" , 0x03A387 },
- { "Pacific/Kiritimati" , 0x03A3D9 },
- { "Pacific/Kosrae" , 0x03A444 },
- { "Pacific/Kwajalein" , 0x03A4A1 },
- { "Pacific/Majuro" , 0x03A50D },
- { "Pacific/Marquesas" , 0x03A56C },
- { "Pacific/Midway" , 0x03A5D3 },
- { "Pacific/Nauru" , 0x03A65D },
- { "Pacific/Niue" , 0x03A6D5 },
- { "Pacific/Norfolk" , 0x03A733 },
- { "Pacific/Noumea" , 0x03A788 },
- { "Pacific/Pago_Pago" , 0x03A818 },
- { "Pacific/Palau" , 0x03A8A1 },
- { "Pacific/Pitcairn" , 0x03A8E5 },
- { "Pacific/Pohnpei" , 0x03A93A },
- { "Pacific/Ponape" , 0x03A98F },
- { "Pacific/Port_Moresby" , 0x03A9D4 },
- { "Pacific/Rarotonga" , 0x03AA18 },
- { "Pacific/Saipan" , 0x03AAF4 },
- { "Pacific/Samoa" , 0x03AB57 },
- { "Pacific/Tahiti" , 0x03ABE0 },
- { "Pacific/Tarawa" , 0x03AC45 },
- { "Pacific/Tongatapu" , 0x03AC99 },
- { "Pacific/Truk" , 0x03AD25 },
- { "Pacific/Wake" , 0x03AD6A },
- { "Pacific/Wallis" , 0x03ADBA },
- { "Pacific/Yap" , 0x03ADFE },
- { "Poland" , 0x03AE43 },
- { "Portugal" , 0x03B224 },
- { "PRC" , 0x03B720 },
- { "PST8PDT" , 0x03B7D1 },
- { "ROC" , 0x03BB22 },
- { "ROK" , 0x03BC3A },
- { "Singapore" , 0x03BCDE },
- { "Turkey" , 0x03BD95 },
- { "UCT" , 0x03C182 },
- { "Universal" , 0x03C1C6 },
- { "US/Alaska" , 0x03C20A },
- { "US/Aleutian" , 0x03C573 },
- { "US/Arizona" , 0x03C8D9 },
- { "US/Central" , 0x03C967 },
- { "US/East-Indiana" , 0x03D371 },
- { "US/Eastern" , 0x03CE72 },
- { "US/Hawaii" , 0x03D5DB },
- { "US/Indiana-Starke" , 0x03D64C },
- { "US/Michigan" , 0x03D9BD },
- { "US/Mountain" , 0x03DCF4 },
- { "US/Pacific" , 0x03E06D },
- { "US/Pacific-New" , 0x03E472 },
- { "US/Samoa" , 0x03E877 },
- { "UTC" , 0x03E900 },
- { "W-SU" , 0x03EBF7 },
- { "WET" , 0x03E944 },
- { "Zulu" , 0x03EE31 },
+ { "Africa/Ceuta" , 0x000A6C },
+ { "Africa/Conakry" , 0x000D73 },
+ { "Africa/Dakar" , 0x000DDE },
+ { "Africa/Dar_es_Salaam" , 0x000E44 },
+ { "Africa/Djibouti" , 0x000EB1 },
+ { "Africa/Douala" , 0x000F06 },
+ { "Africa/El_Aaiun" , 0x000F5B },
+ { "Africa/Freetown" , 0x000FC1 },
+ { "Africa/Gaborone" , 0x0010D0 },
+ { "Africa/Harare" , 0x00112B },
+ { "Africa/Johannesburg" , 0x001180 },
+ { "Africa/Juba" , 0x0011EE },
+ { "Africa/Kampala" , 0x001301 },
+ { "Africa/Khartoum" , 0x001380 },
+ { "Africa/Kigali" , 0x001493 },
+ { "Africa/Kinshasa" , 0x0014E8 },
+ { "Africa/Lagos" , 0x001543 },
+ { "Africa/Libreville" , 0x001598 },
+ { "Africa/Lome" , 0x0015ED },
+ { "Africa/Luanda" , 0x001631 },
+ { "Africa/Lubumbashi" , 0x001686 },
+ { "Africa/Lusaka" , 0x0016E1 },
+ { "Africa/Malabo" , 0x001736 },
+ { "Africa/Maputo" , 0x00179C },
+ { "Africa/Maseru" , 0x0017F1 },
+ { "Africa/Mbabane" , 0x001859 },
+ { "Africa/Mogadishu" , 0x0018AF },
+ { "Africa/Monrovia" , 0x00190A },
+ { "Africa/Nairobi" , 0x001970 },
+ { "Africa/Ndjamena" , 0x0019EF },
+ { "Africa/Niamey" , 0x001A5B },
+ { "Africa/Nouakchott" , 0x001ACE },
+ { "Africa/Ouagadougou" , 0x001B39 },
+ { "Africa/Porto-Novo" , 0x001B8E },
+ { "Africa/Sao_Tome" , 0x001BF4 },
+ { "Africa/Timbuktu" , 0x001C49 },
+ { "Africa/Tripoli" , 0x001CB4 },
+ { "Africa/Tunis" , 0x001DAE },
+ { "Africa/Windhoek" , 0x001EC0 },
+ { "America/Adak" , 0x002107 },
+ { "America/Anchorage" , 0x00247D },
+ { "America/Anguilla" , 0x0027F1 },
+ { "America/Antigua" , 0x002846 },
+ { "America/Araguaina" , 0x0028AC },
+ { "America/Argentina/Buenos_Aires" , 0x002A07 },
+ { "America/Argentina/Catamarca" , 0x002BB5 },
+ { "America/Argentina/ComodRivadavia" , 0x002D76 },
+ { "America/Argentina/Cordoba" , 0x002F1C },
+ { "America/Argentina/Jujuy" , 0x0030F1 },
+ { "America/Argentina/La_Rioja" , 0x0032A5 },
+ { "America/Argentina/Mendoza" , 0x00345D },
+ { "America/Argentina/Rio_Gallegos" , 0x00361D },
+ { "America/Argentina/Salta" , 0x0037D2 },
+ { "America/Argentina/San_Juan" , 0x00397E },
+ { "America/Argentina/San_Luis" , 0x003B36 },
+ { "America/Argentina/Tucuman" , 0x003CFC },
+ { "America/Argentina/Ushuaia" , 0x003EB8 },
+ { "America/Aruba" , 0x004073 },
+ { "America/Asuncion" , 0x0040D9 },
+ { "America/Atikokan" , 0x0043BE },
+ { "America/Atka" , 0x004494 },
+ { "America/Bahia" , 0x0047FA },
+ { "America/Bahia_Banderas" , 0x004A8C },
+ { "America/Barbados" , 0x004D05 },
+ { "America/Belem" , 0x004D9F },
+ { "America/Belize" , 0x004E9A },
+ { "America/Blanc-Sablon" , 0x005016 },
+ { "America/Boa_Vista" , 0x0050CA },
+ { "America/Bogota" , 0x0051D3 },
+ { "America/Boise" , 0x00523F },
+ { "America/Buenos_Aires" , 0x0055D6 },
+ { "America/Cambridge_Bay" , 0x00576F },
+ { "America/Campo_Grande" , 0x005A97 },
+ { "America/Cancun" , 0x005D86 },
+ { "America/Caracas" , 0x005FC8 },
+ { "America/Catamarca" , 0x00602F },
+ { "America/Cayenne" , 0x0061D5 },
+ { "America/Cayman" , 0x006237 },
+ { "America/Chicago" , 0x00628C },
+ { "America/Chihuahua" , 0x0067A3 },
+ { "America/Coral_Harbour" , 0x006A0E },
+ { "America/Cordoba" , 0x006AA0 },
+ { "America/Costa_Rica" , 0x006C46 },
+ { "America/Creston" , 0x006CD0 },
+ { "America/Cuiaba" , 0x006D5C },
+ { "America/Curacao" , 0x00703A },
+ { "America/Danmarkshavn" , 0x0070A0 },
+ { "America/Dawson" , 0x0071E4 },
+ { "America/Dawson_Creek" , 0x007501 },
+ { "America/Denver" , 0x0076DB },
+ { "America/Detroit" , 0x007A61 },
+ { "America/Dominica" , 0x007DC0 },
+ { "America/Edmonton" , 0x007E15 },
+ { "America/Eirunepe" , 0x0081CD },
+ { "America/El_Salvador" , 0x0082E0 },
+ { "America/Ensenada" , 0x008355 },
+ { "America/Fort_Wayne" , 0x0087FC },
+ { "America/Fortaleza" , 0x0086BE },
+ { "America/Glace_Bay" , 0x008A66 },
+ { "America/Godthab" , 0x008DDD },
+ { "America/Goose_Bay" , 0x0090A1 },
+ { "America/Grand_Turk" , 0x00955E },
+ { "America/Grenada" , 0x00980D },
+ { "America/Guadeloupe" , 0x009862 },
+ { "America/Guatemala" , 0x0098B7 },
+ { "America/Guayaquil" , 0x009940 },
+ { "America/Guyana" , 0x00999D },
+ { "America/Halifax" , 0x009A1E },
+ { "America/Havana" , 0x009F34 },
+ { "America/Hermosillo" , 0x00A2A7 },
+ { "America/Indiana/Indianapolis" , 0x00A385 },
+ { "America/Indiana/Knox" , 0x00A616 },
+ { "America/Indiana/Marengo" , 0x00A9AD },
+ { "America/Indiana/Petersburg" , 0x00AC53 },
+ { "America/Indiana/Tell_City" , 0x00B1A0 },
+ { "America/Indiana/Vevay" , 0x00B439 },
+ { "America/Indiana/Vincennes" , 0x00B674 },
+ { "America/Indiana/Winamac" , 0x00B928 },
+ { "America/Indianapolis" , 0x00AF36 },
+ { "America/Inuvik" , 0x00BBE1 },
+ { "America/Iqaluit" , 0x00BED8 },
+ { "America/Jamaica" , 0x00C1FA },
+ { "America/Jujuy" , 0x00C2BF },
+ { "America/Juneau" , 0x00C469 },
+ { "America/Kentucky/Louisville" , 0x00C7E7 },
+ { "America/Kentucky/Monticello" , 0x00CC05 },
+ { "America/Knox_IN" , 0x00CF8A },
+ { "America/Kralendijk" , 0x00D2FB },
+ { "America/La_Paz" , 0x00D361 },
+ { "America/Lima" , 0x00D3C8 },
+ { "America/Los_Angeles" , 0x00D470 },
+ { "America/Louisville" , 0x00D881 },
+ { "America/Lower_Princes" , 0x00DC76 },
+ { "America/Maceio" , 0x00DCDC },
+ { "America/Managua" , 0x00DE16 },
+ { "America/Manaus" , 0x00DEC9 },
+ { "America/Marigot" , 0x00DFCB },
+ { "America/Martinique" , 0x00E020 },
+ { "America/Matamoros" , 0x00E08C },
+ { "America/Mazatlan" , 0x00E2E5 },
+ { "America/Mendoza" , 0x00E552 },
+ { "America/Menominee" , 0x00E706 },
+ { "America/Merida" , 0x00EA87 },
+ { "America/Metlakatla" , 0x00ECC2 },
+ { "America/Mexico_City" , 0x00EDFC },
+ { "America/Miquelon" , 0x00F077 },
+ { "America/Moncton" , 0x00F2E9 },
+ { "America/Monterrey" , 0x00F780 },
+ { "America/Montevideo" , 0x00F9E3 },
+ { "America/Montreal" , 0x00FCF5 },
+ { "America/Montserrat" , 0x01020B },
+ { "America/Nassau" , 0x010260 },
+ { "America/New_York" , 0x0105A5 },
+ { "America/Nipigon" , 0x010AB0 },
+ { "America/Nome" , 0x010E01 },
+ { "America/Noronha" , 0x01117F },
+ { "America/North_Dakota/Beulah" , 0x0112AF },
+ { "America/North_Dakota/Center" , 0x011643 },
+ { "America/North_Dakota/New_Salem" , 0x0119D7 },
+ { "America/Ojinaga" , 0x011D80 },
+ { "America/Panama" , 0x011FE1 },
+ { "America/Pangnirtung" , 0x012036 },
+ { "America/Paramaribo" , 0x01236C },
+ { "America/Phoenix" , 0x0123FE },
+ { "America/Port-au-Prince" , 0x0124AC },
+ { "America/Port_of_Spain" , 0x0126D1 },
+ { "America/Porto_Acre" , 0x0125D2 },
+ { "America/Porto_Velho" , 0x012726 },
+ { "America/Puerto_Rico" , 0x01281C },
+ { "America/Rainy_River" , 0x012887 },
+ { "America/Rankin_Inlet" , 0x012BBF },
+ { "America/Recife" , 0x012EA5 },
+ { "America/Regina" , 0x012FCF },
+ { "America/Resolute" , 0x01318D },
+ { "America/Rio_Branco" , 0x01347E },
+ { "America/Rosario" , 0x013581 },
+ { "America/Santa_Isabel" , 0x013727 },
+ { "America/Santarem" , 0x013ACA },
+ { "America/Santiago" , 0x013BCF },
+ { "America/Santo_Domingo" , 0x013F78 },
+ { "America/Sao_Paulo" , 0x01403E },
+ { "America/Scoresbysund" , 0x01434D },
+ { "America/Shiprock" , 0x01463B },
+ { "America/Sitka" , 0x0149CA },
+ { "America/St_Barthelemy" , 0x014D52 },
+ { "America/St_Johns" , 0x014DA7 },
+ { "America/St_Kitts" , 0x0152FA },
+ { "America/St_Lucia" , 0x01534F },
+ { "America/St_Thomas" , 0x0153A4 },
+ { "America/St_Vincent" , 0x0153F9 },
+ { "America/Swift_Current" , 0x01544E },
+ { "America/Tegucigalpa" , 0x01556F },
+ { "America/Thule" , 0x0155EE },
+ { "America/Thunder_Bay" , 0x015835 },
+ { "America/Tijuana" , 0x015B7E },
+ { "America/Toronto" , 0x015F17 },
+ { "America/Tortola" , 0x01642E },
+ { "America/Vancouver" , 0x016483 },
+ { "America/Virgin" , 0x0168C0 },
+ { "America/Whitehorse" , 0x016915 },
+ { "America/Winnipeg" , 0x016C32 },
+ { "America/Yakutat" , 0x017072 },
+ { "America/Yellowknife" , 0x0173DD },
+ { "Antarctica/Casey" , 0x0176ED },
+ { "Antarctica/Davis" , 0x01778A },
+ { "Antarctica/DumontDUrville" , 0x01782B },
+ { "Antarctica/Macquarie" , 0x0178BD },
+ { "Antarctica/Mawson" , 0x017B37 },
+ { "Antarctica/McMurdo" , 0x017BB3 },
+ { "Antarctica/Palmer" , 0x017EB5 },
+ { "Antarctica/Rothera" , 0x0181D1 },
+ { "Antarctica/South_Pole" , 0x018247 },
+ { "Antarctica/Syowa" , 0x01854F },
+ { "Antarctica/Vostok" , 0x0185BD },
+ { "Arctic/Longyearbyen" , 0x01862E },
+ { "Asia/Aden" , 0x018960 },
+ { "Asia/Almaty" , 0x0189B5 },
+ { "Asia/Amman" , 0x018B34 },
+ { "Asia/Anadyr" , 0x018DF4 },
+ { "Asia/Aqtau" , 0x018FD9 },
+ { "Asia/Aqtobe" , 0x0191D8 },
+ { "Asia/Ashgabat" , 0x019390 },
+ { "Asia/Ashkhabad" , 0x0194AD },
+ { "Asia/Baghdad" , 0x0195CA },
+ { "Asia/Bahrain" , 0x01973F },
+ { "Asia/Baku" , 0x0197A5 },
+ { "Asia/Bangkok" , 0x019A8D },
+ { "Asia/Beirut" , 0x019AE2 },
+ { "Asia/Bishkek" , 0x019DEF },
+ { "Asia/Brunei" , 0x019F9B },
+ { "Asia/Calcutta" , 0x019FFD },
+ { "Asia/Choibalsan" , 0x01A076 },
+ { "Asia/Chongqing" , 0x01A1EF },
+ { "Asia/Chungking" , 0x01A2DE },
+ { "Asia/Colombo" , 0x01A38D },
+ { "Asia/Dacca" , 0x01A429 },
+ { "Asia/Damascus" , 0x01A4CF },
+ { "Asia/Dhaka" , 0x01A81F },
+ { "Asia/Dili" , 0x01A8C5 },
+ { "Asia/Dubai" , 0x01A94E },
+ { "Asia/Dushanbe" , 0x01A9A3 },
+ { "Asia/Gaza" , 0x01AAA6 },
+ { "Asia/Harbin" , 0x01ACFF },
+ { "Asia/Hebron" , 0x01ADE6 },
+ { "Asia/Ho_Chi_Minh" , 0x01B048 },
+ { "Asia/Hong_Kong" , 0x01B0C0 },
+ { "Asia/Hovd" , 0x01B282 },
+ { "Asia/Irkutsk" , 0x01B3FA },
+ { "Asia/Istanbul" , 0x01B5E0 },
+ { "Asia/Jakarta" , 0x01B9CD },
+ { "Asia/Jayapura" , 0x01BA77 },
+ { "Asia/Jerusalem" , 0x01BB13 },
+ { "Asia/Kabul" , 0x01BE42 },
+ { "Asia/Kamchatka" , 0x01BE93 },
+ { "Asia/Karachi" , 0x01C06F },
+ { "Asia/Kashgar" , 0x01C124 },
+ { "Asia/Kathmandu" , 0x01C1F5 },
+ { "Asia/Katmandu" , 0x01C25B },
+ { "Asia/Kolkata" , 0x01C2C1 },
+ { "Asia/Krasnoyarsk" , 0x01C33A },
+ { "Asia/Kuala_Lumpur" , 0x01C522 },
+ { "Asia/Kuching" , 0x01C5DF },
+ { "Asia/Kuwait" , 0x01C6CD },
+ { "Asia/Macao" , 0x01C722 },
+ { "Asia/Macau" , 0x01C85D },
+ { "Asia/Magadan" , 0x01C998 },
+ { "Asia/Makassar" , 0x01CB7A },
+ { "Asia/Manila" , 0x01CC3E },
+ { "Asia/Muscat" , 0x01CCC3 },
+ { "Asia/Nicosia" , 0x01CD18 },
+ { "Asia/Novokuznetsk" , 0x01D000 },
+ { "Asia/Novosibirsk" , 0x01D202 },
+ { "Asia/Omsk" , 0x01D3ED },
+ { "Asia/Oral" , 0x01D5D4 },
+ { "Asia/Phnom_Penh" , 0x01D7A4 },
+ { "Asia/Pontianak" , 0x01D81C },
+ { "Asia/Pyongyang" , 0x01D8DD },
+ { "Asia/Qatar" , 0x01D94A },
+ { "Asia/Qyzylorda" , 0x01D9B0 },
+ { "Asia/Rangoon" , 0x01DB86 },
+ { "Asia/Riyadh" , 0x01DBFE },
+ { "Asia/Saigon" , 0x01DC53 },
+ { "Asia/Sakhalin" , 0x01DCCB },
+ { "Asia/Samarkand" , 0x01DEC2 },
+ { "Asia/Seoul" , 0x01DFF8 },
+ { "Asia/Shanghai" , 0x01E09C },
+ { "Asia/Singapore" , 0x01E17C },
+ { "Asia/Taipei" , 0x01E233 },
+ { "Asia/Tashkent" , 0x01E34B },
+ { "Asia/Tbilisi" , 0x01E47C },
+ { "Asia/Tehran" , 0x01E636 },
+ { "Asia/Tel_Aviv" , 0x01E8A4 },
+ { "Asia/Thimbu" , 0x01EBD3 },
+ { "Asia/Thimphu" , 0x01EC39 },
+ { "Asia/Tokyo" , 0x01EC9F },
+ { "Asia/Ujung_Pandang" , 0x01ED28 },
+ { "Asia/Ulaanbaatar" , 0x01EDA4 },
+ { "Asia/Ulan_Bator" , 0x01EEFF },
+ { "Asia/Urumqi" , 0x01F04C },
+ { "Asia/Vientiane" , 0x01F113 },
+ { "Asia/Vladivostok" , 0x01F18B },
+ { "Asia/Yakutsk" , 0x01F377 },
+ { "Asia/Yekaterinburg" , 0x01F55C },
+ { "Asia/Yerevan" , 0x01F767 },
+ { "Atlantic/Azores" , 0x01F967 },
+ { "Atlantic/Bermuda" , 0x01FE6A },
+ { "Atlantic/Canary" , 0x02014B },
+ { "Atlantic/Cape_Verde" , 0x020421 },
+ { "Atlantic/Faeroe" , 0x02049A },
+ { "Atlantic/Faroe" , 0x02073E },
+ { "Atlantic/Jan_Mayen" , 0x0209E2 },
+ { "Atlantic/Madeira" , 0x020D14 },
+ { "Atlantic/Reykjavik" , 0x02121D },
+ { "Atlantic/South_Georgia" , 0x0213D6 },
+ { "Atlantic/St_Helena" , 0x0215E8 },
+ { "Atlantic/Stanley" , 0x02141A },
+ { "Australia/ACT" , 0x02163D },
+ { "Australia/Adelaide" , 0x02195A },
+ { "Australia/Brisbane" , 0x021C86 },
+ { "Australia/Broken_Hill" , 0x021D4D },
+ { "Australia/Canberra" , 0x02208B },
+ { "Australia/Currie" , 0x0223A8 },
+ { "Australia/Darwin" , 0x0226DB },
+ { "Australia/Eucla" , 0x022761 },
+ { "Australia/Hobart" , 0x022836 },
+ { "Australia/LHI" , 0x022B94 },
+ { "Australia/Lindeman" , 0x022E2F },
+ { "Australia/Lord_Howe" , 0x022F10 },
+ { "Australia/Melbourne" , 0x0231BB },
+ { "Australia/North" , 0x0234E0 },
+ { "Australia/NSW" , 0x023554 },
+ { "Australia/Perth" , 0x023871 },
+ { "Australia/Queensland" , 0x023949 },
+ { "Australia/South" , 0x0239F5 },
+ { "Australia/Sydney" , 0x023D12 },
+ { "Australia/Tasmania" , 0x02404F },
+ { "Australia/Victoria" , 0x024394 },
+ { "Australia/West" , 0x0246B1 },
+ { "Australia/Yancowinna" , 0x024767 },
+ { "Brazil/Acre" , 0x024A89 },
+ { "Brazil/DeNoronha" , 0x024B88 },
+ { "Brazil/East" , 0x024CA8 },
+ { "Brazil/West" , 0x024F85 },
+ { "Canada/Atlantic" , 0x02507D },
+ { "Canada/Central" , 0x025565 },
+ { "Canada/East-Saskatchewan" , 0x025E6F },
+ { "Canada/Eastern" , 0x02597F },
+ { "Canada/Mountain" , 0x025FF8 },
+ { "Canada/Newfoundland" , 0x02636E },
+ { "Canada/Pacific" , 0x026899 },
+ { "Canada/Saskatchewan" , 0x026CB2 },
+ { "Canada/Yukon" , 0x026E3B },
+ { "CET" , 0x02713E },
+ { "Chile/Continental" , 0x027447 },
+ { "Chile/EasterIsland" , 0x0277E2 },
+ { "CST6CDT" , 0x027B24 },
+ { "Cuba" , 0x027E75 },
+ { "EET" , 0x0281E8 },
+ { "Egypt" , 0x02849B },
+ { "Eire" , 0x02875E },
+ { "EST" , 0x028C6F },
+ { "EST5EDT" , 0x028CB3 },
+ { "Etc/GMT" , 0x029004 },
+ { "Etc/GMT+0" , 0x0290D0 },
+ { "Etc/GMT+1" , 0x02915A },
+ { "Etc/GMT+10" , 0x0291E7 },
+ { "Etc/GMT+11" , 0x029275 },
+ { "Etc/GMT+12" , 0x029303 },
+ { "Etc/GMT+2" , 0x02941E },
+ { "Etc/GMT+3" , 0x0294AA },
+ { "Etc/GMT+4" , 0x029536 },
+ { "Etc/GMT+5" , 0x0295C2 },
+ { "Etc/GMT+6" , 0x02964E },
+ { "Etc/GMT+7" , 0x0296DA },
+ { "Etc/GMT+8" , 0x029766 },
+ { "Etc/GMT+9" , 0x0297F2 },
+ { "Etc/GMT-0" , 0x02908C },
+ { "Etc/GMT-1" , 0x029114 },
+ { "Etc/GMT-10" , 0x0291A0 },
+ { "Etc/GMT-11" , 0x02922E },
+ { "Etc/GMT-12" , 0x0292BC },
+ { "Etc/GMT-13" , 0x02934A },
+ { "Etc/GMT-14" , 0x029391 },
+ { "Etc/GMT-2" , 0x0293D8 },
+ { "Etc/GMT-3" , 0x029464 },
+ { "Etc/GMT-4" , 0x0294F0 },
+ { "Etc/GMT-5" , 0x02957C },
+ { "Etc/GMT-6" , 0x029608 },
+ { "Etc/GMT-7" , 0x029694 },
+ { "Etc/GMT-8" , 0x029720 },
+ { "Etc/GMT-9" , 0x0297AC },
+ { "Etc/GMT0" , 0x029048 },
+ { "Etc/Greenwich" , 0x029838 },
+ { "Etc/UCT" , 0x02987C },
+ { "Etc/Universal" , 0x0298C0 },
+ { "Etc/UTC" , 0x029904 },
+ { "Etc/Zulu" , 0x029948 },
+ { "Europe/Amsterdam" , 0x02998C },
+ { "Europe/Andorra" , 0x029DCA },
+ { "Europe/Athens" , 0x02A046 },
+ { "Europe/Belfast" , 0x02A389 },
+ { "Europe/Belgrade" , 0x02A8C0 },
+ { "Europe/Berlin" , 0x02AB89 },
+ { "Europe/Bratislava" , 0x02AEDF },
+ { "Europe/Brussels" , 0x02B211 },
+ { "Europe/Bucharest" , 0x02B648 },
+ { "Europe/Budapest" , 0x02B972 },
+ { "Europe/Chisinau" , 0x02BCE5 },
+ { "Europe/Copenhagen" , 0x02C073 },
+ { "Europe/Dublin" , 0x02C37D },
+ { "Europe/Gibraltar" , 0x02C88E },
+ { "Europe/Guernsey" , 0x02CCE5 },
+ { "Europe/Helsinki" , 0x02D21C },
+ { "Europe/Isle_of_Man" , 0x02D4D2 },
+ { "Europe/Istanbul" , 0x02DA09 },
+ { "Europe/Jersey" , 0x02DDF6 },
+ { "Europe/Kaliningrad" , 0x02E32D },
+ { "Europe/Kiev" , 0x02E593 },
+ { "Europe/Lisbon" , 0x02E8AA },
+ { "Europe/Ljubljana" , 0x02EDAE },
+ { "Europe/London" , 0x02F077 },
+ { "Europe/Luxembourg" , 0x02F5AE },
+ { "Europe/Madrid" , 0x02FA04 },
+ { "Europe/Malta" , 0x02FDCA },
+ { "Europe/Mariehamn" , 0x030183 },
+ { "Europe/Minsk" , 0x030439 },
+ { "Europe/Monaco" , 0x030647 },
+ { "Europe/Moscow" , 0x030A82 },
+ { "Europe/Nicosia" , 0x030CD3 },
+ { "Europe/Oslo" , 0x030FBB },
+ { "Europe/Paris" , 0x0312ED },
+ { "Europe/Podgorica" , 0x031733 },
+ { "Europe/Prague" , 0x0319FC },
+ { "Europe/Riga" , 0x031D2E },
+ { "Europe/Rome" , 0x032073 },
+ { "Europe/Samara" , 0x032436 },
+ { "Europe/San_Marino" , 0x032669 },
+ { "Europe/Sarajevo" , 0x032A2C },
+ { "Europe/Simferopol" , 0x032CF5 },
+ { "Europe/Skopje" , 0x033020 },
+ { "Europe/Sofia" , 0x0332E9 },
+ { "Europe/Stockholm" , 0x0335F1 },
+ { "Europe/Tallinn" , 0x0338A0 },
+ { "Europe/Tirane" , 0x033BDA },
+ { "Europe/Tiraspol" , 0x033EE0 },
+ { "Europe/Uzhgorod" , 0x03426E },
+ { "Europe/Vaduz" , 0x034585 },
+ { "Europe/Vatican" , 0x034818 },
+ { "Europe/Vienna" , 0x034BDB },
+ { "Europe/Vilnius" , 0x034F08 },
+ { "Europe/Volgograd" , 0x035247 },
+ { "Europe/Warsaw" , 0x035447 },
+ { "Europe/Zagreb" , 0x035828 },
+ { "Europe/Zaporozhye" , 0x035AF1 },
+ { "Europe/Zurich" , 0x035E32 },
+ { "Factory" , 0x0360E1 },
+ { "GB" , 0x036152 },
+ { "GB-Eire" , 0x036689 },
+ { "GMT" , 0x036BC0 },
+ { "GMT+0" , 0x036C8C },
+ { "GMT-0" , 0x036C48 },
+ { "GMT0" , 0x036C04 },
+ { "Greenwich" , 0x036CD0 },
+ { "Hongkong" , 0x036D14 },
+ { "HST" , 0x036ED6 },
+ { "Iceland" , 0x036F1A },
+ { "Indian/Antananarivo" , 0x0370D3 },
+ { "Indian/Chagos" , 0x037147 },
+ { "Indian/Christmas" , 0x0371A9 },
+ { "Indian/Cocos" , 0x0371ED },
+ { "Indian/Comoro" , 0x037231 },
+ { "Indian/Kerguelen" , 0x037286 },
+ { "Indian/Mahe" , 0x0372DB },
+ { "Indian/Maldives" , 0x037330 },
+ { "Indian/Mauritius" , 0x037385 },
+ { "Indian/Mayotte" , 0x0373FB },
+ { "Indian/Reunion" , 0x037450 },
+ { "Iran" , 0x0374A5 },
+ { "Israel" , 0x037713 },
+ { "Jamaica" , 0x037A42 },
+ { "Japan" , 0x037B07 },
+ { "Kwajalein" , 0x037B90 },
+ { "Libya" , 0x037BF3 },
+ { "MET" , 0x037CED },
+ { "Mexico/BajaNorte" , 0x037FF6 },
+ { "Mexico/BajaSur" , 0x03835F },
+ { "Mexico/General" , 0x0385A4 },
+ { "MST" , 0x038802 },
+ { "MST7MDT" , 0x038846 },
+ { "Navajo" , 0x038B97 },
+ { "NZ" , 0x038F10 },
+ { "NZ-CHAT" , 0x03928E },
+ { "Pacific/Apia" , 0x039576 },
+ { "Pacific/Auckland" , 0x039613 },
+ { "Pacific/Chatham" , 0x03999F },
+ { "Pacific/Chuuk" , 0x039C96 },
+ { "Pacific/Easter" , 0x039CEF },
+ { "Pacific/Efate" , 0x03A04D },
+ { "Pacific/Enderbury" , 0x03A113 },
+ { "Pacific/Fakaofo" , 0x03A181 },
+ { "Pacific/Fiji" , 0x03A1D2 },
+ { "Pacific/Funafuti" , 0x03A266 },
+ { "Pacific/Galapagos" , 0x03A2AA },
+ { "Pacific/Gambier" , 0x03A322 },
+ { "Pacific/Guadalcanal" , 0x03A387 },
+ { "Pacific/Guam" , 0x03A3DC },
+ { "Pacific/Honolulu" , 0x03A432 },
+ { "Pacific/Johnston" , 0x03A4A9 },
+ { "Pacific/Kiritimati" , 0x03A4FB },
+ { "Pacific/Kosrae" , 0x03A566 },
+ { "Pacific/Kwajalein" , 0x03A5C3 },
+ { "Pacific/Majuro" , 0x03A62F },
+ { "Pacific/Marquesas" , 0x03A68E },
+ { "Pacific/Midway" , 0x03A6F5 },
+ { "Pacific/Nauru" , 0x03A77F },
+ { "Pacific/Niue" , 0x03A7F7 },
+ { "Pacific/Norfolk" , 0x03A855 },
+ { "Pacific/Noumea" , 0x03A8AA },
+ { "Pacific/Pago_Pago" , 0x03A93A },
+ { "Pacific/Palau" , 0x03A9C3 },
+ { "Pacific/Pitcairn" , 0x03AA07 },
+ { "Pacific/Pohnpei" , 0x03AA5C },
+ { "Pacific/Ponape" , 0x03AAB1 },
+ { "Pacific/Port_Moresby" , 0x03AAF6 },
+ { "Pacific/Rarotonga" , 0x03AB3A },
+ { "Pacific/Saipan" , 0x03AC16 },
+ { "Pacific/Samoa" , 0x03AC79 },
+ { "Pacific/Tahiti" , 0x03AD02 },
+ { "Pacific/Tarawa" , 0x03AD67 },
+ { "Pacific/Tongatapu" , 0x03ADBB },
+ { "Pacific/Truk" , 0x03AE47 },
+ { "Pacific/Wake" , 0x03AE8C },
+ { "Pacific/Wallis" , 0x03AEDC },
+ { "Pacific/Yap" , 0x03AF20 },
+ { "Poland" , 0x03AF65 },
+ { "Portugal" , 0x03B346 },
+ { "PRC" , 0x03B842 },
+ { "PST8PDT" , 0x03B8F3 },
+ { "ROC" , 0x03BC44 },
+ { "ROK" , 0x03BD5C },
+ { "Singapore" , 0x03BE00 },
+ { "Turkey" , 0x03BEB7 },
+ { "UCT" , 0x03C2A4 },
+ { "Universal" , 0x03C2E8 },
+ { "US/Alaska" , 0x03C32C },
+ { "US/Aleutian" , 0x03C695 },
+ { "US/Arizona" , 0x03C9FB },
+ { "US/Central" , 0x03CA89 },
+ { "US/East-Indiana" , 0x03D493 },
+ { "US/Eastern" , 0x03CF94 },
+ { "US/Hawaii" , 0x03D6FD },
+ { "US/Indiana-Starke" , 0x03D76E },
+ { "US/Michigan" , 0x03DADF },
+ { "US/Mountain" , 0x03DE16 },
+ { "US/Pacific" , 0x03E18F },
+ { "US/Pacific-New" , 0x03E594 },
+ { "US/Samoa" , 0x03E999 },
+ { "UTC" , 0x03EA22 },
+ { "W-SU" , 0x03ED19 },
+ { "WET" , 0x03EA66 },
+ { "Zulu" , 0x03EF53 },
};
/* This is a generated file, do not modify */
-const unsigned char timelib_timezone_db_data_builtin[257653] = {
+const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* Africa/Abidjan */
@@ -755,20 +755,36 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
/* Africa/Casablanca */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x41, 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, 0x1B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x96, 0x51, 0xF9, 0x9C,
+0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x96, 0x51, 0xF9, 0x9C,
0xC6, 0xFF, 0x14, 0x80, 0xC7, 0x58, 0xAC, 0x70, 0xC7, 0xD9, 0xED, 0x80, 0xD2, 0xA1, 0x32, 0xF0,
0xDB, 0x35, 0xA4, 0x00, 0xDB, 0xEE, 0x27, 0xF0, 0xFB, 0x25, 0x72, 0x40, 0xFB, 0xC2, 0xEF, 0x70,
0x08, 0x6B, 0x84, 0x80, 0x08, 0xC6, 0x6D, 0xF0, 0x0B, 0xE8, 0x0C, 0x00, 0x0C, 0x61, 0x47, 0xF0,
0x0D, 0xC9, 0x3F, 0x80, 0x0E, 0x8E, 0xF2, 0x70, 0x0F, 0xD3, 0x51, 0x80, 0x10, 0x27, 0xA3, 0x70,
0x1A, 0xB7, 0xA6, 0x00, 0x1E, 0x18, 0x6F, 0xF0, 0x48, 0x41, 0xE6, 0x80, 0x48, 0xBB, 0x22, 0x70,
0x4A, 0x23, 0x1A, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x4B, 0xDC, 0xC0, 0x80, 0x4C, 0x5D, 0xE5, 0x70,
-0x4D, 0x97, 0xB8, 0x80, 0x4E, 0x34, 0x8C, 0xF0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x4D, 0x97, 0xB8, 0x80, 0x4E, 0x34, 0x8C, 0xF0, 0x4F, 0x9C, 0xA0, 0xA0, 0x50, 0x67, 0xA7, 0xA0,
+0x51, 0x7C, 0x82, 0xA0, 0x52, 0x47, 0x89, 0xA0, 0x53, 0x5C, 0x64, 0xA0, 0x54, 0x27, 0x6B, 0xA0,
+0x55, 0x3C, 0x46, 0xA0, 0x56, 0x07, 0x4D, 0xA0, 0x57, 0x1C, 0x28, 0xA0, 0x57, 0xE7, 0x2F, 0xA0,
+0x59, 0x05, 0x45, 0x20, 0x59, 0xC7, 0x11, 0xA0, 0x5A, 0xE5, 0x27, 0x20, 0x5B, 0xB0, 0x2E, 0x20,
+0x5C, 0xC5, 0x09, 0x20, 0x5D, 0x90, 0x10, 0x20, 0x5E, 0xA4, 0xEB, 0x20, 0x5F, 0x6F, 0xF2, 0x20,
+0x60, 0x84, 0xCD, 0x20, 0x61, 0x4F, 0xD4, 0x20, 0x62, 0x64, 0xAF, 0x20, 0x63, 0x2F, 0xB6, 0x20,
+0x64, 0x4D, 0xCB, 0xA0, 0x65, 0x0F, 0x98, 0x20, 0x66, 0x2D, 0xAD, 0xA0, 0x66, 0xF8, 0xB4, 0xA0,
+0x68, 0x0D, 0x8F, 0xA0, 0x68, 0xD8, 0x96, 0xA0, 0x69, 0xED, 0x71, 0xA0, 0x6A, 0xB8, 0x78, 0xA0,
+0x6B, 0xCD, 0x53, 0xA0, 0x6C, 0x98, 0x5A, 0xA0, 0x6D, 0xB6, 0x70, 0x20, 0x6E, 0x78, 0x3C, 0xA0,
+0x6F, 0x96, 0x52, 0x20, 0x70, 0x61, 0x59, 0x20, 0x71, 0x76, 0x34, 0x20, 0x72, 0x41, 0x3B, 0x20,
+0x73, 0x56, 0x16, 0x20, 0x74, 0x21, 0x1D, 0x20, 0x75, 0x35, 0xF8, 0x20, 0x76, 0x00, 0xFF, 0x20,
+0x77, 0x15, 0xDA, 0x20, 0x77, 0xE0, 0xE1, 0x20, 0x78, 0xFE, 0xF6, 0xA0, 0x79, 0xC0, 0xC3, 0x20,
+0x7A, 0xDE, 0xD8, 0xA0, 0x7B, 0xA9, 0xDF, 0xA0, 0x7C, 0xBE, 0xBA, 0xA0, 0x7D, 0x89, 0xC1, 0xA0,
+0x7E, 0x9E, 0x9C, 0xA0, 0x7F, 0x69, 0xA3, 0xA0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57,
-0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xBC, 0xAC, 0xC8, 0x01, 0x07, 0x16, 0x42, 0x00, 0x00, 0x00, 0x00,
-
+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, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E,
+0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBC, 0xAC, 0xC8, 0x01, 0x07, 0x16, 0x42,
+0x00, 0x00, 0x00, 0x00,
/* Africa/Ceuta */
0x50, 0x48, 0x50, 0x31, 0x01, 0x45, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5707,7 +5723,7 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
/* America/Port-au-Prince */
0x50, 0x48, 0x50, 0x31, 0x01, 0x48, 0x54, 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, 0x23, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0x9C, 0x6E, 0x71, 0xFC,
+0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0x9C, 0x6E, 0x71, 0xFC,
0x19, 0x1B, 0x46, 0xD0, 0x1A, 0x01, 0xEF, 0x40, 0x1A, 0xF1, 0xEE, 0x50, 0x1B, 0xE1, 0xD1, 0x40,
0x1C, 0xD1, 0xD0, 0x50, 0x1D, 0xC1, 0xB3, 0x40, 0x1E, 0xB1, 0xB2, 0x50, 0x1F, 0xA1, 0x95, 0x40,
0x20, 0x91, 0x94, 0x50, 0x21, 0x81, 0x77, 0x40, 0x22, 0x55, 0xD4, 0xE0, 0x23, 0x6A, 0xAF, 0xE0,
@@ -5716,13 +5732,14 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
0x2B, 0xBE, 0x79, 0x60, 0x2C, 0xD3, 0x54, 0x60, 0x2D, 0x9E, 0x5B, 0x60, 0x2E, 0xB3, 0x36, 0x60,
0x2F, 0x7E, 0x3D, 0x60, 0x30, 0x93, 0x18, 0x60, 0x31, 0x67, 0x59, 0xE0, 0x32, 0x72, 0xFA, 0x60,
0x33, 0x47, 0x3B, 0xE0, 0x34, 0x52, 0xDC, 0x60, 0x42, 0x4F, 0x78, 0x50, 0x43, 0x64, 0x45, 0x40,
-0x44, 0x2F, 0x5A, 0x50, 0x45, 0x44, 0x27, 0x40, 0x02, 0x01, 0x02, 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, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xBC, 0x44, 0x00,
-0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x05, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF, 0xC7,
-0xC0, 0x01, 0x05, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x50, 0x50, 0x4D, 0x54, 0x00, 0x45, 0x44,
-0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xA5, 0x9B, 0xD5, 0x00, 0xA4, 0x49, 0x4A, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x5A, 0x50, 0x45, 0x44, 0x27, 0x40, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60,
+0x02, 0x01, 0x02, 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, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xBC, 0x44, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
+0x05, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x05, 0xFF, 0xFF, 0xB9,
+0xB0, 0x00, 0x09, 0x50, 0x50, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x9B, 0xD5, 0x00, 0xA4,
+0x49, 0x4A, 0x00, 0x00, 0x00, 0x00,
/* America/Porto_Acre */
0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7962,20 +7979,20 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
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, 0xF5, 0x53, 0x60, 0x49, 0x0B, 0x71, 0xD0,
0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xEA, 0x02, 0x50, 0x4B, 0xB5, 0x17, 0x60, 0x4C, 0xC9, 0xE4, 0x50,
-0x4D, 0x94, 0xF9, 0x60, 0x4E, 0xA9, 0xC6, 0x50, 0x4F, 0x7E, 0x15, 0xE0, 0x50, 0x89, 0xA8, 0x50,
-0x51, 0x5D, 0xF7, 0xE0, 0x52, 0x69, 0x8A, 0x50, 0x53, 0x3D, 0xD9, 0xE0, 0x54, 0x52, 0xA6, 0xD0,
-0x55, 0x1D, 0xBB, 0xE0, 0x56, 0x32, 0x88, 0xD0, 0x56, 0xFD, 0x9D, 0xE0, 0x58, 0x12, 0x6A, 0xD0,
-0x58, 0xE6, 0xBA, 0x60, 0x59, 0xF2, 0x4C, 0xD0, 0x5A, 0xC6, 0x9C, 0x60, 0x5B, 0xD2, 0x2E, 0xD0,
-0x5C, 0xA6, 0x7E, 0x60, 0x5D, 0xB2, 0x10, 0xD0, 0x5E, 0x86, 0x60, 0x60, 0x5F, 0x9B, 0x2D, 0x50,
-0x60, 0x66, 0x42, 0x60, 0x61, 0x7B, 0x0F, 0x50, 0x62, 0x46, 0x24, 0x60, 0x63, 0x5A, 0xF1, 0x50,
-0x64, 0x2F, 0x40, 0xE0, 0x65, 0x3A, 0xD3, 0x50, 0x66, 0x0F, 0x22, 0xE0, 0x67, 0x1A, 0xB5, 0x50,
-0x67, 0xEF, 0x04, 0xE0, 0x69, 0x03, 0xD1, 0xD0, 0x69, 0xCE, 0xE6, 0xE0, 0x6A, 0xE3, 0xB3, 0xD0,
-0x6B, 0xAE, 0xC8, 0xE0, 0x6C, 0xC3, 0x95, 0xD0, 0x6D, 0x97, 0xE5, 0x60, 0x6E, 0xA3, 0x77, 0xD0,
-0x6F, 0x77, 0xC7, 0x60, 0x70, 0x83, 0x59, 0xD0, 0x71, 0x57, 0xA9, 0x60, 0x72, 0x63, 0x3B, 0xD0,
-0x73, 0x37, 0x8B, 0x60, 0x74, 0x4C, 0x58, 0x50, 0x75, 0x17, 0x6D, 0x60, 0x76, 0x2C, 0x3A, 0x50,
-0x76, 0xF7, 0x4F, 0x60, 0x78, 0x0C, 0x1C, 0x50, 0x78, 0xE0, 0x6B, 0xE0, 0x79, 0xEB, 0xFE, 0x50,
-0x7A, 0xC0, 0x4D, 0xE0, 0x7B, 0xCB, 0xE0, 0x50, 0x7C, 0xA0, 0x2F, 0xE0, 0x7D, 0xB4, 0xFC, 0xD0,
-0x7E, 0x80, 0x11, 0xE0, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x4D, 0x94, 0xF9, 0x60, 0x4E, 0xA9, 0xC6, 0x50, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x89, 0xA8, 0x50,
+0x51, 0x54, 0xBD, 0x60, 0x52, 0x69, 0x8A, 0x50, 0x53, 0x34, 0x9F, 0x60, 0x54, 0x52, 0xA6, 0xD0,
+0x55, 0x14, 0x81, 0x60, 0x56, 0x32, 0x88, 0xD0, 0x56, 0xF4, 0x63, 0x60, 0x58, 0x12, 0x6A, 0xD0,
+0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xF2, 0x4C, 0xD0, 0x5A, 0xBD, 0x61, 0xE0, 0x5B, 0xD2, 0x2E, 0xD0,
+0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB2, 0x10, 0xD0, 0x5E, 0x7D, 0x25, 0xE0, 0x5F, 0x9B, 0x2D, 0x50,
+0x60, 0x5D, 0x07, 0xE0, 0x61, 0x7B, 0x0F, 0x50, 0x62, 0x3C, 0xE9, 0xE0, 0x63, 0x5A, 0xF1, 0x50,
+0x64, 0x26, 0x06, 0x60, 0x65, 0x3A, 0xD3, 0x50, 0x66, 0x05, 0xE8, 0x60, 0x67, 0x1A, 0xB5, 0x50,
+0x67, 0xE5, 0xCA, 0x60, 0x69, 0x03, 0xD1, 0xD0, 0x69, 0xC5, 0xAC, 0x60, 0x6A, 0xE3, 0xB3, 0xD0,
+0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0xC3, 0x95, 0xD0, 0x6D, 0x8E, 0xAA, 0xE0, 0x6E, 0xA3, 0x77, 0xD0,
+0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x83, 0x59, 0xD0, 0x71, 0x4E, 0x6E, 0xE0, 0x72, 0x63, 0x3B, 0xD0,
+0x73, 0x2E, 0x50, 0xE0, 0x74, 0x4C, 0x58, 0x50, 0x75, 0x0E, 0x32, 0xE0, 0x76, 0x2C, 0x3A, 0x50,
+0x76, 0xEE, 0x14, 0xE0, 0x78, 0x0C, 0x1C, 0x50, 0x78, 0xD7, 0x31, 0x60, 0x79, 0xEB, 0xFE, 0x50,
+0x7A, 0xB7, 0x13, 0x60, 0x7B, 0xCB, 0xE0, 0x50, 0x7C, 0x96, 0xF5, 0x60, 0x7D, 0xB4, 0xFC, 0xD0,
+0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x94, 0xDE, 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,
@@ -8044,7 +8061,7 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
/* Asia/Gaza */
0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x53, 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, 0x5C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0,
+0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0,
0xCC, 0xE5, 0xC1, 0x50, 0xCD, 0xAC, 0xFE, 0x00, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0,
0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xC9, 0x70, 0xD3, 0x65, 0xB0, 0x80,
0xD4, 0x6B, 0xE0, 0xD0, 0xE8, 0x36, 0x63, 0x60, 0xE8, 0xF4, 0x2D, 0x50, 0xEA, 0x0B, 0xB9, 0x60,
@@ -8067,18 +8084,19 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
0x41, 0x5C, 0x81, 0xE0, 0x42, 0x5E, 0xE7, 0xE0, 0x43, 0x41, 0xB7, 0xF0, 0x44, 0x2D, 0xA6, 0x60,
0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xF1, 0x5E, 0xE0,
0x48, 0xB7, 0x11, 0xD0, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C,
-0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x96, 0xF3, 0xDC, 0x4E, 0x35, 0xC2, 0x50, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 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, 0x01, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x01, 0x02, 0x01,
+0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x96, 0xF3, 0xDC, 0x4E, 0x35, 0xC2, 0x50, 0x4F, 0x74, 0xDB, 0x60,
+0x50, 0x64, 0xBE, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 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, 0x01, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 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, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00,
-0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x45, 0x45, 0x54, 0x00,
-0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40,
-0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70,
+0x02, 0x01, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49,
+0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47,
+0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70,
/* Asia/Harbin */
0x50, 0x48, 0x50, 0x31, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8100,7 +8118,7 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
/* Asia/Hebron */
0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x53, 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, 0x5E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0,
+0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0,
0xCC, 0xE5, 0xC1, 0x50, 0xCD, 0xAC, 0xFE, 0x00, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0,
0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xC9, 0x70, 0xD3, 0x65, 0xB0, 0x80,
0xD4, 0x6B, 0xE0, 0xD0, 0xE8, 0x36, 0x63, 0x60, 0xE8, 0xF4, 0x2D, 0x50, 0xEA, 0x0B, 0xB9, 0x60,
@@ -8124,18 +8142,19 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xF1, 0x5E, 0xE0,
0x48, 0xBB, 0x06, 0x50, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C,
0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x95, 0xA2, 0x5C, 0x4E, 0x35, 0xC2, 0x50, 0x4E, 0x5C, 0x0B, 0xE0,
-0x4E, 0x85, 0x06, 0x80, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 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, 0x01, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x4E, 0x85, 0x06, 0x80, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x64, 0xE8, 0x80, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 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, 0x01, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49,
-0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57,
-0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x2A, 0x30,
+0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00,
+0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00,
+0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x71,
+0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61,
+0x6E, 0x6B,
/* Asia/Ho_Chi_Minh */
0x50, 0x48, 0x50, 0x31, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18156,4 +18175,4 @@ const unsigned char timelib_timezone_db_data_builtin[257653] = {
0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
0x00, 0x00, 0x00, 0x00, };
-const timelib_tzdb timezonedb_builtin = { "2012.2", 576, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2012.3", 576, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt
index d7795241a..1d814377c 100644
--- a/ext/date/tests/bug52062.phpt
+++ b/ext/date/tests/bug52062.phpt
@@ -13,6 +13,7 @@ date.timezone=UTC
$d = new DateTime('@100000000000');
var_dump($d->format('Y-m-d H:i:s U'));
var_dump($d->getTimestamp());
+var_dump($d->format('U'));
$d->setTimestamp(100000000000);
var_dump($d->format('Y-m-d H:i:s U'));
@@ -23,7 +24,8 @@ var_dump($i->format('%s'));
?>
--EXPECT--
string(32) "5138-11-16 09:46:40 100000000000"
-int(100000000000)
-string(32) "5138-11-16 09:46:40 100000000000"
-int(100000000000)
+bool(false)
string(12) "100000000000"
+string(30) "2008-07-11 04:56:32 1215752192"
+int(1215752192)
+string(10) "1215752192"
diff --git a/ext/date/tests/date_default_timezone_get-1-win32.phpt b/ext/date/tests/date_default_timezone_get-1-win32.phpt
new file mode 100644
index 000000000..ed9ac1a47
--- /dev/null
+++ b/ext/date/tests/date_default_timezone_get-1-win32.phpt
@@ -0,0 +1,24 @@
+--TEST--
+date_default_timezone_get() function [1]
+--SKIPIF--
+<?php
+ if(substr(PHP_OS, 0, 3) != 'WIN') die("skip skip on non windows");
+?>
+--INI--
+date.timezone=
+--FILE--
+<?php
+ putenv('TZ=');
+ echo date_default_timezone_get(), "\n";
+ echo date('e'), "\n";
+ /* The behaviour on windows is to select an arbitrary timezone name from the current system settings.
+ This gives no chance to hardcode the timezone name, for instance for UTC+1 it could choose
+ from the multiple names like Europe/Berlin or Europe/Paris . For this reason the test is
+ parametrized so there is no hardcoded timezone data.*/
+?>
+--EXPECTF--
+Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone '%s' for now, but please set date.timezone to select your timezone. in %s on line %d
+%s
+
+Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone '%s' for now, but please set date.timezone to select your timezone. in %s on line %d
+%s
diff --git a/ext/date/tests/date_default_timezone_get-1.phpt b/ext/date/tests/date_default_timezone_get-1.phpt
index 5fa4192c1..4bff31a78 100644
--- a/ext/date/tests/date_default_timezone_get-1.phpt
+++ b/ext/date/tests/date_default_timezone_get-1.phpt
@@ -1,5 +1,9 @@
--TEST--
date_default_timezone_get() function [1]
+--SKIPIF--
+<?php
+ if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
+?>
--INI--
date.timezone=
--FILE--
diff --git a/ext/date/tests/date_default_timezone_get-2.phpt b/ext/date/tests/date_default_timezone_get-2.phpt
index abf283575..f58938d35 100644
--- a/ext/date/tests/date_default_timezone_get-2.phpt
+++ b/ext/date/tests/date_default_timezone_get-2.phpt
@@ -1,5 +1,9 @@
--TEST--
date_default_timezone_get() function [2]
+--SKIPIF--
+<?php
+ if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
+?>
--INI--
date.timezone=
--FILE--
diff --git a/ext/dom/tests/DOMAttr_value_basic_001.phpt b/ext/dom/tests/DOMAttr_value_basic_001.phpt
index 40e00bcc4..51c4ac954 100755
--- a/ext/dom/tests/DOMAttr_value_basic_001.phpt
+++ b/ext/dom/tests/DOMAttr_value_basic_001.phpt
@@ -1,6 +1,6 @@
--TEST--
Read empty $value.
---CREDIT--
+--CREDITS--
Jason Bouffard <jbouffard1@yahoo.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
@@ -13,4 +13,4 @@ print $attr->value."\n";
===DONE===
--EXPECTF--
===DONE===
- \ No newline at end of file
+
diff --git a/ext/dom/tests/DOMAttr_value_basic_002.phpt b/ext/dom/tests/DOMAttr_value_basic_002.phpt
index cf71eebf3..384a9ca4a 100644
--- a/ext/dom/tests/DOMAttr_value_basic_002.phpt
+++ b/ext/dom/tests/DOMAttr_value_basic_002.phpt
@@ -1,6 +1,6 @@
--TEST--
Write non-string $value property
---CREDIT--
+--CREDITS--
Eric Berg <ehberg@gmail.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
@@ -12,4 +12,4 @@ $attr->value = 1;
print $attr->value;
?>
--EXPECTF--
-1 \ No newline at end of file
+1
diff --git a/ext/dom/tests/DOMCharacterData_data_error_002.phpt b/ext/dom/tests/DOMCharacterData_data_error_002.phpt
index 9dae096e6..401e0f2f8 100755
--- a/ext/dom/tests/DOMCharacterData_data_error_002.phpt
+++ b/ext/dom/tests/DOMCharacterData_data_error_002.phpt
@@ -1,6 +1,6 @@
--TEST--
Invalid State Error when getting data on DOMCharacterData out of content.
---CREDIT--
+--CREDITS--
Eric Berg <ehberg@gmail.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
@@ -11,4 +11,4 @@ $character_data = new DOMCharacterData();
print $character_data->data;
?>
--EXPECTF--
-Warning: main(): Invalid State Error in %s on line %d \ No newline at end of file
+Warning: main(): Invalid State Error in %s on line %d
diff --git a/ext/dom/tests/DOMCharacterData_length_error_001.phpt b/ext/dom/tests/DOMCharacterData_length_error_001.phpt
index 0dda492ad..e8bf16ab9 100755
--- a/ext/dom/tests/DOMCharacterData_length_error_001.phpt
+++ b/ext/dom/tests/DOMCharacterData_length_error_001.phpt
@@ -1,6 +1,6 @@
--TEST--
Invalid State Error when getting length on DOMCharacterData out of content.
---CREDIT--
+--CREDITS--
Jason Bouffard <jbouffard1@yahoo.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
@@ -14,4 +14,4 @@ print $character_data->length;
--EXPECTF--
Warning: main(): Invalid State Error in %s
===DONE===
- \ No newline at end of file
+
diff --git a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
index 403e01aa7..d0cea29c7 100644
--- a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
+++ b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
@@ -12,7 +12,7 @@ require_once('skipif.inc');
require_once('dom_test.inc');
-chdir(__DIR__ . "/../examples");
+chdir(__DIR__);
$XMLStringGood = file_get_contents('note.xml');
$dom = new DOMDocument;
diff --git a/ext/dom/tests/dom007.phpt b/ext/dom/tests/dom007.phpt
index 649d63033..5d12aa344 100644
--- a/ext/dom/tests/dom007.phpt
+++ b/ext/dom/tests/dom007.phpt
@@ -63,12 +63,24 @@ echo "\n";
$ents = $dtd->entities;
$length = $ents->length;
echo "Length: ".$length."\n";
+
+$xkeys = array();
foreach ($ents AS $key=>$node) {
- echo "Key: $key Name: ".$node->nodeName."\n";
+ $xkeys[] = "Key: $key Name: ".$node->nodeName."\n";
+}
+sort($xkeys); // fix inconsistent output ordering (bug #61810)
+foreach ($xkeys as $key => $node) {
+ echo $node;
}
echo "\n";
+
+$xkeys = array();
for($x=0; $x < $length; $x++) {
- echo "Index $x: ".$ents->item($x)->nodeName."\n";
+ $xkeys[] = "Index: ".$ents->item($x)->nodeName."\n";
+}
+sort($xkeys); // fix inconsistent output ordering (bug #61810)
+foreach ($xkeys as $key => $node) {
+ echo $node;
}
echo "\n";
@@ -87,13 +99,13 @@ Index 0: GIF (image/gif) (-)
NULL
Length: 3
-Key: test Name: test
-Key: rdf Name: rdf
Key: myimage Name: myimage
+Key: rdf Name: rdf
+Key: test Name: test
-Index 0: test
-Index 1: rdf
-Index 2: myimage
+Index: myimage
+Index: rdf
+Index: test
NULL
NULL
diff --git a/ext/dom/tests/note.dtd b/ext/dom/tests/note.dtd
new file mode 100644
index 000000000..c2d558eee
--- /dev/null
+++ b/ext/dom/tests/note.dtd
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!ELEMENT note (to,from,heading,body)>
+<!ELEMENT to (#PCDATA)>
+<!ELEMENT from (#PCDATA)>
+<!ELEMENT heading (#PCDATA)>
+<!ELEMENT body (#PCDATA)>
diff --git a/ext/dom/tests/note.xml b/ext/dom/tests/note.xml
new file mode 100644
index 000000000..49614a1b5
--- /dev/null
+++ b/ext/dom/tests/note.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE note SYSTEM "note.dtd">
+<note>
+<to>PHP User Group</to>
+<from>Shane</from>
+<heading>Reminder</heading>
+<body>Don't forget the meeting tonight!</body>
+</note>
diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch
index ad5293a68..baeac1dc1 100644
--- a/ext/fileinfo/libmagic.patch
+++ b/ext/fileinfo/libmagic.patch
@@ -1,6 +1,6 @@
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
---- libmagic.orig/apprentice.c 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/apprentice.c 2012-03-28 01:53:04.283305402 +0200
+--- libmagic.orig/apprentice.c 2012-04-22 19:30:43.182305355 +0800
++++ libmagic/apprentice.c 2012-04-22 19:28:57.346309536 +0800
@@ -29,6 +29,8 @@
* apprentice - make one pass through /etc/magic, learning its secrets.
*/
@@ -729,8 +729,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->str_flags = swap4(m->str_flags);
}
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
---- libmagic.orig/ascmagic.c 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/ascmagic.c 2012-03-28 01:53:04.287303117 +0200
+--- libmagic.orig/ascmagic.c 2012-04-22 19:30:43.182305355 +0800
++++ libmagic/ascmagic.c 2012-04-22 19:28:57.330309533 +0800
@@ -139,10 +139,8 @@
/* malloc size is a conservative overestimate; could be
improved, or at least realloced after conversion. */
@@ -754,10 +754,9 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
return rv;
}
-Only in libmagic.orig: asprintf.c
diff -u libmagic.orig/cdf.c libmagic/cdf.c
---- libmagic.orig/cdf.c 2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/cdf.c 2012-03-28 01:53:04.299331601 +0200
+--- libmagic.orig/cdf.c 2012-04-22 19:30:43.182305355 +0800
++++ libmagic/cdf.c 2012-04-22 19:28:57.370309531 +0800
@@ -43,7 +43,17 @@
#include <err.h>
#endif
@@ -776,6 +775,19 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
#include <string.h>
#include <time.h>
#include <ctype.h>
+@@ -296,10 +306,10 @@
+ if (info->i_fd == -1)
+ return -1;
+
+- if (lseek(info->i_fd, off, SEEK_SET) == (off_t)-1)
++ if (FINFO_LSEEK_FUNC(info->i_fd, off, SEEK_SET) == (off_t)-1)
+ return -1;
+
+- if (read(info->i_fd, buf, len) != (ssize_t)len)
++ if (FINFO_READ_FUNC(info->i_fd, buf, len) != (ssize_t)len)
+ return -1;
+
+ return (ssize_t)len;
@@ -1135,7 +1145,7 @@
cdf_directory_t *d;
char name[__arraycount(d->d_name)];
@@ -807,8 +819,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
(void)fprintf(stderr, "timestamp %s\n", buf);
} else {
diff -u libmagic.orig/cdf.h libmagic/cdf.h
---- libmagic.orig/cdf.h 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/cdf.h 2012-03-28 01:53:04.299331601 +0200
+--- libmagic.orig/cdf.h 2012-04-22 19:30:43.182305355 +0800
++++ libmagic/cdf.h 2012-04-22 19:28:57.370309531 +0800
@@ -35,7 +35,7 @@
#ifndef _H_CDF_
#define _H_CDF_
@@ -845,8 +857,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
void cdf_swap_header(cdf_header_t *);
void cdf_unpack_header(cdf_header_t *, char *);
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
---- libmagic.orig/cdf_time.c 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/cdf_time.c 2012-03-28 01:53:04.299331601 +0200
+--- libmagic.orig/cdf_time.c 2012-04-22 19:30:43.182305355 +0800
++++ libmagic/cdf_time.c 2012-04-22 19:28:57.326309537 +0800
@@ -96,7 +96,7 @@
}
@@ -904,8 +916,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
static const char *ref = "Sat Apr 23 01:30:00 1977";
char *p, *q;
diff -u libmagic.orig/compress.c libmagic/compress.c
---- libmagic.orig/compress.c 2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/compress.c 2012-03-28 01:53:04.299331601 +0200
+--- libmagic.orig/compress.c 2012-04-22 19:30:43.182305355 +0800
++++ libmagic/compress.c 2012-04-22 19:28:57.314309548 +0800
@@ -32,6 +32,7 @@
* uncompress(method, old, n, newch) - uncompress old into new,
* using method, return sizeof new
@@ -990,7 +1002,23 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
for (cnt = 0;; cnt++) {
fd_set check;
struct timeval tout = {0, 100 * 1000};
-@@ -301,7 +307,8 @@
+@@ -218,7 +224,7 @@
+
+ nocheck:
+ do
+- switch ((rv = read(fd, buf, n))) {
++ switch ((rv = FINFO_READ_FUNC(fd, buf, n))) {
+ case -1:
+ if (errno == EINTR)
+ continue;
+@@ -295,13 +301,14 @@
+ return -1;
+ }
+ (void)close(tfd);
+- if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
++ if (FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
+ file_badseek(ms);
+ return -1;
}
return fd;
}
@@ -1011,6 +1039,15 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
/* XXX: const castaway, via strchr */
z.next_in = (Bytef *)strchr((const char *)old + data_start,
+@@ -400,7 +405,7 @@
+ (void) close(0);
+ if (fd != -1) {
+ (void) dup(fd);
+- (void) lseek(0, (off_t)0, SEEK_SET);
++ (void) FINFO_LSEEK_FUNC(0, (off_t)0, SEEK_SET);
+ } else {
+ (void) dup(fdin[0]);
+ (void) close(fdin[0]);
@@ -465,20 +470,14 @@
fdin[1] = -1;
}
@@ -1041,11 +1078,9 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
}
-#endif
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
-Only in libmagic: config.h
-Only in libmagic.orig: file.c
diff -u libmagic.orig/file.h libmagic/file.h
---- libmagic.orig/file.h 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/file.h 2012-03-28 01:53:04.304322598 +0200
+--- libmagic.orig/file.h 2012-04-22 19:30:43.186305188 +0800
++++ libmagic/file.h 2012-04-22 19:49:58.922256776 +0800
@@ -33,11 +33,9 @@
#ifndef __file_h__
#define __file_h__
@@ -1165,7 +1200,13 @@ diff -u libmagic.orig/file.h libmagic/file.h
protected void file_showstr(FILE *, const char *, size_t);
protected size_t file_mbswidth(const char *);
protected const char *file_getbuffer(struct magic_set *);
-@@ -443,11 +439,8 @@
+@@ -438,16 +434,14 @@
+ size_t *);
+ protected size_t file_pstring_length_size(const struct magic *);
+ protected size_t file_pstring_get_length(const struct magic *, const char *);
++protected size_t file_printedlen(const struct magic_set *ms);
+ #ifdef __EMX__
+ protected int file_os2_apptype(struct magic_set *, const char *, const void *,
size_t);
#endif /* __EMX__ */
@@ -1177,7 +1218,7 @@ diff -u libmagic.orig/file.h libmagic/file.h
#ifndef HAVE_STRERROR
extern int sys_nerr;
-@@ -460,17 +453,10 @@
+@@ -460,17 +454,10 @@
#define strtoul(a, b, c) strtol(a, b, c)
#endif
@@ -1197,10 +1238,22 @@ diff -u libmagic.orig/file.h libmagic/file.h
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_GETLINE
-Only in libmagic.orig: file_opts.h
+@@ -500,4 +487,12 @@
+ #define FILE_RCSID(id)
+ #endif
+
++#ifdef PHP_WIN32
++#define FINFO_LSEEK_FUNC _lseek
++#define FINFO_READ_FUNC _read
++#else
++#define FINFO_LSEEK_FUNC lseek
++#define FINFO_READ_FUNC read
++#endif
++
+ #endif /* __file_h__ */
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
---- libmagic.orig/fsmagic.c 2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/fsmagic.c 2012-03-28 01:53:04.304322598 +0200
+--- libmagic.orig/fsmagic.c 2012-04-22 19:30:43.186305188 +0800
++++ libmagic/fsmagic.c 2012-04-22 19:28:57.298309521 +0800
@@ -59,27 +59,21 @@
# define minor(dev) ((dev) & 0xff)
#endif
@@ -1411,10 +1464,10 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
-#else
- if (file_printf(ms, "block special") == -1)
- return -1;
--#endif
+ #endif
- }
- return 1;
- #endif
+-#endif
- /* TODO add code to handle V7 MUX and Blit MUX files */
+
#ifdef S_IFIFO
@@ -1524,8 +1577,8 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
/*
diff -u libmagic.orig/funcs.c libmagic/funcs.c
---- libmagic.orig/funcs.c 2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/funcs.c 2012-03-28 11:49:56.089607390 +0200
+--- libmagic.orig/funcs.c 2012-04-22 19:30:43.186305188 +0800
++++ libmagic/funcs.c 2012-04-22 19:28:57.370309531 +0800
@@ -41,52 +41,42 @@
#if defined(HAVE_WCTYPE_H)
#include <wctype.h>
@@ -1763,7 +1816,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
+ pcre_cache_entry *pce;
+ char *res;
+ zval *repl;
-+ int res_len, rep_cnt;
++ int res_len, rep_cnt = 0;
+ TSRMLS_FETCH();
+
+ MAKE_STD_ZVAL(patt);
@@ -1819,12 +1872,11 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
+ return rep_cnt;
}
+
-Only in libmagic.orig: getline.c
-Only in libmagic.orig: getopt_long.c
-Only in libmagic: LICENSE
+Only in libmagic.orig: funcs.c.orig
+Only in libmagic.orig: funcs.c.rej
diff -u libmagic.orig/magic.c libmagic/magic.c
---- libmagic.orig/magic.c 2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/magic.c 2012-03-28 11:42:50.404750579 +0200
+--- libmagic.orig/magic.c 2012-04-22 19:30:43.186305188 +0800
++++ libmagic/magic.c 2012-04-22 19:28:57.370309531 +0800
@@ -25,11 +25,6 @@
* SUCH DAMAGE.
*/
@@ -2201,8 +2253,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
public const char *
magic_error(struct magic_set *ms)
diff -u libmagic.orig/magic.h libmagic/magic.h
---- libmagic.orig/magic.h 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/magic.h 2012-03-28 01:53:04.304322598 +0200
+--- libmagic.orig/magic.h 2012-04-22 19:30:43.190305058 +0800
++++ libmagic/magic.h 2012-04-22 19:28:57.326309537 +0800
@@ -85,6 +85,7 @@
const char *magic_getpath(const char *, int);
@@ -2219,14 +2271,9 @@ diff -u libmagic.orig/magic.h libmagic/magic.h
int magic_list(magic_t, const char *);
int magic_errno(magic_t);
-Only in libmagic.orig: Makefile.am
-Only in libmagic.orig: Makefile.in
-Only in libmagic.orig: mygetopt.h
-Only in libmagic: names.h
-Only in libmagic: patchlevel.h
diff -u libmagic.orig/print.c libmagic/print.c
---- libmagic.orig/print.c 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/print.c 2012-03-28 01:53:04.304322598 +0200
+--- libmagic.orig/print.c 2012-04-22 19:30:43.190305058 +0800
++++ libmagic/print.c 2012-04-22 19:28:57.326309537 +0800
@@ -29,6 +29,9 @@
* print.c - debugging printout routines
*/
@@ -2420,8 +2467,8 @@ diff -u libmagic.orig/print.c libmagic/print.c
protected const char *
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
---- libmagic.orig/readcdf.c 2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/readcdf.c 2012-03-28 01:53:04.304322598 +0200
+--- libmagic.orig/readcdf.c 2012-04-22 19:30:43.190305058 +0800
++++ libmagic/readcdf.c 2012-04-22 19:28:57.326309537 +0800
@@ -30,7 +30,11 @@
#endif
@@ -2468,8 +2515,8 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
if ((ec = strchr(c, '\n')) != NULL)
*ec = '\0';
diff -u libmagic.orig/readelf.c libmagic/readelf.c
---- libmagic.orig/readelf.c 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/readelf.c 2012-03-28 01:53:04.308322618 +0200
+--- libmagic.orig/readelf.c 2012-04-22 19:30:43.190305058 +0800
++++ libmagic/readelf.c 2012-04-22 19:28:57.378309534 +0800
@@ -49,7 +49,7 @@
off_t, int *, int);
private int doshn(struct magic_set *, int, int, int, off_t, int, size_t,
@@ -2479,6 +2526,34 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
int, size_t, int *);
#define ELF_ALIGN(a) ((((a) + align - 1) / align) * align)
+@@ -309,11 +309,11 @@
+ * Loop through all the program headers.
+ */
+ for ( ; num; num--) {
+- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
++ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
+ file_badseek(ms);
+ return -1;
+ }
+- if (read(fd, xph_addr, xph_sizeof) == -1) {
++ if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
+ file_badread(ms);
+ return -1;
+ }
+@@ -331,11 +331,11 @@
+ * This is a PT_NOTE section; loop through all the notes
+ * in the section.
+ */
+- if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
++ if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
+ file_badseek(ms);
+ return -1;
+ }
+- bufsize = read(fd, nbuf,
++ bufsize = FINFO_READ_FUNC(fd, nbuf,
+ ((xph_filesz < sizeof(nbuf)) ? xph_filesz : sizeof(nbuf)));
+ if (bufsize == -1) {
+ file_badread(ms);
@@ -357,7 +357,7 @@
#endif
@@ -2496,6 +2571,20 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
offset += xnh_sizeof;
+@@ -859,11 +858,11 @@
+ }
+
+ for ( ; num; num--) {
+- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
++ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
+ file_badseek(ms);
+ return -1;
+ }
+- if (read(fd, xsh_addr, xsh_sizeof) == -1) {
++ if (FINFO_READ_FUNC(fd, xsh_addr, xsh_sizeof) == -1) {
+ file_badread(ms);
+ return -1;
+ }
@@ -888,20 +887,16 @@
/* Things we can determine when we seek */
switch (xsh_type) {
@@ -2505,22 +2594,24 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
- " for note");
- return -1;
- }
+- if ((noff = lseek(fd, (off_t)xsh_offset, SEEK_SET)) ==
+ nbuf = emalloc((size_t)xsh_size);
- if ((noff = lseek(fd, (off_t)xsh_offset, SEEK_SET)) ==
++ if ((noff = FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET)) ==
(off_t)-1) {
file_badread(ms);
- free(nbuf);
+ efree(nbuf);
return -1;
}
- if (read(fd, nbuf, (size_t)xsh_size) !=
+- if (read(fd, nbuf, (size_t)xsh_size) !=
++ if (FINFO_READ_FUNC(fd, nbuf, (size_t)xsh_size) !=
(ssize_t)xsh_size) {
- free(nbuf);
+ efree(nbuf);
file_badread(ms);
return -1;
}
-@@ -916,7 +911,7 @@
+@@ -916,10 +911,10 @@
if (noff == 0)
break;
}
@@ -2528,10 +2619,61 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
+ efree(nbuf);
break;
case SHT_SUNW_cap:
- if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
+- if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
++ if (FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET) ==
+ (off_t)-1) {
+ file_badseek(ms);
+ return -1;
+@@ -932,7 +927,7 @@
+ MAX(sizeof cap32, sizeof cap64)];
+ if ((coff += xcap_sizeof) > (off_t)xsh_size)
+ break;
+- if (read(fd, cbuf, (size_t)xcap_sizeof) !=
++ if (FINFO_READ_FUNC(fd, cbuf, (size_t)xcap_sizeof) !=
+ (ssize_t)xcap_sizeof) {
+ file_badread(ms);
+ return -1;
+@@ -1051,12 +1046,12 @@
+ }
+
+ for ( ; num; num--) {
+- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
++ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
+ file_badseek(ms);
+ return -1;
+ }
+
+- if (read(fd, xph_addr, xph_sizeof) == -1) {
++ if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
+ file_badread(ms);
+ return -1;
+ }
+@@ -1095,11 +1090,11 @@
+ * This is a PT_NOTE section; loop through all the notes
+ * in the section.
+ */
+- if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
++ if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
+ file_badseek(ms);
+ return -1;
+ }
+- bufsize = read(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
++ bufsize = FINFO_READ_FUNC(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
+ xph_filesz : sizeof(nbuf)));
+ if (bufsize == -1) {
+ file_badread(ms);
+@@ -1161,7 +1156,7 @@
+ /*
+ * If we cannot seek, it must be a pipe, socket or fifo.
+ */
+- if((lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
++ if((FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
+ fd = file_pipe2file(ms, fd, buf, nbytes);
+
+ if (fstat(fd, &st) == -1) {
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
---- libmagic.orig/softmagic.c 2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/softmagic.c 2012-03-28 01:53:04.308322618 +0200
+--- libmagic.orig/softmagic.c 2012-04-22 19:30:43.194304945 +0800
++++ libmagic/softmagic.c 2012-04-22 19:28:57.286309597 +0800
@@ -41,6 +41,11 @@
#include <stdlib.h>
#include <time.h>
@@ -2999,6 +3141,3 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
default:
file_magerror(ms, "invalid type %d in magiccheck()", m->type);
return -1;
-Only in libmagic.orig: strlcat.c
-Only in libmagic.orig: strlcpy.c
-Only in libmagic.orig: vasprintf.c
diff --git a/ext/fileinfo/libmagic/file.h b/ext/fileinfo/libmagic/file.h
index e1269aee0..3879b4756 100644
--- a/ext/fileinfo/libmagic/file.h
+++ b/ext/fileinfo/libmagic/file.h
@@ -434,6 +434,7 @@ protected int file_looks_utf8(const unsigned char *, size_t, unichar *,
size_t *);
protected size_t file_pstring_length_size(const struct magic *);
protected size_t file_pstring_get_length(const struct magic *, const char *);
+protected size_t file_printedlen(const struct magic_set *ms);
#ifdef __EMX__
protected int file_os2_apptype(struct magic_set *, const char *, const void *,
size_t);
diff --git a/ext/fileinfo/libmagic/funcs.c b/ext/fileinfo/libmagic/funcs.c
index 0fc920120..2b379291e 100644
--- a/ext/fileinfo/libmagic/funcs.c
+++ b/ext/fileinfo/libmagic/funcs.c
@@ -438,7 +438,7 @@ file_replace(struct magic_set *ms, const char *pat, const char *rep)
pcre_cache_entry *pce;
char *res;
zval *repl;
- int res_len, rep_cnt;
+ int res_len, rep_cnt = 0;
TSRMLS_FETCH();
MAKE_STD_ZVAL(patt);
diff --git a/ext/filter/tests/bug52209.phpt b/ext/filter/tests/bug52209.phpt
index bf2ed6cf3..79db74945 100644
--- a/ext/filter/tests/bug52209.phpt
+++ b/ext/filter/tests/bug52209.phpt
@@ -1,7 +1,13 @@
--TEST--
Bug #52209 (INPUT_ENV returns NULL for set variables (CLI))
--SKIPIF--
-<?php if (!extension_loaded("filter") || !empty($_ENV['PWD'])) die("skip"); ?>
+<?php
+/* This test makes no sense on windows as an empty variable
+ would never show up in the "set" list. Which means, it's
+ always undefined in PHP. */
+if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows");
+if (!extension_loaded("filter") || !empty($_ENV['PWD'])) die("skip");
+?>
--INI--
variables_order=GPCSE
--FILE--
diff --git a/ext/gd/tests/bug48555.phpt b/ext/gd/tests/bug48555.phpt
index f2030fece..d378aafd8 100644
--- a/ext/gd/tests/bug48555.phpt
+++ b/ext/gd/tests/bug48555.phpt
@@ -10,10 +10,22 @@ Bug #48555 (ImageFTBBox() differs from previous versions for texts with new line
$cwd = dirname(__FILE__);
$font = "$cwd/Tuffy.ttf";
$box = ImageFTBBox(14, 0, $font, "Text without line-break");
-echo 'Top without line-break: ' . $box[7] . "\n";
+//echo 'Top without line-break: ' . $box[7] . "\n";
+$without_line_break = $box[7];
$box = ImageFTBBox(14, 0, $font, "Text with\nline-break\none more");
-echo 'Top with line-break: ' . $box[7] . "\n";
+//echo 'Top with line-break: ' . $box[7] . "\n";
+$with_line_break = $box[7];
+
+var_dump($without_line_break);
+var_dump($with_line_break);
+if ($with_line_break==$without_line_break) {
+ echo "with line break == without line break".PHP_EOL;
+} else {
+ echo "with line break != without line break".PHP_EOL;
+}
+
?>
--EXPECTF--
-Top without line-break: -14
-Top with line-break: -14
+int(-%d)
+int(-%d)
+with line break == without line break
diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c
index 6faaa564d..1846b7416 100644
--- a/ext/interbase/ibase_service.c
+++ b/ext/interbase/ibase_service.c
@@ -322,8 +322,8 @@ query_loop:
}
result += 2;
*(result+line_len) = 0;
- snprintf(heap_p, heap_buf_size - (heap_buf - heap_p), "%s\n", result);
- heap_p += line_len +2;
+ snprintf(heap_p, heap_buf_size - (heap_p - heap_buf), "%s\n", result);
+ heap_p += line_len +1;
goto query_loop; /* repeat until result is exhausted */
case isc_info_svc_server_version:
diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c
index cbdde855d..6f3a3a12b 100755
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
@@ -83,11 +83,10 @@ PHP_FUNCTION( numfmt_parse )
break;
case FORMAT_TYPE_INT64:
val64 = unum_parseInt64(FORMATTER_OBJECT(nfo), sstr, sstr_len, position_p, &INTL_DATA_ERROR_CODE(nfo));
- if(val64 > LONG_MAX || val64 < -LONG_MAX) {
+ if(val64 > LONG_MAX || val64 < LONG_MIN) {
RETVAL_DOUBLE(val64);
} else {
- val32 = (int32_t)val64;
- RETVAL_LONG(val32);
+ RETVAL_LONG((long)val64);
}
break;
case FORMAT_TYPE_DOUBLE:
diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c
index b31db9d6f..84f14de1b 100755
--- a/ext/intl/msgformat/msgformat.c
+++ b/ext/intl/msgformat/msgformat.c
@@ -68,6 +68,10 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
INTL_CTOR_CHECK_STATUS(mfo, "msgfmt_create: error converting pattern to quote-friendly format");
}
+ if ((mfo)->mf_data.orig_format) {
+ msgformat_data_free(&mfo->mf_data TSRMLS_CC);
+ }
+
(mfo)->mf_data.orig_format = estrndup(pattern, pattern_len);
(mfo)->mf_data.orig_format_len = pattern_len;
diff --git a/ext/intl/tests/bug59597_32.phpt b/ext/intl/tests/bug59597_32.phpt
new file mode 100644
index 000000000..928a235a8
--- /dev/null
+++ b/ext/intl/tests/bug59597_32.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
+--FILE--
+<?php
+
+$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
+$value = $formatter->parse('2147483647', \NumberFormatter::TYPE_INT32);
+var_dump($value);
+
+$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
+$value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
+var_dump($value);
+
+?>
+--EXPECT--
+int(2147483647)
+float(2147483650)
+
diff --git a/ext/intl/tests/bug59597_64.phpt b/ext/intl/tests/bug59597_64.phpt
new file mode 100644
index 000000000..4b96bf72e
--- /dev/null
+++ b/ext/intl/tests/bug59597_64.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+--FILE--
+<?php
+
+$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
+$value = $formatter->parse('2147483647', \NumberFormatter::TYPE_INT32);
+var_dump($value);
+
+$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
+$value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
+var_dump($value);
+
+?>
+--EXPECTREGEX--
+int(2147483647)
+int(2147483650)
+
diff --git a/ext/json/json.c b/ext/json/json.c
index fc1fcb7f1..557fbc3e0 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -513,6 +513,19 @@ static void json_encode_serializable_object(smart_str *buf, zval *val, int optio
{
zend_class_entry *ce = Z_OBJCE_P(val);
zval *retval = NULL, fname;
+ HashTable* myht;
+
+ if (Z_TYPE_P(val) == IS_ARRAY) {
+ myht = HASH_OF(val);
+ } else {
+ myht = Z_OBJPROP_P(val);
+ }
+
+ if (myht && myht->nApplyCount > 1) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
+ smart_str_appendl(buf, "null", 4);
+ return;
+ }
ZVAL_STRING(&fname, "jsonSerialize", 0);
diff --git a/ext/json/tests/bug61978.phpt b/ext/json/tests/bug61978.phpt
new file mode 100644
index 000000000..2c732979e
--- /dev/null
+++ b/ext/json/tests/bug61978.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #61978 (Object recursion not detected for classes that implement JsonSerializable)
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+
+class JsonTest1 {
+ public $test;
+ public $me;
+ public function __construct() {
+ $this->test = '123';
+ $this->me = $this;
+ }
+}
+
+class JsonTest2 implements JsonSerializable {
+ public $test;
+ public function __construct() {
+ $this->test = '123';
+ }
+ public function jsonSerialize() {
+ return array(
+ 'test' => $this->test,
+ 'me' => $this
+ );
+ }
+}
+
+
+$obj1 = new JsonTest1();
+var_dump(json_encode($obj1));
+
+echo "\n==\n";
+
+$obj2 = new JsonTest2();
+var_dump(json_encode($obj2));
+
+?>
+--EXPECTF--
+Warning: json_encode(): recursion detected in %s on line %d
+string(44) "{"test":"123","me":{"test":"123","me":null}}"
+
+==
+
+Warning: json_encode(): recursion detected in %s on line %d
+string(44) "{"test":"123","me":{"test":"123","me":null}}"
diff --git a/ext/ldap/tests/ldap_sasl_bind_basic.phpt b/ext/ldap/tests/ldap_sasl_bind_basic.phpt
index 6ed14a5b1..efa1f82c9 100644
--- a/ext/ldap/tests/ldap_sasl_bind_basic.phpt
+++ b/ext/ldap/tests/ldap_sasl_bind_basic.phpt
@@ -6,6 +6,13 @@ Patrick Allaert <patrickallaert@php.net>
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php if (!function_exists("ldap_sasl_bind")) die("skip LDAP extension not compiled with SASL support"); ?>
+<?php
+ require "connect.inc";
+ $link = fsockopen($host, $port);
+ if (!$link) {
+ die("skip no server listening");
+ }
+?>
--FILE--
<?php
require "connect.inc";
diff --git a/ext/ldap/tests/ldap_set_rebind_proc_error.phpt b/ext/ldap/tests/ldap_set_rebind_proc_error.phpt
index 3b4cd69cf..966612f65 100644
--- a/ext/ldap/tests/ldap_set_rebind_proc_error.phpt
+++ b/ext/ldap/tests/ldap_set_rebind_proc_error.phpt
@@ -5,6 +5,16 @@ Patrick Allaert <patrickallaert@php.net>
# Belgian PHP Testfest 2009
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+<?php
+ if (!function_exists("ldap_set_rebind_proc")) {
+ die("skip ldap_set_rebind_proc() does not exist");
+ }
+ require "connect.inc";
+ $link = fsockopen($host, $port);
+ if (!$link) {
+ die("skip no server listening");
+ }
+?>
--FILE--
<?php
require "connect.inc";
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 9d6c25737..e42d845f9 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -874,7 +874,8 @@ static int php_libxml_post_deactivate()
}
if (LIBXML(stream_context)) {
- zval_ptr_dtor(&LIBXML(stream_context));
+ /* the steam_context resource will be released by resource list destructor */
+ efree(LIBXML(stream_context));
LIBXML(stream_context) = NULL;
}
smart_str_free(&LIBXML(error_buffer));
diff --git a/ext/libxml/tests/bug61367-read.phpt b/ext/libxml/tests/bug61367-read.phpt
index 722b8e704..3deecfc50 100644
--- a/ext/libxml/tests/bug61367-read.phpt
+++ b/ext/libxml/tests/bug61367-read.phpt
@@ -15,6 +15,7 @@ class StreamExploiter {
$doc->resolveExternals = true;
$doc->substituteEntities = true;
$dir = htmlspecialchars(dirname(getcwd()));
+ $dir = str_replace('\\', '/', $dir); // fix for windows
$doc->loadXML( <<<XML
<!DOCTYPE doc [
<!ENTITY file SYSTEM "file:///$dir/bad">
diff --git a/ext/mbstring/tests/bug52861.phpt b/ext/mbstring/tests/bug52861.phpt
index dedd6eb2d..dc1914d11 100644
--- a/ext/mbstring/tests/bug52861.phpt
+++ b/ext/mbstring/tests/bug52861.phpt
@@ -2,8 +2,8 @@
Bug #52681 (mb_send_mail() appends an extra MIME-Version header)
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) == "WIN") {
- die("skip Won't run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("neutral")) {
die("skip mb_send_mail() not available");
diff --git a/ext/mbstring/tests/mb_send_mail01.phpt b/ext/mbstring/tests/mb_send_mail01.phpt
index 45ca0e605..8ed9ea972 100644
--- a/ext/mbstring/tests/mb_send_mail01.phpt
+++ b/ext/mbstring/tests/mb_send_mail01.phpt
@@ -2,8 +2,8 @@
mb_send_mail() test 1 (lang=neutral)
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) == "WIN") {
- die("skip Won't run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("neutral")) {
die("skip mb_send_mail() not available");
diff --git a/ext/mbstring/tests/mb_send_mail02.phpt b/ext/mbstring/tests/mb_send_mail02.phpt
index 0eb1e368b..923f57148 100644
--- a/ext/mbstring/tests/mb_send_mail02.phpt
+++ b/ext/mbstring/tests/mb_send_mail02.phpt
@@ -2,8 +2,8 @@
mb_send_mail() test 2 (lang=Japanese)
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) == "WIN") {
- die("skip Won't run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("japanese")) {
die("skip mb_send_mail() not available");
diff --git a/ext/mbstring/tests/mb_send_mail03.phpt b/ext/mbstring/tests/mb_send_mail03.phpt
index ca66fee6d..1b1652945 100644
--- a/ext/mbstring/tests/mb_send_mail03.phpt
+++ b/ext/mbstring/tests/mb_send_mail03.phpt
@@ -2,8 +2,8 @@
mb_send_mail() test 3 (lang=English)
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) == "WIN") {
- die("skip Won't run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("english")) {
die("skip mb_send_mail() not available");
diff --git a/ext/mbstring/tests/mb_send_mail04.phpt b/ext/mbstring/tests/mb_send_mail04.phpt
index a4170ffbe..fbff4cd61 100644
--- a/ext/mbstring/tests/mb_send_mail04.phpt
+++ b/ext/mbstring/tests/mb_send_mail04.phpt
@@ -2,8 +2,8 @@
mb_send_mail() test 4 (lang=German)
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) == "WIN") {
- die("skip Won't run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("german")) {
die("skip mb_send_mail() not available");
diff --git a/ext/mbstring/tests/mb_send_mail05.phpt b/ext/mbstring/tests/mb_send_mail05.phpt
index 9870a0036..aa68ab8c8 100644
--- a/ext/mbstring/tests/mb_send_mail05.phpt
+++ b/ext/mbstring/tests/mb_send_mail05.phpt
@@ -2,8 +2,8 @@
mb_send_mail() test 5 (lang=Simplified Chinese)
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) == "WIN") {
- die("skip Won't run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("Simplified Chinese")) {
die("skip mb_send_mail() not available");
diff --git a/ext/mbstring/tests/mb_send_mail06.phpt b/ext/mbstring/tests/mb_send_mail06.phpt
index 9a9e5731b..df3f06513 100644
--- a/ext/mbstring/tests/mb_send_mail06.phpt
+++ b/ext/mbstring/tests/mb_send_mail06.phpt
@@ -2,8 +2,8 @@
mb_send_mail() test 6 (lang=Traditional Chinese)
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) == "WIN") {
- die("skip Won't run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("Traditional Chinese")) {
die("skip mb_send_mail() not available");
diff --git a/ext/mbstring/tests/mb_send_mail07.phpt b/ext/mbstring/tests/mb_send_mail07.phpt
index 192f89a9e..f62eccb8b 100644
--- a/ext/mbstring/tests/mb_send_mail07.phpt
+++ b/ext/mbstring/tests/mb_send_mail07.phpt
@@ -2,8 +2,8 @@
mb_send_mail() test 7 (lang=Korean)
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) == "WIN") {
- die("skip Won't run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("Korean")) {
die("skip mb_send_mail() not available");
diff --git a/ext/mysqli/tests/mysqli_options_openbasedir.phpt b/ext/mysqli/tests/mysqli_options_openbasedir.phpt
index 500baf378..4c13ec1ef 100644
--- a/ext/mysqli/tests/mysqli_options_openbasedir.phpt
+++ b/ext/mysqli/tests/mysqli_options_openbasedir.phpt
@@ -6,7 +6,6 @@ require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
---INI--
--FILE--
<?php
require_once('connect.inc');
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 61fdeac78..797cadd62 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -975,7 +975,7 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn_handle,
}
DBG_RETURN(ret);
}
-
+/* }}} */
/* {{{ mysqlnd_connect */
PHPAPI MYSQLND * mysqlnd_connect(MYSQLND * conn_handle,
diff --git a/ext/mysqlnd/mysqlnd_plugin.c b/ext/mysqlnd/mysqlnd_plugin.c
index b295ad720..2dbb57d1c 100644
--- a/ext/mysqlnd/mysqlnd_plugin.c
+++ b/ext/mysqlnd/mysqlnd_plugin.c
@@ -65,7 +65,7 @@ static struct st_mysqlnd_typeii_plugin_example mysqlnd_example_plugin =
};
-/* {{{ mysqlnd_plugin_subsystem_init */
+/* {{{ mysqlnd_example_plugin_end */
static
enum_func_status mysqlnd_example_plugin_end(void * p TSRMLS_DC)
{
@@ -78,7 +78,7 @@ enum_func_status mysqlnd_example_plugin_end(void * p TSRMLS_DC)
/* }}} */
-/* {{{ mysqlnd_plugin_subsystem_init */
+/* {{{ mysqlnd_example_plugin_register */
void
mysqlnd_example_plugin_register(TSRMLS_D)
{
@@ -104,7 +104,7 @@ mysqlnd_plugin_subsystem_init(TSRMLS_D)
/* }}} */
-/* {{{ mysqlnd_plugin_subsystem_init */
+/* {{{ mysqlnd_plugin_end_apply_func */
int
mysqlnd_plugin_end_apply_func(void *pDest TSRMLS_DC)
{
@@ -136,7 +136,7 @@ PHPAPI unsigned int mysqlnd_plugin_register()
/* }}} */
-/* {{{ mysqlnd_plugin_register */
+/* {{{ mysqlnd_plugin_register_ex */
PHPAPI unsigned int mysqlnd_plugin_register_ex(struct st_mysqlnd_plugin_header * plugin TSRMLS_DC)
{
if (plugin) {
@@ -169,7 +169,24 @@ PHPAPI void * _mysqlnd_plugin_find(const char * const name TSRMLS_DC)
/* {{{ _mysqlnd_plugin_apply_with_argument */
PHPAPI void _mysqlnd_plugin_apply_with_argument(apply_func_arg_t apply_func, void * argument TSRMLS_DC)
{
- zend_hash_apply_with_argument(&mysqlnd_registered_plugins, apply_func, argument TSRMLS_CC);
+ /* Note: We want to be thread-safe (read-only), so we can use neither
+ * zend_hash_apply_with_argument nor zend_hash_internal_pointer_reset and
+ * friends
+ */
+ Bucket *p;
+
+ p = mysqlnd_registered_plugins.pListHead;
+ while (p != NULL) {
+ int result = apply_func(p->pData, argument TSRMLS_CC);
+
+ if (result & ZEND_HASH_APPLY_REMOVE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "mysqlnd_plugin_apply_with_argument must not remove table entries");
+ }
+ p = p->pListNext;
+ if (result & ZEND_HASH_APPLY_STOP) {
+ break;
+ }
+ }
}
/* }}} */
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c
index f9ff43fe9..90e685654 100644
--- a/ext/mysqlnd/mysqlnd_ps.c
+++ b/ext/mysqlnd/mysqlnd_ps.c
@@ -1622,9 +1622,9 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const s, unsigned i
mysqlnd_stmt_separate_one_result_bind(s, param_no TSRMLS_CC);
/* Guaranteed is that stmt->result_bind is NULL */
if (!stmt->result_bind) {
- stmt->result_bind = mnd_ecalloc(stmt->field_count, sizeof(MYSQLND_RESULT_BIND));
+ stmt->result_bind = mnd_pecalloc(stmt->field_count, sizeof(MYSQLND_RESULT_BIND), stmt->persistent);
} else {
- stmt->result_bind = mnd_erealloc(stmt->result_bind, stmt->field_count * sizeof(MYSQLND_RESULT_BIND));
+ stmt->result_bind = mnd_perealloc(stmt->result_bind, stmt->field_count * sizeof(MYSQLND_RESULT_BIND), stmt->persistent);
}
if (!stmt->result_bind) {
DBG_RETURN(FAIL);
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c
index 1022285ad..20fcc5e7a 100644
--- a/ext/mysqlnd/php_mysqlnd.c
+++ b/ext/mysqlnd/php_mysqlnd.c
@@ -135,16 +135,22 @@ mysqlnd_minfo_dump_loaded_plugins(void *pDest, void * buf TSRMLS_DC)
/* }}} */
/* {{{ mysqlnd_minfo_dump_api_plugins */
-static int
-mysqlnd_minfo_dump_api_plugins(void * pDest, void * buf TSRMLS_DC)
+static void
+mysqlnd_minfo_dump_api_plugins(smart_str * buffer TSRMLS_DC)
{
- smart_str * buffer = (smart_str *) buf;
- MYSQLND_REVERSE_API * ext = *(MYSQLND_REVERSE_API **) pDest;
- if (buffer->len) {
- smart_str_appendc(buffer, ',');
+ HashTable *ht = mysqlnd_reverse_api_get_api_list(TSRMLS_C);
+ Bucket *p;
+
+ p = ht->pListHead;
+ while(p != NULL) {
+ MYSQLND_REVERSE_API * ext = *(MYSQLND_REVERSE_API **) p->pData;
+ if (buffer->len) {
+ smart_str_appendc(buffer, ',');
+ }
+ smart_str_appends(buffer, ext->module->name);
+
+ p = p->pListNext;
}
- smart_str_appends(buffer, ext->module->name);
- return ZEND_HASH_APPLY_KEEP;
}
/* }}} */
@@ -189,7 +195,7 @@ PHP_MINFO_FUNCTION(mysqlnd)
php_info_print_table_row(2, "Loaded plugins", tmp_str.c);
smart_str_free(&tmp_str);
- zend_hash_apply_with_argument(mysqlnd_reverse_api_get_api_list(TSRMLS_C), mysqlnd_minfo_dump_api_plugins, &tmp_str TSRMLS_CC);
+ mysqlnd_minfo_dump_api_plugins(&tmp_str TSRMLS_CC);
smart_str_0(&tmp_str);
php_info_print_table_row(2, "API Extensions", tmp_str.c);
smart_str_free(&tmp_str);
diff --git a/ext/oci8/tests/ini_1.phpt b/ext/oci8/tests/ini_1.phpt
new file mode 100644
index 000000000..4c23b72b4
--- /dev/null
+++ b/ext/oci8/tests/ini_1.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Test OCI8 php.ini settings
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+--INI--
+oci8.privileged_connect = On
+oci8.max_persistent = 111
+oci8.persistent_timeout = 222
+oci8.ping_interval = 333
+oci8.connection_class = MyCC
+oci8.events = On
+oci8.statement_cache_size = 444
+oci8.default_prefetch = 555
+oci8.old_oci_close_semantics = On
+--FILE--
+<?php
+
+echo "Test 1 - check initialization\n";
+echo 'oci8.privileged_connect = ' . ini_get('oci8.privileged_connect') . "\n";
+echo 'oci8.max_persistent = ' . ini_get('oci8.max_persistent') . "\n";
+echo 'oci8.persistent_timeout = ' . ini_get('oci8.persistent_timeout') . "\n";
+echo 'oci8.ping_interval = ' . ini_get('oci8.ping_interval') . "\n";
+echo 'oci8.connection_class = ' . ini_get('oci8.connection_class') . "\n";
+echo 'oci8.events = ' . ini_get('oci8.events') . "\n";
+echo 'oci8.statement_cache_size = ' . ini_get('oci8.statement_cache_size') . "\n";
+echo 'oci8.default_prefetch = ' . ini_get('oci8.default_prefetch') . "\n";
+echo 'oci8.old_oci_close_semantics = ' . ini_get('oci8.old_oci_close_semantics') . "\n";
+
+echo "Test 2 - check what can be changed at runtime\n";
+var_dump(ini_set('oci8.privileged_connect', 'Off'));
+echo 'oci8.privileged_connect = ' . ini_get('oci8.privileged_connect') . "\n";
+var_dump(ini_set('oci8.max_persistent', '999'));
+echo 'oci8.max_persistent = ' . ini_get('oci8.max_persistent') . "\n";
+var_dump(ini_set('oci8.persistent_timeout', '888'));
+echo 'oci8.persistent_timeout = ' . ini_get('oci8.persistent_timeout') . "\n";
+var_dump(ini_set('oci8.ping_interval', '777'));
+echo 'oci8.ping_interval = ' . ini_get('oci8.ping_interval') . "\n";
+var_dump(ini_set('oci8.connection_class', 'OtherCC'));
+echo 'oci8.connection_class = ' . ini_get('oci8.connection_class') . "\n";
+var_dump(ini_set('oci8.events', 'Off'));
+echo 'oci8.events = ' . ini_get('oci8.events') . "\n";
+var_dump(ini_set('oci8.statement_cache_size', '666'));
+echo 'oci8.statement_cache_size = ' . ini_get('oci8.statement_cache_size') . "\n";
+var_dump(ini_set('oci8.default_prefetch', '111'));
+echo 'oci8.default_prefetch = ' . ini_get('oci8.default_prefetch') . "\n";
+var_dump(ini_set('oci8.old_oci_close_semantics', 'Off'));
+echo 'oci8.old_oci_close_semantics = ' . ini_get('oci8.old_oci_close_semantics') . "\n";
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Test 1 - check initialization
+oci8.privileged_connect = 1
+oci8.max_persistent = 111
+oci8.persistent_timeout = 222
+oci8.ping_interval = 333
+oci8.connection_class = MyCC
+oci8.events = 1
+oci8.statement_cache_size = 444
+oci8.default_prefetch = 555
+oci8.old_oci_close_semantics = 1
+Test 2 - check what can be changed at runtime
+bool(false)
+oci8.privileged_connect = 1
+bool(false)
+oci8.max_persistent = 111
+bool(false)
+oci8.persistent_timeout = 222
+bool(false)
+oci8.ping_interval = 333
+string(4) "MyCC"
+oci8.connection_class = OtherCC
+bool(false)
+oci8.events = 1
+bool(false)
+oci8.statement_cache_size = 444
+bool(false)
+oci8.default_prefetch = 555
+bool(false)
+oci8.old_oci_close_semantics = 1
+===DONE===
diff --git a/ext/pdo/Makefile.frag b/ext/pdo/Makefile.frag
index 283a6e243..98f5c5f2a 100644
--- a/ext/pdo/Makefile.frag
+++ b/ext/pdo/Makefile.frag
@@ -4,6 +4,10 @@ PDO_HEADER_FILES= \
php_pdo.h \
php_pdo_driver.h
+
+$(srcdir)/pdo_sql_parser.c: $(srcdir)/pdo_sql_parser.re
+ (cd $(top_srcdir); $(RE2C) -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re)
+
install-pdo-headers:
@echo "Installing PDO headers: $(INSTALL_ROOT)$(phpincludedir)/ext/pdo/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
index ecef72181..5eaffa710 100644
--- a/ext/pdo/pdo_sql_parser.c
+++ b/ext/pdo/pdo_sql_parser.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Sat Jun 4 18:42:25 2011 */
+/* Generated by re2c 0.13.5 on Thu Apr 19 12:42:11 2012 */
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
@@ -33,12 +33,12 @@
#define YYCTYPE unsigned char
#define YYCURSOR cursor
-#define YYLIMIT cursor
+#define YYLIMIT s->end
#define YYMARKER s->ptr
-#define YYFILL(n)
+#define YYFILL(n) { RET(PDO_PARSER_EOI); }
typedef struct Scanner {
- char *ptr, *cur, *tok;
+ char *ptr, *cur, *tok, *end;
} Scanner;
static int scan(Scanner *s)
@@ -56,27 +56,33 @@ static int scan(Scanner *s)
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch (yych) {
- case 0x00: goto yy13;
- case '"': goto yy2;
- case '\'': goto yy4;
- case '-': goto yy10;
- case '/': goto yy8;
- case ':': goto yy5;
- case '?': goto yy6;
- default: goto yy11;
+ case 0x00: goto yy2;
+ case '"': goto yy3;
+ case '\'': goto yy5;
+ case '-': goto yy11;
+ case '/': goto yy9;
+ case ':': goto yy6;
+ case '?': goto yy7;
+ default: goto yy12;
}
yy2:
+ YYCURSOR = YYMARKER;
+ switch (yyaccept) {
+ case 0: goto yy4;
+ case 1: goto yy10;
+ }
+yy3:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych >= 0x01) goto yy43;
-yy3:
- { SKIP_ONE(PDO_PARSER_TEXT); }
+ if (yych >= 0x01) goto yy41;
yy4:
+ { SKIP_ONE(PDO_PARSER_TEXT); }
+yy5:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x00) goto yy3;
- goto yy37;
-yy5:
+ if (yych <= 0x00) goto yy4;
+ goto yy36;
+yy6:
yych = *++YYCURSOR;
switch (yych) {
case '0':
@@ -141,51 +147,48 @@ yy5:
case 'w':
case 'x':
case 'y':
- case 'z': goto yy33;
+ case 'z': goto yy32;
case ':':
- case '?': goto yy30;
- default: goto yy3;
+ case '?': goto yy29;
+ default: goto yy4;
}
-yy6:
+yy7:
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
case ':':
- case '?': goto yy30;
- default: goto yy7;
+ case '?': goto yy29;
+ default: goto yy8;
}
-yy7:
- { RET(PDO_PARSER_BIND_POS); }
yy8:
+ { RET(PDO_PARSER_BIND_POS); }
+yy9:
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
- case '*': goto yy20;
- default: goto yy12;
+ case '*': goto yy19;
+ default: goto yy13;
}
-yy9:
- { RET(PDO_PARSER_TEXT); }
yy10:
+ { RET(PDO_PARSER_TEXT); }
+yy11:
yych = *++YYCURSOR;
switch (yych) {
- case '-': goto yy15;
- default: goto yy12;
+ case '-': goto yy14;
+ default: goto yy13;
}
-yy11:
+yy12:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy12:
+yy13:
switch (yych) {
case 0x00:
case '"':
case '\'':
case ':':
- case '?': goto yy9;
- default: goto yy11;
+ case '?': goto yy10;
+ default: goto yy12;
}
-yy13:
- ++YYCURSOR;
- { RET(PDO_PARSER_EOI); }
-yy15:
+yy14:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
@@ -194,23 +197,23 @@ yy15:
case '"':
case '\'':
case ':':
- case '?': goto yy18;
+ case '?': goto yy17;
case '\n':
- case '\r': goto yy11;
- default: goto yy15;
+ case '\r': goto yy12;
+ default: goto yy14;
}
-yy17:
+yy16:
{ RET(PDO_PARSER_TEXT); }
-yy18:
+yy17:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
case '\n':
- case '\r': goto yy17;
- default: goto yy18;
+ case '\r': goto yy16;
+ default: goto yy17;
}
-yy20:
+yy19:
yyaccept = 1;
YYMARKER = ++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -220,19 +223,19 @@ yy20:
case '"':
case '\'':
case ':':
- case '?': goto yy22;
- case '*': goto yy24;
- default: goto yy20;
+ case '?': goto yy21;
+ case '*': goto yy23;
+ default: goto yy19;
}
-yy22:
+yy21:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
- case '*': goto yy27;
- default: goto yy22;
+ case '*': goto yy26;
+ default: goto yy21;
}
-yy24:
+yy23:
yyaccept = 1;
YYMARKER = ++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
@@ -242,45 +245,45 @@ yy24:
case '"':
case '\'':
case ':':
- case '?': goto yy22;
- case '*': goto yy24;
- case '/': goto yy26;
- default: goto yy20;
+ case '?': goto yy21;
+ case '*': goto yy23;
+ case '/': goto yy25;
+ default: goto yy19;
}
-yy26:
+yy25:
yych = *++YYCURSOR;
switch (yych) {
case 0x00:
case '"':
case '\'':
case ':':
- case '?': goto yy17;
- default: goto yy11;
+ case '?': goto yy16;
+ default: goto yy12;
}
-yy27:
+yy26:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
- case '*': goto yy27;
- case '/': goto yy29;
- default: goto yy22;
+ case '*': goto yy26;
+ case '/': goto yy28;
+ default: goto yy21;
}
-yy29:
+yy28:
yych = *++YYCURSOR;
- goto yy17;
-yy30:
+ goto yy16;
+yy29:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
case ':':
- case '?': goto yy30;
- default: goto yy32;
+ case '?': goto yy29;
+ default: goto yy31;
}
-yy32:
+yy31:
{ RET(PDO_PARSER_TEXT); }
-yy33:
+yy32:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
@@ -347,55 +350,49 @@ yy33:
case 'w':
case 'x':
case 'y':
- case 'z': goto yy33;
- default: goto yy35;
+ case 'z': goto yy32;
+ default: goto yy34;
}
-yy35:
+yy34:
{ RET(PDO_PARSER_BIND); }
-yy36:
+yy35:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy37:
+yy36:
switch (yych) {
- case 0x00: goto yy38;
- case '\'': goto yy40;
- case '\\': goto yy39;
- default: goto yy36;
- }
-yy38:
- YYCURSOR = YYMARKER;
- switch (yyaccept) {
- case 0: goto yy3;
- case 1: goto yy9;
+ case 0x00: goto yy2;
+ case '\'': goto yy38;
+ case '\\': goto yy37;
+ default: goto yy35;
}
-yy39:
+yy37:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yych <= 0x00) goto yy38;
- goto yy36;
-yy40:
+ if (yych <= 0x00) goto yy2;
+ goto yy35;
+yy38:
++YYCURSOR;
{ RET(PDO_PARSER_TEXT); }
-yy42:
+yy40:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy43:
+yy41:
switch (yych) {
- case 0x00: goto yy38;
- case '"': goto yy45;
- case '\\': goto yy44;
- default: goto yy42;
+ case 0x00: goto yy2;
+ case '"': goto yy43;
+ case '\\': goto yy42;
+ default: goto yy40;
}
-yy44:
+yy42:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yych <= 0x00) goto yy38;
- goto yy42;
-yy45:
+ if (yych <= 0x00) goto yy2;
+ goto yy40;
+yy43:
++YYCURSOR;
{ RET(PDO_PARSER_TEXT); }
}
@@ -428,6 +425,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
ptr = *outquery;
s.cur = inquery;
+ s.end = inquery + inquery_len + 1;
/* phase 1: look for args */
while((t = scan(&s)) != PDO_PARSER_EOI) {
@@ -547,7 +545,7 @@ safe:
param->param_type TSRMLS_CC)) {
/* bork */
ret = -1;
- strcpy(stmt->error_code, stmt->dbh->error_code);
+ strncpy(stmt->error_code, stmt->dbh->error_code, 6);
if (buf) {
efree(buf);
}
@@ -570,6 +568,9 @@ safe:
plc->freeq = 0;
break;
+ case IS_BOOL:
+ convert_to_long(param->parameter);
+
case IS_LONG:
case IS_DOUBLE:
convert_to_string(param->parameter);
@@ -578,8 +579,6 @@ safe:
plc->freeq = 0;
break;
- case IS_BOOL:
- convert_to_long(param->parameter);
default:
convert_to_string(param->parameter);
if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter),
@@ -587,7 +586,7 @@ safe:
param->param_type TSRMLS_CC)) {
/* bork */
ret = -1;
- strcpy(stmt->error_code, stmt->dbh->error_code);
+ strncpy(stmt->error_code, stmt->dbh->error_code, 6);
goto clean_up;
}
plc->freeq = 1;
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re
index 8becef9b6..88f94001f 100644
--- a/ext/pdo/pdo_sql_parser.re
+++ b/ext/pdo/pdo_sql_parser.re
@@ -32,12 +32,12 @@
#define YYCTYPE unsigned char
#define YYCURSOR cursor
-#define YYLIMIT cursor
+#define YYLIMIT s->end
#define YYMARKER s->ptr
-#define YYFILL(n)
+#define YYFILL(n) { RET(PDO_PARSER_EOI); }
typedef struct Scanner {
- char *ptr, *cur, *tok;
+ char *ptr, *cur, *tok, *end;
} Scanner;
static int scan(Scanner *s)
@@ -51,7 +51,6 @@ static int scan(Scanner *s)
COMMENTS = ("/*"([^*]+|[*]+[^/*])*[*]*"*/"|"--"[^\r\n]*);
SPECIALS = [:?"'];
MULTICHAR = [:?];
- EOF = [\000];
ANYNOEOF = [\001-\377];
*/
@@ -64,7 +63,6 @@ static int scan(Scanner *s)
SPECIALS { SKIP_ONE(PDO_PARSER_TEXT); }
COMMENTS { RET(PDO_PARSER_TEXT); }
(ANYNOEOF\SPECIALS)+ { RET(PDO_PARSER_TEXT); }
- EOF { RET(PDO_PARSER_EOI); }
*/
}
@@ -94,6 +92,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
ptr = *outquery;
s.cur = inquery;
+ s.end = inquery + inquery_len + 1;
/* phase 1: look for args */
while((t = scan(&s)) != PDO_PARSER_EOI) {
diff --git a/ext/pdo_mysql/tests/bug_61411.phpt b/ext/pdo_mysql/tests/bug_61411.phpt
new file mode 100644
index 000000000..794d30787
--- /dev/null
+++ b/ext/pdo_mysql/tests/bug_61411.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Bug #61411 (PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+MySQLPDOTest::skip();
+$db = MySQLPDOTest::factory();
+
+$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
+$matches = array();
+if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
+
+$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+if ($version < 40106)
+ die(sprintf("skip Need MySQL Server 4.1.6+, found %d.%02d.%02d (%d)\n",
+ $matches[0], $matches[1], $matches[2], $version));
+?>
+--FILE--
+<?php
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+
+$attr = getenv('PDOTEST_ATTR');
+if (!$attr) {
+ $attr = array();
+} else {
+ $attr = unserialize($attr);
+}
+$attr[PDO::ATTR_PERSISTENT] = true;
+$attr[PDO::ATTR_EMULATE_PREPARES] = false;
+putenv('PDOTEST_ATTR='.serialize($attr));
+
+$db = MySQLPDOTest::factory();
+
+$stmt = $db->prepare("SELECT 1");
+$stmt->execute();
+
+foreach ($stmt as $line) {
+ var_dump($line);
+}
+
+print "done!";
+?>
+--EXPECTF--
+array(2) {
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+}
+done!
diff --git a/ext/pdo_mysql/tests/bug_61755.phpt b/ext/pdo_mysql/tests/bug_61755.phpt
new file mode 100644
index 000000000..1d2b96805
--- /dev/null
+++ b/ext/pdo_mysql/tests/bug_61755.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Bug #61755 (A parsing bug in the prepared statements can lead to access violations)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+echo "NULL-Byte before first placeholder:\n";
+$s = $db->prepare("SELECT \"a\0b\", ?");
+$s->bindValue(1,"c");
+$s->execute();
+$r = $s->fetch();
+echo "Length of item 0: ".strlen($r[0]).", Value of item 1: ".$r[1]."\n";
+
+echo "\nOpen comment:\n";
+try {
+ $s = $db->prepare("SELECT /*");
+ $s->execute();
+} catch (Exception $e) {
+ echo "Error code: ".$e->getCode()."\n";
+}
+
+echo "\ndone!\n";
+?>
+--EXPECTF--
+NULL-Byte before first placeholder:
+Length of item 0: 3, Value of item 1: c
+
+Open comment:
+Error code: 42000
+
+done!
diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4
index 271079685..bddb77a15 100644
--- a/ext/pgsql/config.m4
+++ b/ext/pgsql/config.m4
@@ -94,6 +94,7 @@ if test "$PHP_PGSQL" != "no"; then
AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibyte]))
AC_CHECK_LIB(pq, lo_create, AC_DEFINE(HAVE_PG_LO_CREATE,1,[PostgreSQL 8.1 or later]))
AC_CHECK_LIB(pq, lo_import_with_oid, AC_DEFINE(HAVE_PG_LO_IMPORT_WITH_OID,1,[PostgreSQL 8.4 or later]))
+ AC_CHECK_LIB(pq, PQescapeLiteral, AC_DEFINE(HAVE_PQESCAPELITERAL,1,[PostgreSQL 9.0 or later]))
LIBS=$old_LIBS
LDFLAGS=$old_LDFLAGS
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 5702fe203..ad6677960 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -422,6 +422,17 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_unescape_bytea, 0, 0, 1)
ZEND_END_ARG_INFO()
#endif
+#if HAVE_PQESCAPE
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_escape_literal, 0, 0, 0)
+ ZEND_ARG_INFO(0, connection)
+ ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_escape_identifier, 0, 0, 0)
+ ZEND_ARG_INFO(0, connection)
+ ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO()
+#endif
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_result_error, 0, 0, 1)
ZEND_ARG_INFO(0, result)
ZEND_END_ARG_INFO()
@@ -652,6 +663,8 @@ const zend_function_entry pgsql_functions[] = {
PHP_FE(pg_escape_string, arginfo_pg_escape_string)
PHP_FE(pg_escape_bytea, arginfo_pg_escape_bytea)
PHP_FE(pg_unescape_bytea, arginfo_pg_unescape_bytea)
+ PHP_FE(pg_escape_literal, arginfo_pg_escape_literal)
+ PHP_FE(pg_escape_identifier, arginfo_pg_escape_identifier)
#endif
#if HAVE_PQSETERRORVERBOSITY
PHP_FE(pg_set_error_verbosity, arginfo_pg_set_error_verbosity)
@@ -815,7 +828,7 @@ static void _php_pgsql_notice_handler(void *resource_id, const char *message)
TSRMLS_FETCH();
if (! PGG(ignore_notices)) {
notice = (php_pgsql_notice *)emalloc(sizeof(php_pgsql_notice));
- notice->message = _php_pgsql_trim_message(message, &notice->len);
+ notice->message = _php_pgsql_trim_message(message, (int *)&notice->len);
if (PGG(log_notices)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", notice->message);
}
@@ -934,6 +947,11 @@ PHP_MINIT_FUNCTION(pgsql)
le_result = zend_register_list_destructors_ex(_free_result, NULL, "pgsql result", module_number);
le_lofp = zend_register_list_destructors_ex(_free_ptr, NULL, "pgsql large object", module_number);
le_string = zend_register_list_destructors_ex(_free_ptr, NULL, "pgsql string", module_number);
+#if HAVE_PG_CONFIG_H
+ /* PG_VERSION - libpq version */
+ REGISTER_STRING_CONSTANT("PGSQL_LIBPQ_VERSION", PG_VERSION, CONST_CS | CONST_PERSISTENT);
+ REGISTER_STRING_CONSTANT("PGSQL_LIBPQ_VERSION_STR", PG_VERSION_STR, CONST_CS | CONST_PERSISTENT);
+#endif
/* For connection option */
REGISTER_LONG_CONSTANT("PGSQL_CONNECT_FORCE_NEW", PGSQL_CONNECT_FORCE_NEW, CONST_CS | CONST_PERSISTENT);
/* For pg_fetch_array() */
@@ -1048,6 +1066,7 @@ PHP_MINFO_FUNCTION(pgsql)
php_info_print_table_header(2, "PostgreSQL Support", "enabled");
#if HAVE_PG_CONFIG_H
php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION);
+ php_info_print_table_row(2, "PostgreSQL(libpq) ", PG_VERSION_STR);
#ifdef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT
php_info_print_table_row(2, "Multibyte character support", "enabled");
#else
@@ -4200,6 +4219,130 @@ PHP_FUNCTION(pg_unescape_bytea)
/* }}} */
#endif
+#ifdef HAVE_PQESCAPE
+#if !HAVE_PQESCAPELITERAL
+/* emulate libpq's PQescapeInternal() 9.0 or later */
+static char* php_pgsql_PQescapeInternal(PGconn *conn, const char *str, size_t len, int escape_literal) {
+ char *result, *rp;
+ const char *s;
+ size_t tmp_len;
+ int input_len = len;
+ char quote_char = escape_literal ? '\'' : '"';
+
+ if (!conn) {
+ return NULL;
+ }
+
+ /*
+ * NOTE: multibyte strings that could cointain slashes should be considered.
+ * (e.g. SJIS, BIG5) However, it cannot be done without valid PGconn and mbstring.
+ * Therefore, this function does not support such encodings currently.
+ * FIXME: add encoding check and skip multibyte char bytes if there is vaild PGconn.
+ */
+
+ /* allocate enough memory */
+ rp = result = (char *)emalloc(len*2 + 5); /* leading " E" needs extra 2 bytes + quote_chars on both end for 2 bytes + NULL */
+
+ if (escape_literal) {
+ /* check backslashes */
+ tmp_len = strspn(str, "\\");
+ if (tmp_len != len) {
+ /* add " E" for escaping slashes */
+ *rp++ = ' ';
+ *rp++ = 'E';
+ }
+ }
+ /* open quote */
+ *rp++ = quote_char;
+ for (s = str; s - str < input_len; ++s) {
+ if (*s == quote_char || (escape_literal && *s == '\\')) {
+ *rp++ = *s;
+ *rp++ = *s;
+ } else {
+ *rp++ = *s;
+ }
+ }
+ *rp++ = quote_char;
+ *rp = '\0';
+
+ return result;
+}
+#endif
+
+static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int escape_literal) {
+ char *from = NULL, *to = NULL, *tmp = NULL;
+ zval *pgsql_link = NULL;
+ PGconn *pgsql;
+ int to_len;
+ int from_len;
+ int id = -1;
+
+ switch (ZEND_NUM_ARGS()) {
+ case 1:
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &from, &from_len) == FAILURE) {
+ return;
+ }
+ pgsql_link = NULL;
+ id = PGG(default_link);
+ break;
+
+ default:
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pgsql_link, &from, &from_len) == FAILURE) {
+ return;
+ }
+ break;
+ }
+
+ if (pgsql_link == NULL && id == -1) {
+ RETURN_FALSE;
+ }
+
+ ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink);
+ if (pgsql == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot get default pgsql link");
+ RETURN_FALSE;
+ }
+#ifdef HAVE_PQESCAPELITERAL
+ if (escape_literal) {
+ tmp = PQescapeLiteral(pgsql, from, (size_t)from_len);
+ } else {
+ tmp = PQescapeIdentifier(pgsql, from, (size_t)from_len);
+ }
+ if (!tmp) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,"Failed to escape");
+ RETURN_FALSE;
+ }
+ to = estrdup(tmp);
+ PQfreemem(tmp);
+#else
+ to = php_pgsql_PQescapeInternal(pgsql, from, (size_t)from_len, escape_literal);
+ if (!to) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,"Failed to escape");
+ RETURN_FALSE;
+ }
+#endif
+
+ RETURN_STRING(to, 0);
+}
+
+/* {{{ proto string pg_escape_literal([resource connection,] string data)
+ Escape parameter as string literal (i.e. parameter) */
+PHP_FUNCTION(pg_escape_literal)
+{
+ php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
+}
+/* }}} */
+
+/* {{{ proto string pg_escape_identifier([resource connection,] string data)
+ Escape identifier (i.e. table name, field name) */
+PHP_FUNCTION(pg_escape_identifier)
+{
+ php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
+}
+/* }}} */
+#endif
+
+
/* {{{ proto string pg_result_error(resource result)
Get error message associated with result */
PHP_FUNCTION(pg_result_error)
@@ -4787,7 +4930,9 @@ PHP_FUNCTION(pg_get_notify)
#else
if (atof(PG_VERSION) >= 9.0) {
#endif
+#if HAVE_PQPARAMETERSTATUS
add_index_string(return_value, 2, pgsql_notify->extra, 1);
+#endif
}
}
if (result_type & PGSQL_ASSOC) {
@@ -4798,7 +4943,9 @@ PHP_FUNCTION(pg_get_notify)
#else
if (atof(PG_VERSION) >= 9.0) {
#endif
+#if HAVE_PQPARAMETERSTATUS
add_assoc_string(return_value, "payload", pgsql_notify->extra, 1);
+#endif
}
}
PQfreemem(pgsql_notify);
diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h
index b24745699..8b6abbf91 100644
--- a/ext/pgsql/php_pgsql.h
+++ b/ext/pgsql/php_pgsql.h
@@ -172,6 +172,8 @@ PHP_FUNCTION(pg_set_error_verbosity);
PHP_FUNCTION(pg_escape_string);
PHP_FUNCTION(pg_escape_bytea);
PHP_FUNCTION(pg_unescape_bytea);
+PHP_FUNCTION(pg_escape_literal);
+PHP_FUNCTION(pg_escape_identifier);
#endif
/* misc functions */
diff --git a/ext/pgsql/tests/08escape.phpt b/ext/pgsql/tests/08escape.phpt
index cf23b50e3..90b4ed8a9 100644
--- a/ext/pgsql/tests/08escape.phpt
+++ b/ext/pgsql/tests/08escape.phpt
@@ -11,8 +11,9 @@ define('FILE_NAME', dirname(__FILE__) . '/php.gif');
// pg_escape_string() test
$before = "ABC\\ABC\'";
$expect = "ABC\\\\ABC\\'";
+$expect2 = "ABC\\\\ABC\\\\''"; //the way escape string differs from PostgreSQL 9.0
$after = pg_escape_string($before);
-if ($expect === $after) {
+if ($expect === $after || $expect2 === $after) {
echo "pg_escape_string() is Ok\n";
}
else {
@@ -58,11 +59,37 @@ else {
echo "pg_escape_bytea() is broken\n";
}
+// pg_escape_literal/pg_escape_identifier
+$before = "ABC\\ABC\'";
+$expect = " E'ABC\\\\ABC\\\\'''";
+$after = pg_escape_literal($before);
+if ($expect === $after) {
+ echo "pg_escape_literal() is Ok\n";
+}
+else {
+ echo "pg_escape_literal() is NOT Ok\n";
+ var_dump($before);
+ var_dump($after);
+ var_dump($expect);
+}
+
+$before = "ABC\\ABC\'";
+$expect = "\"ABC\ABC\'\"";
+$after = pg_escape_identifier($before);
+if ($expect === $after) {
+ echo "pg_escape_identifier() is Ok\n";
+}
+else {
+ echo "pg_escape_identifier() is NOT Ok\n";
+ var_dump($before);
+ var_dump($after);
+ var_dump($expect);
+}
+
?>
--EXPECT--
-pg_escape_string() is NOT Ok
-string(9) "ABC\ABC\'"
-string(12) "ABC\\ABC\\''"
-string(10) "ABC\\ABC\'"
+pg_escape_string() is Ok
pg_escape_bytea() is Ok
pg_escape_bytea() actually works with database
+pg_escape_literal() is Ok
+pg_escape_identifier() is Ok \ No newline at end of file
diff --git a/ext/phar/tar.c b/ext/phar/tar.c
index 9d1e5bcb1..b914db129 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -337,6 +337,16 @@ bail:
last_was_longlink = 1;
/* support the ././@LongLink system for storing long filenames */
entry.filename_len = entry.uncompressed_filesize;
+
+ /* Check for overflow - bug 61065 */
+ if (entry.filename_len == UINT_MAX) {
+ if (error) {
+ spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (invalid entry size)", fname);
+ }
+ php_stream_close(fp);
+ phar_destroy_phar_data(myphar TSRMLS_CC);
+ return FAILURE;
+ }
entry.filename = pemalloc(entry.filename_len+1, myphar->is_persistent);
read = php_stream_read(fp, entry.filename, entry.filename_len);
diff --git a/ext/phar/tests/files/openssl.cnf b/ext/phar/tests/files/openssl.cnf
new file mode 100644
index 000000000..10e69076c
--- /dev/null
+++ b/ext/phar/tests/files/openssl.cnf
@@ -0,0 +1,43 @@
+[ req ]
+default_bits = 1024
+default_keyfile = privkey.pem
+distinguished_name = req_distinguished_name
+attributes = req_attributes
+x509_extensions = v3_ca # The extentions to add to the self signed cert
+string_mask = MASK:4294967295
+
+
+[ req_distinguished_name ]
+countryName = Country Name (2 letter code)
+countryName_default = AU
+countryName_min = 2
+countryName_max = 2
+stateOrProvinceName = State or Province Name (full name)
+stateOrProvinceName_default = Some-State
+localityName = Locality Name (eg, city)
+0.organizationName = Organization Name (eg, company)
+0.organizationName_default = Internet Widgits Pty Ltd
+organizationalUnitName = Organizational Unit Name (eg, section)
+commonName = Common Name (eg, YOUR name)
+commonName_max = 64
+emailAddress = Email Address
+emailAddress_max = 64
+
+[ req_attributes ]
+challengePassword = A challenge password
+challengePassword_min = 4
+challengePassword_max = 20
+unstructuredName = An optional company name
+
+[ v3_req ]
+basicConstraints = CA:FALSE
+keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+[ v3_ca ]
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid:always,issuer:always
+basicConstraints = CA:true
+
+[ usr_cert ]
+basicConstraints=CA:FALSE
+
diff --git a/ext/phar/tests/phar_buildfromdirectory2-win.phpt b/ext/phar/tests/phar_buildfromdirectory2-win.phpt
new file mode 100644
index 000000000..9dbcf965e
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromdirectory2-win.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Phar::buildFromDirectory() - non-directory passed as first parameter
+--SKIPIF--
+<?php
+ if (!extension_loaded("phar")) die("skip");
+ if (substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only test");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar');
+ $phar->buildFromDirectory(1);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromdirectory.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+%s(24) "UnexpectedValueException"
+RecursiveDirectoryIterator::__construct(1,1): The system cannot find the file specified. (code: 2)
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromdirectory2.phpt b/ext/phar/tests/phar_buildfromdirectory2.phpt
index 6c67f208a..639ff0bd4 100644
--- a/ext/phar/tests/phar_buildfromdirectory2.phpt
+++ b/ext/phar/tests/phar_buildfromdirectory2.phpt
@@ -1,7 +1,10 @@
--TEST--
Phar::buildFromDirectory() - non-directory passed as first parameter
--SKIPIF--
-<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php
+ if (!extension_loaded("phar")) die("skip");
+ if (substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
+?>
--INI--
phar.require_hash=0
phar.readonly=0
diff --git a/ext/phar/tests/phar_setsignaturealgo2.phpt b/ext/phar/tests/phar_setsignaturealgo2.phpt
index 66edb6122..9f548d080 100644
--- a/ext/phar/tests/phar_setsignaturealgo2.phpt
+++ b/ext/phar/tests/phar_setsignaturealgo2.phpt
@@ -34,9 +34,11 @@ var_dump($p->getSignature());
echo $e->getMessage();
}
try {
+$config = dirname(__FILE__) . '/files/openssl.cnf';
+$config_arg = array('config' => $config);
$private = openssl_get_privatekey(file_get_contents(dirname(__FILE__) . '/files/private.pem'));
$pkey = '';
-openssl_pkey_export($private, $pkey);
+openssl_pkey_export($private, $pkey, NULL, $config_arg);
$p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
var_dump($p->getSignature());
} catch (Exception $e) {
diff --git a/ext/phar/tests/tar/phar_commitwrite.phpt b/ext/phar/tests/tar/phar_commitwrite.phpt
index b926b9a08..262ea1d00 100644
--- a/ext/phar/tests/tar/phar_commitwrite.phpt
+++ b/ext/phar/tests/tar/phar_commitwrite.phpt
@@ -5,6 +5,9 @@ Phar::setStub()/stopBuffering() tar-based
--INI--
phar.require_hash=0
phar.readonly=0
+--ENV--
+TEMP=.
+TMP=.
--FILE--
<?php
$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.tar', 0, 'brandnewphar.phar');
@@ -41,4 +44,4 @@ include 'phar://brandnewphar.phar/startup.php';
__HALT_COMPILER(); ?>
"
bool(true)
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
index 422ca90e8..c16e7523f 100644
--- a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
+++ b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
@@ -32,9 +32,11 @@ var_dump($p->getSignature());
echo $e->getMessage();
}
try {
+$config = dirname(__FILE__) . '/../files/openssl.cnf';
+$config_arg = array('config' => $config);
$private = openssl_get_privatekey(file_get_contents(dirname(dirname(__FILE__)) . '/files/private.pem'));
$pkey = '';
-openssl_pkey_export($private, $pkey);
+openssl_pkey_export($private, $pkey, NULL, $config_arg);
$p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
var_dump($p->getSignature());
} catch (Exception $e) {
diff --git a/ext/phar/tests/zip/phar_commitwrite.phpt b/ext/phar/tests/zip/phar_commitwrite.phpt
index 84bccb9fa..4e18a6bd2 100644
--- a/ext/phar/tests/zip/phar_commitwrite.phpt
+++ b/ext/phar/tests/zip/phar_commitwrite.phpt
@@ -5,6 +5,9 @@ Phar::setStub()/stopBuffering() zip-based
--INI--
phar.require_hash=0
phar.readonly=0
+--ENV--
+TEMP=.
+TMP=.
--FILE--
<?php
$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.zip', 0, 'brandnewphar.phar');
@@ -41,4 +44,4 @@ include 'phar://brandnewphar.phar/startup.php';
__HALT_COMPILER(); ?>
"
bool(true)
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
index 372f7ddc8..7d3730c41 100644
--- a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
+++ b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
@@ -49,8 +49,10 @@ var_dump($p->getSignature());
echo $e->getMessage();
}
try {
-$keys=openssl_pkey_new();
-openssl_pkey_export($keys, $privkey);
+$config = dirname(__FILE__) . '/../files/openssl.cnf';
+$config_arg = array('config' => $config);
+$keys=openssl_pkey_new($config_arg);
+openssl_pkey_export($keys, $privkey, NULL, $config_arg);
$pubkey=openssl_pkey_get_details($keys);
$p->setSignatureAlgorithm(Phar::OPENSSL, $privkey);
diff --git a/ext/posix/tests/posix_setgid_error.phpt b/ext/posix/tests/posix_setgid_error.phpt
index 247435d94..83d727c58 100644
--- a/ext/posix/tests/posix_setgid_error.phpt
+++ b/ext/posix/tests/posix_setgid_error.phpt
@@ -1,6 +1,5 @@
--TEST--
Test function posix_setgid() by calling it more than or less than its expected arguments.
---CREDITS--
--SKIPIF--
<?php
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 1cf65cee1..406da9382 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1457,6 +1457,49 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
}
/* }}} */
+/* {{{ _reflection_param_get_default_param */
+static parameter_reference *_reflection_param_get_default_param(INTERNAL_FUNCTION_PARAMETERS)
+{
+ reflection_object *intern;
+ parameter_reference *param;
+
+ GET_REFLECTION_OBJECT_PTR(param);
+
+ if (param->fptr->type != ZEND_USER_FUNCTION)
+ {
+ zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot determine default value for internal functions");
+ return NULL;
+ }
+
+ if (param->offset < param->required) {
+ zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter is not optional");
+ return NULL;
+ }
+
+ return param;
+}
+/* }}} */
+
+/* {{{ _reflection_param_get_default_precv */
+static zend_op *_reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAMETERS, parameter_reference *param)
+{
+ zend_op *precv;
+
+ param = param ? param : _reflection_param_get_default_param(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ if (!param) {
+ return NULL;
+ }
+
+ precv = _get_recv_op((zend_op_array*)param->fptr, param->offset);
+ if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2_type == IS_UNUSED) {
+ zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Internal error");
+ return NULL;
+ }
+
+ return precv;
+}
+/* }}} */
+
/* {{{ Preventing __clone from being called */
ZEND_METHOD(reflection, __clone)
{
@@ -2535,27 +2578,14 @@ ZEND_METHOD(reflection_parameter, isDefaultValueAvailable)
Returns the default value of this parameter or throws an exception */
ZEND_METHOD(reflection_parameter, getDefaultValue)
{
- reflection_object *intern;
- parameter_reference *param;
- zend_op *precv;
+ parameter_reference *param = _reflection_param_get_default_param(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ zend_op *precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, param);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
- GET_REFLECTION_OBJECT_PTR(param);
- if (param->fptr->type != ZEND_USER_FUNCTION)
- {
- zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot determine default value for internal functions");
- return;
- }
- if (param->offset < param->required) {
- zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter is not optional");
- return;
- }
- precv = _get_recv_op((zend_op_array*)param->fptr, param->offset);
- if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2_type == IS_UNUSED) {
- zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Internal error");
+ if (!(param && precv)) {
return;
}
@@ -2568,6 +2598,42 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
}
/* }}} */
+/* {{{ proto public bool ReflectionParameter::isDefaultValueConstant()
+ Returns whether the default value of this parameter is constant */
+ZEND_METHOD(reflection_parameter, isDefaultValueConstant)
+{
+ zend_op *precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, NULL);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ if (precv && (Z_TYPE_P(precv->op2.zv) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
+ RETURN_TRUE;
+ }
+
+ RETURN_FALSE;
+}
+/* }}} */
+
+/* {{{ proto public mixed ReflectionParameter::getDefaultValueConstantName()
+ Returns the default value's constant name if default value is constant or false */
+ZEND_METHOD(reflection_parameter, getDefaultValueConstantName)
+{
+ zend_op *precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, NULL);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ if (precv && (Z_TYPE_P(precv->op2.zv) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
+ RETURN_STRING(Z_STRVAL_P(precv->op2.zv), 1);
+ }
+
+ RETURN_FALSE;
+}
+/* }}} */
+
/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name [, bool return]) throws ReflectionException
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
ZEND_METHOD(reflection_method, export)
@@ -5903,6 +5969,8 @@ static const zend_function_entry reflection_parameter_functions[] = {
ZEND_ME(reflection_parameter, isOptional, arginfo_reflection__void, 0)
ZEND_ME(reflection_parameter, isDefaultValueAvailable, arginfo_reflection__void, 0)
ZEND_ME(reflection_parameter, getDefaultValue, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_parameter, isDefaultValueConstant, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_parameter, getDefaultValueConstantName, arginfo_reflection__void, 0)
PHP_FE_END
};
diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt
new file mode 100644
index 000000000..cdd00d262
--- /dev/null
+++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic1.phpt
@@ -0,0 +1,52 @@
+--TEST--
+ReflectionParameter::isDefaultValueConstant() && getDefaultValueConstantName()
+--FILE--
+<?php
+
+define("CONST_TEST_1", "const1");
+
+function ReflectionParameterTest($test1=array(), $test2 = CONST_TEST_1) {
+ echo $test;
+}
+$reflect = new ReflectionFunction('ReflectionParameterTest');
+foreach($reflect->getParameters() as $param) {
+ if($param->getName() == 'test1') {
+ var_dump($param->isDefaultValueConstant());
+ }
+ if($param->getName() == 'test2') {
+ var_dump($param->isDefaultValueConstant());
+ }
+ if($param->isDefaultValueAvailable() && $param->isDefaultValueConstant()) {
+ var_dump($param->getDefaultValueConstantName());
+ }
+}
+
+class Foo2 {
+ const bar = 'Foo2::bar';
+}
+
+class Foo {
+ const bar = 'Foo::bar';
+
+ public function baz($param1 = self::bar, $param2=Foo2::bar, $param3=CONST_TEST_1) {
+ }
+}
+
+$method = new ReflectionMethod('Foo', 'baz');
+$params = $method->getParameters();
+
+foreach ($params as $param) {
+ if ($param->isDefaultValueConstant()) {
+ var_dump($param->getDefaultValueConstantName());
+ }
+}
+?>
+==DONE==
+--EXPECT--
+bool(false)
+bool(true)
+string(12) "CONST_TEST_1"
+string(9) "self::bar"
+string(9) "Foo2::bar"
+string(12) "CONST_TEST_1"
+==DONE==
diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt
new file mode 100644
index 000000000..1ee9e9373
--- /dev/null
+++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_basic2.phpt
@@ -0,0 +1,30 @@
+--TEST--
+ReflectionParameter::isDefaultValueConstant() && getDefaultValueConstantName() for namespace
+--FILE--
+<?php
+
+namespace ReflectionTestNamespace {
+ CONST TEST_CONST_1 = "Test Const 1";
+
+ class TestClass {
+ const TEST_CONST_2 = "Test Const 2 in class";
+ }
+}
+
+namespace {
+ function ReflectionParameterTest($test=ReflectionTestNamespace\TestClass::TEST_CONST_2, $test2 = ReflectionTestNamespace\CONST_TEST_1) {
+ echo $test;
+ }
+ $reflect = new ReflectionFunction('ReflectionParameterTest');
+ foreach($reflect->getParameters() as $param) {
+ if($param->isDefaultValueAvailable() && $param->isDefaultValueConstant()) {
+ echo $param->getDefaultValueConstantName() . "\n";
+ }
+ }
+ echo "==DONE==";
+}
+?>
+--EXPECT--
+ReflectionTestNamespace\TestClass::TEST_CONST_2
+ReflectionTestNamespace\CONST_TEST_1
+==DONE==
diff --git a/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt
new file mode 100644
index 000000000..984b06efe
--- /dev/null
+++ b/ext/reflection/tests/ReflectionParameter_DefaultValueConstant_error.phpt
@@ -0,0 +1,25 @@
+--TEST--
+ReflectionParameter::getDefaultValueConstant() should raise exception on non optional parameter
+--FILE--
+<?php
+
+define("CONST_TEST_1", "const1");
+
+function ReflectionParameterTest($test, $test2 = CONST_TEST_1) {
+ echo $test;
+}
+$reflect = new ReflectionFunction('ReflectionParameterTest');
+foreach($reflect->getParameters() as $param) {
+ try {
+ echo $param->getDefaultValueConstantName() . "\n";
+ }
+ catch(ReflectionException $e) {
+ echo $e->getMessage() . "\n";
+ }
+}
+?>
+==DONE==
+--EXPECT--
+Parameter is not optional
+CONST_TEST_1
+==DONE==
diff --git a/ext/reflection/tests/bug47254.phpt b/ext/reflection/tests/bug47254.phpt
index 4bcce1bb7..83593a4ff 100644
--- a/ext/reflection/tests/bug47254.phpt
+++ b/ext/reflection/tests/bug47254.phpt
@@ -23,7 +23,6 @@ $m = $R->getMethods();
print_r($m);
?>
---CLEAN--
--EXPECT--
Array
(
diff --git a/ext/session/tests/bug42596.phpt b/ext/session/tests/bug42596.phpt
index fd9a60292..3d11607b4 100644
--- a/ext/session/tests/bug42596.phpt
+++ b/ext/session/tests/bug42596.phpt
@@ -1,7 +1,10 @@
--TEST--
Bug #42596 (session.save_path MODE option will not set "write" bit for group or world)
--SKIPIF--
-<?php include('skipif.inc'); ?>
+<?php
+ if(substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
+ include('skipif.inc');
+?>
--INI--
session.use_cookies=0
session.cache_limiter=
diff --git a/ext/session/tests/bug61728.phpt b/ext/session/tests/bug61728.phpt
new file mode 100644
index 000000000..3f8dbeb58
--- /dev/null
+++ b/ext/session/tests/bug61728.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Bug #61728 (PHP crash when calling ob_start in request_shutdown phase)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+function output_html($ext) {
+ return strlen($ext);
+}
+
+function open ($save_path, $session_name) {
+ return true;
+}
+
+function close() {
+ return true;
+}
+
+function read ($id) {
+}
+
+function write ($id, $sess_data) {
+ ob_start("output_html");
+ echo "laruence";
+ ob_end_flush();
+ return true;
+}
+
+function destroy ($id) {
+}
+
+function gc ($maxlifetime) {
+ return true;
+}
+
+session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
+session_start();
+--EXPECTF--
+8
diff --git a/ext/session/tests/rfc1867_invalid_settings-win.phpt b/ext/session/tests/rfc1867_invalid_settings-win.phpt
new file mode 100644
index 000000000..ed854e889
--- /dev/null
+++ b/ext/session/tests/rfc1867_invalid_settings-win.phpt
@@ -0,0 +1,19 @@
+--TEST--
+session rfc1867 invalid settings
+--INI--
+session.upload_progress.freq=-1
+error_log=
+--SKIPIF--
+<?php
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) != "WIN")
+ die("skip windows only test");
+?>
+--FILE--
+<?php
+var_dump(ini_get("session.upload_progress.freq"));
+?>
+--EXPECTF--
+Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s
+string(2) "1%"
+PHP Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s
diff --git a/ext/session/tests/rfc1867_invalid_settings.phpt b/ext/session/tests/rfc1867_invalid_settings.phpt
index d954563b0..640c4d243 100644
--- a/ext/session/tests/rfc1867_invalid_settings.phpt
+++ b/ext/session/tests/rfc1867_invalid_settings.phpt
@@ -4,7 +4,11 @@ session rfc1867 invalid settings
session.upload_progress.freq=-1
error_log=
--SKIPIF--
-<?php include('skipif.inc'); ?>
+<?php
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) == "WIN")
+ die("skip Not for Windows");
+?>
--FILE--
<?php
var_dump(ini_get("session.upload_progress.freq"));
diff --git a/ext/session/tests/rfc1867_invalid_settings_2-win.phpt b/ext/session/tests/rfc1867_invalid_settings_2-win.phpt
new file mode 100644
index 000000000..f8e6b6d20
--- /dev/null
+++ b/ext/session/tests/rfc1867_invalid_settings_2-win.phpt
@@ -0,0 +1,19 @@
+--TEST--
+session rfc1867 invalid settings 2
+--INI--
+session.upload_progress.freq=200%
+error_log=
+--SKIPIF--
+<?php
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) != "WIN")
+ die("skip windows only test");
+?>
+--FILE--
+<?php
+var_dump(ini_get("session.upload_progress.freq"));
+?>
+--EXPECTF--
+Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
+string(2) "1%"
+PHP Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
diff --git a/ext/session/tests/rfc1867_invalid_settings_2.phpt b/ext/session/tests/rfc1867_invalid_settings_2.phpt
index 544510eef..c2a0c6ac4 100644
--- a/ext/session/tests/rfc1867_invalid_settings_2.phpt
+++ b/ext/session/tests/rfc1867_invalid_settings_2.phpt
@@ -4,7 +4,11 @@ session rfc1867 invalid settings 2
session.upload_progress.freq=200%
error_log=
--SKIPIF--
-<?php include('skipif.inc'); ?>
+<?php
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) == "WIN")
+ die("skip Not for Windows");
+?>
--FILE--
<?php
var_dump(ini_get("session.upload_progress.freq"));
diff --git a/ext/session/tests/session_set_save_handler_class_002.phpt b/ext/session/tests/session_set_save_handler_class_002.phpt
index 9d5f732b5..6fb831f69 100644
--- a/ext/session/tests/session_set_save_handler_class_002.phpt
+++ b/ext/session/tests/session_set_save_handler_class_002.phpt
@@ -23,7 +23,7 @@ class MySession2 extends SessionHandler {
public function open($path, $name) {
if (!$path) {
- $path = '/tmp';
+ $path = sys_get_temp_dir();
}
$this->path = $path . '/u_sess_' . $name;
return true;
diff --git a/ext/session/tests/session_set_save_handler_iface_001.phpt b/ext/session/tests/session_set_save_handler_iface_001.phpt
index c8199ffe3..39a4b9975 100644
--- a/ext/session/tests/session_set_save_handler_iface_001.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_001.phpt
@@ -23,7 +23,7 @@ class MySession2 implements SessionHandlerInterface {
public function open($path, $name) {
if (!$path) {
- $path = '/tmp';
+ $path = sys_get_temp_dir();
}
$this->path = $path . '/u_sess_' . $name;
return true;
diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt b/ext/session/tests/session_set_save_handler_iface_002.phpt
index 42e8fbe3f..40c9ac682 100644
--- a/ext/session/tests/session_set_save_handler_iface_002.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_002.phpt
@@ -32,7 +32,7 @@ class MySession2 implements MySessionHandlerInterface {
public function open($path, $name) {
if (!$path) {
- $path = '/tmp';
+ $path = sys_get_temp_dir();
}
$this->path = $path . '/u_sess_' . $name;
return true;
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index a15648808..69deccde7 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -336,7 +336,7 @@ int make_http_soap_request(zval *this_ptr,
n = 3;
ZVAL_STRING(&func, "gzencode", 0);
smart_str_append_const(&soap_headers_z,"Content-Encoding: gzip\r\n");
- ZVAL_LONG(params[2], 1);
+ ZVAL_LONG(params[2], 0x1f);
}
if (call_user_function(CG(function_table), (zval**)NULL, &func, &retval, n, params TSRMLS_CC) == SUCCESS &&
Z_TYPE(retval) == IS_STRING) {
diff --git a/ext/soap/tests/bugs/bug31422-win.phpt b/ext/soap/tests/bugs/bug31422-win.phpt
new file mode 100644
index 000000000..ba8df0726
--- /dev/null
+++ b/ext/soap/tests/bugs/bug31422-win.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #31422 (No Error-Logging on SoapServer-Side)
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip not valid for non windows');
+}
+require_once('skipif.inc');
+?>
+--INI--
+log_errors=1
+--FILE--
+<?php
+function Add($x,$y) {
+ fopen();
+ user_error("Hello", E_USER_ERROR);
+ return $x+$y;
+}
+
+$server = new SoapServer(null,array('uri'=>"http://testuri.org"));
+$server->addfunction("Add");
+
+$HTTP_RAW_POST_DATA = <<<EOF
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<SOAP-ENV:Envelope
+ SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:si="http://soapinterop.org/xsd">
+ <SOAP-ENV:Body>
+ <ns1:Add xmlns:ns1="http://testuri.org">
+ <x xsi:type="xsd:int">22</x>
+ <y xsi:type="xsd:int">33</y>
+ </ns1:Add>
+ </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+EOF;
+
+$server->handle($HTTP_RAW_POST_DATA);
+echo "ok\n";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
+PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422-win.php on line %d
+PHP Fatal error: Hello in %sbug31422-win.php on line %d
diff --git a/ext/soap/tests/bugs/bug31422.phpt b/ext/soap/tests/bugs/bug31422.phpt
index c4cf7e9f9..c8ddcfe09 100644
--- a/ext/soap/tests/bugs/bug31422.phpt
+++ b/ext/soap/tests/bugs/bug31422.phpt
@@ -1,7 +1,12 @@
--TEST--
Bug #31422 (No Error-Logging on SoapServer-Side)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip not valid for windows');
+}
+require_once('skipif.inc');
+?>
--INI--
log_errors=1
error_log=
diff --git a/ext/soap/tests/server019.phpt b/ext/soap/tests/server019.phpt
index defdac5b9..d36cff088 100644
--- a/ext/soap/tests/server019.phpt
+++ b/ext/soap/tests/server019.phpt
@@ -8,7 +8,7 @@ SOAP Server 19: compressed request (gzip)
?>
--INI--
precision=14
---POST--
+--GZIP_POST--
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
@@ -19,8 +19,6 @@ precision=14
<ns1:test xmlns:ns1="http://testuri.org" />
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---GZIP_POST--
-1
--FILE--
<?php
function test() {
diff --git a/ext/soap/tests/server020.phpt b/ext/soap/tests/server020.phpt
index 1bd58931e..b14978fd3 100644
--- a/ext/soap/tests/server020.phpt
+++ b/ext/soap/tests/server020.phpt
@@ -8,7 +8,7 @@ SOAP Server 20: compressed request (deflate)
?>
--INI--
precision=14
---POST--
+--DEFLATE_POST--
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
@@ -20,8 +20,6 @@ precision=14
<ns1:test xmlns:ns1="http://testuri.org" />
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---DEFLATE_POST--
-1
--FILE--
<?php
function test() {
diff --git a/ext/sockets/tests/socket_create_listen-win32.phpt b/ext/sockets/tests/socket_create_listen-win32.phpt
new file mode 100644
index 000000000..23bf963c5
--- /dev/null
+++ b/ext/sockets/tests/socket_create_listen-win32.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test if socket binds on 31338
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+ die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+<?php
+$sock = socket_create_listen(31338);
+socket_getsockname($sock, $addr, $port);
+var_dump($addr, $port);
+--EXPECT--
+string(9) "127.0.0.1"
+int(31338)
+--CREDITS--
+Till Klampaeckel, till@php.net
+PHP Testfest Berlin 2009-05-09
diff --git a/ext/sockets/tests/socket_create_listen.phpt b/ext/sockets/tests/socket_create_listen.phpt
index 440fade61..76f294258 100644
--- a/ext/sockets/tests/socket_create_listen.phpt
+++ b/ext/sockets/tests/socket_create_listen.phpt
@@ -2,6 +2,9 @@
Test if socket binds on 31338
--SKIPIF--
<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
new file mode 100644
index 000000000..de33d951f
--- /dev/null
+++ b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test parameter handling in socket_create_pair()
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+ die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+<?php
+var_dump(socket_create_pair(AF_INET, null, null));
+
+$domain = 'unknown';
+var_dump(socket_create_pair($domain, SOCK_STREAM, 0, $sockets));
+
+var_dump(socket_create_pair(AF_INET, null, null, $sockets));
+
+var_dump(socket_create_pair(31337, null, null, $sockets));
+
+var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets));
+--EXPECTF--
+Warning: socket_create_pair() expects exactly 4 parameters, 3 given in %s on line %d
+NULL
+
+Warning: socket_create_pair() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d
+NULL
+bool(true)
+
+Warning: socket_create_pair(): invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d
+bool(true)
+
+Warning: socket_create_pair(): invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d
+bool(true)
+--CREDITS--
+Till Klampaeckel, till@php.net
+Berlin TestFest 2009
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
index 99512bcc3..afca2b899 100644
--- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt
+++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
@@ -2,6 +2,9 @@
Test parameter handling in socket_create_pair()
--SKIPIF--
<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}
diff --git a/ext/sockets/tests/socket_listen-wrongparams.phpt b/ext/sockets/tests/socket_listen-wrongparams.phpt
index 7dd0d1592..b5e13548e 100644
--- a/ext/sockets/tests/socket_listen-wrongparams.phpt
+++ b/ext/sockets/tests/socket_listen-wrongparams.phpt
@@ -2,6 +2,9 @@
Test parameter handling in socket_listen().
--SKIPIF--
<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}
diff --git a/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt b/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
new file mode 100644
index 000000000..34d46d6f6
--- /dev/null
+++ b/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test parameter handling in socket_select().
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+ die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+<?php
+$sockets = array();
+$domain = AF_INET;
+socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
+
+$write = null;
+$except = null;
+$time = -1;
+var_dump(socket_select($sockets, $write, $except, $time));
+--EXPECTF--
+int(0)
+--CREDITS--
+Till Klampaeckel, till@php.net
+Berlin TestFest 2009
diff --git a/ext/sockets/tests/socket_select-wrongparams-1.phpt b/ext/sockets/tests/socket_select-wrongparams-1.phpt
index e786bc2a8..848088fe4 100644
--- a/ext/sockets/tests/socket_select-wrongparams-1.phpt
+++ b/ext/sockets/tests/socket_select-wrongparams-1.phpt
@@ -2,17 +2,16 @@
Test parameter handling in socket_select().
--SKIPIF--
<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}
--FILE--
<?php
$sockets = array();
-if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
- $domain = AF_INET;
-} else {
- $domain = AF_UNIX;
-}
+$domain = AF_UNIX;
socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
$write = null;
diff --git a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
index ab111898b..4cfdebbcb 100644
--- a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
+++ b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
@@ -2,6 +2,9 @@
Test if socket_recvfrom() receives data sent by socket_sendto() through a Unix domain socket
--SKIPIF--
<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}
diff --git a/ext/sockets/tests/unixloop.phpt b/ext/sockets/tests/unixloop.phpt
index 1b547c3b3..4a1944485 100644
--- a/ext/sockets/tests/unixloop.phpt
+++ b/ext/sockets/tests/unixloop.phpt
@@ -2,6 +2,9 @@
Unix domain socket Loopback test
--SKIPIF--
<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
diff --git a/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt b/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt
new file mode 100644
index 000000000..6289fac84
--- /dev/null
+++ b/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt
@@ -0,0 +1,37 @@
+--TEST--
+SQLite3::open error test
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+require_once(__DIR__ . '/skipif.inc');
+?>
+--FILE--
+<?php
+$sysroot = exec('echo %systemroot%');
+$icacls = "$sysroot\\System32\\icacls.exe";
+$user = get_current_user();
+$unreadable = __DIR__ . '/unreadable.db';
+
+touch($unreadable);
+$cmd = $icacls . ' ' . $unreadable . ' /inheritance:r /deny ' . $user . ':(F,M,R,RX,W)';
+exec($cmd);
+
+try {
+ $db = new SQLite3($unreadable);
+} catch (Exception $e) {
+ echo $e . "\n";
+}
+echo "Done\n";
+
+$cmd = $icacls . ' ' . $unreadable . ' /grant ' . $user . ':(F,M,R,RX,W)';
+exec($cmd);
+unlink($unreadable);
+?>
+--EXPECTF--
+exception 'Exception' with message 'Unable to open database: %s' in %ssqlite3_15_open_error-win.php:%d
+Stack trace:
+#0 %ssqlite3_15_open_error-win.php(%d): SQLite3->__construct('%s')
+#1 {main}
+Done
diff --git a/ext/sqlite3/tests/sqlite3_15_open_error.phpt b/ext/sqlite3/tests/sqlite3_15_open_error.phpt
index ea1ee4299..fc05b8780 100644
--- a/ext/sqlite3/tests/sqlite3_15_open_error.phpt
+++ b/ext/sqlite3/tests/sqlite3_15_open_error.phpt
@@ -2,6 +2,9 @@
SQLite3::open error test
--SKIPIF--
<?php
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip non windows test');
+}
require_once(__DIR__ . '/skipif.inc');
if (posix_geteuid() == 0) {
die('SKIP Cannot run test as root.');
diff --git a/ext/standard/array.c b/ext/standard/array.c
index d1f302994..94c5e7e6e 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1058,7 +1058,6 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive
char *string_key;
uint string_key_len;
ulong num_key;
- HashPosition pos;
/* Set up known arguments */
args[1] = &key;
@@ -1067,15 +1066,14 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive
Z_ADDREF_P(userdata);
}
- zend_hash_internal_pointer_reset_ex(target_hash, &pos);
-
BG(array_walk_fci).retval_ptr_ptr = &retval_ptr;
BG(array_walk_fci).param_count = userdata ? 3 : 2;
BG(array_walk_fci).params = args;
BG(array_walk_fci).no_separation = 0;
-
+
/* Iterate through hash */
- while (!EG(exception) && zend_hash_get_current_data_ex(target_hash, (void **)&args[0], &pos) == SUCCESS) {
+ zend_hash_internal_pointer_reset(target_hash);
+ while (!EG(exception) && zend_hash_get_current_data(target_hash, (void **)&args[0]) == SUCCESS) {
if (recursive && Z_TYPE_PP(args[0]) == IS_ARRAY) {
HashTable *thash;
zend_fcall_info orig_array_walk_fci;
@@ -1107,7 +1105,7 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive
MAKE_STD_ZVAL(key);
/* Set up the key */
- switch (zend_hash_get_current_key_ex(target_hash, &string_key, &string_key_len, &num_key, 0, &pos)) {
+ switch (zend_hash_get_current_key_ex(target_hash, &string_key, &string_key_len, &num_key, 0, NULL)) {
case HASH_KEY_IS_LONG:
Z_TYPE_P(key) = IS_LONG;
Z_LVAL_P(key) = num_key;
@@ -1135,7 +1133,7 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive
zval_ptr_dtor(&key);
key = NULL;
}
- zend_hash_move_forward_ex(target_hash, &pos);
+ zend_hash_move_forward(target_hash);
}
if (userdata) {
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index bfe1abd01..142ca9bdc 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -1208,7 +1208,12 @@ PHP_FUNCTION(realpath_cache_get)
MAKE_STD_ZVAL(entry);
array_init(entry);
- add_assoc_long(entry, "key", bucket->key);
+ /* bucket->key is unsigned long */
+ if (LONG_MAX >= bucket->key) {
+ add_assoc_long(entry, "key", bucket->key);
+ } else {
+ add_assoc_double(entry, "key", (double)bucket->key);
+ }
add_assoc_bool(entry, "is_dir", bucket->is_dir);
add_assoc_stringl(entry, "realpath", bucket->realpath, bucket->realpath_len, 1);
add_assoc_long(entry, "expires", bucket->expires);
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index bf01e74ba..43dc372bc 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -336,13 +336,13 @@ PHP_FUNCTION(iptcparse)
len = (((unsigned short) buffer[ inx ])<<8) | (unsigned short)buffer[ inx+1 ];
inx += 2;
}
-
- snprintf(key, sizeof(key), "%d#%03d", (unsigned int) dataset, (unsigned int) recnum);
-
- if ((len > str_len) || (inx + len) > str_len) {
+
+ if ((len < 0) || (len > str_len) || (inx + len) > str_len) {
break;
}
+ snprintf(key, sizeof(key), "%d#%03d", (unsigned int) dataset, (unsigned int) recnum);
+
if (tagsfound == 0) { /* found the 1st tag - initialize the return array */
array_init(return_value);
}
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 302fbdae4..65187f6fa 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -37,7 +37,7 @@ static inline int php_intlog10abs(double value) {
int result;
value = fabs(value);
- if (value < 1e-8 || value > 1e23) {
+ if (value < 1e-8 || value > 1e22) {
result = (int)floor(log10(value));
} else {
static const double values[] = {
@@ -46,7 +46,7 @@ static inline int php_intlog10abs(double value) {
1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22};
/* Do a binary search with 5 steps */
- result = 16;
+ result = 15;
if (value < values[result]) {
result -= 8;
} else {
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index faf0a2b29..65a5c00cc 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -758,16 +758,14 @@ PHP_FUNCTION(unpack)
case 'i':
case 'I': {
- long v = 0;
+ long v;
int issigned = 0;
if (type == 'i') {
issigned = input[inputpos + (machine_little_endian ? (sizeof(int) - 1) : 0)] & 0x80;
- } else if (sizeof(long) > 4 && (input[inputpos + machine_endian_long_map[3]] & 0x80) == 0x80) {
- v = ~INT_MAX;
}
- v |= php_unpack(&input[inputpos], sizeof(int), issigned, int_map);
+ v = php_unpack(&input[inputpos], sizeof(int), issigned, int_map);
add_assoc_long(return_value, n, v);
break;
}
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index a831dd1c1..b51aaa219 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -263,6 +263,20 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, ch
long fildes_ori;
int dtablesize;
+ if (strcmp(sapi_module.name, "cli")) {
+ if (options & REPORT_ERRORS) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Direct access to file descriptors is only available from command-line PHP");
+ }
+ return NULL;
+ }
+
+ if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include) ) {
+ if (options & REPORT_ERRORS) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL file-access is disabled in the server configuration");
+ }
+ return NULL;
+ }
+
start = &path[3];
fildes_ori = strtol(start, &end, 10);
if (end == start || *end != '\0') {
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 0aade7808..5c33232f7 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -266,6 +266,11 @@ PHP_FUNCTION(hex2bin)
return;
}
+ if (datalen % 2 != 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Hexadecimal input string must have an even length");
+ RETURN_FALSE;
+ }
+
result = php_hex2bin((unsigned char *)data, datalen, &newlen);
if (!result) {
diff --git a/ext/standard/tests/array/bug61730.phpt b/ext/standard/tests/array/bug61730.phpt
new file mode 100644
index 000000000..0fe9f2221
--- /dev/null
+++ b/ext/standard/tests/array/bug61730.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #61730 (Segfault from array_walk modifying an array passed by reference)
+--FILE--
+<?php
+$myArray = array_fill(0, 10, 1);
+
+array_walk(
+ $myArray,
+ function($value, $key) use ($myArray)
+ {
+ reset($myArray);
+ }
+);
+
+array_walk(
+ $myArray,
+ function($value, $key) use (&$myArray)
+ {
+ var_dump($key);
+ unset($myArray[$key]);
+ unset($myArray[$key+1]);
+ unset($myArray[$key+2]);
+ }
+);
+
+
+
+print_r($myArray);
+--EXPECT--
+int(0)
+int(4)
+int(8)
+Array
+(
+ [3] => 1
+ [7] => 1
+)
diff --git a/ext/standard/tests/file/bug61961.phpt b/ext/standard/tests/file/bug61961.phpt
new file mode 100644
index 000000000..ff0279a36
--- /dev/null
+++ b/ext/standard/tests/file/bug61961.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #61961 (file_get_content leaks when access empty file with max length)
+--FILE--
+<?php
+$tmp_empty_file = __FILE__ . ".tmp";
+file_put_contents($tmp_empty_file, "");
+
+var_dump(file_get_contents($tmp_empty_file, NULL, NULL, NULL, 10));
+unlink($tmp_empty_file);
+?>
+==DONE==
+--EXPECT--
+string(0) ""
+==DONE== \ No newline at end of file
diff --git a/ext/standard/tests/file/popen_pclose_error-win32.phpt b/ext/standard/tests/file/popen_pclose_error-win32.phpt
index 486f369c9..9f9593c64 100644
--- a/ext/standard/tests/file/popen_pclose_error-win32.phpt
+++ b/ext/standard/tests/file/popen_pclose_error-win32.phpt
@@ -17,7 +17,7 @@ if (PHP_DEBUG) die("skip Not Valid for debug builds");
* Description: Closes process file pointer.
*/
$file_path = dirname(__FILE__);
-echo "*** Testing for error conditions ***\n";
+echo "*** Testing for error conditions ***" . PHP_EOL;
var_dump( popen() ); // Zero Arguments
var_dump( popen("abc.txt") ); // Single Argument
var_dump( popen("abc.txt", "rw") ); // Invalid mode Argument
@@ -26,7 +26,7 @@ $file_handle = fopen($file_path."/popen.tmp", "w");
var_dump( pclose($file_handle, $file_handle) );
pclose($file_handle);
var_dump( pclose(1) );
-echo "\n--- Done ---";
+echo PHP_EOL . PHP_EOL . "--- Done ---";
?>
--CLEAN--
<?php
@@ -54,5 +54,6 @@ bool(false)
Warning: pclose() expects parameter 1 to be resource, integer given in %s on line %d
bool(false)
+
--- Done ---'abc.txt' is not recognized as an internal or external command,
operable program or batch file.
diff --git a/ext/standard/tests/file/realpath_cache.phpt b/ext/standard/tests/file/realpath_cache.phpt
index a476063d6..92d6fc5b2 100644
--- a/ext/standard/tests/file/realpath_cache.phpt
+++ b/ext/standard/tests/file/realpath_cache.phpt
@@ -19,7 +19,7 @@ echo "Done\n";
int(%d)
array(4) {
["key"]=>
- int(%i)
+ %s(%d)
["is_dir"]=>
bool(true)
["realpath"]=>
diff --git a/ext/standard/tests/file/realpath_cache_win32.phpt b/ext/standard/tests/file/realpath_cache_win32.phpt
index 16fc412b0..a4c663f6d 100644
--- a/ext/standard/tests/file/realpath_cache_win32.phpt
+++ b/ext/standard/tests/file/realpath_cache_win32.phpt
@@ -19,7 +19,7 @@ echo "Done\n";
int(%d)
array(8) {
["key"]=>
- int(%d)
+ %s(%d)
["is_dir"]=>
bool(true)
["realpath"]=>
diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt
index b4085c8a5..dc44b358f 100644
--- a/ext/standard/tests/file/rename_variation13-win32.phpt
+++ b/ext/standard/tests/file/rename_variation13-win32.phpt
Binary files differ
diff --git a/ext/standard/tests/file/windows_acls/bug44859.phpt b/ext/standard/tests/file/windows_acls/bug44859.phpt
index bb22a5cd8..952b6eb4c 100644
--- a/ext/standard/tests/file/windows_acls/bug44859.phpt
+++ b/ext/standard/tests/file/windows_acls/bug44859.phpt
@@ -8,6 +8,7 @@ skipif();
--FILE--
<?php
include_once __DIR__ . '/common.inc';
+fix_acls();
$iteration = array(
PHPT_ACL_READ => false,
diff --git a/ext/standard/tests/file/windows_acls/bug44859_2.phpt b/ext/standard/tests/file/windows_acls/bug44859_2.phpt
index 3cc4ed1ba..d741156ba 100644
--- a/ext/standard/tests/file/windows_acls/bug44859_2.phpt
+++ b/ext/standard/tests/file/windows_acls/bug44859_2.phpt
@@ -8,6 +8,7 @@ skipif();
--FILE--
<?php
include_once __DIR__ . '/common.inc';
+fix_acls();
$iteration = array(
PHPT_ACL_READ => true,
diff --git a/ext/standard/tests/file/windows_acls/bug44859_3.phpt b/ext/standard/tests/file/windows_acls/bug44859_3.phpt
index 7300112fc..ed57abba0 100644
--- a/ext/standard/tests/file/windows_acls/bug44859_3.phpt
+++ b/ext/standard/tests/file/windows_acls/bug44859_3.phpt
@@ -8,6 +8,7 @@ skipif();
--FILE--
<?php
include_once __DIR__ . '/common.inc';
+fix_acls();
$iteration = array(
'tiny.exe' => true,
diff --git a/ext/standard/tests/file/windows_acls/bug44859_4.phpt b/ext/standard/tests/file/windows_acls/bug44859_4.phpt
index c1768d02e..954c1004a 100644
--- a/ext/standard/tests/file/windows_acls/bug44859_4.phpt
+++ b/ext/standard/tests/file/windows_acls/bug44859_4.phpt
@@ -10,6 +10,7 @@ skipif();
--FILE--
<?php
include_once __DIR__ . '/common.inc';
+fix_acls();
$iteration = array(
PHPT_ACL_READ => true,
diff --git a/ext/standard/tests/file/windows_acls/common.inc b/ext/standard/tests/file/windows_acls/common.inc
index c4276014a..26fadf31f 100644
--- a/ext/standard/tests/file/windows_acls/common.inc
+++ b/ext/standard/tests/file/windows_acls/common.inc
@@ -19,15 +19,45 @@ function skipif() {
}
function get_username(){
- return getenv('USERNAME');
+ $user = getenv('USERNAME');
+
+ if (!$user) {
+ $user = get_current_user();
+ }
+
+ if (!$user) {
+ $user = exec('echo %USERNAME%');
+ }
+
+ return $user;
}
function get_domainname()
{
- return getenv('USERDOMAIN');
+ $domain = getenv('USERDOMAIN');
+
+ return $domain;
+}
+
+function get_icacls()
+{
+ $sysroot = exec('echo %SYSTEMROOT%');
+
+ return "$sysroot\\System32\\icacls.exe";
+}
+
+function fix_acls() {
+ $user = get_username();
+ /* Current user needs to be owner of the test files. As well
+ all the other users having acls on the files must loose them.
+ The following fixes this just partially, as dynamically reading
+ all the users having acls on a file could be sophisticated. */
+ exec(get_icacls() . ' . /setowner $user /T /L /Q 2> nul');
+ exec(get_icacls() . ' . /remove:g Administrators /T /L /Q 2> nul');
}
function icacls_set($path, $mode, $perm) {
+ $icacls = get_icacls();
$user = get_username();
$path_escaped = '"' . $path . '"';
$perm_entry = array();
@@ -38,7 +68,7 @@ function icacls_set($path, $mode, $perm) {
if ($perm & PHPT_ACL_FULL) $perm_entry[] = 'F';
// Deny all
- $cmd = 'icacls ' . $path_escaped . ' /inheritance:r /deny ' . $user . ':(F,M,R,RX,W)';
+ $cmd = $icacls . ' ' . $path_escaped . ' /inheritance:r /deny ' . $user . ':(F,M,R,RX,W)';
exec($cmd);
if ($perm & PHPT_ACL_NONE) {
@@ -47,11 +77,9 @@ function icacls_set($path, $mode, $perm) {
permission for the USER. Just granting permission doesn't
remove the previously denied permission.
*/
- $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:d';
- $cmd .= ' ' . $user;
+ $cmd = $icacls . ' ' . $path_escaped . ' /remove:d ' . $user;
exec($cmd);
- $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:g';
- $cmd .= ' ' . $user;
+ $cmd = $icacls . ' ' . $path_escaped . ' /remove:g ' . $user;
exec($cmd);
return;
}
@@ -64,7 +92,7 @@ function icacls_set($path, $mode, $perm) {
// Deny all
- $cmd = 'icacls ' . $path_escaped . ' /deny ' . $user . ':(F,M,R,RX,W)';
+ $cmd = $icacls . ' ' . $path_escaped . ' /deny ' . $user . ':(F,M,R,RX,W)';
exec($cmd);
/*
@@ -72,11 +100,9 @@ function icacls_set($path, $mode, $perm) {
permission for the USER. Just granting permission doesn't
remove the previously denied permission.
*/
- $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:d';
- $cmd .= ' ' . $user;
+ $cmd = $icacls . ' ' . $path_escaped . ' /remove:d ' . $user;
exec($cmd);
- $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:g';
- $cmd .= ' ' . $user;
+ $cmd = $icacls . ' ' . $path_escaped . ' /remove:g ' . $user;
exec($cmd);
@@ -91,15 +117,12 @@ function icacls_set($path, $mode, $perm) {
permission for the USER. Just granting permission doesn't
remove the previously denied permission.
*/
- $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:d';
- $cmd .= ' ' . get_username();
+ $cmd = $icacls . ' ' . $path_escaped . ' /remove:d ' . $user;
exec($cmd);
- $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:g';
- $cmd .= ' ' . get_username();
+ $cmd = $icacls . ' ' . $path_escaped . ' /remove:g ' . $user;
exec($cmd);
- $cmd = 'icacls ' . $path_escaped . ' /' . $mode;
- $cmd .= ' ' . get_username();
+ $cmd = $icacls . ' ' . $path_escaped . ' /' . $mode . ' ' . $user;
$cmd .= ':' . '(' . implode($perm_entry, ',') . ')';
exec($cmd);
}
diff --git a/ext/standard/tests/file/windows_links/bug48746.phpt b/ext/standard/tests/file/windows_links/bug48746.phpt
index 6c88c6319..5978e7f7f 100644
--- a/ext/standard/tests/file/windows_links/bug48746.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug#48746 - Junction not working properly
---CREDIT--
+--CREDITS--
Venkat Raman Don (don.raman@microsoft.com)
--SKIPIF--
@@ -9,7 +9,8 @@ Venkat Raman Don (don.raman@microsoft.com)
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die('skip windows only test');
}
-$cmd = "mklink.exe /?";
+include_once __DIR__ . '/common.inc';
+$cmd = "mklink /?";
$ret = @exec($cmd, $output, $return_val);
if (count($output) == 0) {
die("mklink.exe not found in PATH");
@@ -17,13 +18,15 @@ if (count($output) == 0) {
?>
--FILE--
<?php
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
$old_dir = __DIR__;
$dirname = __DIR__ . "\\mnt\\test\\directory";
mkdir($dirname, 0700, true);
chdir(__DIR__ . "\\mnt\\test");
$drive = substr(__DIR__, 0, 2);
$pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec("mountvol " . $drive . " /L", $output, $ret_val);
+$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
$fullpath = "mounted_volume" . $pathwithoutdrive;
exec("mklink /j mklink_junction directory", $output, $ret_val);
diff --git a/ext/standard/tests/file/windows_links/bug48746_1.phpt b/ext/standard/tests/file/windows_links/bug48746_1.phpt
index ca8450a89..a4277a47a 100644
--- a/ext/standard/tests/file/windows_links/bug48746_1.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_1.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug#48746 - Junction not working properly
---CREDIT--
+--CREDITS--
Venkat Raman Don (don.raman@microsoft.com)
--SKIPIF--
@@ -9,7 +9,8 @@ Venkat Raman Don (don.raman@microsoft.com)
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die('skip windows only test');
}
-$cmd = "mklink.exe /?";
+include_once __DIR__ . '/common.inc';
+$cmd = "mklink /?";
$ret = @exec($cmd, $output, $return_val);
if (count($output) == 0) {
die("mklink.exe not found in PATH");
@@ -17,13 +18,15 @@ if (count($output) == 0) {
?>
--FILE--
<?php
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
$old_dir = __DIR__;
$dirname = __DIR__ . "\\mnt\\test\\directory";
exec("mkdir " . $dirname, $output, $ret_val);
chdir(__DIR__ . "\\mnt\\test");
$drive = substr(__DIR__, 0, 2);
$pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec("mountvol " . $drive . " /L", $output, $ret_val);
+$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
$fullpath = "mounted_volume" . $pathwithoutdrive;
exec("mklink /j mklink_junction directory", $output, $ret_val);
@@ -53,4 +56,4 @@ I am included.
I am included.
bool(true)
bool(true)
-bool(true)
+bool(true)
diff --git a/ext/standard/tests/file/windows_links/bug48746_2.phpt b/ext/standard/tests/file/windows_links/bug48746_2.phpt
index 7beed1691..509610f8a 100644
--- a/ext/standard/tests/file/windows_links/bug48746_2.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_2.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug#48746 - Junction not working properly
---CREDIT--
+--CREDITS--
Venkat Raman Don (don.raman@microsoft.com)
--SKIPIF--
@@ -9,21 +9,24 @@ Venkat Raman Don (don.raman@microsoft.com)
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die('skip windows only test');
}
+include_once __DIR__ . '/common.inc';
$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);
if (strpos($ret, 'privilege')) {
die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
}
-unlink('mklink bug48746_tmp.lnk');
+unlink('bug48746_tmp.lnk');
?>
--FILE--
<?php
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
$old_dir = __DIR__;
$dirname = __DIR__ . "\\mnt\\test\\directory";
exec("mkdir " . $dirname, $output, $ret_val);
chdir(__DIR__ . "\\mnt\\test");
$drive = substr(__DIR__, 0, 2);
$pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec("mountvol " . $drive . " /L", $output, $ret_val);
+$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
$fullpath = "mounted_volume" . $pathwithoutdrive;
exec("mklink /j mklink_junction directory", $output, $ret_val);
@@ -63,4 +66,4 @@ Array
[1] => ..
[2] => a.php
[3] => b.php
-)
+)
diff --git a/ext/standard/tests/file/windows_links/bug48746_3.phpt b/ext/standard/tests/file/windows_links/bug48746_3.phpt
index a0dcbdc02..98e81787b 100644
--- a/ext/standard/tests/file/windows_links/bug48746_3.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_3.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug#48746 - Junction not working properly
---CREDIT--
+--CREDITS--
Venkat Raman Don (don.raman@microsoft.com)
--SKIPIF--
@@ -9,7 +9,8 @@ Venkat Raman Don (don.raman@microsoft.com)
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die('skip windows only test');
}
-$ret = exec('junction /? 2>&1', $out);
+include_once __DIR__ . '/common.inc';
+$ret = exec(get_junction().' /? 2>&1', $out);
if (strpos($out[0], 'recognized')) {
die('skip. junction.exe not found in PATH.');
}
@@ -17,11 +18,12 @@ if (strpos($out[0], 'recognized')) {
?>
--FILE--
<?php
+include_once __DIR__ . '/common.inc';
$old_dir = __DIR__;
$dirname = __DIR__ . "\\mnt\\test\\directory";
exec("mkdir " . $dirname, $output, $ret_val);
chdir(__DIR__ . "\\mnt\\test");
-exec("junction junction directory", $output, $ret_val);
+exec(get_junction()." junction directory", $output, $ret_val);
file_put_contents("junction\\a.php", "<?php echo \"I am included.\n\" ?>");
file_put_contents("junction\\b.php", "<?php echo \"I am included.\n\" ?>");
include "junction/a.php";
@@ -45,4 +47,4 @@ Array
[1] => ..
[2] => a.php
[3] => b.php
-)
+)
diff --git a/ext/standard/tests/file/windows_links/common.inc b/ext/standard/tests/file/windows_links/common.inc
new file mode 100644
index 000000000..2d4b47cd5
--- /dev/null
+++ b/ext/standard/tests/file/windows_links/common.inc
@@ -0,0 +1,23 @@
+<?php
+
+function get_sysroot() {
+ // usually c:\\windows, but not always
+ return exec('echo %SYSTEMROOT%');
+}
+
+function get_junction(){
+ // junction.exe isn't included with Windows
+ // its a sysinternals tool for working with filesystem links
+ // see: http://technet.microsoft.com/en-us/sysinternals/bb896768
+
+ // install somewhere that is on %path% or added to %path%
+ return "junction.exe";
+}
+
+function get_mountvol() {
+ $sysroot = get_sysroot();
+
+ return "$sysroot\\System32\\mountvol.exe";
+}
+
+?>
diff --git a/ext/standard/tests/general_functions/bug44295-win.phpt b/ext/standard/tests/general_functions/bug44295-win.phpt
new file mode 100644
index 000000000..d210a54d5
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug44295-win.phpt
@@ -0,0 +1,29 @@
+--TEST--
+user defined error handler + set_error_handling(EH_THROW)
+--SKIPIF--
+<?php
+ if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only");
+ if (!extension_loaded("spl") || is_dir('c:\\not\\exists\\here')) die("skip");
+?>
+--FILE--
+<?php
+$dir = 'c:\\not\\exists\\here';
+
+set_error_handler('my_error_handler');
+function my_error_handler() {$a = func_get_args(); print "in error handler\n"; }
+
+try {
+ print "before\n";
+ $iter = new DirectoryIterator($dir);
+ print get_class($iter) . "\n";
+ print "after\n";
+} catch (Exception $e) {
+ print "in catch: ".$e->getMessage()."\n";
+}
+?>
+==DONE==
+<?php exit(0); ?>
+--EXPECT--
+before
+in catch: DirectoryIterator::__construct(c:\not\exists\here,c:\not\exists\here): The system cannot find the path specified. (code: 3)
+==DONE==
diff --git a/ext/standard/tests/general_functions/bug44295.phpt b/ext/standard/tests/general_functions/bug44295.phpt
index 9c1271991..a18471919 100644
--- a/ext/standard/tests/general_functions/bug44295.phpt
+++ b/ext/standard/tests/general_functions/bug44295.phpt
@@ -1,7 +1,10 @@
--TEST--
user defined error handler + set_error_handling(EH_THROW)
--SKIPIF--
-<?php if (!extension_loaded("spl") || is_dir('/this/path/does/not/exist')) die("skip"); ?>
+<?php
+ if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows");
+ if (!extension_loaded("spl") || is_dir('/this/path/does/not/exist')) die("skip");
+?>
--FILE--
<?php
$dir = '/this/path/does/not/exist';
diff --git a/ext/standard/tests/general_functions/bug49847.phpt b/ext/standard/tests/general_functions/bug49847.phpt
index 6312d03c0..112592d6e 100644
--- a/ext/standard/tests/general_functions/bug49847.phpt
+++ b/ext/standard/tests/general_functions/bug49847.phpt
@@ -9,7 +9,7 @@ if ($iswin) {
$s = str_repeat(' ', 4097);
$s .= '1';
file_put_contents($f, $s);
- exec('more ' . $f, $output);
+ exec('type ' . $f, $output);
} else {
exec("printf %4098d 1", $output);
}
diff --git a/ext/standard/tests/misc/time_sleep_until_basic.phpt b/ext/standard/tests/misc/time_sleep_until_basic.phpt
index 9ae912881..05cc0e6de 100644
--- a/ext/standard/tests/misc/time_sleep_until_basic.phpt
+++ b/ext/standard/tests/misc/time_sleep_until_basic.phpt
@@ -13,7 +13,19 @@ Michele Orselli mo@ideato.it
<?php
$time = microtime(true) + 2;
var_dump(time_sleep_until( (int)$time ));
- var_dump(microtime(true) >= (int)$time);
+ $now = microtime(true);
+ if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ // on windows, time_sleep_until has millisecond accuracy while microtime() is accurate
+ // to 10th of a second. this means there can be up to a .9 millisecond difference
+ // which will fail this test. this test randomly fails on Windows and this is the cause.
+ //
+ // fix: round to nearest millisecond
+ // passes for up to .5 milliseconds less, fails for more than .5 milliseconds
+ // should be fine since time_sleep_until() on Windows is accurate to the
+ // millisecond(.5 rounded up is 1 millisecond)
+ $now = round($now, 3);
+ }
+ var_dump($now >= (int)$time);
?>
--EXPECT--
bool(true)
diff --git a/ext/standard/tests/streams/bug60106.phpt b/ext/standard/tests/streams/bug60106.phpt
index c9e94e767..1b36af1a3 100644
--- a/ext/standard/tests/streams/bug60106.phpt
+++ b/ext/standard/tests/streams/bug60106.phpt
@@ -7,13 +7,17 @@ if( substr(PHP_OS, 0, 3) == "WIN" )
?>
--FILE--
<?php
- error_reporting(E_ALL | E_NOTICE);
- stream_socket_server("unix:///tmp/" . str_repeat("a", 4096));
+error_reporting(E_ALL | E_NOTICE);
+$socket_file = "/tmp/" . str_repeat("a", 512);
+function get_truncated_socket_filename($errno, $errmsg, $file, $line) {
+ global $socket_file;
+ print_r ($errmsg);
+ preg_match("#maximum allowed length of (\d+) bytes#", $errmsg, $matches);
+ $socket_file = substr($socket_file, 0, intval($matches[1]) - 1);
+}
+set_error_handler("get_truncated_socket_filename", E_NOTICE);
+stream_socket_server("unix://" . $socket_file);
+unlink($socket_file);
?>
-===DONE===
--EXPECTF--
-Notice: stream_socket_server(): socket path exceeded the maximum allowed length of %d bytes and was truncated in %s on line %d
-
-Warning: stream_socket_server(): unable to connect to unix:///tmp/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (Unknown error) in %s on line %d
-===DONE===
-
+stream_socket_server(): socket path exceeded the maximum allowed length of %d bytes and was truncated
diff --git a/ext/standard/tests/streams/bug61115-1.phpt b/ext/standard/tests/streams/bug61115-1.phpt
index cfed64f03..89374e735 100644
--- a/ext/standard/tests/streams/bug61115-1.phpt
+++ b/ext/standard/tests/streams/bug61115-1.phpt
@@ -8,4 +8,4 @@ stream_context_get_options($fileResourceTemp);
ftruncate($fileResourceTemp, PHP_INT_MAX);
?>
--EXPECTF--
-Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s on line %d
+Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
diff --git a/ext/standard/tests/streams/bug61371-win.phpt b/ext/standard/tests/streams/bug61371-win.phpt
new file mode 100644
index 000000000..dc7053044
--- /dev/null
+++ b/ext/standard/tests/streams/bug61371-win.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Bug #61371: stream_context_create() causes memory leaks on use streams_socket_create
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+--FILE--
+<?php
+function test($doFclose) {
+$previous = null;
+$current = null;
+for($test=1;$test<=3;$test++) {
+ $current = memory_get_usage(true);
+ if (!is_null($previous)) {
+ var_dump($previous == $current);
+ }
+ $previous = $current;
+ echo 'memory: '.round($current / 1024, 0)."kb\n";
+ for($i=0;$i<=100;$i++) {
+ $context = stream_context_create(array());
+ $stream = stream_socket_client('udp://127.0.0.1:80', $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context);
+ if ($doFclose) fclose($stream);
+ unset($context);
+ unset($stream);
+ unset($errno);
+ unset($errstr);
+ }
+}
+}
+
+test(true);
+test(false);
+?>
+--EXPECTF--
+memory: %dkb
+bool(true)
+memory: %dkb
+bool(true)
+memory: %dkb
+memory: %dkb
+bool(true)
+memory: %dkb
+bool(true)
+memory: %dkb
diff --git a/ext/standard/tests/streams/bug61371.phpt b/ext/standard/tests/streams/bug61371.phpt
index 7fbfa56ba..7c64d1d30 100644
--- a/ext/standard/tests/streams/bug61371.phpt
+++ b/ext/standard/tests/streams/bug61371.phpt
@@ -1,5 +1,10 @@
--TEST--
Bug #61371: stream_context_create() causes memory leaks on use streams_socket_create
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip non windows test');
+}
--FILE--
<?php
function test($doFclose) {
diff --git a/ext/standard/tests/streams/stream_get_line_NUL_delimiter.phpt b/ext/standard/tests/streams/stream_get_line_NUL_delimiter.phpt
new file mode 100644
index 000000000..32756d761
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_line_NUL_delimiter.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #60455: stream_get_line and \0 as a delimiter
+--FILE--
+<?php
+class TestStream {
+ private $s = 0;
+ function stream_open($path, $mode, $options, &$opened_path) {
+ return true;
+ }
+ function stream_read($count) {
+ if ($this->s++ == 0)
+ return "a\0";
+
+ return "";
+ }
+ function stream_eof() {
+ return $this->s >= 2;
+ }
+
+}
+
+stream_wrapper_register("test", "TestStream");
+
+$f = fopen("test://", "r");
+var_dump(stream_get_line($f, 100, "\0"));
+--EXPECT--
+string(1) "a"
diff --git a/ext/standard/tests/strings/bug38770.phpt b/ext/standard/tests/strings/bug38770.phpt
index 417794cd2..1821639ac 100644
--- a/ext/standard/tests/strings/bug38770.phpt
+++ b/ext/standard/tests/strings/bug38770.phpt
@@ -7,7 +7,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
--FILE--
<?php
-foreach (array('N','I','l') as $v) {
+foreach (array('N','l') as $v) {
print_r(unpack($v, pack($v, -30000)));
}
@@ -22,8 +22,4 @@ Array
(
[1] => -30000
)
-Array
-(
- [1] => -30000
-)
Done
diff --git a/ext/standard/tests/strings/bug61660.phpt b/ext/standard/tests/strings/bug61660.phpt
new file mode 100644
index 000000000..010ea47e9
--- /dev/null
+++ b/ext/standard/tests/strings/bug61660.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #61660: bin2hex(hex2bin($data)) != $data
+--FILE--
+<?php
+
+var_dump(hex2bin('123'));
+
+?>
+--EXPECTF--
+Warning: hex2bin(): Hexadecimal input string must have an even length in %s on line %d
+bool(false)
diff --git a/ext/standard/tests/strings/bug61764.phpt b/ext/standard/tests/strings/bug61764.phpt
new file mode 100644
index 000000000..dc44f25b3
--- /dev/null
+++ b/ext/standard/tests/strings/bug61764.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #61764: 'I' unpacks n as signed if n > 2^31-1 on LP64
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+--FILE--
+<?php
+//expected -30000 mod 2^32 = 4294937296, and not -30000
+//because we can represent 4294937296 with our PHP int type
+print_r(unpack('I', pack('L', -30000)));
+--EXPECT--
+Array
+(
+ [1] => 4294937296
+)
diff --git a/ext/standard/tests/strings/htmlentities15.phpt b/ext/standard/tests/strings/htmlentities15.phpt
index 54c1b0601..e5729f997 100644
--- a/ext/standard/tests/strings/htmlentities15.phpt
+++ b/ext/standard/tests/strings/htmlentities15.phpt
@@ -11,7 +11,7 @@ if (!$result || preg_match('/koi8/i', setlocale(LC_CTYPE, 0)) == 0) {
die("skip setlocale() failed\n");
}
?>
---COMMENT--
+--DESCRIPTION--
As of PHP 5.4, htmlentities() no longer makes replacements with numerical
entities. Hence, for this input there's no substitution.
--FILE--
diff --git a/ext/tidy/tests/bug54682.phpt b/ext/tidy/tests/bug54682.phpt
index 99f40cf9d..2bebe11bd 100644
--- a/ext/tidy/tests/bug54682.phpt
+++ b/ext/tidy/tests/bug54682.phpt
@@ -10,4 +10,4 @@ $nx->diagnose();
?>
--EXPECTF--
-Warning: tidy::__construct(): Cannot Load '*' into memory in %s on line %d
+Warning: tidy::__construct(): Cannot Load '*' into memory%win %s on line %d
diff --git a/ext/zlib/tests/bug61443.phpt b/ext/zlib/tests/bug61443.phpt
new file mode 100644
index 000000000..ea2fa68c8
--- /dev/null
+++ b/ext/zlib/tests/bug61443.phpt
@@ -0,0 +1,15 @@
+--TEST--
+bug #61443
+--SKIPIF--
+<?php
+extension_loaded("zlib") or die("skip");
+?>
+--FILE--
+<?php
+ob_start(); echo "foo\n"; ob_get_clean();
+if(!headers_sent()) ini_set('zlib.output_compression', true); echo "end\n";
+?>
+DONE
+--EXPECTF--
+end
+DONE
diff --git a/ext/zlib/tests/bug61820.phpt b/ext/zlib/tests/bug61820.phpt
new file mode 100644
index 000000000..6f33b5455
--- /dev/null
+++ b/ext/zlib/tests/bug61820.phpt
@@ -0,0 +1,23 @@
+--TEST--
+bug #61820 using ob_gzhandler will complain about headers already sent when no compression
+--SKIPIF--
+<?php
+extension_loaded("zlib") or die("skip");
+?>
+--FILE--
+<?php
+ob_start('ob_gzhandler');
+
+echo "Hi there.\n";
+ob_flush();
+flush();
+
+echo "This is confusing...\n";
+ob_flush();
+flush();
+?>
+DONE
+--EXPECT--
+Hi there.
+This is confusing...
+DONE
diff --git a/ext/zlib/tests/gzencode_variation1-win32.phpt b/ext/zlib/tests/gzencode_variation1-win32.phpt
index efb223b98..5ff577838 100644
--- a/ext/zlib/tests/gzencode_variation1-win32.phpt
+++ b/ext/zlib/tests/gzencode_variation1-win32.phpt
@@ -19,19 +19,28 @@ if (!extension_loaded("zlib")) {
* Alias to functions:
*/
+if(!function_exists("gzdecode")) {
+ function gzdecode($data)
+ {
+ return gzinflate(substr($data,10,-8));
+ }
+}
+
+
include(dirname(__FILE__) . '/data.inc');
echo "*** Testing gzencode() : variation ***\n";
echo "\n-- Testing multiple compression --\n";
-$output = gzencode($data);
-var_dump(bin2hex(gzencode($output)));
+$output = gzencode(gzencode($data));
+$back = gzdecode(gzdecode($output));
+var_dump($data === $back);
?>
===Done===
--EXPECT--
*** Testing gzencode() : variation ***
-- Testing multiple compression --
-string(3658) "1f8b080000000000000b010e07f1f81f8b080000000000000b6d574d6fe4c80dbdeb57d4ad2f3dfe01eb83e1ec22980e309b4562c067b64449159754dafab0b6e7d7e73d96da1e4c72184c4b2ab2c8f7c847fa25baabba98dc1a8b2b7c38bb324b713ee37f757f56cdc5c7f5b17b9d152f923b157c5ae335e0b75fedd0e2d781c6b98ea3a6ee05affe1dfc3a6527f8f09c52dcb38ba38bb5249934d6ecfe1e53a9ab76ff4c342cf2a64ed2028349fc9a8b139755685352acb82b9fbb67f8bade5cdcb698e1fcec94b7ceba3cb897e806cfc8114350dd1ebbdfa35b62d2478b0056d23ed809b9b95d696d91ce2aa97c911e3fa539c43f84c887554a4d125c9e63ff96711cc08c0866263cb37a0bbe2122ae8f6baecb2284abfb4ddf916db8354cddeef37c1afe5fa02fc7afb3db34f5b3acbdf2eb905490d8f38d7468d253a323d5ebb903760d7944d3b2024e834a99ddce77669bdd823cfbb8e899d4ad4c799677452e6029e80023a03b2374005590641f7d3877df2ad09f3c0e82a54d6a5644fd63049a37ed4bc362016fd9f51264f1e5c630727421ae930b7ed416e93e47b7c71a400390361ffbecb7561bb98f69b5da289e91becc27f08b3b724cb8704f9144d366431d0cb870c56b205deaa2e17636063761a911039fb7e4bf9f06c4f0aecd2ec80e8b41831ca7515e31286166458ea3ef71f2ce7cde2ae269c96d60525724a9c9170b713ed5750758f3cd2a361fc8b288fc92358ce884692e8ea0fe59bd969a0da2eed5831b715749eaae7178f3ebd30fb88c92105f367cce2c882955dc6bf8eca0d5d57540b3092894743ba0fd5b2dad021836191f1afc0bba14dde1642cb0b1aa6879c38907dcefa0720082b801bec61417469219175267dfa047df35b0bd1332001c28cdfafd3bcabe91e74368cdd8d8478e494c190e7ee90c67f2bde288e68ab6b15e883c995be4f8feb6c6dda4278e4f38578ddbdc7be36788daf0c3cb1d1819c73822f7000a0d1813fa94153b572315e51343b536bc64977dff163cebfd8418773261f524017e251fccc60ae29a5770ae097594d52e9c1229d87ce967a36401c46b69945afb249d101c9d420ffa9a123e232c20e76467d5d169202a2dd4c582949e013e745df7958d4b0cc4fd4377a737cd4feea7974070000f314d423e0634cb9a618fdf5dc64fd422181fd59c9230c9f6f9d18dc8fc23e9cccbc7188733b04aa57de83ebea0be3633cff5fa1ff83269be7f44f5a8d84550cc703255fd345dd402034d0b3e11a73ec6e3d4a77f4f685b614329f1b3132ae7af33d02e1e55e291fa6574b758d1f0200e7423dbc852211818043a7c9ce80aa9d59fce0401959f5ea2cf71fde90824f8c9192dbe9d329db143794675ddcf257dd7755273b67340414e3ccad12e3f661f8aad9cf9957dc1275d10a51d3934fa81e68dc6768fb8ee23e373936c8e13feab8b0f50d227f7af76f561fb0950f3d099bbc316c3892a42fb36806d8660e800fa4f43fd4b962d2097d71933a54b77ff948677848eb17bb3a88b621682cfb3bbb49cf42fed6b3944124ad8358ca688aa44dd5f2144c7c9ab16f25b9aca9654ef357ec9ad55c40d324d6cc3d9e3920b863c231d31a95d937fb5520f9c816c79b7dcecc593fb9593cc05a51ebb1eeddd5b49eb437769738d0f64adc579d372b8b7f7c0208487ee3915ebf5766e148ebd77cf4e01f3ec285047011e55838968b6494d517fe29224777b24dd3ddf933101695b102e87db805eef291b74dcfd91628fb2a53f93dbd2968ef2e598746c9204f89fba1f0246fc671610a0591806e46a1346f77c40d910a47c5e20ffb23f003c04b648327a4ed98032c1965bd35bb0044f5344248f56fdb99aa61d6451d68e33489a83bffbe6573541b2da5f64681ea12090f778b2075374778810f73965fa3626a9d41f4df2f83f7c34658cec921b5a9bde49dd5007ec882b02adc514f81aa85898b5cc98e1b137733c0a8789b7f5648d2d231b80bf74978f25d61ce08a8abd11801fd8f995e066676307192ff7641f1cc6e0dee68565b8b22ac3889cd067bf732754a6b270af1044c6a8776811a4f6d8bd0477a9f516064201b920b92d7cd4dc7eee13e6b3eb3528a82f9abb3f388ebe6a8f871393461b73816ec54c99d604174bc5a6801de13908f86aea6a7d0fea107d682bcf1ec348b83872e6b8a316ecd02eb8f8dc86a609bf59a2dd03f1dfa4079436d55e24617be1a2854d008b2b2b1705e2078a7f3946318df1c24f6bf70d4b456eca286ec2b585b28262cc048a098c3e2d5f325a92bb36f691afdc14c822da1b116c9c1c07bb362eb0a04b78834c812134230ebf2044ac2e3c0e3ad00f848dc5010f3bf917ec2fc700b7bf26dacea8440620e04f90f4d97d6dd77cfde8a05c7d3930f1e5811fb8ec5c70964dcc8187ec90e32fdd6b64eec7586413b7d55bed65c4cce39a9b6c15e70e9da94e53fc904e6286f01f5b5562c94211befbc23507e01b2a3865e2f45b5d7b591f290087a5605b82495b4e393f31aa5b37211ec40241a746d903c5eebf117a4d3ddb0d000030e1f1820e070000"
+bool(true)
===Done===
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index d472573b7..c6e2e0cf8 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -187,7 +187,9 @@ static int php_zlib_output_handler(void **handler_context, php_output_context *o
-Vary: $ HTTP_ACCEPT_ENCODING=gzip ./sapi/cgi/php <<<'<?php ob_start("ob_gzhandler"); echo "foo\n"; ob_end_clean();'
-Vary: $ HTTP_ACCEPT_ENCODING= ./sapi/cgi/php <<<'<?php ob_start("ob_gzhandler"); echo "foo\n"; ob_end_clean();'
*/
- if (output_context->op != (PHP_OUTPUT_HANDLER_START|PHP_OUTPUT_HANDLER_CLEAN|PHP_OUTPUT_HANDLER_FINAL)) {
+ if ((output_context->op & PHP_OUTPUT_HANDLER_START)
+ && (output_context->op != (PHP_OUTPUT_HANDLER_START|PHP_OUTPUT_HANDLER_CLEAN|PHP_OUTPUT_HANDLER_FINAL))
+ ) {
sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 1 TSRMLS_CC);
}
return FAILURE;
@@ -282,7 +284,8 @@ static void php_zlib_output_compression_start(TSRMLS_D)
ZLIBG(output_compression) = PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
/* break omitted intentionally */
default:
- if ( (h = php_zlib_output_handler_init(ZEND_STRL(PHP_ZLIB_OUTPUT_HANDLER_NAME), ZLIBG(output_compression), PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC)) &&
+ if ( php_zlib_output_encoding(TSRMLS_C) &&
+ (h = php_zlib_output_handler_init(ZEND_STRL(PHP_ZLIB_OUTPUT_HANDLER_NAME), ZLIBG(output_compression), PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC)) &&
(SUCCESS == php_output_handler_start(h TSRMLS_CC))) {
if (ZLIBG(output_handler) && *ZLIBG(output_handler)) {
MAKE_STD_ZVAL(zoh);
@@ -882,9 +885,6 @@ static PHP_INI_MH(OnUpdate_zlib_output_compression)
if (status & PHP_OUTPUT_SENT) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "Cannot change zlib.output_compression - headers already sent");
return FAILURE;
- } else if ((status & PHP_OUTPUT_WRITTEN) && int_value) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "Cannot enable zlib.output_compression - there has already been output");
- return FAILURE;
}
}
@@ -967,7 +967,6 @@ static PHP_RINIT_FUNCTION(zlib)
static PHP_RSHUTDOWN_FUNCTION(zlib)
{
- ZLIBG(output_compression) = 0;
php_zlib_cleanup_ob_gzhandler_mess(TSRMLS_C);
return SUCCESS;
diff --git a/main/SAPI.c b/main/SAPI.c
index 74fdbb2c4..fc4b7bee8 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -587,10 +587,36 @@ static void sapi_update_response_code(int ncode TSRMLS_DC)
SG(sapi_headers).http_response_code = ncode;
}
-static int sapi_find_matching_header(void *element1, void *element2)
-{
- int len = strlen((char*)element2);
- return strncasecmp(((sapi_header_struct*)element1)->header, (char*)element2, len) == 0 && ((sapi_header_struct*)element1)->header[len] == ':';
+/*
+ * since zend_llist_del_element only remove one matched item once,
+ * we should remove them by ourself
+ */
+static void sapi_remove_header(zend_llist *l, char *name, uint len) {
+ sapi_header_struct *header;
+ zend_llist_element *next;
+ zend_llist_element *current=l->head;
+
+ while (current) {
+ header = (sapi_header_struct *)(current->data);
+ next = current->next;
+ if (header->header_len > len && header->header[len] == ':'
+ && !strncasecmp(header->header, name, len)) {
+ if (current->prev) {
+ current->prev->next = next;
+ } else {
+ l->head = next;
+ }
+ if (next) {
+ next->prev = current->prev;
+ } else {
+ l->tail = current->prev;
+ }
+ sapi_free_header(header);
+ efree(current);
+ --l->count;
+ }
+ current = next;
+ }
}
SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate, zend_bool replace TSRMLS_DC)
@@ -621,7 +647,7 @@ static void sapi_header_add_op(sapi_header_op_enum op, sapi_header_struct *sapi_
char sav = *colon_offset;
*colon_offset = 0;
- zend_llist_del_element(&SG(sapi_headers).headers, sapi_header->header, (int(*)(void*, void*))sapi_find_matching_header);
+ sapi_remove_header(&SG(sapi_headers).headers, sapi_header->header, strlen(sapi_header->header));
*colon_offset = sav;
}
}
@@ -703,7 +729,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
sapi_header.header_len = header_line_len;
sapi_module.header_handler(&sapi_header, op, &SG(sapi_headers) TSRMLS_CC);
}
- zend_llist_del_element(&SG(sapi_headers).headers, header_line, (int(*)(void*, void*))sapi_find_matching_header);
+ sapi_remove_header(&SG(sapi_headers).headers, header_line, header_line_len);
efree(header_line);
return SUCCESS;
} else {
@@ -990,7 +1016,9 @@ SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC)
} else {
return NULL;
}
- sapi_module.input_filter(PARSE_ENV, name, &value, strlen(value), NULL TSRMLS_CC);
+ if (sapi_module.input_filter) {
+ sapi_module.input_filter(PARSE_ENV, name, &value, strlen(value), NULL TSRMLS_CC);
+ }
return value;
}
return NULL;
diff --git a/main/SAPI.h b/main/SAPI.h
index f868f852e..8f2536b84 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -105,7 +105,6 @@ typedef struct {
/* this is necessary for the CGI SAPI module */
char *argv0;
- /* this is necessary for Safe Mode */
char *current_user;
int current_user_length;
diff --git a/main/main.c b/main/main.c
index 6a04ddbaf..c34f95243 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1740,22 +1740,22 @@ void php_request_shutdown(void *dummy)
}
} zend_end_try();
- /* 4. Shutdown output layer (send the set HTTP headers, cleanup output handlers, etc.) */
- zend_try {
- php_output_deactivate(TSRMLS_C);
- } zend_end_try();
-
- /* 5. Reset max_execution_time (no longer executing php code after response sent) */
+ /* 4. Reset max_execution_time (no longer executing php code after response sent) */
zend_try {
zend_unset_timeout(TSRMLS_C);
} zend_end_try();
- /* 6. Call all extensions RSHUTDOWN functions */
+ /* 5. Call all extensions RSHUTDOWN functions */
if (PG(modules_activated)) {
zend_deactivate_modules(TSRMLS_C);
php_free_shutdown_functions(TSRMLS_C);
}
+ /* 6. Shutdown output layer (send the set HTTP headers, cleanup output handlers, etc.) */
+ zend_try {
+ php_output_deactivate(TSRMLS_C);
+ } zend_end_try();
+
/* 7. Destroy super-globals */
zend_try {
int i;
diff --git a/main/output.c b/main/output.c
index 138339ea9..d4eaa6701 100644
--- a/main/output.c
+++ b/main/output.c
@@ -1025,6 +1025,7 @@ static inline php_output_handler_status_t php_output_handler_op(php_output_handl
case PHP_OUTPUT_HANDLER_SUCCESS:
/* no more buffered data */
handler->buffer.used = 0;
+ handler->flags |= PHP_OUTPUT_HANDLER_PROCESSED;
break;
}
diff --git a/main/php_config.h.in b/main/php_config.h.in
index 5f9576cf6..326dc7bc7 100644
--- a/main/php_config.h.in
+++ b/main/php_config.h.in
@@ -1366,6 +1366,9 @@
/* PostgreSQL 7.2.0 or later */
#undef HAVE_PQESCAPE
+/* PostgreSQL 9.0 or later */
+#undef HAVE_PQESCAPELITERAL
+
/* PostgreSQL 8.1.4 or later */
#undef HAVE_PQESCAPE_BYTEA_CONN
diff --git a/main/php_output.h b/main/php_output.h
index e4ab0f920..d050a141a 100644
--- a/main/php_output.h
+++ b/main/php_output.h
@@ -45,6 +45,7 @@
/* handler status flags */
#define PHP_OUTPUT_HANDLER_STARTED 0x1000
#define PHP_OUTPUT_HANDLER_DISABLED 0x2000
+#define PHP_OUTPUT_HANDLER_PROCESSED 0x4000
/* handler op return values */
typedef enum _php_output_handler_status_t {
@@ -82,7 +83,7 @@ typedef enum _php_output_handler_hook_t {
} php_output_handler_hook_t;
#define PHP_OUTPUT_HANDLER_INITBUF_SIZE(s) \
-( (s) ? \
+( ((s) > 1) ? \
(s) + PHP_OUTPUT_HANDLER_ALIGNTO_SIZE - ((s) % (PHP_OUTPUT_HANDLER_ALIGNTO_SIZE)) : \
PHP_OUTPUT_HANDLER_DEFAULT_SIZE \
)
diff --git a/main/php_version.h b/main/php_version.h
index 46fba1329..668b84334 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 4
-#define PHP_RELEASE_VERSION 3
-#define PHP_EXTRA_VERSION ""
-#define PHP_VERSION "5.4.3"
-#define PHP_VERSION_ID 50403
+#define PHP_RELEASE_VERSION 4
+#define PHP_EXTRA_VERSION "-RC1"
+#define PHP_VERSION "5.4.4-RC1"
+#define PHP_VERSION_ID 50404
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 89fa3640f..db6e25f68 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -1028,8 +1028,8 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re
char *ret_buf, /* returned buffer */
*found_delim = NULL;
size_t buffered_len,
- tent_ret_len; /* tentative returned length*/
- int has_delim = delim_len > 0 && delim[0] != '\0';
+ tent_ret_len; /* tentative returned length */
+ int has_delim = delim_len > 0;
if (maxlen == 0) {
return NULL;
@@ -1437,7 +1437,12 @@ PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen
len += ret;
ptr += ret;
}
- *ptr = '\0';
+ if (len) {
+ *ptr = '\0';
+ } else {
+ pefree(*buf, persistent);
+ *buf = NULL;
+ }
return len;
}
diff --git a/makedist b/makedist
index 992e8a1ef..4d704cf7c 100755
--- a/makedist
+++ b/makedist
@@ -4,12 +4,12 @@
#
# Usage: makedist version
# Example: makedist 5.4.1
-# Example: makedist 5.3.5-RC1
+# Example: makedist 5.3.5RC1
#
# To work, this script needs a consistent tagging of all releases.
# Each release of a package should have a tag of the form
#
-# PHP-X.Y.Z[-sub]
+# php-X.Y.Z[sub]
#
# The distribution ends up in a .tar.gz file that contains the distribution
# in a directory called php-<version>.
@@ -63,8 +63,8 @@ if test -d "$DIRPATH"; then
fi
# Export PHP
-$ECHO_N "makedist: exporting tag 'PHP-$VER' from '$PHPROOT'...$ECHO_C"
-git archive --format=tar --remote=$PHPROOT refs/tags/PHP-$VER --prefix=php-$VER/ | (cd $MY_OLDPWD; tar xvf -) || exit 4
+$ECHO_N "makedist: exporting tag 'php-$VER' from '$PHPROOT'...$ECHO_C"
+git archive --format=tar --remote=$PHPROOT refs/tags/php-$VER --prefix=php-$VER/ | (cd $MY_OLDPWD; tar xvf -) || exit 4
echo ""
cd $DIR || exit 5
diff --git a/php.ini-development b/php.ini-development
index 867a9f267..8e7073895 100644
--- a/php.ini-development
+++ b/php.ini-development
@@ -19,7 +19,7 @@
; See the PHP docs for more specific information.
; http://php.net/configuration.file
-; The syntax of the file is extremely simple. Whitespace and Lines
+; The syntax of the file is extremely simple. Whitespace and lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
diff --git a/php.ini-production b/php.ini-production
index ee830c369..e8d1c748e 100644
--- a/php.ini-production
+++ b/php.ini-production
@@ -19,7 +19,7 @@
; See the PHP docs for more specific information.
; http://php.net/configuration.file
-; The syntax of the file is extremely simple. Whitespace and Lines
+; The syntax of the file is extremely simple. Whitespace and lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
diff --git a/run-tests.php b/run-tests.php
index cc193e56b..1fe0deb6a 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1315,7 +1315,7 @@ TEST $file
$tested = trim($section_text['TEST']);
/* For GET/POST/PUT 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['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) {
+ if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['GZIP_POST']) || !empty($section_text['DEFLATE_POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) {
if (isset($php_cgi)) {
$old_php = $php;
$php = $php_cgi . ' -C ';
@@ -1700,15 +1700,6 @@ TEST $file
} else if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) {
$post = trim($section_text['POST']);
-
- if (array_key_exists('GZIP_POST', $section_text) && function_exists('gzencode')) {
- $post = gzencode($post, 9, FORCE_GZIP);
- $env['HTTP_CONTENT_ENCODING'] = 'gzip';
- } else if (array_key_exists('DEFLATE_POST', $section_text) && function_exists('gzcompress')) {
- $post = gzcompress($post, 9);
- $env['HTTP_CONTENT_ENCODING'] = 'deflate';
- }
-
save_text($tmp_post, $post);
$content_length = strlen($post);
@@ -1718,6 +1709,35 @@ TEST $file
$cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\"";
+ } else if (array_key_exists('GZIP_POST', $section_text) && !empty($section_text['GZIP_POST'])) {
+
+ $post = trim($section_text['GZIP_POST']);
+ $post = gzencode($post, 9, FORCE_GZIP);
+ $env['HTTP_CONTENT_ENCODING'] = 'gzip';
+
+ 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 = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\"";
+
+ } else if (array_key_exists('DEFLATE_POST', $section_text) && !empty($section_text['DEFLATE_POST'])) {
+ $post = trim($section_text['DEFLATE_POST']);
+ $post = gzcompress($post, 9);
+ $env['HTTP_CONTENT_ENCODING'] = 'deflate';
+ 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 = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\"";
+
+
} else {
$env['REQUEST_METHOD'] = 'GET';
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 215a3d265..7856e0c58 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -893,12 +893,13 @@ static int sapi_cgi_activate(TSRMLS_D)
zend_str_tolower(doc_root, doc_root_len);
#endif
php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, doc_root_len - 1 TSRMLS_CC);
+
+#ifdef PHP_WIN32
+ efree(doc_root);
+#endif
}
}
-#ifdef PHP_WIN32
- efree(doc_root);
-#endif
efree(path);
}
@@ -1614,21 +1615,21 @@ PHP_FUNCTION(apache_request_headers) /* {{{ */
p = var + 5;
var = q = t;
- // First char keep uppercase
+ /* First char keep uppercase */
*q++ = *p++;
while (*p) {
if (*p == '=') {
- // End of name
+ /* End of name */
break;
} else if (*p == '_') {
*q++ = '-';
p++;
- // First char after - keep uppercase
+ /* First char after - keep uppercase */
if (*p && *p!='=') {
*q++ = *p++;
}
} else if (*p >= 'A' && *p <= 'Z') {
- // lowercase
+ /* lowercase */
*q++ = (*p++ - 'A' + 'a');
} else {
*q++ = *p++;
diff --git a/sapi/cgi/tests/bug61605.phpt b/sapi/cgi/tests/bug61605.phpt
new file mode 100644
index 000000000..c6e4cf20c
--- /dev/null
+++ b/sapi/cgi/tests/bug61605.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #61605 (header_remove() does not remove all headers)
+--SKIPIF--
+<?php include "skipif.inc"; ?>
+--GET--
+foo=bar
+--FILE--
+<?php
+header("A: first");
+header("A: second", TRUE);
+$headers1 = headers_list();
+header("A: third", FALSE);
+$headers2 = headers_list();
+header_remove("A");
+$headers3 = headers_list();
+print_r($headers1);
+print_r($headers2);
+print_r($headers3);
+--EXPECTF--
+Array
+(
+ [0] => X-Powered-By: %s
+ [1] => A: second
+)
+Array
+(
+ [0] => X-Powered-By: %s
+ [1] => A: second
+ [2] => A: third
+)
+Array
+(
+ [0] => X-Powered-By: %s
+)
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 801e53ba2..205b9db3f 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -662,7 +662,7 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */
int php_optind = 1, orig_optind = 1;
char *exec_direct=NULL, *exec_run=NULL, *exec_begin=NULL, *exec_end=NULL;
char *arg_free=NULL, **arg_excp=&arg_free;
- char *script_file=NULL;
+ char *script_file=NULL, *translated_path = NULL;
int interactive=0;
int lineno = 0;
const char *param_error=NULL;
@@ -927,8 +927,13 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */
if (script_file) {
if (cli_seek_file_begin(&file_handle, script_file, &lineno TSRMLS_CC) != SUCCESS) {
goto err;
+ } else {
+ char real_path[MAXPATHLEN];
+ if (VCWD_REALPATH(script_file, real_path)) {
+ translated_path = strdup(real_path);
+ }
+ script_filename = script_file;
}
- script_filename = script_file;
} else {
/* We could handle PHP_MODE_PROCESS_STDIN in a different manner */
/* here but this would make things only more complicated. And it */
@@ -947,7 +952,7 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */
SG(request_info).argc=argc-php_optind+1;
arg_excp = argv+php_optind-1;
arg_free = argv[php_optind-1];
- SG(request_info).path_translated = (char*)file_handle.filename;
+ SG(request_info).path_translated = translated_path? translated_path: (char*)file_handle.filename;
argv[php_optind-1] = (char*)file_handle.filename;
SG(request_info).argv=argv+php_optind-1;
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 79ccea37d..87ab7b48f 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -98,7 +98,6 @@
#include "ext/standard/html.h"
#include "ext/standard/url.h" /* for php_url_decode() */
#include "ext/standard/php_string.h" /* for php_dirname() */
-#include "ext/standard/info.h" /* for php_info_print_style() */
#include "php_network.h"
#include "php_http_parser.h"
@@ -174,8 +173,6 @@ typedef struct php_cli_server_client {
php_cli_server_request request;
unsigned int content_sender_initialized:1;
php_cli_server_content_sender content_sender;
- php_cli_server_buffer capture_buffer;
- unsigned int capturing:1;
int file_fd;
} php_cli_server_client;
@@ -254,15 +251,17 @@ static php_cli_server_http_reponse_status_code_pair template_map[] = {
};
static php_cli_server_ext_mime_type_pair mime_type_map[] = {
+ { "html", "text/html" },
+ { "htm", "text/html" },
+ { "js", "text/javascript" },
+ { "css", "text/css" },
{ "gif", "image/gif" },
- { "png", "image/png" },
- { "jpe", "image/jpeg" },
{ "jpg", "image/jpeg" },
{ "jpeg", "image/jpeg" },
- { "css", "text/css" },
- { "html", "text/html" },
+ { "png", "image/png" },
+ { "jpe", "image/jpeg" },
+ { "svg", "image/svg+xml" },
{ "txt", "text/plain" },
- { "js", "text/javascript" },
{ NULL, NULL }
};
@@ -276,6 +275,27 @@ static void php_cli_server_log_response(php_cli_server_client *client, int statu
ZEND_DECLARE_MODULE_GLOBALS(cli_server);
+/* {{{ static char php_cli_server_css[]
+ * copied from ext/standard/info.c
+ */
+static const char php_cli_server_css[] = "<style type=\"text/css\">\n" \
+ "body {background-color: #ffffff; color: #000000;}\n" \
+ "body, td, th, h1, h2 {font-family: sans-serif;}\n" \
+ ".center {text-align: center;}\n" \
+ ".center table { margin-left: auto; margin-right: auto; text-align: left;}\n" \
+ ".center th { text-align: center !important; }\n" \
+ "h1 {font-size: 150%;}\n" \
+ "h2 {font-size: 125%;}\n" \
+ ".p {text-align: left;}\n" \
+ ".e {background-color: #ccccff; font-weight: bold; color: #000000;}\n" \
+ ".h {background-color: #9999cc; font-weight: bold; color: #000000;}\n" \
+ ".v {background-color: #cccccc; color: #000000;}\n" \
+ ".vr {background-color: #cccccc; text-align: right; color: #000000;}\n" \
+ "img {float: right; border: 0px;}\n" \
+ "hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}\n" \
+ "</style>\n";
+/* }}} */
+
static void char_ptr_dtor_p(char **p) /* {{{ */
{
pefree(*p, 1);
@@ -425,17 +445,7 @@ static int sapi_cli_server_ub_write(const char *str, uint str_length TSRMLS_DC)
if (!client) {
return 0;
}
- if (client->capturing) {
- php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new_self_contained(str_length);
- if (!chunk) {
- zend_bailout();
- }
- memmove(chunk->data.heap.p, str, str_length);
- php_cli_server_buffer_append(&client->capture_buffer, chunk);
- return str_length;
- } else {
- return php_cli_server_client_send_through(client, str, str_length);
- }
+ return php_cli_server_client_send_through(client, str, str_length);
} /* }}} */
static void sapi_cli_server_flush(void *server_context) /* {{{ */
@@ -470,7 +480,7 @@ static int sapi_cli_server_send_headers(sapi_headers_struct *sapi_headers TSRMLS
sapi_header_struct *h;
zend_llist_position pos;
- if (client == NULL || client->capturing || SG(request_info).no_headers) {
+ if (client == NULL || SG(request_info).no_headers) {
return SAPI_HEADER_SENT_SUCCESSFULLY;
}
@@ -1277,8 +1287,8 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
struct stat sb;
static const char *index_files[] = { "index.php", "index.html", NULL };
char *buf = safe_pemalloc(1, request->vpath_len, 1 + document_root_len + 1 + sizeof("index.html"), 1);
- char *p = buf, *prev_patch = 0, *q, *vpath;
- size_t prev_patch_len;
+ char *p = buf, *prev_path = NULL, *q, *vpath;
+ size_t prev_path_len;
int is_static_file = 0;
if (!buf) {
@@ -1327,8 +1337,8 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
file++;
}
if (!*file || is_static_file) {
- if (prev_patch) {
- pefree(prev_patch, 1);
+ if (prev_path) {
+ pefree(prev_path, 1);
}
pefree(buf, 1);
return;
@@ -1336,25 +1346,25 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
}
break; /* regular file */
}
- if (prev_patch) {
- pefree(prev_patch, 1);
+ if (prev_path) {
+ pefree(prev_path, 1);
*q = DEFAULT_SLASH;
}
while (q > buf && *(--q) != DEFAULT_SLASH);
- prev_patch_len = p - q;
- prev_patch = pestrndup(q, prev_patch_len, 1);
+ prev_path_len = p - q;
+ prev_path = pestrndup(q, prev_path_len, 1);
*q = '\0';
}
- if (prev_patch) {
- request->path_info_len = prev_patch_len;
+ if (prev_path) {
+ request->path_info_len = prev_path_len;
#ifdef PHP_WIN32
- while (prev_patch_len--) {
- if (prev_patch[prev_patch_len] == '\\') {
- prev_patch[prev_patch_len] = '/';
+ while (prev_path_len--) {
+ if (prev_path[prev_path_len] == '\\') {
+ prev_path[prev_path_len] = '/';
}
}
#endif
- request->path_info = prev_patch;
+ request->path_info = prev_path;
pefree(request->vpath, 1);
request->vpath = pestrndup(vpath, q - vpath, 1);
request->vpath_len = q - vpath;
@@ -1677,18 +1687,6 @@ static void destroy_request_info(sapi_request_info *request_info) /* {{{ */
{
} /* }}} */
-static void php_cli_server_client_begin_capture(php_cli_server_client *client) /* {{{ */
-{
- php_cli_server_buffer_ctor(&client->capture_buffer);
- client->capturing = 1;
-} /* }}} */
-
-static void php_cli_server_client_end_capture(php_cli_server_client *client) /* {{{ */
-{
- client->capturing = 0;
- php_cli_server_buffer_dtor(&client->capture_buffer);
-} /* }}} */
-
static int php_cli_server_client_ctor(php_cli_server_client *client, php_cli_server *server, int client_sock, struct sockaddr *addr, socklen_t addr_len TSRMLS_DC) /* {{{ */
{
client->server = server;
@@ -1713,7 +1711,6 @@ static int php_cli_server_client_ctor(php_cli_server_client *client, php_cli_ser
return FAILURE;
}
client->content_sender_initialized = 0;
- client->capturing = 0;
client->file_fd = -1;
return SUCCESS;
} /* }}} */
@@ -1730,9 +1727,6 @@ static void php_cli_server_client_dtor(php_cli_server_client *client) /* {{{ */
if (client->content_sender_initialized) {
php_cli_server_content_sender_dtor(&client->content_sender);
}
- if (client->capturing) {
- php_cli_server_buffer_dtor(&client->capture_buffer);
- }
} /* }}} */
static void php_cli_server_close_connection(php_cli_server *server, php_cli_server_client *client TSRMLS_DC) /* {{{ */
@@ -1768,43 +1762,11 @@ static int php_cli_server_send_error_page(php_cli_server *server, php_cli_server
php_cli_server_buffer_append(&client->content_sender.buffer, chunk);
}
{
- int err = 0;
- zval *style = NULL;
- zend_try {
- if (!SG(sapi_started)) {
- php_output_activate(TSRMLS_C);
- }
- php_output_start_user(NULL, 0, PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC);
- php_info_print_style(TSRMLS_C);
- MAKE_STD_ZVAL(style);
- php_output_get_contents(style TSRMLS_CC);
- php_output_discard(TSRMLS_C);
- if (!SG(sapi_started)) {
- static int (*send_header_func)(sapi_headers_struct * TSRMLS_DC);
- send_header_func = sapi_module.send_headers;
- /* we don't want the header to be sent now */
- sapi_module.send_headers = sapi_cli_server_discard_headers;
- php_output_deactivate(TSRMLS_C);
- sapi_module.send_headers = send_header_func;
- }
- if (style && Z_STRVAL_P(style)) {
- char *block = pestrndup(Z_STRVAL_P(style), Z_STRLEN_P(style), 1);
- php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new(block, block, Z_STRLEN_P(style));
- if (!chunk) {
- zval_ptr_dtor(&style);
- goto fail;
- }
- php_cli_server_buffer_append(&client->content_sender.buffer, chunk);
- zval_ptr_dtor(&style);
- } else {
- err = 1;
- }
- } zend_catch {
- err = 1;
- } zend_end_try();
- if (err) {
+ php_cli_server_chunk *chunk = php_cli_server_chunk_immortal_new(php_cli_server_css, sizeof(php_cli_server_css) - 1);
+ if (!chunk) {
goto fail;
}
+ php_cli_server_buffer_append(&client->content_sender.buffer, chunk);
}
{
static const char template[] = "</head><body>";
@@ -2052,10 +2014,13 @@ static int php_cli_server_dispatch(php_cli_server *server, php_cli_server_client
if (server->router) {
static int (*send_header_func)(sapi_headers_struct * TSRMLS_DC);
send_header_func = sapi_module.send_headers;
- /* we don't want the header to be sent now */
+ /* do not generate default content type header */
+ SG(sapi_headers).send_default_content_type = 0;
+ /* we don't want headers to be sent */
sapi_module.send_headers = sapi_cli_server_discard_headers;
php_request_shutdown(0);
sapi_module.send_headers = send_header_func;
+ SG(sapi_headers).send_default_content_type = 1;
SG(rfc1867_uploaded_files) = NULL;
}
if (SUCCESS != php_cli_server_begin_send_static(server, client TSRMLS_CC)) {
diff --git a/sapi/cli/tests/bug61546.phpt b/sapi/cli/tests/bug61546.phpt
new file mode 100644
index 000000000..2cd690f65
--- /dev/null
+++ b/sapi/cli/tests/bug61546.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #61546 (functions related to current script failed when chdir() in cli sapi)
+--FILE--
+<?php
+$php = getenv("TEST_PHP_EXECUTABLE");
+$test_code = <<<PHP
+<?php
+chdir('..');
+var_dump(get_current_user() != "");
+chdir('..');
+var_dump(getmyinode() != false);
+var_dump(getlastmod() != false);
+PHP;
+
+file_put_contents("bug61546_sub.php", $test_code);
+system($php . ' -n bug61546_sub.php');
+unlink("bug61546_sub.php");
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
diff --git a/sapi/cli/tests/bug61977.phpt b/sapi/cli/tests/bug61977.phpt
new file mode 100644
index 000000000..2f198060f
--- /dev/null
+++ b/sapi/cli/tests/bug61977.phpt
@@ -0,0 +1,157 @@
+--TEST--
+Bug #61977 (Need CLI web-server support for files with .htm & svg extensions)
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+include "php_cli_server.inc";
+php_cli_server_start('<?php ?>', true);
+$doc_root = __DIR__;
+
+list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS);
+$port = intval($port)?:80;
+
+$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+if (!$fp) {
+ die("connect failed");
+}
+
+file_put_contents($doc_root . '/foo.html', '');
+if(fwrite($fp, <<<HEADER
+GET /foo.html HTTP/1.1
+Host: {$host}
+
+
+HEADER
+)) {
+ while (!feof($fp)) {
+ $text = fgets($fp);
+ if (strncasecmp("Content-type:", $text, 13) == 0) {
+ echo "foo.html => ", $text;
+ }
+ }
+}
+@unlink($doc_root . '/foo.html');
+fclose($fp);
+
+
+$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+if (!$fp) {
+ die("connect failed");
+}
+file_put_contents($doc_root . '/foo.htm', '');
+if(fwrite($fp, <<<HEADER
+GET /foo.htm HTTP/1.1
+Host: {$host}
+
+
+HEADER
+)) {
+ while (!feof($fp)) {
+ $text = fgets($fp);
+ if (strncasecmp("Content-type:", $text, 13) == 0) {
+ echo "foo.htm => ", $text;
+ }
+ }
+}
+@unlink($doc_root . '/foo.htm');
+fclose($fp);
+
+
+$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+if (!$fp) {
+ die("connect failed");
+}
+file_put_contents($doc_root . '/foo.svg', '');
+if(fwrite($fp, <<<HEADER
+GET /foo.svg HTTP/1.1
+Host: {$host}
+
+
+HEADER
+)) {
+ while (!feof($fp)) {
+ $text = fgets($fp);
+ if (strncasecmp("Content-type:", $text, 13) == 0) {
+ echo "foo.svg => ", $text;
+ }
+ }
+}
+@unlink($doc_root . '/foo.svg');
+fclose($fp);
+
+$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+if (!$fp) {
+ die("connect failed");
+}
+file_put_contents($doc_root . '/foo.css', '');
+if(fwrite($fp, <<<HEADER
+GET /foo.css HTTP/1.1
+Host: {$host}
+
+
+HEADER
+)) {
+ while (!feof($fp)) {
+ $text = fgets($fp);
+ if (strncasecmp("Content-type:", $text, 13) == 0) {
+ echo "foo.css => ", $text;
+ }
+ }
+}
+@unlink($doc_root . '/foo.css');
+fclose($fp);
+
+$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+if (!$fp) {
+ die("connect failed");
+}
+file_put_contents($doc_root . '/foo.js', '');
+if(fwrite($fp, <<<HEADER
+GET /foo.js HTTP/1.1
+Host: {$host}
+
+
+HEADER
+)) {
+ while (!feof($fp)) {
+ $text = fgets($fp);
+ if (strncasecmp("Content-type:", $text, 13) == 0) {
+ echo "foo.js => ", $text;
+ }
+ }
+}
+@unlink($doc_root . '/foo.js');
+fclose($fp);
+
+$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+if (!$fp) {
+ die("connect failed");
+}
+file_put_contents($doc_root . '/foo.png', '');
+if(fwrite($fp, <<<HEADER
+GET /foo.png HTTP/1.1
+Host: {$host}
+
+
+HEADER
+)) {
+ while (!feof($fp)) {
+ $text = fgets($fp);
+ if (strncasecmp("Content-type:", $text, 13) == 0) {
+ echo "foo.png => ", $text;
+ }
+ }
+}
+@unlink($doc_root . '/foo.png');
+fclose($fp);
+?>
+--EXPECTF--
+foo.html => Content-Type: text/html; charset=UTF-8
+foo.htm => Content-Type: text/html; charset=UTF-8
+foo.svg => Content-Type: image/svg+xml
+foo.css => Content-Type: text/css; charset=UTF-8
+foo.js => Content-Type: text/javascript; charset=UTF-8
+foo.png => Content-Type: image/png
diff --git a/sapi/cli/tests/php_cli_server.inc b/sapi/cli/tests/php_cli_server.inc
index 44ee76ea7..3479cd0bd 100644
--- a/sapi/cli/tests/php_cli_server.inc
+++ b/sapi/cli/tests/php_cli_server.inc
@@ -1,5 +1,7 @@
<?php
-define ("PHP_CLI_SERVER_ADDRESS", "localhost:8964");
+define ("PHP_CLI_SERVER_HOSTNAME", "localhost");
+define ("PHP_CLI_SERVER_PORT", 8964);
+define ("PHP_CLI_SERVER_ADDRESS", PHP_CLI_SERVER_HOSTNAME.":".PHP_CLI_SERVER_PORT);
function php_cli_server_start($code = 'echo "Hello world";', $no_router = FALSE) {
$php_executable = getenv('TEST_PHP_EXECUTABLE');
@@ -32,6 +34,17 @@ function php_cli_server_start($code = 'echo "Hello world";', $no_router = FALSE)
$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
}
+
+ // note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
+ // it might not be listening yet...need to wait until fsockopen() call returns
+ $i = 0;
+ while (($i++ < 5) && !($fp = @fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT))) {
+ usleep(10000);
+ }
+
+ if ($fp) {
+ fclose($fp);
+ }
register_shutdown_function(
function($handle) use($router) {
@@ -40,7 +53,10 @@ function php_cli_server_start($code = 'echo "Hello world";', $no_router = FALSE)
},
$handle
);
- usleep(50000);
+ // don't bother sleeping, server is already up
+ // server can take a variable amount of time to be up, so just sleeping a guessed amount of time
+ // does not work. this is why tests sometimes pass and sometimes fail. to get a reliable pass
+ // sleeping doesn't work.
}
?>
diff --git a/sapi/cli/tests/php_cli_server_012.phpt b/sapi/cli/tests/php_cli_server_012.phpt
index a7d908187..9a1e60c48 100644
--- a/sapi/cli/tests/php_cli_server_012.phpt
+++ b/sapi/cli/tests/php_cli_server_012.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #60159 (Router returns false, but POST is not passed to requested resource)
+Bug #60159 (Router returns false, but POST is not passed to requested resource)
--SKIPIF--
<?php
include "skipif.inc";
diff --git a/sapi/cli/tests/php_cli_server_014.phpt b/sapi/cli/tests/php_cli_server_014.phpt
index 4b56caa70..2eca8706b 100644
--- a/sapi/cli/tests/php_cli_server_014.phpt
+++ b/sapi/cli/tests/php_cli_server_014.phpt
@@ -13,6 +13,10 @@ list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS);
$port = intval($port)?:80;
$output = '';
+// note: select() on Windows (& some other platforms) has historical issues with
+// timeouts less than 1000 millis(0.5). it may be better to increase these
+// timeouts to 1000 millis(1.0) (fsockopen eventually calls select()).
+// see articles like: http://support.microsoft.com/kb/257821
$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
if (!$fp) {
die("connect failed");
diff --git a/sapi/cli/tests/php_cli_server_016.phpt b/sapi/cli/tests/php_cli_server_016.phpt
index 3fd065a1c..f15aff124 100644
--- a/sapi/cli/tests/php_cli_server_016.phpt
+++ b/sapi/cli/tests/php_cli_server_016.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug #60591 (Memory leak when access a non-exists file)
--DESCRIPTION--
-this is a indirect test for bug 50691, since mem leak is reproted in the server side
+this is an indirect test for bug 60591, since mem leak is reproted in the server side
and require php compiled with --enable-debug
--SKIPIF--
<?php
diff --git a/sapi/cli/tests/php_cli_server_017.phpt b/sapi/cli/tests/php_cli_server_017.phpt
index 6c414a109..73530af48 100644
--- a/sapi/cli/tests/php_cli_server_017.phpt
+++ b/sapi/cli/tests/php_cli_server_017.phpt
@@ -41,4 +41,4 @@ Connection: close
X-Powered-By: %s
Content-type: text/html
-string(%d) "%s/tests/index.php"
+string(%d) "%sindex.php"
diff --git a/tests/basic/021.phpt b/tests/basic/021.phpt
index e79ac7dc2..eeaf58869 100644
--- a/tests/basic/021.phpt
+++ b/tests/basic/021.phpt
@@ -2,6 +2,7 @@
Bug #37276 (problems witch $_POST array)
--INI--
file_uploads=1
+upload_tmp_dir=.
--POST_RAW--
Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
-----------------------------20896060251896012921717172737
diff --git a/tests/basic/bug20539.phpt b/tests/basic/bug20539.phpt
index 67cef3a4f..1406ce088 100644
--- a/tests/basic/bug20539.phpt
+++ b/tests/basic/bug20539.phpt
@@ -11,7 +11,8 @@ session.save_path=./tests/basic/
<?php
print "good :)\n";
$filename = __DIR__ . '/sess_' . session_id();
- var_dump(unlink($filename));
+ var_dump(file_exists($filename));
+ @unlink($filename);
?>
--EXPECT--
good :)
diff --git a/tests/classes/ctor_in_interface_02.phpt b/tests/classes/ctor_in_interface_02.phpt
index 0c7931ed5..08e6f36e0 100755
--- a/tests/classes/ctor_in_interface_02.phpt
+++ b/tests/classes/ctor_in_interface_02.phpt
@@ -29,7 +29,6 @@ class implem13 implements constr1, constr3
{
}
}
-
?>
--EXPECTF--
Fatal error: Declaration of implem13::__construct() must be compatible with constr3::__construct($a) in %s on line %d
diff --git a/tests/output/ob_013.phpt b/tests/output/ob_013.phpt
index e96de46a4..ad2e36d47 100644
--- a/tests/output/ob_013.phpt
+++ b/tests/output/ob_013.phpt
@@ -39,7 +39,7 @@ Array
(
[name] => d
[type] => 1
- [flags] => 4209
+ [flags] => 20593
[level] => 4
[chunk_size] => %d
[buffer_size] => 16384
@@ -95,7 +95,7 @@ Array
(
[name] => d
[type] => 1
- [flags] => 4209
+ [flags] => 20593
[level] => 4
[chunk_size] => %d
[buffer_size] => 16384
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 8c4054da0..c0a1ce895 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -65,7 +65,7 @@ if (MODE_PHPIZE) {
WScript.Quit(10);
}
} else {
- if (!FSO.FileExists("README.SVN-RULES")) {
+ if (!FSO.FileExists("README.GIT-RULES")) {
STDERR.WriteLine("Must be run from the root of the php source");
WScript.Quit(10);
}
@@ -74,7 +74,7 @@ if (MODE_PHPIZE) {
var CWD = WshShell.CurrentDirectory;
if (typeof(CWD) == "undefined") {
- CWD = FSO.GetParentFolderName(FSO.GetAbsolutePathName("README.SVN-RULES"));
+ CWD = FSO.GetParentFolderName(FSO.GetAbsolutePathName("README.GIT-RULES"));
}
/* defaults; we pick up the precise versions from configure.in */
diff --git a/win32/build/libs_version.txt b/win32/build/libs_version.txt
index 37474fd07..39281d738 100644
--- a/win32/build/libs_version.txt
+++ b/win32/build/libs_version.txt
@@ -13,4 +13,4 @@ libssh2-1.3.0
libtidy-20090325
libxslt-1.1.23
libxml-2.7.7
-openssl-0.9.8t
+openssl-0.9.8u
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php
index 17f7cd020..5ed9bdc81 100644
--- a/win32/build/mkdist.php
+++ b/win32/build/mkdist.php
@@ -401,7 +401,7 @@ function copy_test_dir($directory, $dest)
while (FALSE !== ($file = readdir($directory_list))) {
$full_path = $directory . '/' . $file;
if($file != '.' && $file != '..' && $file != '.svn' && is_dir($full_path)) {
- if ($file == 'tests') {
+ if ($file == 'tests' || $file == 'examples') {
if (!is_dir($dest . '/' . $full_path)) {
mkdir($dest . '/' . $full_path , 0775, true);
}