From 59cec6e67db6bdcb86c49ea3063ab436d0da466f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 17 Oct 2018 16:10:22 +0200 Subject: [PATCH 01/19] Run CI tests under opcache.protect_memory=1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bb7619aec11..8a9b0b7e9c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,7 @@ before_script: # Run PHPs run-tests.php script: - - ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 + - ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 after_success: - ccache --show-stats From 8a9e0312ce90f6cdc55a8fb6f1e1af326306b97a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 17 Oct 2018 16:27:07 +0200 Subject: [PATCH 02/19] Fix #77027: tidy::getOptDoc() not available on Windows We define the `HAVE_TIDYOPTGETDOC` macro unconditionally, since the Windows PHP SDK ships libtidy 2009/04/06 or newer for a long time. We do not add a regression test, since 021.phpt already tests `tidy_get_opt_doc`, but has previously been skipped due to unavailability of the function. --- NEWS | 3 +++ ext/tidy/config.w32 | 1 + 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 4652c6657f5..b1eb3c3be1e 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,9 @@ PHP NEWS . Fixed bug #76965 (INI_SCANNER_RAW doesn't strip trailing whitespace). (Pierrick) +- Tidy: + . Fixed bug #77027 (tidy::getOptDoc() not available on Windows). (cmb) + - XML: . Fixed bug #30875 (xml_parse_into_struct() does not resolve entities). (cmb) . Add support for getting SKIP_TAGSTART and SKIP_WHITE options. (cmb) diff --git a/ext/tidy/config.w32 b/ext/tidy/config.w32 index 44b2abeacc4..aa4eb465398 100644 --- a/ext/tidy/config.w32 +++ b/ext/tidy/config.w32 @@ -17,6 +17,7 @@ if (PHP_TIDY != "no") { EXTENSION("tidy", "tidy.c"); AC_DEFINE('HAVE_TIDY', 1, 'Have TIDY library'); + AC_DEFINE('HAVE_TIDYOPTGETDOC', 1, "tidy_get_opt_doc function") ADD_FLAG('CFLAGS_TIDY', '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1'); if (!PHP_TIDY_SHARED) { ADD_DEF_FILE("ext\\tidy\\php_tidy.def"); From a0a1c8990ede33b2d5b7976f1a19a82aaa226fcb Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 17 Oct 2018 17:44:03 +0300 Subject: [PATCH 03/19] Fixed incorrect reallocation --- ext/opcache/zend_accelerator_util_funcs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index acec571f4df..ce9f025b991 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -178,7 +178,9 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class new_entry->prototype = ARENA_REALLOC(new_entry->prototype); } } - ZEND_MAP_PTR_INIT(new_entry->run_time_cache, ARENA_REALLOC(ZEND_MAP_PTR(new_entry->run_time_cache))); + if (IN_ARENA(ZEND_MAP_PTR(new_entry->run_time_cache))) { + ZEND_MAP_PTR_INIT(new_entry->run_time_cache, ARENA_REALLOC(ZEND_MAP_PTR(new_entry->run_time_cache))); + } ZEND_MAP_PTR_INIT(new_entry->static_variables_ptr, &new_entry->static_variables); } } From 24b677925434f4c2f3065646d1aff3f2eeaf2e13 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 17 Oct 2018 23:41:37 +0200 Subject: [PATCH 04/19] [ci skip] Update UPGRADING wrt. tidyp support This is especially noteworthy since `tidy_get_relase()` returns 'unknown' when built against libtidyp, which might break some code which relies on `tidy_get_release()` to return a date formatted as `yyyy/mm/dd`. --- UPGRADING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPGRADING b/UPGRADING index a43857ea987..cbc231a5897 100644 --- a/UPGRADING +++ b/UPGRADING @@ -477,6 +477,11 @@ PCRE: (`(object) array( ... )`), rather than using the nonexistent method stdClass::__setState(). + Tidy: + . Building against tidyp () is now also + supported transparently. Since tidyp offers no API to get the release date, + tidy_get_release() and tidy::getRelease() return 'unknown' in this case. + Zip: . Building against the bundled libzip is discouraged, but still possible by adding `--without-libzip` to the configuration. From fda06127fa71637df7913e06fc8124448c934fdc Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 18 Oct 2018 00:43:24 +0200 Subject: [PATCH 05/19] Fix test when it's run on another drive --- ext/opcache/tests/blacklist-win32.phpt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/opcache/tests/blacklist-win32.phpt b/ext/opcache/tests/blacklist-win32.phpt index 7fbe5dbd296..70c87338b50 100644 --- a/ext/opcache/tests/blacklist-win32.phpt +++ b/ext/opcache/tests/blacklist-win32.phpt @@ -23,9 +23,9 @@ print_r(count($status['scripts']) > 0); --EXPECTF-- Array ( - [0] => C:\path\to\foo - [1] => C:\path\to\foo2 - [2] => C:\path\to\bar + [0] => %c:\path\to\foo + [1] => %c:\path\to\foo2 + [2] => %c:\path\to\bar [3] => __DIR__\blacklist.inc [4] => __DIR__\current.php [5] => %scurrent.php From 78a8b0f0d77938fecb178b8f58d2463de0c01947 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Wed, 17 Oct 2018 21:14:46 -0400 Subject: [PATCH 06/19] Fix a typo in UPGRADING.INTERNALS --- UPGRADING.INTERNALS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 8f4046032b7..e2e56c74a30 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -34,7 +34,7 @@ PHP 7.4 INTERNALS UPGRADE NOTES c. Function/property/class flags changes - ZEND_ACC_CTOR and ZEND_ACC_DTOR are removed. It's possible to check if method is a constructor/destructor using the following condition - (func->commpon.scope->constructor == func). + (func->common.scope->constructor == func). - ZEND_ACC_IMPLEMENTED_ABSTRACT is removed (it was used only internally during inheritance). - ZEND_ACC_IMPLICIT_PUBLIC is removed (it was used only for reflection) From 0e60b812c05ed5e3704ab6f31f29040040c3edd7 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 7 Oct 2018 04:31:59 +0200 Subject: [PATCH 07/19] Move all testing docs to qa.php.net The qa.php.net currently includes nice collection of information about tests and how to run them. Instead of maintaining two locations of this information, this patch removes the README.TESTING from the php-src repo. Patch for qa.php.net has been sent separately to that repo. --- CODING_STANDARDS | 2 +- CONTRIBUTING.md | 3 - README.SUBMITTING_PATCH | 9 +- README.TESTING | 181 -------------------- README.md | 7 + ext/exif/tests/exif005.phpt | 4 +- ext/sodium/tests/installed.phpt | 3 - ext/standard/tests/strings/str_shuffle.phpt | 1 - ext/standard/tests/strings/strings001.phpt | 1 - ext/standard/tests/strings/strtr.phpt | 1 - 10 files changed, 13 insertions(+), 199 deletions(-) delete mode 100644 README.TESTING diff --git a/CODING_STANDARDS b/CODING_STANDARDS index 7e0131e9c83..4af03c6bc71 100644 --- a/CODING_STANDARDS +++ b/CODING_STANDARDS @@ -251,7 +251,7 @@ Testing ------- 1. Extensions should be well tested using *.phpt tests. Read about that - in README.TESTING. + at https://qa.php.net/write-test.php. Documentation and Folding Hooks ------------------------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b37fa499e9..f71f72a1d10 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,9 +52,6 @@ We love getting new tests! PHP is a huge project and improving code coverage is a huge win for every PHP user. [Our QA site includes a page detailing how to write test cases.](http://qa.php.net/write-test.php) -Please note that the section on submitting pull requests is outdated: in -addition to the process listed there, you can also -[submit pull requests](#pull-requests). ## Writing documentation diff --git a/README.SUBMITTING_PATCH b/README.SUBMITTING_PATCH index be14a97bc3a..72725d689c1 100644 --- a/README.SUBMITTING_PATCH +++ b/README.SUBMITTING_PATCH @@ -138,11 +138,10 @@ work on "master". Read CODING_STANDARDS before you start working. -After modifying the source see README.TESTING and -http://qa.php.net/write-test.php for how to test. Submitting test -scripts helps us to understand what functionality has changed. It is -important for the stability and maintainability of PHP that tests are -comprehensive. +After modifying the source see https://qa.php.net/write-test.php for +how to test. Submitting test scripts helps us to understand what +functionality has changed. It is important for the stability and +maintainability of PHP that tests are comprehensive. After testing is finished, create a patch file using the command: diff --git a/README.TESTING b/README.TESTING deleted file mode 100644 index 45f160f4c2e..00000000000 --- a/README.TESTING +++ /dev/null @@ -1,181 +0,0 @@ -[IMPORTANT NOTICE] ------------------- - Failed tests usually indicate a problem with your local system setup -and not within PHP itself (at least for official PHP release versions). -You may decide to automatically submit a test summary to our QA workflow -at the end of a test run. - Please do *not* submit a failed test as a bug or ask for help on why -it failed on your system without providing substantial backup information -on *why* the test failed on your special setup. Thank you :-) - - -[Testing Basics] ----------------- - The easiest way to test your PHP build is to run "make test" from the -command line after successfully compiling. This will run the complete -tests for all enabled functionalities and extensions using the PHP -CLI binary. - To execute test scripts, you must build PHP with some SAPI, then you -type "make test" to execute all or some test scripts saved under -"tests" directory under source root directory. - -Usage: -make test - - "make test" basically executes "run-tests.php" script -under the source root (parallel builds will not work). Therefore you -can execute the script as follows: - -TEST_PHP_EXECUTABLE=sapi/cli/php \ -sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB] - - -[Which "php" executable "make test" look for] ---------------------------------------------- -If you are running the run-tests.php script from the command line (as above) -you must set the TEST_PHP_EXECUTABLE environment variable to explicitly -select the PHP executable that is to be tested, that is, used to run the test scripts. - -If you run the tests using make test, the PHP CLI and CGI executables are -automatically set for you. "make test" executes "run-tests.php" script with the CLI binary. Some -test scripts such as session must be executed by CGI SAPI. Therefore, -you must build PHP with CGI SAPI to perform all tests. - -NOTE: PHP binary executing "run-tests.php" and php binary used for -executing test scripts may differ. If you use different PHP binary for -executing "run-tests.php" script, you may get errors. - - -[Which php.ini is used] ------------------------ - "make test" uses the same php.ini file as it would once installed. -The tests have been written to be independent of that php.ini file, -so if you find a test that is affected by a setting, please report -this, so we can address the issue. - - -[Which test scripts are executed] ---------------------------------- - "run-tests.php" ("make test"), without any arguments executes all -test scripts by extracting all directories named "tests" -from the source root and any subdirectories below. If there are files, -which have a "phpt" extension, "run-tests.php" looks at the sections -in these files, determines whether it should run it, by evaluating -the 'SKIPIF' section. If the test is eligible for execution, the 'FILE' -section is extracted into a ".php" file (with the same name besides -the extension) and gets executed. -When an argument is given or TESTS environment variable is set, the -GLOB is expanded by the shell and any file with extension "*.phpt" is -regarded as a test file. - - Tester can easily execute tests selectively with as follows. - -Examples: -./sapi/cli/php run-tests.php ext/mbstring/* -./sapi/cli/php run-tests.php ext/mbstring/020.phpt - - -[Test results] --------------- - Test results are printed to standard output. If there is a failed test, -the "run-tests.php" script saves the result, the expected result and the -code executed to the test script directory. For example, if -ext/myext/tests/myext.phpt fails to pass, the following files are created: - -ext/myext/tests/myext.php - actual test file executed -ext/myext/tests/myext.log - log of test execution (L) -ext/myext/tests/myext.exp - expected output (E) -ext/myext/tests/myext.out - output from test script (O) -ext/myext/tests/myext.diff - diff of .out and .exp (D) - - Failed tests are always bugs. Either the test is bugged or not considering -factors applying to the tester's environment, or there is a bug in PHP. -If this is a known bug, we strive to provide bug numbers, in either the -test name or the file name. You can check the status of such a bug, by -going to: http://bugs.php.net/12345 where 12345 is the bug number. -For clarity and automated processing, bug numbers are prefixed by a hash -sign '#' in test names and/or test cases are named bug12345.phpt. - -NOTE: The files generated by tests can be selected by setting the -environment variable TEST_PHP_LOG_FORMAT. For each file you want to be -generated use the character in brackets as shown above (default is LEOD). -The php file will be generated always. - -NOTE: You can set environment variable TEST_PHP_DETAILED to enable -detailed test information. - -[Automated Testing] --------------- - If you like to keep up to speed, with latest developments and quality -assurance, setting the environment variable NO_INTERACTION to 1, will not -prompt the tester for any user input. - -Normally, the exit status of "make test" is zero, regardless of the results -of independent tests. Set the environment variable REPORT_EXIT_STATUS to 1, -and "make test" will set the exit status ("$?") to non-zero, when an -individual test has failed. - -Example script to be run by cron(1): -========== qa-test.sh ============= -#!/bin/sh - -CO_DIR=$HOME/cvs/php7 -MYMAIL=qa-test@domain.com -TMPDIR=/var/tmp -TODAY=`date +"%Y%m%d"` - -# Make sure compilation environment is correct -CONFIGURE_OPTS='--disable-all --enable-cli --with-pcre' -export MAKE=gmake -export CC=gcc - -# Set test environment -export NO_INTERACTION=1 -export REPORT_EXIT_STATUS=1 - -cd $CO_DIR -cvs update . >>$TMPDIR/phpqatest.$TODAY -./cvsclean ; ./buildconf ; ./configure $CONFIGURE_OPTS ; $MAKE -$MAKE test >>$TMPDIR/phpqatest.$TODAY 2>&1 -if test $? -gt 0 -then - cat $TMPDIR/phpqatest.$TODAY | mail -s"PHP-QA Test Failed for $TODAY" $MYMAIL -fi -========== end of qa-test.sh ============= - -NOTE: The exit status of run-tests.php will be 1 when -REPORT_EXIT_STATUS is set. The result of "make test" may be higher -than that. At present, gmake 3.79.1 returns 2, so it is -advised to test for non-zero, rather then a specific value. - - -[Creating new test files] -------------------------- - Writing test file is very easy if you are used to PHP. -See the HOWTO at http://qa.php.net/write-test.php - - -[How to help us] ----------------- - If you find bug in PHP, you can submit bug report AND test script -for us. You don't have to write complete script, just give us test -script with following format. Please test the script and make sure -you write the correct ACTUAL OUTPUT and EXPECTED OUTPUT before you -submit. - - diff --git a/README.md b/README.md index 4e59318e5bb..9f34f8a9069 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,10 @@ Guidelines for contributors - [README.GIT-RULES](/README.GIT-RULES) - [README.MAILINGLIST_RULES](/README.MAILINGLIST_RULES) - [README.RELEASE_PROCESS](/README.RELEASE_PROCESS) + +## Testing + +To run tests the `make test` is used after successful compilation of the sources. + +See [Creating new test files](https://qa.php.net/write-test.php) chapter for more +information about testing. diff --git a/ext/exif/tests/exif005.phpt b/ext/exif/tests/exif005.phpt index b472aa826fb..a2282aa1b00 100644 --- a/ext/exif/tests/exif005.phpt +++ b/ext/exif/tests/exif005.phpt @@ -7,9 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- diff --git a/ext/sodium/tests/installed.phpt b/ext/sodium/tests/installed.phpt index e548b5f8dcc..e6101ed509d 100644 --- a/ext/sodium/tests/installed.phpt +++ b/ext/sodium/tests/installed.phpt @@ -12,9 +12,6 @@ echo "sodium extension is available"; text in the --EXPECT-- section below for the tests to pass, differences between the output and the expected text are interpreted as failure - - see php7/README.TESTING for further information on - writing regression tests */ ?> --EXPECT-- diff --git a/ext/standard/tests/strings/str_shuffle.phpt b/ext/standard/tests/strings/str_shuffle.phpt index 878cb283dd3..f5122bc2022 100644 --- a/ext/standard/tests/strings/str_shuffle.phpt +++ b/ext/standard/tests/strings/str_shuffle.phpt @@ -2,7 +2,6 @@ Testing str_shuffle. --FILE-- "hi", "hi"=>"hello", "a"=>"A", "world"=>"planet"); var_dump(strtr("# hi all, I said hello world! #", $trans)); ?> From 370882bb598599a768b2fe05c7997d6248b68419 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 17 Oct 2018 06:06:50 +0200 Subject: [PATCH 08/19] Remove stamp-h The stamp-* files can be used as helpers for Makefiles to not redo certain targets again. The stamp-h are mentioned in the Autoconf docs [1] to help generate the config.h file. Since the usage of stamp-h file was removed in 232afa4816c60a20d3db48c304ac59312d46ec46 this patch cleans few obsolete occurrences. This patch also removes two occurrences of `main/stamp-h1` and `main/streams/stamp-h1` rules in the .gitignore file since they are not generated with the current build systems anymore. The `stamp-h$am_indx` files were once generated using aclocal and automake. [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html --- .gitignore | 4 ---- Makefile.global | 2 +- stamp-h.in | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 stamp-h.in diff --git a/.gitignore b/.gitignore index 1ee16de4c76..9bd5c8f26a5 100644 --- a/.gitignore +++ b/.gitignore @@ -71,19 +71,15 @@ php_test_results_*.txt php_version.h results.txt shlibtool -stamp-h test.php3 tmp-php.ini -stamp-h.in scan_makefile_in.awk main/php_config.h main/php_config.h.in main/build-defs.h main/internal_functions_cli.c main/config.w32.h -main/stamp-h1 main/streams/build-defs.h -main/streams/stamp-h1 pear/install-pear-nozlib.phar pear/phpize pear/run-tests diff --git a/Makefile.global b/Makefile.global index 3a7a18cc3f8..29d74d3acbc 100644 --- a/Makefile.global +++ b/Makefile.global @@ -118,7 +118,7 @@ clean: rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/* distclean: clean - rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h + rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h rm -f php7.spec main/build-defs.h scripts/phpize rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1 diff --git a/stamp-h.in b/stamp-h.in deleted file mode 100644 index 9788f70238c..00000000000 --- a/stamp-h.in +++ /dev/null @@ -1 +0,0 @@ -timestamp From a4b33f775eb06663635c589e1ef12ad293c45171 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 18 Oct 2018 16:40:24 +0300 Subject: [PATCH 09/19] Added new line --- Zend/zend_vm_gen.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 6c69737153f..341ed14a0d2 100755 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -2674,6 +2674,7 @@ function gen_vm($def, $skel) { gen_executor($f, $skl, ZEND_VM_SPEC, ZEND_VM_KIND, "execute", "zend_vm_init"); // Generate zend_vm_get_opcode_handler() function + out($f, "\n"); out($f, "static const void* ZEND_FASTCALL zend_vm_get_opcode_handler_ex(uint32_t spec, const zend_op* op)\n"); out($f, "{\n"); if (!ZEND_VM_SPEC) { From 322b97a19a3a06d7d66e6f74b4dc071384badf64 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 18 Oct 2018 23:16:43 +0200 Subject: [PATCH 10/19] Use C++ symbols, when C++11 or upper is compiled --- Zend/configure.ac | 14 +++++++++++--- Zend/zend_config.w32.h | 7 +++++++ configure.ac | 13 ++++++++++--- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Zend/configure.ac b/Zend/configure.ac index 8252cfb3426..694ecbc8888 100644 --- a/Zend/configure.ac +++ b/Zend/configure.ac @@ -50,10 +50,16 @@ int zend_sprintf(char *buffer, const char *format, ...); # define zend_sprintf sprintf #endif +#if defined(__cplusplus) && __cplusplus >= 201103L +#include +#define zend_isnan std::isnan +#define zend_isinf std::isinf +#define zend_finite std::isfinite +#else #include #ifndef zend_isnan -#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L) +#if HAVE_DECL_ISNAN #define zend_isnan(a) isnan(a) #elif defined(HAVE_FPCLASS) #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) @@ -62,7 +68,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #endif #endif -#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L) +#if HAVE_DECL_ISINF #define zend_isinf(a) isinf(a) #elif defined(INFINITY) /* Might not work, but is required by ISO C99 */ @@ -73,7 +79,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_isinf(a) 0 #endif -#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L) +#if HAVE_DECL_ISFINITE #define zend_finite(a) isfinite(a) #elif defined(HAVE_FINITE) #define zend_finite(a) finite(a) @@ -83,6 +89,8 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1) #endif +#endif + #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */ ]) diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h index 71d550e57ba..37442ff018e 100644 --- a/Zend/zend_config.w32.h +++ b/Zend/zend_config.w32.h @@ -50,9 +50,16 @@ typedef unsigned int uint; #endif #define strcasecmp(s1, s2) _stricmp(s1, s2) #define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n) +#if defined(__cplusplus) && __cplusplus >= 201103L +#include +#define zend_isnan std::isnan +#define zend_isinf std::isinf +#define zend_finite std::isfinite +#else #define zend_isinf(a) ((_fpclass(a) == _FPCLASS_PINF) || (_fpclass(a) == _FPCLASS_NINF)) #define zend_finite(x) _finite(x) #define zend_isnan(x) _isnan(x) +#endif #define zend_sprintf sprintf diff --git a/configure.ac b/configure.ac index 09cb2706bbc..bd9a065ce12 100644 --- a/configure.ac +++ b/configure.ac @@ -59,10 +59,16 @@ int zend_sprintf(char *buffer, const char *format, ...); # define zend_sprintf sprintf #endif +#if defined(__cplusplus) && __cplusplus >= 201103L +#include +#define zend_isnan std::isnan +#define zend_isinf std::isinf +#define zend_finite std::isfinite +#else #include #ifndef zend_isnan -#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L) +#if HAVE_DECL_ISNAN #define zend_isnan(a) isnan(a) #elif defined(HAVE_FPCLASS) #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) @@ -71,7 +77,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #endif #endif -#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L) +#if HAVE_DECL_ISINF #define zend_isinf(a) isinf(a) #elif defined(INFINITY) /* Might not work, but is required by ISO C99 */ @@ -82,7 +88,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_isinf(a) 0 #endif -#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L) +#if HAVE_DECL_ISFINITE #define zend_finite(a) isfinite(a) #elif defined(HAVE_FINITE) #define zend_finite(a) finite(a) @@ -92,6 +98,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1) #endif +#endif #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */ #undef PTHREADS From f5bc049136f86b0e0613f4b92e86cd41457aedc9 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 18 Oct 2018 23:36:46 +0200 Subject: [PATCH 11/19] Revert "Use C++ symbols, when C++11 or upper is compiled" This reverts commit 322b97a19a3a06d7d66e6f74b4dc071384badf64. GCC 5 vs. 8 seems to be a big deal in this regard. The approach needs further consideration. --- Zend/configure.ac | 14 +++----------- Zend/zend_config.w32.h | 7 ------- configure.ac | 13 +++---------- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/Zend/configure.ac b/Zend/configure.ac index 694ecbc8888..8252cfb3426 100644 --- a/Zend/configure.ac +++ b/Zend/configure.ac @@ -50,16 +50,10 @@ int zend_sprintf(char *buffer, const char *format, ...); # define zend_sprintf sprintf #endif -#if defined(__cplusplus) && __cplusplus >= 201103L -#include -#define zend_isnan std::isnan -#define zend_isinf std::isinf -#define zend_finite std::isfinite -#else #include #ifndef zend_isnan -#if HAVE_DECL_ISNAN +#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L) #define zend_isnan(a) isnan(a) #elif defined(HAVE_FPCLASS) #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) @@ -68,7 +62,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #endif #endif -#if HAVE_DECL_ISINF +#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L) #define zend_isinf(a) isinf(a) #elif defined(INFINITY) /* Might not work, but is required by ISO C99 */ @@ -79,7 +73,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_isinf(a) 0 #endif -#if HAVE_DECL_ISFINITE +#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L) #define zend_finite(a) isfinite(a) #elif defined(HAVE_FINITE) #define zend_finite(a) finite(a) @@ -89,8 +83,6 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1) #endif -#endif - #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */ ]) diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h index 37442ff018e..71d550e57ba 100644 --- a/Zend/zend_config.w32.h +++ b/Zend/zend_config.w32.h @@ -50,16 +50,9 @@ typedef unsigned int uint; #endif #define strcasecmp(s1, s2) _stricmp(s1, s2) #define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n) -#if defined(__cplusplus) && __cplusplus >= 201103L -#include -#define zend_isnan std::isnan -#define zend_isinf std::isinf -#define zend_finite std::isfinite -#else #define zend_isinf(a) ((_fpclass(a) == _FPCLASS_PINF) || (_fpclass(a) == _FPCLASS_NINF)) #define zend_finite(x) _finite(x) #define zend_isnan(x) _isnan(x) -#endif #define zend_sprintf sprintf diff --git a/configure.ac b/configure.ac index bd9a065ce12..09cb2706bbc 100644 --- a/configure.ac +++ b/configure.ac @@ -59,16 +59,10 @@ int zend_sprintf(char *buffer, const char *format, ...); # define zend_sprintf sprintf #endif -#if defined(__cplusplus) && __cplusplus >= 201103L -#include -#define zend_isnan std::isnan -#define zend_isinf std::isinf -#define zend_finite std::isfinite -#else #include #ifndef zend_isnan -#if HAVE_DECL_ISNAN +#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L) #define zend_isnan(a) isnan(a) #elif defined(HAVE_FPCLASS) #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) @@ -77,7 +71,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #endif #endif -#if HAVE_DECL_ISINF +#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L) #define zend_isinf(a) isinf(a) #elif defined(INFINITY) /* Might not work, but is required by ISO C99 */ @@ -88,7 +82,7 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_isinf(a) 0 #endif -#if HAVE_DECL_ISFINITE +#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L) #define zend_finite(a) isfinite(a) #elif defined(HAVE_FINITE) #define zend_finite(a) finite(a) @@ -98,7 +92,6 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1) #endif -#endif #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */ #undef PTHREADS From de9f325c12d631d0fcbb90d0e5cf34235d9d6073 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 18 Oct 2018 16:30:18 +0200 Subject: [PATCH 12/19] Fix tests/output/bug74815.phpt generating errors.log Test tests/output/bug74815.phpt was creating an errors.log file in project root directory and didn't removed it after the test. --- tests/output/bug74815.phpt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/output/bug74815.phpt b/tests/output/bug74815.phpt index be4fa1b2cbd..1d9c8259999 100644 --- a/tests/output/bug74815.phpt +++ b/tests/output/bug74815.phpt @@ -5,10 +5,14 @@ Bug #74815 crash with a combination of INI entries at startup $php = getenv("TEST_PHP_EXECUTABLE"); -echo shell_exec("$php -n -d error_log=errors.log -d error_reporting=E_ALL -d log_errors=On -d track_errors=On -v"); +echo shell_exec("$php -n -d error_log=".__DIR__."/error_log.tmp -d error_reporting=E_ALL -d log_errors=On -d track_errors=On -v"); ?> ==DONE== +--CLEAN-- + --EXPECTF-- Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0 %A From 00db0e7a0424ef23086557de1a1eda070596f05e Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 18 Oct 2018 13:43:34 +0200 Subject: [PATCH 13/19] Remove outdated PEAR artefacts The `pear/scripts`, `pear/php-config`, `pear/phpize`, and `pear/run-tests` used to be part of the PEAR installation. Now, the pear installation PHAR file is directly downloaded from pear.php.net instead. --- .gitignore | 4 ---- configure.ac | 1 - 2 files changed, 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9bd5c8f26a5..75a1f2aa948 100644 --- a/.gitignore +++ b/.gitignore @@ -81,10 +81,6 @@ main/internal_functions_cli.c main/config.w32.h main/streams/build-defs.h pear/install-pear-nozlib.phar -pear/phpize -pear/run-tests -pear/php-config -pear/scripts sapi/apache2handler/libphp7.module sapi/cgi/php-cgi sapi/cgi/php-cgi.1 diff --git a/configure.ac b/configure.ac index 09cb2706bbc..2eda8f440f3 100644 --- a/configure.ac +++ b/configure.ac @@ -1534,7 +1534,6 @@ PHP_GEN_GLOBAL_MAKEFILE AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ]) -$php_shtool mkdir -p pear/scripts $php_shtool mkdir -p scripts $php_shtool mkdir -p scripts/man1 From 447b41f6bb1e9a5bdeac411277e21a55207123b0 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 19 Oct 2018 00:02:09 +0200 Subject: [PATCH 14/19] Fix #77035: The phpize and ./configure create redundant .deps file The `.deps` file(s) was once used by Automake and created to write dependencies to it. The file creation has been removed via the commit 779c11af21cf8a627b8f2f2edef9e9073c76ed94. The phpize and ./configure script create a redundant .deps file in a PECL extension directory which might cause confusions why is it used. Today it is no longer relevant so this redundant artefact can be removed in the phpize configure script. --- .gitignore | 1 - ext/ext_skel | 1 - scripts/phpize.in | 2 +- scripts/phpize.m4 | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2e95e2510f8..a9e2e51221f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ *.tar.xz.asc .FBCIndex .FBCLockFolder -.deps .libs phpt.* core diff --git a/ext/ext_skel b/ext/ext_skel index 63563e7f022..88b10e9dbcf 100755 --- a/ext/ext_skel +++ b/ext/ext_skel @@ -189,7 +189,6 @@ eof $ECHO_N " .gitignore$ECHO_C" cat >.gitignore < Date: Fri, 19 Oct 2018 00:06:11 +0200 Subject: [PATCH 15/19] [ci skip] Update NEWS --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index b1eb3c3be1e..3243a7ecb9e 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ PHP NEWS - Core: . Fixed bug #76946 (Cyclic reference in generator not detected). (Nikita) + . Fixed bug #77035 (The phpize and ./configure create redundant .deps file). + (Peter Kokot) - Date: . Fixed bug #75851 (Year component overflow with date formats "c", "o", "r" From b9d8e5d706e36b7e8bb8bdd26bc93374fd9a6020 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 19 Oct 2018 00:08:57 +0200 Subject: [PATCH 16/19] [ci skip] Update NEWS --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 7823584107f..28e554b5fb5 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS . Fixed bug #76846 (Segfault in shutdown function after memory limit error). (Nikita) . Fixed bug #76946 (Cyclic reference in generator not detected). (Nikita) + . Fixed bug #77035 (The phpize and ./configure create redundant .deps file). + (Peter Kokot) - Date: . Upgraded timelib to 2017.08. (Derick) From 2224277d7d7efb06adcb512427e299295876fb87 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 19 Oct 2018 00:12:34 +0200 Subject: [PATCH 17/19] [ci skip] Update NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index adccc4d2bd4..c103d5dd23e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.3.0RC4 +- Core: + . Fixed bug #77035 (The phpize and ./configure create redundant .deps file). + (Peter Kokot) + - Date: . Updated timelib to 2018.01RC1 to address several bugs: (Derick) . Fixed bug #75577 (DateTime::createFromFormat does not accept 'v' format From 03384cae3c46254ccfd5d703b408a0f1d011ee3c Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 19 Oct 2018 13:21:31 +0300 Subject: [PATCH 18/19] Don't initialize static_member_tables during start-up, when inherit internal classes. --- Zend/zend_inheritance.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index ed5a554fb67..174d8145247 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -885,12 +885,11 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent dst = end + parent_ce->default_static_members_count; ce->default_static_members_table = end; } - if (CE_STATIC_MEMBERS(parent_ce) == NULL) { - ZEND_ASSERT(parent_ce->type == ZEND_INTERNAL_CLASS || (parent_ce->ce_flags & ZEND_ACC_IMMUTABLE)); - zend_class_init_statics(parent_ce); - } if (UNEXPECTED(parent_ce->type != ce->type)) { /* User class extends internal */ + if (CE_STATIC_MEMBERS(parent_ce) == NULL) { + zend_class_init_statics(parent_ce); + } if (UNEXPECTED(zend_update_class_constants(parent_ce) != SUCCESS)) { ZEND_ASSERT(0); } @@ -905,6 +904,10 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent } } while (dst != end); } else if (ce->type == ZEND_USER_CLASS) { + if (CE_STATIC_MEMBERS(parent_ce) == NULL) { + ZEND_ASSERT(parent_ce->ce_flags & ZEND_ACC_IMMUTABLE); + zend_class_init_statics(parent_ce); + } src = CE_STATIC_MEMBERS(parent_ce) + parent_ce->default_static_members_count; do { dst--; From 3fe698b90493cf9f61bb794b2eb61a1296052be7 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 19 Oct 2018 13:22:29 +0300 Subject: [PATCH 19/19] Mark "top-level" functions. --- Zend/zend_compile.c | 4 ++++ Zend/zend_compile.h | 52 ++++++++++++++++++++++----------------------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 39ee2a1063a..93766b98b5d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5895,6 +5895,10 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* CG(active_op_array) = op_array; + if (toplevel) { + op_array->fn_flags |= ZEND_ACC_TOP_LEVEL; + } + zend_oparray_context_begin(&orig_oparray_context); if (CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) { diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 5ce27ba85f1..8d34e0107c6 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -223,6 +223,9 @@ typedef struct _zend_oparray_context { /* Function has typed arguments / class has typed props | | | */ #define ZEND_ACC_HAS_TYPE_HINTS (1 << 8) /* ? | X | | */ /* | | | */ +/* Top-level class or function declaration | | | */ +#define ZEND_ACC_TOP_LEVEL (1 << 9) /* X | X | | */ +/* | | | */ /* Class Flags (unused: 16...) | | | */ /* =========== | | | */ /* | | | */ @@ -240,75 +243,72 @@ typedef struct _zend_oparray_context { /* | | | */ /* Class has magic methods __get/__set/__unset/ | | | */ /* __isset that use guards | | | */ -#define ZEND_ACC_USE_GUARDS (1 << 9) /* X | | | */ +#define ZEND_ACC_USE_GUARDS (1 << 10) /* X | | | */ /* | | | */ /* Class constants updated | | | */ -#define ZEND_ACC_CONSTANTS_UPDATED (1 << 10) /* X | | | */ +#define ZEND_ACC_CONSTANTS_UPDATED (1 << 11) /* X | | | */ /* | | | */ /* Class extends another class | | | */ -#define ZEND_ACC_INHERITED (1 << 11) /* X | | | */ +#define ZEND_ACC_INHERITED (1 << 12) /* X | | | */ /* | | | */ /* Class implements interface(s) | | | */ -#define ZEND_ACC_IMPLEMENT_INTERFACES (1 << 12) /* X | | | */ +#define ZEND_ACC_IMPLEMENT_INTERFACES (1 << 13) /* X | | | */ /* | | | */ /* Class uses trait(s) | | | */ -#define ZEND_ACC_IMPLEMENT_TRAITS (1 << 13) /* X | | | */ +#define ZEND_ACC_IMPLEMENT_TRAITS (1 << 14) /* X | | | */ /* | | | */ /* User class has methods with static variables | | | */ -#define ZEND_HAS_STATIC_IN_METHODS (1 << 14) /* X | | | */ +#define ZEND_HAS_STATIC_IN_METHODS (1 << 15) /* X | | | */ /* | | | */ -/* Top-level class declaration | | | */ -#define ZEND_ACC_TOP_LEVEL (1 << 15) /* X | | | */ -/* | | | */ -/* Function Flags (unused: 25...30) | | | */ +/* Function Flags (unused: 26...30) | | | */ /* ============== | | | */ /* | | | */ /* deprecation flag | | | */ -#define ZEND_ACC_DEPRECATED (1 << 9) /* | X | | */ +#define ZEND_ACC_DEPRECATED (1 << 10) /* | X | | */ /* | | | */ /* Function returning by reference | | | */ -#define ZEND_ACC_RETURN_REFERENCE (1 << 10) /* | X | | */ +#define ZEND_ACC_RETURN_REFERENCE (1 << 11) /* | X | | */ /* | | | */ /* Function has a return type | | | */ -#define ZEND_ACC_HAS_RETURN_TYPE (1 << 11) /* | X | | */ +#define ZEND_ACC_HAS_RETURN_TYPE (1 << 12) /* | X | | */ /* | | | */ /* Function with variable number of arguments | | | */ -#define ZEND_ACC_VARIADIC (1 << 12) /* | X | | */ +#define ZEND_ACC_VARIADIC (1 << 13) /* | X | | */ /* | | | */ /* op_array has finally blocks (user only) | | | */ -#define ZEND_ACC_HAS_FINALLY_BLOCK (1 << 13) /* | X | | */ +#define ZEND_ACC_HAS_FINALLY_BLOCK (1 << 14) /* | X | | */ /* | | | */ /* "main" op_array with | | | */ /* ZEND_DECLARE_INHERITED_CLASS_DELAYED opcodes | | | */ -#define ZEND_ACC_EARLY_BINDING (1 << 14) /* | X | | */ +#define ZEND_ACC_EARLY_BINDING (1 << 15) /* | X | | */ /* | | | */ /* method flag (bc only), any method that has this | | | */ /* flag can be used statically and non statically. | | | */ -#define ZEND_ACC_ALLOW_STATIC (1 << 15) /* | X | | */ +#define ZEND_ACC_ALLOW_STATIC (1 << 16) /* | X | | */ /* | | | */ /* call through user function trampoline. e.g. | | | */ /* __call, __callstatic | | | */ -#define ZEND_ACC_CALL_VIA_TRAMPOLINE (1 << 16) /* | X | | */ +#define ZEND_ACC_CALL_VIA_TRAMPOLINE (1 << 17) /* | X | | */ /* | | | */ /* disable inline caching | | | */ -#define ZEND_ACC_NEVER_CACHE (1 << 17) /* | X | | */ +#define ZEND_ACC_NEVER_CACHE (1 << 18) /* | X | | */ /* | | | */ /* Closure related | | | */ -#define ZEND_ACC_CLOSURE (1 << 18) /* | X | | */ -#define ZEND_ACC_FAKE_CLOSURE (1 << 19) /* | X | | */ +#define ZEND_ACC_CLOSURE (1 << 19) /* | X | | */ +#define ZEND_ACC_FAKE_CLOSURE (1 << 20) /* | X | | */ /* | | | */ /* run_time_cache allocated on heap (user only) | | | */ -#define ZEND_ACC_HEAP_RT_CACHE (1 << 20) /* | X | | */ +#define ZEND_ACC_HEAP_RT_CACHE (1 << 21) /* | X | | */ /* | | | */ /* method flag used by Closure::__invoke() | | | */ -#define ZEND_ACC_USER_ARG_INFO (1 << 21) /* | X | | */ +#define ZEND_ACC_USER_ARG_INFO (1 << 22) /* | X | | */ /* | | | */ -#define ZEND_ACC_GENERATOR (1 << 22) /* | X | | */ +#define ZEND_ACC_GENERATOR (1 << 23) /* | X | | */ /* | | | */ -#define ZEND_ACC_DONE_PASS_TWO (1 << 23) /* | X | | */ +#define ZEND_ACC_DONE_PASS_TWO (1 << 24) /* | X | | */ /* | | | */ /* internal function is allocated at arena (int only) | | | */ -#define ZEND_ACC_ARENA_ALLOCATED (1 << 24) /* | X | | */ +#define ZEND_ACC_ARENA_ALLOCATED (1 << 25) /* | X | | */ /* | | | */ /* op_array uses strict mode types | | | */ #define ZEND_ACC_STRICT_TYPES (1 << 31) /* | X | | */