summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS407
-rw-r--r--README.GIT-RULES13
-rw-r--r--README.RELEASE_PROCESS8
-rw-r--r--UPGRADING490
-rw-r--r--UPGRADING.INTERNALS188
-rw-r--r--Zend/tests/67468.phpt2
-rw-r--r--Zend/zend.h2
-rw-r--r--Zend/zend_virtual_cwd.h4
-rw-r--r--configure.ac2
-rw-r--r--ext/curl/tests/bug68937.phpt1
-rw-r--r--ext/curl/tests/bug68937_2.phpt1
-rw-r--r--ext/curl/tests/bug71523.phpt3
-rw-r--r--ext/curl/tests/bug72202.phpt3
-rw-r--r--ext/curl/tests/curl_multi_info_read.phpt1
-rw-r--r--ext/enchant/enchant.c4
-rw-r--r--ext/filter/tests/033_run.inc4
-rw-r--r--ext/intl/common/common_error.c2
-rw-r--r--ext/intl/formatter/formatter.c9
-rw-r--r--ext/intl/tests/dateformat_set_timezone_id2.phpt4
-rw-r--r--ext/intl/tests/formatter_format2.phpt5
-rw-r--r--ext/intl/tests/formatter_format_currency2.phpt4
-rw-r--r--ext/intl/tests/formatter_get_set_symbol2.phpt4
-rw-r--r--ext/intl/tests/intl_icu_data_version_constant.phpt3
-rw-r--r--ext/intl/tests/locale_filter_matches2.phpt4
-rw-r--r--ext/intl/tests/locale_get_display_name2.phpt4
-rw-r--r--ext/intl/tests/locale_get_display_region2.phpt6
-rw-r--r--ext/intl/tests/locale_get_display_script2.phpt5
-rw-r--r--ext/intl/tests/locale_get_display_script3.phpt5
-rw-r--r--ext/intl/tests/locale_get_display_script4.phpt4
-rw-r--r--ext/intl/tests/locale_get_display_variant2.phpt4
-rw-r--r--ext/intl/tests/locale_parse_locale2.phpt4
-rw-r--r--ext/intl/tests/msgfmt_fail2.phpt4
-rw-r--r--ext/intl/tests/normalizer_get_raw_decomposition.phpt4
-rw-r--r--ext/intl/tests/normalizer_normalize_kc_cf.phpt4
-rw-r--r--ext/intl/tests/resourcebundle_internal.phpt4
-rw-r--r--ext/mbstring/tests/overload01.phpt3
-rw-r--r--ext/mbstring/tests/overload02.phpt3
-rw-r--r--ext/openssl/tests/openssl_free_key.phpt3
-rw-r--r--ext/pdo_sqlite/pdo_sqlite.c1
-rw-r--r--ext/pdo_sqlite/php_pdo_sqlite_int.h1
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c24
-rw-r--r--ext/pdo_sqlite/tests/pdo_sqlite_statement_getattribute.phpt20
-rw-r--r--ext/phar/tests/cache_list/files/phar_test.inc4
-rw-r--r--ext/phar/tests/files/phar_test.inc4
-rw-r--r--ext/soap/tests/bugs/bug44811.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt1
-rw-r--r--ext/sockets/tests/mcast_ipv4_recv.phpt1
-rw-r--r--ext/standard/link.c6
-rw-r--r--ext/standard/link_win32.c64
-rw-r--r--ext/standard/tests/file/file_get_contents_error001.phpt1
-rw-r--r--ext/standard/tests/file/rename_variation7-win32.phpt2
-rw-r--r--ext/standard/tests/network/gethostbyname_basic001.phpt1
-rw-r--r--ext/standard/tests/strings/bug65947.phpt2
-rw-r--r--ext/standard/tests/strings/bug72434.phpt4
-rw-r--r--main/php_version.h6
-rw-r--r--run-tests.php2
-rw-r--r--win32/build/config.w3212
-rw-r--r--win32/build/confutils.js16
-rw-r--r--win32/ioutil.c32
-rw-r--r--win32/ioutil.h53
62 files changed, 247 insertions, 1238 deletions
diff --git a/NEWS b/NEWS
index 7000b4d9ac..a09bf97fe1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,411 +1,6 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? ????, PHP 7.3.0beta2
+?? ??? ????, PHP 7.4.0alpha1
-- gettext:
- . Fixed bug #76517 (incorrect restoring of LDFLAGS). (sji)
-
-- mbstring:
- . Fixed bug #76704 (mb_detect_order return value varies based on argument
- type). (cmb)
- . Fixed bug #76706 (mbstring.http_output_conv_mimetypes is ignored). (cmb)
-
-- phpdbg:
- . Fixed bug #76595 (phpdbg man page contains outdated information).
- (Kevin Abel)
-
-- zlib:
- . Fixed bug #65988 (Zlib version check fails when an include/zlib/ style dir
- is passed to the --with-zlib configure option). (Jay Bonci)
-
-02 Aug 2018, PHP 7.3.0beta1
-
-- Core:
- . Fixed bug #76667 (Segfault with divide-assign op and __get + __set).
- (Laruence)
-
-- PDO_PgSQL:
- . Fixed bug #75402 (Possible Memory Leak using PDO::CURSOR_SCROLL option).
- (Anatol)
-
-- SQLite3:
- . Fixed #76665 (SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle).
- (cmb)
-
-- Standard:
- . Fixed bug #68553 (array_column: null values in $index_key become incrementing
- keys in result). (Laruence)
- . Fixed bug #76643 (Segmentation fault when using `output_add_rewrite_var`).
- (cmb)
-
-19 Jul 2018, PHP 7.3.0alpha4
-
-- Core:
- . Fixed bug #33502 (Some nullary functions don't check the number of
- arguments). (cmb)
- . Fixed bug #76392 (Error relocating sapi/cli/php: unsupported relocation
- type 37). (Peter Kokot)
- . The declaration and use of case-insensitive constants has been deprecated.
- (Nikita)
- . Added syslog.filter INI entry for syslog filtering. (Philip Prindeville)
-
-- Calendar:
- . Fixed bug #52974 (jewish.c: compile error under Windows with GBK charset).
- (cmb)
-
-- Filter:
- . Added the 'add_slashes' sanitization mode (FILTER_SANITIZE_ADD_SLASHES).
- (Kalle)
- . Fixed bug #76366 (References in sub-array for filtering breaks the filter).
- (ZiHang Gao)
-
-- FPM:
- . Fixed bug #62596 (getallheaders() missing with PHP-FPM). (Remi)
- . Added fpm_get_status function. (Till Backhaus)
- . Fixed bug #69031 (Long messages into stdout/stderr are truncated
- incorrectly) - added new log related FPM configuration options:
- log_limit, log_buffering and decorate_workers_output. (Jakub Zelenka)
-
-- mbstring:
- . Fixed bug #76574 (use of undeclared identifiers INT_MAX and LONG_MAX). (cmb)
- . Fixed bug #76594 (Bus Error due to unaligned access in zend_ini.c
- OnUpdateLong). (cmb, Nikita)
-
-- PDO_Firebird:
- . Fixed bug #74462 (PDO_Firebird returns only NULLs for results with boolean
- for FIREBIRD >= 3.0). (Dorin Marcoci)
- . Fixed bug #76488 (Memory leak when fetching a BLOB field). (Simonov Denis)
-
-- Standard:
- . Fixed bug #73817 (Incorrect entries in get_html_translation_table). (cmb)
- . Fixed bug #76136 (stream_socket_get_name should enclose IPv6 in brackets).
- (seliver)
-
-- Zip:
- . Fixed bug #76524 (ZipArchive memory leak (OVERWRITE flag and empty archive)).
- (Timur Ibragimov)
-
-05 Jul 2018, PHP 7.3.0alpha3
-
-- Core:
- . Fixed bug #76534 (PHP hangs on 'illegal string offset on string references
- with an error handler). (Laruence)
- . Fixed bug #76520 (Object creation leaks memory when executed over HTTP).
- (Nikita)
- . Fixed bug #76502 (Chain of mixed exceptions and errors does not serialize
- properly). (Nikita)
- . Fixed bug #76509 (Inherited static properties can be desynchronized from
- their parent by ref). (Nikita)
- . Fixed bug #76439 (Changed behaviour in unclosed HereDoc). (Nikita, tpunt)
- . Added syslog.facility and syslog.ident INI entries for customizing syslog
- logging. (Philip Prindeville)
- . Fixed bug #63217 (Constant numeric strings become integers when used as
- ArrayAccess offset). (Rudi Theunissen, Dmitry)
-
-- DOM:
- . Fixed bug #76285 (DOMDocument::formatOutput attribute sometimes ignored).
- (Andrew Nester)
-
-- FPM:
- . Fixed bug #73342 (Vulnerability in php-fpm by changing stdin to
- non-blocking). (Nikita)
-
-- GMP:
- . Fixed bug #74670 (Integer Underflow when unserializing GMP and possible
- other classes). (Nikita)
-
-- intl:
- . Fixed bug #76556 (get_debug_info handler for BreakIterator shows wrong
- type). (cmb)
-
-- mbstring:
- . Fixed bug #76532 (Integer overflow and excessive memory usage
- in mb_strimwidth). (MarcusSchwarz)
-
-- OpenSSL:
- . Add min_proto_version and max_proto_version ssl stream options as well as
- related constants for possible TLS protocol values. (Jakub Zelenka)
-
-- PCRE:
- . Fixed bug #76512 (\w no longer includes unicode characters). (cmb)
- . Fixed bug #76514 (Regression in preg_match makes it fail with
- PREG_JIT_STACKLIMIT_ERROR). (Anatol)
-
-- PGSQL:
- . Fixed bug #76548 (pg_fetch_result did not fetch the next row). (Anatol)
-
-- phpdbg:
- . Fix arginfo wrt. optional/required parameters. (cmb)
-
-- Reflection:
- . Fixed bug #76536 (PHP crashes with core dump when throwing exception in
- error handler). (Laruence)
- . Fixed bug #75231 (ReflectionProperty#getValue() incorrectly works with
- inherited classes). (Nikita)
-
-- Standard:
- . Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys).
- (Laruence)
- . Fixed bug #71848 (getimagesize with $imageinfo returns false). (cmb)
- . Fixed bug #48016 (stdClass::__setState is not defined although var_export() uses it). (Andrea)
-
-- Tokenizer:
- . Fixed bug #76538 (token_get_all with TOKEN_PARSE flag fails to recognise
- close tag with newline). (Nikita)
-
-21 Jun 2018, PHP 7.3.0alpha2
-
-- Core:
- . Fixed bug #76427 (Segfault in zend_objects_store_put). (Laruence)
- . Fixed bug #76422 (ftruncate fails on files > 2GB). (Anatol)
-
-- CLI:
- . Fixed bug #44217 (Output after stdout/stderr closed cause immediate exit
- with status 0). (Robert Lu)
-
-- Date:
- . Fixed bug #76462 (Undefined property: DateInterval::$f). (Anatol)
-
-- EXIF:
- . Fixed bug #76409 (heap use after free in _php_stream_free). (cmb)
-
-- Interbase:
- . Fixed bug #76443 (php+php_interbase.dll crash on module_shutdown). (Kalle)
-
-- Mysqlnd:
- . Fixed bug #76386 (Prepared Statement formatter truncates fractional seconds
- from date/time column). (Victor Csiky)
-
-- Opcache:
- . Fixed bug #76477 (Opcache causes empty return value).
- (Nikita, Laruence)
- . Fixed bug #76466 (Loop variable confusion). (Dmitry, Laruence, Nikita)
- . Fixed bug #76463 (var has array key type but not value type). (Laruence)
- . Fixed bug #76446 (zend_variables.c:73: zend_string_destroy: Assertion
- `!(zval_gc_flags((str)->gc)). (Nikita, Laruence)
-
-- Tokenizer:
- . Fixed bug #76437 (token_get_all with TOKEN_PARSE flag fails to recognise
- close tag). (Laruence)
- . Fixed bug #75218 (Change remaining uncatchable fatal errors for parsing
- into ParseError). (Nikita)
-
-- ZIP:
- . Fixed bug #76461 (OPSYS_Z_CPM defined instead of OPSYS_CPM).
- (Dennis Birkholz, Remi)
-
-07 Jun 2018, PHP 7.3.0alpha1
-
-- Core:
- . Improved PHP GC. (Dmitry, Nikita)
- . Redesigned the old ext_skel program written in PHP, run:
- 'php ext_skel.php' for all options. This means there are no dependencies,
- thus making it work on Windows out of the box. (Kalle)
- . Removed support for BeOS. (Kalle)
- . Add PHP_VERSION to phpinfo() <title/>. (github/MattJeevas)
- . Add net_get_interfaces(). (Sara, Joe, Anatol)
- . Implemented flexible heredoc and nowdoc syntax, per
- RFC https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes.
- (Thomas Punt)
- . Added support for references in list() and array destructuring, per
- RFC https://wiki.php.net/rfc/list_reference_assignment.
- (David Walker)
- . Fixed bug #75683 (Memory leak in zend_register_functions() in ZTS mode).
- (Dmitry)
- . Fixed bug #75031 (support append mode in temp/memory streams). (adsr)
- . Fixed bug #74860 (Uncaught exceptions not being formatted properly when
- error_log set to "syslog"). (Philip Prindeville)
- . Fixed bug #75220 (Segfault when calling is_callable on parent).
- (andrewnester)
- . Fixed bug #69954 (broken links and unused config items in distributed ini
- files). (petk)
- . Fixed bug #74922 (Composed class has fatal error with duplicate, equal const
- properties). (pmmaga)
- . Fixed bug #63911 (identical trait methods raise errors during composition).
- (pmmaga)
- . Fixed bug #75677 (Clang ignores fastcall calling convention on variadic
- function). (Li-Wen Hsu)
- . Fixed bug #54043 (Remove inconsitency of internal exceptions and user
- defined exceptions). (Nikita)
- . Fixed bug #53033 (Mathematical operations convert objects to integers).
- (Nikita)
- . Fixed bug #73108 (Internal class cast handler uses integer instead of
- float). (Nikita)
- . Fixed bug #75765 (Fatal error instead of Error exception when base class is
- not found). (Timur Ibragimov)
- . Fixed bug #76198 (Wording: "iterable" is not a scalar type). (Levi Morrison)
- . Fixed bug #76137 (config.guess/config.sub do not recognize RISC-V). (cmb)
- . Improved effectiveness of ZEND_SECURE_ZERO for NetBSD and systems
- without native similar feature (devnexen).
-
-- BCMath:
- . Fixed bug #66364 (BCMath bcmul ignores scale parameter). (cmb)
- . Implemented request #67855 (No way to get current scale in use). (Chris
- Wright, cmb)
- . Fixed bug #75164 (split_bc_num() is pointless). (cmb)
- . Fixed bug #75169 (BCMath errors/warnings bypass PHP's error handling). (cmb)
-
-- cURL:
- . Fixed bug #74125 (Fixed finding CURL on systems with multiarch support).
- (cebe)
-
-- Date:
- . Implemented FR #74668: Add DateTime::createFromImmutable() method.
- (majkl578, Rican7)
- . Fixed bug #75222 (DateInterval microseconds property always 0). (jhdxr)
- . Fixed bug #68406 (calling var_dump on a DateTimeZone object modifies it).
- (jhdxr)
- . Fixed bug #76131 (mismatch arginfo for date_create). (carusogabriel)
-
-- DBA:
- . Fixed bug #75264 (compiler warnings emitted). (petk)
-
-- GD:
- . Added support for WebP in imagecreatefromstring() (Andreas Treichel, cmb).
-
-- GMP:
- . Export internal structures and accessor helpers for GMP object. (Sara)
- . Added gmp_binomial(n, k). (Nikita)
- . Added gmp_lcm(a, b). (Nikita)
- . Added gmp_perfect_power(a). (Nikita)
- . Added gmp_kronecker(a, b). (Nikita)
-
-- interbase:
- . Fixed bug #75453 (Incorrect reflection for ibase_[p]connect). (villfa)
-
-- intl:
- . Fixed bug #75317 (UConverter::setDestinationEncoding changes source instead
- of destination). (andrewnester)
-
-- JSON:
- . Added JSON_THROW_ON_ERROR flag. (Andrea)
-
-- LDAP:
- . Added ldap_exop_refresh helper for EXOP REFRESH operation with dds overlay.
- (Come)
- . Added full support for sending and parsing ldap controls (Come)
- . Fixed bug #49876 (Fix LDAP path lookup on 64-bit distros). (dzuelke)
-
-- libxml2:
- . Fixed bug #75871 (use pkg-config where available). (pmmaga)
-
-- litespeed:
- . Fixed bug #75248 (Binary directory doesn't get created when building
- only litespeed SAPI). (petk)
- . Fixed bug #75251 (Missing program prefix and suffix). (petk)
-
-- mbstring:
- . Fixed bug #65544 (mb title case conversion-first word in quotation isn't
- capitalized). (Nikita)
- . Fixed bug #71298 (MB_CASE_TITLE misbehaves with curled apostrophe/quote.
- (Nikita)
- . Fixed bug #73528 (Crash in zif_mb_send_mail). (Nikita)
- . Fixed bug #74929 (mbstring functions version 7.1.1 are slow compared to 5.3
- on Windows). (Nikita)
- . Fixed bug #76319 (mb_strtolower with invalid UTF-8 causes segmentation
- fault). (Nikita)
- . Updated to Oniguruma 6.8.2. (cmb)
-
-- ODBC:
- . Removed support for ODBCRouter. (Kalle)
- . Removed support for Birdstep. (Kalle)
-
-- OpenSSL:
- . Added openssl_pkey_derive function. (Jim Zubov)
-
-- PCRE:
- . Implemented https://wiki.php.net/rfc/pcre2-migration (Anatol, Dmitry)
- . Fixed bug #75355 (preg_quote() does not quote # control character).
- (Michael Moravec)
-
-- PDO_DBlib:
- . Implemented request #69592 (allow 0-column rowsets to be skipped
- automatically). (fandrieu)
- . Fixed bug #74243 (allow locales.conf to drive datetime format). (fandrieu)
- . Expose TDS version as \PDO::DBLIB_ATTR_TDS_VERSION attribute on \PDO
- instance. (fandrieu)
- . Treat DATETIME2 columns like DATETIME. (fandrieu)
-
-- PDO_OCI:
- . Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized
- before PHP-FPM sets it up). (Ingmar Runge)
-
-- PDO SQLite
- . Add support for additional open flags
-
-- pgsql:
- . Added new error constants for pg_result_error(): (Kalle)
- - Requires Postgres 9.3
- - PGSQL_DIAG_SCHEMA_NAME
- - PGSQL_DIAG_TABLE_NAME
- - PGSQL_DIAG_COLUMN_NAME
- - PGSQL_DIAG_DATATYPE_NAME
- - PGSQL_DIAG_CONSTRAINT_NAME
- - Requires Postgres 9.6
- - PGSQL_DIAG_SEVERITY_NONLOCALIZED
-
-- phar:
- . Fixed bug #74991 (include_path has a 4096 char limit in some cases).
- (bwbroersma)
- . Fixed bug #65414 (deal with leading slash when adding files correctly).
- (bishopb)
-
-- readline:
- . Added completion_append_character and completion_suppress_append options
- to readline_info() if linked against libreadline. (krageon)
-
-- Session:
- . Fixed bug #74941 (session fails to start after having headers sent).
- (morozov)
-
-- SimpleXML:
- . Fixed bug #54973 (SimpleXML casts integers wrong). (Nikita)
-
-- SOAP:
- . Fixed bug #75464 (Wrong reflection on SoapClient::__setSoapHeaders). (villfa)
- . Fixed bug #70469 (SoapClient generates E_ERROR even if exceptions=1 is
- used). (Anton Artamonov)
-
-- SPL:
- . Fixed bug #74977 (Appending AppendIterator leads to segfault).
- (Andrew Nester)
- . Fixed bug #75173 (incorrect behavior of AppendIterator::append in foreach
- loop). (jhdxr)
- . Fixed bug #74372 (autoloading file with syntax error uses next autoloader,
- may hide parse error). (Nikita)
- . Fixed bug #75878 (RecursiveTreeIterator::setPostfix has wrong signature).
- (cmb)
- . Fixed bug #74519 (strange behavior of AppendIterator). (jhdxr)
- . Fixed bug #76131 (mismatch arginfo for splarray constructor).
- (carusogabriel)
-
-- SQLite3:
- . Updated bundled libsqlite to 3.24.0. (cmb)
-
-- Standard:
- . Added is_countable() function. (Gabriel Caruso)
- . Fixed bug #75916 (DNS_CAA record results contain garbage). (Mike,
- Philip Sharp)
- . Fixed unserialize(), to disable creation of unsupported data structures
- through manually crafted strings. (Dmitry)
- . Fixed bug #75409 (accept EFAULT in addition to ENOSYS as indicator
- that getrandom() is missing). (sarciszewski)
- . Fixed bug #74719 (fopen() should accept NULL as context). (Alexander Holman)
- . Fixed bug #69948 (path/domain are not sanitized in setcookie). (cmb)
- . Fixed bug #75996 (incorrect url in header for mt_rand). (tatarbj)
- . Remove superfluous warnings from inet_ntop()/inet_pton(). (daverandom)
- . Added hrtime() function, to get high resolution time. (welting)
-
-- Testing:
- . Implemented request #62055 (Make run-tests.php support --CGI-- sections).
- (cmb)
-
-- Tidy:
- . Fixed bug #74707 (Tidy has incorrect ReflectionFunction param counts for
- functions taking tidy). (Gabriel Caruso)
- . Support using tidyp instead of tidy (devnexen).
-
-- Zlib:
- . Added zlib/level context option for compress.zlib wrapper. (Sara)
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
diff --git a/README.GIT-RULES b/README.GIT-RULES
index 1a0c1aebae..e4a04ff9ab 100644
--- a/README.GIT-RULES
+++ b/README.GIT-RULES
@@ -46,6 +46,10 @@ Currently we have the following branches in use::
master The active development branch.
+ PHP-7.3 Is used to release the PHP 7.3.x series. This is a current
+ non stable version and is open for bugfixes and minor improvements
+ only.
+
PHP-7.2 Is used to release the PHP 7.2.x series. This is a current
stable version and is open for bugfixes only.
@@ -75,10 +79,11 @@ Currently we have the following branches in use::
The next few rules are more of a technical nature::
- 1. All changes should first go to the lowest branch (i.e. 5.6) and then
- get merged up to all other branches. If a change is not needed for
- later branches (i.e. fixes for features which were dropped from later
- branches) an empty merge should be done.
+ 1. All non-security bugfix changes should first go to the lowest bugfix
+ branch (i.e. 7.1) and then get merged up to all other branches.
+ All security fixes should go to the lowest security fixes branch (i.e 5.6).
+ If a change is not needed for later branches (i.e. fixes for features
+ which were 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 *any
diff --git a/README.RELEASE_PROCESS b/README.RELEASE_PROCESS
index c5c59c546a..b53858973a 100644
--- a/README.RELEASE_PROCESS
+++ b/README.RELEASE_PROCESS
@@ -338,9 +338,11 @@ Forking a new release branch
Example: http://news.php.net/php.internals/99864
2. Just prior to cutting X.Y.0beta1, create the new branch locally.
- Add a commit on master after the branch point clearing the NEWS file, and updating
- main/php_versions.h and Zend/zend.h to update versions.
- Example: https://github.com/php/php-src/commit/5230541ef59e0637d5522293a7d099bf18ce6af3
+ Add a commit on master after the branch point clearing the NEWS, UPGRADING
+ and UPGRADING.INTERNALS files, updating the version in configure.ac (run
+ ./configure to automatically update main/php_versions.h, too) and Zend/zend.h.
+ Also list the new branch in README.GIT-RULES.
+ Example: http://git.php.net/?p=php-src.git;a=commit;h=a63c99b
Push the new branch and the commit just added to master.
3. Immediately notify internals@ of the branch cut and advise the new merging order:
diff --git a/UPGRADING b/UPGRADING
index 634b10deab..c97edf9525 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -1,4 +1,4 @@
-PHP 7.3 UPGRADE NOTES
+PHP 7.4 UPGRADE NOTES
1. Backward Incompatible Changes
2. New Features
@@ -19,419 +19,30 @@ PHP 7.3 UPGRADE NOTES
1. Backward Incompatible Changes
========================================
-Core:
- . The ext_skel utility has been completely redesigned with new options and
- some old options removed. This is now written in PHP and has no external
- dependencies.
- . Support for BeOS has been dropped.
- . Exceptions thrown due to automatic conversion of warnings into exceptions
- in EH_THROW mode (e.g. some DateTime exceptions) no longer populate
- error_get_last() state. As such, they now work the same way as manually
- thrown exceptions.
- . TypeError now reports wrong types as `int` and `bool` instead of `integer`
- and `boolean`.
- . Due to the introduction of flexible heredoc/nowdoc syntax (see New Features
- section), doc strings that contain the ending label inside their body may
- cause syntax errors or change in interpretation. For example in
-
- $str = <<<FOO
- abcdefg
- FOO
- FOO;
-
- the indented occurrence of "FOO" did not previously have any special
- meaning. Now it will be interpreted as the end of the heredoc string and
- the following "FOO;" will cause a syntax error. This issue can always be
- resolved by choosing an ending label that does not occur within the contents
- of the string.
- . "continue" statements targeting "switch" control flow structures will now
- generate a warning. In PHP such "continue" statements are equivalent to
- "break", while they behave as "continue 2" in other languages.
-
- while ($foo) {
- switch ($bar) {
- case "baz":
- continue;
- // Warning: "continue" targeting switch is equivalent to
- "break". Did you mean to use "continue 2"?
- }
- }
-
- . Array accesses of type $obj["123"], where $obj implements ArrayAccess and
- "123" is an integral string literal will no longer result in an implicit
- conversion to integer, i.e., $obj->offsetGet("123") will be called instead
- of $obj->offsetGet(123). This matches existing behavior for non-literals.
- The behavior of arrays is not affected in any way, they continue to
- implicitly convert integeral string keys to integers.
- . In PHP, static properties are shared between inheriting classes, unless the
- static property is explicitly overridden in a child class. However, due to
- an implementation artifact it was possible to separate the static properties
- by assigning a reference. This loophole has been fixed.
-
- class Test {
- public static $x = 0;
- }
- class Test2 extends Test { }
-
- Test2::$x = &$x;
- $x = 1;
-
- var_dump(Test::$x, Test2::$x);
- // Previously: int(0), int(1)
- // Now: int(1), int(1)
-
- . References returned by array and property accesses are now unwrapped as
- part of the access. This means that it is no longer possible to modify the
- reference between the access and the use of the accessed value:
-
- $arr = [1];
- $ref =& $arr[0];
- var_dump($arr[0] + ($arr[0] = 2));
- // Previously: int(4), Now: int(3)
-
- This makes the behavior of references and non-references consistent. Please
- note that reading and writing a value inside a single expression remains
- undefined behavior and may change again in the future.
-
- . Argument unpacking stopped working with Traversables with non-integer keys.
- The following code worked in PHP 7.0-7.2 by accident.
-
- function foo(...$args) {
- var_dump($args);
- }
- function gen() {
- yield 1.23 => 123;
- }
- foo(...gen());
-
- Now it generates an exception.
-
-BCMath:
- . All warnings thrown by BCMath functions are now using PHP's error handling.
- Formerly some warnings have directly been written to stderr.
- . bcmul() and bcpow() now return numbers with the requested scale. Formerly,
- the returned numbers may have omitted trailing decimal zeroes.
-
-MBString:
- . Due to added support for named captures, mb_ereg_*() patterns using named
- captures will behave differently. In particular named captures will be part
- of matches and mb_ereg_replace() will interpret additional syntax. See
- "New Features" section for more information.
-
-mysqli:
- . Prepared statements now properly report the fractional seconds for DATETIME/
- TIME/TIMESTAMP columns with decimals specifier (e.g. TIMESTAMP(6) when using
- microseconds). Formerly, the fractional seconds part was simply omitted from
- the returned values.
-
-PDO/MySQL:
- . Prepared statements now properly report the fractional seconds for DATETIME/
- TIME/TIMESTAMP columns with decimals specifier (e.g. TIMESTAMP(6) when using
- microseconds). Formerly, the fractional seconds part was simply omitted from
- the returned values.
- Please note that this only affects the usage of PDO_MYSQL with emulated
- prepares turned off (e.g. using the native preparation functionality).
- Statements using connections having PDO::ATTR_EMULATE_PREPARES=true (which
- is the default) were not affected by the bug fixed and have already been
- getting the proper fractional seconds values from the engine.
-
-Reflection:
- . Reflection export to string now uses `int` and `bool` instead of `integer`
- and `boolean`.
-
-SPL:
- . If an SPL autoloader throws an exception, following autoloaders will not be
- executed. Previously all autoloaders were executed and exceptions were
- chained.
-
-SimpleXML:
- . Mathematic operations involving SimpleXML objects will now treat the text as
- an integer or float, whichever is more appropriate. Previously values were
- treated as integers unconditionally.
-
-Standard:
- . Undefined variables passed to compact() will now be reported as a notice.
- . getimagesize() and related functions now report the mime type of BMP images
- as image/bmp instead of image/x-ms-bmp, since the former has been registered
- with the IANA (see RFC 7903).
- . stream_socket_get_name() will now return IPv6 addresses wrapped in brackets.
- For example "[::1]:1337" will be returned instead of "::1:1337".
-
========================================
2. New Features
========================================
-Core:
- . Implemented flexible heredoc and nowdoc syntax: The closing marker for doc
- strings is no longer required to be followed by a semicolon or newline.
- Additionally the closing marker may be indented, in which case the
- indentation will be stripped from all lines in the doc string.
- (RFC: https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes)
- . Array destructuring now supports reference assignments using the syntax
- [&$a, [$b, &$c]] = $d. The same is also supported for list().
- (RFC: https://wiki.php.net/rfc/list_reference_assignment)
- . instanceof now allows literals as the first operand,
- in which case the result is always FALSE.
- . A new CompileError exception has been added, from which ParseError inherits.
- A small number of compilation errors will now throw a CompileError instead
- of generating a fatal error. Currently this only affects compilation errors
- that may be thrown by token_get_all() in TOKEN_PARSE mode, but more errors
- may be converted in the future.
- . Trailing commas in function and method calls are now allowed.
- (RFC: https://wiki.php.net/rfc/trailing-comma-function-calls)
-
-BCMath:
- . bcscale() can now also be used as getter to retrieve the current scale in use.
-
-MBString:
- . Support for full case-mapping and case-folding has been added. Unlike simple
- case-mapping, full case-mapping may change the length of the string. For
- example:
-
- mb_strtoupper("Straße")
- // Produces STRAßE on PHP 7.2
- // Produces STRASSE on PHP 7.3
-
- The different casing mapping and folding modes are available through
- mb_convert_case():
-
- . MB_CASE_LOWER (used by mb_strtolower)
- . MB_CASE_UPPER (used by mb_strtoupper)
- . MB_CASE_TITLE
- . MB_CASE_FOLD
- . MB_CASE_LOWER_SIMPLE
- . MB_CASE_UPPER_SIMPLE
- . MB_CASE_TITLE_SIMPLE
- . MB_CASE_FOLD_SIMPLE (used by case-insensitive operations)
-
- Only unconditional, language agnostic full case-mapping is performed.
- . Case-insensitive string operations now use case-folding instead of case-
- mapping during comparisons. This means that more characters will be
- considered (case insensitively) equal now.
- . mb_convert_case() with MB_CASE_TITLE now performs title-case conversion
- based on the Cased and CaseIgnorable derived Unicode properties. In
- particular this also improves handling of quotes and apostophes.
- . Data tables have been updated for Unicode 11.
- . Mbstring now correctly supports strings larger than 2GB.
- . Performance of the mbstring extension has been significantly improved
- across the board. The largest improvements are in case conversion functions.
- . mb_ereg_*() functions now support named captures. Matching functions like
- mb_ereg() will now return named captures both using their group number and
- their name, similar to PCRE:
-
- mb_ereg('(?<word>\w+)', '国', $matches);
- // => [0 => "国", 1 => "国", "word" => "国"];
-
- Additionally, mb_ereg_replace() now supports the \k<> and \k'' notations
- to reference named captures in the replacement string:
-
- mb_ereg_replace('\s*(?<word>\w+)\s*', "_\k<word>_\k'word'_", ' foo ');
- // => "_foo_foo_"
-
- \k<> and \k'' can also be used for numbered references, which also works
- with group numbers greater than 9.
-
-readline:
- . Support for the completion_append_character and completion_suppress_append
- options has been added to readline_info(). These options are only available
- if PHP is linked against libreadline (rather than libedit).
-
-Standard:
- . The --with-password-argon2[=dir] configure argument now provides support for
- both Argon2i and Argon2id hashes in the password_hash(), password_verify(),
- password_get_info(), and password_needs_rehash() functions. Passwords may be
- hashed and verified using the PASSWORD_ARGON2ID constant.
- Support for both Argon2i and Argon2id in the password_* functions now requires
- PHP be linked against libargon2 reference library >= 20161029.
- (RFC: https://wiki.php.net/rfc/argon2_password_hash_enhancements).
-
========================================
3. Changes in SAPI modules
========================================
-phpdbg:
- . The unused constants PHPDBG_FILE, PHPDBG_METHOD, PHPDBG_LINENO and
- PHPDBG_FUNC have been removed.
-
-FPM:
- . The getallheaders function is now also available.
-
========================================
4. Deprecated Functionality
========================================
-Core:
- . The declaration of case-insensitive constants has been deprecated. Passing
- true as the third argument to define() will now generate a deprecation
- warning. The use of case-insensitive constants with a case that differs from
- the declaration is also deprecated.
- (RFC: https://wiki.php.net/rfc/case_insensitive_constant_deprecation)
- . Declaring a function called assert() inside a namespace is deprecated.
- The assert() function is subject to special handling by the engine, which
- may lead to inconsistent behavior when defining a namespaced function with
- the same name.
-
-Filter:
- . The explicit usage of the constants FILTER_FLAG_SCHEME_REQUIRED and
- FILTER_FLAG_HOST_REQUIRED is now deprecated; both are implied for
- FILTER_VALIDATE_URL anyway.
-
-GD:
- . image2wbmp() has been deprecated.
-
-Intl:
- . Usage of the Normalizer::NONE form throws a deprecation warning, if PHP is
- linked with ICU >= 56.
-
-Mbstring:
- . The following undocumented mbereg_*() aliases have been deprecated. Use the
- corresponding mb_ereg_*() variants instead.
- . mbregex_encoding()
- . mbereg()
- . mberegi()
- . mbereg_replace()
- . mberegi_replace()
- . mbsplit()
- . mbereg_match()
- . mbereg_search()
- . mbereg_search_pos()
- . mbereg_search_regs()
- . mbereg_search_init()
- . mbereg_search_getregs()
- . mbereg_search_getpos()
- . mbereg_search_setpos()
-
-PDO ODBC:
- . The pdo_odbc.db2_instance_name ini setting has been formally deprecated. It
- has already been deprecated in the documentation since PHP 5.1.1.
-
-Standard:
- . Passing a non-string needle to string search functions is deprecated. In the
- future the needle will be interpreted as a string instead of an ASCII codepoint.
- Depending on the intended behavior, you should either explicitly cast the
- needle to string or perform an explicit call to ord(). The following functions
- are affected:
- . strpos()
- . strrpos()
- . stripos()
- . strripos()
- . strstr()
- . strchr()
- . strrchr()
- . stristr()
- . The fgetss() function and the string.strip_tags stream filter have been deprecated.
- This also affects the SplFileObject::fgetss() method and gzgetss() function.
-
========================================
5. Changed Functions
========================================
-JSON:
- . A new flag has been added, JSON_THROW_ON_ERROR, which can be used with
- json_decode() or json_encode() and causes these functions to throw a
- JsonException upon an error, instead of setting the global error state that
- is retrieved with json_last_error(). JSON_PARTIAL_OUTPUT_ON_ERROR takes
- precedence over JSON_THROW_ON_ERROR.
- (RFC: https://wiki.php.net/rfc/json_throw_on_error)
-
-Session:
- . session_set_cookie_params() now also supports the following signature:
- session_set_cookie_params(array $options)
- where $options is an associative array which may have any of the keys
- "lifetime", "path", "domain", "secure", "httponly" and "samesite".
- Accordingly, the return value of session_get_cookie_params() now also has an
- element with the key "samesite".
-
-Standard:
- . debug_zval_dump() was changed to display recursive arrays and objects
- in the same way as var_dump(). Now, it doesn't display them twice.
- . array_push() and array_unshift() can now also be called with a single
- argument, which is particularly convenient wrt. the spread operator.
- . setcookie() and setrawcookie() now also support the following signature:
- set(raw)cookie(string $name, [string $value, [array $options]])
- where $options is an associative array which may have any of the keys
- "expires", "path", "domain", "secure", "httponly" and "samesite".
-
-PCRE:
- . preg_quote() now also escapes the '#' character.
-
========================================
6. New Functions
========================================
-Core:
- . Added monotonic timer function hrtime([bool get_as_num]). It returns an
- array of the form [seconds, nanoseconds] with the timestamp starting at
- an unspecified point in the past. If the optional argument is passed as
- true, the return value is an integer on 64-bit systems or float on
- 32-bit systems, representing the nanoseconds. The timestamp is not
- adjustable and is not related to wall clock or time of day. The timers
- are available under Linux, FreeBSD, Windows, Mac, SunOS, AIX and their
- derivatives. If no required timers are provided by a corresponding
- platform, the function returns false.
-
-Date:
- . Added the DateTime::createFromImmutable() method, which mirrors
- DateTimeImmutable::createFromMutable().
-
-FPM:
- . Added fpm_get_status() function which returns FPM status info array.
-
-GMP:
- . Added gmp_binomial(n, k) for calculating binomial coefficients.
- . Added gmp_lcm(a, b) for calculating the least common multiple.
- . Added gmp_perfect_power(a) to check if number is a perfect power.
- . Added gmp_kronecker(a, b) to compute the Kronecker symbol.
-
-Intl:
- . Added void Spoofchecker::setRestrictionLevel(int $level) method, available
- when linked with ICU >= 58.1. Levels are represented as class constants
- - Spoofchecker::ASCII
- - Spoofchecker::HIGHLY_RESTRICTIVE
- - Spoofchecker::MODERATELY_RESTRICTIVE
- - Spoofchecker::MINIMALLY_RESTRICTIVE
- - Spoofchecker::UNRESTRICTIVE
- - Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE
- For the detailed documentation on the restriction levels, see
- URestrictionLevel under
- http://icu-project.org/apiref/icu4c/uspoof_8h.html
- . Added Normalizer::getRawDecomposition() and normalizer_get_raw_decomposition(),
- to retrieve the Decomposition_Mapping property of a character.
-
-OpenSSL:
- . Added openssl_pkey_derive that derives a shared secret for DH, ECDH and
- possibly other future algorithms supported by EVP_PKEY_derive.
-
-Sockets:
- . Added functions to import/export the WSAPROTOCOL_INFO info struct. This
- implementation complements the already supported SCM_RIGHTS as in
- man 3 cmsg and is Windows specific. For the import/export, the default
- system securities apply for the SHM reading/writing. The socket becomes
- invalid, when the last reference to it is closed.
- - socket_wsaprotocol_info_export(resource $sock, int $pid) - exports the
- WSAPROTOCOL_INFO structure into shared memory and returns an identifier
- to be used for the import, or false on failure. The exported ID is
- only valid for the dedicated PID.
- - socket_wsaprotocol_info_import(string $id) - returns a duplicated
- socket as per the passed identifier, or false on failure.
- - socket_wsaprotocol_info_release(string $id) - releases the shared memory
- corresponding to the passed identifier.
-
-Standard:
- . Added is_countable() function, to check whether a value may be passed to
- count().
- (RFC: https://wiki.php.net/rfc/is-countable)
- . Added array_key_first() and array_key_last() which retrieve the first and
- last key of an array, respectively.
- (RFC: <https://wiki.php.net/rfc/array_key_first_last>)
-
========================================
7. New Classes and Interfaces
========================================
-JSON:
- . JsonException
-
========================================
8. Removed Extensions and SAPIs
========================================
@@ -440,117 +51,18 @@ JSON:
9. Other Changes to Extensions
========================================
- Curl:
- . libcurl >= 7.15.5 is now required.
-
- Filter:
- . FILTER_VALIDATE_FLOAT now also supports a `thousand` option, which
- defines the set of allowed thousand separator chars. The default (`"',."`)
- is fully backward compatible with former PHP versions.
- . FILTER_SANITIZE_ADD_SLASHES has been added as an alias of the 'magic_quotes'
- filter (FILTER_SANITIZE_MAGIC_QUOTES). The 'magic_quotes' filter is subject
- to removal in future versions of PHP.
-
- FTP:
- . Set default transfer mode to binary
-
- Intl:
- . Normalizer::NONE is deprecated, when PHP is linked with ICU >= 56
- . Introduced Normalizer::FORM_KC_CF as Normalizer::normalize() argument
- for NFKC_Casefold normalization, available when linked with ICU >= 56
-
- MBString:
- . The configuration option --with-libmbfl is no longer available.
-
- ODBC:
- . Support for ODBCRouter has been removed.
- . Support for Birdstep has been removed.
-
-PCRE:
- . The PCRE extension has been upgraded to PCRE2, which may cause minor
- behavioral changes, and augments the existing regular expression syntax.
- See <https://wiki.php.net/rfc/pcre2-migration> for details.
-
- Standard:
- . var_export() now exports stdClass objects as an array casted to an object
- (`(object) array( ... )`), rather than using the nonexistent method
- stdClass::__setState().
-
- ZIP:
- . Bundled libzip has been dropped,
- system library is now required.
-
========================================
10. New Global Constants
========================================
-Curl:
- . CURLOPT_REQUEST_TARGET
-
-JSON:
- . JSON_THROW_ON_ERROR
-
-MBString:
- . MB_CASE_FOLD
- . MB_CASE_LOWER_SIMPLE
- . MB_CASE_UPPER_SIMPLE
- . MB_CASE_TITLE_SIMPLE
- . MB_CASE_FOLD_SIMPLE
-
-PGSQL:
- . Requires Postgres 9.3
- - PGSQL_DIAG_SCHEMA_NAME
- - PGSQL_DIAG_TABLE_NAME
- - PGSQL_DIAG_COLUMN_NAME
- - PGSQL_DIAG_DATATYPE_NAME
- - PGSQL_DIAG_CONSTRAINT_NAME
- . Requires Postgres 9.6
- - PGSQL_DIAG_SEVERITY_NONLOCALIZED
-
-Standard:
- . PASSWORD_ARGON2ID
-
========================================
11. Changes to INI File Handling
========================================
-- birdstep.max_links
- . This INI directive has been removed.
-
-- opcache.inherited_hack
- . This INI directive has been removed. The value has already been ignored
- since PHP 5.3.0.
-
-- session.cookie_samesite
- . New INI option to allow to set the SameSite directive for cookies. Defaults
- to "" (empty string), so no SameSite directive is set. Can be set to "Lax"
- or "Strict", which sets the respective SameSite directive.
-
-- syslog.facility
- - New INI to set syslog facility which specifies what type of program is
- logging the message. It is used only when error_log is set to syslog.
-
-- syslog.filter
- . New INI to set syslog filter type to filter the logged messages. There are
- 3 supported filter types - all, no-ctrl and ascii. It is used only when
- error_log is set to syslog.
-
-- syslog.ident
- . New INI to set syslog ident string which is prepended to every message. It
- is used only when error_log is set syslog.
-
========================================
12. Windows Support
========================================
-- Core
- . File descriptors are opened in shared read/write/delete mode by default.
- This effectively maps the UNIX semantics and allows to delete files with
- handles in use. It is not 100% same, some platform differences still
- persist. After the deletion, the filename entry is blocked, until all
- the opened handles to it are closed.
-
========================================
13. Other Changes
========================================
-
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index d4676d34c2..b949e78803 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -1,208 +1,30 @@
-PHP 7.3 INTERNALS UPGRADE NOTES
+PHP 7.4 INTERNALS UPGRADE NOTES
1. Internal API changes
- a. array_init() and array_init_size()
- b. Run-time constant operand addressing
- c. Array/Object recursion protection
- d. HASH_FLAG_PERSISTENT
- e. AST and IS_CONSTANT
- f. GC_REFCOUNT()
- g. zend_get_parameters()
- h. zend_register_persistent_resource()
- i. RAND_RANGE()
- j. cast_object() with _IS_NUMBER
- k. zend_fcall_info_cache.initialized
- l. php_hrtime_current()
- m. zend_cpu_supports()
- n. IS_TYPE_COPYABLE
- o. IS_UNUSED
- p. VM instruction operands (FETCH_CLASS, FETCH_CONSTANT, CATCH)
- q. sapi_cli_single_write()
- r. php_url
- s. zend_function.reserved[]
- t. zif_handler
- u. GC_G
- v. php_add[c]slashes
- w. zend_class_entry.iterator_funcs
- x. Class declaration opcodes (DECLARE_INHERITED_CLASS ...)
- y. zend_constant
- z. HAVE_ST_BLKSIZE and HAVE_ST_RDEV
- aa. RETSIGTYPE
- bb. php_setcookie
+ a. php_sys_symlink() and php_sys_link()
2. Build system changes
a. Unix build system changes
b. Windows build system changes
-
3. Module changes
========================
1. Internal API changes
========================
- a. array_init() and array_init_size() are not functions anymore.
- They don't return any values.
-
- b. In 64-bit builds PHP-7.2 and below used relative run-time constant operand
- addressing. E.g. opline->op1.constant kept an offset from start of literals
- table - op_array->literals. To speedup access op_array->literals was cached
- in execute_data->literals. So the resulting address calculated as
- EX(literals) + opline->op1.constant.
-
- Now at run-time literals allocated close to opcodes, and addressed
- relatively from current opline. This eliminates load of EX(literals) on
- each constant access as well as EX(literals) initialization on each call.
-
- As result some related macros were removed (ZEND_EX_USE_LITERALS,
- EX_LOAD_LITERALS, EX_LITERALS, RT_CONSTANT_EX, EX_CONSTANT) or changed
- (RT_CONSTANT, ZEND_PASS_TWO_UPDATE_CONSTANT, ZEND_PASS_TWO_UNDO_CONSTANT).
- This change may affect only some "system" extensions. EX_LITERALS,
- RT_CONSTANT_EX, EX_CONSTANT should be substituted by RT_CONSTANT, and now
- use "opline" (instead of "op_array") as first argument.
-
- c. Protection from recursion during processing circular data structures was
- refactored. HashTable.nApplyCount and IS_OBJ_APPLY_COUNT are replaced by
- single flag GC_PROTECTED. Corresponding macros Z_OBJ_APPLY_COUNT,
- Z_OBJ_INC_APPLY_COUNT, Z_OBJ_DEC_APPLY_COUNT, ZEND_HASH_GET_APPLY_COUNT,
- ZEND_HASH_INC_APPLY_COUNT, ZEND_HASH_DEC_APPLY_COUNT are replaced with
- GC_IS_RECURSIVE, GC_PROTECT_RECURSION, GC_UNPROTECT_RECURSION,
- Z_IS_RECURSIVE, Z_PROTECT_RECURSION, Z_UNPROTECT_RECURSION.
-
- HASH_FLAG_APPLY_PROTECTION flag and ZEND_HASH_APPLY_PROTECTION() macro
- are removed. All mutable arrays should use recursion protection.
- Corresponding checks should be replaced by Z_REFCOUNTED() or
- !(GC_GLAGS(p) & GC_IMMUTABLE).
-
- d. HASH_FLAG_PERSISTENT renamed into IS_ARRAY_PERSISTENT and moved into
- GC_FLAGS (to be consistent with IS_STR_PERSISTENT).
-
- e. zend_ast_ref structure is changed to use only one allocation.
- zend_ast_copy() now returns zend_ast_ref (instead of zend_asr).
- zend_ast_destroy_and_free() is removed. ZVAL_NEW_AST() is replaced
- by ZVAL_AST().
-
- IS_CONSTANT type and Z_CONST_FLAGS() are removed. Now constants are always
- represented using IS_CONSTANT_AST (ZEND_AST_CONSTANT kind). AST node
- attributes are used instead of constant flags. IS_TYPE_CONSTANT flag is
- removed, but Z_CONSTANT() macro is kept for compatibility.
-
- f. GC_REFCOUNT() is turned into inline function and can't be modified direcly.
- All reference-counting operations should be done through corresponding
- macros GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF().
-
- GC_REFCOUNT(p)++ should be changed into GC_ADDREF(p),
- GC_REFCOUNT(p)-- into GC_DELREF(p),
- GC_REFCOUNT(p) = 1 into GC_SET_REFCOUNT(p, 1).
-
- g. The zend_get_parameters() and zend_get_parameters_ex() functions were
- removed. Instead zend_parse_parameters() should be used.
-
- h. New functions zend_register_persistent_resource() or
- zend_register_persistent_resource_ex() should beused to register
- persistent resources, instead of manual insertion into EG(persistent_list).
-
- i. The RAND_RANGE() macro has been removed. php_mt_rand_range() should be
- used instead.
-
- j. The cast_object() object handler now also accepts the _IS_NUMBER type. The
- handler should return either an integer or float value in this case,
- whichever is more appropriate.
-
- k. zend_fcall_info_cache.initialized is removed. zend_fcall_info_cache is
- initialized if zend_fcall_info_cache.function_handler is set.
-
- l. php_hrtime_current() delivers the number of nanoseconds since an uncertain
- point in the past.
-
- m. zend_cpu_supports() determines if a feature is supported by current cpu.
- Also serial inline zend_cpu_supports_xxx() are added, which is designed for
- ifunc resolver function, as resolver function should not depend on any
- external function.
-
- n. IS_TYPE_COPYABLE flag is removed. IS_STRING zvals didn't need to be
- duplication by zval_copy_ctor(), ZVAL_DUP() and SEPARATE_ZVAL*() macros.
- Interned strings didn't set IS_TYPE_COPYALE, so they aren't affected at
- all. Now instead of checking for IS_TYPE_COPYABLE, engine checks for
- IS_ARRAY type (it may be IS_TYPE_REFCOUNTED or not). All the related
- macros: Z_COPYABLE..., Z_IMMUTABLE... are kept for compatibility.
-
- o. IS_UNUSED became zero and can't be used as a bitmask (there were no such
- usages in PHP sources).
-
- p. Operands of few VM instructions were changed
- - FETCH_CLASS op1<fetch-flags>, op2<name>, result<var>
- - FETCH_CONSTANT op1<fetch-flags>, op2<name>, result<tmp>
- - CATCH ext<last-flag>, op1<name>, op2<jump_addr>, result<cv>
-
- q. sapi_cli_single_write() now returns ssize_t instead of size_t.
-
- r. fields of php_url struct change from char * to zend_string *
-
- s. Special purpose zend_functions marked by ZEND_ACC_CALL_VIA_TRAMPOLINE or
- ZEND_ACC_FAKE_CLOSURE flags use reserved[0] for internal purpose.
- Third party extensions must not modify reserved[] fields of these functions.
-
- t. For internal functions the typedef zif_handler has been introduced. It is
- recommended to use this from now on, instead of defining own handler types.
-
- u. The GC globals (GC_G) are now private. Use the new zend_gc_get_status() to
- retrieve status information of the GC.
-
- v. The should_free argument of the php_add[c]slashes functions has been
- removed. It is now always the caller's responsibility to free the passed
- string.
-
- w. zend_class_entry.iterator_funcs have been replaced by iterator_funcs_ptr.
- You don't have to set its value, setting parent.funcs in the get_iterator
- function is enough.
-
- x. Class declaration opcode formats were changed
- - DECLARE_INHERITED_CLASS and DECLARE_ANON_INHERITED_CLASS now encode parent
- class name in second operand directly (as IS_CONST operand). Previously,
- parent class was fetched by the prior FETCH_CLASS opcode.
- - ADD_INTERFACE and ADD_TRAIT don't use run-time cache to keep interface or
- trait. These instructions are executed once, and caching is useless.
-
- y. zend_constant.flags and zend_constant.module_number are packed into
- reserved space inside zend_constant.value. They should be accessed using
- ZEND_CONTANT_FLAGS(), ZEND_CONSTANTS_MODULE_NUMBER() and
- ZEND_CONTANT_SET_FLAGS() macros.
-
- z. HAVE_ST_BLKSIZE must be replaced with HAVE_STRUCT_STAT_ST_BLKSIZE and
- HAVE_ST_RDEV must be replaced with HAVE_STRUCT_STAT_ST_RDEV.
-
- aa. RETSIGTYPE has been removed from the generated php_config.h and should be
- replaced with void.
-
- bb. php_setcookie() now expects an additional samesite argument, and the
- url_encode parameter has been moved to the end. The signature is now:
- int php_setcookie(zend_string *name, zend_string *value, time_t expires,
- zend_string *path, zend_string *domain, int secure,
- int httponly, zend_string *samesite, int url_encode);
+ a. php_sys_symlink() and php_sys_link() portability macros have been
+ added, which behave like POSIX's symlink() and link(), respectively, on
+ POSIX compliant systems and on Windows.
========================
2. Build system changes
========================
a. Unix build system changes
- - PHP_PROG_LEX, TSRM_CHECK_GCC_ARG, and LIBZEND_CPLUSPLUS_CHECKS Autoconf
- macros have been removed.
b. Windows build system changes
- - ZEND_WIN32_FORCE_INLINE doesn't affect C++ anymore. zend_always_inline is
- still usable in C++, but anything else inlining related is up to
- compiler.
- - ZEND_WIN32_KEEP_INLINE was removed, it was only needed for C++
- convenience and is now default behavior with C++.
- - New configure option --enable-native-intrinsics accepts a list of the
- intrinsic optimizations to enable. It affects both the code generation
- and the explicit optimizations guarded by preprocessor macros.
- - The configure option --with-codegen-arch accepts only ia32 as a value.
- Use it, to produce builds suitable for older processors without SSE2 or
- even SSE support.
========================
3. Module changes
========================
-
diff --git a/Zend/tests/67468.phpt b/Zend/tests/67468.phpt
index 767217644a..691acd90db 100644
--- a/Zend/tests/67468.phpt
+++ b/Zend/tests/67468.phpt
@@ -1,7 +1,5 @@
--TEST--
Bug #67468 (Segfault in highlight_file()/highlight_string())
---SKIPIF--
-<?php if(!function_exists("leak")) print "skip only for debug builds"; ?>
--FILE--
<?php
highlight_string("<?php __CLASS__;", true);
diff --git a/Zend/zend.h b/Zend/zend.h
index c8d24ffc55..2a6e93c0f2 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -20,7 +20,7 @@
#ifndef ZEND_H
#define ZEND_H
-#define ZEND_VERSION "3.3.0-dev"
+#define ZEND_VERSION "3.4.0-dev"
#define ZEND_ENGINE_3
diff --git a/Zend/zend_virtual_cwd.h b/Zend/zend_virtual_cwd.h
index 43d3965adb..feee04a745 100644
--- a/Zend/zend_virtual_cwd.h
+++ b/Zend/zend_virtual_cwd.h
@@ -120,11 +120,15 @@ CWD_API int php_sys_stat_ex(const char *path, zend_stat_t *buf, int lstat);
# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0)
# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1)
CWD_API ssize_t php_sys_readlink(const char *link, char *target, size_t target_len);
+# define php_sys_symlink php_win32_ioutil_symlink
+# define php_sys_link php_win32_ioutil_link
#else
# define php_sys_stat stat
# define php_sys_lstat lstat
# ifdef HAVE_SYMLINK
# define php_sys_readlink(link, target, target_len) readlink(link, target, target_len)
+# define php_sys_symlink symlink
+# define php_sys_link link
# endif
#endif
diff --git a/configure.ac b/configure.ac
index 78a1878c25..8ec2ee2369 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,7 +106,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
])
PHP_MAJOR_VERSION=7
-PHP_MINOR_VERSION=3
+PHP_MINOR_VERSION=4
PHP_RELEASE_VERSION=0
PHP_EXTRA_VERSION="-dev"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
diff --git a/ext/curl/tests/bug68937.phpt b/ext/curl/tests/bug68937.phpt
index ff8a906eba..013dd340d5 100644
--- a/ext/curl/tests/bug68937.phpt
+++ b/ext/curl/tests/bug68937.phpt
@@ -2,7 +2,6 @@
Bug # #68937 (Segfault in curl_multi_exec)
--SKIPIF--
<?php
-if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
include 'skipif.inc';
?>
--FILE--
diff --git a/ext/curl/tests/bug68937_2.phpt b/ext/curl/tests/bug68937_2.phpt
index c25da3fd71..33af654ec3 100644
--- a/ext/curl/tests/bug68937_2.phpt
+++ b/ext/curl/tests/bug68937_2.phpt
@@ -2,7 +2,6 @@
Bug # #68937 (Segfault in curl_multi_exec)
--SKIPIF--
<?php
-if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
include 'skipif.inc';
?>
--FILE--
diff --git a/ext/curl/tests/bug71523.phpt b/ext/curl/tests/bug71523.phpt
index 84f1a17159..c7889eaca0 100644
--- a/ext/curl/tests/bug71523.phpt
+++ b/ext/curl/tests/bug71523.phpt
@@ -5,9 +5,6 @@ Bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
-if (getenv("SKIP_ONLINE_TESTS")) {
- die("skip online test");
-}
?>
--FILE--
<?php
diff --git a/ext/curl/tests/bug72202.phpt b/ext/curl/tests/bug72202.phpt
index 63138d9ba6..01564c0a58 100644
--- a/ext/curl/tests/bug72202.phpt
+++ b/ext/curl/tests/bug72202.phpt
@@ -5,9 +5,6 @@ Bug #72202 (curl_close doesn't close cURL handle)
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
-if (getenv("SKIP_ONLINE_TESTS")) {
- die("skip online test");
-}
?>
--FILE--
<?php
diff --git a/ext/curl/tests/curl_multi_info_read.phpt b/ext/curl/tests/curl_multi_info_read.phpt
index ef83822b4a..8a2d48918e 100644
--- a/ext/curl/tests/curl_multi_info_read.phpt
+++ b/ext/curl/tests/curl_multi_info_read.phpt
@@ -4,7 +4,6 @@ array curl_multi_info_read ( resource $mh [, int &$msgs_in_queue = NULL ] );
marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
--SKIPIF--
<?php
-if (getenv("SKIP_ONLINE_TESTS")) { die('skip: online test'); }
if (!extension_loaded('curl')) { print("skip"); }
?>
--FILE--
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index 063b419bd3..6b778092f9 100644
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -332,14 +332,14 @@ PHP_MINFO_FUNCTION(enchant)
#define PHP_ENCHANT_GET_BROKER \
pbroker = (enchant_broker *)zend_fetch_resource(Z_RES_P(broker), "enchant_broker", le_enchant_broker); \
if (!pbroker || !pbroker->pbroker) { \
- php_error_docref(NULL, E_WARNING, "%s", "Resource broker invalid"); \
+ php_error_docref(NULL, E_WARNING, "Resource broker invalid"); \
RETURN_FALSE; \
}
#define PHP_ENCHANT_GET_DICT \
pdict = (enchant_dict *)zend_fetch_resource(Z_RES_P(dict), "enchant_dict", le_enchant_dict); \
if (!pdict || !pdict->pdict) { \
- php_error_docref(NULL, E_WARNING, "%s", "Invalid dictionary resource."); \
+ php_error_docref(NULL, E_WARNING, "Invalid dictionary resource."); \
RETURN_FALSE; \
}
diff --git a/ext/filter/tests/033_run.inc b/ext/filter/tests/033_run.inc
index ecb2cf7be1..30a7a82a01 100644
--- a/ext/filter/tests/033_run.inc
+++ b/ext/filter/tests/033_run.inc
@@ -1,7 +1,5 @@
<?php
-if (function_exists('setlocale')) {
- setlocale(LC_ALL, 'C');
-}
+setlocale(LC_ALL, 'C');
function test($data) {
return strtoupper($data);
diff --git a/ext/intl/common/common_error.c b/ext/intl/common/common_error.c
index 16933c587f..0c0057a8fe 100644
--- a/ext/intl/common/common_error.c
+++ b/ext/intl/common/common_error.c
@@ -241,9 +241,7 @@ void intl_expose_icu_error_codes( INIT_FUNC_ARGS )
INTL_EXPOSE_CONST( U_IDNA_VERIFICATION_ERROR );
INTL_EXPOSE_CONST( U_IDNA_LABEL_TOO_LONG_ERROR );
INTL_EXPOSE_CONST( U_IDNA_ZERO_LENGTH_LABEL_ERROR );
-#if U_ICU_VERSION_MAJOR_NUM > 3 || U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM >= 8
INTL_EXPOSE_CONST( U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR );
-#endif
INTL_EXPOSE_CONST( U_IDNA_ERROR_LIMIT );
/* Aliases for StringPrep */
diff --git a/ext/intl/formatter/formatter.c b/ext/intl/formatter/formatter.c
index 7e0f0df68b..76db688aeb 100644
--- a/ext/intl/formatter/formatter.c
+++ b/ext/intl/formatter/formatter.c
@@ -26,10 +26,6 @@
#include "formatter_class.h"
#include "formatter_format.h"
-#if U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM <= 4
-#define UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL 17
-#endif
-
/* {{{ formatter_register_constants
* Register constants common for the both (OO and procedural)
* APIs.
@@ -58,11 +54,6 @@ void formatter_register_constants( INIT_FUNC_ARGS )
FORMATTER_EXPOSE_CUSTOM_CLASS_CONST( "DEFAULT_STYLE", UNUM_DEFAULT );
-/* workaround for ICU bug */
-#if U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM < 8
-#define UNUM_ROUND_HALFEVEN UNUM_FOUND_HALFEVEN
-#endif
-
/* UNumberFormatRoundingMode */
FORMATTER_EXPOSE_CLASS_CONST( ROUND_CEILING );
FORMATTER_EXPOSE_CLASS_CONST( ROUND_FLOOR );
diff --git a/ext/intl/tests/dateformat_set_timezone_id2.phpt b/ext/intl/tests/dateformat_set_timezone_id2.phpt
index a706ee763b..cb3b780205 100644
--- a/ext/intl/tests/dateformat_set_timezone_id2.phpt
+++ b/ext/intl/tests/dateformat_set_timezone_id2.phpt
@@ -3,8 +3,8 @@ datefmt_set_timezone_id_code() icu >= 4.8
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_format2.phpt b/ext/intl/tests/formatter_format2.phpt
index 32c42f69da..9a3596c153 100644
--- a/ext/intl/tests/formatter_format2.phpt
+++ b/ext/intl/tests/formatter_format2.phpt
@@ -1,8 +1,9 @@
--TEST--
numfmt_format() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU <= 52.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_format_currency2.phpt b/ext/intl/tests/formatter_format_currency2.phpt
index 16a421018c..088c8896d9 100644
--- a/ext/intl/tests/formatter_format_currency2.phpt
+++ b/ext/intl/tests/formatter_format_currency2.phpt
@@ -1,8 +1,8 @@
--TEST--
numfmt_format_currency() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_get_set_symbol2.phpt b/ext/intl/tests/formatter_get_set_symbol2.phpt
index 8e762f350f..dc581f8882 100644
--- a/ext/intl/tests/formatter_get_set_symbol2.phpt
+++ b/ext/intl/tests/formatter_get_set_symbol2.phpt
@@ -1,8 +1,8 @@
--TEST--
numfmt_get/set_symbol() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
<?php if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/intl_icu_data_version_constant.phpt b/ext/intl/tests/intl_icu_data_version_constant.phpt
index ad01218586..e06bc92e10 100644
--- a/ext/intl/tests/intl_icu_data_version_constant.phpt
+++ b/ext/intl/tests/intl_icu_data_version_constant.phpt
@@ -1,7 +1,8 @@
--TEST--
INTL_ICU_DATA_VERSION constant
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) || version_compare('INTL_ICU_VERSION', '4.4', '<') ) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare('INTL_ICU_VERSION', '4.4', '<') < 0) print 'skip for ICU > 4.4'; ?>
--FILE--
<?php
var_dump(defined("INTL_ICU_DATA_VERSION"));
diff --git a/ext/intl/tests/locale_filter_matches2.phpt b/ext/intl/tests/locale_filter_matches2.phpt
index 46771b7c1a..97e9bdde2c 100644
--- a/ext/intl/tests/locale_filter_matches2.phpt
+++ b/ext/intl/tests/locale_filter_matches2.phpt
@@ -1,8 +1,8 @@
--TEST--
locale_filter_matches.phpt() icu >= 4.8 && icu < 50.1.2
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_name2.phpt b/ext/intl/tests/locale_get_display_name2.phpt
index dcc996eca9..9edc8e0aeb 100644
--- a/ext/intl/tests/locale_get_display_name2.phpt
+++ b/ext/intl/tests/locale_get_display_name2.phpt
@@ -1,8 +1,8 @@
--TEST--
locale_get_display_name() icu >= 4.8 && icu < 50.1.2
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_region2.phpt b/ext/intl/tests/locale_get_display_region2.phpt
index 82334db461..835261da02 100644
--- a/ext/intl/tests/locale_get_display_region2.phpt
+++ b/ext/intl/tests/locale_get_display_region2.phpt
@@ -1,9 +1,9 @@
--TEST--
locale_get_display_region() icu >= 4.8 && icu < 51.2
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
-<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU <= 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_script2.phpt b/ext/intl/tests/locale_get_display_script2.phpt
index 2b9e037b78..d59425e5f0 100644
--- a/ext/intl/tests/locale_get_display_script2.phpt
+++ b/ext/intl/tests/locale_get_display_script2.phpt
@@ -1,8 +1,9 @@
--TEST--
locale_get_display_script() icu = 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0 || version_compare(INTL_ICU_VERSION, '49') >= 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '49') >= 0) die('skip for ICU <= 49'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_script3.phpt b/ext/intl/tests/locale_get_display_script3.phpt
index 972f060cdb..b0a54230b7 100644
--- a/ext/intl/tests/locale_get_display_script3.phpt
+++ b/ext/intl/tests/locale_get_display_script3.phpt
@@ -1,8 +1,9 @@
--TEST--
locale_get_display_script() icu >= 49
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '49') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '49') < 0) print 'skip for ICU > 49'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU <= 52.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_script4.phpt b/ext/intl/tests/locale_get_display_script4.phpt
index dd50dcfc0a..470ece2e79 100644
--- a/ext/intl/tests/locale_get_display_script4.phpt
+++ b/ext/intl/tests/locale_get_display_script4.phpt
@@ -1,8 +1,8 @@
--TEST--
locale_get_display_script() icu >= 52.1
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '52.1') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '52.1') < 0) print 'skip for ICU > 52.1'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_variant2.phpt b/ext/intl/tests/locale_get_display_variant2.phpt
index 2517240e30..c432eb7b05 100644
--- a/ext/intl/tests/locale_get_display_variant2.phpt
+++ b/ext/intl/tests/locale_get_display_variant2.phpt
@@ -1,8 +1,8 @@
--TEST--
locale_get_display_variant() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_parse_locale2.phpt b/ext/intl/tests/locale_parse_locale2.phpt
index f1482730c3..5f885ccfe3 100644
--- a/ext/intl/tests/locale_parse_locale2.phpt
+++ b/ext/intl/tests/locale_parse_locale2.phpt
@@ -1,8 +1,8 @@
--TEST--
locale_parse_locale() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt
index 698d19afce..1b7e4e1449 100644
--- a/ext/intl/tests/msgfmt_fail2.phpt
+++ b/ext/intl/tests/msgfmt_fail2.phpt
@@ -1,8 +1,8 @@
--TEST--
msgfmt creation failures icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU > 4.8'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/normalizer_get_raw_decomposition.phpt b/ext/intl/tests/normalizer_get_raw_decomposition.phpt
index 8f13612bd8..7a374a9e61 100644
--- a/ext/intl/tests/normalizer_get_raw_decomposition.phpt
+++ b/ext/intl/tests/normalizer_get_raw_decomposition.phpt
@@ -1,8 +1,8 @@
--TEST--
normalizer_get_raw_decomposition()
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if( !function_exists( 'normalizer_get_raw_decomposition' ) ) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if( !function_exists( 'normalizer_get_raw_decomposition' ) ) print 'skip normalizer_get_raw_decomposition function does not exist'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/normalizer_normalize_kc_cf.phpt b/ext/intl/tests/normalizer_normalize_kc_cf.phpt
index 040cd29e0b..a4e478cc4e 100644
--- a/ext/intl/tests/normalizer_normalize_kc_cf.phpt
+++ b/ext/intl/tests/normalizer_normalize_kc_cf.phpt
@@ -1,8 +1,8 @@
--TEST--
normalize() NFKC_Casefold
--SKIPIF--
-<?php if (!extension_loaded('intl')) print 'skip'; ?>
-<?php if (!defined('Normalizer::FORM_KC_CF')) print 'skip'; ?>
+<?php if (!extension_loaded('intl')) print 'skip intl extension not loaded'; ?>
+<?php if (!defined('Normalizer::FORM_KC_CF')) print 'skip Normalizer::FORM_KC_CF constant not defined'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/resourcebundle_internal.phpt b/ext/intl/tests/resourcebundle_internal.phpt
index 2063ae2277..1a62713a60 100644
--- a/ext/intl/tests/resourcebundle_internal.phpt
+++ b/ext/intl/tests/resourcebundle_internal.phpt
@@ -1,7 +1,9 @@
--TEST--
Test ResourceBundle::__construct() with internal ICU bundles
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) || !defined('INTL_ICU_DATA_VERSION') || version_compare(INTL_ICU_DATA_VERSION, '4.4', '<') ) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' )) print 'skip intl extension not loaded'; ?>
+<?php if( !defined('INTL_ICU_DATA_VERSION')) print 'skip INTL_ICU_DATA_VERSION constant not defined'; ?>
+<?php if( version_compare(INTL_ICU_DATA_VERSION, '4.4', '<')) print 'skip for ICU > 4.4'; ?>
--FILE--
<?php
$b = new ResourceBundle('de_DE', 'ICUDATA-region');
diff --git a/ext/mbstring/tests/overload01.phpt b/ext/mbstring/tests/overload01.phpt
index 7efc65da82..8950d912fb 100644
--- a/ext/mbstring/tests/overload01.phpt
+++ b/ext/mbstring/tests/overload01.phpt
@@ -3,9 +3,6 @@ Function overloading test 1
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
- if (!function_exists("mail")) {
- die('skip mail() function is not available.');
- }
?>
--INI--
output_handler=
diff --git a/ext/mbstring/tests/overload02.phpt b/ext/mbstring/tests/overload02.phpt
index 48705b782b..64b46dfd73 100644
--- a/ext/mbstring/tests/overload02.phpt
+++ b/ext/mbstring/tests/overload02.phpt
@@ -3,9 +3,6 @@ Function overloading test 2
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
- if (!function_exists("mail")) {
- die('skip mail() function is not available.');
- }
if (!function_exists("mb_ereg_replace")) {
die('skip mb_ereg_replace() function is not available.');
}
diff --git a/ext/openssl/tests/openssl_free_key.phpt b/ext/openssl/tests/openssl_free_key.phpt
index ea79ce703a..aa4a3a8a35 100644
--- a/ext/openssl/tests/openssl_free_key.phpt
+++ b/ext/openssl/tests/openssl_free_key.phpt
@@ -18,8 +18,7 @@ echo "Creating private key\n";
*/
for ($z = "", $i = 0; $i < 1024; $i++) {
$z .= $i * $i;
- if (function_exists("usleep"))
- usleep($i);
+ usleep($i);
}
$conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf');
diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c
index 235191bebb..f91dd13982 100644
--- a/ext/pdo_sqlite/pdo_sqlite.c
+++ b/ext/pdo_sqlite/pdo_sqlite.c
@@ -75,6 +75,7 @@ PHP_MINIT_FUNCTION(pdo_sqlite)
REGISTER_PDO_CLASS_CONST_LONG("SQLITE_OPEN_READONLY", (zend_long)SQLITE_OPEN_READONLY);
REGISTER_PDO_CLASS_CONST_LONG("SQLITE_OPEN_READWRITE", (zend_long)SQLITE_OPEN_READWRITE);
REGISTER_PDO_CLASS_CONST_LONG("SQLITE_OPEN_CREATE", (zend_long)SQLITE_OPEN_CREATE);
+ REGISTER_PDO_CLASS_CONST_LONG("SQLITE_ATTR_READONLY_STATEMENT", (zend_long)PDO_SQLITE_ATTR_READONLY_STATEMENT);
return php_pdo_register_driver(&pdo_sqlite_driver);
}
diff --git a/ext/pdo_sqlite/php_pdo_sqlite_int.h b/ext/pdo_sqlite/php_pdo_sqlite_int.h
index 7e9a97cf88..2cd855e75b 100644
--- a/ext/pdo_sqlite/php_pdo_sqlite_int.h
+++ b/ext/pdo_sqlite/php_pdo_sqlite_int.h
@@ -76,6 +76,7 @@ extern const struct pdo_stmt_methods sqlite_stmt_methods;
enum {
PDO_SQLITE_ATTR_OPEN_FLAGS = PDO_ATTR_DRIVER_SPECIFIC,
+ PDO_SQLITE_ATTR_READONLY_STATEMENT
};
#endif
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c
index c82e2d34eb..4a9d2462bf 100644
--- a/ext/pdo_sqlite/sqlite_statement.c
+++ b/ext/pdo_sqlite/sqlite_statement.c
@@ -350,6 +350,28 @@ static int pdo_sqlite_stmt_cursor_closer(pdo_stmt_t *stmt)
return 1;
}
+static int pdo_sqlite_stmt_get_attribute(pdo_stmt_t *stmt, zend_long attr, zval *val)
+{
+ pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data;
+
+ switch (attr) {
+ case PDO_SQLITE_ATTR_READONLY_STATEMENT:
+ ZVAL_FALSE(val);
+
+#if SQLITE_VERSION_NUMBER >= 3007004
+ if (sqlite3_stmt_readonly(S->stmt)) {
+ ZVAL_TRUE(val);
+ }
+#endif
+ break;
+
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
const struct pdo_stmt_methods sqlite_stmt_methods = {
pdo_sqlite_stmt_dtor,
pdo_sqlite_stmt_execute,
@@ -358,7 +380,7 @@ const struct pdo_stmt_methods sqlite_stmt_methods = {
pdo_sqlite_stmt_get_col,
pdo_sqlite_stmt_param_hook,
NULL, /* set_attr */
- NULL, /* get_attr */
+ pdo_sqlite_stmt_get_attribute, /* get_attr */
pdo_sqlite_stmt_col_meta,
NULL, /* next_rowset */
pdo_sqlite_stmt_cursor_closer
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_statement_getattribute.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_statement_getattribute.phpt
new file mode 100644
index 0000000000..559907c380
--- /dev/null
+++ b/ext/pdo_sqlite/tests/pdo_sqlite_statement_getattribute.phpt
@@ -0,0 +1,20 @@
+--TEST--
+PDO_sqlite: Testing PDOStatement::getAttribute()
+--SKIPIF--
+<?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?>
+--FILE--
+<?php
+
+$db = new PDO('sqlite::memory:');
+
+$st = $db->prepare('SELECT 1;');
+
+var_dump($st->getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT));
+
+$st = $db->prepare('CREATE TABLE test (a TEXT);');
+
+var_dump($st->getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT));
+?>
+--EXPECTF--
+bool(true)
+bool(false) \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/files/phar_test.inc b/ext/phar/tests/cache_list/files/phar_test.inc
index f82471d13b..047f4ea051 100644
--- a/ext/phar/tests/cache_list/files/phar_test.inc
+++ b/ext/phar/tests/cache_list/files/phar_test.inc
@@ -1,8 +1,6 @@
<?php
-if (function_exists('date_default_timezone_set')) {
- date_default_timezone_set('UTC');
-}
+date_default_timezone_set('UTC');
$manifest = (binary)'';
$glags = 0;
diff --git a/ext/phar/tests/files/phar_test.inc b/ext/phar/tests/files/phar_test.inc
index 6f93969542..6a75334cdd 100644
--- a/ext/phar/tests/files/phar_test.inc
+++ b/ext/phar/tests/files/phar_test.inc
@@ -1,8 +1,6 @@
<?php
-if (function_exists('date_default_timezone_set')) {
- date_default_timezone_set('UTC');
-}
+date_default_timezone_set('UTC');
$manifest = (binary)'';
$gflags = 0;
diff --git a/ext/soap/tests/bugs/bug44811.phpt b/ext/soap/tests/bugs/bug44811.phpt
index 1c7605f610..8cfc4a76cd 100644
--- a/ext/soap/tests/bugs/bug44811.phpt
+++ b/ext/soap/tests/bugs/bug44811.phpt
@@ -2,7 +2,6 @@
Bug #44811 (Improve error messages when creating new SoapClient which contains invalid data)
--SKIPIF--
<?php require_once 'skipif.inc'; ?>
-<?php if (getenv("SKIP_ONLINE_TESTS")) die("skip online test"); ?>
--INI--
soap.wsdl_cache_enabled=0
--FILE--
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt
index 22bab4eae3..d8f91d328e 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt
@@ -2,7 +2,6 @@
SOAP Interop Round2 base 005 (php/direct): echoString(utf-8)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
-<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
--FILE--
<?php
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt
index f94c06f58c..116e14faac 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt
@@ -2,7 +2,6 @@
SOAP Interop Round2 base 005 (soap/direct): echoString(utf-8)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
-<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
--FILE--
<?php
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
index 3bb1368b97..728b4f5c58 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
@@ -2,7 +2,6 @@
SOAP Interop Round2 base 005 (php/wsdl): echoString(utf-8)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
-<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
--INI--
soap.wsdl_cache_enabled=0
--FILE--
diff --git a/ext/sockets/tests/mcast_ipv4_recv.phpt b/ext/sockets/tests/mcast_ipv4_recv.phpt
index fc92563e84..f56b21a2fa 100644
--- a/ext/sockets/tests/mcast_ipv4_recv.phpt
+++ b/ext/sockets/tests/mcast_ipv4_recv.phpt
@@ -5,6 +5,7 @@ Multicast support: IPv4 receive options
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
+if (getenv('SKIP_ONLINE_TESTS')) die('skip online test');
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$br = socket_bind($s, '0.0.0.0', 3000);
$so = socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
diff --git a/ext/standard/link.c b/ext/standard/link.c
index 5ca8b2c49c..c95c75d136 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -160,7 +160,7 @@ PHP_FUNCTION(symlink)
/* For the source, an expanded path must be used (in ZTS an other thread could have changed the CWD).
* For the target the exact string given by the user must be used, relative or not, existing or not.
* The target is relative to the link itself, not to the CWD. */
- ret = symlink(topath, source_p);
+ ret = php_sys_symlink(topath, source_p);
if (ret == -1) {
php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
@@ -207,9 +207,9 @@ PHP_FUNCTION(link)
}
#ifndef ZTS
- ret = link(topath, frompath);
+ ret = php_sys_link(topath, frompath);
#else
- ret = link(dest_p, source_p);
+ ret = php_sys_link(dest_p, source_p);
#endif
if (ret == -1) {
php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
diff --git a/ext/standard/link_win32.c b/ext/standard/link_win32.c
index ae6cdd11f2..bc9931359d 100644
--- a/ext/standard/link_win32.c
+++ b/ext/standard/link_win32.c
@@ -43,7 +43,7 @@
/*
TODO:
-- Create php_readlink (done), php_link and php_symlink in win32/link.c
+- Create php_readlink (done), php_link (done) and php_symlink (done) in win32/link.c
- Expose them (PHPAPI) so extensions developers can use them
- define link/readlink/symlink to their php_ equivalent and use them in ext/standart/link.c
- this file is then useless and we have a portable link API
@@ -122,13 +122,11 @@ PHP_FUNCTION(symlink)
{
char *topath, *frompath;
size_t topath_len, frompath_len;
- BOOLEAN ret;
+ int ret;
char source_p[MAXPATHLEN];
char dest_p[MAXPATHLEN];
char dirname[MAXPATHLEN];
size_t len;
- DWORD attr;
- wchar_t *dstw, *srcw;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "pp", &topath, &topath_len, &frompath, &frompath_len) == FAILURE) {
return;
@@ -162,38 +160,16 @@ PHP_FUNCTION(symlink)
RETURN_FALSE;
}
- dstw = php_win32_ioutil_any_to_w(topath);
- if (!dstw) {
- php_error_docref(NULL, E_WARNING, "UTF-16 conversion failed (error %d)", GetLastError());
- RETURN_FALSE;
- }
- if ((attr = GetFileAttributesW(dstw)) == INVALID_FILE_ATTRIBUTES) {
- free(dstw);
- php_error_docref(NULL, E_WARNING, "Could not fetch file information(error %d)", GetLastError());
- RETURN_FALSE;
- }
-
- srcw = php_win32_ioutil_any_to_w(source_p);
- if (!srcw) {
- free(dstw);
- php_error_docref(NULL, E_WARNING, "UTF-16 conversion failed (error %d)", GetLastError());
- RETURN_FALSE;
- }
/* For the source, an expanded path must be used (in ZTS an other thread could have changed the CWD).
* For the target the exact string given by the user must be used, relative or not, existing or not.
* The target is relative to the link itself, not to the CWD. */
- ret = CreateSymbolicLinkW(srcw, dstw, (attr & FILE_ATTRIBUTE_DIRECTORY ? 1 : 0));
+ ret = php_sys_symlink(topath, source_p);
- if (!ret) {
- free(dstw);
- free(srcw);
- php_error_docref(NULL, E_WARNING, "Cannot create symlink, error code(%d)", GetLastError());
+ if (ret == -1) {
+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
RETURN_FALSE;
}
- free(dstw);
- free(srcw);
-
RETURN_TRUE;
}
/* }}} */
@@ -207,7 +183,6 @@ PHP_FUNCTION(link)
int ret;
char source_p[MAXPATHLEN];
char dest_p[MAXPATHLEN];
- wchar_t *dstw, *srcw;
/*First argument to link function is the target and hence should go to frompath
Second argument to link function is the link itself and hence should go to topath */
@@ -236,38 +211,15 @@ PHP_FUNCTION(link)
}
#ifndef ZTS
-# define _TO_PATH topath
-# define _FROM_PATH frompath
+ ret = php_sys_link(topath, frompath);
#else
-# define _TO_PATH dest_p
-# define _FROM_PATH source_p
+ ret = php_sys_link(dest_p, source_p);
#endif
- dstw = php_win32_ioutil_any_to_w(_TO_PATH);
- if (!dstw) {
- php_error_docref(NULL, E_WARNING, "UTF-16 conversion failed (error %d)", GetLastError());
- RETURN_FALSE;
- }
- srcw = php_win32_ioutil_any_to_w(_FROM_PATH);
- if (!srcw) {
- free(dstw);
- php_error_docref(NULL, E_WARNING, "UTF-16 conversion failed (error %d)", GetLastError());
- RETURN_FALSE;
- }
-#undef _TO_PATH
-#undef _FROM_PATH
-
- ret = CreateHardLinkW(dstw, srcw, NULL);
-
- if (ret == 0) {
- free(dstw);
- free(srcw);
+ if (ret == -1) {
php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
RETURN_FALSE;
}
- free(dstw);
- free(srcw);
-
RETURN_TRUE;
}
/* }}} */
diff --git a/ext/standard/tests/file/file_get_contents_error001.phpt b/ext/standard/tests/file/file_get_contents_error001.phpt
index 1437b8a8a0..d86b37d513 100644
--- a/ext/standard/tests/file/file_get_contents_error001.phpt
+++ b/ext/standard/tests/file/file_get_contents_error001.phpt
@@ -8,7 +8,6 @@ display_errors=false
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
- if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
?>
--FILE--
<?php
diff --git a/ext/standard/tests/file/rename_variation7-win32.phpt b/ext/standard/tests/file/rename_variation7-win32.phpt
index 369e8c2d43..b1a04b38c6 100644
--- a/ext/standard/tests/file/rename_variation7-win32.phpt
+++ b/ext/standard/tests/file/rename_variation7-win32.phpt
@@ -26,7 +26,7 @@ var_dump(readlink($tmp_link2));
echo "Done\n";
?>
--EXPECTF--
-Warning: symlink(): Could not fetch file information(error 2) in %srename_variation7-win32.php on line %d
+Warning: symlink(): No such file or directory in %srename_variation7-win32.php on line %d
Warning: readlink(): readlink failed to read the symbolic link (%srename_variation7-win32.php.tmp.link), error 2) in %srename_variation7-win32.php on line %d
bool(false)
diff --git a/ext/standard/tests/network/gethostbyname_basic001.phpt b/ext/standard/tests/network/gethostbyname_basic001.phpt
index 9171e226aa..e917b59920 100644
--- a/ext/standard/tests/network/gethostbyname_basic001.phpt
+++ b/ext/standard/tests/network/gethostbyname_basic001.phpt
@@ -5,7 +5,6 @@ gethostbyname() function - basic type return test
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
-if (getenv("SKIP_ONLINE_TESTS")) die("skip test requiring internet connection");
?>
--FILE--
<?php
diff --git a/ext/standard/tests/strings/bug65947.phpt b/ext/standard/tests/strings/bug65947.phpt
index 2656a1b7f1..b9ac8a474b 100644
--- a/ext/standard/tests/strings/bug65947.phpt
+++ b/ext/standard/tests/strings/bug65947.phpt
@@ -1,7 +1,5 @@
--TEST--
Bug #65947 (basename is no more working after fgetcsv in certain situation)
---SKIPIF--
-<?php if (!PHP_ZTS) { print "skip only for zts build"; }
--FILE--
<?php
$filename = 'test.toto';
diff --git a/ext/standard/tests/strings/bug72434.phpt b/ext/standard/tests/strings/bug72434.phpt
index 447ad4609c..6d64baa26f 100644
--- a/ext/standard/tests/strings/bug72434.phpt
+++ b/ext/standard/tests/strings/bug72434.phpt
@@ -1,9 +1,5 @@
--TEST--
Bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
---SKIPIF--
-<?php
-if(!class_exists('zip')) die('skip ZipArchive');
-?>
--FILE--
<?php
// The following array will be serialized and this representation will be freed later on.
diff --git a/main/php_version.h b/main/php_version.h
index e81c515249..6f2f3c032d 100644
--- a/main/php_version.h
+++ b/main/php_version.h
@@ -1,8 +1,8 @@
/* automatically generated by configure */
/* edit configure.ac to change version number */
#define PHP_MAJOR_VERSION 7
-#define PHP_MINOR_VERSION 3
+#define PHP_MINOR_VERSION 4
#define PHP_RELEASE_VERSION 0
#define PHP_EXTRA_VERSION "-dev"
-#define PHP_VERSION "7.3.0-dev"
-#define PHP_VERSION_ID 70300
+#define PHP_VERSION "7.4.0-dev"
+#define PHP_VERSION_ID 70400
diff --git a/run-tests.php b/run-tests.php
index c47770ca06..554f014a25 100644
--- a/run-tests.php
+++ b/run-tests.php
@@ -205,7 +205,7 @@ function verify_config()
error('environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!');
}
- if (function_exists('is_executable') && !is_executable($php)) {
+ if (!is_executable($php)) {
error("invalid PHP executable specified by TEST_PHP_EXECUTABLE = $php");
}
}
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index 19ab8421ae..a2c53ebdbc 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -239,6 +239,9 @@ ADD_SOURCES("Zend", "zend_language_parser.c zend_language_scanner.c \
zend_inheritance.c zend_smart_str.c zend_cpuinfo.c");
ADD_FLAG("CFLAGS_BD_ZEND", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
+if (VS_TOOLSET && VCVERS >= 1914) {
+ ADD_FLAG("CFLAGS_BD_ZEND", "/d2FuncCache1");
+}
/* XXX inspect this for other toolsets */
//AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1);
@@ -249,12 +252,18 @@ ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \
php_open_temporary_file.c output.c internal_functions.c php_sprintf.c \
php_syslog.c");
ADD_FLAG("CFLAGS_BD_MAIN", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
+if (VS_TOOLSET && VCVERS >= 1914) {
+ ADD_FLAG("CFLAGS_BD_MAIN", "/d2FuncCache1");
+}
AC_DEFINE('HAVE_STRNLEN', 1);
ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c plain_wrapper.c \
userspace.c transports.c xp_socket.c mmap.c glob_wrapper.c");
ADD_FLAG("CFLAGS_BD_MAIN_STREAMS", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
+if (VS_TOOLSET && VCVERS >= 1914) {
+ ADD_FLAG("CFLAGS_BD_MAIN_STREAMS", "/d2FuncCache1");
+}
ADD_SOURCES("win32", "dllmain.c glob.c readdir.c \
registry.c select.c sendmail.c time.c winutil.c wsyslog.c globals.c \
@@ -262,6 +271,9 @@ ADD_SOURCES("win32", "dllmain.c glob.c readdir.c \
inet.c fnmatch.c sockets.c console.c");
ADD_FLAG("CFLAGS_BD_WIN32", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
+if (VS_TOOLSET && VCVERS >= 1914) {
+ ADD_FLAG("CFLAGS_BD_WIN32", "/d2FuncCache1");
+}
PHP_INSTALL_HEADERS("", "Zend/ TSRM/ main/ main/streams/ win32/");
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 7a34090abe..d11a296783 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1257,10 +1257,16 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
if (PHP_DEBUG != "yes" && PHP_PGI == "yes") {
ADD_FLAG('CFLAGS_' + SAPI, "/GL /O2");
ADD_FLAG('LDFLAGS_' + SAPI, "/LTCG /GENPROFILE");
+ if (VCVERS >= 1914) {
+ ADD_FLAG('LDFLAGS_' + SAPI, "/d2:-FuncCache1");
+ }
}
else if (PHP_DEBUG != "yes" && PHP_PGO != "no") {
ADD_FLAG('CFLAGS_' + SAPI, "/GL /O2");
ADD_FLAG('LDFLAGS_' + SAPI, "/LTCG /USEPROFILE");
+ if (VCVERS >= 1914) {
+ ADD_FLAG('LDFLAGS_' + SAPI, "/d2:-FuncCache1");
+ }
}
ldflags += " /PGD:$(PGOPGD_DIR)\\" + makefiletarget.substring(0, makefiletarget.indexOf(".")) + ".pgd";
@@ -1463,9 +1469,15 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
// Add compiler and link flags if PGO options are selected
if (PHP_DEBUG != "yes" && PHP_PGI == "yes") {
ADD_FLAG('LDFLAGS_' + EXT, "/LTCG /GENPROFILE");
+ if (VCVERS >= 1914) {
+ ADD_FLAG('LDFLAGS_' + EXT, "/d2:-FuncCache1");
+ }
}
else if (PHP_DEBUG != "yes" && PHP_PGO != "no") {
ADD_FLAG('LDFLAGS_' + EXT, "/LTCG /USEPROFILE");
+ if (VCVERS >= 1914) {
+ ADD_FLAG('LDFLAGS_' + EXT, "/d2:-FuncCache1");
+ }
}
ADD_FLAG('CFLAGS_' + EXT, "/GL /O2");
@@ -3230,6 +3242,10 @@ function toolset_setup_common_cflags()
/* This is only in effect for CXX sources, __cplusplus is not defined in C sources. */
ADD_FLAG("CFLAGS", "/Zc:__cplusplus");
}
+
+ if (VCVERS >= 1914) {
+ ADD_FLAG("CFLAGS", "/d2FuncCache1");
+ }
} else if (CLANG_TOOLSET) {
if (X64) {
ADD_FLAG('CFLAGS', '-m64');
diff --git a/win32/ioutil.c b/win32/ioutil.c
index 2ff62e3b6c..d3fb2bdb59 100644
--- a/win32/ioutil.c
+++ b/win32/ioutil.c
@@ -785,6 +785,38 @@ PW32IO char *realpath(const char *path, char *resolved)
return php_win32_ioutil_realpath(path, resolved);
}/*}}}*/
+PW32IO int php_win32_ioutil_symlink_w(const wchar_t *target, const wchar_t *link)
+{/*{{{*/
+ DWORD attr;
+ BOOLEAN res;
+
+ if ((attr = GetFileAttributesW(target)) == INVALID_FILE_ATTRIBUTES) {
+ SET_ERRNO_FROM_WIN32_CODE(GetLastError());
+ return -1;
+ }
+
+ res = CreateSymbolicLinkW(link, target, (attr & FILE_ATTRIBUTE_DIRECTORY ? 1 : 0));
+ if (!res) {
+ SET_ERRNO_FROM_WIN32_CODE(GetLastError());
+ return -1;
+ }
+
+ return 0;
+}/*}}}*/
+
+PW32IO int php_win32_ioutil_link_w(const wchar_t *target, const wchar_t *link)
+{/*{{{*/
+ BOOL res;
+
+ res = CreateHardLinkW(target, link, NULL);
+ if (!res) {
+ SET_ERRNO_FROM_WIN32_CODE(GetLastError());
+ return -1;
+ }
+
+ return 0;
+}/*}}}*/
+
/*
* Local variables:
* tab-width: 4
diff --git a/win32/ioutil.h b/win32/ioutil.h
index 2a396f67b6..8c0275cad6 100644
--- a/win32/ioutil.h
+++ b/win32/ioutil.h
@@ -261,6 +261,8 @@ PW32IO int php_win32_ioutil_mkdir_w(const wchar_t *path, mode_t mode);
PW32IO FILE *php_win32_ioutil_fopen_w(const wchar_t *path, const wchar_t *mode);
PW32IO wchar_t *php_win32_ioutil_realpath_w(const wchar_t *path, wchar_t *resolved);
PW32IO wchar_t *php_win32_ioutil_realpath_w_ex0(const wchar_t *path, wchar_t *resolved, PBY_HANDLE_FILE_INFORMATION info);
+PW32IO int php_win32_ioutil_symlink_w(const wchar_t *target, const wchar_t *link);
+PW32IO int php_win32_ioutil_link_w(const wchar_t *target, const wchar_t *link);
__forceinline static int php_win32_ioutil_access(const char *path, mode_t mode)
{/*{{{*/
@@ -571,6 +573,57 @@ __forceinline static int php_win32_ioutil_mkdir(const char *path, mode_t mode)
return ret;
}/*}}}*/
+__forceinline static int php_win32_ioutil_symlink(const char *target, const char *link)
+{/*{{{*/
+ wchar_t *targetw, *linkw;
+ int ret;
+
+ targetw = php_win32_ioutil_any_to_w(target);
+ if (!targetw) {
+ SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+
+ linkw = php_win32_ioutil_any_to_w(link);
+ if (!linkw) {
+ free(targetw);
+ SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+
+ ret = php_win32_ioutil_symlink_w(targetw, linkw);
+
+ free(targetw);
+ free(linkw);
+
+ return ret;
+}/*}}}*/
+
+__forceinline static int php_win32_ioutil_link(const char *target, const char *link)
+{/*{{{*/
+ wchar_t *targetw, *linkw;
+ int ret;
+
+ targetw = php_win32_ioutil_any_to_w(target);
+ if (!targetw) {
+ SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+ linkw = php_win32_ioutil_any_to_w(link);
+ if (!linkw) {
+ free(targetw);
+ SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+
+ ret = php_win32_ioutil_link_w(targetw, linkw);
+
+ free(targetw);
+ free(linkw);
+
+ return ret;
+}/*}}}*/
+
#define HAVE_REALPATH 1
PW32IO char *realpath(const char *path, char *resolved);